I wonder if it would be possible to effectively use link-time optimization (lto) for programms consisting of a TU with C++ code calling some function in a TU with C code. So, is there a way to get the C function inlined into the resulting program?
The real use case is a microcontroller firmware written in C++. But there are pieces of code that have to written in C because of C semantics (e.g. access to the non-active union member).
(This has nothing to do with manual marking functions as inline)