Attribute btf_type_tag makes constness of pointers disappear · Issue #2244 · rust-lang/rust-bindgen (original) (raw)

From Rust-for-Linux/linux#835, reported by @YakoYakoYokuYoku.

I have not checked yet whether this is due to libclang, but nevertheless I wanted to have the issue opened here.

Input C/C++ Header

void f(const char attribute((btf_type_tag("a"))) *);

Bindgen Invocation

$ bindgen input.h

Actual Results

extern "C" { pub fn f(arg1: *mut ::std::os::raw::c_char); }

Expected Results

extern "C" { pub fn f(arg1: *const ::std::os::raw::c_char); }