Bug#303124: g++-2.95 spews out lots of warnings with glib header files

2006-12-05 Thread Kevin Ryde
Loïc Minier [EMAIL PROTECTED] writes:

  I'm not sure upstream would accept a patch cluttering the headers for
  to avoid warnings with an old compiler.

Nosing around in /usr/lib/glib-2.0/include/glibconfig.h I see there's
just such a 2.95 conditional on G_HAVE_ISO_VARARGS, if that could be
extended to G_HAVE_GNUC_VISIBILITY.  Changing to the following works
for me


#define G_HAVE_GNUC_VARARGS 1
#define G_HAVE_GROWING_STACK 0
#define G_HAVE_GNUC_VISIBILITY 1

/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
 * is passed ISO vararg support is turned off, and there is no work
 * around to turn it on, so we unconditionally turn it off.
 *
 * gcc-2.95.x doesn't have __attribute__((visibility ...)).
 */
#if __GNUC__ == 2  __GNUC_MINOR__ == 95
#  undef G_HAVE_ISO_VARARGS
#  undef G_HAVE_GNUC_VISIBILITY
#endif

#if G_HAVE_GNUC_VISIBILITY
#define G_GNUC_INTERNAL __attribute__((visibility(hidden)))
#else
#define G_GNUC_INTERNAL
#endif



Bug#303124: g++-2.95 spews out lots of warnings with glib header files

2006-09-20 Thread Loïc Minier
Hi,

On Tue, Apr 05, 2005, Richard Atterer wrote:
 compiling glib applications with g++-2.95 is possible, but the
 compiler outputs a lot of warnings like this:
 /usr/include/glib-2.0/gobject/gtype.h:431: warning: `visibility' attribute 
 directive ignored
[...]
 The headers should suppress these warnings if the detected compiler is
 gcc 2.95.

 I'm not sure upstream would accept a patch cluttering the headers for
 to avoid warnings with an old compiler.  I don't think we would want to
 maintain a patch changing all invocations of G_GNUC_INTERNAL (currently
 10) in Debian.  It might be possible to patch only G_GNUC_INTERNAL, if
 this is the case, and you're willing to write a patch, I'll forward it
 upstream for inclusion.

 Meanwhile, I suggest you disable that particular warning or this
 particular class of warnings.

   Bye,
-- 
Loïc Minier [EMAIL PROTECTED]



Bug#303124: g++-2.95 spews out lots of warnings with glib header files

2005-04-04 Thread Richard Atterer
Package: libglib2.0-dev
Version: 2.6.3-1
Severity: minor

Hello,

compiling glib applications with g++-2.95 is possible, but the
compiler outputs a lot of warnings like this:

/usr/include/glib-2.0/gobject/gtype.h:431: warning: `visibility' attribute 
directive ignored
/usr/include/glib-2.0/gobject/gtype.h:432: warning: `visibility' attribute 
directive ignored
/usr/include/glib-2.0/gobject/gtype.h:433: warning: `visibility' attribute 
directive ignored

Apparently, this is caused by the G_GNUC_INTERNAL e.g. in gtype.h:431:
voidg_value_c_init  (void) G_GNUC_INTERNAL; /* sync with gvalue.c */

I used the following compiler switches: -Wall -W -Wpointer-arith -Wconversion 
-Woverloaded-virtual -O2

The headers should suppress these warnings if the detected compiler is
gcc 2.95.

Cheers,

  Richard

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.27
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-15)

Versions of packages libglib2.0-dev depends on:
ii  libc6-dev [libc-dev]2.3.2.ds1-20 GNU C Library: Development Librari
ii  libglib2.0-02.6.3-1  The GLib library of C routines
ii  pkg-config  0.15.0-4 Manage compile and link flags for 

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]