From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17893 invoked by alias); 10 Dec 2001 07:58:10 -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 17854 invoked from network); 10 Dec 2001 07:58:09 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 10 Dec 2001 07:58:09 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id C41FD1E0B3; Mon, 10 Dec 2001 08:58:08 +0100 (MET) Received: from gromit.moeb ([192.168.27.3] ident=postfix) by arthur.inka.de with esmtp (Exim 3.30 #1) id 16DKtk-0002Al-00; Mon, 10 Dec 2001 08:30:48 +0100 Received: by gromit.moeb (Postfix, from userid 207) id 2B46C1EA2F; Mon, 10 Dec 2001 08:30:45 +0100 (CET) Mail-Copies-To: never To: Neil Booth Cc: "Joseph S. Myers" , gcc@gcc.gnu.org Subject: Re: RFC: __FUNCTION__ and __PRETTY_FUNCTION__ References: <20011209170825.A30901@daikokuya.demon.co.uk> <20011209225347.A735@daikokuya.demon.co.uk> From: Andreas Jaeger Date: Mon, 10 Dec 2001 00:21:00 -0000 In-Reply-To: <20011209225347.A735@daikokuya.demon.co.uk> (Neil Booth's message of "Sun, 9 Dec 2001 22:53:47 +0000") Message-ID: User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2001-12/txt/msg00472.txt.bz2 Neil Booth writes: > Joseph S. Myers wrote:- > >> I think we should make them follow the C99 definition of __func__. > > OK, I'm all for that. I've had one other vote in favour of consistency > with g++. If we do that - like your patches on gcc-patches do - we break compatibilty with existing code without a really good reason. __FUNCTION__ is a well documented extension and you break it, forcing users to change their code. It might have been a better design decision to implement __FUNCTION__ like __func__ but the designers of __FUNCTION__ did it as documented - and this simplifies application code, glibc e.g. does: extern void __libc_fatal (__const char *__message) # define LOG(c) if (__td_debug) __libc_write (2, c "\n", strlen (c "\n")) ... __libc_fatal ("illegal status in " __FUNCTION__); LOG (__FUNCTION__); Both usages do break and there're others that might do. I'd prefer to deprecate (iff this is really the meaning of the majority) this in GCC 3.1 and change it for GCC 3.2. If I'm overruled and everybody likes this change, then please send a patch that (I hope this is usual practice, if not, I'd propose it): - prominently says that this was changed, e.g. in a NEWS section - mentions in the description of __FUNCTION__ this change. People converting from older GCCs should see that something has changed! Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj