goblint / cil

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

Frontc parse error due to `_Alignas(...)` #93

Closed stilscher closed 2 years ago

stilscher commented 2 years ago

When (incrementally) analyzing commit https://github.com/facebook/zstd/commit/1c7d2c4dd561e557964b78c3757ee4cc745be445 of the zstd repository the following parse error is thrown:

zstd/lib/common/xxhash.h[1093:0-0] : syntax error
Parsing errorFatal error: exception Frontc.ParseError("Parse error")
michael-schwarz commented 2 years ago

The culprit likely is the alignas which I have never invested much time into.

sim642 commented 2 years ago

The line in question is: https://github.com/facebook/zstd/commit/1c7d2c4dd561e557964b78c3757ee4cc745be445#diff-9352517042498de73d5ffd9e054ce575a958003434582ec9faa860a12987cd74R1093. The possible underlying attributes are chosen by some features here: https://github.com/facebook/zstd/commit/1c7d2c4dd561e557964b78c3757ee4cc745be445#diff-9352517042498de73d5ffd9e054ce575a958003434582ec9faa860a12987cd74R1029-R1050. Maybe one can temporarily cheat that detection and redefine __STDC_VERSION__ to be lower?