__attribute__((used)) not recognized
Hi,
I have to compile a function which is not referenced thus I try to use the __attribute__((used)) keyword. But I encounter some issues, the compiler does not recognise it.
Here how i used it:
void my_function (void) __attribute__((used));
void my_function(void) {
blabla (); }
And here is the result :
Building “my_project” in configuration “MAXQ30 Debug”
Compiling main.c
found '__attribute__', expecting ';'
found '(', expecting ')'
missing prototype
found ')', expecting ';'
Build failed
Does anyone have a clue ?
Thanks
- Emilien
Please sign in to leave a comment.
Comments
2 comments