http://d.puremagic.com/issues/show_bug.cgi?id=3422
Summary: Structs with default initializers bigger than register size cannot be default parameters Product: D Version: 2.035 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: justin.spahrsumm...@gmail.com --- Comment #0 from Justin Spahr-Summers <justin.spahrsumm...@gmail.com> 2009-10-20 03:52:50 CDT --- struct S { // works with double and long as well real a = 0, b = 0; } void func (S s = S()) { writefln("hello world"); } void main () { func(); } It appears that using "= S()" as a default parameter causes a compiler error if S contains default initializers for types larger than a register (32 bits, e.g. double, real, and long). Full compiler error is "Internal error: ..\ztc\cgcod.c 1594" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------