Skip to main content
added 23 characters in body
Source Link
m0skit0
  • 26k
  • 13
  • 84
  • 131

I think static inline is the way to go for functions you want to inline, and only static for those you don't want.   

static refers to visibility, but inline is ambiguous about visibility in the standard (C99). Anyway, it's not its purpose: inline is for inlining functions, thus it has a side-effect from a visibility point of view you might not want.

I think static inline is the way to go for functions you want to inline, and only static for those you don't want.  static refers to visibility, but inline is ambiguous about visibility in the standard (C99). Anyway, it's not its purpose: inline is for inlining functions, thus it has a side-effect from a visibility point of view.

I think static inline is the way to go for functions you want to inline, and only static for those you don't want. 

static refers to visibility, but inline is ambiguous about visibility in the standard (C99). Anyway, it's not its purpose: inline is for inlining functions, thus it has a side-effect from a visibility point of view you might not want.

added 57 characters in body
Source Link
m0skit0
  • 26k
  • 13
  • 84
  • 131

I think static inline is the way to go for small functions you want to inline, and only static for bigger onesthose you don't want. static refers to visibility, but inline is ambiguous and allowsabout visibility in the standard (C99). Anyway, it's not its purpose: externinline keyword as wellis for inlining functions, defeating your purposethus it has a side-effect from a visibility point of view.

I think static inline is the way to go for small functions, and only static for bigger ones. inline is ambiguous and allows extern keyword as well, defeating your purpose.

I think static inline is the way to go for functions you want to inline, and only static for those you don't want. static refers to visibility, but inline is ambiguous about visibility in the standard (C99). Anyway, it's not its purpose: inline is for inlining functions, thus it has a side-effect from a visibility point of view.

Source Link
m0skit0
  • 26k
  • 13
  • 84
  • 131

I think static inline is the way to go for small functions, and only static for bigger ones. inline is ambiguous and allows extern keyword as well, defeating your purpose.