c2rust icon indicating copy to clipboard operation
c2rust copied to clipboard

analyze: assertion failure on enum construction

Open spernsteiner opened this issue 2 years ago • 0 comments

c2rust-transpile uses Option<fn(...)> to represent C function pointers, which can be null. This means it often emits code like fp = Some(f). dataflow::type_check currently fails on this code, since the Rvalue::Aggregate case assumes the ADT being constructed is either a struct or an enum.

spernsteiner avatar Jul 11 '23 22:07 spernsteiner