ISO C++ forbids cast to non-reference type used as lvalue ?

Daniel Kegel dank@kegel.com
Tue Jul 12 06:51:00 GMT 2005


Steven Scholz wrote:
> Hi,
> 
> I upgraded my toolchain to gcc-3.4.4-glibc-2.3.5-linux-2.6.12 yesterday.
> 
> Now while compiling my c++ application I get
> 
>     ISO C++ forbids cast to non-reference type used as lvalue
> 
> for lines like
> 
>     (DWORD *) pbData += 1;
> 
> How could I workaround that, i.e. is there a flag to shut up the compiler?

No.  Fix your code.  Sorry.  Yes, it's painful.

I've gathered all the migration tips I've run
into at http://kegel.com/gcc/gcc3.4.html

Maybe I'll have a few more later...
- Dan

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list