A
Alex Vinokur
A program below prints "Second".
A preprocessor doesn't know BBB,
but it seems that it (preprocessor) uses 0 unstead of BBB.
Why doesn't the preprocessor produce error/warning: "BBB is indefined"?
====== foo.c ======
#include <stdio.h>
#define AAA 1
enum
{
BBB = 2
};
int main ()
{
#if (BBB > AAA)
printf ("First\n");
#else
printf ("Second\n");
#endif
return 0;
}
===================
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn
A preprocessor doesn't know BBB,
but it seems that it (preprocessor) uses 0 unstead of BBB.
Why doesn't the preprocessor produce error/warning: "BBB is indefined"?
====== foo.c ======
#include <stdio.h>
#define AAA 1
enum
{
BBB = 2
};
int main ()
{
#if (BBB > AAA)
printf ("First\n");
#else
printf ("Second\n");
#endif
return 0;
}
===================
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn