Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • in file.h defined should I also declare Are you mixing terms "function definition" and "function declaration"? but is this approach actually correct? are those function defined or declared? Are they static? Commented Jun 19, 2020 at 17:10
  • 1
    Please see the related question Inline functions and external linkage. Commented Jun 19, 2020 at 17:14
  • My understanding is that we need a declaration in the .c file to force emission of the function symbol in at least one TU. Without this no symbol for the function will ever be emitted. Commented Jun 19, 2020 at 17:20
  • Is "inline" without "static" or "extern" ever useful in C99? also shows the actual syntax necessary in the .h and the extern inline declaration in exactly one .c to make a working C program with a non-static inline function defined in a header and thus able to actually inline. Commented Jan 20, 2024 at 16:44