On Mon, Aug 14, 2006 at 08:38:38PM -0400, Pavel Roskin wrote:
> On Mon, 2006-08-14 at 22:44 +0200, Andreas Schwab wrote:
> > Try -Werror-implicit-function-declaration.  Not the same, but pretty
> > close.
> 
> Thanks!  I know.  In fact, I'm using at least "-Wall -Werror" for my
> code and for the code I'm working with, so it's implied.  I'm talking
> about code that I have never seen until the binary did a poo-poo on my
> machine.
> 
> Sure, I can petition Fedora, Novell, Debian and others to use
> -Werror-implicit-function-declaration, but I don't think I'll have
> convincing arguments.

You seem to think that if GCC gets stricter about rejecting bad code,
things will get magically better and software distributions will produce
better code.  It tends not to work that way, and the attempt will just
cause the sloppier distros to delay upgrading to new gcc versions.

The basic problem is the unfortunate "implicit int" rule from K&R C that
we still haven't killed.  And your proposed solution, in my view, is a
hack.  You want to detect the one case where a result of an implicit int
function is converted into a pointer, and treat this as a hard error while
still giving only a warning for the conversion of some other int into a
pointer (even though these other conversions may also be 64-bit bugs).





Reply via email to