Closed
Description
opened on Sep 2, 2024
Input C/C++ Header
_Atomic(int) a;
int b;
Bindgen Invocation
$ bindgen --blocklist-item "a" input.h
Actual Results
$ RUST_BACKTRACE=1 bindgen --blocklist-item "a" input.h
panicked at /home/kriskras99/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.70.1/ir/var.rs:319:25:
Couldn't resolve constant type, and it wasn't an nondeductible auto type or unexposed type!
panicked at core/src/panicking.rs:221:5:
panic in a function that cannot unwind
thread caused non-unwinding panic. aborting.
[1] 21518 IOT instruction (core dumped) RUST_BACKTRACE=1 bindgen --blocklist-item "a" input.h
Expected Results
I expect bindgen to ignore the _Atomic
type as it is on a blocklist:
/* automatically generated by rust-bindgen 0.70.1 */
extern "C" {
pub static mut b: ::std::os::raw::c_int;
}
In addition, I think the panic message is confusing and should be more like "_Atomic types are not supported" or something similar.
Metadata
Assignees
Labels
No labels
Activity