[omniORB] Compiler warnings (casting from const char* to char* and vice ver sa)

Duncan Grisby dgrisby@uk.research.att.com
Fri, 14 Dec 2001 12:20:37 +0000


On Friday 14 December, Matej Kenda wrote:

> When a omniidl generated header file is included, we get a bunch of warnings
> about casting. For instance:

[...]
> I've checked the code (stringtypes.h:190) and in my opinion the warnings
> would go away if C++ const_cast would be used instead of C-style cast.
> 
> Are there any special reasons, why the C-style cast is used?

Some of the C++ compilers we target are so ancient that they don't
support const_cast<>. There aren't many places where we have to
subvert the constness of something, so I guess it wouldn't be too ugly
to #ifdef it. I don't think it's a big priority, though.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --