This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [strict-aliasing] warning message contains compiler-generated symbols
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Дмитрий Дьяченко" <dimhen at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 10 Dec 2008 17:55:04 +0100
- Subject: Re: [strict-aliasing] warning message contains compiler-generated symbols
- References: <c534783a0812100844t4b6072d2wdc0e26af4d5f6ccc@mail.gmail.com>
On Wed, Dec 10, 2008 at 5:44 PM, Дмитрий Дьяченко <dimhen@gmail.com> wrote:
> g++-current generates messages which
> 1) contains compiler generated symbols
> 2) refers to gcc internal header (stl_tree.h)
>
> [root@localhost gcc_err]# g++ -Wall -c -O3 test.cpp
> test.cpp: In member function 'void
> test::bar(std::_List_iterator<KeyPairPtr<int, int> >&)':
> test.cpp:14: warning: dereferencing pointer '__x.13' does break
> strict-aliasing rules
> /usr/local/gcc_current/lib/gcc/i686-pc-linux-gnu/4.4.0/include/c++/bits/stl_tree.h:530:
> note: initialized from here
> test.cpp:14: warning: dereferencing pointer '__x.13' does break
> strict-aliasing rules
> /usr/local/gcc_current/lib/gcc/i686-pc-linux-gnu/4.4.0/include/c++/bits/stl_tree.h:530:
> note: initialized from here
First of all, please file a bugreport about this. Second - wrt 1) -
what would you like
to see? Sth like 'dereferencing pointer expression does break ...'?
(we cannot reliably
re-construct the original source expression here). For 2), the system
header mechanism
should have fixed it unless, of course, the whole thing is inlined
(and maybe inform ()
isn't aware of system-headers either). But I think it is useful to
know where it comes
from rather than just seeing the warning.
Richard.