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

            Bug ID: 58155
           Summary: -Wliteral-suffix warns about tokens which are skipped
                    by preprocessor
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
                CC: emsr at gcc dot gnu.org

This is valid code:

#define BAZ "baz"
#if 0
"bar"BAZ
#endif
int main() { }

But causes a diagnostic in C++11 mode:

u.cc:3:1: warning: invalid suffix on literal; C++11 requires a space between
literal and string macro [-Wliteral-suffix]
 "foo"BAR
 ^

According to 16.1 [cpp.cond] p6 the group should be skipped and its
preprocessing tokens are ignored, it shouldn't be checked for validity.

Reply via email to