Why does GCC Preprocessor NOT support such macro?
Zhang Lin
zhanglin0714@163.com
Fri Oct 23 14:05:00 GMT 2009
Hello,
I have encountered an issue when building ACE with MinGW and GCC 4.4.1
The following macro was not accepted by the preprocessor and it reported such an error: "error: operator '==' has no left operand".
#if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
# define ACE_HAS_NONSTATIC_OBJECT_MANAGER
#elif (ACE_HAS_NONSTATIC_OBJECT_MANAGER == 0)
# undef ACE_HAS_NONSTATIC_OBJECT_MANAGER
#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
As I think, since ACE_HAS_NONSTATIC_OBJECT_MANAGER isn't defined, the #elif branch should not be processed.
This macro is accepted by VC7.1 and Sun Studio 12.
Thanks.
Best Regards,
Lin Zhang
2009-10-23
More information about the Gcc
mailing list