PR27671, Poisoning TRUE / FALSE poisons Win32 system headers

Message ID
State New
Headers show
  • PR27671, Poisoning TRUE / FALSE poisons Win32 system headers
Related show

Commit Message

H.J. Lu via Binutils March 31, 2021, 12:45 p.m.
Windows system headers make use of FALSE and TRUE.  So poisoning those
tokens wasn't a good idea, and unnecessary too.

Note that ideally we'd include all system headers before any
poisoning, but untangling all that will take quite a bit of work.  (To
get some idea you can undef and poisoned _FEATURES_H in bfd.h which is
a good way to catch any system headers included after bfd.h on linux.)

	PR 27671
	* bfd-in.h: Don't poison FALSE or TRUE.
	* bfd-in2.h: Regenerate.

Alan Modra
Australia Development Lab, IBM


diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 6f72cc4539b..1fbccca4161 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -120,7 +120,7 @@  typedef struct bfd bfd;
    success and FALSE on failure (unless they're a predicate).  */
-# pragma GCC poison bfd_boolean FALSE TRUE
+# pragma GCC poison bfd_boolean
 # define bfd_boolean bool
 # undef FALSE