Bug 9394 – ABI for static arrays is outdated

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-25T16:14:00Z
Last change time
2013-02-07T04:55:54Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2013-01-25T16:14:49Z
Quote: --------- int[3] abc; --------- $(P Passing abc to functions results in these implicit conversions:) --------- void func(int[3] array); // actually <reference to><array[3] of><int> void func(int* p); // abc is converted to a pointer // to the first element void func(int[] array); // abc is converted to a dynamic array --------- w.r.t. comments: For the first func: This is only true in D1. For the second func: I didn't even know worked in D2. But I don't see the benefit of such a conversion (perhaps interfacing with C?). For he third func: I thought we always had to use a slice, but it seems to work without it. How come?
Comment #1 by github-bugzilla — 2013-02-06T20:04:52Z
Commits pushed to master at https://github.com/D-Programming-Language/d-programming-language.org https://github.com/D-Programming-Language/d-programming-language.org/commit/50381d3356dfa5fea7cc186ddc1cf9c002d5180d Fixes Issue 9394 - Fix static array ABI. Static arrays are not implicitly converted to references in D2. https://github.com/D-Programming-Language/d-programming-language.org/commit/49e28977b1f36d5af591a77a078fa6922a5bbd1e Merge pull request #258 from AndrejMitrovic/Fix9394 Issue 9394 - Fix static array ABI.
Comment #2 by k.hara.pg — 2013-02-06T20:44:07Z
Comment #3 by github-bugzilla — 2013-02-07T04:55:28Z
Commits pushed to master at https://github.com/D-Programming-Language/d-programming-language.org https://github.com/D-Programming-Language/d-programming-language.org/commit/a6324ef708fa7922b87251eeeb98322d3da22382 fix Issue 9394 - ABI for static arrays is outdated Almost of "Reference Types" section is outdated in D2. https://github.com/D-Programming-Language/d-programming-language.org/commit/20152e47f2651308268eec487c697769a96c7e9a Merge pull request #262 from 9rnsr/fix9394 Issue 9394 - ABI for static arrays is outdated