https://gcc.gnu.org/g:b8ee34e40b3952f71a24120f61ff8ebfba338d10

commit r17-3927-gb8ee34e40b3952f71a24120f61ff8ebfba338d10
Author: Kael Andrew Alonzo Franco <[email protected]>
Date:   Thu Sep 3 16:36:35 2026 -0400

    Rust: Remove ENUM_BITFIELD in Rust. [PR125507]
    
    GCC requires C++14 and C++ supports enum bitfield so ENUM_BITFIELD is 
deprecated macro.
    
    Bootstrapped and regtested on x86_64-pc-linux-gnu.
    
            PR middle-end/125507
    
    gcc/rust/ChangeLog:
    
            * backend/rust-tree.h (struct lang_decl_base): Remove ENUM_BITFIELD.
            (struct rust_cp_binding_level): Ditto.
    
    Signed-off-by: Kael Andrew Franco <[email protected]>

Diff:
---
 gcc/rust/backend/rust-tree.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/rust/backend/rust-tree.h b/gcc/rust/backend/rust-tree.h
index b995d0afd8a8..21edfe389f4a 100644
--- a/gcc/rust/backend/rust-tree.h
+++ b/gcc/rust/backend/rust-tree.h
@@ -1971,7 +1971,7 @@ enum lang_decl_selector
 
 struct GTY (()) lang_decl_base
 {
-  ENUM_BITFIELD (lang_decl_selector) selector : 3;
+  enum lang_decl_selector selector : 3;
   unsigned use_template : 2;
   unsigned not_really_extern : 1;    /* var or fn */
   unsigned initialized_in_class : 1; /* var or fn */
@@ -2189,7 +2189,7 @@ struct GTY (()) rust_cp_binding_level
   /* The kind of scope that this object represents.  However, a
       SK_TEMPLATE_SPEC scope is represented with KIND set to
       SK_TEMPLATE_PARMS and EXPLICIT_SPEC_P set to true.  */
-  ENUM_BITFIELD (scope_kind) kind : 4;
+  enum scope_kind kind : 4;
 
   /* True if this scope is an SK_TEMPLATE_SPEC scope.  This field is
       only valid if KIND == SK_TEMPLATE_PARMS.  */

Reply via email to