summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Gen.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-06-02 05:18:32 +0000
committerMichi Henning <michi@zeroc.com>2004-06-02 05:18:32 +0000
commit25cbc6f624f3beae8f5398e4dba7db77b9cbe087 (patch)
tree168811a0ec805d94cbc0335fdd1099ba93981f7e /cpp/src/slice2java/Gen.cpp
parentImplemented missing test for overrun in BasicStream.java. Fixed incorrect (diff)
downloadice-25cbc6f624f3beae8f5398e4dba7db77b9cbe087.tar.bz2
ice-25cbc6f624f3beae8f5398e4dba7db77b9cbe087.tar.xz
ice-25cbc6f624f3beae8f5398e4dba7db77b9cbe087.zip
Added AMD support.
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 7a065c91502..90ed3ccb2be 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -3714,6 +3714,18 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
throws.sort();
throws.unique();
+ //
+ // Arrange exceptions into most-derived to least-derived order. If we don't
+ // do this, a base exception handler can appear before a derived exception
+ // handler, causing compiler warnings and resulting in the base exception
+ // being marshaled instead of the derived exception.
+ //
+#if defined(__SUNPRO_CC)
+ throws.sort(Slice::derivedToBaseCompare);
+#else
+ throws.sort(Slice::DerivedToBaseCompare());
+#endif
+
TypeStringList::const_iterator q;
int iter;