This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r253686 - in /trunk/gcc: cp/ChangeLog cp/parser...
- From: dmalcolm at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 12 Oct 2017 17:29:16 -0000
- Subject: r253686 - in /trunk/gcc: cp/ChangeLog cp/parser...
Author: dmalcolm
Date: Thu Oct 12 17:29:15 2017
New Revision: 253686
URL: https://gcc.gnu.org/viewcvs?rev=253686&root=gcc&view=rev
Log:
C++: avoid partial duplicate implementation of cp_parser_error
In r251026 (aka 3fe34694f0990d1d649711ede0326497f8a849dc,
"C/C++: show pertinent open token when missing a close token")
I copied part of cp_parser_error into cp_parser_required_error,
leading to duplication of code.
This patch eliminates this duplication by merging the two copies of the
code into a new cp_parser_error_1 subroutine.
Doing so removes an indentation level, making the patch appear to have
more churn than it really does.
The patch also undoes the change to g++.dg/parse/pragma2.C, as the
old behavior is restored.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/parse/pragma2.C