From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25221 invoked by alias); 12 Aug 2004 19:39:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25192 invoked by uid 48); 12 Aug 2004 19:39:22 -0000 Date: Thu, 12 Aug 2004 19:39:00 -0000 From: "reichelt at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040812193920.17011.reichelt@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/17011] New: [3.4/3.5 regression] invalid default parameter diagnosed too late X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg01167.txt.bz2 List-Id: On 3.4 branch and mainline the invalid default parameter is only diagnosed at instantiation time and not at definition time: ====================================== template struct A {}; template struct B { A a; void foo(A* = &a); void bar() { foo(); } }; // template struct B; ====================================== On the 3.3 branch we get the error message already at defintion time: bug.cc:7: error: invalid use of member `B::a' -- Summary: [3.4/3.5 regression] invalid default parameter diagnosed too late Product: gcc Version: 3.5.0 Status: UNCONFIRMED Keywords: accepts-invalid, diagnostic Severity: enhancement Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot com BugsThisDependsOn: 16929 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17011