-
Notifications
You must be signed in to change notification settings - Fork 943
Open
Labels
Description
Currently, if you want to set any limited-precision number in any situation, you have to cast.
uint16_t val = uint16_t(0);
const uint16_t arr[4] = { uint16_t(0), uint16_t(0), uint16_t(0), uint16_t(0) };
This leads to code interacting with mixed-precision numbers requiring casts in every single line, such as throughout this entire file.
Everything here was designed to not overflow. Generally programmers know whether something will overflow or not.
Having a #pragma releaxed_casting would be a good quality of life improvement.
Reactions are currently unavailable