GNOME Bugzilla – Bug 136930
cannot convert `int' to `__va_list_tag'
Last modified: 2005-02-02 13:24:22 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);
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.
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
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.
Bradley, what compiler version/platform is giving you that internal compiler error?
gcc 3.3.3, debian linux/alpha.
Well, I hope you submitted the gcc bug report.
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.
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.
Thanks. Why do you need an extra function instead of just using va_*() directly in the constructor?
You can only use va_*() in a function with varargs (... at the end of the parameter list)
Committed. Thanks.