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: unassig...@gcc.gnu.org

        ReportedBy: ppluzhni...@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" "");

Reply via email to