Log in

View Full Version : Function force inlining for frc compiler


Hsifeulbhsifder
15-03-2015, 13:08
Hello, just wondering if it is possible to force inline functions when using the frc compiler, using __forceinline does not work, but __inline does. I just want to know if it is possible.

Ben Wolsieffer
15-03-2015, 13:13
You could try:
__attribute__((always_inline))
as in:
inline void foo (const char) __attribute__((always_inline));

But really, is there any need for this in FRC code?

Hsifeulbhsifder
15-03-2015, 13:21
Thank you, there isn't much need for it, I just wanted to know. So it works exactly how it does in linux. Thanks.

codes02
16-03-2015, 02:22
Thank you, there isn't much need for it, I just wanted to know. So it works exactly how it does in linux. Thanks.

The "frc compiler" is just standard gcc built to crosscompile ARM binaries. Full documentation is here: https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/ , but googling for what you're after may have better results.