[Issue 8842] New: Error line numbers for some run-time functions in debug mode?
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 17 15:35:02 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8842
Summary: Error line numbers for some run-time functions in
debug mode?
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-10-17 15:35:01 PDT ---
void main() {
int[] foo;
auto bar = new int[10];
foo[] = bar[];
}
Currently that code gives a runtime error with no line number, dmd 2.061alpha:
object.Error: lengths don't match for array copy
The stack trace helps find the location of such error, but maybe in debug mode
(-debug) it's worth using a different _d_arraycopy run-time function that
accepts line numbers too (named _d_arraycopy_line or something), so it's able
to generate a more specific error message.
This line number inflates the binary, but in debug mode what's important is to
locate the errors very well.
--
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