This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Thu, 2003-12-11 09:01:51 -0800, Geoff Keating <geoffk@geoffk.org>
wrote in message <jmllpjxp8g.fsf@desire.geoffk.org>:
> Segher Boessenkool <segher@kernel.crashing.org> writes:
> > That does not prevent you from declaring and defining your own
> > printf() function (with a different prototype) though; it only requires
> > that you make that function have external linkage.
>
> You mean 'internal linkage'. You can define your own function named
> printf only if you (a) do not include stdio.h and (b) declare it
> 'static'.
Um, I think:
- You may include <stdio.h> as long as your new printf() has
compatible arguments. It's a Bad Thing, though, because
declaration in <stdio.h> doesn't really belong to your new
function.
- You may also have your own function non-static. Then, it
depends on link-order which function (yours or libc's) is
used. Of course, that's horrible, too:)
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak!
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Attachment:
signature.asc
Description: Digital signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |