diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-17 22:43:06 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-17 22:43:06 +0000 |
commit | bc85a25509da8c5842d96475746a3c58b25d1154 (patch) | |
tree | 388fdb188193f2459c0b7b8dc51fd81a65795616 | |
parent | ae8ded2b434fa8be8dd64a5fdf251d9fb0a014c8 (diff) | |
download | ATCD-bc85a25509da8c5842d96475746a3c58b25d1154.tar.gz |
* TAO_IDL/be/be_union.cpp:
Changed compute_size_type() for unions to always return VARIABLE.
This fixes a bug found when a union contains a struct which
contains a different union composed of simple types. The inside
union's size type comes back as FIXED, so it (rather than a
pointer to it) becomes a struct member. Then the struct's size
type also comes back as FIXED, so the outside union makes the
struct (rather than a pointer to the struct) a member. Then
the C++ compiler bails because the outside union contains
a member with a copy constructor (the inside union). The previous
version of the compute_size_type() function returns FIXED when
the union contains, say, a short and a long, so it is actually,
as far as marshaling is concerned, variable. This way, the function
returns VARIABLE always, and incurs extra indirection only when
the union contains, say, a long and an unsigned long. Nothing
seems to get broken by this fix, and if that remains true over
time, some of the union's _var and _out code generation sections
can be trimmed.
-rw-r--r-- | TAO/ChangeLog-99c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index d51a2aa5acf..24abf832f51 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,24 @@ +Sat Jul 17 17:29:58 1999 Jeff Parsons <parsons@cs.wustl.edu> + + * TAO_IDL/be/be_union.cpp: + Changed compute_size_type() for unions to always return VARIABLE. + This fixes a bug found when a union contains a struct which + contains a different union composed of simple types. The inside + union's size type comes back as FIXED, so it (rather than a + pointer to it) becomes a struct member. Then the struct's size + type also comes back as FIXED, so the outside union makes the + struct (rather than a pointer to the struct) a member. Then + the C++ compiler bails because the outside union contains + a member with a copy constructor (the inside union). The previous + version of the compute_size_type() function returns FIXED when + the union contains, say, a short and a long, so it is actually, + as far as marshaling is concerned, variable. This way, the function + returns VARIABLE always, and incurs extra indirection only when + the union contains, say, a long and an unsigned long. Nothing + seems to get broken by this fix, and if that remains true over + time, some of the union's _var and _out code generation sections + can be trimmed. + Sat Jul 17 15:00:04 1999 Ossama Othman <othman@cs.wustl.edu> * tao/ORB.cpp (resolve_initial_references): |