Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!littlei!lint.hf.intel.com!vrs From: vrs@lint.hf.intel.com.ogi.edu Newsgroups: comp.unix.sysv386 Subject: Re: alloca for V.4? Message-ID: <1457@gandalf.littlei.UUCP> Date: 18 Oct 90 03:04:13 GMT References: <2064@sixhub.UUCP> Sender: news@littlei.UUCP Reply-To: vrs@lint.hf.intel.com (Vincent R. Slyngstad) Organization: Intel Corp., IMSO UNIX Development, Hillsboro, OR Lines: 28 X-Face: B+o:kue]UeDV;3?c9Yi@prlm@4TmK%0i*z%^-C]"@=C8sEyi(lc_vOOH[\43WC!MWI{<*RC m7Jr;EigV;aE+Fz?aFTk)"]$]XnvJBUn\3B6!a1%zbkRLC-w.}[X]^*pY+tj_])d#2*pS*3*(hubv| t.[W[d%\7v>YXVML_\~70*6O=AX5#ioJj[V$WGQTeaeY In article <2064@sixhub.UUCP>, davidsen@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