On 2015.05.08 at 23:30 -0500, Jason Merrill wrote: > One C++11 compatibility issue that turns up a lot in the GCC sources is > that in C++98, > > #define BAR "bar" > const char *p = "foo"BAR; > > is well-formed, giving p the value "foobar". But in C++11 this is a > user-defined literal with the suffix BAR, which is ill-formed because > there is no BAR suffix defined. > > -Wc++11-compat didn't warn about this, which I'm fixing with the first > patch. > > The second patch fixes all the occurrences in GCC. > > The third patch fixes the warning to say "-Wc++11-compat" rather than > "-Wc++0x-compat".
This also enables the following bogus warning: ~ % cat test.cpp template <int> struct X {}; template <typename> struct Y { static int const c = 0; }; int main() { return Y<X<1>>::c; } ~ % g++ -Wall -std=c++11 test.cpp test.cpp: In function ‘int main()’: test.cpp:3:26: warning: ‘>>’ operator is treated as two right angle brackets in C++11 [-Wc++11-compat] int main() { return Y<X<1>>::c; } ^ test.cpp:3:26: note: suggest parentheses around ‘>>’ expression -- Markus