#elsif
Philippe De Muyter
phdm@macqel.be
Tue Apr 7 06:54:00 GMT 1998
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;
}
More information about the Gcc
mailing list