re PR c++/39681 (Compile error is not descriptive)
commit70ba90b22610fa2f3a295f1c780aaeb6cd929b58
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 17 May 2012 18:54:37 +0000 (17 18:54 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 17 May 2012 18:54:37 +0000 (17 18:54 +0000)
tree0cfd7123ad39b42911197e5148760b5eba1aac91
parent8e6acdb8cd69c66bde4d7eedaf583708de7f540e
re PR c++/39681 (Compile error is not descriptive)

/cp
2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/39681
* parser.c (cp_parser_new_type_id): Early return error_mark_node
if the cp_parser_type_specifier_seq call has type_specifier_seq.type
error_mark_node; tidy.
(cp_parser_new_expression): Always initialize nelts to NULL_TREE to
avoid uninitialized warnings.
(cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
returns error_mark_node.

/testsuite
2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/39681
* g++.dg/parse/error48.C: New.
* g++.dg/cpp0x/error8.C: Likewise.
* g++.dg/ext/utf-cxx98.C: Adjust dg-error directive.
* g++.dg/ext/utf-dflt2.C: Likewise.
* g++.dg/ext/utf-gnuxx98.C: Likewise.
* g++.dg/ext/utf-dflt.C: Likewise.
* c-c++-common/raw-string-3.c: Likewise.
* c-c++-common/raw-string-4.c: Likewise.

From-SVN: r187634
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/raw-string-3.c
gcc/testsuite/c-c++-common/raw-string-4.c
gcc/testsuite/g++.dg/cpp0x/error8.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/utf-cxx98.C
gcc/testsuite/g++.dg/ext/utf-dflt.C
gcc/testsuite/g++.dg/ext/utf-dflt2.C
gcc/testsuite/g++.dg/ext/utf-gnuxx98.C
gcc/testsuite/g++.dg/parse/error49.C [new file with mode: 0644]