autoconf-patches
[Top][All Lists]
Advanced

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

Re: M4 syntax $11 vs. ${11}


From: Eric Blake
Subject: Re: M4 syntax $11 vs. ${11}
Date: Wed, 31 Jan 2007 19:58:48 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 1/31/2007 12:18 PM:

Hi Ralf, and thanks for the review,

Limiting to just one of your points:

> 
> I tried your warnings now:
> 
> cat >aclocal.m4 <<\EOF
> AC_DEFUN([Y], [${1}])
> define([Z], [${1}])
> EOF
> cat >configure.ac <<\EOF
> AC_INIT
> AC_DEFUN([X], [${1}])
> EOF
> M4=m4\ --warn-syntax autoconf
> | m4:aclocal.m4:1: Warning: semantics of `${1...}' in `Y' will change
> 
> Why do I get only one warning, and only get the next one, once I fix the
> first?  

That's because autom4te uses 'm4 -E', which is currently set to fail on
the first warning issued by m4.  For earlier versions of m4, this was a
necessity (m4 used to not track whether it had issued warnings, so without
an instant exit, the warning would be issued but the exit status still 0).
 But perhaps it is time to make m4 1.4.9 plow on to the end of input, and
only at the very end, exit with non-zero status if a warning was issued?
The -E option would still make a difference (whether errors are fatal or
not), but not such a drastic one (where the first error is fatal to the
exclusion of further execution).  Or a compromise, where '-E' affects exit
status but proceeds, and '-E -E' causes the current instant exit that the
current '-E' used to provide.

> Fixing one-by-one is very frustrating for users.

Agreed.  It took me a while to find all the false positives in autoconf,
automake, and libtool, particularly when my first cut at the patch was
even more vocal about plain '${', with the one-by-one approach.

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

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

iD8DBQFFwVdn84KuGfSFAYARAoTxAKCcYBOgHZu1sH7FR5lD5qUWaZQfxwCfTgm6
LVNEPw6Fz1XCP2IYkxPLlTE=
=Zmqr
-----END PGP SIGNATURE-----




reply via email to

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