From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5719 invoked by alias); 8 Jul 2009 20:16:39 -0000 Received: (qmail 5600 invoked by uid 48); 8 Jul 2009 20:16:21 -0000 Date: Wed, 08 Jul 2009 20:16:00 -0000 Subject: [Bug c++/40688] New: [C++0x]: error with auto direct and copy initalization X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bernhard dot merkle at googlemail dot com" 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-07/txt/msg00681.txt.bz2 Hi, I think there is another bug in g++ 4.4 concerning the implementation of auto with direct and copy initialization 7.1.6.4/3 in N2914 The following program should compile, but is rejected by g++. int main() { auto v1 = 1; // copy initialization syntax auto v2(2); // direct initialization syntax return 0; } $ /opt/gcc-4.4/bin/g++ -v Using built-in specs. Target: i686-pc-cygwin Configured with: ./configure --prefix=/opt/gcc-4.4 Thread model: single gcc version 4.4.0 (GCC) $ /opt/gcc-4.4/bin/g++ --std=c++0x -Wall g++4.4Bug2AutoN2914.cpp g++4.4Bug2AutoN2914.cpp: In function 'int main()': g++4.4Bug2AutoN2914.cpp:5: error: 'v2' has incomplete type g++4.4Bug2AutoN2914.cpp:4: warning: unused variable 'v1' g++4.4Bug2AutoN2914.cpp:5: warning: unused variable 'v2' -- Summary: [C++0x]: error with auto direct and copy initalization Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bernhard dot merkle at googlemail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40688