This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
dead code elim && div-by-0 warnings
- To: gcc-bugs at gcc dot gnu dot org
- Subject: dead code elim && div-by-0 warnings
- From: Andrew Morton <andrewm at uow dot edu dot au>
- Date: Tue, 28 Mar 2000 01:26:11 +0000
Couple of things..
foo()
{
if (0)
bar("string");
}
will still put "string" into the output, although it is unreferenced.
Also,
int foo(int i)
{
return i / 0;
}
I'd suggest that a warning be generated for this. (Bearing in mind that
'0' could be the result of a complex macro expansion and not obvious).
Thanks.
--
-akpm-