[PATCH] D32092: Attribute inline

Richard Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 14 13:13:35 PDT 2017


rsmith added a comment.

In https://reviews.llvm.org/D32092#727543, @zahiraam wrote:

> Pushed the submit too fast ...
>  Before I submitted this review, I have done some experiments and inline and declspec(inline) have the same behavior. Compiling with /Ob0 disables inlining. With -O1 or -O2, inline happens.


What do you mean, "inline and declspec(inline) have the same behavior"? What exactly did you test? The `inline` keyword means quite different things in different language modes, and none of them are the same as the meaning of `__attribute__((gnu_inline))` (which is what you aliased this to). Some of these differences are quite subtle (for instance, the precise behavior of `extern inline` and `static inline`, and what happens if you redeclare a function with a different set of specifiers).


https://reviews.llvm.org/D32092





More information about the cfe-commits mailing list