This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]