[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expand-before-require bug
From: |
Eric Blake |
Subject: |
Re: expand-before-require bug |
Date: |
Fri, 23 Jan 2009 17:06:38 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 1/23/2009 4:26 PM:
> I find this m4_defun_once interesting too: it incorporates the workaround
> that we previously used in gnulib.
>
> But before you jump to the conclusion that AC_DEFUN_IDEMPOTENT is not
> needed any more, can you please tell:
> - Can a macro defined with AC_DEFUN_ONCE be both required and invoked?
In autoconf 2.63, it can be invoked first and then required; this is okay
unless the require was indirect within the body of a single defun (in
which case, you had an out-of-order expansion). It warns if you require
first and then invoke it. With the proposal for autoconf 2.64, it can be
either invoked or required, in any order, without warning; it guarantees
that the expansion only occurs once; and it will never suffer from
out-of-order expansion (thanks to the embedded require under the hood).
Plus, it should be easy to backport this behavior into gnulib.
> - Is a warning issued when an AC_DEFUN_ONCEd macro is expanded twice?
In autoconf 2.63, yes. But for autoconf 2.64, the second expansion is a
silent no-op. In other words, we are making the macro more permissive
than it used to be, while reducing the chance for out-of-order expansion.
Compatibility-wise, accepting a condition that used to warn is never a
problem.
> - Is a warning issued when an AC_DEFUN_ONCEd macro is being required
> after having already been expanded?
In autoconf 2.63, no. This will not change for 2.64.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkl6W44ACgkQ84KuGfSFAYCT1gCg09J1BfBtrSt2sTlz8zIR9ade
85QAnRuyHxc8sQpw9LS/ZGfl2tQAnjP5
=r7yi
-----END PGP SIGNATURE-----
- Re: expand-before-require bug, (continued)
- 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 <=
- Re: expand-before-require bug, Bruno Haible, 2009/01/23
- Re: expand-before-require bug, Eric Blake, 2009/01/25
- Re: expand-before-require bug, Paolo Bonzini, 2009/01/26
- Re: expand-before-require bug, Ralf Wildenhues, 2009/01/26
- Re: expand-before-require bug, Ralf Wildenhues, 2009/01/26
Re: expand-before-require bug, Eric Blake, 2009/01/21
Re: expand-before-require bug, Bruno Haible, 2009/01/22