News for hackers. Stuff that matters.
Re:Clang vs. Clang by robinsonb5 on Monday August 05, 2024 @10:44AM (#41161844)
Fair point, however your example is a runtime check, so shouldn't result in dead code.

(And if DEBUG is a static define then it still won't result in dead code since the preprocessor will remove it, and the compiler will never actually see it.)

EDIT: and now I realise I misread the first example all along - I read "#if (DEBUG)" rather than "if (DEBUG)".

There are no comments on this comment yet.