This is the mail archive of the
mailing list for the GCC project.
Re: system.h and system header include cleanup - ORTHOGONAL POINTS
On Nov 27 2010, Joseph S. Myers wrote:
Thanks very much.
I don't think anything (at least anything built for the host) in GCC,
whether needed for bootstrapping or not, should be using VLAs; it's the
combination of the two that is documented as reducing the lifetime of
memory from alloca when building with GCC:
I agree that using both is doubleplus ungood. If existing code uses the
wider scope of alloca, then not using VLAs is the only sane approach.
While VLAs are much cleaner and potentially much more efficient, I think
that the description you gave and I snipped seriously underestimates the
problems, in general. I have seen similar combinations (in other languages)
cause memory leaks, for example, and it wouldn't surprise me if that
happened with some C compilers/libraries and that combination. They each
'poison' the other.