Joel Sherrill commented: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5538#note_147609


C23 has [stdckdint.h](https://en.cppreference.com/w/c/header/stdckdint.html) 
which provides three math functions which check for overflow and return a 
_bool_. I don't know how long it has been available but GCC 14 (nios2) has it 
and I don't see it installed with microblaze. If it is decided to use that, it 
would be the first C23 feature used in RTEMS so we should tread carefully. It 
is likely the microblaze would no longer compile.

When I switched RTEMS from using _struct timespec_ internally to 64-bit 
nanoseconds since epoch, it simplified the generated code. And the 64-bit math 
versus 32-bit math on 32-bit targets is a few more instructions. Better to be 
correct than micro-optimized.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5538#note_147609
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to