Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Future of C Date: Wed, 14 Mar 2018 13:37:34 -0700 Organization: None to speak of Lines: 72 Message-ID: References: <0231327b-9e28-46e4-9178-46c881a8dd91@googlegroups.com> <20180311000302.8e7cd15242a818ab75eb2e98@gmail.com> <83527acf-abed-4f8f-878c-7d4db9cd5ac1@googlegroups.com> <20180311161525.ac591de531b83d6b14b2cd43@gmail.com> <90236828-48d7-4ee5-9b86-4cedd0e29b5f@googlegroups.com> <3r7jne-t3h.ln1@gangtai.grep.be> <8e201938-ada4-42d9-8ae6-13b1047306e2@googlegroups.com> <0iXpC.1451$kF1.89@fx41.am4> <40d27639-bea8-460a-add2-f5ad2f26cbdc@googlegroups.com> <5e80c990-fe53-4d7e-8a81-bc411cc21d76@googlegroups.com> <2ac9ccf7-5b25-4822-8dbd-5b749bed2c07@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="afe9607107c97cf059941548cf335e32"; logging-data="8665"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+igdBQPgc8TqZ6jz/PJibw" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:V6JOYWW28nG601Jk0r227uTOHWI= sha1:QbZA57qAaX7xgqL7pPXES4pEA2s= Xref: csiph.com comp.lang.c:127819 supercat@casperkitty.com writes: > On Wednesday, March 14, 2018 at 2:12:37 PM UTC-5, Keith Thompson wrote: >> supercat@casperkitty.com writes: >> > Nothing in the C Standard requires that an implementation have a >> > contiguously-addressable stack, much less a frame pointer. >> >> True. But something in the C standard (at least in the 1999 edition) >> *does* require support for VLAs. I haven't heard about any compiler >> implementers who wanted to support C99 having any particularly >> difficulty supporting VLAs. > > Many implementations supported many features of C99 without supporting > all, and many C99 features are widely supported among such implementations, > but VLA support seems conspicuously absent. Vague generalities with no concrete examples. > It might be worthwhile to define a standard for "full-featured" and > "limited" implementations, and a category of programs that are portable to [snip] >> If you can cite a C implementation whose maintainers had great >> difficulty implementing VLAs in a reasonable manner, then you might >> have a valid point. I infer from your failure to cite an example that you can't. > The range of platforms with full C99 implementations is more limited > than the range of platforms for which C99-ish implementations are > available. The fact that C99-ish implementations consistently leave > out VLAs suggests that their perceived value is insufficient to justify > the cost. TinyC does not fully support C99, but it does support VLAs. MSVC does not support C99. As I understand it, the intent was to support C99 features that are also C++ features. That would explain why they didn't bother to implement VLAs. [...] >> And of course VLAs are optional in C11, so your wish has been granted. > > Good. I don't think so. >> (I've never seen a good explanation for making VLAs optional in >> C11, and there's no official C11 Rationale document. Could it be >> that some implementer requested that change because implementing >> VLAs would have been unreasonably difficult? Does anyone have any >> further information?) > > That would seem a likely reason. And I presume you have no evidence to back up that statement. Here's my hypothesis. VLAs are not inordinately difficult to implement in any existing C compiler. The effort is, of course, non-zero, which is enough reason for some compilers (those that don't attempt to fully support C99) not to bother. This hypothesis could very well be incorrect. I invite you to refute it -- not with speculation or as part of a larger rant, but with one or more concrete examples. (The fact that VLAs were made optional in C11 suggests, but only weakly, that there may be such an example.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"