bug-autoconf
[Top][All Lists]
Advanced

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

Re: 2.62 AT_SETUP limitations


From: Eric Blake
Subject: Re: 2.62 AT_SETUP limitations
Date: Wed, 23 Apr 2008 22:49:05 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Joel E. Denny <jdenny <at> ces.clemson.edu> writes:

> Or maybe just a regexp engine test with a character class containing 
> operators accidentally in the above order:
> 
>   AT_SETUP([[Regexp Test: [-=<{()}>!+]]])
> 
> I find it rarely pays to play the guessing game of "surely the user will 
> never do *this*".  Moreover, I'm betting that the user will never guess 
> that this bizarre string is actually special to autotest.

Magic line-noise strings don't just affect autotest, but all m4sugar-based 
languages, including autoconf itself.

This is not a new limitation - m4_split has had the same limitation of a magic 
string for a long time now (in fact, my patch this morning merely modified 
m4_split by changing its quote string from 4 to 5 characters, so that the same 
string would be used in both and that m4_split is now 1 character safer than it 
used to be, rather than inventing a new string and doubling the chance of 
arbitrary collision with the user).  For that matter, prior to 2.62, m4_split 
was even more likely to collide, when its magic strings were `` and '' rather 
than 2.62's -=<{ and }>=- (there's even a test I added in the 2.62 testsuite 
that intentionally tickles the collision problem with the old strings).

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=10fa310

>  At the very 
> least, can this new limitation be mentioned in the manual?  Or did I miss 
> it?

So yes, it would probably be worth adding a blurb in the m4sugar documentation 
that these two quote strings are special, and that @&t@ will allow you to use 
them in an unbalanced manner if you really need them.  Patch to follow when I 
get the time.  And I'm open to changing the string to something even more 
implausible, as long as both m4_split and m4_expand use the same string pairs, 
the two strings look reasonably symmetric, and the two strings contain the 
appropriate () needed by m4_expand.

On a related note, config.status used to use the special string |#_!!_#| on the 
assumption the user would never do that, but our move to awk in 2.62 rendered 
that magic string obsolete.

-- 
Eric Blake






reply via email to

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