
Dear Nathan Sidwell,
In message 4D0718D5.2050307@codesourcery.com you wrote:
It is required by the C and C++ standards.
Could you please provide a link? Not that I don't believe you, but I'd like to understand the rationale, if there is any.
C std 6.10.1 para 2
Hm... which exact part requires this behaviour? Please quote, to make sure we're accessing the same text.
I'm asking because the "Rationale" has the following part (see http://www.lysator.liu.se/c/rat/c8.html#3-8-1) :
... " Processing of skipped material is defined such that an implementation need only examine a logical line for the # and then for a directive name. Thus, assuming that xxx is undefined, in this example:
# ifndef xxx # define xxx "abc" # elif xxx > 0 /* ... */ # endif
an implementation is not required to diagnose an error for the elif statement, even though if it were processed, a syntactic error would be detected. " ...
To me this looks like the situation we have here?
I understand that "is not required" still permits such behaviour, but you say it is _required_ which is yet another thing.
Thanks.
Best regards,
Wolfgang Denk