This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc "bug"


Jeffrey Hammel <jhammel@EECS.Berkeley.EDU> writes:

> A possible "bug" in gcc (or "feature"?):  when linking to libraries
> without header files, gcc will give no error or warning BUT the library
> calls will not give the correct results.  A simple program:
> 
> gcc-bug.c:
> #include<stdio.h>
> main() { printf("\n%g\n", log(2.71)); }

You need -Wimplicit (or -Wall) to get a warning. This is by design,
since many old sources use implicit declarations. For new source, you
should always use -Wall.

-- 
	Falk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]