[Issue 10750] Strict aliasing semantics
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 3 03:43:08 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10750
--- Comment #5 from Iain Buclaw <ibuclaw at ubuntu.com> 2013-11-03 03:43:06 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> > We had problems with this in GDC right now on ARM (std.algorithm.find uses
> > cast(ubyte[])string which internally translates to invalid pointer aliasing)
> > and as a result we'll now have to disable strict aliasing in the GCC backend.
> >
>
> Which is a shame, because dynamic arrays are perhaps the one type in D that
> should instead benefit from strict aliasing rules...
Alternatively, we can just define better aliasing rules that better suit D.
ie:
- Permit type-punning when accessing through a union.
- Determine aliasing rules of dynamic arrays from the elem type, instead of
treating it as aliasing the overall structure.
This might actually be the better solution for us - shall I send you a patch?
:o)
--
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