On Fri, Dec 05, 2014 at 09:02:46PM +0000, Gary V. Vaughan wrote:
> If there's a way to at least diagnose negative arguments rather than silently
> change behavior, that would save other projects some migration headaches...

We could diagnose one of the m4 uses of obstack_blank at compile time,
but not the one in m4/macro.c:trace_flush which has a non-constant
shrink value..

Yes, I agree this can cause some pain, but at least dying with
out-of-memory is a loud symptom.

The alternative is to do as Paul suggested and make obstack_blank
accept a negative length argument, but that would
- kill >2G obstacks on 32-bit targets,
- lose the nice symmetry with other obstack functions,
and obstack_blank_fast is the right interface to use for shrinking.

-- 
Alan Modra
Australia Development Lab, IBM

Reply via email to