diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-01-20 13:43:39 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-01-20 13:43:39 +0000 |
commit | c810ebde215ff5698cbbdd35021c61c704b150e5 (patch) | |
tree | 85a7cfaec23e990170a9b032505f04b65ad8c856 | |
parent | 657d98f04bbfc662c15ede3cb7f5dae5a7e12280 (diff) | |
download | portage-c810ebde215ff5698cbbdd35021c61c704b150e5.tar.gz portage-c810ebde215ff5698cbbdd35021c61c704b150e5.tar.bz2 portage-c810ebde215ff5698cbbdd35021c61c704b150e5.zip |
forgot to document strict alias warnings
svn path=/main/trunk/; revision=5733
-rw-r--r-- | doc/qa.docbook | 14 |
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> |