www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/06/06/16:31:30

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT nowhere DOT cmm>
Newsgroups: comp.os.msdos.djgpp
References: <46667036$0$20285$9b4e6d93 AT newsspool3 DOT arcor-online DOT net> <200706061211 DOT l56CBUnG030001 AT envy DOT delorie DOT com>
Subject: Re: error: invalid lvalue in increment
Date: Wed, 6 Jun 2007 16:18:46 -0400
Lines: 22
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: c-68-60-59-250.hsd1.mi.comcast.net
Message-ID: <46676c68$1@news.cuneo2lemon.net>
X-Trace: news.cuneo2lemon.net 1181183080 68.60.59.250 (7 Jun 2007 04:24:40 +0200)
Organization: Cuneo2Lemon Project
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"DJ Delorie" <dj AT delorie DOT com> wrote in message
news:200706061211 DOT l56CBUnG030001 AT envy DOT delorie DOT com...
>
> >   *(((unsigned short *)address)++) = value;
>
> GCC no longer allows casts on the left side.  You'll have to cast it
> to an unsigned short * variable, use that variable to store and
> increment, then cast that variable back to address.
>
>    a1 = (unsigned short *) address;
>    *a1++ = value;
>    address = (unsigned char) value;
>

Hey, is that last line correct?  It doesn't match your description...

address = (unsigned char *) a1;


Rod Pemberton

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019