[Top][All Lists]

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

Re: branch-1_4 another round of POSIX cleanup

From: Gary V. Vaughan
Subject: Re: branch-1_4 another round of POSIX cleanup
Date: Thu, 13 Jul 2006 15:44:38 +0100
User-agent: Thunderbird (X11/20060615)

Hi Eric!

Eric Blake wrote:
Lots of little semantic bugs in our handling of numeric arguments.
> [[fixing of many fine bugs detailed]]

I continue to be both appalled and amazed at how many little bugs have
gone unnoticed in M4 for more than a decade!

There is also another POSIX incompatibility that I did not fix, but just
documented for now.  POSIX requires, and Solaris agreed, that
translit(abcd,a-d,e-h) should result in ebch, not efgh.  In other words,
the range operator of GNU m4 is an incompatible extension.

I can't find any code that uses the GNU range extension to translit in the wild (I didn't look terribly hard mind you). If you would prefer, I
don't see a problem with following POSIX semantics with POSIXLY_CORRECT

However, you
can also achieve range transliteration with patsubst.  Maybe what we
should do on the 1.4.x branch is mark the range operation of translit as
deprecated, issuing a warning and stating that in a future release it will
have POSIX semantics, but producing the same expansion; then fix translit
to obey POSIX on CVS head.  But I'd like some feedback before I attempt that.

On head we can support both.  We can have a translit builtin in the gnu
module which continues to behave as 1.4.x translit (possibly including
paying attention to POSIXLY_CORRECT).  We can also write a new posix
module that has a posix compliant implementation of translit (among others) regardless of the POSIXLY_CORRECT setting. The user can then
choose among the available options according to the most recently loaded
module :-)

If we do that, no warning is necessary, as the default build of m4-2.0
will continue to work in the same way that m4-1.4.x has been behaving.

Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://blog.azazil.net
GNU Hacker           / )=   http://trac.azazil.net/projects/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

reply via email to

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