r179949 - VLAs in C++14!

Richard Smith richard at metafoo.co.uk
Sat Apr 20 06:45:08 PDT 2013


On Sat, Apr 20, 2013 at 6:33 AM, Stephen Lin <swlin at post.harvard.edu> wrote:

> Oh dear, are they adopting the runtime-evaluated "sizeof" too??


No. The rules are quite restrictive.

VLA types can only be used for automatic storage duration variables (no
typedefs, no template arguments, no VLAIS, ...). Unlike in C, the array
bound is *not* part of the type, but this is not observable, since the
variable cannot be used in sizeof, decltype, can't be deduced as a template
argument, etc.


> On Sat, Apr 20, 2013 at 9:20 AM, Richard Smith
> <richard-llvm at metafoo.co.uk> wrote:
> > Author: rsmith
> > Date: Sat Apr 20 08:20:33 2013
> > New Revision: 179949
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=179949&view=rev
> > Log:
> > VLAs in C++14!
> >
> > Modified:
> >     cfe/trunk/www/cxx_status.html
> >
> > Modified: cfe/trunk/www/cxx_status.html
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_status.html?rev=179949&r1=179948&r2=179949&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/www/cxx_status.html (original)
> > +++ cfe/trunk/www/cxx_status.html Sat Apr 20 08:20:33 2013
> > @@ -427,7 +427,7 @@ available.</p>
> >        <td class="none" align="center">No</td>
> >      </tr>
> >      <tr>
> > -      <td>[PROVISIONAL] Runtime-sized arrays with automatic storage
> duration</td>
> > +      <td>Runtime-sized arrays with automatic storage duration</td>
> >        <td><a href="
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3639.html
> ">N3639</a></td>
> >        <td class="none" align="center">Partial</td>
> >      </tr>
> > @@ -459,7 +459,7 @@ available.</p>
> >      <tr>
> >        <td>Clarifying memory allocation</td>
> >        <td><a href="
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html
> ">N3664</a></td>
> > -      <td class="none" align="center">No</td>
> > +      <td class="none" align="center">Partial</td>
> >      </tr>
> >  </table>
> >
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130420/92ee8a5e/attachment.html>


More information about the cfe-commits mailing list