+2015-02-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/64956
+ * c-opts.c (c_common_post_options): Change flag_abi_version from 0
+ to the current highest version.
+ * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
+
2015-02-04 Jakub Jelinek <jakub@redhat.com>
PR c/64824
/* Represents the C++ ABI version, always defined so it can be used while
preprocessing C and assembler. */
if (flag_abi_version == 0)
- /* Use a very large value so that:
-
- #if __GXX_ABI_VERSION >= <value for version X>
-
- will work whether the user explicitly says "-fabi-version=x" or
- "-fabi-version=0". Do not use INT_MAX because that will be
- different from system to system. */
- builtin_define_with_int_value ("__GXX_ABI_VERSION", 999999);
+ /* We should have set this to something real in c_common_post_options. */
+ gcc_unreachable ();
else if (flag_abi_version == 1)
/* Due to a historical accident, this version had the value
"102". */
warn_abi = false;
}
+ /* 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 = 8;
+
if (cxx_dialect >= cxx11)
{
/* If we're allowing C++0x constructs, don't warn about C++98
;
; 1: The version of the ABI first used in G++ 3.2. No longer selectable.
;
-; 2: The version of the ABI first used in G++ 3.4 (and current default).
+; 2: The version of the ABI first used in G++ 3.4, and the default
+; until GCC 4.9.
;
; 3: The version of the ABI that fixes the missing underscore
; in template non-type arguments of pointer type.
;
; 8: The version of the ABI that corrects the substitution behavior of
; function types with function-cv-qualifiers.
-; First selectable in G++ 4.9.
+; First selectable in G++ 4.9 and default in G++ 5
+; (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.
+// This testcase will need to be kept in sync with c_common_post_options.
// { dg-options "-fabi-version=0" }
-#if __GXX_ABI_VERSION != 999999
+#if __GXX_ABI_VERSION != 1008
#error "Incorrect value of __GXX_ABI_VERSION"
#endif