Re: [sharutils-4.11.1] Compilation warnings
Bruce Korb <[email protected]>
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
On 12/04/12 04:59, Petr Písař wrote: > When building shartuils-4.11.1 optimized to -O2 with GCC-4.7.2, I get these > warnings: > > ../lib/md5.c:117:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > ../lib/md5.c:118:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] > shar.c:2485:15: warning: variable ‘md’ set but not used [-Wunused-but-set-variable] > > Following patches fixes it. Compile all programs with -fno-strict-aliasing, except the few that have been carefully audited for compliance with ailiasing rules. Especially since GCC says that all misuses cannot be warned about and a misuse entitles it to generate a broken program. It isn't worth it, unless you write performance critical code. Meanwhile, in the intervening 18 months, there have been a few changes that obliterated the unused variable. I've now fixed the aliasing issue, but I've not audited sharutils for full aliasing compliance. Please give the pending release a spin: http://autogen.sourceforge.net/data/sharutils-4.12.2.tar.bz2 (4.12.1 was an i18n-only private release. This will become public, unless serious issues are uncovered.)