Volatile constants?
Andi Kleen
ak@suse.de
Wed Mar 29 12:18:00 GMT 2000
Kevin Handy <kth@srv.net> writes:
>
> After preprocess
>
> int s = (-7<0 ? --7 : -7)
>
> I'd guess that the decrement '--7' is what is causing you the problem
> This is why you should always use extra parentheses in your #defines
This is not true. ANSI-C generates tokens before preprocessing.
The tokens are not concatenated afterwards, unless you use ##
It should be parsed as - - 7, which is legal C. Maybe some prehistoric
K&R preprocessors do it differently.
The problem is just that inline calls are not allowed in constant
expressions, and a global definition expects a constant expression
as initializer. inline does not change the grammar here.
-Andi
More information about the Gcc
mailing list