October 17, 2012 [Issue 8842] New: Error line numbers for some run-time functions in debug mode? | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@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: ------- |
Copyright © 1999-2021 by the D Language Foundation