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 136930 - cannot convert `int' to `__va_list_tag'
cannot convert `int' to `__va_list_tag'
Status: RESOLVED FIXED
Product: gnomemm
Classification: Deprecated
Component: libgnomecanvasmm
2.0
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-03-11 20:38 UTC by btb
Modified: 2005-02-02 13:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use helper function to pass va_list (622 bytes, patch)
2005-02-01 19:45 UTC, btb
none Details | Review

Description btb 2004-03-11 20:38:51 UTC
Build fails on alpha:

 alpha-linux-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"libgnomecanvasmm\"
-I../../libgnomecanvas -I../../libgnomecanvas -I/usr/include/gtkmm-2.0
-I/usr/lib/gtkmm-2.0/include -I/usr/include/gtk-2.0
-I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0
-I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/atk-1.0
-I/usr/include/libgnomecanvas-2.0 -I/usr/include/libart-2.0 -g -O2 -MT
item.lo -MD -MP -MF .deps/item.Tpo -c item.cc  -fPIC -DPIC -o .libs/item.o
item.cc: In member function `void 
   Gnome::Canvas::Item::item_construct(Gnome::Canvas::Group&)':
item.cc:48: error: cannot convert `int' to `__va_list_tag' for argument `4' to 
   `void gnome_canvas_item_construct(GnomeCanvasItem*, GnomeCanvasGroup*,
const 
   gchar*, __va_list_tag)'


the line in question is:
  gnome_canvas_item_construct(GNOME_CANVAS_ITEM(gobj()), group.gobj(),
                              0, 0);
Comment 1 Murray Cumming 2004-03-12 11:13:22 UTC
That function has this declaration:

void gnome_canvas_item_construct (GnomeCanvasItem *item,
GnomeCanvasGroup *parent, const gchar *first_arg_name, va_list args);

Please try casting the 0 to va_list and submit a patch if it works.
Comment 2 Bugzilla Maintainers 2004-04-01 23:44:57 UTC
The URL field has been removed from bugzilla.gnome.org. This URL was in the old URL field, and is being added as a comment so that the data is not lost. Please email bugmaster@gnome.org if you have any questions.

URL: 
http://buildd.debian.org/fetch.php?&pkg=libgnomecanvasmm2.0&ver=2.0.1-3&arch=alpha&stamp=1077970234&file=log&as=raw
Comment 3 btb 2004-04-02 03:30:17 UTC
Hmmmm.  gcc bug?  maybe you're not meant to do that type of thing with a va_list
- it does seem rather weird to me.


 alpha-linux-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"libgnomecanvasmm\"
-I../../libgnomecanvas -I../../libgnomecanvas -I/usr/include/gtkmm-2.0
-I/usr/lib/gtkmm-2.0/include -I/usr/include/gtk-2.0
-I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0
-I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/atk-1.0
-I/usr/include/libgnomecanvas-2.0 -I/usr/include/libart-2.0 -g -O2 -MT item.lo
-MD -MP -MF .deps/item.Tpo -c item.cc  -fPIC -DPIC -o .libs/item.o
item.cc: In member function `void 
   Gnome::Canvas::Item::item_construct(Gnome::Canvas::Group&)':
item.cc:48: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 4 Murray Cumming 2004-04-29 15:43:22 UTC
Bradley, what compiler version/platform is giving you that internal compiler error?
Comment 5 btb 2004-04-29 19:16:44 UTC
gcc 3.3.3, debian linux/alpha.
Comment 6 Murray Cumming 2004-05-08 20:59:31 UTC
Well, I hope you submitted the gcc bug report.
Comment 7 Murray Cumming 2005-02-01 16:58:32 UTC
Is this still a problem with newer versions of gcc? I'm inclined to close this
as non-gtkmm if it's just a compiler crash.

If this is really not possible on some platforms then maybe it needs a configure
test and an #ifdef. There are already some similar configure tests in libsigc++
and glibmm.
Comment 8 btb 2005-02-01 19:45:16 UTC
Created attachment 36836 [details] [review]
use helper function to pass va_list

I'm sorry, I thought I submitted this patch already.  This is how I fixed it. 
This code should work with any compiler.
Comment 9 Murray Cumming 2005-02-01 19:54:48 UTC
Thanks. Why do you need an extra function instead of just using va_*() directly
in the constructor?
Comment 10 btb 2005-02-01 21:10:50 UTC
You can only use va_*() in a function with varargs (... at the end of the
parameter list)
Comment 11 Murray Cumming 2005-02-02 13:24:22 UTC
Committed. Thanks.