summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
index b32b8f0d261..01203dc65c4 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
@@ -54,6 +54,9 @@ int be_visitor_exception_ch::visit_exception (be_exception *node)
os->indent ();
*os << "class " << node->local_name () << ";" << be_nl;
+ // generate the _ptr declaration
+ *os << "typedef " << node->local_name () << " *"
+ << node->local_name () << "_ptr;" << be_nl;
os->gen_endif ();
os->gen_ifdef_macro (node->flat_name ());
@@ -65,6 +68,13 @@ int be_visitor_exception_ch::visit_exception (be_exception *node)
*os << "{" << be_nl
<< "public:\n\n";
+ // generate the _ptr_type and _var_type typedefs
+ // but we must protect against certain versions of g++
+ *os << "#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)\n";
+ os->incr_indent ();
+ *os << "typedef " << node->local_name () << "_ptr _ptr_type;\n"
+ << "#endif /* ! __GNUC__ || g++ >= 2.8 */\n\n";
+
// generate code for field members
if (this->visit_scope (node) == -1)
{
@@ -80,7 +90,9 @@ int be_visitor_exception_ch::visit_exception (be_exception *node)
*os << node->local_name () << " (void); // default ctor" << be_nl;
*os << node->local_name () << " (const " << node->local_name ()
<< " &); // copy ctor" << be_nl;
- *os << "~" << node->local_name () << " (void); // dtor" << be_nl;
+ *os << "~" << node->local_name () << " (void);" << be_nl;
+
+ *os << "static void _tao_any_destructor (void*);" << be_nl;
// assignment operator
*os << node->local_name () << " &operator= (const "