fedora camperquake de (Ralf Ertzinger) writes: > Is there a general document showing common pitfalls when compiling a > package with gcc4.0 (and how to resolve them)? /usr/share/doc/gcc-*4* contains some documents dealing with this. > For example, what is the "right" way to deal with this: Finding the developer of this code and hitting him with a copy of the C standard. > int* foo; > > [...] > ((short int*)foo)++; // gcc4 does not like this. | foo = (int *)((short int *)(foo) + 1); should work. But depending on this what the author wants to achieve, more elegant solutions are probably possible. Especially, because the code with pointer arithmetic might be less efficient than such with perfect aligned variables. Enrico
Attachment:
pgp00191.pgp
Description: PGP signature