summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hornsey <hornseyf@objectcomputing.com>2021-06-13 16:46:42 -0500
committerFred Hornsey <hornseyf@objectcomputing.com>2021-06-13 16:46:42 -0500
commit2afc6a2c504ab9a80a54c2d71efea83a0d5085c9 (patch)
tree8d53f897b3ff30aa8519c76f4df8fa24ebf9b6c4
parente994776aa9614588eb6e4ed0dd9ba5e71a74e494 (diff)
downloadATCD-2afc6a2c504ab9a80a54c2d71efea83a0d5085c9.tar.gz
Fix Warnings, Add explicit_ints to Test List
-rw-r--r--TAO/TAO_IDL/ast/ast_expression.cpp24
-rw-r--r--TAO/bin/tao_orb_tests.lst1
2 files changed, 20 insertions, 5 deletions
diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp
index f653a4c196d..69e21021d81 100644
--- a/TAO/TAO_IDL/ast/ast_expression.cpp
+++ b/TAO/TAO_IDL/ast/ast_expression.cpp
@@ -1312,11 +1312,11 @@ coerce_value (AST_Expression::AST_ExprValue *ev,
ev->et = AST_Expression::EV_double;
return ev;
case AST_Expression::EV_int8:
- ev->u.fval = static_cast<double> (ev->u.int8val);
+ ev->u.dval = static_cast<double> (ev->u.int8val);
ev->et = t;
return ev;
case AST_Expression::EV_uint8:
- ev->u.fval = static_cast<double> (ev->u.uint8val);
+ ev->u.dval = static_cast<double> (ev->u.uint8val);
ev->et = t;
return ev;
default:
@@ -2039,9 +2039,10 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek)
// Apply bitwise operations to an AST_Expression after evaluating
// its sub-expressions.
// Operations supported: '%', '|', '&', '^', '<<', '>>'
+
template <typename Type>
bool
-do_eval_bit_op (AST_Expression::ExprComb op, Type a, Type b, Type &result)
+do_eval_bit_op_no_shift (AST_Expression::ExprComb op, Type a, Type b, Type &result)
{
switch (op)
{
@@ -2054,6 +2055,19 @@ do_eval_bit_op (AST_Expression::ExprComb op, Type a, Type b, Type &result)
case AST_Expression::EC_and:
result = a & b;
break;
+ default:
+ return true;
+ }
+
+ return false;
+}
+
+template <typename Type>
+bool
+do_eval_bit_op (AST_Expression::ExprComb op, Type a, Type b, Type &result)
+{
+ switch (op)
+ {
case AST_Expression::EC_left:
result = a << b;
break;
@@ -2061,7 +2075,7 @@ do_eval_bit_op (AST_Expression::ExprComb op, Type a, Type b, Type &result)
result = a >> b;
break;
default:
- return true;
+ return do_eval_bit_op_no_shift (op, a, b, result);
}
return false;
@@ -2145,7 +2159,7 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek)
break;
case EV_bool:
- failed = do_eval_bit_op<ACE_CDR::Boolean> (pd_ec,
+ failed = do_eval_bit_op_no_shift<ACE_CDR::Boolean> (pd_ec,
pd_v1->ev ()->u.bval, pd_v2->ev ()->u.bval, retval->u.bval);
break;
diff --git a/TAO/bin/tao_orb_tests.lst b/TAO/bin/tao_orb_tests.lst
index 4d72da037d3..64b9e91f03c 100644
--- a/TAO/bin/tao_orb_tests.lst
+++ b/TAO/bin/tao_orb_tests.lst
@@ -511,3 +511,4 @@ TAO/DevGuideExamples/ValueTypes/Bank/run_test.pl: !MINIMUM !CORBA_E_MICRO
TAO/DevGuideExamples/AMH/run_test.pl: !NO_MESSAGING !CORBA_E_MICRO
TAO/DevGuideExamples/AMH_AMI/run_test.pl: !NO_MESSAGING !CORBA_E_MICRO
TAO/tests/IDLv4/annotations/run_test.pl
+TAO/tests/IDLv4/explicit_ints/run_test.pl