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 328705 - C99ism in glib/gmem.c
C99ism in glib/gmem.c
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.9.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2006-01-26 10:38 UTC by Kazuki Iwamoto
Modified: 2006-01-26 19:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2006-01-26 10:38:37 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:
Comment 1 Matthias Clasen 2006-01-26 19:43:56 UTC
2006-01-26  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmem.c (g_mem_init_nomessage): Fix C99isms.  (#328705, 
	Kazuki Iwamoto)