From a029324ef1af3af8f36b8a7744b968763346ab6d Mon Sep 17 00:00:00 2001 From: parsons Date: Mon, 8 May 2006 15:55:38 +0000 Subject: ChangeLogTag: Mon May 8 15:52:31 UTC 2006 Jeff Parsons --- TAO/ChangeLog | 9 +++++++++ TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp | 6 +++--- 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 + + * 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 * 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 () -- cgit v1.2.1