RFA: Properly construct complex type nodes
Jim Blandy
jimb@zwingli.cygnus.com
Fri Nov 10 15:14:00 GMT 2000
Oh, wait. I'm the maintainer. Well, I'm going to apply this, then.
2000-06-15 Jim Blandy <jimb@redhat.com>
* stabsread.c (read_range_type): Properly construct complex
type nodes.
Index: gdb/stabsread.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/stabsread.c,v
retrieving revision 2.155
diff -c -r2.155 stabsread.c
*** gdb/stabsread.c 1998/10/06 02:52:31 2.155
--- gdb/stabsread.c 2000/06/15 22:28:02
***************
*** 4631,4644 ****
if (n3 == 0 && n2 > 0)
{
if (self_subrange)
{
! return init_type (TYPE_CODE_COMPLEX, 2 * n2, 0, NULL, objfile);
}
else
! {
! return init_type (TYPE_CODE_FLT, n2, 0, NULL, objfile);
! }
}
/* If the upper bound is -1, it must really be an unsigned int. */
--- 4631,4648 ----
if (n3 == 0 && n2 > 0)
{
+ struct type *float_type
+ = init_type (TYPE_CODE_FLT, n2, 0, NULL, objfile);
+
if (self_subrange)
{
! struct type *complex_type =
! init_type (TYPE_CODE_COMPLEX, 2 * n2, 0, NULL, objfile);
! TYPE_TARGET_TYPE (complex_type) = float_type;
! return complex_type;
}
else
! return float_type;
}
/* If the upper bound is -1, it must really be an unsigned int. */
More information about the Gdb-patches
mailing list