Remove bfd_boolean definition from bfd
Alan Modra
amodra@gmail.com
Sat Mar 7 03:27:48 GMT 2026
It has been almost 5 years since I started retiring bfd_boolean.
Remove it entirely.
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 7e8d0e4053e..25cce199a13 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. */
--
Alan Modra
More information about the Binutils
mailing list