From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118209 invoked by alias); 9 May 2015 18:27:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 118199 invoked by uid 89); 9 May 2015 18:27:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,KAM_MXURI,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mail.ud10.udmedia.de Received: from ud10.udmedia.de (HELO mail.ud10.udmedia.de) (194.117.254.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 09 May 2015 18:27:51 +0000 Received: (qmail 10873 invoked from network); 9 May 2015 20:27:46 +0200 Received: from unknown (HELO x4) (ud10?360p3@91.65.248.138) by mail.ud10.udmedia.de with ESMTPSA (DHE-RSA-AES256-SHA encrypted, authenticated); 9 May 2015 20:27:46 +0200 Date: Sat, 09 May 2015 18:27:00 -0000 From: Markus Trippelsdorf To: Jason Merrill Cc: gcc-patches List Subject: Re: PATCHes to help with C++11 bootstrap Message-ID: <20150509182746.GA365@x4> References: <554D8D79.9080502@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <554D8D79.9080502@redhat.com> X-SW-Source: 2015-05/txt/msg00828.txt.bz2 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 struct X {}; template struct Y { static int const c = 0; }; int main() { return Y>::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>::c; } ^ test.cpp:3:26: note: suggest parentheses around ‘>>’ expression -- Markus