Path: csiph.com!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 17:09:01 -0700 Organization: None to speak of Lines: 46 Message-ID: References: <0231327b-9e28-46e4-9178-46c881a8dd91@googlegroups.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="4062d3804107f3b0a8439aa53526a52c"; logging-data="30402"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VfEOoE9L8PRDCX4/WAh4T" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:tT0udQldjSXsDKPhRCdoOp6f6So= sha1:WbWlJE1UiM62e+Snom6WapuVpvI= Xref: csiph.com comp.lang.c:127829 supercat@casperkitty.com writes: > On Wednesday, March 14, 2018 at 5:28:06 PM UTC-5, Keith Thompson wrote: >> You've still provided no examples, only speculation. > > How would you go about efficiently supporting VLAs on small micro which > statically-allocates automatic variables, and handles recursion--if so > configured--by copying variables to storage which can only be efficiently > handled sequentially (as was the case IIRC with Archimedes v4 for the 8x51). > That development system's floating point was insufficiently precise to > qualify for a "double", but I think it otherwise conformed to C89 and would > probably have been adaptable to support all C99 features except VLAs, > though "long long" would likely have been more trouble than it was worth. I don't know. Of course support for recursion is mandatory, and the implementers apparently went to the trouble to support it. A quick Google search indicates that the compiler in question has been abandoned (I'm not certain of this). It probably just supports C89/C90. If someone were to take that compiler and update it to support C99, how much of that effort would be required to implement VLAs? I have no idea; if you don't know either, then you're just speculating. > How would you go about easily retrofitting VLA support in an existing > compiler whose type descriptors are designed around the assumption that > types have constant sizes? Presumably by redesigning the type descriptors so they don't make that assumption. But this is still hypothetical. Do you know of a real world compiler that would have that issue? I'm really not interested in your speculation about why some compilers *might* have difficulty implementing VLAs. > I would think there would be benefits to having a defined path by which a > compiler could support some features from a new standard without having to > support all. N1570 6.10.8.3 defines macros that specify support or non-support for 8 different features. (But C99 is hardly "new".) -- 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"