Re: Undefined functions in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 06, 2005 at 10:33:03PM -0500, Ian Lance Taylor wrote:
> Given traditional C usage, requiring a function declaration can be
> reasonably viewed as a pedantic requirement, appropriate for
> -pedantic-errors.  In general, if you want gcc to enforce strict
> adherence to the relevant standard, you must use -pedantic-errors.

Thanks, that's good info to know.

> Of course there is a very reasonable coding style in which functions
> should always be declared for use.  For that coding style, there is
> -Werror-implicit-function-declaration.

But in reality, not many people bother setting that.  As a user of a
relatively uncommon 64 bit architecture (at least as a desktop running
a GUI), I've hit many bugs where implicit definitions of functions
that really return pointers chop off the top bits and usually end up
in annoying segfaults somewhere later on.  Maybe as the world moves
from 32 bit desktops it will be more than just me annoyed and the
default will change.

Thanks for your time,

-i

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux