This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Code now doesn't compile (GCC 3 vs GCC 4)
- From: Fernando Gomes <f dot m dot gomes at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 19 Mar 2009 10:44:39 +0000
- Subject: 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