From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17826 invoked by alias); 13 Oct 2004 09:38:33 -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 17815 invoked by uid 48); 13 Oct 2004 09:38:32 -0000 Date: Wed, 13 Oct 2004 09:38:00 -0000 From: "reichelt at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20041013093830.17971.reichelt@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/17971] New: [3.4/4.0 regression] Invalid default parameter not diagnosed. X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg01709.txt.bz2 List-Id: Since PR 16929 got a little confusing, I'm opening a new PR for the following problem: Since gcc 3.4.0 we accept the following invalid code snippet. The invalid default parameter "a" is not even diagnosed at instantiation time. (This is different from PT 17011 - also a spin-off from PR16929 - which is just a QoI issue.) =========================================== template struct A {}; template struct B { A a; void foo(A = a); }; template struct B; =========================================== With 3.3.5 and before we got a decent error message: bug.cc:7: error: invalid use of member `B::a' -- Summary: [3.4/4.0 regression] Invalid default parameter not diagnosed. Product: gcc Version: 3.4.3 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal 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 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17971