structure element offsets

David Messer dave at viper.UUCP
Mon Dec 8 19:31:06 AEST 1986


In article <3810 at watmath.UUCP> rbutterworth at watmath.UUCP (Ray Butterworth) writes:
 >> however, for good or ill,
 >> C has been defined such that all members-of-structures share the
 >> same name-space.
 >This hasn't been true for many years.
 >Are there still any compilers out there that can't handle this?
 >struct one {int a; int b;};
 >struct two {float b; float a};

Well, I learn something new everyday!  The last time I checked
it (back about 5 years ago on Version 7) the statement I made
was true.  Now it is not.  The MS-DOS C compiler I used in that
time had all MOS' in the same name-space, so I never suspected that
they changed it in the real (UNIX) world.  I thank you for pointing
this out to me, and apologize for my earlier, stupid statements.

I think that I will stop citing Kernighan & Ritchie since the
world seems to have proceeded past them.

The following statement used to be true:
-- 
Disclaimer:                       | David Messer 
I'm always right and I never lie. | Software Consultant 
My company knows this and agrees  | UUCP:  ihnp4!quest!viper!dave 
with everything I say.            |        ihnp4!meccts!viper!dave



More information about the Comp.lang.c mailing list