strict aliasing patches

Nikos Ntarmos ntarmos at ceid.upatras.gr
Fri Mar 19 03:15:55 PST 2004


Howdy there.

Umm... A -O2 buildworld fails under RELENG_5_2 cvsup'ed like 3 days
ago, with the following error:

/usr/src/lib/libpam/modules/pam_echo/pam_echo.c: In function
`_pam_echo':
/usr/src/lib/libpam/modules/pam_echo/pam_echo.c:92: warning:
dereferencing type-punned pointer will break strict-aliasing rules

\n\n

P.S.: FWIW making my way through the build log I noticed two funny
warning messages. The first on line 668 of
contrib/binutils/bfd/coff-alpha.c about a comparison
(intern->r_size<=256) being always true, which indeed holds since
r_size is of type char, and a warning on line 2328 of
contrib/binutils/bdf/elf.c about a comparison (this_hdr->sh_name ==
(unsigned long) -1) being always false, which holds since sh_name is
of type unsigned int (btw why is -1 cast to unsigned long?).

-- 
 Nikos "Noth" Ntarmos    | < ntarmos at ceid dot upatras dot gr >
 NetCINS Lab. @ C.E.I.D. | [ http://{noth,p2p}.ceid.upatras.gr/ ]
 U. of Patras - Greece   | ( 38.2594N, 21.7428E ) ( 1024D / CF95160A )


More information about the freebsd-alpha mailing list