From: Jason Merrill <jason@redhat.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: PATCHes to help with C++11 bootstrap
Date: Sat, 09 May 2015 21:50:00 -0000 [thread overview]
Message-ID: <554E80EE.600@redhat.com> (raw)
In-Reply-To: <20150509182746.GA365@x4>
[-- Attachment #1: Type: text/plain, Size: 269 bytes --]
On 05/09/2015 01:27 PM, Markus Trippelsdorf wrote:
> This also enables the following bogus warning:
> ~ % g++ -Wall -std=c++11 test.cpp
> test.cpp:3:26: warning: â>>â operator is treated as two right angle brackets in C++11 [-Wc++11-compat]
Fixed thus:
[-- Attachment #2: wcxx11_compat.patch --]
[-- Type: text/x-patch, Size: 1079 bytes --]
commit 1c492cd18b2869305cc3ee16f84b6464f98f4e4c
Author: Jason Merrill <jason@redhat.com>
Date: Sat May 9 16:16:46 2015 -0500
* c-opts.c (c_common_post_options): Also clear
cpp_opts->cpp_warn_cxx11_compat.
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index bd99871..e9eb511 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -905,6 +905,7 @@ c_common_post_options (const char **pfilename)
/* If we're allowing C++0x constructs, don't warn about C++98
identifiers which are keywords in C++0x. */
warn_cxx11_compat = 0;
+ cpp_opts->cpp_warn_cxx11_compat = 0;
if (warn_narrowing == -1)
warn_narrowing = 1;
diff --git a/gcc/testsuite/g++.dg/cpp0x/bracket5.C b/gcc/testsuite/g++.dg/cpp0x/bracket5.C
new file mode 100644
index 0000000..22ac544
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/bracket5.C
@@ -0,0 +1,6 @@
+// { dg-options "-Wall" }
+// { dg-do compile { target c++11 } }
+
+template <int> struct X {};
+template <typename> struct Y { static int const c = 0; };
+int main() { return Y<X<1>>::c; }
next prev parent reply other threads:[~2015-05-09 21:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-09 4:31 Jason Merrill
2015-05-09 10:37 ` Richard Biener
2015-05-10 0:44 ` Jason Merrill
2015-07-11 10:16 ` Hans-Peter Nilsson
2015-05-09 18:27 ` Markus Trippelsdorf
2015-05-09 21:50 ` Jason Merrill [this message]
2015-05-09 21:54 ` Jason Merrill
2015-05-11 11:30 ` Markus Trippelsdorf
2015-05-13 3:31 ` Jason Merrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=554E80EE.600@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=markus@trippelsdorf.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).