[RFA] PATCH for PR c++/39639
Dodji Seketeli
dodji@redhat.com
Fri Apr 10 11:29:00 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jason Merrill a écrit :
> Why aren't we getting an error from cp_parser_template_argument?
That function tentatively tries to parse the different kinds of template
arguments (type or non-type arguments), doesn't find any of those, rolls back
the tentative parse (by calling cp_parser_parse_definitely) and returns the
argument it found - which in this case is error_mark_node as no argument were found.
The last call to cp_parser_parse_definitely discarded the errors that occurred
during the tentative parsing.
I thought about making cp_parser_template_argument spit an error when no
argument were parsed and the next token was an ellipsis, but then I wasn't sure
why the ellipsis detection and pack expansion weren't done in that function in
the first place; those are done in cp_parser_template_argument_list. So I
thought I should handle the error at the level of
cp_parser_template_argument_list as well.
Thanks.
D.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Remi - http://enigmail.mozdev.org
iEYEARECAAYFAknfLaAACgkQPejI7lrem2H3WgCglvoupkd2MxZhpUKZzOAwACLJ
GxMAoJQLJCNrNGla9IwSlX44IhiD6cdK
=gIrF
-----END PGP SIGNATURE-----
More information about the Gcc-patches
mailing list