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:
parent
938e76ad6d
commit
a11669269b
@ -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.
|
||||
|
@ -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++. */
|
||||
|
@ -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
|
||||
|
8
gcc/testsuite/g++.dg/parse/defarg13.C
Normal file
8
gcc/testsuite/g++.dg/parse/defarg13.C
Normal 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>()));
|
||||
};
|
Loading…
Reference in New Issue
Block a user