]> 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>
Tue, 19 Nov 2024 06:41:06 +0000 (06:41 +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.

(cherry picked from commit bf447eec6d7b69cba652127e2f38f102de38de39)

ld/pdb.c

index 88639d539b7419009930375cc9058c16f6c25787..ae4c614cef8316485e588dab6f0449b9de6b19b5 100644 (file)
--- a/ld/pdb.c
+++ b/ld/pdb.c
@@ -175,7 +175,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)