delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/05/18/13:01:44

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Thu, 18 May 2006 18:53:24 +0200
From: Florian Xaver <wosrediinanatour AT aon DOT at>
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: error: invalid lvalue in increment
References: <44670d4b$0$3880$91cee783 AT newsreader01 DOT highway DOT telekom DOT at> <e4b5he$1b14$1 AT defiant DOT vmunix DOT org>
In-Reply-To: <e4b5he$1b14$1@defiant.vmunix.org>
Lines: 62
Message-ID: <446ca678$0$12940$91cee783@newsreader02.highway.telekom.at>
NNTP-Posting-Host: 212.183.119.173
X-Trace: 1147971192 newsreader02.highway.telekom.at 12940 212.183.119.173:14972
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thank you very much!!!

Bye
  Flo

Rod Pemberton wrote:
> "Florian Xaver" <wosrediinanatour AT aon DOT at> wrote in message
> news:44670d4b$0$3880$91cee783 AT newsreader01 DOT highway DOT telekom DOT at...
>> What is wrong?
>>
>> ...
>> (l_text)d += 1;
>> *d = GetKey(App) & 0xFF;
>> ...
>>
> 
> The behavior was deprecated.  You can no longer cast lvalues in GCC.
> 
> You might unrolling the assignment, so the cast is an rvalue, like one of
> these:
> 
> d=(pointertypeofd *)((l_text)d+1);
> 
> d=(typeofd)((l_text)d+1);
> 
> where "pointertypeofd" or "typeofd" is the proper cast needed for the
> declared type of d...
> 
> 
> From "GCC 3.4 Release Series Changes, New Features, and Fixes",
> "The cast-as-lvalue extension has been removed for C++ and deprecated for C
> and Objective-C. In particular, code like this:
>         int i;
>         (char) i = 5;
> 
> or this:
> 
>         char *p;
>         ((int *) p)++;
> 
> is no longer accepted for C++ and will not be accepted for C and Objective-C
> in a future version."
> 
> 
> Rod Pemberton
> 
> 


-- 
Florian Xaver <http://www.flox.at.tf>

Dr-DOS  Wiki <http://www.drdos.org>
SWORD - a nice GUI library for DOS/DJGPP
<http://www.flox.at.tf>






- Raw text -


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