Values of a fract type are between -1.0 and +1.0.
Details
Details
Diff Detail
Diff Detail
- Repository
- rC Clang
Event Timeline
Comment Actions
This needs a few tests.
Testing it myself also shows that
unsigned _Fract f = 1.0ur;
seems to get an error, which it shouldn't.
Comment Actions
Update:
Compiler makes overflow decision inside function GetFixedPointValue() - LiteralSupport.cpp
Case unsigned _Fract f = 1.0ur;
At LiteralSupport.cpp (between line 1149 - 1198) The "Val" is 65,536, it shouldn't. It causes overflow.
Checking how to handle cases like
unsigned _Fract f = 1.0ur; unsigned _Fract f = 1.01ur;