This change completely removes the BOOL_BITFIELD
macro from the codebase. All uses have been
replaced with bool.

gcc/
        * c/c-decl.cc (c_binding): Replace BOOL_BITFIELD with bool.
        (c_scope): Likewise.
        * c/c-parser.cc (c_parser): Likewise.
        * c/c-tree.h (c_declspecs): Likewise.
        (c_arg_info): Likewise.
        (c_declarator): Likewise.
        * config/i386/i386.h (machine_frame_state): Likewise.
        (machine_function): Likewise.
        * cp/call.cc (conversion): Likewise.
        * cp/cp-tree.h (saved_scope): Likewise.
        (language_function): Likewise.
        (cp_decl_specifier_seq): Likewise.
        (cp_declarator): Likewise.
        * cp/name-lookup.h (cp_binding_level): Likewise.
        * ctfc.h (ctf_dtdef): Likewise.
        * dwarf2out.cc (die_struct): Likewise.
        * dwarf2out.h (dw_cfa_location): Likewise.
        * gengtype-lex.l (IWORD): Remove BOOL_BITFIELD.
        * gimple-walk.h (walk_stmt_info): Replace BOOL_BITFIELD with bool.
        * objc/objc-act.h (imp_entry): Likewise.
        * opts.h (cl_option): Likewise.
        * rust/backend/rust-tree.h (saved_scope): Likewise.
        (rust_cp_binding_level): Likewise.
        (language_function): Likewise.
        * sched-int.h (deps_desc): Likewise.
        * sel-sched-ir.h (_expr): Likewise.
        (_fence): Likewise.
        (transformed_insns): Likewise.
        (_sel_insn_data): Likewise.
        * sel-sched.cc (cmpd_local_params): Likewise.
        * system.h: Remove #define for BOOL_BITFIELD.

Signed-off-by: Kevin Stefanov <[email protected]>
---
I've made this new patch that replaces
BOOL_BITFIELD with bool, instead of
with unsigned int.

My remark about the output I got from
check_GNU_style.py and compare_tests
remains. Let me know if improvements
are needed there and whether I should
run the test suite and bootstrap on more
architectures on a GNU test machine please.

Bootstrapped and regression tested on
x86_64-pc-linux-gnu with enable-languages=all.

Bugzilla easyhack page:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125274


 gcc/c/c-decl.cc              | 24 ++++++-------
 gcc/c/c-parser.cc            | 22 ++++++------
 gcc/c/c-tree.h               | 66 ++++++++++++++++++------------------
 gcc/config/i386/i386.h       | 50 +++++++++++++--------------
 gcc/cp/call.cc               | 20 +++++------
 gcc/cp/cp-tree.h             | 58 +++++++++++++++----------------
 gcc/cp/name-lookup.h         |  2 +-
 gcc/ctfc.h                   |  4 +--
 gcc/dwarf2out.cc             |  8 ++---
 gcc/dwarf2out.h              |  4 +--
 gcc/gengtype-lex.l           |  2 +-
 gcc/gimple-walk.h            | 10 +++---
 gcc/objc/objc-act.h          |  2 +-
 gcc/opts.h                   | 22 ++++++------
 gcc/rust/backend/rust-tree.h | 28 +++++++--------
 gcc/sched-int.h              |  2 +-
 gcc/sel-sched-ir.h           | 26 +++++++-------
 gcc/sel-sched.cc             |  2 +-
 gcc/system.h                 |  3 --
 19 files changed, 176 insertions(+), 179 deletions(-)

diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc
index 1b2f2b4edec..286d29405a3 100644
--- a/gcc/c/c-decl.cc
+++ b/gcc/c/c-decl.cc
@@ -221,10 +221,10 @@ struct GTY((chain_next ("%h.prev"))) c_binding {
   struct c_binding *prev;      /* the previous decl in this scope */
   struct c_binding *shadowed;  /* the innermost decl shadowed by this one */
   unsigned int depth : 28;      /* depth of this scope */
-  BOOL_BITFIELD invisible : 1;  /* normal lookup should ignore this binding */
-  BOOL_BITFIELD nested : 1;     /* do not set DECL_CONTEXT when popping */
-  BOOL_BITFIELD inner_comp : 1; /* incomplete array completed in inner scope */
-  BOOL_BITFIELD in_struct : 1; /* currently defined as struct field */
+  bool invisible : 1;  /* normal lookup should ignore this binding */
+  bool nested : 1;     /* do not set DECL_CONTEXT when popping */
+  bool inner_comp : 1; /* incomplete array completed in inner scope */
+  bool in_struct : 1;  /* currently defined as struct field */
   location_t locus;            /* location for nested bindings */
 };
 #define B_IN_SCOPE(b1, b2) ((b1)->depth == (b2)->depth)
@@ -502,38 +502,38 @@ struct GTY((chain_next ("%h.outer"))) c_scope {
 
   /* True if we are currently filling this scope with parameter
      declarations.  */
-  BOOL_BITFIELD parm_flag : 1;
+  bool parm_flag : 1;
 
   /* True if we saw [*] in this scope.  Used to give an error messages
      if these appears in a function definition.  */
-  BOOL_BITFIELD had_vla_unspec : 1;
+  bool had_vla_unspec : 1;
 
   /* True if we parsed a list of forward parameter decls in this scope.  */
-  BOOL_BITFIELD had_forward_parm_decls : 1;
+  bool had_forward_parm_decls : 1;
 
   /* True if this is the outermost block scope of a function body.
      This scope contains the parameters, the local variables declared
      in the outermost block, and all the labels (except those in
      nested functions, or declared at block scope with __label__).  */
-  BOOL_BITFIELD function_body : 1;
+  bool function_body : 1;
 
   /* True means make a BLOCK for this scope no matter what.  */
-  BOOL_BITFIELD keep : 1;
+  bool keep : 1;
 
   /* True means that an unsuffixed float constant is _Decimal64.  */
-  BOOL_BITFIELD float_const_decimal64 : 1;
+  bool float_const_decimal64 : 1;
 
   /* True if this scope has any label bindings.  This is used to speed
      up searching for labels when popping scopes, particularly since
      labels are normally only found at function scope.  */
-  BOOL_BITFIELD has_label_bindings : 1;
+  bool has_label_bindings : 1;
 
   /* True if we should issue a warning if a goto statement crosses any
      of the bindings.  We still need to check the list of bindings to
      find the specific ones we need to warn about.  This is true if
      decl_jump_unsafe would return true for any of the bindings.  This
      is used to avoid looping over all the bindings unnecessarily.  */
-  BOOL_BITFIELD has_jump_unsafe_decl : 1;
+  bool has_jump_unsafe_decl : 1;
 };
 
 /* The scope currently in effect.  */
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
index cf13bc2d796..643335baf96 100644
--- a/gcc/c/c-parser.cc
+++ b/gcc/c/c-parser.cc
@@ -205,54 +205,54 @@ struct GTY(()) c_parser {
   /* True if a syntax error is being recovered from; false otherwise.
      c_parser_error sets this flag.  It should clear this flag when
      enough tokens have been consumed to recover from the error.  */
-  BOOL_BITFIELD error : 1;
+  bool error : 1;
   /* True if we're processing a pragma, and shouldn't automatically
      consume CPP_PRAGMA_EOL.  */
-  BOOL_BITFIELD in_pragma : 1;
+  bool in_pragma : 1;
   /* True if we're parsing the outermost block of an if statement.  */
-  BOOL_BITFIELD in_if_block : 1;
+  bool in_if_block : 1;
   /* True if we want to lex a translated, joined string (for an
      initial #pragma pch_preprocess).  Otherwise the parser is
      responsible for concatenating strings and translating to the
      execution character set as needed.  */
-  BOOL_BITFIELD lex_joined_string : 1;
+  bool lex_joined_string : 1;
   /* True if, when the parser is concatenating string literals, it
      should translate them to the execution character set (false
      inside attributes).  */
-  BOOL_BITFIELD translate_strings_p : 1;
+  bool translate_strings_p : 1;
 
   /* Objective-C specific parser/lexer information.  */
 
   /* True if we are in a context where the Objective-C "PQ" keywords
      are considered keywords.  */
-  BOOL_BITFIELD objc_pq_context : 1;
+  bool objc_pq_context : 1;
   /* True if we are parsing a (potential) Objective-C foreach
      statement.  This is set to true after we parsed 'for (' and while
      we wait for 'in' or ';' to decide if it's a standard C for loop or an
      Objective-C foreach loop.  */
-  BOOL_BITFIELD objc_could_be_foreach_context : 1;
+  bool objc_could_be_foreach_context : 1;
   /* The following flag is needed to contextualize Objective-C lexical
      analysis.  In some cases (e.g., 'int NSObject;'), it is
      undesirable to bind an identifier to an Objective-C class, even
      if a class with that name exists.  */
-  BOOL_BITFIELD objc_need_raw_identifier : 1;
+  bool objc_need_raw_identifier : 1;
   /* Nonzero if we're processing a __transaction statement.  The value
      is 1 | TM_STMT_ATTR_*.  */
   unsigned int in_transaction : 4;
   /* True if we are in a context where the Objective-C "Property attribute"
      keywords are valid.  */
-  BOOL_BITFIELD objc_property_attr_context : 1;
+  bool objc_property_attr_context : 1;
 
   /* Whether we have just seen/constructed a string-literal.  Set when
      returning a string-literal from c_parser_string_literal.  Reset
      in consume_token.  Useful when we get a parse error and see an
      unknown token, which could have been a string-literal constant
      macro.  */
-  BOOL_BITFIELD seen_string_literal : 1;
+  bool seen_string_literal : 1;
 
   /* TRUE if omp::directive, omp::decl or omp::sequence attributes may not
      appear.  */
-  BOOL_BITFIELD omp_attrs_forbidden_p : 1;
+  bool omp_attrs_forbidden_p : 1;
 
   /* Location of the last consumed token.  */
   location_t last_token_location;
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h
index 27784a2ffba..511b155d46d 100644
--- a/gcc/c/c-tree.h
+++ b/gcc/c/c-tree.h
@@ -418,78 +418,78 @@ struct c_declspecs {
   ENUM_BITFIELD (c_declspec_il) declspec_il : 3;
   /* Whether any expressions in typeof specifiers may appear in
      constant expressions.  */
-  BOOL_BITFIELD expr_const_operands : 1;
+  bool expr_const_operands : 1;
   /* Whether any declaration specifiers have been seen at all.  */
-  BOOL_BITFIELD declspecs_seen_p : 1;
+  bool declspecs_seen_p : 1;
   /* Whether any declaration specifiers other than standard attributes
      have been seen at all.  If only standard attributes have been
      seen, this is an attribute-declaration.  */
-  BOOL_BITFIELD non_std_attrs_seen_p : 1;
+  bool non_std_attrs_seen_p : 1;
   /* Whether something other than a storage class specifier or
      attribute has been seen.  This is used to warn for the
      obsolescent usage of storage class specifiers other than at the
      start of the list.  (Doing this properly would require function
      specifiers to be handled separately from storage class
      specifiers.)  */
-  BOOL_BITFIELD non_sc_seen_p : 1;
+  bool non_sc_seen_p : 1;
   /* Whether the type is specified by a typedef or typeof name.  */
-  BOOL_BITFIELD typedef_p : 1;
+  bool typedef_p : 1;
   /* Whether the type is explicitly "signed" or specified by a typedef
      whose type is explicitly "signed".  */
-  BOOL_BITFIELD explicit_signed_p : 1;
+  bool explicit_signed_p : 1;
   /* Whether the specifiers include a deprecated typedef.  */
-  BOOL_BITFIELD deprecated_p : 1;
+  bool deprecated_p : 1;
   /* Whether the specifiers include an unavailable typedef.  */
-  BOOL_BITFIELD unavailable_p : 1;
+  bool unavailable_p : 1;
   /* Whether the type defaulted to "int" because there were no type
      specifiers.  */
-  BOOL_BITFIELD default_int_p : 1;
+  bool default_int_p : 1;
   /* Whether "long" was specified.  */
-  BOOL_BITFIELD long_p : 1;
+  bool long_p : 1;
   /* Whether "long" was specified more than once.  */
-  BOOL_BITFIELD long_long_p : 1;
+  bool long_long_p : 1;
   /* Whether "short" was specified.  */
-  BOOL_BITFIELD short_p : 1;
+  bool short_p : 1;
   /* Whether "signed" was specified.  */
-  BOOL_BITFIELD signed_p : 1;
+  bool signed_p : 1;
   /* Whether "unsigned" was specified.  */
-  BOOL_BITFIELD unsigned_p : 1;
+  bool unsigned_p : 1;
   /* Whether "complex" was specified.  */
-  BOOL_BITFIELD complex_p : 1;
+  bool complex_p : 1;
   /* Whether "inline" was specified.  */
-  BOOL_BITFIELD inline_p : 1;
+  bool inline_p : 1;
   /* Whether "_Noreturn" was specified.  */
-  BOOL_BITFIELD noreturn_p : 1;
+  bool noreturn_p : 1;
   /* Whether "__thread" or "_Thread_local" was specified.  */
-  BOOL_BITFIELD thread_p : 1;
+  bool thread_p : 1;
   /* Whether "__thread" rather than "_Thread_local" was specified.  */
-  BOOL_BITFIELD thread_gnu_p : 1;
+  bool thread_gnu_p : 1;
   /* Whether "const" was specified.  */
-  BOOL_BITFIELD const_p : 1;
+  bool const_p : 1;
   /* Whether "volatile" was specified.  */
-  BOOL_BITFIELD volatile_p : 1;
+  bool volatile_p : 1;
   /* Whether "restrict" was specified.  */
-  BOOL_BITFIELD restrict_p : 1;
+  bool restrict_p : 1;
   /* Whether "_Atomic" was specified.  */
-  BOOL_BITFIELD atomic_p : 1;
+  bool atomic_p : 1;
   /* Whether "_Sat" was specified.  */
-  BOOL_BITFIELD saturating_p : 1;
+  bool saturating_p : 1;
   /* Whether any alignment specifier (even with zero alignment) was
      specified.  */
-  BOOL_BITFIELD alignas_p : 1;
+  bool alignas_p : 1;
   /* Whether an enum type specifier (": specifier-qualifier-list") was
      specified other than in a definition of that enum (if so, this is
      invalid unless it is an empty declaration "enum identifier
      enum-type-specifier;", but such an empty declaration is valid in
      C23 when "enum identifier;" would not be).  */
-  BOOL_BITFIELD enum_type_specifier_ref_p : 1;
+  bool enum_type_specifier_ref_p : 1;
   /* Whether "auto" was specified in C23 (or later) mode and means the
      type is to be deduced from an initializer, or would mean that if
      no type specifier appears later in these declaration
      specifiers.  */
-  BOOL_BITFIELD c23_auto_p : 1;
+  bool c23_auto_p : 1;
   /* Whether "constexpr" was specified.  */
-  BOOL_BITFIELD constexpr_p : 1;
+  bool constexpr_p : 1;
   /* The address space that the declaration belongs to.  */
   addr_space_t address_space;
 };
@@ -534,13 +534,13 @@ struct c_arg_info {
      ignored.  */
   tree pending_sizes;
   /* True when these arguments had [*].  */
-  BOOL_BITFIELD had_vla_unspec : 1;
+  bool had_vla_unspec : 1;
   /* True when the arguments are a (...) prototype.  */
-  BOOL_BITFIELD no_named_args_stdarg_p : 1;
+  bool no_named_args_stdarg_p : 1;
   /* True when empty parentheses have been interpreted as (void) in C23 or
      later.  This is only for use by -Wtraditional and is no longer needed if
      -Wtraditional is removed.  */
-  BOOL_BITFIELD c23_empty_parens : 1;
+  bool c23_empty_parens : 1;
 };
 
 /* A declarator.  */
@@ -571,9 +571,9 @@ struct c_declarator {
       /* The attributes (currently ignored) inside [].  */
       tree attrs;
       /* Whether [static] was used.  */
-      BOOL_BITFIELD static_p : 1;
+      bool static_p : 1;
       /* Whether [*] was used.  */
-      BOOL_BITFIELD vla_unspec_p : 1;
+      bool vla_unspec_p : 1;
     } array;
     /* For pointers, the qualifiers on the pointer type.  */
     int pointer_quals;
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 375ba82f5ff..5c1ec763416 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -2803,25 +2803,25 @@ struct GTY(()) machine_frame_state
      value within the frame.  If false then the offset above should be
      ignored.  Note that DRAP, if valid, *always* points to the CFA and
      thus has an offset of zero.  */
-  BOOL_BITFIELD sp_valid : 1;
-  BOOL_BITFIELD fp_valid : 1;
-  BOOL_BITFIELD drap_valid : 1;
+  bool sp_valid : 1;
+  bool fp_valid : 1;
+  bool drap_valid : 1;
 
   /* Indicate whether the local stack frame has been re-aligned.  When
      set, the SP/FP offsets above are relative to the aligned frame
      and not the CFA.  */
-  BOOL_BITFIELD realigned : 1;
+  bool realigned : 1;
 
   /* Indicates whether the stack pointer has been re-aligned.  When set,
      SP/FP continue to be relative to the CFA, but the stack pointer
      should only be used for offsets > sp_realigned_offset, while
      the frame pointer should be used for offsets <= sp_realigned_fp_last.
      The flags realigned and sp_realigned are mutually exclusive.  */
-  BOOL_BITFIELD sp_realigned : 1;
+  bool sp_realigned : 1;
 
   /* When APX_PPX used in prologue, force epilogue to emit
   popp instead of move and leave.  */
-  BOOL_BITFIELD apx_ppx_used : 1;
+  bool apx_ppx_used : 1;
 
   /* If sp_realigned is set, this is the last valid offset from the CFA
      that can be used for access with the frame pointer.  */
@@ -2898,15 +2898,15 @@ struct GTY(()) machine_function {
   ENUM_BITFIELD(calling_abi) call_abi : 8;
 
   /* Nonzero if the function accesses a previous frame.  */
-  BOOL_BITFIELD accesses_prev_frame : 1;
+  bool accesses_prev_frame : 1;
 
   /* Set by ix86_compute_frame_layout and used by prologue/epilogue
      expander to determine the style used.  */
-  BOOL_BITFIELD use_fast_prologue_epilogue : 1;
+  bool use_fast_prologue_epilogue : 1;
 
   /* Nonzero if the current function calls pc thunk and
      must not use the red zone.  */
-  BOOL_BITFIELD pc_thunk_call_expanded : 1;
+  bool pc_thunk_call_expanded : 1;
 
   /* If true, the current function needs the default PIC register, not
      an alternate register (on x86) and must not use the red zone (on
@@ -2917,17 +2917,17 @@ struct GTY(()) machine_function {
      if all such instructions are optimized away.  Use the
      ix86_current_function_calls_tls_descriptor macro for a better
      approximation.  */
-  BOOL_BITFIELD tls_descriptor_call_expanded_p : 1;
+  bool tls_descriptor_call_expanded_p : 1;
 
   /* True if TLS descriptor is called more than once.  */
-  BOOL_BITFIELD tls_descriptor_call_multiple_p : 1;
+  bool tls_descriptor_call_multiple_p : 1;
 
   /* If true, the current function has a STATIC_CHAIN is placed on the
      stack below the return address.  */
-  BOOL_BITFIELD static_chain_on_stack : 1;
+  bool static_chain_on_stack : 1;
 
   /* If true, it is safe to not save/restore DRAP register.  */
-  BOOL_BITFIELD no_drap_save_restore : 1;
+  bool no_drap_save_restore : 1;
 
   /* Function type.  */
   ENUM_BITFIELD(function_type) func_type : 2;
@@ -2937,7 +2937,7 @@ struct GTY(()) machine_function {
 
   /* If true, the current function has local indirect jumps, like
      "indirect_jump" or "tablejump".  */
-  BOOL_BITFIELD has_local_indirect_jump : 1;
+  bool has_local_indirect_jump : 1;
 
   /* How to generate function return.  */
   ENUM_BITFIELD(indirect_branch) function_return_type : 3;
@@ -2950,15 +2950,15 @@ struct GTY(()) machine_function {
      if there is scratch register available for indirect sibcall.  In
      64-bit, rax, r10 and r11 are scratch registers which aren't used to
      pass arguments and can be used for indirect sibcall.  */
-  BOOL_BITFIELD arg_reg_available : 1;
+  bool arg_reg_available : 1;
 
   /* If true, we're out-of-lining reg save/restore for regs clobbered
      by 64-bit ms_abi functions calling a sysv_abi function.  */
-  BOOL_BITFIELD call_ms2sysv : 1;
+  bool call_ms2sysv : 1;
 
   /* If true, the incoming 16-byte aligned stack has an offset (of 8) and
      needs padding prior to out-of-line stub save/restore area.  */
-  BOOL_BITFIELD call_ms2sysv_pad_in : 1;
+  bool call_ms2sysv_pad_in : 1;
 
   /* This is the number of extra registers saved by stub (valid range is
      0-6). Each additional register is only saved/restored by the stubs
@@ -2967,32 +2967,32 @@ struct GTY(()) machine_function {
   unsigned int call_ms2sysv_extra_regs:3;
 
   /* Nonzero if the function places outgoing arguments on stack.  */
-  BOOL_BITFIELD outgoing_args_on_stack : 1;
+  bool outgoing_args_on_stack : 1;
 
   /* If true, ENDBR or patchable area is queued at function entrance.  */
   ENUM_BITFIELD(queued_insn_type) insn_queued_at_entrance : 2;
 
   /* If true, the function label has been emitted.  */
-  BOOL_BITFIELD function_label_emitted : 1;
+  bool function_label_emitted : 1;
 
   /* True if the function needs a stack frame.  */
-  BOOL_BITFIELD stack_frame_required : 1;
+  bool stack_frame_required : 1;
 
   /* True if we should act silently, rather than raise an error for
      invalid calls.  */
-  BOOL_BITFIELD silent_p : 1;
+  bool silent_p : 1;
 
   /* True if red zone is used.  */
-  BOOL_BITFIELD red_zone_used : 1;
+  bool red_zone_used : 1;
 
   /* True if inline asm with redzone clobber has been seen.  */
-  BOOL_BITFIELD asm_redzone_clobber_seen : 1;
+  bool asm_redzone_clobber_seen : 1;
 
   /* True if this is a recursive function.  */
-  BOOL_BITFIELD recursive_function : 1;
+  bool recursive_function : 1;
 
   /* True if by_pieces op is currently in use.  */
-  BOOL_BITFIELD by_pieces_in_use : 1;
+  bool by_pieces_in_use : 1;
 
   /* The largest alignment, in bytes, of stack slot actually used.  */
   unsigned int max_used_stack_alignment;
diff --git a/gcc/cp/call.cc b/gcc/cp/call.cc
index a071596085a..62f4992903c 100644
--- a/gcc/cp/call.cc
+++ b/gcc/cp/call.cc
@@ -95,36 +95,36 @@ struct conversion {
   conversion_kind kind;
   /* The rank of this conversion.  */
   conversion_rank rank;
-  BOOL_BITFIELD user_conv_p : 1;
-  BOOL_BITFIELD ellipsis_p : 1;
-  BOOL_BITFIELD this_p : 1;
+  bool user_conv_p : 1;
+  bool ellipsis_p : 1;
+  bool this_p : 1;
   /* True if this conversion would be permitted with a bending of
      language standards, e.g. disregarding pointer qualifiers or
      converting integers to pointers.  */
-  BOOL_BITFIELD bad_p : 1;
+  bool bad_p : 1;
   /* If KIND is ck_ref_bind or ck_base, true to indicate that a
      temporary should be created to hold the result of the
      conversion.  If KIND is ck_ambig or ck_user, true means force
      copy-initialization.  */
-  BOOL_BITFIELD need_temporary_p : 1;
+  bool need_temporary_p : 1;
   /* If KIND is ck_ptr or ck_pmem, true to indicate that a conversion
      from a pointer-to-derived to pointer-to-base is being performed.  */
-  BOOL_BITFIELD base_p : 1;
+  bool base_p : 1;
   /* If KIND is ck_ref_bind, true when either an lvalue reference is
      being bound to an lvalue expression or an rvalue reference is
      being bound to an rvalue expression.  If KIND is ck_rvalue or ck_base,
      true when we are treating an lvalue as an rvalue (12.8p33).  If
      ck_identity, we will be binding a reference directly or decaying to
      a pointer.  */
-  BOOL_BITFIELD rvaluedness_matches_p: 1;
-  BOOL_BITFIELD check_narrowing: 1;
+  bool rvaluedness_matches_p: 1;
+  bool check_narrowing: 1;
   /* Whether check_narrowing should only check TREE_CONSTANTs; used
      in build_converted_constant_expr.  */
-  BOOL_BITFIELD check_narrowing_const_only: 1;
+  bool check_narrowing_const_only: 1;
   /* True if this conversion is taking place in a copy-initialization context
      and we should only consider converting constructors.  Only set in
      ck_base and ck_rvalue.  */
-  BOOL_BITFIELD copy_init_p : 1;
+  bool copy_init_p : 1;
   /* The type of the expression resulting from the conversion.  */
   tree type;
   union {
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 6df271d5e35..dd6f36435f4 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -2107,20 +2107,20 @@ struct GTY(()) saved_scope {
   int x_processing_specialization;
   int x_processing_constraint;
   int suppress_location_wrappers;
-  BOOL_BITFIELD x_processing_postcondition : 1;
-  BOOL_BITFIELD x_processing_explicit_instantiation : 1;
-  BOOL_BITFIELD need_pop_function_context : 1;
-  BOOL_BITFIELD x_processing_omp_trait_property_expr : 1;
+  bool x_processing_postcondition : 1;
+  bool x_processing_explicit_instantiation : 1;
+  bool need_pop_function_context : 1;
+  bool x_processing_omp_trait_property_expr : 1;
 
   /* Nonzero if we are parsing the discarded statement of a constexpr
      if-statement.  */
-  BOOL_BITFIELD discarded_stmt : 1;
+  bool discarded_stmt : 1;
   /* Nonzero if we are parsing or instantiating the compound-statement
      of consteval if statement.  Also set while processing an immediate
      invocation.  */
-  BOOL_BITFIELD consteval_if_p : 1;
+  bool consteval_if_p : 1;
   /* Nonzero if we are parsing the substatement of expansion-statement.  */
-  BOOL_BITFIELD expansion_stmt : 1;
+  bool expansion_stmt : 1;
 
   int unevaluated_operand;
   int inhibit_evaluation_warnings;
@@ -2365,20 +2365,20 @@ struct GTY(()) language_function {
   tree x_vtt_parm;
   tree x_return_value;
 
-  BOOL_BITFIELD returns_value : 1;
-  BOOL_BITFIELD returns_null : 1;
-  BOOL_BITFIELD returns_abnormally : 1;
-  BOOL_BITFIELD infinite_loop: 1;
-  BOOL_BITFIELD x_in_function_try_handler : 1;
-  BOOL_BITFIELD x_in_base_initializer : 1;
+  bool returns_value : 1;
+  bool returns_null : 1;
+  bool returns_abnormally : 1;
+  bool infinite_loop: 1;
+  bool x_in_function_try_handler : 1;
+  bool x_in_base_initializer : 1;
 
   /* True if this function can throw an exception.  */
-  BOOL_BITFIELD can_throw : 1;
+  bool can_throw : 1;
 
-  BOOL_BITFIELD invalid_constexpr : 1;
-  BOOL_BITFIELD throwing_cleanup : 1;
+  bool invalid_constexpr : 1;
+  bool throwing_cleanup : 1;
   /* True if we gave any errors in this function.  */
-  BOOL_BITFIELD erroneous : 1;
+  bool erroneous : 1;
 
   hash_table<named_label_hash> *x_named_labels;
 
@@ -7001,31 +7001,31 @@ struct cp_decl_specifier_seq {
   /* For the __intN declspec, this stores the index into the int_n_* arrays.  
*/
   int int_n_idx;
   /* True iff TYPE_SPEC defines a class or enum.  */
-  BOOL_BITFIELD type_definition_p : 1;
+  bool type_definition_p : 1;
   /* True iff multiple types were (erroneously) specified for this
      decl-specifier-seq.  */
-  BOOL_BITFIELD multiple_types_p : 1;
+  bool multiple_types_p : 1;
   /* True iff multiple storage classes were (erroneously) specified
      for this decl-specifier-seq or a combination of a storage class
      with a typedef specifier.  */
-  BOOL_BITFIELD conflicting_specifiers_p : 1;
+  bool conflicting_specifiers_p : 1;
   /* True iff at least one decl-specifier was found.  */
-  BOOL_BITFIELD any_specifiers_p : 1;
+  bool any_specifiers_p : 1;
   /* True iff at least one type-specifier was found.  */
-  BOOL_BITFIELD any_type_specifiers_p : 1;
+  bool any_type_specifiers_p : 1;
   /* True iff "int" was explicitly provided.  */
-  BOOL_BITFIELD explicit_int_p : 1;
+  bool explicit_int_p : 1;
   /* True iff "__intN" was explicitly provided.  */
-  BOOL_BITFIELD explicit_intN_p : 1;
+  bool explicit_intN_p : 1;
   /* True iff "char" was explicitly provided.  */
-  BOOL_BITFIELD explicit_char_p : 1;
+  bool explicit_char_p : 1;
   /* True iff ds_thread is set for __thread, not thread_local.  */
-  BOOL_BITFIELD gnu_thread_keyword_p : 1;
+  bool gnu_thread_keyword_p : 1;
   /* True iff the type is a decltype.  */
-  BOOL_BITFIELD decltype_p : 1;
+  bool decltype_p : 1;
   /* True iff the alternate "__intN__" form of the __intN type has been
      used.  */
-  BOOL_BITFIELD int_n_alt: 1;
+  bool int_n_alt: 1;
 };
 
 /* The various kinds of declarators.  */
@@ -7069,7 +7069,7 @@ struct cp_declarator {
   ENUM_BITFIELD (cp_declarator_kind) kind : 4;
   /* Whether we parsed an ellipsis (`...') just before the declarator,
      to indicate this is a parameter pack.  */
-  BOOL_BITFIELD parameter_pack_p : 1;
+  bool parameter_pack_p : 1;
   /* If this declarator is parenthesized, this the open-paren.  It is
      UNKNOWN_LOCATION when not parenthesized.  */
   location_t parenthesized;
diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
index 2e541f58b9b..5c54c9d6052 100644
--- a/gcc/cp/name-lookup.h
+++ b/gcc/cp/name-lookup.h
@@ -332,7 +332,7 @@ struct GTY(()) cp_binding_level {
 
   /* True if this scope is an SK_TEMPLATE_SPEC scope.  This field is
       only valid if KIND == SK_TEMPLATE_PARMS.  */
-  BOOL_BITFIELD explicit_spec_p : 1;
+  bool explicit_spec_p : 1;
 
   /* True means make a BLOCK for this level regardless of all else.  */
   unsigned keep : 1;
diff --git a/gcc/ctfc.h b/gcc/ctfc.h
index 0e2315f5b03..13a087ad17f 100644
--- a/gcc/ctfc.h
+++ b/gcc/ctfc.h
@@ -181,9 +181,9 @@ struct GTY ((for_user)) ctf_dtdef
   uint32_t linkage;           /* Used in function types.  0=local, 1=global.  
*/
 
   /* Whether this type was added from a global function.  */
-  BOOL_BITFIELD from_global_func : 1;
+  bool from_global_func : 1;
   /* Enum signedness.  */
-  BOOL_BITFIELD dtd_enum_unsigned : 1;
+  bool dtd_enum_unsigned : 1;
   /* Lots of spare bits.  */
 
   union GTY ((desc ("ctf_dtu_d_union_selector (&%1)")))
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 32aa3adefd7..7d81e36e93b 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -3161,15 +3161,15 @@ typedef struct GTY((chain_circular ("%h.die_sib"), 
for_user)) die_struct {
   unsigned int decl_id;
   enum dwarf_tag die_tag;
   /* Die is used and must not be pruned as unused.  */
-  BOOL_BITFIELD die_perennial_p : 1;
-  BOOL_BITFIELD comdat_type_p : 1; /* DIE has a type signature */
+  bool die_perennial_p : 1;
+  bool comdat_type_p : 1; /* DIE has a type signature */
   /* For an external ref to die_symbol if die_offset contains an extra
      offset to that symbol.  */
-  BOOL_BITFIELD with_offset : 1;
+  bool with_offset : 1;
   /* Whether this DIE was removed from the DIE tree, for example via
      prune_unused_types.  We don't consider those present from the
      DIE lookup routines.  */
-  BOOL_BITFIELD removed : 1;
+  bool removed : 1;
   /* Lots of spare bits.  */
 }
 die_node;
diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h
index 312dbb38252..259b939dce4 100644
--- a/gcc/dwarf2out.h
+++ b/gcc/dwarf2out.h
@@ -161,8 +161,8 @@ struct GTY(()) dw_cfa_location {
   poly_int64 base_offset;
   /* REG is in DWARF_FRAME_REGNUM space, *not* normal REGNO space.  */
   struct cfa_reg reg;
-  BOOL_BITFIELD indirect : 1;  /* 1 if CFA is accessed via a dereference.  */
-  BOOL_BITFIELD in_use : 1;    /* 1 if a saved cfa is stored here.  */
+  bool indirect : 1;  /* 1 if CFA is accessed via a dereference.  */
+  bool in_use : 1;    /* 1 if a saved cfa is stored here.  */
 };
 
 
diff --git a/gcc/gengtype-lex.l b/gcc/gengtype-lex.l
index ea8547be3ef..7d7e81072ac 100644
--- a/gcc/gengtype-lex.l
+++ b/gcc/gengtype-lex.l
@@ -42,7 +42,7 @@ update_lineno (const char *l, size_t len)
 CID    [[:alpha:]_][[:alnum:]_]*
 WS     [[:space:]]+
 HWS    [ \t\r\v\f]*
-IWORD  
short|long|(un)?signed|char|int|HOST_WIDE_INT|uint64_t|int64_t|bool|size_t|BOOL_BITFIELD|CPPCHAR_SIGNED_T|ino_t|dev_t|HARD_REG_SET
+IWORD  
short|long|(un)?signed|char|int|HOST_WIDE_INT|uint64_t|int64_t|bool|size_t|CPPCHAR_SIGNED_T|ino_t|dev_t|HARD_REG_SET
 ITYPE  {IWORD}({WS}{IWORD})*
     /* Include '::' in identifiers to capture C++ scope qualifiers.  */
 ID     {CID}({HWS}::{HWS}{CID})*
diff --git a/gcc/gimple-walk.h b/gcc/gimple-walk.h
index 418605455cd..983494fac4a 100644
--- a/gcc/gimple-walk.h
+++ b/gcc/gimple-walk.h
@@ -57,20 +57,20 @@ struct walk_stmt_info
      statement 'foo (&var)', the flag VAL_ONLY will initially be set
      to true, however, when walking &var, the operand of that
      ADDR_EXPR does not need to be a GIMPLE value.  */
-  BOOL_BITFIELD val_only : 1;
+  bool val_only : 1;
 
   /* True if we are currently walking the LHS of an assignment.  */
-  BOOL_BITFIELD is_lhs : 1;
+  bool is_lhs : 1;
 
   /* Optional.  Set to true by the callback functions if they made any
      changes.  */
-  BOOL_BITFIELD changed : 1;
+  bool changed : 1;
 
   /* True if we're interested in location information.  */
-  BOOL_BITFIELD want_locations : 1;
+  bool want_locations : 1;
 
   /* True if we've removed the statement that was processed.  */
-  BOOL_BITFIELD removed_stmt : 1;
+  bool removed_stmt : 1;
 };
 
 /* Callback for walk_gimple_stmt.  Called for every statement found
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h
index 141364d3a83..39cdf6847e1 100644
--- a/gcc/objc/objc-act.h
+++ b/gcc/objc/objc-act.h
@@ -302,7 +302,7 @@ struct GTY(()) imp_entry {
   tree imp_template;
   tree class_decl;             /* _OBJC[_v2]_CLASS/CATEGORY_<my_name>; */
   tree meta_decl;              /* _OBJC[_v2]_METACLASS_<my_name>; */
-  BOOL_BITFIELD has_cxx_cdtors : 1;
+  bool has_cxx_cdtors : 1;
 };
 
 extern GTY(()) struct imp_entry *imp_list;
diff --git a/gcc/opts.h b/gcc/opts.h
index 1934ce4f650..e637963b673 100644
--- a/gcc/opts.h
+++ b/gcc/opts.h
@@ -95,31 +95,31 @@ struct cl_option
   /* CL_* flags for this option.  */
   unsigned int flags;
   /* Disabled in this configuration.  */
-  BOOL_BITFIELD cl_disabled : 1;
+  bool cl_disabled : 1;
   /* Options marked with CL_SEPARATE take a number of separate
      arguments (1 to 4) that is one more than the number in this
      bit-field.  */
   unsigned int cl_separate_nargs : 2;
   /* Option is an alias when used with separate argument.  */
-  BOOL_BITFIELD cl_separate_alias : 1;
+  bool cl_separate_alias : 1;
   /* Alias to negative form of option.  */
-  BOOL_BITFIELD cl_negative_alias : 1;
+  bool cl_negative_alias : 1;
   /* Option takes no argument in the driver.  */
-  BOOL_BITFIELD cl_no_driver_arg : 1;
+  bool cl_no_driver_arg : 1;
   /* Reject this option in the driver.  */
-  BOOL_BITFIELD cl_reject_driver : 1;
+  bool cl_reject_driver : 1;
   /* Reject no- form.  */
-  BOOL_BITFIELD cl_reject_negative : 1;
+  bool cl_reject_negative : 1;
   /* Missing argument OK (joined).  */
-  BOOL_BITFIELD cl_missing_ok : 1;
+  bool cl_missing_ok : 1;
   /* Argument is an integer >=0.  */
-  BOOL_BITFIELD cl_uinteger : 1;
+  bool cl_uinteger : 1;
   /* Argument is a HOST_WIDE_INT.  */
-  BOOL_BITFIELD cl_host_wide_int : 1;
+  bool cl_host_wide_int : 1;
   /* Argument should be converted to lowercase.  */
-  BOOL_BITFIELD cl_tolower : 1;
+  bool cl_tolower : 1;
   /* Argument is an unsigned integer with an optional byte suffix.  */
-  BOOL_BITFIELD cl_byte_size: 1;
+  bool cl_byte_size: 1;
   /* Offset of field for this option in struct gcc_options, or
      (unsigned short) -1 if none.  */
   unsigned short flag_var_offset;
diff --git a/gcc/rust/backend/rust-tree.h b/gcc/rust/backend/rust-tree.h
index 4c535911070..b995d0afd8a 100644
--- a/gcc/rust/backend/rust-tree.h
+++ b/gcc/rust/backend/rust-tree.h
@@ -2089,16 +2089,16 @@ struct GTY (()) saved_scope
   int x_processing_specialization;
   int x_processing_constraint;
   int suppress_location_wrappers;
-  BOOL_BITFIELD x_processing_explicit_instantiation : 1;
-  BOOL_BITFIELD need_pop_function_context : 1;
+  bool x_processing_explicit_instantiation : 1;
+  bool need_pop_function_context : 1;
 
   /* Nonzero if we are parsing the discarded statement of a constexpr
      if-statement.  */
-  BOOL_BITFIELD discarded_stmt : 1;
+  bool discarded_stmt : 1;
   /* Nonzero if we are parsing or instantiating the compound-statement
      of consteval if statement.  Also set while processing an immediate
      invocation.  */
-  BOOL_BITFIELD consteval_if_p : 1;
+  bool consteval_if_p : 1;
 
   int unevaluated_operand;
   int inhibit_evaluation_warnings;
@@ -2193,7 +2193,7 @@ struct GTY (()) rust_cp_binding_level
 
   /* True if this scope is an SK_TEMPLATE_SPEC scope.  This field is
       only valid if KIND == SK_TEMPLATE_PARMS.  */
-  BOOL_BITFIELD explicit_spec_p : 1;
+  bool explicit_spec_p : 1;
 
   /* true means make a BLOCK for this level regardless of all else.  */
   unsigned keep : 1;
@@ -2292,18 +2292,18 @@ struct GTY (()) language_function
   tree x_vtt_parm;
   tree x_return_value;
 
-  BOOL_BITFIELD returns_value : 1;
-  BOOL_BITFIELD returns_null : 1;
-  BOOL_BITFIELD returns_abnormally : 1;
-  BOOL_BITFIELD infinite_loop : 1;
-  BOOL_BITFIELD x_in_function_try_handler : 1;
-  BOOL_BITFIELD x_in_base_initializer : 1;
+  bool returns_value : 1;
+  bool returns_null : 1;
+  bool returns_abnormally : 1;
+  bool infinite_loop : 1;
+  bool x_in_function_try_handler : 1;
+  bool x_in_base_initializer : 1;
 
   /* True if this function can throw an exception.  */
-  BOOL_BITFIELD can_throw : 1;
+  bool can_throw : 1;
 
-  BOOL_BITFIELD invalid_constexpr : 1;
-  BOOL_BITFIELD throwing_cleanup : 1;
+  bool invalid_constexpr : 1;
+  bool throwing_cleanup : 1;
 
   hash_table<rust_named_label_hash> *x_named_labels;
 
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index a5a0b1ffdb6..4ec0098e5db 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -572,7 +572,7 @@ public:
 
   /* True when this context should be treated as a readonly by
      the analysis.  */
-  BOOL_BITFIELD readonly : 1;
+  bool readonly : 1;
 };
 
 typedef class deps_desc *deps_t;
diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h
index 23ca971b098..07db5503308 100644
--- a/gcc/sel-sched-ir.h
+++ b/gcc/sel-sched-ir.h
@@ -140,17 +140,17 @@ struct _expr
 
   /* True when this expression needs a speculation check to be scheduled.
      This is used during find_used_regs.  */
-  BOOL_BITFIELD needs_spec_check_p : 1;
+  bool needs_spec_check_p : 1;
 
   /* True when the expression was substituted.  Used for statistical
      purposes.  */
-  BOOL_BITFIELD was_substituted : 1;
+  bool was_substituted : 1;
 
   /* True when the expression was renamed.  */
-  BOOL_BITFIELD was_renamed : 1;
+  bool was_renamed : 1;
 
   /* True when expression can't be moved.  */
-  BOOL_BITFIELD cant_move : 1;
+  bool cant_move : 1;
 };
 
 typedef struct _expr expr_def;
@@ -286,16 +286,16 @@ struct _fence
   rtx_insn *sched_next;
 
   /* True if fill_insns processed this fence.  */
-  BOOL_BITFIELD processed_p : 1;
+  bool processed_p : 1;
 
   /* True if fill_insns actually scheduled something on this fence.  */
-  BOOL_BITFIELD scheduled_p : 1;
+  bool scheduled_p : 1;
 
   /* True when the next insn scheduled here would start a cycle.  */
-  BOOL_BITFIELD starts_cycle_p : 1;
+  bool starts_cycle_p : 1;
 
   /* True when the next insn scheduled here would be scheduled after a stall.  
*/
-  BOOL_BITFIELD after_stall_p : 1;
+  bool after_stall_p : 1;
 };
 typedef struct _fence *fence_t;
 
@@ -702,10 +702,10 @@ struct transformed_insns
   enum local_trans_type type;
 
   /* Whether a conflict on the target register happened.  */
-  BOOL_BITFIELD was_target_conflict : 1;
+  bool was_target_conflict : 1;
 
   /* Whether a check was needed.  */
-  BOOL_BITFIELD needs_check : 1;
+  bool needs_check : 1;
 };
 
 /* Indexed by INSN_LUID, the collection of all data associated with
@@ -762,14 +762,14 @@ public:
   ds_t spec_checked_ds;
 
   /* Whether the live set valid or not.  */
-  BOOL_BITFIELD live_valid_p : 1;
+  bool live_valid_p : 1;
   /* Insn is an ASM.  */
-  BOOL_BITFIELD asm_p : 1;
+  bool asm_p : 1;
 
   /* True when an insn is scheduled after we've determined that a stall is
      required.
      This is used when emulating the Haifa scheduler for bundling.  */
-  BOOL_BITFIELD after_stall_p : 1;
+  bool after_stall_p : 1;
 };
 
 typedef class _sel_insn_data sel_insn_data_def;
diff --git a/gcc/sel-sched.cc b/gcc/sel-sched.cc
index ca68068fef0..08ae0ae019a 100644
--- a/gcc/sel-sched.cc
+++ b/gcc/sel-sched.cc
@@ -354,7 +354,7 @@ struct cmpd_local_params
   /* Local params used in move_op_* functions.  */
   /* True when we have removed last insn in the block which was
      also a boundary.  Do not update anything or create bookkeeping copies.  */
-  BOOL_BITFIELD removed_last_insn : 1;
+  bool removed_last_insn : 1;
 };
 
 /* Stores the static parameters for move_op_* calls.  */
diff --git a/gcc/system.h b/gcc/system.h
index 9b717080429..c00995ccb17 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -895,9 +895,6 @@ extern void fancy_abort (const char *, int, const char *)
 # define FALSE false
 #endif /* !__cplusplus */
 
-/* Some compilers do not allow the use of unsigned char in bitfields.  */
-#define BOOL_BITFIELD unsigned int
-
 /* As the last action in this file, we poison the identifiers that
    shouldn't be used.  Note, luckily gcc-3.0's token-based integrated
    preprocessor won't trip on poisoned identifiers that arrive from
-- 
2.54.0

Reply via email to