Hello,

While compiling LyX in fussy mode of compaq cxx (std strict_ansi -w0),
the following warnings got printed:

| cxx: Info: ../sigc++/basic_signal.h, line 139: destructor for base
|           class "SigC::Signal_" is not virtual (D:basclsnondto)
|           detected during instantiation of class "SigC::Signal0<void, Marsh>
|                     [with Marsh=SigC::Marshal<void>]" at line 76 of
|                     "../../lyx-devel/src/insets/inseterror.h"
|   :public Signal_
| ----------^

| cxx: Info: ../sigc++/slot.h, line 410: destructor for base class
|           "SigC::Handle<SigC::SlotData, SigC::SlotExtend>" is not virtual
|           (D:basclsnondto)
|           detected during:
|             instantiation of class "SigC::Slot1<void, P1> [with P1=const
|                       std::vector<std::string, std::allocator<std::string>> &]"
|                       at line 284 of "../sigc++/basic_signal.h"
|             instantiation of class "SigC::Signal1<void, P1, Marsh> [with
|                       P1=const std::vector<std::string,
|                       std::allocator<std::string>> &,
|                       Marsh=SigC::Marshal<void>]" at line 79 of
|                       "../../lyx-devel/src/frontends/Dialogs.h"
|    :public Handle<SlotData,SlotExtend>
| -----------^

They are fixed by adding virtual destructors to Signal_ and Handle
classes. The (trivial) patch is attached.

Also, when compiling with gcc 2.8.1, I get plenty of
../../sigc++/slot.h: In method `void Callback0<void>::call()':
../../sigc++/slot.h:260: warning: `return' with a value, in function returning void

This is harmless, but annoying nevertheless.

Hope this helps.

JMarc

Index: handle.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/sigc++/handle.h,v
retrieving revision 1.2
diff -u -r1.2 handle.h
--- handle.h    2000/06/12 11:55:08     1.2
+++ handle.h    2000/09/29 12:49:09
@@ -84,6 +84,10 @@
         Obj *o=handle.obj();
         scope_.set(o,o,false);
        }
+
+     // virtual destructor
+     virtual ~Handle() {}
+     
   };
 
 #define HANDLE_CTORS(X,T,P)                  \
Index: macros/basic_signal.h.m4
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/sigc++/macros/basic_signal.h.m4,v
retrieving revision 1.3
diff -u -r1.3 basic_signal.h.m4
--- macros/basic_signal.h.m4    2000/08/10 04:54:00     1.3
+++ macros/basic_signal.h.m4    2000/09/29 12:49:09
@@ -61,7 +61,7 @@
       SlotData* out_connect(SlotData *s);
 
       Signal_();
-      ~Signal_();
+      virtual ~Signal_();
 
     public:
       bool empty() const;

Reply via email to