[torquedev] Torque 2.3.7 compilation errors with GCC 4.4.0

Simon Toth SimonT at mail.muni.cz
Sat Jul 18 07:10:04 MDT 2009


> Having seen Simon's message about his compilation
> error I thought I'd give 2.3.7 a shot with GCC 4.4.0
> on AMD64.  It wasn't happy..
> 
> cc1: warnings being treated as errors
> process_request.c: In function ‘get_creds’:
> process_request.c:277: error: dereferencing type-punned pointer will break strict-aliasing rules
> 
> This is what it doesn't like:
> 
>   *credentials = *(ucreds *)CMSG_DATA(cmptr);

CMSG_DATA returns on my system unsigned char*. Casting unsigned char* to
(ucreds*) and then dereferencing should be a violation of the strict
aliasing rule.

There is an option to turn strict-aliasing completely of using
-fno-strict-aliasing, but it might have speed impact.

I will be back with more...

-- 
Mgr. Simon Toth
CESNET z. s. p. o.
Zikova 4
160 00 Praha 6
Czech Republic


More information about the torquedev mailing list