summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-11-07 20:00:54 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-11-07 20:00:54 +0000
commit446f72582d9080654d2ec45ebf0abc9c4cc84b9b (patch)
tree82cd21339a489a191de433cbca39e477d209504d
parente54f1d0eb50446691d49bdac2999285e41ec77fa (diff)
downloadATCD-446f72582d9080654d2ec45ebf0abc9c4cc84b9b.tar.gz
Tue Nov 7 20:00:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog13
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp97
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp2
3 files changed, 63 insertions, 49 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index c255dde9cc9..82da2052221 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,16 @@
+Tue Nov 7 20:00:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * be/be_visitor_exception/exception_cs.cpp:
+ Generate the constructor taking all members as first method. The
+ gcc 3.2.3 based rtems compiler seems to get confused in the
+ generated tests/IDL_Test/anonymousC.cpp file when it is the last
+ method. For other compilers it doesn't make a difference but at
+ least with this change we have an error free compilation for
+ rtems
+
+ * be/be_visitor_valuetype/valuetype_cs.cpp:
+ Generate const for retval
+
Tue Nov 7 19:06:12 UTC 2006 Ossama Othman <ossama_othman at symantec dot com>
* tao/ORB_Core.cpp (orbinitializer_registry_i):
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp
index 376e6244a6a..4c3d9d8a4af 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp
@@ -49,7 +49,7 @@ int be_visitor_exception_cs::visit_exception (be_exception *node)
os->indent ();
- // Generate stub code required of any anonymous types of members.
+ // Generate stub code required of any anonymous types of members.
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -59,6 +59,53 @@ int be_visitor_exception_cs::visit_exception (be_exception *node)
-1);
}
+ be_visitor_context ctx (*this->ctx_);
+
+ // Constructor taking all members. It exists only if there are any
+ // members.
+ if (node->member_count () > 0)
+ {
+ // Generate the signature.
+ ctx.state (TAO_CodeGen::TAO_EXCEPTION_CTOR_CS);
+ be_visitor_exception_ctor ec_visitor (&ctx);
+
+ if (node->accept (&ec_visitor) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_exception::"
+ "visit_exception - "
+ "codegen for ctor failed\n"),
+ -1);
+ }
+
+ *os << be_idt_nl
+ << ": ::CORBA::UserException ("
+ << be_idt << be_idt << be_idt_nl
+ << "\"" << node->repoID () << "\"," << be_nl
+ << "\"" << node->local_name () << "\"" << be_uidt_nl
+ << ")" << be_uidt << be_uidt << be_uidt_nl;
+ *os << "{" << be_idt;
+
+ // Assign each individual member. We need yet another state.
+ ctx = *this->ctx_;
+
+ // Indicate that the special ctor is being generated.
+ ctx.exception (true);
+
+ be_visitor_exception_ctor_assign eca_visitor (&ctx);
+
+ if (node->accept (&eca_visitor) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_exception_cs::"
+ "visit_exception -"
+ "codegen for scope failed\n"),
+ -1);
+ }
+
+ *os << be_uidt_nl << "}" << be_nl << be_nl;
+ }
+
*os << be_nl << be_nl << "// TAO_IDL - Generated from " << be_nl
<< "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl;
@@ -87,7 +134,7 @@ int be_visitor_exception_cs::visit_exception (be_exception *node)
<< ")" << be_uidt << be_uidt << be_uidt_nl;
*os << "{";
- be_visitor_context ctx (*this->ctx_);
+ ctx = *this->ctx_;
if (node->nmembers () > 0)
{
@@ -275,52 +322,6 @@ int be_visitor_exception_cs::visit_exception (be_exception *node)
*os << "}" << be_nl << be_nl;
}
- // Constructor taking all members. It exists only if there are any
- // members.
- if (node->member_count () > 0)
- {
- // Generate the signature.
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_EXCEPTION_CTOR_CS);
- be_visitor_exception_ctor ec_visitor (&ctx);
-
- if (node->accept (&ec_visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception::"
- "visit_exception - "
- "codegen for ctor failed\n"),
- -1);
- }
-
- *os << be_idt_nl
- << ": ::CORBA::UserException ("
- << be_idt << be_idt << be_idt_nl
- << "\"" << node->repoID () << "\"," << be_nl
- << "\"" << node->local_name () << "\"" << be_uidt_nl
- << ")" << be_uidt << be_uidt << be_uidt_nl;
- *os << "{" << be_idt;
-
- // Assign each individual member. We need yet another state.
- ctx = *this->ctx_;
-
- // Indicate that the special ctor is being generated.
- ctx.exception (1);
-
- be_visitor_exception_ctor_assign eca_visitor (&ctx);
-
- if (node->accept (&eca_visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception_cs::"
- "visit_exception -"
- "codegen for scope failed\n"),
- -1);
- }
-
- *os << be_uidt_nl << "}" << be_nl << be_nl;
- }
-
// Switch streams to the *A.cpp file if we are using this option.
if (be_global->gen_anyop_files ())
{
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp
index 8e577ec39bf..121fe9b64f1 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp
@@ -279,7 +279,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node)
<< ")" << be_uidt_nl
<< "{" << be_idt_nl
<< "::CORBA::ValueBase *base = 0;" << be_nl
- << "::CORBA::Boolean retval =" << be_idt_nl
+ << "::CORBA::Boolean const retval =" << be_idt_nl
<< "::CORBA::ValueBase::_tao_unmarshal_pre (" << be_idt << be_idt_nl
<< "strm," << be_nl
<< "base," << be_nl