alloca for V.4?

vrs at lint.hf.intel.com.ogi.edu vrs at lint.hf.intel.com.ogi.edu
Thu Oct 18 13:04:13 AEST 1990


In article <2064 at sixhub.UUCP>, davidsen at sixhub.UUCP (Wm E. Davidsen Jr) writes:
>  Has anyone written an alloca for V.4? In spite of all the work done
>for compatibility, there doesn't seem to be any library which has one.
>Don't tell me to RTFM, it's miles away and I'm here trying to port a
>program. I have alloca for Xenix, but not for V.4.

I suspect (not know, but suspect) not.  The compiler in V.4 is so optimizing
that the output code doesn't resemble the input source all that much.  In
particular, the compiler plays fast and loose with stack frames, especially
when inlining.  This isn't really a V.4 issue, since a sufficiently optimizing
compiler could/would have done the same thing on V.3.  It just happens that
the compiler on V.3 was not so smart, and alloca was still possible.  Since
it was possible, it was in fact done, and there was an alloca in the library,
for those occasional programs that wanted it.

If you want to, you can install your V.3 compiler and use that to bring up
your application.  Unfortunately, the promise was binary compatibility.
Source compatibility was sacrificed where there appeared to be compelling
reasons to do so.

On the upside, a lot of source compatibility features were *added*.  You'll
like that the next time you are porting source from a BSD based environment.
Stay away expecially from undocumented features (like alloca).

>"Stupidity, like virtue, is its own reward" -me
That is for sure.

	Vince



More information about the Comp.unix.sysv386 mailing list