This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [New testcase] Wrong: "warning: `noreturn' function does return"
- To: egcs-patches at egcs dot cygnus dot com, rth at cygnus dot com, aj at suse dot de
- Subject: Re: [New testcase] Wrong: "warning: `noreturn' function does return"
- From: Jan Hubicka <jh at suse dot cz>
- Date: Fri, 5 May 2000 23:27:59 +0200
Hi
About the noreturn warnings. What always wondered me is why we don't
use CFG to detect this infomration? I have an code at home to autodetect
noreturn attribute in similar way as we do for const, and it seems to work
reliably. Is there some purpose for doing this in frontend?
One difference I've noticed is that we get warnings now even for "main"
with -Wnoreturn.
I will probably send the patch soon, I was basically waiting for "pure"
attribute autodetection to get reviewed to avoid multiple patches in the
queue.
Another plus is that -Wnoreturn the empty function
void test()
{
}
don't get bogus warning.
Honza