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

--- Comment #0 from Justin Spahr-Summers <> 
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 () {

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:
------- You are receiving this mail because: -------

Reply via email to