This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [bugs] Re: GCC problem (Was: Re: [bugs] Problem compiling the kernel)
Bo Thorsen <bo@sonofthor.dk> writes:
|> On Monday 10 December 2001 16:57, Joseph S. Myers wrote:
|> > On Mon, 10 Dec 2001, Andreas Jaeger wrote:
|> > > > No-one spoke up in favour of this extension (treating compound literals
|> > > > as if they were the brace-enclosed lists they contain) when I asked
|> > > > <URL:http://gcc.gnu.org/ml/gcc/2001-11/msg01161.html>, so I killed it
|> > > > when
|> > >
|> > > Seems that nobody noticed this.:-( The Linux kernel relies on this
|> > > (that's where the example is from) and it seems to work with GCC
|> > > 2.95.x and GCC 3.0 also.
|> >
|> > Can Linux be fixed not to?
|>
|> I have spent a little time doing this. It's possible to remove the use of
|> this extension from the kernel (obviously), but it's pretty painful. The
|> macros using this are all over the place.
|>
|> The problem is that you can't just change a MACRO(x) (x) { } to MACRO(x) { }
|> since that gives a *lot* of compilation errors from various places where the
|> cast is necessary.
But we can introduce a separate macro just for initializing static
variables which would DTRT.
Andreas.
--
Andreas Schwab "And now for something
Andreas.Schwab@suse.de completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5