[binutils-gdb] Remove bfd_boolean definition from bfd

Alan Modra amodra@sourceware.org
Sat Mar 7 21:13:31 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1d95b744c06974f0a00c143c6e0fc979af930908

commit 1d95b744c06974f0a00c143c6e0fc979af930908
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Mar 6 09:07:16 2026 +1030

    Remove bfd_boolean definition from bfd
    
    It has been almost 5 years since I started retiring bfd_boolean.
    Remove it entirely.

Diff:
---
 bfd/bfd-in.h  | 14 --------------
 bfd/bfd-in2.h | 14 --------------
 2 files changed, 28 deletions(-)

diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 8fd45e82c51..3d15132b956 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -76,20 +76,6 @@ extern "C" {
 #define BFD64
 #endif
 
-/* Boolean type used in bfd.
-   General rule: Functions which are bfd_boolean return TRUE on
-   success and FALSE on failure (unless they're a predicate).  */
-
-#ifdef POISON_BFD_BOOLEAN
-# pragma GCC poison bfd_boolean
-#else
-# define bfd_boolean bool
-# undef FALSE
-# undef TRUE
-# define FALSE 0
-# define TRUE 1
-#endif
-
 /* Silence "applying zero offset to null pointer" UBSAN warnings.  */
 #define PTR_ADD(P,A) ((A) != 0 ? (P) + (A) : (P))
 /* Also prevent non-zero offsets from being applied to a null pointer.  */
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 478a8af2bed..bcec515e8be 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -83,20 +83,6 @@ extern "C" {
 #define BFD64
 #endif
 
-/* Boolean type used in bfd.
-   General rule: Functions which are bfd_boolean return TRUE on
-   success and FALSE on failure (unless they're a predicate).  */
-
-#ifdef POISON_BFD_BOOLEAN
-# pragma GCC poison bfd_boolean
-#else
-# define bfd_boolean bool
-# undef FALSE
-# undef TRUE
-# define FALSE 0
-# define TRUE 1
-#endif
-
 /* Silence "applying zero offset to null pointer" UBSAN warnings.  */
 #define PTR_ADD(P,A) ((A) != 0 ? (P) + (A) : (P))
 /* Also prevent non-zero offsets from being applied to a null pointer.  */


More information about the Binutils-cvs mailing list