On Jun 18, 2008, at 8:27 PM, walt wrote:

This is quoted from  http://gcc.gnu.org/gcc-3.4/changes.html :

# The cast-as-lvalue extension has been removed for C++ and deprecated
for C and Objective-C. In particular, code like 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.

Unfortunately I don't know the proper fix, but I'm hoping I'll get an
answer to that question tomorrow in the gcc-help mailing list.

How about:

char *p;
...
int *q = (int *) p;
q++;
p = (char *) q;

That would have the same net effect and is accepted by gcc 4.2.3, which does not accept the original construct.
-- David



_______________________________________________
Pan-users mailing list
Pan-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/pan-users

Reply via email to