[gcc r16-8205] gccrs: Add multiple missing builtin attribute values

Arthur Cohen cohenarthur@gcc.gnu.org
Fri Mar 20 17:24:23 GMT 2026


https://gcc.gnu.org/g:7fc31b679f78d5932fc260f83cd610c128f01ef4

commit r16-8205-g7fc31b679f78d5932fc260f83cd610c128f01ef4
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Tue Feb 10 13:57:42 2026 +0100

    gccrs: Add multiple missing builtin attribute values
    
    Those attributes should be considered as builtin attributes but were
    missing from the list of builtin attributes.
    
    gcc/rust/ChangeLog:
    
            * util/rust-attributes.cc: Add "feature", "no_core", "doc",
            "crate_name", "crate_type" and "may_dandle" to the list of builtin
            attributes.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/rust/util/rust-attributes.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc
index b3d60791432b..719a972c9d1b 100644
--- a/gcc/rust/util/rust-attributes.cc
+++ b/gcc/rust/util/rust-attributes.cc
@@ -96,6 +96,12 @@ static const BuiltinAttrDefinition __definitions[]
      {Attrs::TARGET_FEATURE, CODE_GENERATION},
      // From now on, these are reserved by the compiler and gated through
      // #![feature(rustc_attrs)]
+     {Attrs::FEATURE, STATIC_ANALYSIS},
+     {Attrs::NO_CORE, CODE_GENERATION},
+     {Attrs::DOC, EXTERNAL},
+     {Attrs::CRATE_NAME, CODE_GENERATION},
+     {Attrs::CRATE_TYPE, CODE_GENERATION},
+     {Attrs::MAY_DANGLE, STATIC_ANALYSIS},
      {Attrs::RUSTC_DEPRECATED, STATIC_ANALYSIS},
      {Attrs::RUSTC_INHERIT_OVERFLOW_CHECKS, CODE_GENERATION},
      {Attrs::STABLE, STATIC_ANALYSIS},


More information about the Gcc-cvs mailing list