Re: [PATCH] 2.5.21 kill warnings 4/19

Martin Dalecki
2002-06-11T06:10:25Z

Maksim (Max) Krasnyanskiy wrote:
> Hi Martin,
>
> How about replacing __FUNCTION__ with __func__ ?
> GCC 3.x warns that __FUNCTION__ is obsolete and will be removed.
> Here is how I did it in Bluetooth code:
> #define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" ,
> __func__ , ## arg)
> no more warnings from gcc.

GCC doesn't warn that __FUNCTION__ is obsolete.
The usage of __FUNCTION__ as string literal is what is offending it.
__func__ is a GNU "extension".