]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Fix infinite loop with missing comma
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 30 Jul 2025 11:11:52 +0000 (13:11 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:36:59 +0000 (16:36 +0200)
commit697025acf8bedcc59a2e34035ddb6f17a69b8c52
tree70e65bf58e036662b378465dde71ed15d1fdb377
parenta9fdfc065c3710a26b8a77d2c5d3fc73f4be8371
gccrs: Fix infinite loop with missing comma

A missing comma between inline assembly templates did not throw an error
and looped indefinitely.

gcc/rust/ChangeLog:

* expand/rust-macro-builtins-asm.cc (parse_format_strings): Emit an
error when expecting a comma.

gcc/testsuite/ChangeLog:

* rust/compile/issue-4006.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/expand/rust-macro-builtins-asm.cc
gcc/testsuite/rust/compile/issue-4006.rs [new file with mode: 0644]