From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22864 invoked by alias); 12 Dec 2003 16:56:07 -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 22856 invoked from network); 12 Dec 2003 16:56:06 -0000 Received: from unknown (HELO uniton.integrable-solutions.net) (62.212.99.186) by sources.redhat.com with SMTP; 12 Dec 2003 16:56:06 -0000 Received: from uniton.integrable-solutions.net (localhost [127.0.0.1]) by uniton.integrable-solutions.net (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id hBCGqL9b014042; Fri, 12 Dec 2003 17:52:21 +0100 Received: (from gdr@localhost) by uniton.integrable-solutions.net (8.12.3/8.12.3/Submit) id hBCGqL3c014041; Fri, 12 Dec 2003 17:52:21 +0100 X-Authentication-Warning: uniton.integrable-solutions.net: gdr set sender to gdr@integrable-solutions.net using -f To: Jan-Benedict Glaw Cc: gcc@gcc.gnu.org Subject: Re: (printf) ("hello world\n"); References: <20031209204037.906D84B412@berman.michael-chastain.com> <3FD6DD9B.E35C742@eyal.emu.id.au> <3FD71140.2070506@gnat.com> <4F621C55-2B1A-11D8-8ABB-000A95A4DC02@kernel.crashing.org> <20031212124807.GV29648@lug-owl.de> From: Gabriel Dos Reis In-Reply-To: <20031212124807.GV29648@lug-owl.de> Organization: Integrable Solutions Date: Fri, 12 Dec 2003 17:17:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00725.txt.bz2 Jan-Benedict Glaw writes: | On Thu, 2003-12-11 09:01:51 -0800, Geoff Keating | wrote in message : | > Segher Boessenkool 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 as long as your new printf() has | compatible arguments. It's a Bad Thing, though, because | declaration in 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:) If the printf function does not have an internal linkage, then it is an undefined behaviour. That rules out both points. -- Gaby