Search code examples
c++visual-studio-2005c-preprocessor

#elif defined without parentheses


Using VS2005 with BLAH_BLAH defined the following preprocessor conditional is false:

#elif defined BLAH_BLAH

but if I change it to

#elif defined(BLAH_BLAH)

it is true.

Why do the parentheses make a difference here?


Solution

  • The header file was created with a linux editor and added to the project with "Add Existing", after creating the file in the VS editor it evaluates to true. Must be a LF/CR issue?