Language features and reinterpret casts

Jesse Phillips jessekphillips+D at gmail.com
Tue Sep 21 10:44:32 PDT 2010


I remember that thread and even replied to it. I didn't see anything where Walter said Unions behave as C. Nor was there anything where Walter said he would not define C undefined behavior. All he said was, for the cases presented, there was no way to define the behavior or didn't know what defined behavior would be.

I don't know if it would be reasonable to define the behavior of Union for this, but since it currently works in D I assume it can be defined to work that way.

bearophile Wrote:

> Jesse Phillips:
> 
> > But where does Walter say Unions act as C in this case?
> 
> It was an answer in a thread of mine where I have asked to remove some D undefined behaviours derived from C.
> This is the thread start:
> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=108978
> 
> 
> > Why not, define the behavior and leave it.
> 
> This was the original purpose of my thread, but Walter has explained me that this is not possible for the unions:
> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=109033
> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=109058
> 
> Bye,
> bearophile



More information about the Digitalmars-d mailing list