]> git.ipfire.org Git - thirdparty/gcc.git/commit
compiler: permit compiler directives in parenthesized groups
authorIan Lance Taylor <iant@golang.org>
Tue, 26 Oct 2021 17:50:40 +0000 (10:50 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 26 Oct 2021 23:11:26 +0000 (16:11 -0700)
commitab10383aaebf2feebd2b6d68247f2520eff48f79
treeb7296e54620d4fbe3fef6d4ebad91a9bbe7065ff
parent1ff4dbddcf74203a1e16316b18e12f9e1b5085f0
compiler: permit compiler directives in parenthesized groups

The original compiler directive support was only for //line at the
start of a line and for //go: comments before function declarations.
When support was added for //go:notinheap for types and //go:embed for
variables the code did not adapt to permit spaces before the comment
or to permit the comments in var() or type() groups.  This change
corrects those omissions.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/358699
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/lex.cc
gcc/go/gofrontend/lex.h
gcc/go/gofrontend/parse.cc
gcc/go/gofrontend/parse.h