From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12180 invoked by alias); 27 Feb 2009 10:33:51 -0000 Received: (qmail 12157 invoked by alias); 27 Feb 2009 10:33:40 -0000 Date: Fri, 27 Feb 2009 10:33:00 -0000 Message-ID: <20090227103340.12156.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenther at suse dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg02317.txt.bz2 ------- Comment #22 from rguenther at suse dot de 2009-02-27 10:33 ------- Subject: Re: [4.4 regression] warnings from -isystem headers strikes back. On Fri, 27 Feb 2009, pluto at agmk dot net wrote: > ------- Comment #21 from pluto at agmk dot net 2009-02-27 10:29 ------- > (In reply to comment #20) > > Same issue. Only possible fix is to not apply TBAA pruning to escaped > > symbols, which will - well - basically disable TBAA. Testcase: > > waht about this testcase? > the bug is marked as fixed but warnings are still present? The original reported problem is gone. The testcase below is unfixable. > > inline void *operator new (__SIZE_TYPE__, void *__p) throw() { return __p; } > > > > struct Y { > > Y() {} > > int i; > > }; > > > > struct X { > > X() {} > > void construct(const Y& y) > > { > > new (&m_data[0]) Y(y); > > } > > template > > Y& get() { return reinterpret_cast(m_data); } > > bool initialized; > > char m_data[sizeof (Y)]; > > }; > > > > X x; > > > > void bar(const X&); > > void foo(Y& y) > > { > > x.get() = y; > > x.initialized = true; > > bar(x); > > } > > > > t.cpp: In member function 'Y& X::get() [with T = Y]': > t.cpp:25: instantiated from here > t.cpp:15: warning: dereferencing type-punned pointer will break strict-aliasing > rules > t.cpp: In function 'void foo(Y&)': > t.cpp:25: warning: dereferencing pointer '' does break > strict-aliasing rules > t.cpp:25: note: initialized from here > > > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503