[PATCH 3/3] binutils: fix -std=gnu23 compatibility wrt _Bool

H.J. Lu hjl.tools@gmail.com
Sat Nov 16 07:03:11 GMT 2024


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
>


-- 
H.J.


More information about the Binutils mailing list