Mail Archives: djgpp/1995/05/15/13:54:25
>>>>> "Morten" == Morten Welinder <terra AT diku DOT dk> writes:
Morten> The C language requires you to have whitespace between a
Morten> hex-number ending in "e" and a subsequent "+" or "-".
Exactly. Otherwise gcc is forced to parse it as an exponent. From
the gcc docs:
* GNU C complains about program fragments such as `0x74ae-0x4000'
which appear to be two hexadecimal constants separated by the minus
operator. Actually, this string is a single "preprocessing token".
Each such token must correspond to one token in C. Since this
does not, GNU C prints an error message. Although it may appear
obvious that what is meant is an operator and two values, the ANSI
C standard specifically requires that this be treated as erroneous.
A "preprocessing token" is a "preprocessing number" if it begins
with a digit and is followed by letters, underscores, digits,
periods and `e+', `e-', `E+', or `E-' character sequences.
To make the above program fragment valid, place whitespace in
front of the minus sign. This whitespace will end the
preprocessing number.
-Mat
- Raw text -