logoalt Hacker News

1718627440last Monday at 6:42 PM1 replyview on HN

Making something a valid program that shouldn't be. Thus, potentially creating/hiding bugs. I also explicitly invoke UB on all the code paths I do not want to be valid.


Replies

WalterBrightlast Monday at 11:53 PM

I've had the pleasure of spending many hours hunting down an uninitialized variable, as its value would change anytime I got close to it. BTW, if you really, really, want an uninitialized variable:

    int x = void;
will do it.
show 1 reply