diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-03-30 14:28:10 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-03-30 14:28:10 +0300 |
commit | abde9f31440e862d4fd51605d8fade099b602cb5 (patch) | |
tree | 5cc4aaae46d8b2f76e994e4563a962eb3846c001 | |
parent | 19a22c41661c3b032c9cdcfd6913373526c025c8 (diff) | |
download | egawk-abde9f31440e862d4fd51605d8fade099b602cb5.tar.gz egawk-abde9f31440e862d4fd51605d8fade099b602cb5.tar.bz2 egawk-abde9f31440e862d4fd51605d8fade099b602cb5.zip |
Move _Noreturn handlng into a separate macro.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Makefile.in | 9 | ||||
-rw-r--r-- | aclocal.m4 | 1 | ||||
-rw-r--r-- | awklib/Makefile.in | 9 | ||||
-rw-r--r-- | configure.ac | 39 | ||||
-rw-r--r-- | doc/Makefile.in | 9 | ||||
-rw-r--r-- | m4/ChangeLog | 4 | ||||
-rw-r--r-- | m4/noreturn.m4 | 38 | ||||
-rw-r--r-- | test/Makefile.in | 9 |
9 files changed, 69 insertions, 53 deletions
@@ -1,3 +1,7 @@ +2012-03-30 Arnold D. Robbins <arnold@skeeve.com> + + * configure.ac (GAWK_AC_NORETURN): Do as macro instead of inline. + 2012-03-29 Arnold D. Robbins <arnold@skeeve.com> * dfa.h, dfa.c: Sync with grep. Major cleanups and some changes diff --git a/Makefile.in b/Makefile.in index c8208d94..e03744ed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -73,10 +73,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -964,6 +964,7 @@ m4_include([m4/lib-prefix.m4]) m4_include([m4/libsigsegv.m4]) m4_include([m4/longlong.m4]) m4_include([m4/nls.m4]) +m4_include([m4/noreturn.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) m4_include([m4/readline.m4]) diff --git a/awklib/Makefile.in b/awklib/Makefile.in index 01511c36..5c1fc278 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -68,10 +68,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/configure.ac b/configure.ac index 8fe1d23e..29068100 100644 --- a/configure.ac +++ b/configure.ac @@ -237,43 +237,8 @@ dnl AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) ]) TYPE_SOCKLEN_T -dnl Date: Sun, 26 Feb 2012 11:31:50 -0800 -dnl From: Paul Eggert <eggert@cs.ucla.edu> -dnl To: arnold@skeeve.com -dnl CC: bug-grep@gnu.org -dnl Subject: Re: avoid gcc 4.6.2 'may be used before set' warnings in dfa.c -dnl -dnl On 02/26/2012 01:18 AM, arnold@skeeve.com wrote: -dnl > It looks like I can just use the code as it is now in grep. I have asked -dnl > for compile failures and haven't gotten any. -dnl -dnl Sure, but the gnulib support for this is better -dnl than what's in the dfa code. It could be that -dnl your correspondents aren't using the less-common hosts -dnl or compiler warning options that gnulib is ported to. -dnl -dnl In the long run stdnoreturn.h or _Noreturn is the way to go, -dnl since they're part of the C standard. -dnl -dnl If you'd rather not create a separate file, how about if -dnl we change the dfa code to use _Noreturn instead of -dnl <stdnoreturn.h> and noreturn, and you can put the -dnl following into your configure.ac so that config.h -dnl defines _Noreturn the same way gnulib does: - -AH_VERBATIM([_Noreturn], -[/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) -# define _Noreturn __attribute__ ((__noreturn__)) -# elif defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif -]) +dnl Check for C11 _Noreturn +GAWK_AC_NORETURN dnl checks for functions AC_FUNC_VPRINTF diff --git a/doc/Makefile.in b/doc/Makefile.in index 2d3dbae2..7c8d9dbe 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -69,10 +69,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/m4/ChangeLog b/m4/ChangeLog index d684afe9..9e6800ad 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2012-03-30 Arnold D. Robbins <arnold@skeeve.com> + + * noreturn.m4: New file. + 2012-03-28 Arnold D. Robbins <arnold@skeeve.com> * 4.0.1: Release tar ball made. diff --git a/m4/noreturn.m4 b/m4/noreturn.m4 new file mode 100644 index 00000000..7fa7d377 --- /dev/null +++ b/m4/noreturn.m4 @@ -0,0 +1,38 @@ +dnl Date: Sun, 26 Feb 2012 11:31:50 -0800 +dnl From: Paul Eggert <eggert@cs.ucla.edu> +dnl To: arnold@skeeve.com +dnl CC: bug-grep@gnu.org +dnl Subject: Re: avoid gcc 4.6.2 'may be used before set' warnings in dfa.c +dnl +dnl On 02/26/2012 01:18 AM, arnold@skeeve.com wrote: +dnl > It looks like I can just use the code as it is now in grep. I have asked +dnl > for compile failures and haven't gotten any. +dnl +dnl Sure, but the gnulib support for this is better +dnl than what's in the dfa code. It could be that +dnl your correspondents aren't using the less-common hosts +dnl or compiler warning options that gnulib is ported to. +dnl +dnl In the long run stdnoreturn.h or _Noreturn is the way to go, +dnl since they're part of the C standard. +dnl +dnl If you'd rather not create a separate file, how about if +dnl we change the dfa code to use _Noreturn instead of +dnl <stdnoreturn.h> and noreturn, and you can put the +dnl following into your configure.ac so that config.h +dnl defines _Noreturn the same way gnulib does: + +AC_DEFUN([GAWK_AC_NORETURN],[ +AH_VERBATIM([_Noreturn], +[/* The _Noreturn keyword of C11. */ +#ifndef _Noreturn +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif +])]) diff --git a/test/Makefile.in b/test/Makefile.in index 364d61d9..068100cf 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -68,10 +68,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs |