www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/06/06/08:12:05

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Wed, 6 Jun 2007 08:11:30 -0400
Message-Id: <200706061211.l56CBUnG030001@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <46667036$0$20285$9b4e6d93@newsspool3.arcor-online.net> (message
from Robert Riebisch on Wed, 06 Jun 2007 10:28:43 +0200)
Subject: Re: error: invalid lvalue in increment
References: <46667036$0$20285$9b4e6d93 AT newsspool3 DOT arcor-online DOT net>
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT 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;

GCC should optimize all the moves away and give you the original
opcodes.

- Raw text -


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