]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
binutils: fix -std=gnu23 compatibility wrt _Bool
authorSam James <sam@gentoo.org>
Sat, 16 Nov 2024 05:12:51 +0000 (05:12 +0000)
committerSam James <sam@gentoo.org>
Tue, 19 Nov 2024 06:40:54 +0000 (06:40 +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

* prdbg.c (visibility_name): Return NULL.

(cherry picked from commit eeff15bc88b89abed1cdb4d3b1b2cc7b4cec6fe7)

binutils/prdbg.c

index 3941d6e1791585dd157e344cffedb2bd2ba1ccf6..d6e828ee545217e87a911f36ff9d18bf69b21628 100644 (file)
@@ -2818,7 +2818,7 @@ visibility_name (enum debug_visibility visibility)
       break;
     default:
       abort ();
-      return false;
+      return NULL;
     }
   return s;
 }