tech-toolchain archive

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

Re: Proposal to stop redefining __func__ for C++11 and newer



On Sat, Dec 01, 2018 at 22:14:40 +0100, Kamil Rytarowski wrote:

> I wrote a patch to stop redefining __func__ for C++11, analogous to
> the existing logic for C99.
> 
> http://netbsd.org/~kamil/patch-00076-__func__-cpp11.txt

I have two comments.

I'd drop the __PRETTY_FUNCTION__ branch alltogether.

Also I'd fix the tests, b/c if you are compiling code with g++ in
pre-c++11 mode then you suddenly get __func__ redefined.  (If the
__PRETTY_FUNCTION__ variant is dropped it would be mostly harmless,
b/c __func__ will be defined to __FUNCTION__ which is the same thing
as real __func__ variable, but still).

-uwe


Home | Main Index | Thread Index | Old Index