You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2008/05/07 23:28:50 UTC
svn commit: r654288 - in /stdcxx/branches/4.2.x: include/rw/_iosfailure.h
src/exception.cpp
Author: sebor
Date: Wed May 7 14:28:49 2008
New Revision: 654288
URL: http://svn.apache.org/viewvc?rev=654288&view=rev
Log:
2008-05-07 Martin Sebor <se...@roguewave.com>
STDCXX-913
* include/rw/_iosfailure.h (__rw_badbit_set, __rw_eofbit_set,
__rw_failbit_set): Explicitly declared virtual dtors.
* src/exception.cpp (__rw_badbit_set, __rw_eofbit_set,
__rw_failbit_set): Defined virtual dtors out of line to
reduce code bloat and silence gcc 4.3 warning: inlining
failed, call is unlikely and code size would grow.
Modified:
stdcxx/branches/4.2.x/include/rw/_iosfailure.h
stdcxx/branches/4.2.x/src/exception.cpp
Modified: stdcxx/branches/4.2.x/include/rw/_iosfailure.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_iosfailure.h?rev=654288&r1=654287&r2=654288&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_iosfailure.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_iosfailure.h Wed May 7 14:28:49 2008
@@ -25,7 +25,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -56,11 +56,25 @@
};
-struct _RWSTD_EXPORT __rw_badbit_set: __rw_failure { };
+// (optionally) thrown when stream sets badbit
+struct _RWSTD_EXPORT __rw_badbit_set: __rw_failure
+{
+ virtual ~__rw_badbit_set () _THROWS (());
+};
+
+
+// (optionally) thrown when stream sets eofbit
+struct _RWSTD_EXPORT __rw_eofbit_set: __rw_failure
+{
+ virtual ~__rw_eofbit_set () _THROWS (());
+};
-struct _RWSTD_EXPORT __rw_eofbit_set: __rw_failure { };
-struct _RWSTD_EXPORT __rw_failbit_set: __rw_failure { };
+// (optionally) thrown when stream sets failbit
+struct _RWSTD_EXPORT __rw_failbit_set: __rw_failure
+{
+ virtual ~__rw_failbit_set () _THROWS (());
+};
} // namespace __rw
Modified: stdcxx/branches/4.2.x/src/exception.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/exception.cpp?rev=654288&r1=654287&r2=654288&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/exception.cpp (original)
+++ stdcxx/branches/4.2.x/src/exception.cpp Wed May 7 14:28:49 2008
@@ -22,7 +22,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -936,8 +936,10 @@
}
-// outline to reduce code bloat caused by compilers that emit the vtbl
-// in every translation unit containing the definition of the class
+// trivial dtors outlined to reduce code bloat caused by compilers that
+// emit the vtbl in every translation unit containing the definition of
+// the class
+
// virtual dtor
/* virtual */ __rw_failure::~__rw_failure () _THROWS (())
{
@@ -945,4 +947,22 @@
}
+/* virtual */ __rw_badbit_set::~__rw_badbit_set () _THROWS (())
+{
+ // no-op
+}
+
+
+/* virtual */ __rw_eofbit_set::~__rw_eofbit_set () _THROWS (())
+{
+ // no-op
+}
+
+
+/* virtual */ __rw_failbit_set::~__rw_failbit_set () _THROWS (())
+{
+ // no-op
+}
+
+
} // namespace __rw