[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ASSERT and _GL_UNUSED macros
From: |
Eric Blake |
Subject: |
Re: ASSERT and _GL_UNUSED macros |
Date: |
Wed, 23 Dec 2009 15:47:37 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Bruno Haible <bruno <at> clisp.org> writes:
> > OK, then I'll work on making gnulib-tool always distribute tests/macros.h
> > along with any test, and move ASSERT into that file (but as separate
> > steps, to make the reviews easier).
>
> It does not require a modification of gnulib-tool. tests/macros.h is not
> different in principle than tests/nan.h; it's only used in more places.
But that means listing tests/macros.h in more than 100 modules/*-tests files.
There comes a point where a file is so ubiquitous that we might as well make
its presence automatic.
> Oops, you pushed that a bit quickly. I was just saying that _UNUSED_PARAMETER_
> is a good name, and there is no reason to rename it. Your new macro _GL_UNUSED
> is used in two different syntaxes now: after the identifier (when used for a
> function parameter) and before the identifier (in _GL_CHECK_SIGNATURE).
Blame gcc for the syntax issue. The point is that _GL_UNUSED can be attached
to variables, functions, parameters, and even labels, according to the syntax
rules of gcc __attribute__.
> Therefore my proposal is to
> - create a new module 'unused-parameter', that inserts a definition of
> _GL_UNUSED_PARAMETER_ in a header file, like 'link-warning' and 'arg-
nonnull'
> do,
> - update unistr.h accordingly.
Sounds reasonable. But I'd rather see _GL_UNUSED_PARAMETER than
_GL_UNUSED_PARAMETER_, given that we have _GL_ARG_NONNULL without a trailing
underscore. Also, se-context.in.h and se-selinux.in.h would benefit from an
unused-parameter module.
--
Eric Blake
- Re: stdlib tweak, (continued)
- Re: stdlib tweak, Eric Blake, 2009/12/21
- Re: stdlib tweak, Jim Meyering, 2009/12/22
- Re: stdlib tweak, Eric Blake, 2009/12/22
- Re: stdlib tweak, Jim Meyering, 2009/12/22
- Re: stdlib tweak, Eric Blake, 2009/12/22
- Re: stdlib tweak, Jim Meyering, 2009/12/23
- Re: stdlib tweak, Bruno Haible, 2009/12/23
- Re: stdlib tweak, Eric Blake, 2009/12/23
- Re: ASSERT and _GL_UNUSED macros, Bruno Haible, 2009/12/23
- Re: ASSERT and _GL_UNUSED macros,
Eric Blake <=
- Re: ASSERT macro, Bruno Haible, 2009/12/23
- Re: _GL_UNUSED macro, Bruno Haible, 2009/12/23
- new module 'unused-parameter', Bruno Haible, 2009/12/24
- Re: new module 'unused-parameter', Bruno Haible, 2009/12/25
- Re: new module 'unused-parameter', Jim Meyering, 2009/12/25
- Re: new module 'unused-parameter', Bruno Haible, 2009/12/25
- Re: new module 'unused-parameter', Simon Josefsson, 2009/12/27
- Re: new module 'unused-parameter', Simon Josefsson, 2009/12/29
- Re: new module 'unused-parameter', Jim Meyering, 2009/12/29
- Re: stdlib tweak, Jim Meyering, 2009/12/23