#3799: confdefs.h declares an array with zero elements, that's invalid C
-------------------------------+---------------------
Reporter: Jens Schweikhardt | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone:
Component: rtems | Version:
Severity: normal | Resolution:
Keywords: confdefs.h array | Blocked By:
Blocking: |
-------------------------------+---------------------
Comment (by Jens Schweikhardt):
In general, Polyspace needs to see the same code the compiler sees. This
requires that Polyspace needs to be told the compiler's predefined macros.
With gcc or clang that's easy. To do that, ask for the predefined macros
with `$(CC) -E -dM -x c /dev/null` and turn that into `-D` options for
Polyspace.
In addition, you might want to fix/work around various language extensions
Polyspace does not understand. I use
{{{
-D __extension__=
-D __builtin_va_list=void*
-D __builtin_offsetof(t,m)=0
-D _Noreturn=
-D __restrict=
}}}
but this might need to be tweaked for your particular compiler and
Polyspace release.
--
Ticket URL: <http://devel.rtems.org/ticket/3799#comment:5>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs