[Issue 9975] pointsTo asserts because of false pointer in union

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 17 23:44:58 PDT 2013


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



--- Comment #7 from monarchdodra at gmail.com 2013-06-17 23:44:57 PDT ---
(In reply to comment #6)
> This function is used throughout std.algorithm so marking this as documented
> behavior is not a good solution because it mean basic algorithms like sort
> can't be used with such structs.

Which behavior exactly are you mentioning? And do you mean *any* structs, or
just structs containing unions?

As far as documentation goes, all I added was that when doing pointsTo on a
union, you "could" get a false positive. I don't think there is any way around
it, since pointsTo would have no way to know *which* members to check.

That, and a false positive is always safer than a false negative.

In case of the original example in this bug, it is not tested nor documented.

Could you explain in more detail what you think is wrong and/or what should be
changed?

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