This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR c/20000 delete warning for noreturn function returning non-void


The C FE gives a warning for

typedef int ft(void);
volatile ft f;

warns "'noreturn' function returns non-void value",

However, noreturn functions can have a non-void return type if they
need to match some function typedef. This happens in GCC itself but
the warning only works with volatile and not with the attribute
syntax. Moreover, we already warn if such function ever returns a
value (see testcase). So this patch deletes this old warning.

Bootstrapped and regression tested x86_64-linux-gnu.

OK?

2010-06-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR c/20000
        * c-decl.c (grokdeclarator): Delete warning.
testsuite/	
        * c-c++-common/pr20000.c: New.

Attachment: fix-pr20000-2.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]