This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
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) — Preceding unsigned comment added by Easwarno1 ( talk • contribs)
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.
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)
The statement Most other languages, including Java and functional languages, do not provide inline functions ... is not true; Common Lisp has support for inline functions and I think other functional languages has too. —Preceding unsigned comment added by 90.149.36.67 ( talk) 01:19, 12 September 2008 (UTC)
... 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:
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)
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:
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.
— Ruakh TALK 19:54, 18 October 2010 (UTC)
INLINE FUNCTION:
Inline function is the optimization technique used by the compilers. Function prototype to make a function inline. Inline function instruct compiler to insert complete body of the function wherever that function got used in code.
ADVANTAGES :- 1) It does not require function calling overhead. 2) It also save overhead of variables while function calling. 5) This is the most important one, in this way compiler can now focus on dead code elimination.
DIS-ADVANTAGES :- 1) It may cause compilation overhead as if somebody changes code inside inline function than all calling location will also be compiled. 2) If used in header file, it will make your header file size large and may also make it unreadable. 3) It’s not useful for embedded system where large binary size is not preferred at all due to memory size constraints.
NEESHA — Preceding unsigned comment added by 49.205.227.105 ( talk) 06:44, 18 January 2014 (UTC)
msdn says #pragma function(func_name) will disable inlining of given function. [1] https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/preprocessor/function-c-cpp.md [2] 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)
This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
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) — Preceding unsigned comment added by Easwarno1 ( talk • contribs)
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.
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)
The statement Most other languages, including Java and functional languages, do not provide inline functions ... is not true; Common Lisp has support for inline functions and I think other functional languages has too. —Preceding unsigned comment added by 90.149.36.67 ( talk) 01:19, 12 September 2008 (UTC)
... 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:
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)
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:
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.
— Ruakh TALK 19:54, 18 October 2010 (UTC)
INLINE FUNCTION:
Inline function is the optimization technique used by the compilers. Function prototype to make a function inline. Inline function instruct compiler to insert complete body of the function wherever that function got used in code.
ADVANTAGES :- 1) It does not require function calling overhead. 2) It also save overhead of variables while function calling. 5) This is the most important one, in this way compiler can now focus on dead code elimination.
DIS-ADVANTAGES :- 1) It may cause compilation overhead as if somebody changes code inside inline function than all calling location will also be compiled. 2) If used in header file, it will make your header file size large and may also make it unreadable. 3) It’s not useful for embedded system where large binary size is not preferred at all due to memory size constraints.
NEESHA — Preceding unsigned comment added by 49.205.227.105 ( talk) 06:44, 18 January 2014 (UTC)
msdn says #pragma function(func_name) will disable inlining of given function. [1] https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/preprocessor/function-c-cpp.md [2] 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)