Skip to content

Bindgen skips macros with token concatenation. #2402

Closed
@TranquilRock

Description

@TranquilRock

Input C/C++ Header

# define UL(x) x##UL
# define A UL(4294967295)
# define B 4294967295UL

Bindgen Invocation

$ bindgen input.h

Actual Result

/* automatically generated by rust-bindgen 0.59.1 */

pub const B: u32 = 4294967295;

Expected Results

/* automatically generated by rust-bindgen 0.59.1 */

pub const A: u32 = 4294967295;
pub const B: u32 = 4294967295;

Ref

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions