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

Message ID 1ba8e7257953408bbcb30a8bc2e0a6d670251faa.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-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 fail Patch failed to apply

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

	* prdbg.c (visibility_name): Return NULL.
---
 binutils/prdbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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;
 }