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 target/79366] wrong result in cast to unsigned int


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79366

--- Comment #8 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Jakub Jelinek from comment #7)
> (In reply to Jonathan Wakely from comment #3)
> > Clang's ubsan diagnoses this, but ours doesn't:
> > 
> > u.cc:4:25: runtime error: value -1 is outside the range of representable
> > values of type 'unsigned int'
> 
> We do diagnose it as well, but only with -fsanitize=float-cast-overflow,
> which is intentionally not included in -fsanitize=undefined.

Oh really.
And what was the rationale behind that decision?

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