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/14750] type-punned pointer causes bad code


------- Additional Comments From jsm at polyomino dot org dot uk  2004-03-27 19:52 -------
Subject: Re:  type-punned pointer causes bad code

On Sat, 27 Mar 2004, lindsayd at cisco dot com wrote:

> It the compiler is about to generate incorrect code, then it shouldn't be a
> warning, it should be an error.

No, the function might never be executed.  DR#109 is clear: "A conforming
implementation must not fail to translate a strictly conforming program
simply because _some_ possible execution of that program would result in
undefined behavior.".

http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/dr_109.html



-- 


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


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