From 36a85135b746a41cebcd738193c3e238f5d0399e Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 1 Jul 2015 15:25:50 -0400 Subject: [PATCH] c-common.h (D_CXX11): Rename from D_CXX0X. gcc/c-family/ * c-common.h (D_CXX11): Rename from D_CXX0X. (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X. * c-common.c: Adjust. gcc/cp/ * lex.c (init_reswords): s/CXX0X/CXX11/. * parser.c (cp_lexer_get_preprocessor_token): Likewise. From-SVN: r225273 --- gcc/c-family/ChangeLog | 4 ++++ gcc/c-family/c-common.c | 20 ++++++++++---------- gcc/c-family/c-common.h | 6 +++--- gcc/c-family/c-lex.c | 2 +- gcc/cp/ChangeLog | 3 +++ gcc/cp/lex.c | 2 +- gcc/cp/parser.c | 4 ++-- 7 files changed, 24 insertions(+), 17 deletions(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index bd16a6d536f..49f33d6357a 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,9 @@ 2015-07-01 Jason Merrill + * c-common.h (D_CXX11): Rename from D_CXX0X. + (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X. + * c-common.c: Adjust. + * c-opts.c (c_common_post_options): Default to C++14. * c-opts.c (c_common_post_options): Highest ABI level is now 10. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 835fc2ce190..64c44550ef2 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -514,8 +514,8 @@ const struct c_common_resword c_common_reswords[] = { "__underlying_type", RID_UNDERLYING_TYPE, D_CXXONLY }, { "__volatile", RID_VOLATILE, 0 }, { "__volatile__", RID_VOLATILE, 0 }, - { "alignas", RID_ALIGNAS, D_CXXONLY | D_CXX0X | D_CXXWARN }, - { "alignof", RID_ALIGNOF, D_CXXONLY | D_CXX0X | D_CXXWARN }, + { "alignas", RID_ALIGNAS, D_CXXONLY | D_CXX11 | D_CXXWARN }, + { "alignof", RID_ALIGNOF, D_CXXONLY | D_CXX11 | D_CXXWARN }, { "asm", RID_ASM, D_ASM }, { "auto", RID_AUTO, 0 }, { "bool", RID_BOOL, D_CXXONLY | D_CXXWARN }, @@ -523,14 +523,14 @@ const struct c_common_resword c_common_reswords[] = { "case", RID_CASE, 0 }, { "catch", RID_CATCH, D_CXX_OBJC | D_CXXWARN }, { "char", RID_CHAR, 0 }, - { "char16_t", RID_CHAR16, D_CXXONLY | D_CXX0X | D_CXXWARN }, - { "char32_t", RID_CHAR32, D_CXXONLY | D_CXX0X | D_CXXWARN }, + { "char16_t", RID_CHAR16, D_CXXONLY | D_CXX11 | D_CXXWARN }, + { "char32_t", RID_CHAR32, D_CXXONLY | D_CXX11 | D_CXXWARN }, { "class", RID_CLASS, D_CXX_OBJC | D_CXXWARN }, { "const", RID_CONST, 0 }, - { "constexpr", RID_CONSTEXPR, D_CXXONLY | D_CXX0X | D_CXXWARN }, + { "constexpr", RID_CONSTEXPR, D_CXXONLY | D_CXX11 | D_CXXWARN }, { "const_cast", RID_CONSTCAST, D_CXXONLY | D_CXXWARN }, { "continue", RID_CONTINUE, 0 }, - { "decltype", RID_DECLTYPE, D_CXXONLY | D_CXX0X | D_CXXWARN }, + { "decltype", RID_DECLTYPE, D_CXXONLY | D_CXX11 | D_CXXWARN }, { "default", RID_DEFAULT, 0 }, { "delete", RID_DELETE, D_CXXONLY | D_CXXWARN }, { "do", RID_DO, 0 }, @@ -553,8 +553,8 @@ const struct c_common_resword c_common_reswords[] = { "mutable", RID_MUTABLE, D_CXXONLY | D_CXXWARN }, { "namespace", RID_NAMESPACE, D_CXXONLY | D_CXXWARN }, { "new", RID_NEW, D_CXXONLY | D_CXXWARN }, - { "noexcept", RID_NOEXCEPT, D_CXXONLY | D_CXX0X | D_CXXWARN }, - { "nullptr", RID_NULLPTR, D_CXXONLY | D_CXX0X | D_CXXWARN }, + { "noexcept", RID_NOEXCEPT, D_CXXONLY | D_CXX11 | D_CXXWARN }, + { "nullptr", RID_NULLPTR, D_CXXONLY | D_CXX11 | D_CXXWARN }, { "operator", RID_OPERATOR, D_CXXONLY | D_CXXWARN }, { "private", RID_PRIVATE, D_CXX_OBJC | D_CXXWARN }, { "protected", RID_PROTECTED, D_CXX_OBJC | D_CXXWARN }, @@ -567,13 +567,13 @@ const struct c_common_resword c_common_reswords[] = { "signed", RID_SIGNED, 0 }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, - { "static_assert", RID_STATIC_ASSERT, D_CXXONLY | D_CXX0X | D_CXXWARN }, + { "static_assert", RID_STATIC_ASSERT, D_CXXONLY | D_CXX11 | D_CXXWARN }, { "static_cast", RID_STATCAST, D_CXXONLY | D_CXXWARN }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "template", RID_TEMPLATE, D_CXXONLY | D_CXXWARN }, { "this", RID_THIS, D_CXXONLY | D_CXXWARN }, - { "thread_local", RID_THREAD, D_CXXONLY | D_CXX0X | D_CXXWARN }, + { "thread_local", RID_THREAD, D_CXXONLY | D_CXX11 | D_CXXWARN }, { "throw", RID_THROW, D_CXX_OBJC | D_CXXWARN }, { "true", RID_TRUE, D_CXXONLY | D_CXXWARN }, { "try", RID_TRY, D_CXX_OBJC | D_CXXWARN }, diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index dd9839682c2..d84c58eba35 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -214,8 +214,8 @@ enum rid RID_FIRST_MODIFIER = RID_STATIC, RID_LAST_MODIFIER = RID_ONEWAY, - RID_FIRST_CXX0X = RID_CONSTEXPR, - RID_LAST_CXX0X = RID_STATIC_ASSERT, + RID_FIRST_CXX11 = RID_CONSTEXPR, + RID_LAST_CXX11 = RID_STATIC_ASSERT, RID_FIRST_AT = RID_AT_ENCODE, RID_LAST_AT = RID_AT_IMPLEMENTATION, RID_FIRST_PQ = RID_IN, @@ -381,7 +381,7 @@ extern machine_mode c_default_pointer_mode; #define D_CONLY 0x001 /* C only (not in C++). */ #define D_CXXONLY 0x002 /* C++ only (not in C). */ #define D_C99 0x004 /* In C, C99 only. */ -#define D_CXX0X 0x008 /* In C++, C++0X only. */ +#define D_CXX11 0x008 /* In C++, C++11 only. */ #define D_EXT 0x010 /* GCC extension. */ #define D_EXT89 0x020 /* GCC extension incorporated in C99. */ #define D_ASM 0x040 /* Disabled by -fno-asm. */ diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c index aa5d6e2313f..fe31256060d 100644 --- a/gcc/c-family/c-lex.c +++ b/gcc/c-family/c-lex.c @@ -774,7 +774,7 @@ interpret_integer (const cpp_token *token, unsigned int flags, } /* Interpret TOKEN, a floating point number with FLAGS as classified - by cpplib. For C++0X SUFFIX may contain a user-defined literal suffix. */ + by cpplib. For C++11 SUFFIX may contain a user-defined literal suffix. */ static tree interpret_float (const cpp_token *token, unsigned int flags, const char *suffix, enum overflow_type *overflow) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3073d7be859..dacc82876fe 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2015-07-01 Jason Merrill + * lex.c (init_reswords): s/CXX0X/CXX11/. + * parser.c (cp_lexer_get_preprocessor_token): Likewise. + * mangle.c (write_CV_qualifiers_for_type, write_nested_name): Attribute mangling is now -fabi-version=10. diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 915fbddff02..d8ee8e33965 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -174,7 +174,7 @@ init_reswords (void) int mask = 0; if (cxx_dialect < cxx11) - mask |= D_CXX0X; + mask |= D_CXX11; if (flag_no_asm) mask |= D_ASM | D_EXT; if (flag_no_gnu_keywords) diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 35191a1cabc..8d8ec3003c2 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -791,8 +791,8 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer, cp_token *token) else { if (warn_cxx11_compat - && C_RID_CODE (token->u.value) >= RID_FIRST_CXX0X - && C_RID_CODE (token->u.value) <= RID_LAST_CXX0X) + && C_RID_CODE (token->u.value) >= RID_FIRST_CXX11 + && C_RID_CODE (token->u.value) <= RID_LAST_CXX11) { /* Warn about the C++0x keyword (but still treat it as an identifier). */ -- 2.30.2