Skip to content

Fix generated typedefs for function types without arguments #470

@Foxhound31

Description

@Foxhound31

For type
pub type Function = fn() -> usize;
generated C typedef is
typedef uintptr_t (*Function)();
but expected according to C standard is
typedef uintptr_t (*Function)(void);
It implies warning when compiling C code:
warning: function declaration isn't a prototype

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions