Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucselx!petunia!kestrel.edu!gyro From: gyro@kestrel.edu (Scott Layson Burson) Newsgroups: comp.std.c++ Subject: Creeping feature #769: `new auto' Keywords: dynamic stack allocation, alloca Message-ID: <1991May2.074928.25507@kestrel.edu> Date: 2 May 91 07:49:28 GMT Distribution: comp.std.c++ Organization: Kestrel Institute, Palo Alto, CA Lines: 23 It struck me today that it would be awfully nice to have a high level, type-safe interface to `alloca' (which allocates a block of memory of specified size in the caller's stack frame). A syntax is easily enough come by: `new auto '. This probably won't fly, since `alloca' is not in the ANSI library and may be difficult to write for some implementations (though I can't think why offhand), and so it will probably be considered something that shouldn't be required in a C++ implementation. Besides, any particular implementation can provide this functionality, by overloading `::operator new'. (On the other hand, different implementors may choose different "placement" argument types to specify stack allocation, and it would be nice if this were at least semi-standard.) Anyhow, caveats notwithstanding, having thought of this I couldn't resist mentioning it. -- Scott Gyro@Reasoning.COM