rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

bindgen generating `i64` instead of `u64`

Open redeexpressos opened this issue 1 year ago • 1 comments

Input C/C++ Header

#define UAVCAN_PROTOCOL_GETNODEINFO_REQUEST_SIGNATURE (0xEE468A8121C46A9EULL)

Bindgen Invocation

    let bindings = bindgen::Builder::default()
        .clang_arg("-Iexternal/libcanard")
        .header("wrapper.h")
        .generate()
        .expect("Unable to generate bindings");
pub const UAVCAN_PROTOCOL_GETNODEINFO_REQUEST_SIGNATURE: i64 = -1277181157091022178;

Expected Results

Shouldnt it generate an u64?

redeexpressos avatar Jul 30 '24 09:07 redeexpressos

See as well https://github.com/rust-lang/rust-bindgen/issues/2120 and https://github.com/rust-lang/rust-bindgen/issues/1594.

ojeda avatar Jul 30 '24 09:07 ojeda

yep closing as duplicate of https://github.com/rust-lang/rust-bindgen/issues/1594

pvdrz avatar Sep 07 '24 08:09 pvdrz