assert semantic change proposal
John Carter via Digitalmars-d
digitalmars-d at puremagic.com
Sun Aug 3 19:42:02 PDT 2014
On Monday, 4 August 2014 at 02:31:36 UTC, John Carter wrote:
> But since an optimization has to be based on additional hard
> information, they have, with every new version of gcc, used
> that information both for warnings and optimization.
Hmm. Not sure I made that clear.
ie. Yes, it is possible that a defect may be injected by an
optimization that assumes an assert is true when it isn't.
However, experience suggests that many (maybe two full orders of
magnitude) more defects will be flagged.
ie. In terms of defect reduction it's a big win rather than a
loss.
The tragedy of C optimization and static analysis is that the
language is so loosely defined in terms of how it is used, the
compiler has very little to go on.
This proposal looks to me to be a Big Win, because it gifts the
compiler (and any analysis tools) with a huge amount of eminently
usable information.
More information about the Digitalmars-d
mailing list