[cfe-dev] Implicit declarations of builtins
Joerg Sonnenberger
joerg at britannica.bec.de
Sun Jan 22 14:37:16 PST 2012
Hi all,
I've just stumbled over a nasty surprise with the implicit prototypes
for library builtins. Consider the following input:
int main() { char *p = powl; return 0; }
This is from a configure test and expected to fail on NetBSD. Compiling
it with -O2 gives the expected
warning: implicitly declaring C library function 'powl' with type
'long double (long double, long double)'
warning, but the undefined reference gets optimised away. Dow. Even more
nasty: -Werror=implicit-function-declaration makes it still continue.
Is this really desirable behavior?
Joerg
More information about the cfe-dev
mailing list