Hi Derek!

> Le 21 oct. 2018 à 19:43, Derek Clegg <[email protected]> a écrit :
> 
> I’m seeing a minor warning when building bison-3.1.91:
> 
> lib/obstack.c:351:31: warning: incompatible pointer types initializing 'void
>      (*)(void) __attribute__((noreturn))' with an expression of type
>      'void (void)' [-Wincompatible-pointer-types]
> __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
> 
> Patch:
> 
> diff -ur bison-3.1.91/lib/obstack.c bison/lib/obstack.c
> --- bison-3.1.91/lib/obstack.c        2018-09-02 09:08:33.000000000 -0700
> +++ bison/lib/obstack.c       2018-10-21 10:36:46.000000000 -0700
> @@ -326,7 +326,7 @@
> #   include <libio/iolibio.h>
> #  endif
> 
> -static _Noreturn void
> +static __attribute_noreturn__ void
> print_and_abort (void)
> {
>   /* Don't change any of these strings.  Yes, it would be possible to add
> 

This is coming from gnulib.  Could you submit your patch there?
I don’t know how they handle _Noreturn.

[email protected].


Reply via email to