[binutils-gdb/binutils-2_43-branch] binutils: fix -std=gnu23 compatibility wrt _Bool

Sam James sjames@sourceware.org
Tue Nov 19 06:41:44 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=74401db8de037bd109f06ddd93155c0d081f092e

commit 74401db8de037bd109f06ddd93155c0d081f092e
Author: Sam James <sam@gentoo.org>
Date:   Sat Nov 16 05:12:51 2024 +0000

    binutils: fix -std=gnu23 compatibility wrt _Bool
    
    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)

Diff:
---
 binutils/prdbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index 3941d6e1791..d6e828ee545 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -2818,7 +2818,7 @@ visibility_name (enum debug_visibility visibility)
       break;
     default:
       abort ();
-      return false;
+      return NULL;
     }
   return s;
 }


More information about the Binutils-cvs mailing list