Skip to content

Check whether static asserts actually hold at CIL-time #65

@michael-schwarz

Description

@michael-schwarz

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 #62 (comment)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions