Skip to content

#define + sizeof(...) fails to emit constant #666

Open
@vvanders

Description

@vvanders

Not sure if I'm missing a feature that's not supported yet but I hit issue and narrowed it down when trying to generate bindings for Lua.

Input C/C++ Header

#define SIZEOF_INT sizeof(int)

Bindgen Invokation

    bindgen::Builder::default()
        .header("test.h")
        .generate().unwrap()
        .write_to_file("src/out.rs").unwrap();

Actual Results

/* automatically generated by rust-bindgen */



Expected Results

RUST_LOG=bindgen Output

No logging emitted when I set env var

Full repro repo also exists here for easier debugging: https://github.com/vvanders/bindgen_repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions