Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C gore of the weak

Name: Anonymous 2009-09-11 17:52

1. Does this operation invoke undefined behavior?

union {
  int i;
  struct {
    int i1;
    int i2;
  } s;
} u;

u.i = 3;
printf("%d\n", u.s.i1);

Name: Anonymous 2009-09-12 3:50

It invokes UB most certainly.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List