OSDN Git Service

* GCC 3.0 & 2.95.3 fixes.
authormrg <mrg>
Thu, 12 Jul 2001 11:37:32 +0000 (11:37 +0000)
committermrg <mrg>
Thu, 12 Jul 2001 11:37:32 +0000 (11:37 +0000)
[component/audio/ChangeLog]
* compAudio.cxx (fd_audio): Add missing throw() specifiers to this dtor.
* components.h (basic_codec, generic_audio, nop_audio, fd_audio,
linux_audio, solaris_audio): Add missing throw() specifiers to these
dtors.

[component/cfgroot/ChangeLog]
* compConfig.cxx (cfgroot_component): Add missing throw() specifiers
to this dtor.

[component/tcl/ChangeLog]
* compTcl.cxx (tcl_component): Add missing throw() specifiers to this
dtor.

[include/ChangeLog]
* sidattrutil.h (attribute_coder_base, attribute_coder_virtual,
attribute_coder_alias, attribute_coder_virtual_parameterized,
attribute_coder, attribute_coder_ro, attribute_coder_ro_value,
attribute_coder_bus_rw, attribute_coder_bus_wo,
fixed_attribute_map_component): Add missing throw() specifiers
to these dtors.
* sidbusutil.h (word_bus, passthrough_bus, mux_passthrough_bus,
passthrough_word_bus, harvard_bus, byte_bus, callback_byte_bus,

13 files changed:
sid/component/audio/ChangeLog
sid/component/audio/compAudio.cxx
sid/component/audio/components.h
sid/component/cfgroot/ChangeLog
sid/component/cfgroot/compConfig.cxx
sid/component/tcl/ChangeLog
sid/component/tcl/compTcl.cxx
sid/include/ChangeLog
sid/include/sidattrutil.h
sid/include/sidbusutil.h
sid/include/sidcomputil.h
sid/include/sidcpuutil.h
sid/include/sidpinutil.h

index 37b6392..fb462fe 100644 (file)
@@ -1,3 +1,10 @@
+2001-07-12  matthew green  <mrg@redhat.com>
+
+       * compAudio.cxx (fd_audio): Add missing throw() specifiers to this dtor.
+       * components.h (basic_codec, generic_audio, nop_audio, fd_audio,
+       linux_audio, solaris_audio): Add missing throw() specifiers to these
+       dtors.
+
 2001-06-26  Frank Ch. Eigler  <fche@redhat.com>
 
        * Makefile.am (ACLOCAL_AMFLAGS): Refer to $srcdir.
index e194ca1..1d538f1 100644 (file)
@@ -363,7 +363,7 @@ fd_audio::fd_audio()
 }
 
 
-fd_audio::~fd_audio()
+fd_audio::~fd_audio() throw()
 {
   if (this->rx_fd >= 0)
     close (this->rx_fd);
index cba4ece..3962287 100644 (file)
@@ -97,7 +97,7 @@ class basic_codec: public virtual component,
 {
 public:
   basic_codec ();
-  ~basic_codec () {}
+  ~basic_codec () throw() {}
 
 private:
   friend class callback_word_bus<basic_codec,big_int_4>;
@@ -159,7 +159,7 @@ class generic_audio: public virtual component,
 {
 public:
   generic_audio ();
-  ~generic_audio () {}
+  ~generic_audio () throw() {}
 
 protected:
   virtual bool begin_tx (const audio_config&) = 0;
@@ -215,7 +215,7 @@ class nop_audio: public generic_audio
 {
 public:
   nop_audio () {}
-  ~nop_audio () {}
+  ~nop_audio () throw() {}
 
 private:
   // The inherited virtual functions 
@@ -235,7 +235,7 @@ class fd_audio: public generic_audio
 {
 public:
   fd_audio ();
-  ~fd_audio ();
+  ~fd_audio () throw() ;
 
 protected:
   virtual bool set_audio_config (int, const audio_config&) = 0;
@@ -260,7 +260,7 @@ class linux_audio: public fd_audio
   // XXX
 public:
   linux_audio () {}
-  ~linux_audio () {}
+  ~linux_audio () throw() {}
 
 protected:
   bool set_audio_config (int, const audio_config&) { return true; }
@@ -270,7 +270,7 @@ class solaris_audio: public fd_audio
 {
 public:
   solaris_audio () {}
-  ~solaris_audio () {}
+  ~solaris_audio () throw() {}
 
   // XXX
   bool set_audio_config (int, const audio_config&) { return true; }
index a343833..e4c1651 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-12  matthew green  <mrg@redhat.com>
+
+       * compConfig.cxx (cfgroot_component): Add missing throw() specifiers
+       to this dtor.
+
 2001-06-26  Frank Ch. Eigler  <fche@redhat.com>
 
        * Makefile.am (ACLOCAL_AMFLAGS): Refer to $srcdir.
index 3b12646..fe95116 100644 (file)
@@ -89,7 +89,7 @@ class cfgroot_component: public virtual component,
 {
 public:
   cfgroot_component();
-  virtual ~cfgroot_component();
+  virtual ~cfgroot_component() throw();
 
 protected:
   host_int_8 activity_count;
@@ -634,7 +634,7 @@ cfgroot_component::cfgroot_component():
 }
 
 
-cfgroot_component::~cfgroot_component() 
+cfgroot_component::~cfgroot_component() throw()
 {
     // Delete every item in the component_creator map.
     for (component_creator_map_t::iterator it = this->component_creator_map.begin ();
index c0e5231..8eda097 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-12  matthew green  <mrg@redhat.com>
+
+       * compTcl.cxx (tcl_component): Add missing throw() specifiers to this
+       dtor.
+
 2001-06-26  Frank Ch. Eigler  <fche@redhat.com>
 
        * Makefile.am (ACLOCAL_AMFLAGS): Refer to $srcdir.
index e6d4e42..5a3c6f7 100644 (file)
@@ -254,7 +254,7 @@ namespace tcl_api_component
        tcl_component_ctor_0 ();
       }
 
-    ~tcl_component ()
+    ~tcl_component () throw()
       {
        // XXX: kill buses?, pins?
        if (interp)
index 7d59543..ca19684 100644 (file)
@@ -1,3 +1,23 @@
+2001-07-12  matthew green  <mrg@redhat.com>
+
+       * sidattrutil.h (attribute_coder_base, attribute_coder_virtual,
+       attribute_coder_alias, attribute_coder_virtual_parameterized,
+       attribute_coder, attribute_coder_ro, attribute_coder_ro_value,
+       attribute_coder_bus_rw, attribute_coder_bus_wo,
+       fixed_attribute_map_component): Add missing throw() specifiers
+       to these dtors.
+       * sidbusutil.h (word_bus, passthrough_bus, mux_passthrough_bus,
+       passthrough_word_bus, harvard_bus, byte_bus, callback_byte_bus,
+       fixed_accessor_map_component, fixed_bus_map_component): Likewise.
+       * sidcomputil.h (fixed_relation_map_component): Likewise.
+       * sidpinutil.h (list_output, output_pin): Likewise
+       (fixed_pin_map_component): Likewise
+       * sidcpuutil.h (basic_cpu, basic_big_endian_cpu,
+       basic_little_endian_cpu, basic_bi_endian_cpu): Likewise.
+       (basic_cpu::read_insn_memory, basic_cpu::write_insn_memory,
+       basic_cpu::read_data_memory, basic_cpu::write_data_memory): Rework
+       to avoid GCC 2.95.3 errors.
+
 2001-07-06  Ben Elliston  <bje@redhat.com>
 
        * sidcpuutil.h: Use std::string for C++ conformance.
index 706c6f0..517375f 100644 (file)
@@ -403,7 +403,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
   public:
     virtual std::string make_attribute() const = 0;
     virtual sid::component::status parse_attribute(const std::string& str) = 0;
-    virtual ~attribute_coder_base() {}
+    virtual ~attribute_coder_base() throw() {}
   };
 
 
@@ -435,7 +435,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
     parse_attribute (const std::string& str)
       { return (receiver->*setter) (str); }
 
-    ~attribute_coder_virtual() { }
+    ~attribute_coder_virtual() throw() { }
   };
 
 
@@ -459,7 +459,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
     parse_attribute (const std::string& str)
       { return receiver->set_attribute_value (name, str); }
 
-    ~attribute_coder_alias() { }
+    ~attribute_coder_alias() throw() { }
   };
 
 
@@ -502,7 +502,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
        return (receiver->*setter) (parameter, str);
       }
 
-   ~attribute_coder_virtual_parameterized() { }
+   ~attribute_coder_virtual_parameterized() throw() { }
 
   };
 
@@ -527,7 +527,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
        return sidutil::parse_attribute (str, *ptr);
       }
 
-    ~attribute_coder() { }
+    ~attribute_coder() throw() { }
   };
 
 
@@ -547,7 +547,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
        return sid::component::bad_value;
       }
     
-    ~attribute_coder_ro() { }
+    ~attribute_coder_ro() throw() { }
   };
 
 
@@ -572,7 +572,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
        return sid::component::bad_value; 
       }
     
-    ~attribute_coder_ro_value() { }
+    ~attribute_coder_ro_value() throw() { }
  
   };
 
@@ -636,7 +636,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
        else return sid::component::bad_value;
       }
     
-    ~attribute_coder_bus_rw() { }
+    ~attribute_coder_bus_rw() throw() { }
   };
 
 
@@ -679,7 +679,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
        return s;
       }
 
-   ~attribute_coder_bus_wo() { }
+   ~attribute_coder_bus_wo() throw() { }
 
   private:
     std::string last_written_attribute;
@@ -723,7 +723,7 @@ make_attribute (const sid::any_int<IntType,IsBig>& value)
     // the compiler working set blew up.
     
   protected:
-    ~fixed_attribute_map_component () { /* XXX: delete coder objects */ }
+    ~fixed_attribute_map_component () throw() { /* XXX: delete coder objects */ }
 
     // Add or remove an attribute <-> category association.  The named
     // attribute must already exist.
index 6a02b41..204f823 100644 (file)
@@ -26,7 +26,7 @@ namespace sidutil
   {
   protected:
     word_bus() {}
-    ~word_bus() {}
+    ~word_bus() throw() {}
 
     virtual sid::bus::status word_write(sid::host_int_4 addr,
                                        DataType mask,
@@ -218,7 +218,7 @@ namespace sidutil
       {
        assert (target != 0);
       }
-    ~passthrough_bus() {}
+    ~passthrough_bus() throw() {}
     
     // Some macros to make manufacturing of the cartesian-product
     // calls simpler.
@@ -268,7 +268,7 @@ namespace sidutil
         t[1] = t2;
        t[2] = NULL;
       }
-    ~mux_passthrough_bus() {}
+    ~mux_passthrough_bus() throw() {}
     void switch_bus()
     {
       // Switch to the next bus if the current one is valid (0 or 1)
@@ -342,7 +342,7 @@ namespace sidutil
       { 
        assert (target != 0);
       }
-    ~passthrough_word_bus() {}
+    ~passthrough_word_bus() throw() {}
 
     virtual sid::bus::status word_write(sid::host_int_4 addr,
                                        DataType mask,
@@ -420,7 +420,7 @@ namespace sidutil
        assert (insn_bus != 0);
        assert (data_bus != 0);
       }
-    ~harvard_bus() {}
+    ~harvard_bus() throw() {}
 
     sid::bus *map_addr_to_bus (sid::host_int_4 *addr)
       {
@@ -489,7 +489,7 @@ namespace sidutil
   {
   protected:
     byte_bus() {}
-    ~byte_bus() {}
+    ~byte_bus() throw() {}
     
     virtual sid::bus::status 
     write_data(sid::host_int_4 addr, sid::host_int_1 data) throw () = 0;
@@ -572,7 +572,7 @@ namespace sidutil
                         sid::host_int_4, sid::host_int_1 )
                      ) : receiver(h), reader(r), writer(w) {}
 
-    ~callback_byte_bus() {}
+    ~callback_byte_bus() throw() {}
 
   protected:
     Receiver* receiver;
@@ -968,6 +968,8 @@ private:
   {
   public:
 
+    ~fixed_accessor_map_component() throw() {}
+
     // Returns vector of accessor names to components.
     std::vector<std::string>
     accessor_names() throw ()
@@ -1056,6 +1058,8 @@ private:
   class fixed_bus_map_component: public virtual sid::component
   {
   public:
+    ~fixed_bus_map_component() throw() {}
+
     std::vector<std::string>
     bus_names() throw ()
       {
index 42f95c3..bfa0762 100644 (file)
@@ -177,6 +177,8 @@ namespace sidutil
   class fixed_relation_map_component: public virtual sid::component
   {
   public:
+    ~fixed_relation_map_component() throw() {}
+
     typedef std::vector<sid::component*> component_relation_t;
 
     std::vector<std::string> 
index 1943567..9e3c0d6 100644 (file)
@@ -464,7 +464,7 @@ public:
        add_attribute ("trace-result?", & trace_result_p, "setting");
       }
 
-    ~basic_cpu() {}
+    virtual ~basic_cpu() throw() {} 
   };
 
 
@@ -481,8 +481,11 @@ public:
     BigOrLittleInt basic_cpu::read_insn_memory (sid::host_int_4 pc, sid::host_int_4 address, BigOrLittleInt) const
       {
        BigOrLittleInt value;
-       sid::bus::status s = 
-         (LIKELY(this->insn_bus)) ? this->insn_bus->read (address, value) : sid::bus::unmapped;
+       sid::bus::status s;
+       if (LIKELY(this->insn_bus))
+         s = this->insn_bus->read (address, value);
+       else
+         s = sid::bus::unmapped;
        total_latency += s.latency;
        if (LIKELY(s == sid::bus::ok))
          return value;
@@ -493,8 +496,11 @@ public:
     template <typename BigOrLittleInt>
     BigOrLittleInt basic_cpu::write_insn_memory (sid::host_int_4 pc, sid::host_int_4 address, BigOrLittleInt value) const
       {
-       sid::bus::status s = 
-         (LIKELY(this->insn_bus)) ? this->insn_bus->write (address, value) : sid::bus::unmapped;
+       sid::bus::status s;
+       if (LIKELY(this->insn_bus))
+         s = this->insn_bus->write (address, value);
+       else
+         s = sid::bus::unmapped;
        total_latency += s.latency;
        if (LIKELY(s == sid::bus::ok))
          return value;
@@ -506,8 +512,11 @@ public:
     BigOrLittleInt basic_cpu::read_data_memory (sid::host_int_4 pc, sid::host_int_4 address, BigOrLittleInt) const
       {
        BigOrLittleInt value;
-       sid::bus::status s = 
-         (LIKELY(this->data_bus)) ? this->data_bus->read (address, value) : sid::bus::unmapped;
+       sid::bus::status s;
+       if (LIKELY(this->data_bus))
+         s = this->data_bus->read (address, value);
+       else
+         s = sid::bus::unmapped;
        total_latency += s.latency;
        if (LIKELY(s == sid::bus::ok))
          return value;
@@ -518,8 +527,11 @@ public:
     template <typename BigOrLittleInt>
     BigOrLittleInt basic_cpu::write_data_memory (sid::host_int_4 pc, sid::host_int_4 address, BigOrLittleInt value) const
       {
-       sid::bus::status s = 
-         (LIKELY(this->data_bus)) ? this->data_bus->write (address, value) : sid::bus::unmapped;
+       sid::bus::status s;
+       if (LIKELY(this->data_bus))
+         s = this->data_bus->write (address, value);
+       else
+         s = sid::bus::unmapped;
        total_latency += s.latency;
        if (LIKELY(s == sid::bus::ok))
          return value;
@@ -542,7 +554,7 @@ public:
       {
        add_attribute_ro_value ("endian", endian_big, "register");
       }
-    ~basic_big_endian_cpu () {}
+    ~basic_big_endian_cpu () throw() {}
 
     sid::host_int_1 read_insn_memory_1 (sid::host_int_4 pc, sid::host_int_4 address) const
       {
@@ -637,7 +649,7 @@ public:
       {
        add_attribute_ro_value ("endian", endian_little, "register");
       }
-    ~basic_little_endian_cpu () {}
+    ~basic_little_endian_cpu () throw() {}
 
     sid::host_int_1 read_insn_memory_1 (sid::host_int_4 pc, sid::host_int_4 address) const
       {
@@ -736,7 +748,7 @@ public:
        this->_current_endianness = endian_big;
        add_attribute ("endian", & this->_current_endianness, "register");
       }
-    ~basic_bi_endian_cpu () {}
+    ~basic_bi_endian_cpu () throw() {}
 
     void set_endian(sid::host_int_4 v)
       {
index 3818196..de5c8c9 100644 (file)
@@ -50,17 +50,17 @@ namespace sidutil
 
   inline std::ostream& 
   operator << (std::ostream& o, const input_pin& p)
-{
-  o << p.value;
-  return o;
-}
+    {
+      o << p.value;
+      return o;
+    }
 
   inline std::istream& 
   operator >> (std::istream& i, input_pin& p)
-{
-  i >> p.value;
-  return i;
-}
+    {
+      i >> p.value;
+      return i;
+    }
   
 
 
@@ -81,8 +81,10 @@ namespace sidutil
     {
     typedef std::vector<sid::pin*> pin_list_t;
     pin_list_t neighbours;
-    
+
     public:
+      ~list_output() throw() {}
+
       // Propagate value to list of outputs.
       void
       driven (sid::host_int_4 v) throw()
@@ -167,7 +169,7 @@ namespace sidutil
        this->value = 0;
       }
       
-    ~output_pin ()
+    virtual ~output_pin () throw()
       {
        if (this->num_outputs == 0)
          {
@@ -257,17 +259,17 @@ namespace sidutil
 
   inline std::ostream& 
   operator << (std::ostream& o, const output_pin& p)
-{
-  o << p.value;
-  return o;
-}
+    {
+      o << p.value;
+      return o;
+    }
 
   inline std::istream& 
   operator >> (std::istream& i, output_pin& p)
-{
-  i >> p.value;
-  return i;
-}
+    {
+      i >> p.value;
+      return i;
+    }
 
 
 
@@ -290,17 +292,17 @@ namespace sidutil
 
   inline std::ostream& 
   operator << (std::ostream& o, const inputoutput_pin& p)
-{
-  o << *p.output() << " " << *p.input();
-  return o;
-}
+    {
+      o << *p.output() << " " << *p.input();
+      return o;
+    }
 
   inline std::istream& 
   operator >> (std::istream& i, inputoutput_pin& p)
-{
-  i >> *p.output() >> *p.input();
-  return i;
-}
+    {
+      i >> *p.output() >> *p.input();
+      return i;
+    }
 
 
 
@@ -373,6 +375,8 @@ namespace sidutil
        }
       
     public:
+      ~fixed_pin_map_component() throw() {}
+
       // Return the names of all known pins (input & output)
       std::vector<std::string>
       pin_names () throw ()