This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/30368] wrong result



------- Comment #5 from manu at gcc dot gnu dot org  2007-01-26 23:14 -------
(In reply to comment #4)
> Subject: Re:  wrong result
> 
> "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
> 
> | > anther, consider an example definite[2] of 'offsetof', if you think
> | > that is undefined, it's almost impossible to give a definite of
> | > offsetof.
> | 
> | > #define offsetof(TYPE,MEMBER)   ((size_t)&((TYPE*)0)->MEMBER)
> | 
> | The C standard still says that is undefined.  See 6.5.3.2/4.
> | Also GCC has a builtin for offsetof to get around the undefinedness of the
> | above.
> 
> The C front-end should probably warn -- the C++ front-end does.

Does it? With which options? I wasn't able to get a warning or error.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]