Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Feb 1999 16:51:19 -0700 (MST)
From:      Drew Eckhardt <drew@plutotech.com>
To:        Matthew.Alton@anheuser-busch.com
Cc:        hackers@FreeBSD.ORG
Subject:   Re: C headers
Message-ID:  <199902052351.QAA17773@pluto.plutotech.com>
In-Reply-To: <31B3F0BF1C40D11192A700805FD48BF90177670F@STLABCEXG011>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <31B3F0BF1C40D11192A700805FD48BF90177670F@STLABCEXG011> you write:
>Why does printf() non need #include <stdio.h> like the man page says?

Because K&R doesn't require function prototypes and you don't use any 
types or pre-processor macros defined in the header.  Things would be 
different if you used fprintf(3).

In any case, including <stdio.h> is a good idea because it allows 
prototypes which take advantage of gcc's printf-format string prototype
extension (why doesn't <stdio.h> do this?) to verify that the arguments
match what's been passed in.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902052351.QAA17773>