[Top][All Lists]

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

Re: popdef(undefined), __m4_version__

From: Eric Blake
Subject: Re: popdef(undefined), __m4_version__
Date: Sun, 03 Aug 2008 17:39:33 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20080708 Thunderbird/ Mnenhy/

Hash: SHA1

According to Gary V. Vaughan on 7/31/2008 2:17 AM:

Hi Gary, Ralf, ...

| I would say that it is pretty important for m4-1.6 (and, when we
| eventually get there, m4-2.0) to support the majority of whatever
| commonly installed autotool releases are prevalent at the time of
| release, right out of the box.

| That's not to say the default mode need necessarily be compatible, but
| at least detecting that we are running inside autoconf and setting the
| right options to work without patching would be the kindest thing to
| do.

You are doing a good job of convincing me that the inability of m4 1.6 to
work with unpatched autoconf 2.62 is bad.  Here's my current idea:

In m4, add a new debugmode() letter (perhaps 'd' for dereference), then
condition all warnings related to dereferencing undefined macros on that
option being set.  Right now, if you don't use m4 -d, you default to a
debugmode of ""; we could change this to default to a debugmode of "d", so
that a vanilla user of m4 gets the warning.  Likewise, 'm4 -d' was
equivalent to 'm4 -daeq'; it would now be equivalent to 'm4 -dadeq'.

Autoconf, on the other hand, (well, m4sugar in general, including bison)
uses an explicit -daflq option when invoking m4, which does _not_ include
the new letter 'd', so it would not get the warnings.  For 2.60-2.62, that
means that m4 1.6 would then work out of the box.  But within m4sugar
2.63, at m4sugar_init time, we are already doing 1.6 detection (in order
to enable O(n) algorithms for 1.4.x, while avoiding $10 for 1.6).  So it
would be trivial to add yet another 1.6 action, where we call
m4_debugmode([+d]) to turn on warnings for dereferencing of undefined
macros.  Thus, m4sugar 2.63 can use the faster native implementation
rather than wrappers by enabling the new option, while the option starts
life in such a state that older versions are not impacted by the existence
of the new warnings (and thus, my current patch on autoconf branch-2.62
would be OBE, only necessary for the small window of unreleased m4 that
warned by default rather than providing a configuration knob).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
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


reply via email to

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