re PR c++/38485 (GCC can't parse a parenthesized comma in a template-id within a default argument)

PR c++/38485
        * parser.c (cp_parser_token_starts_cast_expression): An EOF
        can't start a cast-expression.

From-SVN: r142815
This commit is contained in:
Jason Merrill 2008-12-18 10:54:59 -05:00 committed by Jason Merrill
parent 938e76ad6d
commit a11669269b
4 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2008-12-18 Jason Merrill <jason@redhat.com>
PR c++/38485
* parser.c (cp_parser_token_starts_cast_expression): An EOF
can't start a cast-expression.
2008-12-17 Jason Merrill <jason@redhat.com>
* semantics.c (describable_type): New function.

View File

@ -5953,6 +5953,7 @@ cp_parser_token_starts_cast_expression (cp_token *token)
case CPP_XOR:
case CPP_OR:
case CPP_OR_OR:
case CPP_EOF:
return false;
/* '[' may start a primary-expression in obj-c++. */

View File

@ -1,3 +1,8 @@
2008-12-18 Jason Merrill <jason@redhat.com>
PR c++/38485
* g++.dg/parse/defarg13.C: New test.
2008-12-18 Kenneth Zadeck <zadeck@naturalbridge.com>
PR rtl-optimization/37922

View File

@ -0,0 +1,8 @@
// PR c++/38485
template <class Key, class T>
class QMap { };
class XMLConfigurations {
void translateToOther(QMap<int, int> match = (QMap<int, int>()));
};