Re: [PATCH] 2.5.21 kill warnings 4/19

Andrew Morton
2002-06-10T19:53:09Z

Tom Rini wrote:
>
> ...
> This reminds me of another slightly annoying issue. At least for
> toolchains, Documentation/Changes works poorly for !i386. How about we
> try and take care of things like this in <linux/compiler.h> ?
> Eg:
>
> #if defined(CONFIG_SPARC) || defined(CONFIG_SPARC64)
> ... egcs 1.1.2 check ...
>
> #define __func__ __FUNCTION__
> #endif
>
> #if defined(CONFIG_X86) || ...
> ... gcc-2.95.3 check ...
> #endif
>

That won't work very well - if SPARC wants 2.91.66 then
we need to support that compiler on x86 as well. So that
people won't use later-supported compiler features. And
because many compiler bugs are platform-independent, so
they will be detected (and worked around) on x86.

wrt the __func__ thing: is it possible to do:

#if (compiler version test)
#define __FUNCTION__ __func__
#endif

to kill the 3.x warning?

-