Re: Broken 'C' compilation when building from Master with MSVC


On 2 November 2015 at 22:50, Arnavion <arnavion gmail com> wrote:
Presumably this is not being included by gtypes.h

inline in C is a C99 feature, which is why older VS doesn't support
it. VS2015 does.

I'm pretty sure MSVC versions prior to the one in Visual Studio 2015
support `static inline` function declarations.



On Mon, Nov 2, 2015 at 2:27 PM, Emmanuele Bassi <ebassi gmail com> wrote:

On 2 November 2015 at 20:10, John Emmas <johne53 tiscali co uk> wrote:
This is my third attempt to reply to Emmanuele so apologies if this comes
through in duplicate (or even triplicate!!)  My posts to this list seem to
frequently get lost somewhere (for some reason I've never understood).
Anyway, here's what I wrote...

On 02/11/2015 16:56, Emmanuele Bassi wrote:

you should try the patch attached to this bug:

and see if it fixes the issue for you.

Thanks for the quick reply Emmanuele.

If you're referring to the problem with G_STATIC_ASSERT it's not relevant in
my case because _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS doesn't seem to be
defined anywhere.  However, if I explicitly #define it (and then apply the
patch) that doesn't help.  I then just see the same error occur at line 417
instead of 427.

I've a strange feeling that we might need underscores here with MSVC 'C'.
The compiler seems happy with "_inline" and "__inline" - but "inline" is
only accepted when building as C++.  I must admit, that comes as a bit of a

Indeed, given that GLib and GTK+ use inline all over the place — and
GLib requires support for static inline functions as part of the
toolchain requirements:

GLib has a bunch of macros to allow some sort of ABI compatibility
when using compilers that have different ideas about the inline
keyword, but that's just for legacy code.

Which version of MSVC are you using?


[ ] ebassi [ gmail com]
gtk-devel-list mailing list
gtk-devel-list gnome org

[ ] ebassi [ gmail com]

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]