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.
 
[EMAIL PROTECTED] --warn-syntax
-Issue warnings when syntax is encountered that will change semantics in
[EMAIL PROTECTED] 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.
[EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]
+Issue a warning if the regular expression @var{REGEXP} has a non-empty
+match in any macro definition (either by @code{define} or
[EMAIL PROTECTED]).  Empty matches are ignored; therefore, supplying the
+empty string as @var{REGEXP} disables any warning.  If the optional
[EMAIL PROTECTED] is not supplied, then the default regular expression is
[EMAIL PROTECTED](@[EMAIL PROTECTED]@}\|[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
[EMAIL PROTECTED] 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 [EMAIL PROTECTED]
@@ -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
[EMAIL PROTECTED] 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 @[EMAIL PROTECTED] 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.
[EMAIL PROTECTED] 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 @[EMAIL PROTECTED] 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.
+
[EMAIL PROTECTED] ignore
[EMAIL PROTECTED]
+$ @kbd{m4 --warn-macro-sequence}
+define(`foo', `$001 [EMAIL PROTECTED]@} $1')
[EMAIL PROTECTED]:stdin:1: Warning: definition of `foo' contains sequence `$001'
[EMAIL PROTECTED]:stdin:1: Warning: definition of `foo' contains sequence 
[EMAIL PROTECTED]@}'
[EMAIL PROTECTED]
+foo(`bar')
[EMAIL PROTECTED] [EMAIL PROTECTED]@} bar
[EMAIL PROTECTED] example
 
 @node Pseudo Arguments
 @section Special arguments to macros


Reply via email to