[3/3] binutils: fix -std=gnu23 compatibility wrt _Bool
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-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Test passed
|
Commit Message
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
* binutils/prdbg.c (visibility_name): Return NULL.
---
binutils/prdbg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Sat, Nov 16, 2024 at 2:35 PM Sam James <sam@gentoo.org> wrote:
>
> 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
>
> * binutils/prdbg.c (visibility_name): Return NULL.
No binutils/ prefix.
> ---
> 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;
> }
> --
> 2.47.0
>
@@ -2818,7 +2818,7 @@ visibility_name (enum debug_visibility visibility)
break;
default:
abort ();
- return false;
+ return NULL;
}
return s;
}