T
TGOS
Is it allowed and safe with most compiler, to use inline within an
inline function?
E.g.
static inline void
myFunc()
{
...
}
static inline void
myFunc2()
{
...
myFunc();
...
}
static inline void
myFunc3()
{
...
myFunc();
...
}
And now I'm calling myFunc(), myFunc2() and myFunc3() at different
occassions all over the rest of code. Is that legal?
Because I had a strange bug in my program and after removing the inline
of the three functions, the bug was gone. Coincident? A bug in the
compiler? I don't know for sure.
So I thought, lets first ask some experts if inlining in inlined
functions is considered a safe operation.
inline function?
E.g.
static inline void
myFunc()
{
...
}
static inline void
myFunc2()
{
...
myFunc();
...
}
static inline void
myFunc3()
{
...
myFunc();
...
}
And now I'm calling myFunc(), myFunc2() and myFunc3() at different
occassions all over the rest of code. Is that legal?
Because I had a strange bug in my program and after removing the inline
of the three functions, the bug was gone. Coincident? A bug in the
compiler? I don't know for sure.
So I thought, lets first ask some experts if inlining in inlined
functions is considered a safe operation.