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 14992 - static array local variables always require .init #5014
Conversation
Thanks, would you say that this makes dlang/druntime#1372 unnecessary or are there cases in which it will still be needed? |
Currently, typeinfo object for struct should be generated on demand. So, such the interface modules for C library bindings do not have to be compiled and included in druntime. |
* memset(&sarray, 0, struct.sizeof) | ||
*/ | ||
elem *ey = NULL; | ||
unsigned sz = ae->e1->type->size(); |
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.
Should be targ_size_t
, not unsigned
.
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.
Fixed.
|
Add one more special case for static array of struct initialization with zero, similar to the special case for struct initialization.
Nice optimization. :-) |
Auto-merge toggled on |
Issue 14992 - static array local variables always require .init
Please do refactorings as SEPARATE PRs |
https://issues.dlang.org/show_bug.cgi?id=14992
Add one more special case for static array of struct initialization with zero, similar to the special case for struct initialization.