printk_debug(__FUNCTION__ "\n");
You get the message:
/home/rminnich/src/freebios/src/arch/i386/lib/hardwaremain.c:139: warning: concatenation of string literals with __FUNCTION__ is deprecated
OK, I use this technique quite a bit. Anybody know why this handy little trick is 'deprecated'?
ron
Howdy Ron,
A quick Google search gives up this:
http://gcc.gnu.org/ml/gcc-help/2002-02/msg00210.html
which would imply (without actually RingTFM) the "proper" replacement would be __func__
HIH,
jack (not digging further) j-perdue@tamu.edu
At 02:45 PM 10/17/02 -0600, you wrote:
printk_debug(__FUNCTION__ "\n");
You get the message:
/home/rminnich/src/freebios/src/arch/i386/lib/hardwaremain.c:139: warning: concatenation of string literals with __FUNCTION__ is deprecated
OK, I use this technique quite a bit. Anybody know why this handy little trick is 'deprecated'?
ron
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
On Thu, 17 Oct 2002, Jack Perdue wrote:
which would imply (without actually RingTFM) the "proper" replacement would be __func__
no, unfortunately, what that means is that __FUNCTION__ is no longer a string literal. Bummer.
But fixable with enough work.
ron
Ronald G Minnich rminnich@lanl.gov writes:
printk_debug(__FUNCTION__ "\n");
You get the message:
/home/rminnich/src/freebios/src/arch/i386/lib/hardwaremain.c:139: warning: concatenation of string literals with __FUNCTION__ is deprecated
OK, I use this technique quite a bit. Anybody know why this handy little trick is 'deprecated'?
Because I believe all __FUNCTION__ is guaranteed to be by the standard is a string pointer. And I think it not being that way caused someone some pain in gcc.
Just make it: printk_debug("%s\n", __FUNCTION__);
Eric
On Thu, Oct 17, 2002 at 02:45:19PM -0600, Ronald G Minnich wrote:
printk_debug(__FUNCTION__ "\n");
You get the message:
/home/rminnich/src/freebios/src/arch/i386/lib/hardwaremain.c:139: warning: concatenation of string literals with __FUNCTION__ is deprecated
OK, I use this technique quite a bit. Anybody know why this handy little trick is 'deprecated'?
Simple fix :
printk_debug("%s\n", __FUNCTION__);
On Thu, 17 Oct 2002, Dave Jones wrote:
Simple fix :
printk_debug("%s\n", __FUNCTION__);
Yep I know about this. It's just that there are usages that won't work this way -- macros that count on being able to use standard C string concatenation. I'm not the only person using these, there are tons of them out there, and the various projects just got over the recent changes in cpp concatenation.
Oh well, enough whining. Another day, another change :-)
ron