Skip to content

Support #undef #3413

Description

@ojeda

From #3409 (comment) and #2722 (comment).


bindgen currently ignores #undef, e.g.

#define A 1
#undef A

generates

pub const A: u32 = 1;

but A should not exist.

This seems to be acknowledged in:

// If I understood correctly, `bindgen` ignores all `#undef` directives. Meaning that this:
// ```c
// #define FOO 1
// #undef FOO
// #define FOO 2
// ```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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