tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: gcc 5 fixing: removing inline
On Tue, Apr 12, 2016 at 10:01:53AM +0200, Thomas Klausner wrote:
> I had to fix wip/taisei to build with gcc-5, see below, but I don't
> understand why I had to remove the inlines.
>
> Can someone please explain it to me?
GCC 5 finally defaults to a modern version of C that has inline support
and C99 inline differs in behavior from the ancient GCC extension. Plain
inline functions provide an optional body, the compiler may or may not
inline it. If it doesn't, it creates a call to the real implementation.
This means for once that inline declarations in a header without actual
body are bogus as best. In most cases, the correct replacement for
inline bodies in headers is to use "static inline" and otherwise just
drop inline.
Joerg
Home |
Main Index |
Thread Index |
Old Index