m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/doc/m4.texinfo,v [branch-1_4]


From: Eric Blake
Subject: Changes to m4/doc/m4.texinfo,v [branch-1_4]
Date: Thu, 08 Feb 2007 14:52:30 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      07/02/08 14:52:29

Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.1.1.1.2.113
retrieving revision 1.1.1.1.2.114
diff -u -b -r1.1.1.1.2.113 -r1.1.1.1.2.114
--- doc/m4.texinfo      5 Feb 2007 13:25:06 -0000       1.1.1.1.2.113
+++ doc/m4.texinfo      8 Feb 2007 14:52:29 -0000       1.1.1.1.2.114
@@ -584,12 +584,19 @@
 Suppress warnings, such as missing or superfluous arguments in macro
 calls, or treating the empty string as zero.
 
address@hidden --warn-syntax
-Issue warnings when syntax is encountered that will change semantics in
address@hidden M4 2.0.  For now, the only semantics that will change have
-to do with how more than 9 arguments in a macro definition are handled
-(@pxref{Arguments}).  This warning is disabled by default because it
-triggers spurious failures in @acronym{GNU} Autoconf 2.61.
address@hidden address@hidden@address@hidden
+Issue a warning if the regular expression @var{REGEXP} has a non-empty
+match in any macro definition (either by @code{define} or
address@hidden).  Empty matches are ignored; therefore, supplying the
+empty string as @var{REGEXP} disables any warning.  If the optional
address@hidden is not supplied, then the default regular expression is
address@hidden(@address@hidden@}\|[0-9][0-9]+\)} (a literal @samp{$} followed
+by multiple digits or by an open brace and a digit), since these
+sequences will change semantics in the default operation of
address@hidden M4 2.0 (due to a change in how more than 9 arguments in a
+macro definition will be handled, @pxref{Arguments}).  Providing an
+alternate regular expression can provide a useful reverse lookup feature
+of finding where a macro is defined to have a given definition.
 
 @item -W @var{REGEXP}
 @itemx address@hidden
@@ -1635,13 +1642,24 @@
 
 To help you detect places in your M4 input files that might change in
 behavior due to the changed behavior of M4 2.0, you can use the
address@hidden command-line option (@pxref{Operation modes, ,
-Invoking m4}).  This will add a warning any time a macro definition
-includes @samp{$} followed by multiple digits, or by @address@hidden and a
-digit.  The warning is not enabled by default, because it triggers a
-number of warnings in Autoconf 2.61 (and Autoconf uses @option{-E} to
-treat warnings as errors), and because it will still be possible to
-restore traditional behavior in M4 2.0.
address@hidden command-line option (@pxref{Operation
+modes, , Invoking m4}) with the default regular expression.  This will
+add a warning any time a macro definition includes @samp{$} followed by
+multiple digits, or by @address@hidden and a digit.  The warning is not
+enabled by default, because it triggers a number of warnings in Autoconf
+2.61 (and Autoconf uses @option{-E} to treat warnings as errors), and
+because it will still be possible to restore older behavior in M4 2.0.
+
address@hidden ignore
address@hidden
+$ @kbd{m4 --warn-macro-sequence}
+define(`foo', `$001 address@hidden@} $1')
address@hidden:stdin:1: Warning: definition of `foo' contains sequence `$001'
address@hidden:stdin:1: Warning: definition of `foo' contains sequence 
address@hidden@}'
address@hidden
+foo(`bar')
address@hidden address@hidden@} bar
address@hidden example
 
 @node Pseudo Arguments
 @section Special arguments to macros




reply via email to

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