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.
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
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
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