#elsif

Gavin Romig-Koch gavin@cygnus.com
Wed Apr 8 21:45:00 GMT 1998


Paul Eggert writes:
 >    Date: Wed, 8 Apr 1998 10:16:11 -0400 (EDT)
 >    From: Gavin Romig-Koch <gavin@cygnus.com>
 > 
 >    The syntax of preprocessing directives are clearly spelled out,
 > 
 > Yes; here's the definition in the standard.
 > 
 > 	A preprocessing directive consists of a sequence of
 > 	preprocessing tokens that begins with a `#' preprocessing
 > 	token that is either the first character in the source file
 > 	(optionally after white space containing no new-line
 > 	characters) or that follows white space containing at least
 > 	one new-line character, and is ended by the next new-line
 > 	character.
 > 
 > Draft C9x changes this wording slightly, but the change doesn't matter
 > for our purposes.
 > 
 >    and "#elsif" does not fit.
 > 
 > I don't see why not.  `#elsif' is a sequence of preprocessing tokens,
 > all alone in a line; this fits the definition quoted above.

Yes, I see.  I don't like it :-), but I agree.  

Since the directive is ifdef'ed out, it can just be a sequence of
pp-tokens that are ignored.

So yes, a warning is appropriate in this case. 

                                             -gavin



More information about the Gcc mailing list