ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Пятница
29 марта
660592 Топик полностью
zeleny (16.03.2016 16:15, просмотров: 101) ответил IBAH на IAR + STM32 Я так понял чтобы функция заинлайнилась, необходимо чтобы вызов функции и её тело были в одном модуле, иначе никак? Может поможет многофайловая компиляция?
в GCC inline нужно определять в .h, тогда 100% заинлайнится, может в IAR по-другому... https://gcc.gnu.org/onlinedocs/gcc/Inline.html
This combination of inline and extern has almost the effect of a macro. The way to use it is to put a function definition in a header file with these keywords, and put another copy of the definition (lacking inline and extern) in a library file. The definition in the header file causes most calls to the function to be inlined. If any uses of the function remain, they refer to the single copy in the library.