[Bug 1842] New: Static assertions

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Tue Jul 19 11:51:10 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1842

           Summary: Static assertions
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: cpukit
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: sebastian.huber at embedded-brains.de


Created attachment 1228
  --> https://www.rtems.org/bugzilla/attachment.cgi?id=1228
Patch.

I want to introduce static assertions in RTEMS.  Please have a look at the
attached patch.

It can detect things like this (msgmp.c):

[...]
RTEMS_STATIC_ASSERT(
  sizeof(Message_queue_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
  Message_queue_MP_Packet_is_too_big
);
[...]

msgmp.c:33:1: error: size of array
'static_assertion_Message_queue_MP_Packet_is_too_big' is negative

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list