Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-06-03 Thread Joseph Myers
On Thu, 30 May 2019, Alex Henrie wrote: > In Wine we need a way to (without warnings) put ms_hook_prologue into > a macro that is applied to functions, function pointers, and function > pointer typedefs. It sounds like you're saying that you will not > accept a patch that silences or splits off wa

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-06-03 Thread Richard Biener
On Fri, 31 May 2019, Alex Henrie wrote: > On Fri, May 31, 2019 at 1:38 AM Richard Biener wrote: > > > > On Thu, 30 May 2019, Alex Henrie wrote: > > > > > In Wine we need a way to (without warnings) put ms_hook_prologue into > > > a macro that is applied to functions, function pointers, and functi

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-31 Thread Alex Henrie
On Fri, May 31, 2019 at 1:38 AM Richard Biener wrote: > > On Thu, 30 May 2019, Alex Henrie wrote: > > > In Wine we need a way to (without warnings) put ms_hook_prologue into > > a macro that is applied to functions, function pointers, and function > > pointer typedefs. It sounds like you're saying

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-31 Thread Richard Biener
On Thu, 30 May 2019, Alex Henrie wrote: > On Thu, May 30, 2019 at 6:59 PM Joseph Myers wrote: > > > > On Thu, 30 May 2019, Alex Henrie wrote: > > > > > At this point I think I'm convinced that any attribute that applies to > > > a function should also be allowed on a function pointer without any

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-30 Thread Alex Henrie
On Thu, May 30, 2019 at 6:59 PM Joseph Myers wrote: > > On Thu, 30 May 2019, Alex Henrie wrote: > > > At this point I think I'm convinced that any attribute that applies to > > a function should also be allowed on a function pointer without any > > warnings. We can start by turning off the warning

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-30 Thread Joseph Myers
On Thu, 30 May 2019, Alex Henrie wrote: > At this point I think I'm convinced that any attribute that applies to > a function should also be allowed on a function pointer without any > warnings. We can start by turning off the warnings for the "fndecl" > attributes and then clean up the other attr

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-30 Thread Alex Henrie
On Tue, May 28, 2019 at 1:05 PM Martin Sebor wrote: > > On 5/24/19 9:49 AM, Alex Henrie wrote: > > Then is it preferable to simply silence Wattributes in this case? > > This case being PR86407? I'd say yes. > Attribute malloc attaches only to fndecl and not its type but > doesn't affect the code

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-28 Thread Richard Biener
On Tue, 28 May 2019, Martin Sebor wrote: > On 5/24/19 9:49 AM, Alex Henrie wrote: > > On Fri, May 24, 2019 at 2:01 AM Richard Biener wrote: > > > > > > I'm not sure we really need a new warning for this. > > > > On Fri, May 24, 2019 at 9:23 AM Martin Sebor wrote: > > > > > > I don't think GCC

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-28 Thread Martin Sebor
On 5/24/19 9:49 AM, Alex Henrie wrote: On Fri, May 24, 2019 at 2:01 AM Richard Biener wrote: I'm not sure we really need a new warning for this. On Fri, May 24, 2019 at 9:23 AM Martin Sebor wrote: I don't think GCC makes a formal distinction between function attributes that affect only fu

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-27 Thread Richard Biener
On Sat, 25 May 2019, Alex Henrie wrote: > On Sat, May 25, 2019 at 12:34 AM Richard Biener wrote: > > > > On May 24, 2019 5:49:38 PM GMT+02:00, Alex Henrie > > wrote: > > >As far as I can tell, "fndecl" is a misnomer: these attributes are > > >more accurately called "function definition attribut

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-25 Thread Alex Henrie
On Sat, May 25, 2019 at 12:34 AM Richard Biener wrote: > > On May 24, 2019 5:49:38 PM GMT+02:00, Alex Henrie > wrote: > >As far as I can tell, "fndecl" is a misnomer: these attributes are > >more accurately called "function definition attributes", i.e. > >attributes that affect the assembly code

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-24 Thread Richard Biener
On May 24, 2019 5:49:38 PM GMT+02:00, Alex Henrie wrote: >On Fri, May 24, 2019 at 2:01 AM Richard Biener >wrote: >> >> I'm not sure we really need a new warning for this. > >On Fri, May 24, 2019 at 9:23 AM Martin Sebor wrote: >> >> I don't think GCC makes a formal distinction between function >

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-24 Thread Alex Henrie
On Fri, May 24, 2019 at 2:01 AM Richard Biener wrote: > > I'm not sure we really need a new warning for this. On Fri, May 24, 2019 at 9:23 AM Martin Sebor wrote: > > I don't think GCC makes a formal distinction between function > attributes that affect only function definitions vs those that > a

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-24 Thread Martin Sebor
On 5/23/19 9:57 PM, Alex Henrie wrote: --- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86407#c6 --- gcc/c-family/c.opt | 4 gcc/c/c-decl.c | 4 +++- gcc/config/i386/i386-options.c | 12 ++-- gcc/testsuite/c-c++-common/pr8640

Re: [PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-24 Thread Richard Biener
On Thu, 23 May 2019, Alex Henrie wrote: > --- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86407#c6 > --- > gcc/c-family/c.opt | 4 > gcc/c/c-decl.c | 4 +++- > gcc/config/i386/i386-options.c | 12 ++-- > gcc/testsuite/c-c++-com

[PATCH] PR c/86407 - Add option to ignore fndecl attributes on function pointers

2019-05-23 Thread Alex Henrie
--- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86407#c6 --- gcc/c-family/c.opt | 4 gcc/c/c-decl.c | 4 +++- gcc/config/i386/i386-options.c | 12 ++-- gcc/testsuite/c-c++-common/pr86407-1.c | 23 +++ gcc/tests