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

Can your C compiler do this:

Name: Anonymous 2010-05-15 15:06


int main()
{
  int *p;
  p  = 0;
  *p = 0;
  return 0;
}


?

Name: Anonymous 2010-05-16 2:17

>>28
Oh, that is a bit different... the spec doesn't say "valid address" but instead talks about extant "objects" and "functions".

I know it sounds really pedantic, but quite a few systems I've worked on actually do have 0 as a valid address, with C compilers still using 0 for null. Most of the time no objects were put there, however.

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