RTEMS | cpukit/include/rtems/score: Cast applied to bitwise operations with signed operands (!1076)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Wed Feb 25 12:58:53 UTC 2026
Sebastian Huber started a new discussion on cpukit/include/rtems/score/timestampimpl.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1076#note_143474
> */
> static inline time_t _Timestamp_Get_seconds( const Timestamp_Control *_time )
> {
> - return ( *_time >> 32 );
> + return (time_t) ( ( (uint64_t) *_time ) >> 32 );
This also doesn't fix the undefined behaviour if \*\_time is negative.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1076#note_143474
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260225/f0bf2908/attachment.htm>
More information about the bugs
mailing list