This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

#elsif


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;
        }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]