Re: RFA: fix PR c/48116

2011-03-18 Thread Joseph S. Myers
On Wed, 16 Mar 2011, Tom Tromey wrote: > It seems ok to me to accept it as a GNU extension. > But, it still doesn't warn with -std=c89 or -std=c99. > -pedantic seems too heavy for this, to me. It is not the function of -std to enable diagnostics for extensions; that's the function of -pedantic.

Re: RFA: fix PR c/48116

2011-03-16 Thread Tom Tromey
Tom> This patch fixes PR c/48116. Tom> The bug is that -Wreturn-type does not follow the documentation. In Tom> particular, it should warn for this code, but does not: Tom> static void f() {} Tom> static void g() { return f(); } Tom> I think the bug is that c-typeck.c calls pedwarn with either

Re: RFA: fix PR c/48116

2011-03-16 Thread Jakub Jelinek
On Wed, Mar 16, 2011 at 11:18:04AM -0600, Tom Tromey wrote: > This patch fixes PR c/48116. > > The bug is that -Wreturn-type does not follow the documentation. In > particular, it should warn for this code, but does not: > > static void f() {} > static void g() { return f(); } > > I thi

RFA: fix PR c/48116

2011-03-16 Thread Tom Tromey
This patch fixes PR c/48116. The bug is that -Wreturn-type does not follow the documentation. In particular, it should warn for this code, but does not: static void f() {} static void g() { return f(); } I think the bug is that c-typeck.c calls pedwarn with either 0 or OPT_pedantic, but