On Oct 22, 2018, at 10:42 AM, Akim Demaille <a...@lrde.epita.fr> wrote: > > Hi Derek! > >> Le 21 oct. 2018 à 19:43, Derek Clegg <de...@me.com> 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) >> ... > > This is coming from gnulib. Could you submit your patch there? > I don’t know how they handle _Noreturn. > > bug-gnu...@gnu.org.
Thanks for the reply; I’ll do that. I’ll note that data/c.m4 has this: #if !defined _Noreturn \ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) # if defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif That makes it into the generated header, and produces the warning aux/x.h:97:11: error: macro name is a reserved identifier [-Werror,-Wreserved-id-macro] # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) As this isn’t used anywhere (as far as I can tell), it seems reasonable to omit it. Thanks! Derek