[Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Mon Jan 12 15:16:00 GMT 2009



------- Comment #8 from rguenther at suse dot de  2009-01-12 15:16 -------
Subject: Re:  [4.4 regression] warnings from -isystem
 headers strikes back.

On Mon, 12 Jan 2009, pluto at agmk dot net wrote:

> 
> 
> ------- Comment #7 from pluto at agmk dot net  2009-01-12 15:10 -------
> (In reply to comment #5)
> > I can't seem to compile the preprocessed source:
> 
> i've attached a new full archive.
> 
> $ make
> rm -f *.ii *.o *.s
> /local/devel/toolchain44/x86_64-gnu-linux/bin/x86_64-gnu-linux-g++ -c -Wall -O2
> -g0 -fPIC --save-temps -isystem ./sys-headers bug.cpp
> bug.cpp: In function 'void foo()':
> bug.cpp:6: warning: dereferencing pointer '<anonymous>' does break
> strict-aliasing rules
> ./sys-headers/boost/optional/optional.hpp:315: note: initialized from here
> bug.cpp:6: warning: dereferencing pointer '<anonymous>' does break
> strict-aliasing rules
> ./sys-headers/boost/optional/optional.hpp:594: note: initialized from here
> 
> > Note that the warning is from bug.cpp:6, not a system header anyway
> 
> looks weird, because i can't see any dereferencing in bug.cpp:6
> there's only trivial cctor which copies an enum.
> 
> for me it looks like the <warning> comes from boost::optional::
> ::aligned_storage::adress() manipulations inside boost system headers.
> 
> > (the _note_ is from a system header, do you want that to disappear?)
> 
> i want to disappear'em all :-)

Fair enough ;)  The compiler just warns that in a second it will remove
that dereference (ok, only on the alias-improvements branch).

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503



More information about the Gcc-bugs mailing list