]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: parser: macro: reject separator in `?` repetition
authorSebastian Kirmayer <gnu@kirmayer.eu>
Wed, 5 Apr 2023 04:09:11 +0000 (06:09 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:34:08 +0000 (18:34 +0100)
commit694063d84e47f57c99d4558e789932c31a7bf6dd
tree11e5fb50e1d86790cc922c9db61a1f2a8d88eadc
parentf2df348dcd5c7ef51e5a686a4d2473ae9bbb36bb
gccrs: parser: macro: reject separator in `?` repetition

A matcher like $(a),? is no longer accepted.

Fixes #2092.

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h
(Parser<ManagedTokenSource>::parse_macro_match_repetition):
reject separator in `?` repetition

gcc/testsuite/ChangeLog:

* rust/compile/macro-issue2092.rs: New test.

Signed-off-by: Sebastian Kirmayer <gnu@kirmayer.eu>
gcc/rust/parse/rust-parse-impl.h
gcc/testsuite/rust/compile/macro-issue2092.rs [new file with mode: 0644]