goblint / cil

C Intermediate Language
https://goblint.github.io/cil/
Other
143 stars 20 forks source link

C11 Support #13

Open coslu opened 4 years ago

coslu commented 4 years ago

CIL lacks support for various additions to the C language that come with the C11 specification. It would be beneficial to identify and implement features to improve CIL's support for C11.

To check/implement from wiki/C11:

edwintorok commented 1 year ago

The _Alignas implementation is incomplete (only parser, but doesn't change alignment), which causes goblint to fail to parse OCaml 5.0 domain_state.h with a static assertion failure (array length negative). A workaround is to use the following, which seems to work (the GCC aligned attribute seems to have the desired effect and change alignment):

--set 'pre.cppflags[+]' -D'_Alignas(x)=__attribute__((__aligned__(x)))'
michael-schwarz commented 1 year ago

@edwintorok thanks for the information and the workaround. I'll try to fix this issue in CIL (shouldn't be too difficult if the equivalent GCC attribute works), but it'll likely be only after the holidays.

edwintorok commented 1 year ago

Thanks, no rush I can use the workaround meanwhile.