X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Wed, 06 Jun 2007 15:08:53 +0200 From: Robert Riebisch User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: error: invalid lvalue in increment References: <46667036$0$20285$9b4e6d93 AT newsspool3 DOT arcor-online DOT net> <200706061211 DOT l56CBUnG030001 AT envy DOT delorie DOT com> In-Reply-To: <200706061211.l56CBUnG030001@envy.delorie.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 22 Message-ID: <4666b1e5$0$10185$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 06 Jun 2007 15:08:53 CEST NNTP-Posting-Host: 0deeb154.newsspool4.arcor-online.net X-Trace: DXC=4BNCe:=eneH78PK[oJ2ng AT 4IUK GCC no longer allows casts on the left side. You'll have to cast it Why? ;-) > 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; > > GCC should optimize all the moves away and give you the original > opcodes. OK, thanks! :-) -- Robert Riebisch Bitte NUR in der Newsgroup antworten! Please reply to the Newsgroup ONLY!