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 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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" 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 Dr-DOS Wiki SWORD - a nice GUI library for DOS/DJGPP