Newbie: C++ Frontend Lexical Analysis Issue, <::abs(n) does not parse
Zack Weinberg
zack@codesourcery.com
Sat Mar 27 23:35:00 GMT 2004
Thierry Moreau <thierry.moreau@connotech.com> writes:
> The following sample fails to compile by GCC, and I am surprised:
...
> { return ::abs(m)<::abs(n); } /* parse error here (!) */
When the two characters <: appear next to each other like this, it is
taken as an alternate spelling ("digraph") for a [ token. The point
of this is to make it easier to write C on the (rare) platforms which
do not have an [ character. This is an awkward feature but the
language standard requires it.
Inserting a space is the correct fix.
> Please excuse my reluctance to file an official bug report in
> another problem reporting service.
Huh? Is there a problem with our bug tracking system?
zw
More information about the Gcc-bugs
mailing list