Code now doesn't compile (GCC 3 vs GCC 4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This code that compiles with GCC 3.x now doesn’t compile with GCC 4.x,
is it possible to change some compiler directive in order to make it
work again without have to change all the code? This is just a code
snippet, we have lots of code where void* variables are explicitly
casted to other type pointers like in this small example, and we have
the same error on all of them (in this case is when we try to
increment the value pointed by gpf, we also have errors on similar
situations like assignments and decrements).

Thanks!

Fernando

Code

            void * gfp;

            gpf = & ……..

            *((int *)gfp)++;

Error message:

error: lvalue required as increment operand


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux