From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8764 invoked by alias); 30 May 2009 15:16:41 -0000 Received: (qmail 8731 invoked by uid 48); 30 May 2009 15:16:30 -0000 Date: Sat, 30 May 2009 15:16:00 -0000 Subject: [Bug c++/40311] New: brace initialization does not work well with new X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "public at alisdairm dot net" 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-05/txt/msg02344.txt.bz2 Tested on MinGW 4.4.0 The following code does not compile and should: int main() { int * a = new int{}; int * b = new int{5}; return 0; } Compiler output: main.cpp||In function 'int main()':| main.cpp|3|error: aggregate value used where an integer was expected| main.cpp|4|error: aggregate value used where an integer was expected| main.cpp|3|warning: unused variable 'a'| main.cpp|4|warning: unused variable 'b'| ||=== Build finished: 2 errors, 2 warnings ===| -- Summary: brace initialization does not work well with new Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: public at alisdairm dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40311