]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: fix -std=gnu23 compatibility wrt _Bool
authorSam James <sam@gentoo.org>
Sat, 16 Nov 2024 07:07:02 +0000 (07:07 +0000)
committerSam James <sam@gentoo.org>
Mon, 18 Nov 2024 03:09:16 +0000 (03:09 +0000)
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

index 5fd55fbb063cb97a3e342edf6f812ca9ce0f3b62..82c57f9362e0bd9f3465bf7c477387c84ccb510c 100644 (file)
--- 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)