According to the standard

#define str(x) #x
#define str(x) %:x

violates a constraint, but GCC accepts it.  Amusingly, Comeau shares the same 
bug.

A similar bug exists with the paste operator.

-- 
           Summary: Gcc doesn't complain about non-benign macro definitions
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: neil at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to