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/32448] abs / printf bug



------- Comment #20 from pinskia at gcc dot gnu dot org  2007-06-24 05:08 -------
> Since GCC can 'see' the "%f" at compile time
Yes it can but that does not mean the behavior is the correct to cast it to
float.  In fact the behavior is undefined at runtime so you are just running
into the runtime undefined behavior which is really normal with C/C++ now
adays.  


-- 


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


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