On Fri, 2005-04-29 at 13:56 +0200, Ralf Ertzinger wrote:
Hi.
Is there a general document showing common pitfalls when compiling a package with gcc4.0 (and how to resolve them)?
For example, what is the "right" way to deal with this:
int* foo;
[...] ((short int*)foo)++; // gcc4 does not like this.
1) Fix the code in question (why is there a cast to short) ;-)
2) perhaps:
*foo = ((short int) (*foo)) + 1;
Correct would be: foo = (int *)((short int *)foo + 1);