From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29096 invoked by alias); 12 Jan 2008 18:44:26 -0000 Received: (qmail 28995 invoked by uid 48); 12 Jan 2008 18:43:42 -0000 Date: Sat, 12 Jan 2008 19:09:00 -0000 Subject: [Bug c++/34758] New: [4.1/4.2/4.3 regression] Bad diagnostic for circular dependency in constructor default argument X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt 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: 2008-01/txt/msg01166.txt.bz2 The diagnostic for the following invalid code snippet degraded in GCC 3.4.0: ======================= struct A { A (const A& = A()); }; ======================= Since GCC 3.4.0 we get: bug.cc:3: error: the default argument for parameter 0 of 'A::A(const A&)' has not yet been parsed But before we got the much clearer diagnostic (although it was just a warning): bug.cc:3: warning: circular dependency in default args of `A::A(const A&)' In addition, the counting of the parameters should start with 1. -- Summary: [4.1/4.2/4.3 regression] Bad diagnostic for circular dependency in constructor default argument Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34758