The following invalid code snippet generates a bogus error message since
GCC 3.1:

==========================
#define foo - ## >>
foo;
==========================

bug.c:2:1: error: pasting "->" and ">>" does not give a valid preprocessing
token
bug.c:2: error: expected identifier or '(' before '->' token

The problem is that we tried to paste "-" and ">>" and not "->" and ">>".
GCC 3.0.x produced a correct diagnostic.


-- 
           Summary: [4.0/4.1/4.2 regression] Bad diagnostic pasting tokens
                    with ##
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: diagnostic, monitored
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28709

Reply via email to