Skip to content

Commit f822e47

Browse files
author
ian
committed
compiler: Don't parse malformed receiver/parameters.
Fixes golang/go#11576. Reviewed-on: https://go-review.googlesource.com/12157 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226185 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 5f7bd04 commit f822e47

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

gcc/go/gofrontend/MERGE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
46117382a58843af60fc2feab68c433a96f79e79
1+
e4a5e2b2a9dc556685db09421a95871f195f768b
22

33
The first line of this file holds the git revision number of the last
44
merge done from the gofrontend repository.

gcc/go/gofrontend/parse.cc

+5-3
Original file line numberDiff line numberDiff line change
@@ -787,9 +787,11 @@ Parse::parameters(Typed_identifier_list** pparams, bool* is_varargs)
787787
// The optional trailing comma is picked up in parameter_list.
788788

789789
if (!token->is_op(OPERATOR_RPAREN))
790-
error_at(this->location(), "expected %<)%>");
791-
else
792-
this->advance_token();
790+
{
791+
error_at(this->location(), "expected %<)%>");
792+
return false;
793+
}
794+
this->advance_token();
793795

794796
if (saw_error)
795797
return false;

0 commit comments

Comments
 (0)