inline conveys exactly what you want: "please suppress the ODR rule for this function so that each translation unit can (and should) provide its own copy of the function definition."
Then the compiler either performs the built-in function calls, or combines the definitions of functions from different TUs (so that the resulting function exists once in the executable file).
static , on the other hand, tells the compiler to generate a function in each translation unit where it is defined, and simply not share it. Thus, you get an arbitrary number of technically separate functions that exist in the resulting executable file.
In a nutshell, if you use static , then using the address in different translation units will return different addresses (because you tell the compiler to create a function in each TU), but if you use inline , they will show the same address ( because you define one function and just tell the compiler to combine many definitions together).
jalf
source share