[Issue 3422] New: Structs with default initializers bigger than register size cannot be default parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 20 01:52:51 PDT 2009
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: nobody at puremagic.com
ReportedBy: Justin.SpahrSummers at gmail.com
--- Comment #0 from Justin Spahr-Summers <Justin.SpahrSummers at 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: -------
More information about the Digitalmars-d-bugs
mailing list