[Issue 5348] Variable Length Arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 28 13:02:11 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=5348


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
           Platform|Other                       |All
         Resolution|                            |WONTFIX
         OS/Version|Windows                     |All


--- Comment #8 from Walter Bright <bugzilla at digitalmars.com> 2013-03-28 13:02:08 PDT ---
1. VLAs are a failure in C99.

2. I'd prefer to deal with stack allocated arrays by optimization rather than
new syntax & semantics, i.e.:

    int[] array = new int[5];

and determining that array[] can never leave its scope, and so can be allocated
on the stack.

3. Consider that static arrays are passed by value to functions, rather than by
reference. VLAs for static arrays mess this up.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list