[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: General gcc4.0 porting guide
- From: Ralf Ertzinger <fedora camperquake de>
- To: Discussion related to Fedora Extras <fedora-extras-list redhat com>
- Subject: Re: General gcc4.0 porting guide
- Date: Fri, 29 Apr 2005 14:10:29 +0200
Hi.
Nils Philippsen <nphilipp redhat com> wrote:
> > For example, what is the "right" way to deal with this:
> >
> > int* foo;
> >
> > [...]
> > ((short int*)foo)++; // gcc4 does not like this.
>
> 1) Fix the code in question (why is there a cast to short) ;-)
>
> 2) perhaps:
>
> *foo = ((short int) (*foo)) + 1;
Unless I am very much mistaken (my C-fu is weak), this is not the
same. The code I posted is pointer arithmetic.
--
"You didn't want software written by a calm, happy, non-paranoid
individual to be answering port 25 anyway." -- Anthony DeBoer
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]