aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-01-20 13:43:39 +0000
committerMike Frysinger <vapier@gentoo.org>2007-01-20 13:43:39 +0000
commitc810ebde215ff5698cbbdd35021c61c704b150e5 (patch)
tree85a7cfaec23e990170a9b032505f04b65ad8c856 /doc/qa.docbook
parentFix syntax. (diff)
downloadportage-c810ebde215ff5698cbbdd35021c61c704b150e5.tar.gz
portage-c810ebde215ff5698cbbdd35021c61c704b150e5.tar.bz2
portage-c810ebde215ff5698cbbdd35021c61c704b150e5.zip
forgot to document strict alias warnings
svn path=/main/trunk/; revision=5733
Diffstat (limited to 'doc/qa.docbook')
-rw-r--r--doc/qa.docbook14
1 files changed, 14 insertions, 0 deletions
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 @@
</programlisting>
</para>
<para>
+ 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:
+ <ulink url="http://mail-index.netbsd.org/tech-kern/2003/08/11/0001.html">NetBSD Explanation</ulink>,
+ <ulink url="http://thread.gmane.org/gmane.linux.gentoo.devel/39495">Gentoo Dev Thread</ulink>,
+ <ulink url="http://gcc.gnu.org/bugs.html#nonbugs_c">GCC Docs</ulink>
+ </para>
+ <para>
+ 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.
</para>
</sect1>