[C++ PATCH] parser simplification
authorNathan Sidwell <nathan@acm.org>
Thu, 11 Oct 2018 18:58:55 +0000 (18:58 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 11 Oct 2018 18:58:55 +0000 (18:58 +0000)
commitc7f45560c7856139118f71dd31d1bc2f3eb7b98c
tree8b9de7ab9434ac9fc55a38ffa02b3b4d41424bea
parent13c4e4031a391afb6368d7072217acde07607ff7
[C++ PATCH] parser simplification

https://gcc.gnu.org/ml/gcc-patches/2018-10/msg00689.html
cp/
* parser.c (cp_parser_translation_unit): Return void.  Don't fail
at first extra }, simplify logic.
(c_parse_file): Call finish_translation_unit here.

testsuite/
* g++.dg/parse/close-brace.C: New.
* g++.dg/cpp0x/noexcept16.C: Avoid warning.
* g++.old-deja/g++.other/crash32.C: Add another error

From-SVN: r265055
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/noexcept16.C
gcc/testsuite/g++.dg/parse/close-brace.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/crash32.C