Skip to content

sycek doesn't accept inline functions in headers #5

@le-jzr

Description

@le-jzr

sycek requires that inline function in a header must also be static, which prevents a legitimate use of inline.

Context:
Such a function is never emitted into object files unless an extern declaration is also present, in which case a global copy of the function is emitted. The standard way of using this is a non-static inline function with a body in a header, and corresponding extern declarations in some C file, ensuring that when inlining is not chosen by the compiler, there is only one copy of the function that is used by all non-inlined calls. It also ensures that taking the address of such a function returns the same pointer in all translation units.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions