From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20487 invoked by alias); 23 Sep 2004 13:55:22 -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 20470 invoked by uid 48); 23 Sep 2004 13:55:21 -0000 Date: Thu, 23 Sep 2004 13:55:00 -0000 From: "papadopo at shfj dot cea dot fr" To: gcc-bugs@gcc.gnu.org Message-ID: <20040923135514.17634.papadopo@shfj.cea.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/17634] New: default arguments not permitted in typedef's X-Bugzilla-Reason: CC X-SW-Source: 2004-09/txt/msg02758.txt.bz2 List-Id: The following used to compile in gcc 3.3: $ cat foo.cc typedef void (*Function)(int n = 1); $ g++ -c foo.cc $ It doesn't compile anymore in gcc 3.4: $ cat foo.cc typedef void (*Function)(int n = 1); $ g++ -c foo.cc foo.cc:1: error: default arguments are only permitted for function parameters $ Although I'm not sure this is legal C++, I've opened a bug report because the following does work with gcc 3.4, which seems inconsistent: $ cat foo.cc struct MyClass { typedef void (MyClass::*Function)(int n = 1); }; $ g++ -c foo.cc $ -- Summary: default arguments not permitted in typedef's Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: papadopo at shfj dot cea dot fr CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17634