Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jens Gustedt Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: C as a Subset of C++ (or C++ as a superset of C) Date: Tue, 28 Aug 2012 09:20:27 +0200 Organization: A noiseless patient Spider Lines: 19 Message-ID: <503C713B.2070400@loria.fr> References: <503A62EC.5050909@spamsink.net> <503A9824.7050805@loria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="2590e4fa64e7931a8f955de6703c052f"; logging-data="16290"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+driMM3jZlYPi5P5IucEv3GYFvU2aAiRc=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: Cancel-Lock: sha1:E2urexJ03cuPCmfmUdDgXcMic74= Xref: csiph.com comp.lang.c:25197 comp.lang.c++:17969 Am 28.08.2012 01:15, schrieb Keith Thompson: > lawrence.jones@siemens.com writes: >> What good are pointers to VLAs without VLAs? What would they point >> to??? > > I suppose you could permit VLAs with allocated storage duration > but not with automatic storage duration. (They're already not > permitted to have static storage duration.) That would remove the > case where you can define a VLA, but there's no way to handle an > allocation failure. It would also remove the case where they're > most convenient. I just don't agree on the last phrase. Pointers to VLA are very convenient in function interfaces. Jens http://gustedt.wordpress.com/2011/01/09/dont-be-afraid-of-variably-modified-types/