* c-opts.c (c_common_post_options): Warn about useless -Wabi.
(c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
handling.
From-SVN: r261571
2018-06-13 Jason Merrill <jason@redhat.com>
+ * c-opts.c (c_common_post_options): Warn about useless -Wabi.
+ (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
+ handling.
+
PR c++/86094 - wrong code with defaulted move ctor.
* c-opts.c (c_common_post_options): Bump the current ABI version to
13. Set warn_abi_version and flag_abi_compat_version to the current
value = 2;
}
warn_abi_version = value;
- if (flag_abi_compat_version == -1)
- flag_abi_compat_version = value;
break;
case OPT_fcanonical_system_headers:
{
warn_abi_version = latest_abi_version;
if (flag_abi_version == latest_abi_version)
- flag_abi_compat_version = abi_compat_default;
+ {
+ if (warning (OPT_Wabi, "-Wabi won't warn about anything"))
+ {
+ inform (input_location, "-Wabi warns about differences "
+ "from the most up-to-date ABI, which is also used "
+ "by default");
+ inform (input_location, "use e.g. -Wabi=11 to warn about "
+ "changes from GCC 7");
+ }
+ flag_abi_compat_version = abi_compat_default;
+ }
else
flag_abi_compat_version = latest_abi_version;
}
// PR c++/83489
-// { dg-options "-Wabi" }
+// { dg-options "-Wabi=11" }
struct A
{
superclasses should be removed). */
/* Contributed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do run } */
-/* { dg-options "-Wpadded -Wabi" } */
+/* { dg-options "-Wpadded -Wabi=8" } */
/* Leave blank lines here to keep warnings on the same lines. */
/* Ensure that we do not get bizarre warnings referring to
__attribute__((packed)) or some such. */
/* { dg-do compile } */
-/* { dg-options "-Wpadded -Wpacked -Wabi" } */
+/* { dg-options "-Wpadded -Wpacked -Wabi=8" } */
#include "../objc-obj-c++-shared/TestsuiteObject.h"