This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Newbie: C++ Frontend Lexical Analysis Issue, <::abs(n) does notparse


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]