[C++ PATCH]: Fix 9109

Nathan Sidwell nathan@codesourcery.com
Mon Jan 6 15:01:00 GMT 2003


Mark,
this fixes bug 9109 that I stumbled over. If 'int (T)' is parseable
as both a declaration 'T of type int' or an abstract declaration
'function returning int taking parameter T' (T being a template type parm),
we must prefer the abstract declarator.

It also fixes
	void (foo) (int i = 0);
which I believe is well formed.

Rather than have to call cp_parser_declarator twice, once for each kind
of declaration, I made its abstract_p argument tri-valued.

built and tested on i686-pc-linux-gnu, ok?

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
          The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 9109-3.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030106/aa5b67a4/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 9109.C
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030106/aa5b67a4/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 9109-2.C
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030106/aa5b67a4/attachment-0002.ksh>


More information about the Gcc-patches mailing list