[Issue 10750] Strict aliasing semantics

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 3 04:37:53 PDT 2013


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


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #1 from bearophile_hugs at eml.cc 2013-08-03 04:37:51 PDT ---
(In reply to comment #0)

> (http://forum.dlang.org/post/kt026a$256e$1@digitalmars.com):

My comments was:

Is it good to add to Phobos a small template (named like "PointerCast" or
something similar) that uses a union internally to perform pointer type
conversions?

Is then the compiler going to warn the programmer when the pointer type
aliasing rule is violated? I mean when the D code uses cast() between different
pointer types (beside constness). An alternative design is to even deprecate
(and later turn those into errors, where the error message suggests to use
PointerCast).

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