[Bug c++/11072] [3.4 regression] Implementation of offsetof macro

rwgk@yahoo.com gcc-bugzilla@gcc.gnu.org
Tue Jun 3 02:29:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11072



------- Additional Comments From rwgk@yahoo.com  2003-06-03 02:29 -------
ISO/IEC 9899:1999 (E) 

7.17 Common definitions <stddef.h>

3 The macros are

NULL

which expands to an implementation-defined null pointer 
constant; and offsetof(type, member-designator) which 
expands to an integer constant expression that has type
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
size_t, the value of which is the offset in bytes, to the
structure member (designated by member-designator), from 
the beginning of its structure (designated by type). The
type and member designator shall be such that given

static type t;

then the expression &(t.member-designator) evaluates to an 
address constant. (If the specified member is a bit-field,
the behavior is undefined.)




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the Gcc-bugs mailing list