[ale] One for the language lawyers ...
JK
jknapka at kneuro.net
Thu Jan 8 12:38:28 EST 2009
A little googling turned up this on the difference between __FUNCTION__
and __func__ (note: NOT "__funct__"):
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1642.html
Google had nothing on "__funct__". Basically, __func__ is effectively
an identifier for a statically-allocated char[] (created via compiler
magic whenever __func__ is used), whereas __FUNCTION__ is just a macro.
It appears that neither are currently part of the C++ standard, though
I'm very likely to be wrong -- didn't follow the links very far.
-- JK
John Mills wrote:
> ALErs -
>
> What are the differences in use and availability for these two tokens in C
> and C++:
>
> __funct__
>
> __FUNCTION__
>
> as in:
> printf("Bad arg received at %s\n", __FUNCTION__);
>
> Both seem to be accepted and work similarly in my gcc-3.x and -4.x 'C'
> environments, but I would like to know their relative hazards in code for
> multiple processor types.
>
> TIA.
>
> - Mills
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
>
>
--
I do not particularly want to go where the money is -
it usually does not smell nice there. -- A. Stepanov
More information about the Ale
mailing list