Bug 2362 – Confusing description of 'aliasing of invariant with mutable'?
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2008-09-16T10:50:00Z
Last change time
2015-06-09T01:20:17Z
Assigned to
bugzilla
Creator
godaves
Comments
Comment #0 by godaves — 2008-09-16T10:50:58Z
The table at the bottom of http://digitalmars.com/d/2.0/const3.html can be read to indicate that 'aliasing of invariant with mutable' is acceptable ('Yes'), even though the behavior is 'undefined'. IMO, the the subject needs to be further clarified. Perhaps an explanation of the undefined behavior and an example of how to check for aliasing at runtime with an assert or EH.