Re: G_HAVE_ISO_VARARGS



Joel Becker <jlbec evilplan org> writes:

> Folks,
> 	AFAICT, glibconfig.h sets G_HAVE_ISO_VARARGS if configure finds
> the compiler can do them.  They are then activated merely by default.
> Unfortunately, this breaks anyone using -ansi -pedantic (because those
> still specify c89).  A prime example is abiword and wv.  We're currently
> porting them up to gtk 2 in house, and, well, it doesn't work.  It did a
> couple weeks ago, when the gmessage.h macros checked __STDC_VERSION__.
> 	I would suggest that the G_HAVE_ISO_VARARGS macro in
> glibconfig.h read:
> 
> #if defined (G_HAVE_ISO_VARARGS) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
> 
> 	In this fashion, folks building with -ansi -pedantic will
> successfully use glib,a nd folks using c99 will as well.

Having ISO varargs doesn't have much relationship to the stdc 
version ... we originally keyed off of this and it didn't
work well at all.

Current plans for fixing the problem are:

#pragma GCC system_headerI 

Since having the compiler warn about things like this in the GLib
headers isn't interesting when you are compiling Abiword.

(You could also make abiword pass -std=c99 or whatever to gcc,
of course)

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]