From 028aee171abc1b13e97734bac4a3db46743d7a6b Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 25 Aug 2014 01:05:01 -0400 Subject: [PATCH] c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for -std=c++14 and -std=gnu++14... * 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. From-SVN: r214414 --- gcc/c-family/ChangeLog | 8 ++++++++ gcc/c-family/c-common.h | 5 ++--- gcc/c-family/c-opts.c | 10 +++++----- gcc/c-family/c.opt | 13 +++++++------ gcc/dwarf2out.c | 4 ++-- 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 8f5bf10..fa11d68 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,11 @@ +2014-08-25 Jason Merrill + + * 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. + 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net> * c-common.h (enum cxx_dialect): Add cxx14. 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. */ -- 2.7.4