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/47297] Inconsistent float-point to integer results depending on -O flag


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

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-01-14 17:04:30 UTC ---
On Fri, 14 Jan 2011, mateusz at loskot dot net wrote:

> In spite of the fact the behavior is undefined, I suspect the intent
> is to be consistent (which appears to be for lots of other
> values I have tried), but they are not.

No, the intent is not to be consistent.  (The intent is that each instance 
of such a conversion executed in the abstract machine results in an 
unspecified value, as per C99 Annex F, rather than more fully optimizing 
based on undefined behavior, but not for anything more consistent than 
producing unspecified values.)


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