Path: utzoo!attcan!uunet!mcsun!ukc!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.unix.sysv386 Subject: Re: alloca for V.4? Message-ID: Date: 22 Oct 90 21:44:23 GMT References: <2064@sixhub.UUCP> <1457@gandalf.littlei.UUCP> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 22 In-reply-to: vrs@lint.hf.intel.com.ogi.edu's message of 18 Oct 90 03:04:13 GMT On 18 Oct 90 03:04:13 GMT, vrs@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@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk