Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad type recognition, despite explicit suffix #1875

Open
joseluis opened this issue Aug 17, 2020 · 2 comments
Open

bad type recognition, despite explicit suffix #1875

joseluis opened this issue Aug 17, 2020 · 2 comments

Comments

@joseluis
Copy link

This code:

#define CELL_WIDEASIAN_MASK     0x8000000000000000ull
#define CELL_NOBACKGROUND_MASK  0x0400000000000000ull

results in:

pub const CELL_WIDEASIAN_MASK: i64 = -9223372036854775808;
pub const CELL_NOBACKGROUND_MASK: u64 = 288230376151711744;

It seems bindgen just notices the leftmost bit on, and decides to turn it into an i64 despite the ull suffix that clearly indicates it should be a u64.

@emilio
Copy link
Contributor

emilio commented Aug 18, 2020

This is probably an issue in https://github.com/jethrogb/rust-cexpr, which only gives us i64s to begin with.

I wonder if #1782 fixes this.

@burakemir
Copy link

Seems related: #923

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

No branches or pull requests

3 participants