From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14379 invoked by alias); 24 Nov 2012 09:28:59 -0000 Received: (qmail 14292 invoked by uid 48); 24 Nov 2012 09:28:45 -0000 From: "harald at gigawatt dot nl" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55446] [4.7/4.8 Regression] array new with size zero vanishes from object code Date: Sat, 24 Nov 2012 09:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: harald at gigawatt dot nl X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com X-Bugzilla-Target-Milestone: 4.7.3 X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-11/txt/msg02240.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55446 Harald van Dijk changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |harald at gigawatt dot nl --- Comment #6 from Harald van Dijk 2012-11-24 09:28:44 UTC --- A compile-only test for this can be struct S { S(); }; void f(S *); void g() { S *s = new S[0]; f(s); } which causes a bogus warning: test.cc: In function 'void g()': test.cc:5:7: warning: 's' is used uninitialized in this function [-Wuninitialized]