[Bug c++/56411] New: [4.8 regression] Wrong preprocessor output with -std=c++11

ppluzhnikov at google dot com gcc-bugzilla@gcc.gnu.org
Wed Feb 20 19:23:00 GMT 2013


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

             Bug #: 56411
           Summary: [4.8 regression] Wrong preprocessor output with
                    -std=c++11
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ppluzhnikov@google.com


This is a continuation of PR 52538.

Broke somewhere between r195930(ok) and r196104(broken).

cat t.cc

#define FOO(str) sizeof(""str"")
#define BAR(str) sizeof("" str "")

int main()
{
  unsigned long a = FOO("abc");
  unsigned long b = BAR("abc");
}



g++ -E  /tmp/t.cc  | grep sizeof
  unsigned long a = sizeof("""abc""");
  unsigned long b = sizeof("" "abc" "");

g++ -E -std=c++11 /tmp/t.cc  | grep sizeof
  unsigned long a = sizeof(""str"");         <<<< WHAT?
  unsigned long b = sizeof("" "abc" "");



More information about the Gcc-bugs mailing list