public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andreas Jaeger <aj@suse.de>
To: Neil Booth <neil@daikokuya.demon.co.uk>
Cc: "Joseph S. Myers" <jsm28@cam.ac.uk>, gcc@gcc.gnu.org
Subject: Re: RFC:  __FUNCTION__ and __PRETTY_FUNCTION__
Date: Mon, 10 Dec 2001 00:21:00 -0000	[thread overview]
Message-ID: <u8heqzedlm.fsf@gromit.moeb> (raw)
In-Reply-To: <20011209225347.A735@daikokuya.demon.co.uk> (Neil Booth's message of "Sun, 9 Dec 2001 22:53:47 +0000")

Neil Booth <neil@daikokuya.demon.co.uk> 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

  parent reply	other threads:[~2001-12-10  7:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-09 10:16 Neil Booth
2001-12-09 11:48 ` Joseph S. Myers
2001-12-09 15:02   ` Neil Booth
2001-12-09 15:13     ` Joseph S. Myers
2001-12-10  0:21     ` Andreas Jaeger [this message]
2001-12-10  0:56       ` Joseph S. Myers
2001-12-10 10:34         ` Neil Booth
2001-12-10  1:46       ` Nathan Sidwell
2001-12-10 10:49         ` Neil Booth
2001-12-10 11:14       ` Mark Mitchell
2001-12-10 12:12         ` Neil Booth
2001-12-10 12:16           ` Mark Mitchell
2001-12-10 13:03         ` DJ Delorie
2001-12-10 13:16           ` Neil Booth
2001-12-10 14:12           ` Mark Mitchell
2001-12-10 19:12         ` Richard Henderson
2001-12-10 21:01           ` Mark Mitchell
2001-12-11 12:29         ` Joe Buck

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=u8heqzedlm.fsf@gromit.moeb \
    --to=aj@suse.de \
    --cc=gcc@gcc.gnu.org \
    --cc=jsm28@cam.ac.uk \
    --cc=neil@daikokuya.demon.co.uk \
    /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).