re PR c++/56239 (parse error calling operator() on parenthesized value-initialized...
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Feb 2013 17:49:59 +0000 (18:49 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 7 Feb 2013 17:49:59 +0000 (18:49 +0100)
commit2052ce24f1200a62154b280583f068f7f7a6ed44
tree35bf6d107c5a38a5c3a31407385d38b6175fce3d
parente6d7b956dbae9a91e493e7426802c63ef2322e77
re PR c++/56239 (parse error calling operator() on parenthesized value-initialized temporary)

PR c++/56239
* parser.c (cp_parser_token_starts_cast_expression): Renamed to...
(cp_parser_tokens_start_cast_expression): ... this.  Change parameter
to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
return true only if 2nd token isn't CPP_CLOSE_PAREN.
(cp_parser_cast_expression): Adjust caller.

* g++.dg/parse/pr56239.C: New test.

From-SVN: r195859
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/pr56239.C [new file with mode: 0644]