<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I don’t know that the compiler cares what’s in the TypeInfo, it uses it’s own internal representation I think. This is a communication to druntime of how to initialize the type. The idea is not to take up data in the static section with zero bytes.<div class=""><br class=""></div><div class="">You will see it used in the runtime, for example: <a href="https://github.com/D-Programming-Language/druntime/blob/master/src/object.d#L2592" class="">https://github.com/D-Programming-Language/druntime/blob/master/src/object.d#L2592</a></div><div class=""><br class=""></div><div class="">It’s probably used elsewhere too, but I’m not sure where to look.</div><div class=""><br class=""></div><div class="">-Steve</div><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Jun 11, 2015, at 8:02 AM, Mike Franklin via dmd-internals <<a href="mailto:dmd-internals@puremagic.com" class="">dmd-internals@puremagic.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">There is a comment [1] in object.d for TypeInfo.init reading:<br class=""><br class="">"Return default initializer.  If the type should be initialized to all zeros, an array with a null ptr and a length equal to the type size will be returned."<br class=""><br class="">Also, I see where the null pointer is set in typinf.c [2].  <br class=""><br class=""><br class="">Using int as an example, how does the compiler go from a null pointer and a size to a 32-bit 0?  Where is that done in the compiler?<br class=""><br class=""><br class="">[1] <a href="https://github.com/D-Programming-Language/druntime/blob/master/src/object.d#L286-L287" class="">https://github.com/D-Programming-Language/druntime/blob/master/src/object.d#L286-L287</a><br class="">[2] <a href="https://github.com/D-Programming-Language/dmd/blob/master/src/typinf.c#L460" class="">https://github.com/D-Programming-Language/dmd/blob/master/src/typinf.c#L460</a><br class=""><br class=""><br class="">Thanks for the help,<br class="">Mike<br class="">_______________________________________________<br class="">dmd-internals mailing list<br class=""><a href="mailto:dmd-internals@puremagic.com" class="">dmd-internals@puremagic.com</a><br class="">http://lists.puremagic.com/mailman/listinfo/dmd-internals</div></blockquote></div><br class=""></div></div></body></html>