diff mbox

PATCH to add -std=c++14

Message ID 5319F252.3080208@redhat.com
State New
Headers show

Commit Message

Jason Merrill March 7, 2014, 4:22 p.m. UTC
It's looking very likely that we will have a new C++ standard this year, 
so I'm going to go ahead and add the -std=c++14 flag for 4.9; I just 
won't advertise it yet.

Tested x86_64-pc-linux-gnu, applying to trunk.

Comments

Mike Stump March 9, 2014, 1:30 a.m. UTC | #1
On Mar 7, 2014, at 8:22 AM, Jason Merrill <jason@redhat.com> wrote:
> It's looking very likely that we will have a new C++ standard this year, so I'm going to go ahead and add the -std=c++14 flag for 4.9; I just won't advertise it yet.

Are they any plans to change the default language for C++?
Ulrich Drepper March 9, 2014, 10:45 a.m. UTC | #2
On Sat, Mar 8, 2014 at 8:30 PM, Mike Stump <mikestump@comcast.net> wrote:
> Are they any plans to change the default language for C++?

Probably problematic for compatibility reasons.  But how about adding
c++1, g++11, and c++14, and g++14 wrappers similar to c99?
Mike Stump March 10, 2014, 8:35 a.m. UTC | #3
On Mar 9, 2014, at 3:45 AM, Ulrich Drepper <drepper@gmail.com> wrote:
> On Sat, Mar 8, 2014 at 8:30 PM, Mike Stump <mikestump@comcast.net> wrote:
>> Are they any plans to change the default language for C++?
> 
> Probably problematic for compatibility reasons.  But how about adding
> c++1, g++11, and c++14, and g++14 wrappers similar to c99?

I personally think the wrappers are stupid.  I’ve never seen anyone use them, ever.
diff mbox

Patch

commit f966b130e3b011c6ac2169472fdf6508b5373eeb
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Mar 5 13:22:47 2014 -0500

    	* c.opt: Add -std=c++14.

diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index aad54e2..93fb7c2 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1349,15 +1349,18 @@  Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum
 
 std=c++11
 C++ ObjC++
-Conform to the ISO 2011 C++ standard (experimental and incomplete support)
+Conform to the ISO 2011 C++ standard
 
 std=c++0x
-C++ ObjC++ Alias(std=c++11)
+C++ ObjC++ Alias(std=c++11) Undocumented
 Deprecated in favor of -std=c++11
 
 std=c++1y
 C++ ObjC++
-Conform to the ISO 201y(7?) C++ draft standard (experimental and incomplete support)
+Conform to the ISO 2014(?) C++ draft standard (experimental and incomplete support)
+
+std=c++14
+C++ ObjC++ Alias(std=c++1y) Undocumented
 
 std=c11
 C ObjC
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4a5caa3..2ee091a 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1722,14 +1722,12 @@  C++ code.
 
 @item c++11
 @itemx c++0x
-The 2011 ISO C++ standard plus amendments.  Support for C++11 is still
-experimental, and may change in incompatible ways in future releases.
+The 2011 ISO C++ standard plus amendments.
 The name @samp{c++0x} is deprecated.
 
 @item gnu++11
 @itemx gnu++0x
-GNU dialect of @option{-std=c++11}. Support for C++11 is still
-experimental, and may change in incompatible ways in future releases.
+GNU dialect of @option{-std=c++11}.
 The name @samp{gnu++0x} is deprecated.
 
 @item c++1y