This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, C++, CPP] Add C++1z to the preprocessor. Rename C++1y to C++14.


Adding a few more tweaks:

commit bf054f32b165fda6e90c52a57a31538e5ae24678
Author: Jason Merrill <jason@redhat.com>
Date:   Mon Aug 25 00:48:17 2014 -0400

    	* c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
    	-std=c++14 and -std=gnu++14, rather than the reverse.
    	* c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
    	OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
    	* c-common.h (cxx_dialect): Remove cxx1y.

diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index f621a3a..d1cc810 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -640,9 +640,8 @@ enum cxx_dialect {
   /* C++11  */
   cxx0x,
   cxx11 = cxx0x,
-  /* C++14  */
-  cxx1y,
-  cxx14 = cxx1y,
+  /* C++14 */
+  cxx14,
   /* C++1z (C++17?) */
   cxx1z
 };
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 42f1759..1b01b4f 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -698,12 +698,12 @@ c_common_handle_option (size_t scode, const char *arg, int value,
 	}
       break;
 
-    case OPT_std_c__1y:
-    case OPT_std_gnu__1y:
+    case OPT_std_c__14:
+    case OPT_std_gnu__14:
       if (!preprocessing_asm_p)
 	{
-	  set_std_cxx14 (code == OPT_std_c__1y /* ISO */);
-	  if (code == OPT_std_c__1y)
+	  set_std_cxx14 (code == OPT_std_c__14 /* ISO */);
+	  if (code == OPT_std_c__14)
 	    cpp_opts->ext_numeric_literals = 0;
 	}
       break;
@@ -1587,7 +1587,7 @@ set_std_cxx11 (int iso)
   cxx_dialect = cxx11;
 }
 
-/* Set the C++ 201y draft standard (without GNU extensions if ISO).  */
+/* Set the C++ 2014 draft standard (without GNU extensions if ISO).  */
 static void
 set_std_cxx14 (int iso)
 {
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index cb7bb3e..d619250 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1440,11 +1440,12 @@ C++ ObjC++ Alias(std=c++11) Undocumented
 Deprecated in favor of -std=c++11
 
 std=c++1y
-C++ ObjC++
-Conform to the ISO 2014(?) C++ draft standard (experimental and incomplete support)
+C++ ObjC++ Alias(std=c++14) Undocumented
+Deprecated in favor of -std=c++14
 
 std=c++14
-C++ ObjC++ Alias(std=c++1y) Undocumented
+C++ ObjC++ Undocumented
+Conform to the ISO 2014 C++ standard (experimental and incomplete support)
 
 std=c++1z
 C++ ObjC++
@@ -1496,11 +1497,11 @@ C++ ObjC++ Alias(std=gnu++11)
 Deprecated in favor of -std=gnu++11
 
 std=gnu++1y
-C++ ObjC++
-Conform to the ISO 201y(4?) C++ draft standard with GNU extensions (experimental and incomplete support)
+C++ ObjC++ Alias(std=gnu++14) Undocumented
 
 std=gnu++14
-C++ ObjC++ Alias(std=gnu++1y) Undocumented
+C++ ObjC++
+Conform to the ISO 2014 C++ standard with GNU extensions (experimental and incomplete support)
 
 std=gnu++1z
 C++ ObjC++
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index f76fc3f..c50d8b8 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -248,10 +248,10 @@ static GTY(()) bool cold_text_section_used = false;
 /* The default cold text section.  */
 static GTY(()) section *cold_text_section;
 
-/* The DIE for C++1y 'auto' in a function return type.  */
+/* The DIE for C++14 'auto' in a function return type.  */
 static GTY(()) dw_die_ref auto_die;
 
-/* The DIE for C++1y 'decltype(auto)' in a function return type.  */
+/* The DIE for C++14 'decltype(auto)' in a function return type.  */
 static GTY(()) dw_die_ref decltype_auto_die;
 
 /* Forward declarations for functions defined in this file.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]