#elif without parentheses

Using VS2005 with BLAH_BLAH, the following preprocessor condition is defined: false /

#elif defined BLAH_BLAH

but if I change it to

#elif defined(BLAH_BLAH)

It's true.

Why do parentheses matter here?

+3
source share
2 answers

The header file was created using the linux editor and added to the project using "Add Existing", after creating the file in the VS editor, it is evaluated as true. Should there be a problem with LF / CR?

+1
source

This should not make any difference if BLAH_BLAH is not funny.

+7
source

All Articles