Re: G_HAVE_ISO_VARARGS broken for gcc -x c++
- From: Owen Taylor <otaylor redhat com>
- To: Tim Janik <timj gtk org>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: G_HAVE_ISO_VARARGS broken for gcc -x c++
- Date: 28 May 2001 11:36:41 -0400
The basic problem here is that some C compilers - in particular
gcc 2.95 support ISO C varargs only in C and not in C++.
I'm about to commit a patch that tests for ISO C varargs with
both C and C++ compilers, and then defines G_HAVE_ISO_VARARGS as:
#define G_HAVE_ISO_VARARGS (defined(__cplusplus) ? defined(G_HAVE_ISO_C_VARARGS) : defined(G_HAVE_ISO_CXX_VARARGS))
Regards,
Owen
Tim Janik <timj gtk org> writes:
> hey owen,
>
> i don't have the time to investigate exactly why,
> but the new ISO macro varargs stuff is broken for c++.
>
> #ifdef G_HAVE_ISO_VARARGS
> #define g_error(...) g_log (G_LOG_DOMAIN, \
> G_LOG_LEVEL_ERROR, \
> __VA_ARGS__)
>
> if you'd like to check this out, module gnome-arts
> in the freedesktop.org CVS, but a test case should be
> easy enough to cook up, the error messages were:
>
> In file included from /opt/include/glib-2.0/glib.h:49,
> from /opt/include/gtk-2.0/gdk/gdktypes.h:32,
> from /opt/include/gtk-2.0/gdk/gdkcolor.h:4,
> from /opt/include/gtk-2.0/gdk/gdk.h:30,
> from /opt/include/gtk-2.0/gtk/gtk.h:31,
> from gartscontrol.cc:18:
> /opt/include/glib-2.0/gmessages.h:103: warning: invalid character in macro parameter name
> /opt/include/glib-2.0/gmessages.h:103: badly punctuated parameter list in `#define'
> /opt/include/glib-2.0/gmessages.h:106: warning: invalid character in macro parameter name
> /opt/include/glib-2.0/gmessages.h:106: badly punctuated parameter list in `#define'
> /opt/include/glib-2.0/gmessages.h:109: warning: invalid character in macro parameter name
> /opt/include/glib-2.0/gmessages.h:109: badly punctuated parameter list in `#define'
> /opt/include/glib-2.0/gmessages.h:112: warning: invalid character in macro parameter name
> /opt/include/glib-2.0/gmessages.h:112: badly punctuated parameter list in `#define'
> make[2]: *** [gartscontrol.o] Error 1
>
> btw, i'd like to make a new release of glib/gtk+ later
> this week (with fixed/c++-diable ISO varargs ;), so
> stefan and me can make a new release of gnome-arts
> depending on that.
>
> ---
> ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]