February 24, 2009 [Issue 2686] New: Invalid union initializer is accepted | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2686 Summary: Invalid union initializer is accepted Product: D Version: 1.040 Platform: PC OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: snake.scaly@gmail.com ------8<------- bug.d ---- static import std.stdio; union A { short a; long b; } void main() { A x = 0x12345; std.stdio.writefln("a %s, b %s", x.a, x.b); } ------8<------- bug.d ---- > dmd -run bug.d a 0, b 0 A simple numeric initializer is accepted but union members are not initialized accordingly. This should be a compile-time error. -- |
April 14, 2011 [Issue 2686] Invalid union initializer is accepted | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2686 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug@yahoo.com.au Resolution| |FIXED --- Comment #1 from Don <clugdbug@yahoo.com.au> 2011-04-14 15:20:37 PDT --- This was fixed in DMD1.050 -- 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