Messages in this thread | | | Date | Mon, 10 Jun 2002 13:05:52 -0700 | From | Tom Rini <> | Subject | Re: [PATCH] 2.5.21 kill warnings 4/19 |
| |
On Mon, Jun 10, 2002 at 12:51:44PM -0700, Andrew Morton wrote: > 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.
Well, didn't someone just find a bug where egcs-1.1.2 falls down on x86 in an important area?
> wrt the __func__ thing: is it possible to do: > > #if (compiler version test) > #define __FUNCTION__ __func__ > #endif > > to kill the 3.x warning?
Well, the warning (at least from what I've seen) is when you do: "In " __FUNCTION__ " something bad happened\n", which __func__ just won't do. Doing: "In %s something bad happened\n", __FUNCTION__ Is OK[1].
-- Tom Rini (TR1265) http://gate.crashing.org/~trini/
[1]: gcc version 3.1.1 20020606 (Debian prerelease), just a simple program with -Wall. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |