GNOME Bugzilla – Bug 328705
C99ism in glib/gmem.c
Last modified: 2006-01-26 19:43:56 UTC
Please describe the problem: Because of C99ism in the file glib/gmem.c, glib does not compile. Steps to reproduce: 1. compile by old compiler Actual results: following messages are displayed. (Visual C++ 6.0) gmem.c(692) : error C2275: 'gchar' : illegal use of this type as an expression gtypes.h(41) : see declaration of 'gchar' gmem.c(692) : error C2146: syntax error : missing ';' before identifier 'buffer' gmem.c(692) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>' gmem.c(692) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>' gmem.c(692) : error C2143: syntax error : missing ';' before 'identifier' gmem.c(692) : error C2065: 'buffer' : undeclared identifier gmem.c(692) : error C2109: subscript requires array or pointer type gmem.c(693) : error C2143: syntax error : missing ';' before 'const' gmem.c(694) : error C2143: syntax error : missing ';' before 'type' gmem.c(697) : error C2275: 'gint' : illegal use of this type as an expression gtypes.h(44) : see declaration of 'gint' gmem.c(697) : error C2146: syntax error : missing ';' before identifier 'flags' gmem.c(697) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>' gmem.c(697) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown>' gmem.c(697) : error C2143: syntax error : missing ';' before 'identifier' gmem.c(697) : error C2065: 'flags' : undeclared identifier gmem.c(697) : error C2065: 'val' : undeclared identifier gmem.c(697) : error C4047: 'function' : 'const gchar *' differs in levels of indirection from 'int' gmem.c(697) : error C2065: 'keys' : undeclared identifier gmem.c(697) : error C4047: 'function' : 'const GDebugKey *' differs in levels of indirection from 'int' gmem.c(697) : error C2109: subscript requires array or pointer type gmem.c(697) : error C2198: 'g_parse_debug_string' : too few arguments for call through pointer-to-function Expected results: The declaration have to be moved to top of block. Does this happen every time? every time Other information:
2006-01-26 Matthias Clasen <mclasen@redhat.com> * glib/gmem.c (g_mem_init_nomessage): Fix C99isms. (#328705, Kazuki Iwamoto)