General gcc4.0 porting guide

Enrico Scholz enrico.scholz at informatik.tu-chemnitz.de
Fri Apr 29 13:11:12 UTC 2005


fedora at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 480 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20050429/ce316c25/attachment.sig>


More information about the fedora-extras-list mailing list