From c810ebde215ff5698cbbdd35021c61c704b150e5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 20 Jan 2007 13:43:39 +0000 Subject: [PATCH] forgot to document strict alias warnings svn path=/main/trunk/; revision=5733 --- doc/qa.docbook | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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. -- 2.26.2