Re: incompatible implicit declaration

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

 



On 12/26/2010 8:30 AM, Jonathan Wakely wrote:
On 26 December 2010 06:58, ali hagigat wrote:
Please look at the following program:

main(){
        printf("func1= %d\n", func1(10));
}

/root/tmp3>  gcc -c -o prog1.o prog1.c
prog1.c: In function ‘main’:
prog1.c:6: warning: incompatible implicit declaration of built-in
function ‘printf’
-------------------------------------------------------------------
Why the declaration of printf is incomplete?
http://c-faq.com/varargs/protos.html

#include-ing header files is always a good idea because the prototype statements ensure that you have called the function properly. That is, they are your friend.





[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