[v2,4/4] ld: fix -std=gnu23 compatibility wrt _Bool

Message ID cffedffbfeaabe3e92a80655214705bc51842283.1731741209.git.sam@gentoo.org
State New
Headers
Series C23 fixes |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Sam James Nov. 16, 2024, 7:13 a.m. UTC
  GCC trunk now defaults to -std=gnu23. We return false in a few places
which can't work when true/false are a proper type (_Bool). Return NULL
where appropriate instead of false. All callers handle this appropriately.

ChangeLog:
	PR ld/32372

	* pdb.c (add_stream): Return NULL.
---
 ld/pdb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/ld/pdb.c b/ld/pdb.c
index 5fd55fbb063..82c57f9362e 100644
--- a/ld/pdb.c
+++ b/ld/pdb.c
@@ -178,7 +178,7 @@  add_stream (bfd *pdb, const char *name, uint16_t *stream_num)
   if (!bfd_make_writable (stream))
     {
       bfd_close (stream);
-      return false;
+      return NULL;
     }
 
   if (!pdb->archive_head)