lkml.org 
[lkml]   [1999]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectegcs-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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.023 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site