]> git.ipfire.org Git - thirdparty/gcc.git/commit
format_args: Allow extraneous commas, improve safety
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 9 Apr 2025 12:42:08 +0000 (14:42 +0200)
committerCohenArthur <arthur.cohen@embecosm.com>
Mon, 14 Apr 2025 08:27:47 +0000 (08:27 +0000)
commit0c6c73c5317111c5ec9cf465b3f6e37fe250a449
treeb3cf56bae92eae7d9ca55108296cdc2fd3b7aa60
parent486ca997e9924ad52bee8e4c4a6028fcab5f25b5
format_args: Allow extraneous commas, improve safety

gcc/rust/ChangeLog:

* expand/rust-macro-builtins-format-args.cc (format_args_parse_arguments): Improve safety,
allow extra commas after end of argument list.

gcc/testsuite/ChangeLog:

* rust/compile/format_args_extra_comma.rs: New test.
gcc/rust/expand/rust-macro-builtins-format-args.cc
gcc/testsuite/rust/compile/format_args_extra_comma.rs [new file with mode: 0644]