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

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