This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: sos help for understanding
- From: dan hitt <dan dot hitt at gmail dot com>
- To: yacson <yactiem at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 6 Nov 2009 11:25:27 -0800
- Subject: Re: sos help for understanding
- References: <26230861.post@talk.nabble.com>
Well, the compiler needs to know how the function printf() is to be
used, and it can only find that information by looking at
/usr/include/stdio.h (or wherever the system puts it).
(A book on c would probably be helpful.)
dan
On Fri, Nov 6, 2009 at 11:10 AM, yacson <yactiem@gmail.com> wrote:
>
> Hi everybody.
> Sorry, I'm a ?new user and i want to understand why this c code work (in
> linux I'm worling on mandriva 2009 spring)?
> main()
> {printf("hello,world");}
>
> why does not the compiler complain about the missing stdio.h ? it just gives
> "warning:incompatible implicit declaration of built-in function printf" and
> actually prints the string "hello,world".
> --
> View this message in context: http://old.nabble.com/sos-help-for-understanding-tp26230861p26230861.html
> Sent from the gcc - Help mailing list archive at Nabble.com.
>
>