Comment 3 for bug 436540

Revision history for this message
StefanPotyra (sistpoty) wrote :

Hi,

nope, sorry, that's not good:

"/build/buildd/openswan-2.6.22+dfsg/programs/tncfg/tncfg.c:362: error: dereferencing pointer 'shc' does break strict-aliasing rules"

this should get fixed either with -fno-strict-aliasing or even better by an explicit cast to void * (and then to struct ipsecwhatever) in line 179.

Short explanation: In C, it's only legal to cast a pointer of one type to another, if it is a char * or a void *. gcc makes use of this knowledge in its alias anylsis (can one pointer refer to the same thing as another pointer), and hence has the possibility to assume that these two pointers are never the same. This can hence result in wrong optimizations.

Can you respin the debdiff please? (if there are other errors, it might of course be a good idea to disable Werror nonetheless).

Thanks,
     Stefan.