cil icon indicating copy to clipboard operation
cil copied to clipboard

Check whether static asserts actually hold at CIL-time

Open michael-schwarz opened this issue 2 years ago • 0 comments

I'm wondering if maybe we should do constant folding for the static assert expressions. After all, aren't they supposed to be constant-foldable? It might be useful for catching some CIL bugs or inconsistencies where we fail to meet the static assertions demanded by the code, even when compiling with GCC they succeed. Aren't static assertions exactly for all kinds of sizeof, etc checks? Because if we don't even pass the static assertions, then it's quite likely that we would end up analyzing code under completely wrong assumptions about certain types, making the results quite bogus.

Originally posted by @sim642 in https://github.com/goblint/cil/issues/62#issuecomment-1008631690

michael-schwarz avatar Jan 10 '22 10:01 michael-schwarz