From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3174 invoked by alias); 31 Jan 2012 19:56:08 -0000 Received: (qmail 3163 invoked by uid 22791); 31 Jan 2012 19:56:07 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Jan 2012 19:55:54 +0000 From: "jyates at us dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/52071] New: Constructor invocation confused Date: Tue, 31 Jan 2012 21:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: jyates at us dot ibm.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: 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-01/txt/msg03723.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52071 Bug #: 52071 Summary: Constructor invocation confused Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: jyates@us.ibm.com struct C1 { C1(int); }; struct C2 { C2(); C2(C1); }; void f() { int x; int y = 1; C2 vc; // No problem vc = C2(C1(x = y)); // local variable 'y' may not appear in this context // default arguments are only permitted for function parameters vc = (C2(C1(x = y))); // No problem vc = (C2(C1((0, x = y)))); }