Messages in this thread | | | Date | Fri, 18 Jun 1999 10:02:00 +0200 | From | Thomas Pornin <> | Subject | egcs-1.1.2 ping bug also causes miscompilation of pcbit isdn drive |
| |
In article <19990615120109.A6021@anjala.mit.edu> you write: > I can't, but I'm getting a bit confused by 6.5.2.1 here. IIRC, the standard > also says that comparing pointers to objects which are not part of the same > array is undefined. So what does `addresses that increase' mean?
It means that you can define:
struct bla { int x; };
struct blu { int x; float y; };
and then use a pointer to a struct blu as if it was a pointer to a struct bla. This trick is useful on very large project, where you want to enhance some structures and test the code without recompiling every code that uses such structures (somehow...).
Therefore, also ANSI C does not require any thing such as a ram, people who implement a C compiler on a real machine should preserve the ordering and padding of the fields in structures independantly of the following fields.
--Thomas Pornin
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |