inline-functions Questions

4

Solved

While playing about with optimisation settings, I noticed an interesting phenomenon: functions taking a variable number of arguments (...) never seemed to get inlined. (Obviously this behavior is c...
Eward asked 25/8, 2014 at 8:39

1

Solved

To place an inline function definition in a C header file for a function that should be inlined into multiple other units, should inline or static inline be used? I've been Googling for a little wh...
Translator asked 16/5, 2014 at 15:58

2

Solved

I found this problem in a very large application, have made an SSCCE from it. I don't know whether the code has undefined behavior or -O2 breaks it. When compiling it with gcc a.c -o a.exe -...
Templia asked 15/5, 2014 at 15:47

2

I am confused about inline in C99. Here is what I want: I want my function get inlined everywhere, not just limited in one translation unit (or one compilation unit, a .c file). I want the addre...
Unplug asked 24/4, 2014 at 15:15

2

Solved

We all know that inline functions can make debugging trickier, as they can be elided from stack traces etc. But suppose I want to call an inline function from within gdb, and I know its name and it...
Liatrice asked 26/2, 2014 at 1:26

5

Solved

I ran a benchmark of mine on my computer (Intel i3-3220 @ 3.3GHz, Fedora 18), and got very unexpected results. A function pointer was actually a bit faster than an inline function. Code: #include...
Lentic asked 22/5, 2013 at 13:56

2

Solved

I have a doubt regarding inline functions. Inline functions will not involve any function calls but just replacement of function definition wherever the call is made to the inline function.Inline f...
Macro asked 9/4, 2013 at 18:6

2

Why is it that a function with loops cannot be made inline? Is it due to a performance issue or is there any other reason?
Limitative asked 2/11, 2012 at 6:20

2

Solved

I have studied that The inline specifier is a hint to the compiler that it should attempt to generate code [...] inline rather than laying down the code for the function once and then calling...
Ouachita asked 24/6, 2012 at 6:31

3

Statement: "Inline-functions must be defined before they are called." Is this statement correct? [EDIT] The question is originally in german: Inline-Funktionen müssen vor ihrem Aufruf definiert...
Henson asked 24/3, 2012 at 16:23

3

Solved

I'm trying to replace some macro subroutines with inline functions, so the compiler can optimize them, so the debugger can step into them, etc. If I define them as normal functions it works: void ...
Givens asked 22/2, 2012 at 16:40

2

Solved

I have a static inline function defined in an H file, and at one point in a C file, I'm assigning a pointer to the function, something like this: foo.h: static inline void frobnicate(void) { // ...
Infrastructure asked 16/1, 2012 at 20:8

3

Does LLVM automatically convert Objective-C methods to inline functions when possible? (I.e., is it just as performant to create an Objective-C method for a block of code that you could otherwise...
Wyon asked 19/11, 2011 at 13:56

2

Solved

In C: Why is so that only inline functions with internal linkage (ie declared with static) may reference (ie copy address, read, write, or call) a variable or function at file scope with static sto...
Othilie asked 7/3, 2010 at 21:40

2

Solved

Inlining JavaScript function calls speeds up the execution and also reduces the code size after gzipping, as described in this article: http://blog.calyptus.eu/seb/2011/01/javascript-call-performa...
Buddybuderus asked 15/5, 2011 at 15:43

3

Solved

I want to define an inline function in a project, compiled with c99. How can I do it? When I declare the function in a header file and give the detail in a .c file, the definition isn't recognized ...
Lamkin asked 8/3, 2011 at 6:57

3

Solved

I'm working on a pretty tricky problem that I've been on for literally a week now. I've hit a very hard wall and my forehead hurts from banging it so I'm hoping someone can help me out. I am using...
Stylobate asked 3/3, 2011 at 0:45

1

Solved

I just ran into an issue: when I try to access a private or internal value from an inline function, I get the error "The value 'xxx' was marked inline but its implementation makes use of an interna...
Zealous asked 28/1, 2011 at 3:22

6

Solved

I know compiler may or may not perform inline expansion of a function whether requested by the programmer or not. I was just curious to know, is there any way by which programmer can know for sure ...
Arvonio asked 5/3, 2010 at 4:33

1

Solved

As I know, C inline function body should be defined in .h file because it causes an error 'function-name used but never defined" if body defined in .c file. Is this the regular way? Or how to def...
Gailgaile asked 2/5, 2010 at 6:23

7

Solved

If we define a member function inside the class definition itself, is it necessarily treated inline or is it just a request to the compiler which it can ignore.
Paisley asked 23/3, 2010 at 16:36

1

Solved

I have a C++ program that I compile with mingw (gcc for Windows). Using the TDM release of mingw which includes gcc 4.4.1. The executable links to two static library (.a) files: On of them is a thi...
Reisinger asked 7/2, 2010 at 17:47

9

Solved

I have a function that is declared and defined in a header file. This is a problem all by itself. When that function is not inlined, every translation unit that uses that header gets a copy of the ...
Ragsdale asked 9/10, 2008 at 1:43

4

Solved

I have a class that had an inline member, but I later decided that I wanted to remove the implementation from the headers so I moved the members body of the functions out to a cpp file. At first I ...
Teletypewriter asked 26/5, 2009 at 3:37

5

Solved

ISO C++ says that the inline definition of member function in C++ is the same as declaring it with inline. This means that the function will be defined in every compilation unit the member function...
Baseboard asked 2/3, 2009 at 18:16

© 2022 - 2025 — McMap. All rights reserved.