bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sharutils-4.11.1] Compilation warnings


From: Bruce Korb
Subject: Re: [sharutils-4.11.1] Compilation warnings
Date: Wed, 05 Dec 2012 09:28:01 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2

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.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]