On Wed, Nov 20, 2019 at 02:00:52AM +0000, Ramsay Jones wrote: > On 20/11/2019 00:02, Luc Van Oostenryck wrote: > > Function attributes need to be propagated differently > > than the usual specifiers: For example, in code like: > > #define __noreturn __attribute__((noreturn)) > > __noreturn void foo(int a); > > the __noreturn attribute should be applied to the function > > type while a specifier like 'const' would be applied to its > > return type. Also, when declaring the corresponding > > function pointer or functionpointer pointer: > > __noreturn void (*fptr)(int); > > __noreturn void (**fptr)(int); > > the attribute should also be applied to the function type, > > not one of the pointer types. > > > > This series fixes (hopefully) the previous attempt to solve > > this problem. The main patch is #4, pacthes #2 & #3 are > > kinda related preparatory patches and patch #5 is clearly > > related but independent (and a bit discutable, so will > > probably be omitted when pushed to kernel.org). > > > > Many thanks to Ramsay Jones for noticing the problem! > > Hi Luc, > > It is somewhat late here, but I thought I should take a quick > look at this before bed ... > > I have applied this series on top of 'master' and run it over > the git source and, as expected, the additional 8 warnings have > gone. Thanks! Thanks for confirming this and thank you for noticing the typos! > (Also, I haven't tried cygwin, but because this > fixes 'validation/function-redecl2.c', that long-standing warning > will be fixed too! :-D ). Ahhh, that's good to know. Thanks. -- Luc