Am Wed, 13 Feb 2013 15:14:36 +0100 schrieb "David Nadlinger" <s...@klickverbot.at>:
> On Tuesday, 12 February 2013 at 17:45:11 UTC, Johannes Pfau wrote: > > OT: I think a simple constructor shouldn't prevent a type from > > being a > > POD, but that should be defined by dmd /frontend. > > I wouldn't spend too much time on implementing the old behavior - > I think I managed to convince Walter that constructors preventing > PODness is a bad idea in the last bigger discussion on the topic. > He also mentioned what sounded like plans in this regard in a > recent pull request. > > Instead, I'd just comment out that specific check in isPOD. > > David Good to know. This fixes the datetime specific instance of the problem. But we should probably tell the gcc backend that non-POD types should not be passed in registers anyway, right? Even when ignoring constructors in the isPOD check, marking non-POD types as TREE_ADDRESSABLE causes many errors in the test suite. Maybe we also have to set TREE_ADDRESSABLE on function TYPE, CONSTRUCTOR, VAR_DECL, PARM_DECL and RESULT_DECL nodes if a non-POD type is involved, but I'd expect the backend to do that automatically?