public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Should binutils require at least C99?
@ 2021-03-29  0:35 Alan Modra
  2021-03-29  1:42 ` Mike Frysinger
  2021-03-30 11:44 ` Nick Clifton
  0 siblings, 2 replies; 14+ messages in thread
From: Alan Modra @ 2021-03-29  0:35 UTC (permalink / raw)
  To: binutils

I feel that it is reasonable nowadays to require a C99 compiler and
library to build binutils.  Trying to support older systems that no
one appears to test is a losing battle anyway.  For example, the s12z
target requires stdbool.h and stdint.h, and many targets include
string.h without concern for HAVE_STRING_H or STRING_WITH_STRINGS.

Does anyone object to formally dropping support for pre-C99?

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Should binutils require at least C99?
  2021-03-29  0:35 Should binutils require at least C99? Alan Modra
@ 2021-03-29  1:42 ` Mike Frysinger
  2021-03-30  0:28   ` Fangrui Song
  2021-03-30 11:44 ` Nick Clifton
  1 sibling, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2021-03-29  1:42 UTC (permalink / raw)
  To: binutils

On 29 Mar 2021 11:05, Alan Modra via Binutils wrote:
> I feel that it is reasonable nowadays to require a C99 compiler and
> library to build binutils.  Trying to support older systems that no
> one appears to test is a losing battle anyway.  For example, the s12z
> target requires stdbool.h and stdint.h, and many targets include
> string.h without concern for HAVE_STRING_H or STRING_WITH_STRINGS.
> 
> Does anyone object to formally dropping support for pre-C99?

dropping pre-C99 sounds great to me
-mike

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Should binutils require at least C99?
  2021-03-29  1:42 ` Mike Frysinger
@ 2021-03-30  0:28   ` Fangrui Song
  0 siblings, 0 replies; 14+ messages in thread
From: Fangrui Song @ 2021-03-30  0:28 UTC (permalink / raw)
  To: binutils

On 2021-03-28, Mike Frysinger via Binutils wrote:
>On 29 Mar 2021 11:05, Alan Modra via Binutils wrote:
>> I feel that it is reasonable nowadays to require a C99 compiler and
>> library to build binutils.  Trying to support older systems that no
>> one appears to test is a losing battle anyway.  For example, the s12z
>> target requires stdbool.h and stdint.h, and many targets include
>> string.h without concern for HAVE_STRING_H or STRING_WITH_STRINGS.
>>
>> Does anyone object to formally dropping support for pre-C99?
>
>dropping pre-C99 sounds great to me
>-mike

Strong +1

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Should binutils require at least C99?
  2021-03-29  0:35 Should binutils require at least C99? Alan Modra
  2021-03-29  1:42 ` Mike Frysinger
@ 2021-03-30 11:44 ` Nick Clifton
  2021-03-31  0:20   ` Include string.h in bfd.h and delete LITMEMCPY, LITSTRCPY Alan Modra
  1 sibling, 1 reply; 14+ messages in thread
From: Nick Clifton @ 2021-03-30 11:44 UTC (permalink / raw)
  To: Alan Modra, binutils

Hi Alan,

> I feel that it is reasonable nowadays to require a C99 compiler and
> library to build binutils.  Trying to support older systems that no
> one appears to test is a losing battle anyway.  For example, the s12z
> target requires stdbool.h and stdint.h, and many targets include
> string.h without concern for HAVE_STRING_H or STRING_WITH_STRINGS.
> 
> Does anyone object to formally dropping support for pre-C99?

Nope - I am firmly in favour of the idea.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Include string.h in bfd.h and delete LITMEMCPY, LITSTRCPY
  2021-03-30 11:44 ` Nick Clifton
@ 2021-03-31  0:20   ` Alan Modra
  2021-03-31  0:23     ` Remove bfd_stdint.h Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:20 UTC (permalink / raw)
  To: binutils

This fixes the issue that startswith depends on strncpy being
declared, and not all projects using bfd.h include string.h before
bfd.h.  I've also deleted some macros that don't find much use
anywhere.

bfd/
	* bfd-in.h: Include string.h.
	(LITMEMCPY, LITSTRCPY): Delete.
	* bfd-in2.h: Regenerate.
binutils/
	* prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.

diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index fda9fe0198e..f90f7180911 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -37,6 +37,7 @@ extern "C" {
 #include "bfd_stdint.h"
 #include "diagnostics.h"
 #include <stdarg.h>
+#include <string.h>
 #include <sys/stat.h>
 
 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
@@ -57,13 +58,6 @@ extern "C" {
    is error prone, so using this macro is safer.  */
 #define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
 
-  /* strcpy() can have a similar problem, but since we know we are
-     copying a constant string, we can use memcpy which will be faster
-     since there is no need to check for a NUL byte inside STR.  We
-     can also save time if we do not need to copy the terminating NUL.  */
-#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
-#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
-
 #define BFD_SUPPORTS_PLUGINS @supports_plugins@
 
 /* The word size used by BFD on the host.  This may be 64 with a 32
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index 614d7f918f5..521dfa00807 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -752,7 +752,7 @@ pr_function_type (void *p, int argcount, bfd_boolean varargs)
   /* Now the return type is on the top of the stack.  */
 
   s = (char *) xmalloc (len);
-  LITSTRCPY (s, "(|) (");
+  strcpy (s, "(|) (");
 
   if (argcount < 0)
     strcat (s, "/* unknown */");

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Remove bfd_stdint.h
  2021-03-31  0:20   ` Include string.h in bfd.h and delete LITMEMCPY, LITSTRCPY Alan Modra
@ 2021-03-31  0:23     ` Alan Modra
  2021-03-31  0:24       ` Use stdbool.h Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:23 UTC (permalink / raw)
  To: binutils

If we require C99 for binutils then stdint.h is available.

bfd/
	* .gitignore: Delete bfd_stdint.h entry.
	* Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h.
	(BUILD_HFILES, LOCAL_H_DEPS): Likewise.
	* bfd-in.h: Include stdint.h in place of bfd_stdint.h.
	* configure.ac: Don't invoke GCC_HEADER_STDINT.
	* configure.com: Don't create bfd_stdint.h.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* bfd-in2.h: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
binutils/
	* coffdump.c: Include stdint.h in place of bfd_stdint.h.
	* dwarf.c: Likewise.
gas/
	* config/tc-aarch64.c: Include stdint.h in place of bfd_stdint.h.
	* config/tc-crx.c: Likewise.
	* config/tc-nds32.h: Likewise.
include/
	* cgen/basic-modes.h: Include stdint.h in place of bfd_stdint.h.
	* elf/nfp.h: Likewise.
	* opcode/aarch64.h: Likewise.
	* opcode/cgen.h: Likewise.
	* opcode/nfp.h: Likewise.
	* opcode/ppc.h: Likewise.
ld/
	* elf-hints-local.h: Include stdint.h in place of bfd_stdint.h.
	* emultempl/nds32elf.em: Likewise.
	* testsuite/ld-elf/mbind2b.c: Likewise.
	* testsuite/ld-elf/pr18718.c: Likewise.
	* testsuite/ld-elf/pr18720a.c: Likewise.
	* testsuite/ld-elf/pr25749-1.c: Likewise.
	* testsuite/ld-elf/pr25749-1a.c: Likewise.
	* testsuite/ld-elf/pr25749-1b.c: Likewise.
	* testsuite/ld-elf/pr25749-1c.c: Likewise.
	* testsuite/ld-elf/pr25749-1d.c: Likewise.
	* testsuite/ld-elf/pr25749-2.c: Likewise.
	* testsuite/ld-elf/pr25754-1a.c: Likewise.
	* testsuite/ld-elf/pr25754-2a.c: Likewise.
	* testsuite/ld-elf/pr25754-3a.c: Likewise.
	* testsuite/ld-elf/pr25754-4a.c: Likewise.
	* testsuite/ld-elf/pr25754-5a.c: Likewise.
	* testsuite/ld-elf/pr25754-6a.c: Likewise.
opcodes/
	* aarch64-dis.c: Include stdint.h in place of bfd_stdint.h.
	* aarch64-dis.h: Likewise.
	* aarch64-opc.c: Likewise.
	* avr-dis.c: Likewise.
	* csky-dis.c: Likewise.
	* nds32-asm.c: Likewise.
	* nds32-dis.c: Likewise.
	* nfp-dis.c: Likewise.
	* riscv-dis.c: Likewise.
	* s12z-dis.c: Likewise.
	* wasm32-dis.c: Likewise.

diff --git a/bfd/.gitignore b/bfd/.gitignore
index 33161338b05..0a5530d128a 100644
--- a/bfd/.gitignore
+++ b/bfd/.gitignore
@@ -1,6 +1,5 @@
 /bfd-in3.h
 /bfd.h
-/bfd_stdint.h
 /bfdver.h
 /elf32-ia64.c
 /elf32-target.h
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 3f143dc227b..ed2f701805d 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@
 bfdincludedir = @bfdincludedir@
 bfdlib_LTLIBRARIES = libbfd.la
 bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
-		     bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
+		     $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
 else !INSTALL_LIBBFD
 # Empty these so that the respective installation directories will not be created.
 bfdlibdir =
@@ -700,7 +700,7 @@ SOURCE_HFILES = \
 
 ## ... and .h files which are in the build tree, minus config.h and bfd.h
 BUILD_HFILES = \
-	bfdver.h elf32-target.h elf64-target.h targmatch.h bfd_stdint.h
+	bfdver.h elf32-target.h elf64-target.h targmatch.h
 
 # Ensure they are built early:
 BUILT_SOURCES = $(BUILD_HFILES)
@@ -863,7 +863,7 @@ pex64igen.c: peXXigen.c
 	$(SED) -e s/XX/pex64/g < $< >> $@
 
 BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/diagnostics.h
-LOCAL_H_DEPS= libbfd.h sysdep.h config.h bfd_stdint.h
+LOCAL_H_DEPS= libbfd.h sysdep.h config.h
 $(BFD32_LIBS) \
  $(BFD64_LIBS) \
  $(ALL_MACHINES) \
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index f90f7180911..46a0fcd4417 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -34,7 +34,7 @@ extern "C" {
 
 #include "ansidecl.h"
 #include "symcat.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "diagnostics.h"
 #include <stdarg.h>
 #include <string.h>
diff --git a/bfd/configure.ac b/bfd/configure.ac
index e9a07b8ff05..cb43ebcf6de 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -246,7 +246,6 @@ BFD_CC_FOR_BUILD
 AC_CHECK_HEADERS(alloca.h fcntl.h limits.h stddef.h stdlib.h string.h \
 		 strings.h sys/file.h sys/resource.h sys/stat.h sys/time.h \
 		 time.h unistd.h wchar.h wctype.h)
-GCC_HEADER_STDINT(bfd_stdint.h)
 AC_HEADER_TIME
 AC_HEADER_DIRENT
 
diff --git a/bfd/configure.com b/bfd/configure.com
index cb93a65331d..33012fbc1ef 100644
--- a/bfd/configure.com
+++ b/bfd/configure.com
@@ -239,13 +239,6 @@ $DECK
 $  EOD
 $!
 $!
-$! create bfd_stdint.h
-$!
-$ write sys$output "Generate `bfd_stdint.h'"
-$ create []bfd_stdint.h
-#include <inttypes.h>
-$!
-$!
 $! create targmatch.h
 $!
 $ write sys$output "Generate `targmatch.h'"
diff --git a/binutils/coffdump.c b/binutils/coffdump.c
index 5ce39859d56..dd40221b45d 100644
--- a/binutils/coffdump.c
+++ b/binutils/coffdump.c
@@ -26,7 +26,7 @@
 
 #include "sysdep.h"
 #include "bfd.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "libiberty.h"
 #include "bucomm.h"
 
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 23ee70510f7..476e3919d1f 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -21,7 +21,7 @@
 #include "sysdep.h"
 #include "libiberty.h"
 #include "bfd.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "bucomm.h"
 #include "elfcomm.h"
 #include "elf/common.h"
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 6f782d057f8..9dd1defd09b 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -22,7 +22,7 @@
 #include "as.h"
 #include <limits.h>
 #include <stdarg.h>
-#include "bfd_stdint.h"
+#include <stdint.h>
 #define	 NO_RELOC 0
 #include "safe-ctype.h"
 #include "subsegs.h"
diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c
index 52eebcb7e94..a82acb5fa21 100644
--- a/gas/config/tc-crx.c
+++ b/gas/config/tc-crx.c
@@ -23,7 +23,7 @@
    MA 02110-1301, USA.  */
 
 #include "as.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "safe-ctype.h"
 #include "dwarf2dbg.h"
 #include "opcode/crx.h"
diff --git a/gas/config/tc-nds32.h b/gas/config/tc-nds32.h
index 7dbeb591b58..a74390a57e7 100644
--- a/gas/config/tc-nds32.h
+++ b/gas/config/tc-nds32.h
@@ -22,7 +22,7 @@
 #ifndef TC_NDS32
 #define TC_NDS32
 
-#include "bfd_stdint.h"
+#include <stdint.h>
 
 /* Enum mapping symbol.  */
 enum mstate
diff --git a/gas/config/tc-pru.c b/gas/config/tc-pru.c
index 5c41fa08f2a..139e28ecbae 100644
--- a/gas/config/tc-pru.c
+++ b/gas/config/tc-pru.c
@@ -21,7 +21,7 @@
    02110-1301, USA.  */
 
 #include "as.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "opcode/pru.h"
 #include "elf/pru.h"
 #include "tc-pru.h"
diff --git a/include/cgen/basic-modes.h b/include/cgen/basic-modes.h
index 3a476d4a1df..2d76594524c 100644
--- a/include/cgen/basic-modes.h
+++ b/include/cgen/basic-modes.h
@@ -24,12 +24,10 @@
 
 /* This file doesn't contain all modes,
    just the basic/portable ones.
-   It also provides access to stdint.h (*1) so the includer doesn't have
-   to deal with the portability issues.
-   (*1): To the extent that bfd_stdint.h does for now.  */
+   It also provides access to stdint.h so the includer doesn't have
+   to deal with the portability issues.  */
 
-/* IWBN to avoid unnecessary dependencies on bfd-anything.  */
-#include "bfd_stdint.h"
+#include <stdint.h>
 
 typedef int8_t QI;
 typedef uint8_t UQI;
diff --git a/include/elf/nfp.h b/include/elf/nfp.h
index ae5f4f8e064..ca609c19967 100644
--- a/include/elf/nfp.h
+++ b/include/elf/nfp.h
@@ -24,7 +24,7 @@
 #include "bfd.h"
 #include "elf/common.h"
 #include "elf/reloc-macros.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 
 #ifdef __cplusplus
 extern "C"
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index e48bea6db6e..7a97fa837f6 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -23,7 +23,7 @@
 #define OPCODE_AARCH64_H
 
 #include "bfd.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include <assert.h>
 #include <stdlib.h>
 
diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h
index 0e68c85dfec..8b7d2a4b547 100644
--- a/include/opcode/cgen.h
+++ b/include/opcode/cgen.h
@@ -24,8 +24,7 @@
 #include "symcat.h"
 #include "cgen/bitset.h"
 
-/* ??? IWBN to replace bfd in the name.  */
-#include "bfd_stdint.h"
+#include <stdint.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/include/opcode/nfp.h b/include/opcode/nfp.h
index 7f322a100ed..88c7d08f483 100644
--- a/include/opcode/nfp.h
+++ b/include/opcode/nfp.h
@@ -23,7 +23,7 @@
 #define _NFP_H_
 
 #include "bfd.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "elf/nfp.h"
 
 #ifdef __cplusplus
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index a5ee560aa17..1c5f383e209 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -22,7 +22,7 @@
 #ifndef PPC_H
 #define PPC_H
 
-#include "bfd_stdint.h"
+#include <stdint.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/ld/elf-hints-local.h b/ld/elf-hints-local.h
index 02dd019d491..9cdfa2f2981 100644
--- a/ld/elf-hints-local.h
+++ b/ld/elf-hints-local.h
@@ -25,7 +25,7 @@
 #ifndef	_ELF_HINTS_H_
 #define	_ELF_HINTS_H_
 
-#include "bfd_stdint.h"
+#include <stdint.h>
 
 /* Hints file produced by ldconfig.  */
 struct elfhints_hdr
diff --git a/ld/emultempl/nds32elf.em b/ld/emultempl/nds32elf.em
index 0ebdec95655..b00b7746cca 100644
--- a/ld/emultempl/nds32elf.em
+++ b/ld/emultempl/nds32elf.em
@@ -24,7 +24,7 @@ fragment <<EOF
 
 #include "elf-bfd.h"
 #include "elf/nds32.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "elf32-nds32.h"
 
 static int relax_fp_as_gp = 1;		/* --mrelax-omit-fp  */
diff --git a/ld/testsuite/ld-elf/mbind2b.c b/ld/testsuite/ld-elf/mbind2b.c
index 10922a1f046..7e1367d6b0f 100644
--- a/ld/testsuite/ld-elf/mbind2b.c
+++ b/ld/testsuite/ld-elf/mbind2b.c
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern char bss_in_mbind0;
 extern char data_in_mbind3;
diff --git a/ld/testsuite/ld-elf/pr18718.c b/ld/testsuite/ld-elf/pr18718.c
index 426f46a42cb..bbf8e037c13 100644
--- a/ld/testsuite/ld-elf/pr18718.c
+++ b/ld/testsuite/ld-elf/pr18718.c
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern void foo (void);
 extern void check_ptr_eq (void (*) (void), void (*) (void));
diff --git a/ld/testsuite/ld-elf/pr18720a.c b/ld/testsuite/ld-elf/pr18720a.c
index b4a33696c6d..fec4cf902ff 100644
--- a/ld/testsuite/ld-elf/pr18720a.c
+++ b/ld/testsuite/ld-elf/pr18720a.c
@@ -1,4 +1,4 @@
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern void bar (void);
 extern void foo (void);
diff --git a/ld/testsuite/ld-elf/pr25749-1.c b/ld/testsuite/ld-elf/pr25749-1.c
index 12d0574a013..249d80fd169 100644
--- a/ld/testsuite/ld-elf/pr25749-1.c
+++ b/ld/testsuite/ld-elf/pr25749-1.c
@@ -1,12 +1,12 @@
 #include <stdio.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern intptr_t size (void);
 
 int
 main ()
 {
-  if (size () == 303 /* size of this file */)
+  if (size () == 299 /* size of this file */)
     printf ("PASS\n");
 #ifdef __GLIBC_PREREQ
 # if !__GLIBC_PREREQ (2, 28)
diff --git a/ld/testsuite/ld-elf/pr25749-1a.c b/ld/testsuite/ld-elf/pr25749-1a.c
index 775623b8c9c..657d29da5b1 100644
--- a/ld/testsuite/ld-elf/pr25749-1a.c
+++ b/ld/testsuite/ld-elf/pr25749-1a.c
@@ -1,4 +1,4 @@
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern void *_binary_pr25749_1_c_start;
 extern void *_binary_pr25749_1_c_end;
diff --git a/ld/testsuite/ld-elf/pr25749-1b.c b/ld/testsuite/ld-elf/pr25749-1b.c
index f02a4087004..328b47cf51f 100644
--- a/ld/testsuite/ld-elf/pr25749-1b.c
+++ b/ld/testsuite/ld-elf/pr25749-1b.c
@@ -1,4 +1,4 @@
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern void *_binary_pr25749_1_c_size;
 
diff --git a/ld/testsuite/ld-elf/pr25749-1c.c b/ld/testsuite/ld-elf/pr25749-1c.c
index f2847d7f623..3203624fb41 100644
--- a/ld/testsuite/ld-elf/pr25749-1c.c
+++ b/ld/testsuite/ld-elf/pr25749-1c.c
@@ -1,4 +1,4 @@
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern void *_binary_pr25749_1_c_size __attribute__ ((visibility("hidden")));
 
diff --git a/ld/testsuite/ld-elf/pr25749-1d.c b/ld/testsuite/ld-elf/pr25749-1d.c
index 33b869deb5d..361d74c6c88 100644
--- a/ld/testsuite/ld-elf/pr25749-1d.c
+++ b/ld/testsuite/ld-elf/pr25749-1d.c
@@ -1,4 +1,4 @@
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern void *_binary_pr25749_1_c_start;
 extern void *_binary_pr25749_1_c_end;
diff --git a/ld/testsuite/ld-elf/pr25749-2.c b/ld/testsuite/ld-elf/pr25749-2.c
index 3ef6f0c6a7b..9a1b2b802f5 100644
--- a/ld/testsuite/ld-elf/pr25749-2.c
+++ b/ld/testsuite/ld-elf/pr25749-2.c
@@ -1,12 +1,12 @@
 #include <stdio.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern intptr_t size;
 
 int
 main ()
 {
-  if (size == 293 /* size of this file */)
+  if (size == 289 /* size of this file */)
     printf ("PASS\n");
 #ifdef __GLIBC_PREREQ
 # if !__GLIBC_PREREQ (2, 28)
diff --git a/ld/testsuite/ld-elf/pr25754-1a.c b/ld/testsuite/ld-elf/pr25754-1a.c
index 2b048ec09bb..bc65c174d05 100644
--- a/ld/testsuite/ld-elf/pr25754-1a.c
+++ b/ld/testsuite/ld-elf/pr25754-1a.c
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern uintptr_t bar;
 
diff --git a/ld/testsuite/ld-elf/pr25754-2a.c b/ld/testsuite/ld-elf/pr25754-2a.c
index 7c9f58116e7..7c7fb28f4d5 100644
--- a/ld/testsuite/ld-elf/pr25754-2a.c
+++ b/ld/testsuite/ld-elf/pr25754-2a.c
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern uintptr_t bar;
 
diff --git a/ld/testsuite/ld-elf/pr25754-3a.c b/ld/testsuite/ld-elf/pr25754-3a.c
index 2d4f02abe5a..e57dfe2cc2d 100644
--- a/ld/testsuite/ld-elf/pr25754-3a.c
+++ b/ld/testsuite/ld-elf/pr25754-3a.c
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern uintptr_t bar;
 
diff --git a/ld/testsuite/ld-elf/pr25754-4a.c b/ld/testsuite/ld-elf/pr25754-4a.c
index e2c2f8d54d0..1148ecae728 100644
--- a/ld/testsuite/ld-elf/pr25754-4a.c
+++ b/ld/testsuite/ld-elf/pr25754-4a.c
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern uintptr_t *get_bar (void);
 
diff --git a/ld/testsuite/ld-elf/pr25754-5a.c b/ld/testsuite/ld-elf/pr25754-5a.c
index cb791dd56f7..8ddfccd5bd0 100644
--- a/ld/testsuite/ld-elf/pr25754-5a.c
+++ b/ld/testsuite/ld-elf/pr25754-5a.c
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern uintptr_t *get_bar (void);
 
diff --git a/ld/testsuite/ld-elf/pr25754-6a.c b/ld/testsuite/ld-elf/pr25754-6a.c
index 59633a3b4dd..b8e7ade4c6d 100644
--- a/ld/testsuite/ld-elf/pr25754-6a.c
+++ b/ld/testsuite/ld-elf/pr25754-6a.c
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <bfd_stdint.h>
+#include <stdint.h>
 
 extern uintptr_t *get_bar (void);
 
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
index 349d7ea7ec0..1472f7da155 100644
--- a/opcodes/aarch64-dis.c
+++ b/opcodes/aarch64-dis.c
@@ -19,7 +19,7 @@
    see <http://www.gnu.org/licenses/>.  */
 
 #include "sysdep.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "disassemble.h"
 #include "libiberty.h"
 #include "opintl.h"
diff --git a/opcodes/aarch64-dis.h b/opcodes/aarch64-dis.h
index 5bb546a6636..97045114a2e 100644
--- a/opcodes/aarch64-dis.h
+++ b/opcodes/aarch64-dis.h
@@ -20,7 +20,7 @@
 
 #ifndef OPCODES_AARCH64_DIS_H
 #define OPCODES_AARCH64_DIS_H
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "aarch64-opc.h"
 
 /* Lookup opcode WORD in the opcode table.
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index c4397bc4301..1f04aad5f98 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -22,7 +22,7 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include <stdarg.h>
 #include <inttypes.h>
 
diff --git a/opcodes/avr-dis.c b/opcodes/avr-dis.c
index b58958fae7a..06f8a0c663b 100644
--- a/opcodes/avr-dis.c
+++ b/opcodes/avr-dis.c
@@ -25,7 +25,7 @@
 #include "disassemble.h"
 #include "opintl.h"
 #include "libiberty.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 
 struct avr_opcodes_s
 {
diff --git a/opcodes/csky-dis.c b/opcodes/csky-dis.c
index 399c180a8dd..45af88c8928 100644
--- a/opcodes/csky-dis.c
+++ b/opcodes/csky-dis.c
@@ -22,7 +22,7 @@
 #include "sysdep.h"
 #include "config.h"
 #include <stdio.h>
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include <elf/csky.h>
 #include "disassemble.h"
 #include "elf-bfd.h"
diff --git a/opcodes/nds32-asm.c b/opcodes/nds32-asm.c
index d2f41f5c00b..f641c60f68c 100644
--- a/opcodes/nds32-asm.c
+++ b/opcodes/nds32-asm.c
@@ -22,7 +22,7 @@
 
 #include "sysdep.h"
 
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include <assert.h>
 
 #include "safe-ctype.h"
diff --git a/opcodes/nds32-dis.c b/opcodes/nds32-dis.c
index 96c3f3829c1..25bb475d1ab 100644
--- a/opcodes/nds32-dis.c
+++ b/opcodes/nds32-dis.c
@@ -27,7 +27,7 @@
 #include "symcat.h"
 #include "libiberty.h"
 #include "opintl.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include "hashtab.h"
 #include "nds32-asm.h"
 #include "opcode/nds32.h"
diff --git a/opcodes/nfp-dis.c b/opcodes/nfp-dis.c
index 4f79581d60b..39ded6694ab 100644
--- a/opcodes/nfp-dis.c
+++ b/opcodes/nfp-dis.c
@@ -33,7 +33,7 @@
 #include "opintl.h"
 #include "elf-bfd.h"
 #include "bfd.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 
 #define _NFP_ERR_STOP -1
 #define _NFP_ERR_CONT -8
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
index cc80d909457..7ef4d4df184 100644
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -29,7 +29,7 @@
 #include "elf/riscv.h"
 #include "cpu-riscv.h"
 
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include <ctype.h>
 
 static enum riscv_spec_class default_priv_spec = PRIV_SPEC_CLASS_NONE;
diff --git a/opcodes/s12z-dis.c b/opcodes/s12z-dis.c
index 66452977595..4616bc82711 100644
--- a/opcodes/s12z-dis.c
+++ b/opcodes/s12z-dis.c
@@ -20,7 +20,7 @@
 
 #include "sysdep.h"
 #include <stdio.h>
-#include "bfd_stdint.h"
+#include <stdint.h>
 #include <stdbool.h>
 #include <assert.h>
 
diff --git a/opcodes/wasm32-dis.c b/opcodes/wasm32-dis.c
index 69266610ad3..f3fde3286e7 100644
--- a/opcodes/wasm32-dis.c
+++ b/opcodes/wasm32-dis.c
@@ -27,7 +27,7 @@
 #include "elf-bfd.h"
 #include "elf/internal.h"
 #include "elf/wasm32.h"
-#include "bfd_stdint.h"
+#include <stdint.h>
 
 #ifdef HAVE_LIMITS_H
 #include <limits.h>

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Use stdbool.h
  2021-03-31  0:23     ` Remove bfd_stdint.h Alan Modra
@ 2021-03-31  0:24       ` Alan Modra
  2021-03-31  0:26         ` Use bool in include Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:24 UTC (permalink / raw)
  To: binutils

With this in place we can retire bfd_boolean one project at a time.

bfd/
	* bfd-in.h: Include stdbool.h.
	(bfd_boolean): Define as bool
	* bfd-in2.h: Regenerate.

diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 46a0fcd4417..88f1e867a64 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -35,6 +35,7 @@ extern "C" {
 #include "ansidecl.h"
 #include "symcat.h"
 #include <stdint.h>
+#include <stdbool.h>
 #include "diagnostics.h"
 #include <stdarg.h>
 #include <string.h>
@@ -114,20 +115,19 @@ typedef BFD_HOSTPTR_T bfd_hostptr_t;
 /* Forward declaration.  */
 typedef struct bfd bfd;
 
-/* Boolean type used in bfd.  Too many systems define their own
-   versions of "boolean" for us to safely typedef a "boolean" of
-   our own.  Using an enum for "bfd_boolean" has its own set of
-   problems, with strange looking casts required to avoid warnings
-   on some older compilers.  Thus we just use an int.
-
+/* 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).  */
 
-typedef int bfd_boolean;
-#undef FALSE
-#undef TRUE
-#define FALSE 0
-#define TRUE 1
+#ifdef POISON_BFD_BOOLEAN
+# pragma GCC poison bfd_boolean FALSE TRUE
+#else
+# define bfd_boolean bool
+# undef FALSE
+# undef TRUE
+# define FALSE 0
+# define TRUE 1
+#endif
 
 #ifdef BFD64
 
 
-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Use bool in include
  2021-03-31  0:24       ` Use stdbool.h Alan Modra
@ 2021-03-31  0:26         ` Alan Modra
  2021-03-31  0:28           ` Use bool in gprof Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:26 UTC (permalink / raw)
  To: binutils

	* bfdlink.h: Replace bfd_boolean with bool throughout.
	* coff/ecoff.h: Likewise.
	* coff/xcoff.h: Likewise.
	* dis-asm.h: Likewise.
	* elf/mmix.h: Likewise.
	* elf/xtensa.h: Likewise.
	* opcode/aarch64.h: Likewise, and FALSE with false, TRUE with true.
	* opcode/arc.h: Likewise.
	* opcode/mips.h: Likewise.
	* opcode/tic6x-opcode-table.h: Likewise.
	* opcode/tic6x.h: Likewise.

diff --git a/include/bfdlink.h b/include/bfdlink.h
index 0871a0c025a..7f1b12dbf37 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -216,16 +216,15 @@ struct bfd_link_hash_table
    follows bfd_link_hash_indirect and bfd_link_hash_warning links to
    the real symbol.  */
 extern struct bfd_link_hash_entry *bfd_link_hash_lookup
-  (struct bfd_link_hash_table *, const char *, bfd_boolean create,
-   bfd_boolean copy, bfd_boolean follow);
+  (struct bfd_link_hash_table *, const char *, bool create,
+   bool copy, bool follow);
 
 /* Look up an entry in the main linker hash table if the symbol might
    be wrapped.  This should only be used for references to an
    undefined symbol, not for definitions of a symbol.  */
 
 extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup
-  (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
-   bfd_boolean, bfd_boolean);
+  (bfd *, struct bfd_link_info *, const char *, bool, bool, bool);
 
 /* If H is a wrapped symbol, ie. the symbol name starts with "__wrap_"
    and the remainder is found in wrap_hash, return the real symbol.  */
@@ -236,7 +235,7 @@ extern struct bfd_link_hash_entry *unwrap_hash_lookup
 /* Traverse a link hash table.  */
 extern void bfd_link_hash_traverse
   (struct bfd_link_hash_table *,
-    bfd_boolean (*) (struct bfd_link_hash_entry *, void *),
+    bool (*) (struct bfd_link_hash_entry *, void *),
     void *);
 
 /* Add an entry to the undefs list.  */
@@ -248,12 +247,12 @@ extern void bfd_link_repair_undef_list
   (struct bfd_link_hash_table *table);
 
 /* Read symbols and cache symbol pointer array in outsymbols.  */
-extern bfd_boolean bfd_generic_link_read_symbols (bfd *);
+extern bool bfd_generic_link_read_symbols (bfd *);
 
 /* Check the relocs in the BFD.  Called after all the input
    files have been loaded, and garbage collection has tagged
    any unneeded sections.  */
-extern bfd_boolean bfd_link_check_relocs (bfd *,struct bfd_link_info *);
+extern bool bfd_link_check_relocs (bfd *,struct bfd_link_info *);
 
 struct bfd_sym_chain
 {
@@ -292,7 +291,7 @@ struct flag_info_list
 {
   flag_type with;
   const char *name;
-  bfd_boolean valid;
+  bool valid;
   struct flag_info_list *next;
 };
 
@@ -302,7 +301,7 @@ struct flag_info
   flagword only_with_flags;
   flagword not_with_flags;
   struct flag_info_list *flag_list;
-  bfd_boolean flags_initialized;
+  bool flags_initialized;
 };
 
 struct bfd_elf_dynamic_list;
@@ -702,7 +701,7 @@ struct bfd_link_callbacks
      BFD from which symbols should in fact be added in place of the
      original BFD's symbols.  Returns TRUE if the object should be
      added, FALSE if it should be skipped.  */
-  bfd_boolean (*add_archive_element)
+  bool (*add_archive_element)
     (struct bfd_link_info *, bfd *abfd, const char *name, bfd **subsbfd);
   /* A function which is called when a symbol is found with multiple
      definitions.  H is the symbol which is defined multiple times.
@@ -736,7 +735,7 @@ struct bfd_link_callbacks
      relocatable file.  NAME is the name of the symbol found.  ABFD,
      SECTION and VALUE are the value of the symbol.  */
   void (*constructor)
-    (struct bfd_link_info *, bfd_boolean constructor, const char *name,
+    (struct bfd_link_info *, bool constructor, const char *name,
      bfd *abfd, asection *sec, bfd_vma value);
   /* A function which is called to issue a linker warning.  For
      example, this is called when there is a reference to a warning
@@ -755,7 +754,7 @@ struct bfd_link_callbacks
      a fatal error or not. In some cases SECTION may be NULL.  */
   void (*undefined_symbol)
     (struct bfd_link_info *, const char *name, bfd *abfd,
-     asection *section, bfd_vma address, bfd_boolean is_fatal);
+     asection *section, bfd_vma address, bool is_fatal);
   /* A function which is called when a reloc overflow occurs. ENTRY is
      the link hash table entry for the symbol the reloc is against.
      NAME is the name of the local symbol or section the reloc is
@@ -791,7 +790,7 @@ struct bfd_link_callbacks
      if applicable.  ABFD, SECTION and ADDRESS are the (new) value of
      the symbol.  If SECTION is bfd_und_section, this is a reference.
      FLAGS are the symbol BSF_* flags.  */
-  bfd_boolean (*notice)
+  bool (*notice)
     (struct bfd_link_info *, struct bfd_link_hash_entry *h,
      struct bfd_link_hash_entry *inh,
      bfd *abfd, asection *section, bfd_vma address, flagword flags);
@@ -807,10 +806,10 @@ struct bfd_link_callbacks
   /* This callback provides a chance for users of the BFD library to
      override its decision about whether to place two adjacent sections
      into the same segment.  */
-  bfd_boolean (*override_segment_assignment)
+  bool (*override_segment_assignment)
     (struct bfd_link_info *, bfd * abfd,
      asection * current_section, asection * previous_section,
-     bfd_boolean new_segment);
+     bool new_segment);
   /* This callback provides a chance for callers of the BFD to examine the
      ELF (dynamic) string table once it is complete.  */
   void (*examine_strtab)
@@ -930,9 +929,9 @@ extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *);
 
 struct bfd_section_already_linked;
 
-extern bfd_boolean bfd_section_already_linked_table_init (void);
+extern bool bfd_section_already_linked_table_init (void);
 extern void bfd_section_already_linked_table_free (void);
-extern bfd_boolean _bfd_handle_already_linked
+extern bool _bfd_handle_already_linked
   (struct bfd_section *, struct bfd_section_already_linked *,
    struct bfd_link_info *);
 
diff --git a/include/coff/ecoff.h b/include/coff/ecoff.h
index 2002c771e9d..2267b779c2c 100644
--- a/include/coff/ecoff.h
+++ b/include/coff/ecoff.h
@@ -407,7 +407,7 @@ struct ecoff_debug_swap
   /* Function to read symbol data and set up pointers in
      ecoff_debug_info structure.  The section argument is used for
      ELF, not straight ECOFF.  */
-  bfd_boolean (*read_debug_info) (bfd *, asection *, struct ecoff_debug_info *);
+  bool (*read_debug_info) (bfd *, asection *, struct ecoff_debug_info *);
 };
 
 #endif /* ! defined (ECOFF_H) */
diff --git a/include/coff/xcoff.h b/include/coff/xcoff.h
index 05e9160c08f..3170542865b 100644
--- a/include/coff/xcoff.h
+++ b/include/coff/xcoff.h
@@ -406,7 +406,7 @@ struct xcoff_link_hash_entry
 struct xcoff_loader_info
 {
   /* Set if a problem occurred.  */
-  bfd_boolean failed;
+  bool failed;
 
   /* Output BFD.  */
   bfd *output_bfd;
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 368eb2734fb..4f5008436d4 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -150,7 +150,7 @@ typedef struct disassemble_info
   /* Function called to check if a SYMBOL is can be displayed to the user.
      This is used by some ports that want to hide special symbols when
      displaying debugging outout.  */
-  bfd_boolean (* symbol_is_valid)
+  bool (* symbol_is_valid)
     (asymbol *, struct disassemble_info *dinfo);
 
   /* These are for buffer_read_memory.  */
@@ -189,7 +189,7 @@ typedef struct disassemble_info
   unsigned int skip_zeroes_at_end;
 
   /* Whether the disassembler always needs the relocations.  */
-  bfd_boolean disassembler_needs_relocs;
+  bool disassembler_needs_relocs;
 
   /* Results from instruction decoders.  Not all decoders yet support
      this information.  This info is set each time an instruction is
@@ -303,10 +303,10 @@ extern void print_arm_disassembler_options (FILE *);
 extern void print_arc_disassembler_options (FILE *);
 extern void print_s390_disassembler_options (FILE *);
 extern void print_wasm32_disassembler_options (FILE *);
-extern bfd_boolean aarch64_symbol_is_valid (asymbol *, struct disassemble_info *);
-extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
-extern bfd_boolean csky_symbol_is_valid (asymbol *, struct disassemble_info *);
-extern bfd_boolean riscv_symbol_is_valid (asymbol *, struct disassemble_info *);
+extern bool aarch64_symbol_is_valid (asymbol *, struct disassemble_info *);
+extern bool arm_symbol_is_valid (asymbol *, struct disassemble_info *);
+extern bool csky_symbol_is_valid (asymbol *, struct disassemble_info *);
+extern bool riscv_symbol_is_valid (asymbol *, struct disassemble_info *);
 extern void disassemble_init_powerpc (struct disassemble_info *);
 extern void disassemble_init_s390 (struct disassemble_info *);
 extern void disassemble_init_wasm32 (struct disassemble_info *);
@@ -320,7 +320,7 @@ extern const disasm_options_and_args_t *disassembler_options_s390 (void);
    endian if BIG is true), bfd_mach value MACH, and ABFD, if that support
    is available.  ABFD may be NULL.  */
 extern disassembler_ftype disassembler (enum bfd_architecture arc,
-					bfd_boolean big, unsigned long mach,
+					bool big, unsigned long mach,
 					bfd *abfd);
 
 /* Amend the disassemble_info structure as necessary for the target architecture.
@@ -381,7 +381,7 @@ extern int generic_symbol_at_address
   (bfd_vma, struct disassemble_info *);
 
 /* Also always true.  */
-extern bfd_boolean generic_symbol_is_valid
+extern bool generic_symbol_is_valid
   (asymbol *, struct disassemble_info *);
 
 /* Method to initialize a disassemble_info struct.  This should be
diff --git a/include/elf/mmix.h b/include/elf/mmix.h
index b4a8ac859da..f6d105d1e86 100644
--- a/include/elf/mmix.h
+++ b/include/elf/mmix.h
@@ -162,11 +162,11 @@ END_RELOC_NUMBERS (R_MMIX_max)
 #define MMO_SEC_DEBUGGING 0x10000
 
 #ifdef BFD_ARCH_SIZE
-extern bfd_boolean _bfd_mmix_before_linker_allocation
+extern bool _bfd_mmix_before_linker_allocation
   (bfd *, struct bfd_link_info *);
-extern bfd_boolean _bfd_mmix_after_linker_allocation
+extern bool _bfd_mmix_after_linker_allocation
   (bfd *, struct bfd_link_info *);
-extern bfd_boolean _bfd_mmix_check_all_relocs
+extern bool _bfd_mmix_check_all_relocs
   (bfd *, struct bfd_link_info *);
 #endif
 
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
index 830e354ed49..78e9b4c764e 100644
--- a/include/elf/xtensa.h
+++ b/include/elf/xtensa.h
@@ -221,7 +221,7 @@ xtensa_read_table_entries (bfd *abfd,
 			   asection *section,
 			   property_table_entry **table_p,
 			   const char *sec_name,
-			   bfd_boolean output_addr);
+			   bool output_addr);
 extern int
 xtensa_compute_fill_extra_space (property_table_entry *entry);
 
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index 7a97fa837f6..f43df79d7c5 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -753,14 +753,14 @@ typedef aarch64_opnd_qualifier_t	\
 	  aarch64_opnd_qualifier_seq_t [AARCH64_MAX_OPND_NUM];
 
 /* FIXME: improve the efficiency.  */
-static inline bfd_boolean
+static inline bool
 empty_qualifier_sequence_p (const aarch64_opnd_qualifier_t *qualifiers)
 {
   int i;
   for (i = 0; i < AARCH64_MAX_OPND_NUM; ++i)
     if (qualifiers[i] != AARCH64_OPND_QLF_NIL)
-      return FALSE;
-  return TRUE;
+      return false;
+  return true;
 }
 
 /*  Forward declare error reporting type.  */
@@ -819,7 +819,7 @@ struct aarch64_opcode
 
   /* If non-NULL, a function to verify that a given instruction is valid.  */
   enum err_type (* verifier) (const struct aarch64_inst *, const aarch64_insn,
-			      bfd_vma, bfd_boolean, aarch64_operand_error *,
+			      bfd_vma, bool, aarch64_operand_error *,
 			      struct aarch64_instr_sequence *);
 };
 
@@ -897,13 +897,13 @@ extern aarch64_opcode aarch64_opcode_table[];
 #define C_MAX_ELEM (1U << 1)
 /* Next bit is 2.  */
 
-static inline bfd_boolean
+static inline bool
 alias_opcode_p (const aarch64_opcode *opcode)
 {
   return (opcode->flags & F_ALIAS) != 0;
 }
 
-static inline bfd_boolean
+static inline bool
 opcode_has_alias (const aarch64_opcode *opcode)
 {
   return (opcode->flags & F_HAS_ALIAS) != 0;
@@ -916,13 +916,13 @@ opcode_priority (const aarch64_opcode *opcode)
   return (opcode->flags >> 2) & 0x3;
 }
 
-static inline bfd_boolean
+static inline bool
 pseudo_opcode_p (const aarch64_opcode *opcode)
 {
   return (opcode->flags & F_PSEUDO) != 0lu;
 }
 
-static inline bfd_boolean
+static inline bool
 optional_operand_p (const aarch64_opcode *opcode, unsigned int idx)
 {
   return ((opcode->flags >> 12) & 0x7) == idx + 1;
@@ -940,7 +940,7 @@ get_opcode_dependent_value (const aarch64_opcode *opcode)
   return (opcode->flags >> 24) & 0x7;
 }
 
-static inline bfd_boolean
+static inline bool
 opcode_has_special_coder (const aarch64_opcode *opcode)
 {
   return (opcode->flags & (F_SF | F_LSE_SZ | F_SIZEQ | F_FPTYPE | F_SSIZE | F_T
@@ -974,9 +974,9 @@ typedef struct
 
 extern const aarch64_sys_reg aarch64_sys_regs [];
 extern const aarch64_sys_reg aarch64_pstatefields [];
-extern bfd_boolean aarch64_sys_reg_deprecated_p (const uint32_t);
-extern bfd_boolean aarch64_pstatefield_supported_p (const aarch64_feature_set,
-						    const aarch64_sys_reg *);
+extern bool aarch64_sys_reg_deprecated_p (const uint32_t);
+extern bool aarch64_pstatefield_supported_p (const aarch64_feature_set,
+					     const aarch64_sys_reg *);
 
 typedef struct
 {
@@ -985,8 +985,8 @@ typedef struct
   uint32_t flags ;
 } aarch64_sys_ins_reg;
 
-extern bfd_boolean aarch64_sys_ins_reg_has_xt (const aarch64_sys_ins_reg *);
-extern bfd_boolean
+extern bool aarch64_sys_ins_reg_has_xt (const aarch64_sys_ins_reg *);
+extern bool
 aarch64_sys_ins_reg_supported_p (const aarch64_feature_set,
 				 const char *reg_name, aarch64_insn,
                                  uint32_t, aarch64_feature_set);
@@ -1019,7 +1019,7 @@ enum aarch64_modifier_kind
   AARCH64_MOD_MUL_VL,
 };
 
-bfd_boolean
+bool
 aarch64_extend_operator_p (enum aarch64_modifier_kind);
 
 enum aarch64_modifier_kind
@@ -1242,7 +1242,7 @@ struct aarch64_operand_error
   int index;
   const char *error;
   int data[3];	/* Some data for extra information.  */
-  bfd_boolean non_fatal;
+  bool non_fatal;
 };
 
 /* AArch64 sequence structure used to track instructions with F_SCAN
@@ -1262,7 +1262,7 @@ struct aarch64_instr_sequence
 
 /* Encoding entrypoint.  */
 
-extern bfd_boolean
+extern bool
 aarch64_opcode_encode (const aarch64_opcode *, const aarch64_inst *,
 		       aarch64_insn *, aarch64_opnd_qualifier_t *,
 		       aarch64_operand_error *, aarch64_instr_sequence *);
@@ -1293,7 +1293,7 @@ extern aarch64_opnd_qualifier_t
 aarch64_get_expected_qualifier (const aarch64_opnd_qualifier_seq_t *, int,
 				const aarch64_opnd_qualifier_t, int);
 
-extern bfd_boolean
+extern bool
 aarch64_is_destructive_by_operands (const aarch64_opcode *);
 
 extern int
@@ -1306,7 +1306,7 @@ extern int
 aarch64_zero_register_p (const aarch64_opnd_info *);
 
 extern enum err_type
-aarch64_decode_insn (aarch64_insn, aarch64_inst *, bfd_boolean,
+aarch64_decode_insn (aarch64_insn, aarch64_inst *, bool,
 		     aarch64_operand_error *);
 
 extern void
@@ -1326,7 +1326,7 @@ aarch64_get_operand_name (enum aarch64_opnd);
 extern const char *
 aarch64_get_operand_desc (enum aarch64_opnd);
 
-extern bfd_boolean
+extern bool
 aarch64_sve_dupm_mov_immediate_p (uint64_t, int);
 
 #ifdef DEBUG_AARCH64
diff --git a/include/opcode/arc.h b/include/opcode/arc.h
index f0320c101d7..7c8b0ced330 100644
--- a/include/opcode/arc.h
+++ b/include/opcode/arc.h
@@ -260,8 +260,7 @@ struct arc_operand
      TRUE if this operand type can not actually be extracted from
      this operand (i.e., the instruction does not match).  If the
      operand is valid, *INVALID will not be changed.  */
-  long long int (*extract) (unsigned long long instruction,
-                            bfd_boolean *invalid);
+  long long int (*extract) (unsigned long long instruction, bool *invalid);
 };
 
 /* Elements in the table are retrieved by indexing with values from
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index d1b4a2574ac..f72c5db1fdd 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -519,7 +519,7 @@ struct mips_int_operand
   unsigned int shift;
 
   /* True if the operand should be printed as hex rather than decimal.  */
-  bfd_boolean print_hex;
+  bool print_hex;
 };
 
 /* Uses a lookup table to describe a small integer operand.  */
@@ -531,7 +531,7 @@ struct mips_mapped_int_operand
   const int *int_map;
 
   /* True if the operand should be printed as hex rather than decimal.  */
-  bfd_boolean print_hex;
+  bool print_hex;
 };
 
 /* An operand that encodes the most significant bit position of a bitfield.
@@ -551,7 +551,7 @@ struct mips_msb_operand
 
   /* True if the operand encodes MSB directly, false if it encodes
      MSB - LSB.  */
-  bfd_boolean add_lsb;
+  bool add_lsb;
 
   /* The maximum value of MSB + 1.  */
   unsigned int opsize;
@@ -576,10 +576,10 @@ struct mips_check_prev_operand
 {
   struct mips_operand root;
 
-  bfd_boolean greater_than_ok;
-  bfd_boolean less_than_ok;
-  bfd_boolean equal_ok;
-  bfd_boolean zero_ok;
+  bool greater_than_ok;
+  bool less_than_ok;
+  bool equal_ok;
+  bool zero_ok;
 };
 
 /* Describes an operand that encodes a pair of registers.  */
@@ -619,7 +619,7 @@ struct mips_pcrel_operand
 
 /* Return true if the assembly syntax allows OPERAND to be omitted.  */
 
-static inline bfd_boolean
+static inline bool
 mips_optional_operand_p (const struct mips_operand *operand)
 {
   return (operand->type == OP_OPTIONAL_REG
@@ -758,7 +758,7 @@ struct mips_opcode
 
 /* Return true if MO is an instruction that requires 32-bit encoding.  */
 
-static inline bfd_boolean
+static inline bool
 mips_opcode_32bit_p (const struct mips_opcode *mo)
 {
   return mo->mask >> 16 != 0;
@@ -1387,7 +1387,7 @@ static const unsigned int mips_isa_table[] = {
 
 /* Return true if the given CPU is included in INSN_* mask MASK.  */
 
-static inline bfd_boolean
+static inline bool
 cpu_is_member (int cpu, unsigned int mask)
 {
   switch (cpu)
@@ -1462,7 +1462,7 @@ cpu_is_member (int cpu, unsigned int mask)
 	     || ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
 
     default:
-      return FALSE;
+      return false;
     }
 }
 
@@ -1472,7 +1472,7 @@ cpu_is_member (int cpu, unsigned int mask)
    test, or zero if no CPU specific ISA test is desired.  Return true
    if instruction INSN is available to the given ISA and CPU. */
 
-static inline bfd_boolean
+static inline bool
 opcode_is_member (const struct mips_opcode *insn, int isa, int ase, int cpu)
 {
   if (!cpu_is_member (cpu, insn->exclusions))
@@ -1482,17 +1482,17 @@ opcode_is_member (const struct mips_opcode *insn, int isa, int ase, int cpu)
 	  && (insn->membership & INSN_ISA_MASK) != 0
 	  && ((mips_isa_table[(isa & INSN_ISA_MASK) - 1]
 	       >> ((insn->membership & INSN_ISA_MASK) - 1)) & 1) != 0)
-	return TRUE;
+	return true;
 
       /* Test for ASE compatibility.  */
       if ((ase & insn->ase) != 0)
-	return TRUE;
+	return true;
 
       /* Test for processor-specific extensions.  */
       if (cpu_is_member (cpu, insn->membership))
-	return TRUE;
+	return true;
     }
-  return FALSE;
+  return false;
 }
 
 /* This is a list of macro expanded instructions.
@@ -1941,7 +1941,7 @@ extern int bfd_mips_num_opcodes;
    FP_D (never used)
    */
 
-extern const struct mips_operand *decode_mips16_operand (char, bfd_boolean);
+extern const struct mips_operand *decode_mips16_operand (char, bool);
 extern const struct mips_opcode mips16_opcodes[];
 extern const int bfd_mips16_num_opcodes;
 
diff --git a/include/opcode/tic6x-opcode-table.h b/include/opcode/tic6x-opcode-table.h
index 94405779c24..0cf5d342cbf 100644
--- a/include/opcode/tic6x-opcode-table.h
+++ b/include/opcode/tic6x-opcode-table.h
@@ -38,7 +38,7 @@
 #define FIX2(a, b) 2, { a, b }
 #define FIX3(a, b, c) 3, { a, b, c }
 #define FIX4(a, b, c, d) 4, { a, b, c, d }
-#define OP0() 0, { { 0, 0, FALSE, 0, 0, 0, 0 } }
+#define OP0() 0, { { 0, 0, false, 0, 0, 0, 0 } }
 #define OP1(a) 1, { a }
 #define OP2(a, b) 2, { a, b }
 #define OP3(a, b, c) 3, { a, b, c }
diff --git a/include/opcode/tic6x.h b/include/opcode/tic6x.h
index 62c686a7bf9..019c376c744 100644
--- a/include/opcode/tic6x.h
+++ b/include/opcode/tic6x.h
@@ -697,26 +697,26 @@ typedef struct
   unsigned int header;
 
   /* Whether each word uses compact instructions.  */
-  bfd_boolean word_compact[7];
+  bool word_compact[7];
 
   /* Whether loads are protected.  */
-  bfd_boolean prot;
+  bool prot;
 
   /* Whether instructions use the high register set.  */
-  bfd_boolean rs;
+  bool rs;
 
   /* Data size.  */
   unsigned int dsz;
 
   /* Whether compact instructions in the S unit are decoded as
      branches.  */
-  bfd_boolean br;
+  bool br;
 
   /* Whether compact instructions saturate.  */
-  bfd_boolean sat;
+  bool sat;
 
   /* P-bits.  */
-  bfd_boolean p_bits[14];
+  bool p_bits[14];
 } tic6x_fetch_packet_header;
 
 #ifdef __cplusplus

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Use bool in gprof
  2021-03-31  0:26         ` Use bool in include Alan Modra
@ 2021-03-31  0:28           ` Alan Modra
  2021-03-31  0:31             ` Use bool in bfd Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:28 UTC (permalink / raw)
  To: binutils

The patch here is quite mechanical, so not posting.

	* basic_blocks.c: Replace bfd_boolean with bool, FALSE with false,
	and TRUE with true throughout.
	* basic_blocks.h: Likewise.
	* cg_arcs.c: Likewise.
	* cg_dfn.c: Likewise.
	* cg_print.c: Likewise.
	* corefile.c: Likewise.
	* gmon_io.c: Likewise.
	* gprof.c: Likewise.
	* gprof.h: Likewise.
	* hist.c: Likewise.
	* mips.c: Likewise.
	* source.c: Likewise.
	* source.h: Likewise.
	* sym_ids.c: Likewise.
	* sym_ids.h: Likewise.
	* symtab.h: Likewise.
	* vax.c: Likewise.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Use bool in bfd
  2021-03-31  0:28           ` Use bool in gprof Alan Modra
@ 2021-03-31  0:31             ` Alan Modra
  2021-03-31  0:32               ` Use bool in opcodes Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:31 UTC (permalink / raw)
  To: binutils

Another quite boring patch, for which I'm only posting the
changelog.

	* sysdep.h: POISON_BFD_BOOLEAN: Define.
	* aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h,
	* aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c,
	* bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c,
	* coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c,
	* coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c,
	* coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c,
	* coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c,
	* coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c,
	* coffcode.h, * coffgen.c, * cofflink.c, * compress.c,
	* corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c,
	* cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c,
	* cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c,
	* cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c,
	* cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c,
	* cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c,
	* cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c,
	* cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c,
	* cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c,
	* cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c,
	* cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c,
	* cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c,
	* cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c,
	* cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c,
	* cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c,
	* cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c,
	* cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c,
	* cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c,
	* cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c,
	* cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c,
	* cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c,
	* dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c,
	* elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h,
	* elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c,
	* elf-nacl.h, * elf-properties.c, * elf-s390-common.c,
	* elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h,
	* elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c,
	* elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c,
	* elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c,
	* elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c,
	* elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
	* elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c,
	* elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c,
	* elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
	* elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
	* elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c,
	* elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
	* elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c,
	* elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
	* elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c,
	* elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
	* elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c,
	* elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h,
	* elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h,
	* elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c,
	* elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h,
	* elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
	* elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
	* elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c,
	* elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c,
	* elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c,
	* elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c,
	* elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h,
	* elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c,
	* elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c,
	* elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h,
	* elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h,
	* elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h,
	* elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h,
	* format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c,
	* i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h,
	* libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h,
	* libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c,
	* mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h,
	* merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c,
	* pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c,
	* pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c,
	* pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c,
	* peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c,
	* reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c,
	* som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c,
	* verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h,
	* wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c,
	* xsym.h: Replace bfd_boolean with bool, FALSE with false, and
	TRUE with true throughout.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
	* libcoff.h: Regenerate.


-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Use bool in opcodes
  2021-03-31  0:31             ` Use bool in bfd Alan Modra
@ 2021-03-31  0:32               ` Alan Modra
  2021-03-31  0:33                 ` Use bool in binutils Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:32 UTC (permalink / raw)
  To: binutils

cpu/
	* frv.opc: Replace bfd_boolean with bool, FALSE with false, and
	TRUE with true throughout.
opcodes/
	* sysdep.h (POISON_BFD_BOOLEAN): Define.
	* aarch64-asm-2.c, * aarch64-asm.c, * aarch64-asm.h,
	* aarch64-dis-2.c, * aarch64-dis.c, * aarch64-dis.h,
	* aarch64-gen.c, * aarch64-opc.c, * aarch64-opc.h, * arc-dis.c,
	* arc-dis.h, * arc-fxi.h, * arc-opc.c, * arm-dis.c, * bfin-dis.c,
	* cris-dis.c, * csky-dis.c, * csky-opc.h, * dis-buf.c,
	* disassemble.c, * frv-opc.c, * frv-opc.h, * h8300-dis.c,
	* i386-dis.c, * m68k-dis.c, * metag-dis.c, * microblaze-dis.c,
	* microblaze-dis.h, * micromips-opc.c, * mips-dis.c,
	* mips-formats.h, * mips-opc.c, * mips16-opc.c, * mmix-dis.c,
	* msp430-dis.c, * nds32-dis.c, * nfp-dis.c, * nios2-dis.c,
	* ppc-dis.c, * riscv-dis.c, * score-dis.c, * score7-dis.c,
	* tic6x-dis.c, * v850-dis.c, * vax-dis.c, * wasm32-dis.c,
	* xtensa-dis.c: Replace bfd_boolean with bool, FALSE with false,
	and TRUE with true throughout.


-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Use bool in binutils
  2021-03-31  0:32               ` Use bool in opcodes Alan Modra
@ 2021-03-31  0:33                 ` Alan Modra
  2021-03-31  0:34                   ` Use bool in ld Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:33 UTC (permalink / raw)
  To: binutils

	* sysdep.h (POISON_BFD_BOOLEAN): Define.
	* addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
	* binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
	* debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
	* elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
	* objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
	* readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
	* windmc.c, * windmc.h, * windres.c, * winduni.c,
	* wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
	and TRUE with true throughout.


-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Use bool in ld
  2021-03-31  0:33                 ` Use bool in binutils Alan Modra
@ 2021-03-31  0:34                   ` Alan Modra
  2021-03-31  0:34                     ` Use bool in gas Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:34 UTC (permalink / raw)
  To: binutils

	* sysdep.h (POISON_BFD_BOOLEAN): Define.
	* configure.ac (elf_list_options, elf_shlib_list_options=false),
	(elf_plt_unwind_list_options=false): Replace FALSE with false,
	and TRUE with true.
	* emulparams/call_nop.sh, * emulparams/cet.sh,
	* emulparams/dynamic_undefined_weak.sh,
	* emulparams/elf32b4300.sh, * emulparams/elf32lm32.sh,
	* emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh,
	* emulparams/elf32visium.sh, * emulparams/elf_x86_64.sh,
	* emulparams/extern_protected_data.sh, * emulparams/plt_unwind.sh,
	* emulparams/reloc_overflow.sh, * emulparams/static.sh,
	* emulparams/x86-64-lam.sh, * emultempl/aarch64elf.em,
	* emultempl/aix.em, * emultempl/alphaelf.em,
	* emultempl/armcoff.em, * emultempl/armelf.em,
	* emultempl/avrelf.em, * emultempl/beos.em, * emultempl/bfin.em,
	* emultempl/cr16elf.em, * emultempl/crxelf.em,
	* emultempl/cskyelf.em, * emultempl/elf.em, * emultempl/genelf.em,
	* emultempl/hppaelf.em, * emultempl/linux.em,
	* emultempl/m68hc1xelf.em, * emultempl/metagelf.em,
	* emultempl/mipself.em, * emultempl/mmix-elfnmmo.em,
	* emultempl/mmixelf.em, * emultempl/mmo.em, * emultempl/msp430.em,
	* emultempl/nios2elf.em, * emultempl/pdp11.em, * emultempl/pe.em,
	* emultempl/pep.em, * emultempl/ppc32elf.em,
	* emultempl/ppc64elf.em, * emultempl/rxelf.em,
	* emultempl/rxlinux.em, * emultempl/scoreelf.em,
	* emultempl/solaris2.em, * emultempl/spuelf.em,
	* emultempl/ticoff.em, * emultempl/v850elf.em, * emultempl/vms.em,
	* emultempl/xtensaelf.em, * emultempl/z80.em, * ld.h,
	* ldbuildid.c, * ldbuildid.h, * ldcref.c, * ldctor.c, * ldctor.h,
	* ldelf.c, * ldelf.h, * ldelfgen.c, * ldelfgen.h, * ldemul.c,
	* ldemul.h, * ldexp.c, * ldexp.h, * ldfile.c, * ldfile.h,
	* ldgram.y, * ldlang.c, * ldlang.h, * ldmain.c, * ldmain.h,
	* ldmisc.c, * ldmisc.h, * ldwrite.c, * lexsup.c, * mri.c,
	* pe-dll.c, * pe-dll.h, * pep-dll.h, * plugin.c, * plugin.h,
	* testplug.c, * testplug2.c, * testplug3.c, * testplug4.c: Replace
	bfd_boolean with bool, FALSE with false, and TRUE with true.
	* configure: Regenerate.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Use bool in gas
  2021-03-31  0:34                   ` Use bool in ld Alan Modra
@ 2021-03-31  0:34                     ` Alan Modra
  0 siblings, 0 replies; 14+ messages in thread
From: Alan Modra @ 2021-03-31  0:34 UTC (permalink / raw)
  To: binutils

	* as.h (POISON_BFD_BOOLEAN): Define.
	* as.c, * as.h, * atof-generic.c, * config/atof-ieee.c,
	* config/bfin-aux.h, * config/obj-coff.c, * config/obj-ecoff.c,
	* config/obj-elf.c, * config/obj-elf.h, * config/obj-som.c,
	* config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c,
	* config/tc-arc.h, * config/tc-arm.c, * config/tc-arm.h,
	* config/tc-avr.c, * config/tc-avr.h, * config/tc-bfin.c,
	* config/tc-bfin.h, * config/tc-bpf.c, * config/tc-cris.c,
	* config/tc-csky.c, * config/tc-csky.h, * config/tc-d10v.c,
	* config/tc-d10v.h, * config/tc-d30v.c, * config/tc-d30v.h,
	* config/tc-dlx.c, * config/tc-dlx.h, * config/tc-epiphany.c,
	* config/tc-epiphany.h, * config/tc-fr30.c, * config/tc-fr30.h,
	* config/tc-frv.c, * config/tc-frv.h, * config/tc-ft32.c,
	* config/tc-ft32.h, * config/tc-h8300.c, * config/tc-hppa.c,
	* config/tc-i386-intel.c, * config/tc-i386.c, * config/tc-ia64.c,
	* config/tc-ip2k.c, * config/tc-iq2000.c, * config/tc-iq2000.h,
	* config/tc-lm32.c, * config/tc-lm32.h, * config/tc-m32c.c,
	* config/tc-m32c.h, * config/tc-m32r.c, * config/tc-m32r.h,
	* config/tc-m68hc11.c, * config/tc-m68k.c, * config/tc-mcore.c,
	* config/tc-mcore.h, * config/tc-mep.c, * config/tc-mep.h,
	* config/tc-metag.c, * config/tc-metag.h,
	* config/tc-microblaze.c, * config/tc-mips.c, * config/tc-mips.h,
	* config/tc-mmix.c, * config/tc-mn10200.c, * config/tc-mn10300.c,
	* config/tc-mn10300.h, * config/tc-moxie.c, * config/tc-msp430.c,
	* config/tc-msp430.h, * config/tc-mt.c, * config/tc-mt.h,
	* config/tc-nds32.c, * config/tc-nds32.h, * config/tc-nios2.c,
	* config/tc-ns32k.c, * config/tc-or1k.c, * config/tc-or1k.h,
	* config/tc-pdp11.c, * config/tc-ppc.c, * config/tc-pru.c,
	* config/tc-pru.h, * config/tc-riscv.c, * config/tc-riscv.h,
	* config/tc-rx.c, * config/tc-rx.h, * config/tc-s12z.c,
	* config/tc-s12z.h, * config/tc-s390.c, * config/tc-score.c,
	* config/tc-score.h, * config/tc-score7.c, * config/tc-sh.c,
	* config/tc-sh.h, * config/tc-spu.c, * config/tc-tic54x.c,
	* config/tc-tic6x.c, * config/tc-tic6x.h, * config/tc-tilegx.c,
	* config/tc-tilepro.c, * config/tc-v850.c, * config/tc-v850.h,
	* config/tc-visium.c, * config/tc-visium.h, * config/tc-wasm32.c,
	* config/tc-wasm32.h, * config/tc-xc16x.c, * config/tc-xgate.c,
	* config/tc-xstormy16.c, * config/tc-xstormy16.h,
	* config/tc-xtensa.c, * config/tc-xtensa.h, * config/tc-z80.c,
	* config/tc-z8k.c, * config/xtensa-istack.h,
	* config/xtensa-relax.c, * config/xtensa-relax.h, * dw2gencfi.c,
	* dwarf2dbg.c, * dwarf2dbg.h, * expr.c, * expr.h, * frags.c,
	* frags.h, * listing.c, * macro.c, * output-file.c, * read.c,
	* read.h, * stabs.c, * symbols.c, * write.c: Replace bfd_boolean
	with bool, FALSE with false, and TRUE with true.


-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-03-31  0:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29  0:35 Should binutils require at least C99? Alan Modra
2021-03-29  1:42 ` Mike Frysinger
2021-03-30  0:28   ` Fangrui Song
2021-03-30 11:44 ` Nick Clifton
2021-03-31  0:20   ` Include string.h in bfd.h and delete LITMEMCPY, LITSTRCPY Alan Modra
2021-03-31  0:23     ` Remove bfd_stdint.h Alan Modra
2021-03-31  0:24       ` Use stdbool.h Alan Modra
2021-03-31  0:26         ` Use bool in include Alan Modra
2021-03-31  0:28           ` Use bool in gprof Alan Modra
2021-03-31  0:31             ` Use bool in bfd Alan Modra
2021-03-31  0:32               ` Use bool in opcodes Alan Modra
2021-03-31  0:33                 ` Use bool in binutils Alan Modra
2021-03-31  0:34                   ` Use bool in ld Alan Modra
2021-03-31  0:34                     ` Use bool in gas Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).