Broken 'C' compilation when building from Master with MSVC

Hi guys,

I just updated from git master and noticed a problem when building with MSVC...

Round about line 427, 'gtypes.h' has added a small section with some function definitions that look like this:-

static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 b) {
          *dest = a + b; return *dest >= a; }

Unfortunately, MSVC won't compile the above if I try to compile as 'C' code. It compiles fine if I comment out the 'inline' keyword - but otherwise, I get the following compiler error for each of the newly added functions in that section:-

      error C2054: expected '(' to follow 'inline'

FWIW these particular sections compile fine if I build as C++. Unfortunately though, there are quite a few other areas that won't compile as C++ (with MSVC). So currently I can't build either as C or C++. Hope someone can help!


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