-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels