This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/7703: [2003-01-28] gcc gives parse errors when compiling a class function with recursively templated default value for a function parameter


The following reply was made to PR c++/7703; it has been noted by GNATS.

From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<fizban@umich.edu>
Cc:  
Subject: Re: c++/7703: [2003-01-28] gcc gives parse errors when compiling a class function with recursively templated default value for a function parameter
Date: Fri, 2 May 2003 03:19:25 +0200

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7703
 
 This is only about the comma in the default parameter:
 
 -----------------------------
 template <class, class>
 struct Bar
 {};
 
 template <class>
 struct Foo
 {
     void func(Bar<void, void> b = Bar<void, void>())
     {
     }
 };
 
 template struct Foo<void>;
 -----------------------------
 pr7703.cpp:8: error: variable or field `func' declared void
 pr7703.cpp:8: error: expected function-definition
 
 I'm confident this is a duplicate but I could not find the other PR.
 The obvious workaround is just to put a couple of parenthesis around the
 default parameter to disambiguate the parser (which is confused by the
 comma).
 
 Since this is one of the points discussed in DR325, I suspend this PR till
 the resolution of the defect report.
 
 Giovanni Bajo
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]