Messages in this thread | | | Date | Tue, 15 Jun 1999 12:01:09 -0400 | From | Arvind Sankar <> | Subject | Re: egcs-1.1.2 ping bug also causes miscompilation of pcbit isdn drive |
| |
> I'm getting a bit fed up of all the wrong information that's flying > around in this thread. If people aren't absolutely sure and can't > quote chapter and verse then they should keep out of it.
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?
> > Section 6.5.2.1 of the ANSI/ISO 9899-1990 standard says: > > Within a structure object, the non-bit-field members and the > units within which bit-fields reside have addresses that > increase in the order in which they are declared. > > This specifically means that the fields above must appear in the order > one, two, three, four and can't be re-ordered. It goes on to say: > > A pointer to a structure object, suitable converted, points to its > initial member (or if that member is a bit-field, then to the unit > in which it resides), and vice versa. There may therefore be > unnamed padding within a structure object, but not at its > beginning, as necessary to achieve the appropriate alignment. > > This means that, contrary to what you claim, the condition > > foo.one == (*(char *)&foo); > > is indeed guaranteed to hold. > > --Malcolm > > -- > Malcolm Beattie <mbeattie@sable.ox.ac.uk> > Unix Systems Programmer > Oxford University Computing Services > > - > 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/
- 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/
| |