Paul Eggert wrote:
> How about going with this patch to address this issue in grep's
> source code?  It uses C11's <stdnoreturn.h>, falling back on a
> simple gnulib substitute for pre-C11 compilers.
> If Awk doesn't use gnulib, Awk can use the stdnoreturn.h
> file that this patch builds, which I can email if you like.

Nice change.
As you've guessed, gawk does not use gnulib.
While this makes dfa.[ch] depend on stdnoreturn.h, all Arnold would
have to do is add a stand-alone stdnoreturn.h to gawk's sources.
You're welcome to push it, now.

I've just pushed an update of gnulib, bootstrap and init.sh
(confirmed with that, tests still pass locally and on Solaris 10)
so your patch should work fine as-is.

>>From fdfa5e9132ca3c57814d752349f4a9a7eeacf573 Mon Sep 17 00:00:00 2001
> From: Paul Eggert <[email protected]>
> Date: Fri, 24 Feb 2012 17:25:50 -0800
> Subject: [PATCH] maint: use stdnoreturn.h rather than rolling our own
>
> * bootstrap.conf (gnulib_modules): Add stdnoreturn.
> * src/grep.h (__attribute__): Remove.
> * src/dfa.h (__attribute__): Likewise.
> Include <stdnoreturn.h>.
> (dfaerror): Use noreturn rather than __attribute__ ((noreturn)).
> * src/dfa.h, src/system.h: Include <stdnoreturn.h>.
> * src/main.c (usage): Likewise.
> ---
>  bootstrap.conf |    1 +
>  src/dfa.h      |    6 ++----
>  src/grep.h     |    4 ----
>  src/main.c     |    3 +--
>  src/system.h   |    1 +

Reply via email to