Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiler doesn't recognize __STATIC_INLINE

Tags:

c

gcc

I have a C project which was running on ARM architecture using the arm-none-eabi-gcc compiler and now I am trying to compile it natively on windows using the gnu99 compiler because I need to unit test and it was difficult to do it on the actual hardware.

However the compiler is not recognizing the static inline commands although i included the inline flag in my makefile, as follows: CFLAGS += -fgnu89-inline

Below is the error i am getting:

error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' __STATIC_INLINE void

Does anyone have an idea on how to let the compiler recognize the inline commands?

like image 750
Faisal Kabariti Avatar asked Nov 26 '25 03:11

Faisal Kabariti


1 Answers

The name __STATIC_INLINE is not a part of standard C. You either need to provide a macro definition for it, or you should replace __STATIC_INLINE with static inline.

like image 184
David Grayson Avatar answered Nov 28 '25 16:11

David Grayson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!