summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-25 00:21:40 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-25 00:21:40 +0000
commit2da3a9e714c64c05606a4f1ad4b998619deceae0 (patch)
tree43aa15d43b7f4a0761649e9ca8c664725d1667c6
parent7bc30c47e9ae3da3378d98365f21b7ff5f899c4c (diff)
downloadATCD-2da3a9e714c64c05606a4f1ad4b998619deceae0.tar.gz
Cast IN args of type foo_array (if the array is multidimensional) to
const foo_array_slice * for the benefit of some compilers that can't handle implicit cast to const for multidimensional arrays.
-rw-r--r--TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp
index 1e270712ea9..8b5550bd068 100644
--- a/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp
@@ -79,6 +79,15 @@ int be_visitor_args_upcall_ss::visit_array (be_array *node)
switch (this->direction ())
{
case AST_Argument::dir_IN:
+ // This is to placate some compilers which have
+ // trouble with IN args that are multidimensional arrays.
+ if (node->n_dims () > 1)
+ {
+ *os << "(const ::" << node->name () << "_slice *) ";
+ }
+
+ *os << arg->local_name ();
+ break;
case AST_Argument::dir_INOUT:
*os << arg->local_name ();
break;