[Issue 11881] -betterC switch suffers from bit rot

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 8 00:32:17 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11881



--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2014-01-08 00:32:10 PST ---
(In reply to comment #1)
> * The assert isn't put out with -release, but that kills all asserts. So I
> think -betterC might be good to suppress any *hidden* asserts, while keeping
> explicit ones in (which are removed with -release if you want to kill them
> too). The struct method calling _d_assertm, which requires ModuleInfo, is a
> hidden assert on the struct method.

An idea:
Under -betterC switch, "assertion failures" and "range checks" will be
implemented by HLT operation.

Merits of the idea are:
1. -betterC switch would merely get rid of the dependency to the runtime
library. Other switches, -noboundscheck and -release, would keep their
meanings.
2. Normal assert would be kept useful (condition is checked in runtime and HLT
program if it fails, if needed).
3. Range check is important for SafeD concept. We should have a way to do it
without runtime library.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list