Undefined behaviours in D and C

bearophile bearophileHUGS at lycos.com
Mon Apr 19 01:10:12 PDT 2010


Lars T. Kyllingstad:
> > enum SI { short s; int i; }
> > void main() {
> >   SI e;
> >   e.i = 1_000_000;
> >   int foo = e.s;
> > }
> 
> Don't you mean 'union' here, not 'enum'?

Yes, sorry -.- In Python newsgroups most code snippets shown by people are being run before post. It's an habit that I must keep in D newsgroups too.
This whole thread is mostly showing how smart I am not.

Bye and thank you,
bearophile



More information about the Digitalmars-d mailing list