Commit 5cef3733 by Jason Merrill Committed by Jason Merrill

c-opts.c (c_common_post_options): Warn about useless -Wabi.

	* 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
parent 30c0ee9c
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
......
......@@ -417,8 +417,6 @@ c_common_handle_option (size_t scode, const char *arg, int value,
value = 2;
}
warn_abi_version = value;
if (flag_abi_compat_version == -1)
flag_abi_compat_version = value;
break;
case OPT_fcanonical_system_headers:
......@@ -942,7 +940,17 @@ c_common_post_options (const char **pfilename)
{
warn_abi_version = latest_abi_version;
if (flag_abi_version == latest_abi_version)
{
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
{
......
......@@ -5,7 +5,7 @@
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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment