[Top][All Lists]

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

Re: Autoconf fails test 4 with m4-1.4.7a

From: Eric Blake
Subject: Re: Autoconf fails test 4 with m4-1.4.7a
Date: Tue, 24 Oct 2006 12:49:45 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060909 Thunderbird/ Mnenhy/

Hash: SHA1

Hi Stepan,

According to Stepan Kasal on 10/24/2006 11:58 AM:
> Hi,
> On Tue, Oct 24, 2006 at 06:19:44PM +0200, Ralf Wildenhues wrote:
>> With current Autoconf HEAD (and 2.60, FWIW), and M4 branch-1_4,
>> I get a failure of Autoconf's test 4 on my GNU/Linux system.
> I take the liberty to decipher Ralf's report a bit.  If we have a 5
> line input file:
> m4_define(`ONE', `TWO(`$1')')
> m4_define(`TWO', `$1')
> ONE(`a
> b
> c')
> then the previous versions of m4, when tracing ONE and TWO, reported
> ONE on line 5
> TWO on line 5
> It can be argued that the occurence of ONE starts on line 3, so it
> would be better to report that line number.  But since TWO is
> expanded ``inside'' the expansion of ONE, the ``more friendly'' line
> number output would be:
> ONE on line 3
> TWO on line 3

Hmm, I agree with your idea that it would be nicer to have ALL expansion
text remember the effective line number of the point that triggered the
macro expansion, rather than the current line number of the next character
peeked at to ensure that a macro expansion was called for.  I'll see if I
can hack that idea in.

> It can be tricky to achieve that goal, but I believe it is possible.

We're already half-way there, because m4wrap'd text now remembers what the
location was when the text was added to the wrap stack.  It's just a
matter of propagating that to all macro expansions.

> But current m4 goes only half-way, saying:
> ONE on line 3
> TWO on line 5
> I beleive that this is not worth the incompatibility hassle, and I
> would humbly suggest backing out this change.  (Or completing it,
> as sugested above.)
> What do you think?
>       Stepan

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

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