On Mon, Jun 10, 2002 at 12:30:44PM -0700, Andrew Morton wrote:
> Tom Rini wrote:
> >
> > On Mon, Jun 10, 2002 at 08:57:02PM +0200, Thomas 'Dent' Mirlacher wrote:
> > > On Mon, 10 Jun 2002, Maksim (Max) Krasnyanskiy wrote:
> > >
> > > > Hi Martin,
> > > >
> > > > How about replacing __FUNCTION__ with __func__ ?
> > > > GCC 3.x warns that __FUNCTION__ is obsolete and will be removed.
> > >
> > > is __func__ already supported for gcc 2.96?
> >
> > Well it works with 2.95.3, which is the important part...
>
> The 2.5 kernel must be buildable on gcc-2.91.66, aka egcs-1.1.2.
>
> The 2.95.x requirement was reverted because sparc (or sparc64?)
> needs egcs-1.1.2.
>
> __func__ does *not* work on egcs-1.1.2 and so cannot be used in Linux.
>
> `struct blah = { .open = driver_open };' *does* work in egcs-1.1.2
> and is OK to use.
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
Or not, I'm not really sure..
-- Tom Rini (TR1265) http://gate.crashing.org/~trini/ - 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/
This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:19 EST