After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692079 - build failure in gmarkup.c when using gcc 4.8 and building for the win64 target
build failure in gmarkup.c when using gcc 4.8 and building for the win64 target
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
2.35.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-19 13:52 UTC by Erik van Pienbroek
Modified: 2013-01-19 19:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Erik van Pienbroek 2013-01-19 13:52:15 UTC
GCC 4.8 has started to consider formatting issues as fatal errors (in earlier versions of GCC this used to be a warning). This causes a build failure when trying to build glib for the win64 target using gcc 4.8:

  CC       libglib_2_0_la-gmarkup.lo
../../glib/gmarkup.c: In function 'g_markup_parse_context_ref':
../../glib/gmarkup.c:289:34: warning: typedef '_GStaticAssertCompileTimeAssertion_0' locally defined but not used [-Wunused-local-typedefs]
   g_atomic_int_inc (&context->ref_count);
                                  ^
../../glib/gmarkup.c: In function 'g_markup_parse_context_unref':
../../glib/gmarkup.c:309:38: warning: typedef '_GStaticAssertCompileTimeAssertion_1' locally defined but not used [-Wunused-local-typedefs]
   if (g_atomic_int_dec_and_test (&context->ref_count))
                                      ^
../../glib/gmarkup.c: In function 'unescape_gstring_inplace':
../../glib/gmarkup.c:687:39: error: field precision specifier '.*' expects argument of type 'int', but argument 6 has type 'long long int' [-Werror=format=]
                                       end - from, from);
                                       ^
../../glib/gmarkup.c:722:43: error: field precision specifier '.*' expects argument of type 'int', but argument 6 has type 'long long int' [-Werror=format=]
                                           end - from, from);
                                           ^
../../glib/gmarkup.c:767:41: error: field precision specifier '.*' expects argument of type 'int', but argument 6 has type 'long long int' [-Werror=format=]
                                         end-from, from);
                                         ^
cc1: some warnings being treated as errors
make[4]: *** [libglib_2_0_la-gmarkup.lo] Error 1

The GStaticAssertCompileTimeAssertion warnings are already being handled in bug 686773.

When building glib for the win64 target using gcc 4.7 then only the following warnings are shown:

  CC       libglib_2_0_la-gmarkup.lo
../../glib/gmarkup.c: In function 'unescape_gstring_inplace':
../../glib/gmarkup.c:687:39: warning: field precision specifier '.*' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat]
../../glib/gmarkup.c:722:43: warning: field precision specifier '.*' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat]
../../glib/gmarkup.c:767:41: warning: field precision specifier '.*' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat]


For now I've managed to work around it by setting the CFLAGS to -Wno-error=format='.*', but that of course isn't a real solution