Skip to content
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

fix Issue 22807 - ImportC: Array index is out of bounds for old-style… #13746

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

WalterBright
Copy link
Member

… flexible arrays

C code relies on indexing beyond the end of the array. But just blanket allowing this means CTFE won't work with arrays. So we just suppress the error only if an array literal is not being indexed.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
22807 minor ImportC: Array index is out of bounds for old-style flexible arrays.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#13746"

@RazvanN7 RazvanN7 merged commit d396d53 into dlang:master Mar 4, 2022
@WalterBright WalterBright deleted the fix22807 branch March 4, 2022 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants