Talk:Inline function

message: The article points the reader to "below" in the Language Support section with the following text "(see below for a problem in C99 regarding this definition)" (which I removed) while there is no relevant text that points to the promised problem. Neither is the "below" clear about whether the reader is supposed to expect a link or a text exposition or a complete section. Please fix. EaswarH 17:43, 25 January 2012 (UTC)
thread_title:  Language Support 

message: The article seems inconsistent in the usage.  Is there any diference between the two?  Is 'inline' an adjective and 'in-line' a verb?  I'll clean it up if I find out the rule.
:They seem to be used interchangably. In certain contexts, such as "inline function", one spelling tends to prevail. The "in-line" spelling is somewhat older and more traditional. Most of the time "inline" is fine and understandable in just about any place. I don't know any hard and fast rule, and I don't think the part-of-speech one is true. Maybe someone else can shed more light on it. Derrick Coetzee 21:46, 26 Oct 2004 (UTC)
replies: text: The language keywords in both C++ and C99 are "inline", and personally I encounter "inline" much more often than I do "in-line". Although of course that's not definitive evidence, I'd vote for using "inline" consistently. Neilc 08:17, 28 May 2005 (UTC)

text: no --Windymager 18:10, 3 December 2006 (UTC)
thread_title: "in-line" vs. "inline"

message: C++, C99, and GNU C each have support for inline functions, although 1989 ANSI C, the dialect of C most commonly used in practice, does not.
I doubt the bold statement of ansi being more used in practice, to be true. I see no reference and thus propose to eliminate it.
217.140.108.2 10:48, 14 September 2007 (UTC)
replies: text: Well, C++ is not a C dialect so we can remove that from the equation straight away.  We then have C89, C99 and GNU C.  There are very few fully conforming C99 compilers out there - they are still mainly 'C89+'.  The GNU extensions do receive some use on Unix, but less so on other platforms.  Even on Unix many coders/management policies are unwilling to use them since GCC is far from universal even on Unix.  The impression I have is that C89 still leads by a mile.  Put it another way: what dialect do you think is more prevalent? 86.130.81.171 (talk) 11:49, 26 June 2008 (UTC)
thread_title:  most used? 

message: ... you cannot make the macro return something which is not the result of the last expression invoked inside it.
This is not entirly true. You can still use the chaining operator (however I haven't tested it for every compiler out there).
Example:
: #define f1(a,b) (a+b)
: #define f2(a,b) (a=f1(a,b),a-b)
This will execute a=a+b and return (a+b)-b instead of the result f1 (a+b).
Used especially when you want to do heavy pointer arithmetic or while using reference types as arguments.
213.150.1.132 (talk) 12:27, 2 April 2010 (UTC)
thread_title:  Macros and return  

message: In some places this article seems like it's implicitly about the inline keyword in C++ and some versions of C (for example, the opening paragraph stipulates that "it is a request made to the compiler, not an order", but obviously a language could exist that allows for an "order"), and in other places it seems like it's trying to be language-neutral (for example, the "language support" section discusses C/C++ in one sentence, then Ada in the next).
We could address this in two ways:
* make it less C-centric. For any claim X that can't be proven to apply to all languages with such a feature, we either remove claim X, or we indicate exactly which language(s) claim X applies to.
* make it more C-centric. We already have a language-neutral article, after all: Inline expansion. This article could still have a section that discusses other languages, in order to put the C/C++ feature in context, but that would be clearly demarcated as the purpose.
My preference is the latter approach, if only because it's easier to do — the article is already very much focused on C/C++ — but I'm also O.K. with the former approach, if people prefer it for whatever reason.
—RuakhTALK 19:54, 18 October 2010 (UTC)
thread_title:  Excessively or insufficiently C-centric. 

message: msdn says #pragma function(func_name) will disable inlining of given function.
https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/preprocessor/function-c-cpp.md
https://learn.microsoft.com/en-us/cpp/preprocessor/function-c-cpp?view=msvc-170 2600:4040:B63E:1C00:FD65:D0A0:D502:CC87 (talk) 13:59, 5 November 2023 (UTC)
thread_title:  #pragma function / function pragma restrictions