summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLog9
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp6
2 files changed, 12 insertions, 3 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index ad572866dc3..7e704a6573a 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,12 @@
+Mon May 8 15:52:31 UTC 2006 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be_visitor_union_branch/cdr_op_cs.cpp (visit_enum):
+
+ Added code generation to initialize an enum member of a
+ union when it is declared for demarshaling. This change
+ eliminates warnings in gcc 4.0.2 and possibly other
+ compilers.
+
Mon May 8 10:06:12 UTC 2006 Martin Corino <mcorino@remedy.nl>
* docs/Options.html:
diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp
index f7e9c4511f8..dd2990bacba 100644
--- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp
@@ -204,9 +204,9 @@ be_visitor_union_branch_cdr_op_cs::visit_enum (be_enum *node)
switch (this->ctx_->sub_state ())
{
case TAO_CodeGen::TAO_CDR_INPUT:
- *os << node->name () << " _tao_union_tmp"
- << ";" << be_nl
- << "result = strm >> _tao_union_tmp;" << be_nl
+ *os << node->name () << " _tao_union_tmp =" << be_idt_nl
+ << "static_cast<" << node->name () << "> (0UL);" << be_uidt_nl
+ << "result = strm >> _tao_union_tmp;" << be_nl << be_nl
<< "if (result)" << be_idt_nl
<< "{" << be_idt_nl
<< "_tao_union." << f->local_name ()