[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4_defun_init
From: |
Eric Blake |
Subject: |
Re: m4_defun_init |
Date: |
Sat, 25 Oct 2008 06:17:10 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Ralf Wildenhues on 10/25/2008 3:11 AM:
>
>> -AC_DEFUN([_AC_PREPROC_IFELSE],
>> +m4_defun_init([_AC_PREPROC_IFELSE()],
>> +# Try to preprocess PROGRAM. Defer to the language-specific copy.
>> +m4_define([_AC_PREPROC_IFELSE],
>> +[m4_indir([$0(]_AC_LANG[)], $@)])
>
> Doesn't changing _AC_PREPROC_IFELSE from AC_DEFUN to m4_define have
> impact upon the location for expansions of AC_REQUIRE calls within the
> arguments of _AC_PREPROC_IFELSE?
Before Paolo's patch, only AC_PREPROC_IFELSE was defun'd,
_AC_PREPROC_IFELSE was define'd. Only defun'd macros show up in the
expansion trace. Paolo changed _AC_PREPROC_IFELSE to be defun'd since it
does a require (since the documentation says that you can't call require
unless you are defun'd). However, the technical truth is that you can't
call require unless you _or your caller_ is defun'd (in other words, you
can be define'd, as long as you are always evaluated in a defun'd
context), in which case, the define'd functions are omitted from the call
trace. And since AC_PREPROC_IFELSE is already in the call trace, and
_AC_PREPROC_IFELSE is internal, it really doesn't hurt things to omit
_AC_PREPROC_IFELSE from the call trace.
>
> Likewise for all the other macros that underwent this transformation,
> in this and the other patch(es?).
Yes, whatever we decide for one function can probably be applied across
the board to all 12 of Paolo's patches.
>
> Anyway, this bit, and the bit about fatal errors printing the location,
> would be good to have covered in the testsuite (haven't checked if they
> are already, sorry).
Probably not, so I agree that the testsuite needs work before this patch
can graduate to anything worth revisiting.
- --
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
iEYEARECAAYFAkkDDkYACgkQ84KuGfSFAYBEbACdEZsuFIJ2woWprnQkWH1qKryI
er8An271czN4mGbScXeVPAPtvs222Gor
=8nu3
-----END PGP SIGNATURE-----