This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
#elsif
- To: gcc2 at cygnus dot com (gcc mailing list), egcs at cygnus dot com (egcs mailing list)
- Subject: #elsif
- From: "Philippe De Muyter" <phdm at macqel dot be>
- Date: Tue, 7 Apr 1998 12:08:20 +0200 (MET DST)
The following program compiles without a warning with gcc -W -Wall,
but does not do what the programmer expected.
With the native cc, I get :
**Error: /tmp/elsif.c: 8: undefined control
-----------------------------------------------------------------------
#include "stdio.h"
#define B
int main()
{
#if defined(A)
printf("A defined\n");
#elsif defined(B)
printf("B undefined\n");
#else /* nor A nor B */
printf("nor A nor B defined\n");
#endif
return 0;
}