From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Jeff Law <law@redhat.com>, Martin Sebor <msebor@gmail.com>
Subject: Re: [PATCH] Fix -Wattribute-alias option
Date: Mon, 21 Jan 2019 15:55:00 -0000 [thread overview]
Message-ID: <AM0PR07MB38740E93E13E591F408C933EE49F0@AM0PR07MB3874.eurprd07.prod.outlook.com> (raw)
In-Reply-To: <CAK8P3a1kh86eo=2jXePahOf9ffoWdeBT0+7kYRnGTqFCMaKMbg@mail.gmail.com>
On 1/21/19 4:42 PM, Arnd Bergmann wrote:
> On Sat, Jan 19, 2019 at 11:06 AM Bernd Edlinger
> <bernd.edlinger@hotmail.de> wrote:
>>
>> Hi,
>>
>> the command line option -Wattribute-alias (w/o the "=1") is currently broken,
>> and only -Wno-attribute-alias is still working, but what is worse, is that
>> the #pragma GCC diagnostic fails to recognize the string "-Wattribute-alias",
>> as it used to do in gcc-8, which breaks the linux warning suppression macro
>> because it relies on a _Pragma to work.
>
> I'm surprised by this, since I have not seen the warning in a while. I am
> however still using gcc-8.1 locally. Did this change later during the
> gcc-8 branch?
>
Yes.
The -Wattribute-alias was split up in -Wattribute-alias=1 an -Wattribute-alias=2
and -Wmissing-attributes on gcc-trunk (but not in the gcc-8 branch as far as I know).
The -Wmissing-attribute also triggers in include/linux/module.h but for that one,
I will probably have to send a patch to the linux-kernel list.
$ svn log -r265980
------------------------------------------------------------------------
r265980 | msebor | 2018-11-09 18:32:52 +0100 (Fri, 09 Nov 2018) | 39 lines
PR middle-end/81824 - Warn for missing attributes with function aliases
gcc/c-family/ChangeLog:
PR middle-end/81824
* c-attribs.c (handle_copy_attribute): New function.
gcc/cp/ChangeLog:
PR middle-end/81824
* pt.c (warn_spec_missing_attributes): Move code to attribs.c.
Call decls_mismatched_attributes.
gcc/ChangeLog:
PR middle-end/81824
* attribs.c (has_attribute): New helper function.
(decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
* attribs.h (decls_mismatched_attributes): Declare.
* cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
(maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
* common.opt (-Wattribute-alias): Take an argument.
(-Wno-attribute-alias): New option.
* doc/extend.texi (Common Function Attributes): Document copy.
(Common Variable Attributes): Same.
* doc/invoke.texi (-Wmissing-attributes): Document enhancement.
(-Wattribute-alias): Document new option argument.
gcc/testsuite/ChangeLog:
PR middle-end/81824
* gcc.dg/Wattribute-alias.c: New test.
* gcc.dg/Wmissing-attributes.c: New test.
* gcc.dg/attr-copy.c: New test.
* gcc.dg/attr-copy-2.c: New test.
* gcc.dg/attr-copy-3.c: New test.
* gcc.dg/attr-copy-4.c: New test.
Bernd.
next prev parent reply other threads:[~2019-01-21 15:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-19 10:06 Bernd Edlinger
2019-01-21 15:42 ` Arnd Bergmann
2019-01-21 15:55 ` Bernd Edlinger [this message]
2019-01-21 15:58 ` Arnd Bergmann
2019-01-21 16:32 ` Martin Sebor
2019-01-27 16:54 ` [PING] " Bernd Edlinger
2019-01-28 7:50 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM0PR07MB38740E93E13E591F408C933EE49F0@AM0PR07MB3874.eurprd07.prod.outlook.com \
--to=bernd.edlinger@hotmail.de \
--cc=arnd@arndb.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
--cc=msebor@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).