NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: standards/51044: NetBSD cdefs.h defines __func__ incompatibly with C99



The following reply was made to PR standards/51044; it has been noted by GNATS.

From: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: standards/51044: NetBSD cdefs.h defines __func__ incompatibly
 with C99
Date: Tue, 5 Apr 2016 14:17:53 +0200

 On Tue, Apr 05, 2016 at 10:00:00AM +0000, bruce.lilly%gmail.com@localhost wrote:
 > >Fix:
 > Don't define __func__ as __PRETTY_FUNCTION__ (ever!)
 
 While this whole code drop can likely just be dropped nowadays, since we
 default to C99 in the base system, the PR is invalid as the behavior is
 entirely within the limits of an implementation. C89 doesn't contain
 __func__, so code making assumptions about it is wrong to depend on the
 implementation namespace. C++ before C++11 doesn't contain __func__, but
 gets __PRETTY_FUNCTION__, which is quite reasonable. C++11 itself
 doesn't specify what __func__ should give, so again __PRETTY_FUNCTION__
 is quite fine.
 
 Joerg
 


Home | Main Index | Thread Index | Old Index