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

Paul Eggert <[email protected]>
Newsgroups gmane.comp.sysutils.automake.general,gmane.comp.gnu.m4.general,gmane.comp.gnu.m4.patches,gmane.comp.sysutils.autoconf.general
Message-ID <[email protected]>
Eric Blake <[email protected]> writes:

> +  /* This warning must not kill m4 -E, or it will break autoconf.  */
> +  if (text && strstr (text, "${"))
> +    M4ERROR ((0, 0, "Warning: raw `${' in defn of %s will change semantics",
> +	      name));

This warning will generate a lot of false positives, right?
Most of the time, a stray ${ in an M4 file won't be followed
by a series of digits and then a }.  So it will be treated
as itself (for backward compatibility).

I suggest having the warning complain only about ${X}, where X is a
string of one or more ASCII digits.  It shouldn't complain about
other usages of ${.  If you do it that way, you shouldn't need
to change either Autoconf or Automake.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.