GCC built-in functions

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

 



There's a fair chunk of code in GCC that builds tables of information
about built-in functions.

I assume that these are there for good reason, and my guess was that
they would obviate the need for many common header files, which in fact
they seem to do. But if I have a tiny program like:

int main()
{
    float f;
    f = cos(1.0);
    printf("%f\n", f);
    return 0;
}

compilation produces warnings:

steve@Ubuntu:~/scratch$ gcc nohead.c
nohead.c: In function ‘main’:
nohead.c:4: warning: incompatible implicit declaration of built-in
function ‘cos’
nohead.c:5: warning: incompatible implicit declaration of built-in
function ‘printf’
steve@Ubuntu:~/scratch$ ./a.out
0.540302

The program runs. Why is gcc warning me about its own internals? Also,
incompatible with what?

Thanks
Steve




[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