From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19141 invoked by alias); 10 Dec 2003 14:08:28 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 19134 invoked from network); 10 Dec 2003 14:08:24 -0000 Received: from unknown (HELO mtagate6.de.ibm.com) (195.212.29.155) by sources.redhat.com with SMTP; 10 Dec 2003 14:08:24 -0000 Received: from d12relay02.megacenter.de.ibm.com (d12relay02.megacenter.de.ibm.com [9.149.165.196] (may be forged)) by mtagate6.de.ibm.com (8.12.10/8.12.10) with ESMTP id hBAE8MtM083986; Wed, 10 Dec 2003 14:08:22 GMT Received: from d12ml045.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12relay02.megacenter.de.ibm.com (8.12.9/NCO/VER6.6) with ESMTP id hBAE8L6j271972; Wed, 10 Dec 2003 15:08:22 +0100 Received: from [9.152.222.71] ([9.152.222.71]) by d12ml045.de.ibm.com (Lotus Domino Release 5.0.9a) with ESMTP id 2003121015121420:38 ; Wed, 10 Dec 2003 15:12:14 +0100 In-Reply-To: References: <20031209204037.906D84B412@berman.michael-chastain.com> <3FD6DD9B.E35C742@eyal.emu.id.au> <3FD71140.2070506@gnat.com> Mime-Version: 1.0 (Apple Message framework v606) Message-Id: <4F621C55-2B1A-11D8-8ABB-000A95A4DC02@kernel.crashing.org> Cc: Michael Elizabeth Chastain , Robert Dewar , gcc@gcc.gnu.org, Eyal Lebedinsky , Andreas Schwab From: Segher Boessenkool Subject: Re: (printf) ("hello world\n"); Date: Wed, 10 Dec 2003 14:17:00 -0000 To: "Joseph S. Myers" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed X-SW-Source: 2003-12/txt/msg00628.txt.bz2 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. Segher