From a03c9bf1b18f5cd553da2afb2c520df261c70821 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 1 Jul 2015 13:59:25 -0400 Subject: [PATCH] c-opts.c (c_common_post_options): Highest ABI level is now 10. gcc/c-family/ * c-opts.c (c_common_post_options): Highest ABI level is now 10. gcc/cp/ * mangle.c (write_CV_qualifiers_for_type, write_nested_name): Attribute mangling is now -fabi-version=10. From-SVN: r225271 --- gcc/c-family/ChangeLog | 4 ++++ gcc/c-family/c-opts.c | 2 +- gcc/common.opt | 9 ++++++--- gcc/cp/ChangeLog | 3 +++ gcc/cp/mangle.c | 6 +++--- gcc/testsuite/g++.dg/abi/macro0.C | 2 +- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 27ae6064d22..87c8d9477e3 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2015-07-01 Jason Merrill + + * c-opts.c (c_common_post_options): Highest ABI level is now 10. + 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> Implement N4197 - Adding u8 character literals diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 4e0894fc221..195045e961e 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -887,7 +887,7 @@ c_common_post_options (const char **pfilename) /* Change flag_abi_version to be the actual current ABI level for the benefit of c_cpp_builtins. */ if (flag_abi_version == 0) - flag_abi_version = 9; + flag_abi_version = 10; /* Set C++ standard to C++98 if not specified on the command line. */ if (c_dialect_cxx () && cxx_dialect == cxx_unset) diff --git a/gcc/common.opt b/gcc/common.opt index dd49ae31880..6b2ccbc5239 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -838,9 +838,12 @@ Driver Undocumented ; function types with function-cv-qualifiers. ; First selectable in G++ 4.9 and default in G++ 5. ; -; 9: The version of the ABI that mangles attributes that affect type -; identity, such as ia32 calling convention attributes (stdcall, etc.) -; Default in G++ 6 (set in c_common_post_options). +; 9: The version of the ABI that corrects the alignment of nullptr_t. +; First selectable and default in G++ 5.2. +; +; 10: The version of the ABI that mangles attributes that affect type +; identity, such as ia32 calling convention attributes (stdcall, etc.) +; Default in G++ 6 (set in c_common_post_options). ; ; Additional positive integers will be assigned as new versions of ; the ABI become the default version of the ABI. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2ade4652ff8..3073d7be859 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2015-07-01 Jason Merrill + * mangle.c (write_CV_qualifiers_for_type, write_nested_name): + Attribute mangling is now -fabi-version=10. + PR c++/65945 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t. * class.c (layout_nonempty_base_or_field): Warn if that affects diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 6246632710f..cf260c419e1 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -984,7 +984,7 @@ write_nested_name (const tree decl) write_template_prefix (decl); write_template_args (TI_ARGS (template_info)); } - else if ((!abi_version_at_least (9) || TREE_CODE (decl) == TYPE_DECL) + else if ((!abi_version_at_least (10) || TREE_CODE (decl) == TYPE_DECL) && TREE_CODE (TREE_TYPE (decl)) == TYPENAME_TYPE) { tree name = TYPENAME_TYPE_FULLNAME (TREE_TYPE (decl)); @@ -2196,7 +2196,7 @@ write_CV_qualifiers_for_type (const tree type) We don't do this with classes and enums because their attributes are part of their definitions, not something added on. */ - if (abi_version_at_least (9) && !OVERLOAD_TYPE_P (type)) + if (abi_version_at_least (10) && !OVERLOAD_TYPE_P (type)) { auto_vec vec; for (tree a = TYPE_ATTRIBUTES (type); a; a = TREE_CHAIN (a)) @@ -2230,7 +2230,7 @@ write_CV_qualifiers_for_type (const tree type) } ++num_qualifiers; - if (abi_version_crosses (9)) + if (abi_version_crosses (10)) G.need_abi_warning = true; } } diff --git a/gcc/testsuite/g++.dg/abi/macro0.C b/gcc/testsuite/g++.dg/abi/macro0.C index 35b8769c3d3..6a695b9f580 100644 --- a/gcc/testsuite/g++.dg/abi/macro0.C +++ b/gcc/testsuite/g++.dg/abi/macro0.C @@ -1,6 +1,6 @@ // This testcase will need to be kept in sync with c_common_post_options. // { dg-options "-fabi-version=0" } -#if __GXX_ABI_VERSION != 1009 +#if __GXX_ABI_VERSION != 1010 #error "Incorrect value of __GXX_ABI_VERSION" #endif -- 2.30.2