summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_helper.cpp
diff options
context:
space:
mode:
authorvzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-02-09 09:45:57 +0000
committervzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-02-09 09:45:57 +0000
commitd4759ebe9688cd64650366d91e16b9da87998ca2 (patch)
tree9885c9f3f42c90556e1868264761bce6e3a703f2 /TAO/TAO_IDL/be/be_helper.cpp
parenteedc0b1eef9235c2c4269a4a40af7c976b1e43e6 (diff)
downloadATCD-d4759ebe9688cd64650366d91e16b9da87998ca2.tar.gz
Tue Feb 9 09:39:10 UTC 2010 Vladimir Zykov <vladimir.zykov@prismtech.com>
* TAO_IDL/be/be_helper.cpp: Fixed generation of constants for case labels in switch statement for unions with char discriminator.
Diffstat (limited to 'TAO/TAO_IDL/be/be_helper.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_helper.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp
index 4c3b73f91c8..708c791f2a4 100644
--- a/TAO/TAO_IDL/be/be_helper.cpp
+++ b/TAO/TAO_IDL/be/be_helper.cpp
@@ -529,10 +529,7 @@ TAO_OutStream::print (AST_Expression *expr)
this->TAO_OutStream::print ("'\\''");
// This handles hex and octal escape sequences
- // that would print out either as weird characters
- // or as an unsigned number too large for a char.
- else if ((unsigned char) ev->u.cval > ACE_CHAR_MAX)
- this->TAO_OutStream::print ("%hd", ev->u.cval);
+ // that would print out as weird characters.
else if (ACE_OS::ace_isprint (ev->u.cval))
this->TAO_OutStream::print ("'%c'", ev->u.cval);
else if (ACE_OS::ace_iscntrl (ev->u.cval))
@@ -563,10 +560,10 @@ TAO_OutStream::print (AST_Expression *expr)
this->TAO_OutStream::print ("'?'");
break;
default:
- this->TAO_OutStream::print ("'\\x%x'", ev->u.cval);
+ this->TAO_OutStream::print ("'\\x%x'", ev->u.oval);
}
else
- this->TAO_OutStream::print ("'\\x%x'", ev->u.cval);
+ this->TAO_OutStream::print ("'\\x%x'", ev->u.oval);
break;
case AST_Expression::EV_wchar:
this->TAO_OutStream::print ("L'%lc'", ev->u.wcval);