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.

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

> I used gcc-3.3.5 under Linux
> 
> Andris
> 
> PS. There are more warnings when -W -Wall is specified and gcc-3.4.3 is used 
> (from my earlier tests with libsigc++-2.0.6 for target i586-pc-msdosdjgpp) 

gtkmm compiles from cvs with -Wall usually, so I doubt therefore that
there are many warnings, but a bug report and/or patch would be welcome.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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