This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: __FUNCTION__ and __PRETTY_FUNCTION__
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Sun, 9 Dec 2001 23:05:02 +0000 (GMT)
- Subject: Re: RFC: __FUNCTION__ and __PRETTY_FUNCTION__
On Sun, 9 Dec 2001, Neil Booth wrote:
> Are you saying that, within the same function, __func__ and
> __FUNCTION__ should be distinct? I'm not persuaded. I'm guessing
> that the reason the standard specified the uniqueness criterion was so
> that you could easily compare functions based on __func__ (quite why
> you might want to do this isn't so clear to me). If the pointers are
> the same, then you unambiguously have the same function.
The reason they are distinct is a basic presumption that named objects are
distinct; see the thread on "Merging objects" on comp.std.c, November
2000. Having all three distinct would thus be more consistent with the
workings of C.
--
Joseph S. Myers
jsm28@cam.ac.uk