Hallo,
ich möchte explizit inlining für bestimmte Funktionen verbieten, da
der erzeugte Code manchmal zu gross ist.
Dabei erzeugt folgende Konstruktion einen Compilerfehler
:expected ')' before '__attribute__'
:expected identifier or '(' before ')' token
1 | static __attribute__((noinline))
|
2 | void function( type param1 )
|
3 | {
|
4 | ...
|
5 | }
|
... und diese Konstruktion funktioniert !
1 | #define noinline __attribute__((noinline))
|
2 |
|
3 | static noinline
|
4 | void function( type param1 )
|
5 | {
|
6 | ...
|
7 | }
|
Auch ist es egal, ob ich das _attribute_ vorne, mittig oder hinten bei
der Function angebe.
Ich verstehe nicht warum das so ist und bitte um Hilfe dazu.
Compiler : avr-gcc (WinAVR 20081205) 4.3.2