[Devel] compiler warnings with gcc 4.1.2

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Oct 18 21:43:40 CEST 2006


to be honest that is also my opinion - to have a code 100% compliant to 
strict aliasing (according to gcc 4.1) will imply major changes in the 
data structures and not sure if all of them can be avoided.

as first solution, as Dan suggested, we can remove the strict aliasing 
flag if gcc 4.1 is detected and maybe in time can find a code solution 
(or not).

regards,
bogdan

Dan Pascu wrote:

>On Wednesday 18 October 2006 20:29, Juha Heinanen wrote:
>  
>
>>i upgraded debian on one of my boxes to testing (etch) that came with
>>gcc 4.1.2.  as result, i started to get a bunch of warnings listed
>>below when building CVS head openser.
>>
>>could maintainers of those core/module files please fix them.
>>    
>>
>
>Unfortunately, most of the time fixing the strict-aliasing warnings will 
>result in some nasty contorted code.
>Maybe a simpler fix would be to add -fno-strict-aliasing to CFLAGS if the 
>compiler is gcc.
>
>  
>
>>-- juha
>>
>>
>>Compiling usr_avp.c
>>usr_avp.c: In function 'add_avp':
>>usr_avp.c:136: warning: dereferencing type-punned pointer will break
>>strict-aliasing rules 
>>    
>>
>[snip]
>
>  
>




More information about the Devel mailing list