https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
--- Comment #4 from Kai Tietz <ktietz at gcc dot gnu.org> --- A side-note: Of course the dllimport attribute is part of the prototype. So for C case it would be consistent to have the dllimport-attribute also specified for the inline, which gets rejected. This reject might be doubtful as an inline-function isn't necessarily inlined, and so the function gets called. A second side-note: This issue is only happening for C compiler. For C++ semantics of inline is different, and sample-code works as expected.