alloca for V.4?

Piercarlo Grandi pcg at cs.aber.ac.uk
Tue Oct 23 07:44:23 AEST 1990


On 18 Oct 90 03:04:13 GMT, vrs at lint.hf.intel.com.ogi.edu said:

vrs> I suspect (not know, but suspect) not.  The compiler in V.4 is so
vrs> optimizing that the output code doesn't resemble the input source
vrs> all that much.  In particular, the compiler plays fast and loose
vrs> with stack frames, especially when inlining.  This isn't really a
vrs> V.4 issue, since a sufficiently optimizing compiler could/would
vrs> have done the same thing on V.3.

Actually the optimizer of the stock compiler for V.3.2 does automatic
inlining of small procedures by default, and if you want to use alloca()
reliably you must turn off inlining with '-W2,-y0' if you specify '-O'.

vrs> It just happens that the compiler on V.3 was not so smart, and
vrs> alloca was still possible.

alloca() is in SVR4, but in a place that is as improbable as -lPW in
V.3.2; I seem to remember somebody saying it is in -lucb.
--
Piercarlo "Peter" Grandi           | ARPA: pcg%uk.ac.aber.cs at nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcsun!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg at cs.aber.ac.uk



More information about the Comp.unix.sysv386 mailing list