----- "Mike Frysinger" <vap...@gentoo.org> wrote: > > What you're asking for is a solution to the halting problem.
> you obviously know better than i as ive never looked at the m4 > internals but > you cant even use the existing nesting-limit option ? autoconf > already runs > m4 with --nesting-limit=1024 which means m4 was told in no uncertain > terms > that it should avoid infinite loops. autoconf has made its intention > clear. --nesting-limit=1024 only catches one particular class of loops - where you have more ( than ). And that particular loop is caught because otherwise you would overflow the stack. But other loops, like defining a macro to expand to itself, do not consume any additional stack space or other memory, so the only way you can tell if it is infinite is to put a time limit on the process, but what time limit do you put that does not prevent a useful program that takes a long time but will eventually terminate? > not saying m4 should be accepting this code, just that when wrong code > is > given, clear diagnostics are expected. Agreed, when it is possible, but this is one case where I'm not sure it is possible. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org