Gedare Bloom commented on a discussion on cpukit/include/rtems/error.h: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1069#note_143204

 > + * Define Error Flags
 > + */
 > +#define RTEMS_ERROR_BITS (sizeof(rtems_error_code_t) * CHAR_BIT)
 > +
 > +#define RTEMS_ERROR_ERRNO (((rtems_error_code_t)1) << (RTEMS_ERROR_BITS - 
 > 2))
 > +
 > +#define RTEMS_ERROR_PANIC (((rtems_error_code_t)1) << (RTEMS_ERROR_BITS - 
 > 3))
 > +
 > +#define RTEMS_ERROR_ABORT (((rtems_error_code_t)1) << (RTEMS_ERROR_BITS - 
 > 4))
 > +
 > +#define RTEMS_ERROR_MASK (RTEMS_ERROR_ERRNO | RTEMS_ERROR_PANIC | 
 > RTEMS_ERROR_ABORT)
 >  
 > -#define RTEMS_ERROR_MASK \
 > -  (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | RTEMS_ERROR_PANIC) /* all */
 > +_Static_assert(RTEMS_ERROR_BITS >= 8,
 > +               "rtems_error_code_t too small for error flags");

Yes, remove it. It's a safe assumption nowadays that `CHAR_BIT >= 8` and 
`sizeof(x) >= 1`, so this assert would never fail.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1069#note_143204
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