Re: Some cleanup patches for: '...lvalues is deprecated'

From: Jon Oberheide
Date: Tue Jul 27 2004 - 11:35:40 EST


On Tue, 2004-07-27 at 17:59 +0200, Joel Soete wrote:
> Marcelo,
>
> Thanks first for your attention.
> Sorry also for delaying this works but I was a bit busy elsewhere.
>
> > -- Original Message --
> > Date: Tue, 27 Jul 2004 09:54:32 -0300
> > From: Marcelo Tosatti <marcelo.tosatti@xxxxxxxxxxxx>
> > To: Joel Soete <soete.joel@xxxxxxxxxx>
> > Cc: Daniel Jacobowitz <dan@xxxxxxxxxx>,
> > Vojtech Pavlik <vojtech@xxxxxxx>,
> > Linux Kernel <linux-kernel@xxxxxxxxxxxxxxx>
> > Subject: Re: Some cleanup patches for: '...lvalues is deprecated'
> >
> >
> > On Mon, Jul 05, 2004 at 01:59:21PM +0200, Joel Soete wrote:
> > > Hello Daniel,
> > >
> > > > > So just use
> > > > >
> > > > > buffer++;
> > > > >
> > > > > here, and the intent is then clear.
>
> > > >
> > > > Except C does not actually allow incrementing a void pointer, since
> > > > void does not have a size.
> > > That make better sense to me because aifair a void * was foreseen to
> pass
> > > any kind of type * as actual parameter?
> > > (So as far as I understand, the aritthm pointer sould be dynamic for
> the
> > > best 'natural' behaviour?)
> > >
> > > > You can't do arithmetic on one either. GNU
> > > > C allows this as an extension.
> > > >
> > > > It's actually this, IIRC:
> > > > buffer = ((char *) buffer) + 1;
> >
> > Joel,
> >
> > It seems the current code is working perfectly, generating correct
> > asm code.
> >
> > Could you come up with a good enough reason to do this cleanup (as far
> as
> >
> > I am concerned) in 2.4.x series?
> >
> My first attention was to cleanup some warning of type "use of cast expression
> as lvalue is deprecated"
> with gcc-3.3.4. But afaik, right now, there are just few warning which didn't
> break the asm code.

FYI, lvalue casts are treated as errors in gcc 3.5.

Regards,
Jon Oberheide

--
Jon Oberheide <jon@xxxxxxxxxxxxx>
GnuPG Key: 1024D/F47C17FE
Fingerprint: B716 DA66 8173 6EDD 28F6 F184 5842 1C89 F47C 17FE

Attachment: signature.asc
Description: This is a digitally signed message part