]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Avoid malformed attribute conversion
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 1 Oct 2025 14:35:37 +0000 (16:35 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 30 Oct 2025 20:30:55 +0000 (21:30 +0100)
commit1461fa714b54621b6b0c0f9258dd5e15ccf4c5f9
treee1da5f5696302196f1aadf89fbdb2bf70430d022
parent3acbf40e874cf8c85fbbe64db93d81201e1dc480
gccrs: Avoid malformed attribute conversion

Add location for malformed attribute errors and avoid processing of
malformed attributes.

gcc/rust/ChangeLog:

* ast/rust-ast.cc (AttrInputMetaItemContainer::separate_cfg_attrs):
Avoid malformed attributes.
* util/rust-attributes.cc (AttributeChecker::visit): Change location.

gcc/testsuite/ChangeLog:

* rust/compile/attr_malformed_path.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast.cc
gcc/rust/util/rust-attributes.cc
gcc/testsuite/rust/compile/attr_malformed_path.rs [new file with mode: 0644]