From: Mike Frysinger Date: Sat, 20 Jan 2007 13:43:39 +0000 (-0000) Subject: forgot to document strict alias warnings X-Git-Tag: v2.1.2-r3~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c810ebde215ff5698cbbdd35021c61c704b150e5;p=portage.git forgot to document strict alias warnings svn path=/main/trunk/; revision=5733 --- diff --git a/doc/qa.docbook b/doc/qa.docbook index d4c920867..22cefa8d2 100644 --- a/doc/qa.docbook +++ b/doc/qa.docbook @@ -214,6 +214,20 @@ + This warning crops up when code starts casting distinct pointer types and + then dereferencing them. Generally, this is a violation of aliasing rules + which are part of the C standard. Historically, these warnings did not show + up as the optimization was not turned on by default. With gcc-4.1.x and + newer though, the -O2 optimization level enables strict aliasing support. + For information, please review these links: + NetBSD Explanation, + Gentoo Dev Thread, + GCC Docs + + + To fix this issue, use the methods proposed in the links mentioned earlier. + If you're unable to do so, then a work around would be to append the gcc + -fno-strict-aliasing flag to CFLAGS in the ebuild.