From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26122 invoked by alias); 6 Nov 2009 09:09:56 -0000 Received: (qmail 26065 invoked by uid 48); 6 Nov 2009 09:09:42 -0000 Date: Fri, 06 Nov 2009 09:09:00 -0000 Message-ID: <20091106090942.26064.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/41874] Incorrect "dereferencing type-punned pointer will break strict-aliasing rules" warning In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" 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-11/txt/msg00517.txt.bz2 ------- Comment #1 from pinskia at gcc dot gnu dot org 2009-11-06 09:09 ------- 4.5 also fails and I cannot figure why if I do: #include struct APInt { int i; }; int main() { APInt I; void *d; char Data[sizeof(APInt)]; new((void*)Data)APInt(); d = Data; *(APInt*)d = I; } GCC does not warn. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail| |4.5.0 Last reconfirmed|0000-00-00 00:00:00 |2009-11-06 09:09:42 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41874