[Issue 22970] New: importC: taking address one past array end gives bounds error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 2 20:53:06 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22970
Issue ID: 22970
Summary: importC: taking address one past array end gives
bounds error
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: ImportC, rejects-valid
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: duser at neet.fi
CC: duser at neet.fi
int xs[5];
void fn()
{
for (int *p = &xs[0]; p < &xs[5]; p++)
;
}
Error: array index 5 is out of bounds `[0..5]`
--
More information about the Digitalmars-d-bugs
mailing list