This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]