summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
Diffstat (limited to 'TAO')
-rw-r--r--TAO/TAO_IDL/ast/ast_constant.cpp2
-rw-r--r--TAO/TAO_IDL/ast/ast_expression.cpp18
-rw-r--r--TAO/TAO_IDL/ast/ast_predefined_type.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_predefined_type.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant/constant.cpp2
-rw-r--r--TAO/TAO_IDL/include/ast_expression.h2
-rw-r--r--TAO/tao/Basic_Types.h4
-rw-r--r--TAO/tao/CDR.h4
-rw-r--r--TAO/tao/CDR.inl4
-rw-r--r--TAO/tests/IDLv4/explicit_ints/main.cpp74
10 files changed, 64 insertions, 52 deletions
diff --git a/TAO/TAO_IDL/ast/ast_constant.cpp b/TAO/TAO_IDL/ast/ast_constant.cpp
index ca1d72aac90..beba535790d 100644
--- a/TAO/TAO_IDL/ast/ast_constant.cpp
+++ b/TAO/TAO_IDL/ast/ast_constant.cpp
@@ -137,7 +137,7 @@ void
AST_Constant::dump (ACE_OSTREAM_TYPE &o)
{
this->dump_i (o, "const ");
- dump_i(o, AST_Expression::exprtype_to_string (pd_et));
+ dump_i (o, AST_Expression::exprtype_to_string (pd_et));
this->dump_i (o, " ");
this->local_name ()->dump (o);
diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp
index 69e21021d81..af422f72d62 100644
--- a/TAO/TAO_IDL/ast/ast_expression.cpp
+++ b/TAO/TAO_IDL/ast/ast_expression.cpp
@@ -1837,6 +1837,18 @@ do_eval_bin_op (AST_Expression::ExprComb op, Type a, Type b, Type &result)
return false;
}
+template <typename Type>
+bool
+do_eval_bin_op_float (AST_Expression::ExprComb op, Type a, Type b, Type &result)
+{
+ if (op == AST_Expression::EC_div)
+ {
+ result = a / b;
+ return false;
+ }
+ return do_eval_bin_op (op, a, b, result);
+}
+
AST_Expression::AST_ExprValue *
AST_Expression::eval_bin_op (AST_Expression::EvalKind ek)
{
@@ -1875,7 +1887,7 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek)
break;
case EV_uint8:
- failed = do_eval_bin_op<ACE_CDR::Uint8> (pd_ec,
+ failed = do_eval_bin_op<ACE_CDR::UInt8> (pd_ec,
pd_v1->ev ()->u.uint8val, pd_v2->ev ()->u.uint8val, retval->u.uint8val);
break;
@@ -1915,7 +1927,7 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek)
break;
case EV_double:
- failed = do_eval_bin_op<ACE_CDR::Double> (pd_ec,
+ failed = do_eval_bin_op_float<ACE_CDR::Double> (pd_ec,
pd_v1->ev ()->u.dval, pd_v2->ev ()->u.dval, retval->u.dval);
break;
@@ -2119,7 +2131,7 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek)
break;
case EV_uint8:
- failed = do_eval_bit_op<ACE_CDR::Uint8> (pd_ec,
+ failed = do_eval_bit_op<ACE_CDR::UInt8> (pd_ec,
pd_v1->ev ()->u.uint8val, pd_v2->ev ()->u.uint8val, retval->u.uint8val);
break;
diff --git a/TAO/TAO_IDL/ast/ast_predefined_type.cpp b/TAO/TAO_IDL/ast/ast_predefined_type.cpp
index ca4be3164cc..165ed034ec0 100644
--- a/TAO/TAO_IDL/ast/ast_predefined_type.cpp
+++ b/TAO/TAO_IDL/ast/ast_predefined_type.cpp
@@ -194,7 +194,7 @@ AST_PredefinedType::AST_PredefinedType (PredefinedType t,
Identifier (n->last_component ()->get_string ()));
break;
case AST_PredefinedType::PT_uint8:
- ACE_NEW (id, Identifier ("Uint8"));
+ ACE_NEW (id, Identifier ("UInt8"));
break;
case AST_PredefinedType::PT_int8:
ACE_NEW (id, Identifier ("Int8"));
diff --git a/TAO/TAO_IDL/be/be_predefined_type.cpp b/TAO/TAO_IDL/be/be_predefined_type.cpp
index d311d098c33..77c2f2490ec 100644
--- a/TAO/TAO_IDL/be/be_predefined_type.cpp
+++ b/TAO/TAO_IDL/be/be_predefined_type.cpp
@@ -226,10 +226,10 @@ be_predefined_type::compute_tc_name ()
break;
}
case AST_PredefinedType::PT_uint8:
- ACE_NEW (id, Identifier ("_tc_Uint8"));
+ ACE_NEW (id, Identifier ("_tc_uint8"));
break;
case AST_PredefinedType::PT_int8:
- ACE_NEW (id, Identifier ("_tc_Int8"));
+ ACE_NEW (id, Identifier ("_tc_int8"));
break;
default:
idl_global->err ()->misc_error (
diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant.cpp
index a841b6f20d6..f339edfc8c4 100644
--- a/TAO/TAO_IDL/be/be_visitor_constant/constant.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_constant/constant.cpp
@@ -41,7 +41,7 @@ const char *exprtype_to_cpp_corba_type (AST_Expression::ExprType et)
case AST_Expression::EV_int8:
return "CORBA::Int8";
case AST_Expression::EV_uint8:
- return "CORBA::Uint8";
+ return "CORBA::UInt8";
default:
return 0;
}
diff --git a/TAO/TAO_IDL/include/ast_expression.h b/TAO/TAO_IDL/include/ast_expression.h
index c005adc37e4..c6f11bcb5dd 100644
--- a/TAO/TAO_IDL/include/ast_expression.h
+++ b/TAO/TAO_IDL/include/ast_expression.h
@@ -187,7 +187,7 @@ public:
ACE_CDR::ULong eval; // Contains enumeration value.
ACE_CDR::Fixed fixedval; // Contains IDL fixed value.
ACE_CDR::Int8 int8val; // Signed Byte Sized Integer
- ACE_CDR::Uint8 uint8val; // Unsigned Byte Sized Integer
+ ACE_CDR::UInt8 uint8val; // Unsigned Byte Sized Integer
} u;
ExprType et;
diff --git a/TAO/tao/Basic_Types.h b/TAO/tao/Basic_Types.h
index 4da95d3cd5a..31e9031dd73 100644
--- a/TAO/tao/Basic_Types.h
+++ b/TAO/tao/Basic_Types.h
@@ -79,8 +79,8 @@ namespace CORBA
typedef ACE_CDR::Int8 Int8;
typedef Int8 &Int8_out;
- typedef ACE_CDR::Uint8 Uint8;
- typedef Uint8 &Uint8_out;
+ typedef ACE_CDR::UInt8 UInt8;
+ typedef UInt8 &UInt8_out;
typedef ACE_CDR::Int16 Int16;
typedef Int16 &Int16_out;
diff --git a/TAO/tao/CDR.h b/TAO/tao/CDR.h
index 6b4a769a28b..c230463502a 100644
--- a/TAO/tao/CDR.h
+++ b/TAO/tao/CDR.h
@@ -500,7 +500,7 @@ TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os,
ACE_OutputCDR::from_std_wstring x);
#endif /* ACE_LACKS_STD_WSTRING */
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::Int8 x);
-TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::Uint8 x);
+TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::UInt8 x);
// CDR input operators for CORBA types
@@ -541,7 +541,7 @@ TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &os,
ACE_InputCDR::to_std_wstring x);
#endif /* ACE_LACKS_STD_WSTRING */
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Int8 &x);
-TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Uint8 &x);
+TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::UInt8 &x);
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/CDR.inl b/TAO/tao/CDR.inl
index 02ba3827fb5..3ea12fd249d 100644
--- a/TAO/tao/CDR.inl
+++ b/TAO/tao/CDR.inl
@@ -501,7 +501,7 @@ ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::Int8 x)
&& static_cast<ACE_OutputCDR &> (os) << x;
}
-ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::Uint8 x)
+ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::UInt8 x)
{
return
os.fragment_stream (ACE_CDR::OCTET_ALIGN, ACE_CDR::OCTET_SIZE)
@@ -643,7 +643,7 @@ ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Int8 &x)
return static_cast<ACE_InputCDR &> (is) >> x;
}
-ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Uint8 &x)
+ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::UInt8 &x)
{
return static_cast<ACE_InputCDR &> (is) >> x;
}
diff --git a/TAO/tests/IDLv4/explicit_ints/main.cpp b/TAO/tests/IDLv4/explicit_ints/main.cpp
index 9540764b58c..075608ee540 100644
--- a/TAO/tests/IDLv4/explicit_ints/main.cpp
+++ b/TAO/tests/IDLv4/explicit_ints/main.cpp
@@ -5,7 +5,7 @@
namespace stream8 {
std::ostream &
- operator<< (std::ostream &os, CORBA::Uint8 value) {
+ operator<< (std::ostream &os, CORBA::UInt8 value) {
return os << static_cast<unsigned>(value);
}
@@ -34,46 +34,46 @@ ACE_TMAIN (int, ACE_TCHAR *[])
{
bool any_failed = false;
- expect_equals<CORBA::Uint8>(any_failed, "u8_max", u8_max, 255);
- expect_equals<CORBA::Int8>(any_failed, "i8_min", i8_min, -128);
- expect_equals<CORBA::Int8>(any_failed, "i8_max", i8_max, 127);
- expect_equals<CORBA::Uint16>(any_failed, "u16_max", u16_max, 65535);
- expect_equals<CORBA::Int16>(any_failed, "i16_min", i16_min, -32768);
- expect_equals<CORBA::Int16>(any_failed, "i16_max", i16_max, 32767);
- expect_equals<CORBA::Uint32>(any_failed, "u32_max", u32_max, 4294967295);
- expect_equals<CORBA::Int32>(any_failed, "i32_min", i32_min, -2147483648);
- expect_equals<CORBA::Int32>(any_failed, "i32_max", i32_max, 2147483647);
- expect_equals<CORBA::Uint64>(any_failed, "u64_max", u64_max, 18446744073709551615ULL);
- expect_equals<CORBA::Int64>(any_failed, "i64_min", i64_min, (-9223372036854775807 - 1));
- expect_equals<CORBA::Int64>(any_failed, "i64_max", i64_max, 9223372036854775807);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_max", u8_max, 255);
+ expect_equals<CORBA::Int8> (any_failed, "i8_min", i8_min, -128);
+ expect_equals<CORBA::Int8> (any_failed, "i8_max", i8_max, 127);
+ expect_equals<CORBA::Uint16> (any_failed, "u16_max", u16_max, 65535);
+ expect_equals<CORBA::Int16> (any_failed, "i16_min", i16_min, -32768);
+ expect_equals<CORBA::Int16> (any_failed, "i16_max", i16_max, 32767);
+ expect_equals<CORBA::Uint32> (any_failed, "u32_max", u32_max, 4294967295);
+ expect_equals<CORBA::Int32> (any_failed, "i32_min", i32_min, -2147483648);
+ expect_equals<CORBA::Int32> (any_failed, "i32_max", i32_max, 2147483647);
+ expect_equals<CORBA::Uint64> (any_failed, "u64_max", u64_max, 18446744073709551615ULL);
+ expect_equals<CORBA::Int64> (any_failed, "i64_min", i64_min, (-9223372036854775807 - 1));
+ expect_equals<CORBA::Int64> (any_failed, "i64_max", i64_max, 9223372036854775807);
- expect_equals<CORBA::Uint8>(any_failed, "u8_min_overflow", u8_min_overflow, u8_max);
- expect_equals<CORBA::Int8>(any_failed, "i8_min_overflow", i8_min_overflow, i8_max);
- expect_equals<CORBA::Uint8>(any_failed, "u8_max_overflow", u8_max_overflow, 0);
- expect_equals<CORBA::Int8>(any_failed, "i8_max_overflow", i8_max_overflow, i8_min);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_min_overflow", u8_min_overflow, u8_max);
+ expect_equals<CORBA::Int8> (any_failed, "i8_min_overflow", i8_min_overflow, i8_max);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_max_overflow", u8_max_overflow, 0);
+ expect_equals<CORBA::Int8> (any_failed, "i8_max_overflow", i8_max_overflow, i8_min);
- expect_equals<CORBA::Uint8>(any_failed, "u8_max_negate", u8_max_negate, 0);
- expect_equals<CORBA::Int8>(any_failed, "i8_max_negate", i8_max_negate, i8_min);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_max_negate", u8_max_negate, 0);
+ expect_equals<CORBA::Int8> (any_failed, "i8_max_negate", i8_max_negate, i8_min);
- expect_equals<CORBA::Uint8>(any_failed, "u8_e1", u8_e1, 2);
- expect_equals<CORBA::Uint8>(any_failed, "u8_e2", u8_e2, 4);
- expect_equals<CORBA::Uint8>(any_failed, "u8_e3", u8_e3, 12);
- expect_equals<CORBA::Uint8>(any_failed, "u8_e4", u8_e4, 3);
- expect_equals<CORBA::Uint8>(any_failed, "u8_e5", u8_e5, 7);
- expect_equals<CORBA::Uint8>(any_failed, "u8_e6", u8_e6, 1);
- expect_equals<CORBA::Uint8>(any_failed, "u8_e7", u8_e7, 1);
- expect_equals<CORBA::Uint8>(any_failed, "u8_e8", u8_e8, 16);
- expect_equals<CORBA::Uint8>(any_failed, "u8_e9", u8_e9, 8);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_e1", u8_e1, 2);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_e2", u8_e2, 4);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_e3", u8_e3, 12);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_e4", u8_e4, 3);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_e5", u8_e5, 7);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_e6", u8_e6, 1);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_e7", u8_e7, 1);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_e8", u8_e8, 16);
+ expect_equals<CORBA::UInt8> (any_failed, "u8_e9", u8_e9, 8);
- expect_equals<CORBA::Int8>(any_failed, "i8_e1", i8_e1, -2);
- expect_equals<CORBA::Int8>(any_failed, "i8_e2", i8_e2, 4);
- expect_equals<CORBA::Int8>(any_failed, "i8_e3", i8_e3, 12);
- expect_equals<CORBA::Int8>(any_failed, "i8_e4", i8_e4, 3);
- expect_equals<CORBA::Int8>(any_failed, "i8_e5", i8_e5, 7);
- expect_equals<CORBA::Int8>(any_failed, "i8_e6", i8_e6, 1);
- expect_equals<CORBA::Int8>(any_failed, "i8_e7", i8_e7, 1);
- expect_equals<CORBA::Int8>(any_failed, "i8_e8", i8_e8, 16);
- expect_equals<CORBA::Int8>(any_failed, "i8_e9", i8_e9, 8);
+ expect_equals<CORBA::Int8> (any_failed, "i8_e1", i8_e1, -2);
+ expect_equals<CORBA::Int8> (any_failed, "i8_e2", i8_e2, 4);
+ expect_equals<CORBA::Int8> (any_failed, "i8_e3", i8_e3, 12);
+ expect_equals<CORBA::Int8> (any_failed, "i8_e4", i8_e4, 3);
+ expect_equals<CORBA::Int8> (any_failed, "i8_e5", i8_e5, 7);
+ expect_equals<CORBA::Int8> (any_failed, "i8_e6", i8_e6, 1);
+ expect_equals<CORBA::Int8> (any_failed, "i8_e7", i8_e7, 1);
+ expect_equals<CORBA::Int8> (any_failed, "i8_e8", i8_e8, 16);
+ expect_equals<CORBA::Int8> (any_failed, "i8_e9", i8_e9, 8);
return any_failed ? 1 : 0;
}