TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: David Nugent
from: Peter Collis
date: 1996-06-27 18:39:24
subject: Find a word

While listening to David Nugent Pete heard:Find a word

G'day David

 > I've always assumed QC and MSC-6 shared some of the help files, If
 > you have MSC6 installed check out the online help for alloca() and
 > see if the warning about BP/SP is mentioned.

 DN> I don't have it installed now, but when I did use those versions
 DN> of MSC, I used alloca() regularly without any problems - at the
 DN> highest optimisation levels. I *did* have to avoid some
 DN> optimisation, but only because of MSC 5.x and above's broken
 DN> string intrinsics which had an unfortunate tendancy to blow away
 DN> register contents.

That's handy info to know, Maybe only having QC25 is a good thing
after all. :-) 

 DN> yes, under all circumstances that make any sense, the resulting
 DN> buffer from alloca should be assigned to an auto variable. The
 DN> only danger from optimisation is that your local variables are
 DN> assigned to registers, but forcing the stack frame regardless
 DN> eliminates the problem. I'm not sure if you can do that with QC,
 DN> but I would have thought so. If nothing else works, then using
 DN> _pascal calling convention should do it.

AFAIK The stack frame can't be forced on with QC, maybe it's on
by default, if so it voids the warning about alloca().

 > BTW i'd assume any arguments passed to a function using alloca()
 > would force BP/SP to be setup anyway.

 DN> Except with the register calling convention  - _fastcall, I
 DN> think they called it). I'm not sure if MSC 6 has this, but MSC 7
 DN> certainly did. Sorry I didn't remember any of this until you
 DN> triggered the brain cells, but it has been some time since I
 DN> worked with MSC now.

Good point, QC supports _fastcall and register in as much as it won't
choke on them but i don't know if the compiler will optimize for them.
BTW if i keep talking like this Dave i might have you going back and
using MSC :-) 

     Pete.
     EMail:pcollis{at}ozemail.com.au


--- OMX/Blue Wave v2.12
* Origin: Gates of Hell (3:713/914.16)
SEEN-BY: 50/99 620/243 623/630 711/401 409 410 413 430 808 809 932 934
SEEN-BY: 712/508 515 713/111 317 601 611 615 618 700 826 888 914 714/906
SEEN-BY: 800/1
@PATH: 713/914 615 888 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.