[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expand-before-require bug
From: |
Bruno Haible |
Subject: |
Re: expand-before-require bug |
Date: |
Thu, 22 Jan 2009 13:31:09 +0100 |
User-agent: |
KMail/1.9.9 |
Eric,
I wrote:
> - provide a documented way to avoid the warning for a particular macro,
> I much prefer to have a macro which can be both invoked and required,
> even if it requires one more line of code to write it down, than to have
> a macro with restricted use.
Here's a concrete proposal: Introduce a new macro-defining-macro
AC_DEFUN_IDEMPOTENT, such that:
- macros defined with AC_DEFUN_IDEMPOTENT are *known* to be expandable
any number of times, hence they may be both invoked and required,
- macros defined with AC_DEFUN_ONCE are *known* to be expandable only
once, hence the recommendation for them is to AC_REQUIRE them,
- about macros defined with AC_DEFUN nothing is known.
So for your warning about required-after-expanded it means:
- the warning should apply always to AC_DEFUN_ONCEd macros,
- the warning should never apply to AC_DEFUN_IDEMPOTENTd macros,
- the warning should apply to AC_DEFUNd macros only when the warning
level is higher than the default. The warning should indicate that
either the double expansion is a problem, or the macro should be
changed to be defined with AC_DEFUN_IDEMPOTENT if it is not a problem.
Bruno
- expand-before-require bug, Eric Blake, 2009/01/21
- Re: expand-before-require bug, Eric Blake, 2009/01/21
- Re: expand-before-require bug, Bruno Haible, 2009/01/22
- Re: expand-before-require bug, Paolo Bonzini, 2009/01/23
- Re: expand-before-require bug, Bruno Haible, 2009/01/23
- Re: expand-before-require bug, Paolo Bonzini, 2009/01/23
- Re: expand-before-require bug, Paolo Bonzini, 2009/01/23
- Re: expand-before-require bug, Eric Blake, 2009/01/23
- Re: expand-before-require bug, Bruno Haible, 2009/01/23
- Re: expand-before-require bug, Eric Blake, 2009/01/23
- Re: expand-before-require bug, Bruno Haible, 2009/01/23