diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2019-01-28 13:10:29 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2019-01-28 13:10:29 +0000 |
commit | 5ebfd62be840165392d2cbdbc98f0f971cd91300 (patch) | |
tree | 1606943cf0a0b75f571ce286f01326df8b785610 | |
parent | 811a671042cf922d4f6acaa575d32a3fcacdefdd (diff) | |
download | gcc-5ebfd62be840165392d2cbdbc98f0f971cd91300.zip gcc-5ebfd62be840165392d2cbdbc98f0f971cd91300.tar.gz gcc-5ebfd62be840165392d2cbdbc98f0f971cd91300.tar.bz2 |
common.opt (-Wattribute-alias): Remove "no-" from name.
2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
* common.opt (-Wattribute-alias): Remove "no-" from name.
Make -Wattribute-alias command line option and
#pragma GCC diagnostic ignored "-Wattribute-alias" work again.
testsuite:
2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gcc.dg/Wattribute-alias.c: Add test for #pragma GCC diagnostic ignored
"-Wattribute-alias".
From-SVN: r268336
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/common.opt | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/Wattribute-alias.c | 7 |
4 files changed, 22 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4d6208..b447913 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de> + + * common.opt (-Wattribute-alias): Remove "no-" from name. + Make -Wattribute-alias command line option and + #pragma GCC diagnostic ignored "-Wattribute-alias" work again. + 2019-01-28 Jakub Jelinek <jakub@redhat.com> PR target/89073 diff --git a/gcc/common.opt b/gcc/common.opt index 9a5e9af..295cb1f 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -550,14 +550,14 @@ Wattributes Common Var(warn_attributes) Init(1) Warning Warn about inappropriate attribute usage. +Wattribute-alias +Common Alias(Wattribute_alias=, 1, 0) Warning +Warn about type safety and similar errors and mismatches in attribute alias and related. + Wattribute-alias= Common Joined RejectNegative UInteger Var(warn_attribute_alias) Init(1) Warning IntegerRange(0, 2) Warn about type safety and similar errors and mismatches in attribute alias and related. -Wno-attribute-alias -Common Alias(Wattribute_alias=, 0, 0) Warning -Disable -Wattribute-alias. - Wcannot-profile Common Var(warn_cannot_profile) Init(1) Warning Warn when profiling instrumentation was requested, but could not be applied to diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 04e54b6..d4796df 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de> + + * gcc.dg/Wattribute-alias.c: Add test for #pragma GCC diagnostic ignored + "-Wattribute-alias". + 2019-01-27 Uroš Bizjak <ubizjak@gmail.com> PR fortran/70696 diff --git a/gcc/testsuite/gcc.dg/Wattribute-alias.c b/gcc/testsuite/gcc.dg/Wattribute-alias.c index 223da3a..228c1be 100644 --- a/gcc/testsuite/gcc.dg/Wattribute-alias.c +++ b/gcc/testsuite/gcc.dg/Wattribute-alias.c @@ -14,6 +14,13 @@ ATTR (alias ("target_no_nothrow"), nothrow) void alias_nothrow (void); /* { dg-warning ".alias_nothrow. specifies more restrictive attribute than its target .target_no_nothrow.: .nothrow." } */ +#pragma GCC diagnostic push "-Wattribute-alias" +#pragma GCC diagnostic ignored "-Wattribute-alias" +ATTR (alias ("target_no_nothrow"), nothrow) void +alias_nothrow_ignored (void); +#pragma GCC diagnostic pop "-Wattribute-alias" + + ATTR (pure) int alias_pure (void); |