From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: eggert@twinsun.com (Paul Eggert) Cc: phdm@macqel.be, gcc2@cygnus.com, egcs@cygnus.com Subject: Re: #elsif Date: Wed, 08 Apr 1998 09:27:00 -0000 Message-id: <199804081408.PAA05481@phal.cygnus.co.uk> References: <199804080118.SAA26855@shade.twinsun.com> X-SW-Source: 1998-04/msg00322.html > Date: Tue, 7 Apr 1998 12:08:20 +0200 (MET DST) > From: "Philippe De Muyter" > > #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 > > As I read the C standard, if A is not defined, then GCC is required to > accept that program fragment, though I admit the standard's wording is > not entirely clear. > > It might be useful for cpp to warn about skipped, unknown directives > if -W or -Wall is specified. IIRC the standard allows any number of warnings, no matter how bogus they are. So why not always warn about #elsif - it seems an obvious enough typo to warn about even if we don't want to warn about unknown directives in general.