This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Re: Problems building frysk
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: frysk at sourceware dot org
- Date: Wed, 20 Sep 2006 01:10:59 -0300
- Subject: Re: Problems building frysk
- Organization: Red Hat OS Tools Group
- References: <20060919193707.GA15980@camelia.ucw.cz>
On Sep 19, 2006, Stepan Kasal <skasal@redhat.com> wrote:
> it seems that your commit to
> frysk-imports/lib/unwind/cni/StackTraceCreator.cxx
> has broken the build with -Werror.
Odd, I don't even get a warning. Not even with -W -Wall... What
compiler are you using? I'm on FC6T3+ (tracking rawhide) x86_64.
> lib/unwind/cni/StackTraceCreator.cxx:146: warning: type-punning to incomplete type might break strict-aliasing rules
> Could you give me any hint how could that be fixed?
The canonical way to work around this error, when you know what you're
doing, is to add a cast to (void*) between the final cast and the
expression. In this case, it is safe, because the pointer is only
dereferenced after it is cast back to the original type. A comment
to this effect would probably be a good thing.
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Secretary for FSF Latin America http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}