[Issue 4983] [ICE] Stack overflow while initializing struct member with address of one of its methods

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 1 05:19:52 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=4983



--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> 2012-06-01 05:21:44 PDT ---
More simple case:

  struct Foo { int dg = &Foo.init; }

In AddrExp, compiler will try to convert Foo.init to lvalue with
Expression::toLvalue, but it is not possible, then try to output an error
message like "Foo(...) is not an lvalue".

But, the initializer of the field dg contains Foo.init itself. So it will
occurs *recursive printing*.

  Foo(Foo.init) -> Foo(Foo(Foo.init)) -> Foo(Foo(Foo(Foo.init))) ...

-- 
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