m4: Limits control
1
1 2.3 Command line options for limits control
1 ===========================================
1
1 There are some limits within 'm4' that can be tuned. For compatibility,
1 'm4' also accepts some options that control limits in other
1 implementations, but which are automatically unbounded (limited only by
1 your hardware and operating system constraints) in GNU 'm4'.
1
1 '-g'
1 '--gnu'
1 Enable all the extensions in this implementation. In this release
1 of M4, this option is always on by default; it is currently only
1 useful when overriding a prior use of '--traditional'. However,
1 having GNU behavior as default makes it impossible to write a
1 strictly POSIX-compliant client that avoids all incompatible GNU M4
1 extensions, since such a client would have to use the non-POSIX
1 command-line option to force full POSIX behavior. Thus, a future
1 version of M4 will be changed to implicitly use the option
1 '--traditional' if the environment variable 'POSIXLY_CORRECT' is
1 set. Projects that intentionally use GNU extensions should
1 consider using '--gnu' to state their intentions, so that the
1 project will not mysteriously break if the user upgrades to a newer
1 M4 and has 'POSIXLY_CORRECT' set in their environment.
1
1 '-G'
1 '--traditional'
1 Suppress all the extensions made in this implementation, compared
1 to the System V version. ⇒Compatibility, for a list of
1 these.
1
1 '-H NUM'
1 '--hashsize=NUM'
1 Make the internal hash table for symbol lookup be NUM entries big.
1 For better performance, the number should be prime, but this is not
1 checked. The default is 509 entries. It should not be necessary
1 to increase this value, unless you define an excessive number of
1 macros.
1
1 '-L NUM'
1 '--nesting-limit=NUM'
1 Artificially limit the nesting of macro calls to NUM levels,
1 stopping program execution if this limit is ever exceeded. When
1 not specified, nesting defaults to unlimited on platforms that can
1 detect stack overflow, and to 1024 levels otherwise. A value of
1 zero means unlimited; but then heavily nested code could
1 potentially cause a stack overflow.
1
1 The precise effect of this option is more correctly associated with
1 textual nesting than dynamic recursion. It has been useful when
1 some complex 'm4' input was generated by mechanical means, and also
1 in diagnosing recursive algorithms that do not scale well. Most
1 users never need to change this option from its default.
1
1 This option does _not_ have the ability to break endless rescanning
1 loops, since these do not necessarily consume much memory or stack
1 space. Through clever usage of rescanning loops, one can request
1 complex, time-consuming computations from 'm4' with useful results.
1 Putting limitations in this area would break 'm4' power. There are
1 many pathological cases: 'define(`a', `a')a' is only the simplest
1 example (but ⇒Compatibility). Expecting GNU 'm4' to detect
1 these would be a little like expecting a compiler system to detect
1 and diagnose endless loops: it is a quite _hard_ problem in
1 general, if not undecidable!
1
1 '-B NUM'
1 '-S NUM'
1 '-T NUM'
1 These options are present for compatibility with System V 'm4', but
1 do nothing in this implementation. They may disappear in future
1 releases, and issue a warning to that effect.
1
1 '-N NUM'
1 '--diversions=NUM'
1 These options are present only for compatibility with previous
1 versions of GNU 'm4', and were controlling the number of possible
1 diversions which could be used at the same time. They do nothing,
1 because there is no fixed limit anymore. They may disappear in
1 future releases, and issue a warning to that effect.
1