From: Andreas Schwab <schwab@suse.de>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: "Joseph S. Myers" <jsm@polyomino.org.uk>,
Michael Elizabeth Chastain <mec.gnu@mindspring.com>,
Robert Dewar <dewar@gnat.com>,
gcc@gcc.gnu.org, Eyal Lebedinsky <eyal@eyal.emu.id.au>
Subject: Re: (printf) ("hello world\n");
Date: Wed, 10 Dec 2003 15:55:00 -0000 [thread overview]
Message-ID: <jeptewwyhn.fsf@sykes.suse.de> (raw)
In-Reply-To: <4F621C55-2B1A-11D8-8ABB-000A95A4DC02@kernel.crashing.org> (Segher Boessenkool's message of "Wed, 10 Dec 2003 15:08:20 +0100")
Segher Boessenkool <segher@kernel.crashing.org> writes:
> On 10-dec-03, at 14:36, Joseph S. Myers wrote:
>> On Wed, 10 Dec 2003, Segher Boessenkool wrote:
>>> On 10-dec-03, at 13:27, Robert Dewar wrote:
>>>> Is it really true that the name printf is reserved? Is a C program not
>>>> allowed to define its own printf function (which might or might not be
>>>> varargs)? What's the story here?
>>>
>>> It is reserved only in translation units that have stdio.h #include'd.
>>
>> It is reserved (in a hosted environment) as an identifier with external
>> linkage regardless of what headers are included (7.1.3#1).
>
> 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.
Which requires that you declare it in the first place, otherwise it will
have implicitly external linkage.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2003-12-10 14:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-09 20:41 Michael Elizabeth Chastain
2003-12-09 21:01 ` Dale Johannesen
2003-12-09 23:56 ` Geoff Keating
2003-12-10 9:53 ` Eyal Lebedinsky
2003-12-10 10:18 ` Andreas Schwab
2003-12-10 12:45 ` Robert Dewar
2003-12-10 13:12 ` Segher Boessenkool
2003-12-10 13:34 ` Robert Dewar
2003-12-10 13:36 ` Gabriel Dos Reis
2003-12-10 14:08 ` Joseph S. Myers
2003-12-10 14:17 ` Segher Boessenkool
2003-12-10 15:55 ` Andreas Schwab [this message]
2003-12-11 17:09 ` Geoff Keating
2003-12-11 17:39 ` Segher Boessenkool
2003-12-12 13:07 ` Jan-Benedict Glaw
2003-12-12 17:17 ` Gabriel Dos Reis
2003-12-10 14:19 ` Register Spilling Umar Janjua
2003-12-11 7:59 ` Jim Wilson
2003-12-11 9:01 ` Sanjiv Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jeptewwyhn.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=dewar@gnat.com \
--cc=eyal@eyal.emu.id.au \
--cc=gcc@gcc.gnu.org \
--cc=jsm@polyomino.org.uk \
--cc=mec.gnu@mindspring.com \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).