Re: [sigc] [libsigc++-2.0.7] [Regression] Warnings from including sigc++/sigc++.h



> On Thu, 2005-01-27 at 14:08 +0200, Andris Pavenis wrote:
> > The following test script
> >
> > #! /bin/sh
> > echo '#include <sigc++/sigc++.h>' |\
> > gcc -c -O2 -W -Wall `pkg-config --cflags sigc++-2.0` -x c++ - -o
> >  /dev/null
> >
> > generates warnings when including sigc++/sigc++.h:
> >
> > In file included from
> > /usr/include/sigc++-2.0/sigc++/signal_base.h:26,
> >                  from /usr/include/sigc++-2.0/sigc++/signal.h:8,
> >                  from /usr/include/sigc++-2.0/sigc++/sigc++.h:23,
> >                  from <stdin>:1:
> > /usr/include/sigc++-2.0/sigc++/type_traits.h:96: warning: all member
> >  functions
> >    in class `sigc::is_base_and_derived<T_base, T_derived>' are
> >  private
> >
> > I think sigc++.h should not cause compiler warnings even if -W -Wall
> > is specified
> > (For my own applications I often add also -Werror ...)
> >
> > In any case there were no such problem with libsigc++-2.0.6.
>
> I can't understand why it did not warn with 2.0.6 as well. I'd welcome
> a patch to stop the warning, though I don't want to make public any of
> the stuff that is currently protected.

Add a function void _remove_gcc_warning () {} in the public part of the
class.  Remove it again when gcc is fixed.

> By the way, the warning is not useful, because there is a public
> variable, so the class is still useful without public methods.

I would indeed think this is a bug in gcc.  I just updated my Debian
system, and don't know if I got a new libsigc++ or a new gcc, but I'm
sure this warning didn't happen before the update.

Thanks,
Bas Wijnen

Ps: please keep me in the Cc when replying, as I'm not subscribed to the
list.

--
I encourage people to send encrypted e-mail (see http://www.gnupg.org).
If you have problems reading my e-mail, use a better reader.
Please send the central message of e-mails as plain text
   in the message body, not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
For more information, see http://129.125.47.90/e-mail.html

Attachment: signature.asc
Description: OpenPGP digital signature



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