bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/19] _Noreturn: new module


From: Bruno Haible
Subject: Re: [PATCH 02/19] _Noreturn: new module
Date: Tue, 12 Jul 2011 00:20:55 +0200
User-agent: KMail/1.9.9

Hi Paul,

> --- a/MODULES.html.sh
> +++ b/MODULES.html.sh
> @@ -2310,6 +2310,26 @@ func_all_modules ()
> ...
> +
> +  element="Support for obsolete systems lacking POSIX:2008"
> +  func_section_wrap posix_sup_obsolete
> +  func_wrap H2
> +  func_echo "$element"
> +

This will duplicate the headline "Support for obsolete systems lacking
POSIX:2008", the first of them will introduce an empty section. Certainly
not what you intended.

> --- /dev/null
> +++ b/build-aux/_Noreturn.h
> @@ -0,0 +1,8 @@
> +#if ! defined _Noreturn && __STDC_VERSION__ < 201000

Here too, I would not risk to rely on __STDC_VERSION__. Same argument as in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-04/msg00061.html>.

> --- /dev/null
> +++ b/modules/_Noreturn
> @@ -0,0 +1,27 @@
> +Description:
> +The _Noreturn keyword of C1X.
> +
> +Applicability:
> +all
> +
> +Files:
> +build-aux/_Noreturn.h
> +
> +Depends-on:
> +
> +configure.ac:
> +
> +Makefile.am:
> +# Because this Makefile snippet defines a variable used by other
> +# gnulib Makefile snippets, it must be present in all Makefile.am that
> +# need it. This is ensured by the applicability 'all' defined above.
> +
> +_NORETURN_H=$(top_srcdir)/build-aux/_Noreturn.h
> +
> +Include:
> +
> +License:
> +LGPLv2+
> +
> +Maintainer:
> +all

What does this module exactly provide? As I understand it:
  - The C macro _Noreturn is made available by gnulib-common.m4, and does not
    need extra headers. But it cannot be used in *.in.h files because these
    should be standalone.
  - The module '_Noreturn' provides a Makefile.am variable that points to a
    piece of C header file. It is the same category as the modules
    'arg-nonnull', 'c++defs', 'warn-on-use'.
  - Whereas the '_Noreturn-tests' module actually tests the contents of
    gnulib-common.m4, *not* the contents of build-aux/_Noreturn.h.

I would therefore suggest:
  1) To find a naming convention for the 4 modules'arg-nonnull', 'c++defs',
     'warn-on-use', '_Noreturn' that makes it clear that they don't provide
     ready-to-use C macros.
  2) To remove the module '_Noreturn-tests', and instead merge it into
     the module 'stdnoreturn-tests'.
     Do we need a test of the C macro in gnulib-common.m4? If we have the
     same in 'stdnoreturn-tests', it is less necessary. The problem is that
     we have no convention for naming a test of something in gnulib-common.m4.

Bruno
-- 
In memoriam Zahra Kazemi <http://en.wikipedia.org/wiki/Zahra_Kazemi>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]