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 465154 - gtkbuilderparser.c: flexible array is C99ism
gtkbuilderparser.c: flexible array is C99ism
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkBuilder
2.12.x
Other All
: Normal normal
: ---
Assigned To: GtkBuilder maintainers
GtkBuilder maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-09 19:07 UTC by Kazuki Iwamoto
Modified: 2007-10-19 18:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for latest gtkbuilderparser.c (768 bytes, patch)
2007-08-22 15:31 UTC, Kazuki Iwamoto
none Details | Review

Description Kazuki Iwamoto 2007-08-09 19:07:37 UTC
Please describe the problem:
'msg_ctxt_id' is the flexible array.
Therefore old compiler will occur error.

Steps to reproduce:
1. compile gtkbuilderparser.c by old compiler

Actual results:
Following messages are displayed.(Visual C++)
gtkbuilderparser.c(860) : error C2057: expected constant expression
gtkbuilderparser.c(860) : error C2466: cannot allocate an array of constant size 0
gtkbuilderparser.c(860) : error C2133: 'msg_ctxt_id' : unknown size

Expected results:
'msg_ctxt_id' should be allocated dynamically.

Does this happen every time?
Revision 18312 or later

Other information:
Comment 1 Matthias Clasen 2007-08-10 16:23:25 UTC
Ok, we probably just need to reinstate the conditional alloca code that
I stripped out when I copied this code from gettext. For some reason
I was under the impression that this kind of variable-size array was a 
C90 feature...
Comment 2 Kazuki Iwamoto 2007-08-22 15:31:59 UTC
Created attachment 94125 [details] [review]
patch for latest gtkbuilderparser.c
Comment 3 Kazuki Iwamoto 2007-10-19 18:22:26 UTC
2007-09-17  Hans Breuer  <hans@breuer.org>

	* gtk/gtkbuilderparser.c : fixed gccism - stack allocated variable 
	size array