[Issue 4599] New: Error messages with missing memory for array operations
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 8 14:29:14 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4599
Summary: Error messages with missing memory for array
operations
Product: D
Version: D1 & D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-08-08 14:29:12 PDT ---
(I don't know where to file this, so I open a new bug report, sorry if it is a
duplicated.)
I'd like DMD 2.047 to catch this bug at compile time (so this is more an
enhancement request):
import std.stdio: writeln;
void main() {
double[] a = [1];
writeln(a[] + 1); // access violation
}
----------------
This prints nothing and raises no compile-time or run-time errors (this is more
like a bug):
import std.stdio: writeln;
void main() {
int[] a1 = [1, 2];
int[] a2 = [3, 4];
int[] a3;
a3[] = a1[] + a2[];
writeln(a3);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list