diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-04-02 22:18:12 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-04-02 22:18:12 +0000 |
commit | c49fcc47ec6da157d4eb61d302fe73339c2c617a (patch) | |
tree | 1358048b02cbf963204929ab9990292a0cdfd97e | |
parent | 105b4d4aa098af35ab557d91bc8b104dbb25b127 (diff) | |
download | ATCD-c49fcc47ec6da157d4eb61d302fe73339c2c617a.tar.gz |
ChangeLogTag: Tue Apr 2 16:17:11 2002 Jeff Parsons <parsons@cs.wustl.edu>
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp | 13 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp | 9 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp | 7 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp | 9 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp | 11 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp | 11 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp | 20 |
9 files changed, 31 insertions, 65 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp index 083cd8b4e8c..47cfcf3d9b1 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp @@ -396,17 +396,12 @@ be_visitor_field_ch::visit_sequence (be_sequence *node) // generate the typedef for that case elsewhere. if (this->ctx_->scope ()->node_type () != AST_Decl::NT_interface) { - // Generate the anonymous sequence member typedef - // but we must protect against certain versions of g++. - // This provides a consistent name to use instead of the - // implementation-specific name. + // Generate the anonymous sequence member typedef. be_decl *bs = this->ctx_->scope (); - *os << "\n#if !defined (__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" - << be_nl - << "typedef " << bt->nested_type_name (bs) + + *os << "typedef " << bt->nested_type_name (bs) << " _" << this->ctx_->node ()->local_name () - << "_seq;\n"; - *os << "#endif /* ! __GNUC__ || ACE_HAS_GNUG_PRE_2_8 */\n" << be_nl; + << "_seq;" << be_nl; } } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp index 9fd8308f80d..37cb5e84fdc 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp @@ -115,15 +115,11 @@ be_visitor_amh_interface_ch::visit_interface (be_interface *node) *os << "{" << be_nl << "public:" << be_nl - // Generate the _ptr_type and _var_type typedefs - // but we must protect against certain versions of g++. - << "#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" - << be_idt_nl + // Generate the _ptr_type and _var_type typedefs. << "typedef " << node->local_name () << "_ptr _ptr_type;" << be_nl << "typedef " << node->local_name () << "_var _var_type;" - << be_uidt_nl - << "#endif /* ! __GNUC__ || g++ >= 2.8 */\n" << be_idt_nl; + << be_nl; // Generate code for the interface definition by traversing thru the // elements of its scope. We depend on the front-end to have made sure diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp index aa2ec989ed8..abb48009b4f 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp @@ -153,15 +153,11 @@ be_visitor_interface_ch::visit_interface (be_interface *node) *os << "{" << be_nl << "public:" << be_nl - // Generate the _ptr_type and _var_type typedefs - // but we must protect against certain versions of g++. - << "#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" - << be_idt_nl + // Generate the _ptr_type and _var_type typedefs. << "typedef " << node->local_name () << "_ptr _ptr_type;" << be_nl << "typedef " << node->local_name () << "_var _var_type;" - << be_uidt_nl - << "#endif /* ! __GNUC__ || g++ >= 2.8 */\n" << be_idt_nl; + << be_nl; // Generate the static variable that we use for narrowing. *os << "static int _tao_class_id;" << be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp index 417254f3257..0430122901e 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -425,14 +425,11 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) *os << "~" << node->local_name () << " (void);" << be_nl << "static void _tao_any_destructor (void*);" << be_nl; - // Generate the _var_type typedef (only if we are not anonymous), - // but we must protect against certain versions of g++. + // Generate the _var_type typedef (only if we are not anonymous). if (this->ctx_->tdef () != 0) { - *os << "\n#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" - << be_nl; - *os << "typedef " << node->local_name () << "_var _var_type;\n" - << "#endif /* ! __GNUC__ || g++ >= 2.8 */" << be_nl << be_nl; + *os << "typedef " << node->local_name () << "_var _var_type;" + << be_nl << be_nl; } // TAO provides extensions for octet sequences, first find out if diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp index b51c799747a..f0953cadbc2 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp @@ -50,12 +50,9 @@ int be_visitor_structure_ch::visit_structure (be_structure *node) << node->local_name () << be_nl << "{" << be_idt << be_nl; - // Generate the _ptr_type and _var_type typedefs - // but we must protect against certain versions of g++ - *os << "\n#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" + // Generate the _ptr_type and _var_type typedefs. + *os << "typedef " << node->local_name () << "_var _var_type;" << be_nl; - *os << "typedef " << node->local_name () << "_var _var_type;\n" - << "#endif /* ! __GNUC__ || g++ >= 2.8 */\n" << be_nl; if (!node->is_local ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp index 9332f227883..e879b5675fd 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp @@ -97,12 +97,9 @@ int be_visitor_union_ch::visit_union (be_union *node) -1); } - // Generate the _var_type typedef - // but we must protect against certain versions of g++. - *os << "\n#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" - << be_nl; - *os << "typedef " << node->local_name () << "_var _var_type;\n" - << "#endif /* ! __GNUC__ || g++ >= 2.8 */" << be_nl << be_nl; + // Generate the _var_type typedef. + *os << "typedef " << node->local_name () << "_var _var_type;" + << be_nl << be_nl; // Now generate the public defn for the union branch members. For this, // set our state to reflect what we are aiming to do. diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp index 01d92e916d0..34db8b4ce5c 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp @@ -458,16 +458,11 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) -1); } - // Generate the anonymous sequence member typedef - // but we must protect against certain versions of g++. + // Generate the anonymous sequence member typedef. // This provides a consistent name to use instead of the // implementation-specific name. - *os << "\n#if !defined (__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" - << be_nl - << "typedef " << bt->nested_type_name (bu) - << " _" << ub->local_name () << "_seq;\n"; - *os << "#endif /* ! __GNUC__ || ACE_HAS_GNUG_PRE_2_8 */" - << be_nl << be_nl; + *os << "typedef " << bt->nested_type_name (bu) + << " _" << ub->local_name () << "_seq;" << be_nl << be_nl; } *os << "void " << ub->local_name () << " (const " diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp index 989b1338838..84247679002 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp @@ -488,16 +488,13 @@ be_visitor_valuetype_field_ch::visit_sequence (be_sequence *node) -1); } - // Generate the anonymous sequence member typedef - // but we must protect against certain versions of g++. + // Generate the anonymous sequence member typedef. // This provides a consistent name to use instead of the // implementation-specific name. os->decr_indent (0); - *os << "#if !defined (__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" - << be_idt_nl - << "typedef " << bt->nested_type_name (bu) - << " _" << ub->local_name () << "_seq;" << be_uidt_nl; - *os << "#endif /* ! __GNUC__ || ACE_HAS_GNUG_PRE_2_8 */\n" << be_nl; + + *os << "typedef " << bt->nested_type_name (bu) + << " _" << ub->local_name () << "_seq;" << be_nl; os->incr_indent (); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp index bd294a2f35c..9774bf240b5 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp @@ -166,19 +166,16 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) // Generate the body. *os << "{" << be_nl - << "public:" << be_idt_nl + << "public:" << be_idt_nl; - // Generate the _ptr_type and _var_type typedef - // but we must protect against certain versions of g++ - << "\n#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" - << be_nl - << "typedef " << node->local_name () << "* _ptr_type;" << be_nl - << "typedef " << node->local_name () << "_var _var_type;\n" - << "#endif /* ! __GNUC__ || g++ >= 2.8 */" << be_nl << be_nl + // Generate the _ptr_type and _var_type typedef. + *os << "typedef " << node->local_name () << "* _ptr_type;" << be_nl + << "typedef " << node->local_name () << "_var _var_type;" + << be_nl << be_nl; - // Generate the static _downcast operation. - // (see OMG 20.17.{4,5}). - << "static " << node->local_name () << "* " + // Generate the static _downcast operation. + // (see OMG 20.17.{4,5}). + *os << "static " << node->local_name () << "* " << "_downcast (CORBA::ValueBase* );" << be_nl << "// The address of static _downcast is implicit used as type id\n" << be_nl @@ -193,7 +190,6 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) << "static const char* " << "_tao_obv_static_repository_id ();" << be_nl << be_nl; - // Ugly TAO any support routine *os << "static void _tao_any_destructor (void *);" << be_nl << be_nl; |