Skip to content

Attribute btf_type_tag makes constness of pointers disappear  #2244

Closed
@ojeda

Description

@ojeda

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);
}

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