- The inline keyword is only allowed together with static. Non-static use shall results in an error.
- The inline keyword enforces inlining rather than suggesting it. In no case an independent instance of an inline function is generated.
- It is not possible to take a pointer of an inline function, trying results in an error.
- An offline keyword will be introduced that forbids inlining for that function.
- Functions that are not inline nor offline will be handled by the compiler for inlining decision.
Code: Select all
static inline void func1(void) {
// This will surely be inlined.
}
offline void func2(void) {
// This will surely not be inlined.
}