New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 9394 - ABI for static arrays is outdated #262
Conversation
$(P Passing abc to functions results in these implicit conversions:) | ||
|
||
--------- | ||
void func(int* p); // abc is converted to a pointer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still true in D2, as is the code below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. In current, static array value is implicitly converted to pointer or dynamic array type on function argument.
But it is a implicit conversion feature, and it does not directly related to ABI.
And static array to pointer conversion is already deprecated.
https://github.com/D-Programming-Language/dmd/blob/master/src/mtype.c#L55
https://github.com/D-Programming-Language/dmd/blob/master/src/mtype.c#L4050
So, to remove these lines is reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I asked about it in the newsgroup I didn't get replies from Walter/Andrei, but I do agree with the deprecation. Anyway this needs to be added to the deprecation page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, you can use Currently
when you want to say In current
. People will understand you better this way. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, it has not been mentioned yet in http://dlang.org/deprecate .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your teaches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recent reported regression issue 9539 has been caused by the deprecated implicit conversion T[] to T_.
I think it's a good time to remove such conversions, both T[n] to T_ and T[] to T*, completely (I think it is necessary for the regression fix).
See dlang/dmd#1679 and related my bugzilla comment.
Almost of "Reference Types" section is outdated in D2.
Ok LGTM. |
Issue 9394 - ABI for static arrays is outdated
http://d.puremagic.com/issues/show_bug.cgi?id=9394
Almost of "Reference Types" section is outdated in D2.