This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH]: valarith fixup



2000-07-20  Michael Snyder  <msnyder@cleaver.cygnus.com>

        * valarith.c (value_sub): Call check_typedef.

Index: valarith.c
===================================================================
RCS file: /cvs/src/src/gdb/valarith.c,v
retrieving revision 1.3
diff -p -r1.3 valarith.c
*** valarith.c	2000/05/28 01:12:33	1.3
--- valarith.c	2000/07/21 01:51:37
*************** value_sub (arg1, arg2)
*** 110,117 ****
  				      - (sz * value_as_long (arg2))));
  	}
        else if (TYPE_CODE (type2) == TYPE_CODE_PTR
! 	       && TYPE_LENGTH (TYPE_TARGET_TYPE (type1))
! 	       == TYPE_LENGTH (TYPE_TARGET_TYPE (type2)))
  	{
  	  /* pointer to <type x> - pointer to <type x>.  */
  	  LONGEST sz = TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)));
--- 110,117 ----
  				      - (sz * value_as_long (arg2))));
  	}
        else if (TYPE_CODE (type2) == TYPE_CODE_PTR
! 	       && TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)))
! 	       == TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type2))))
  	{
  	  /* pointer to <type x> - pointer to <type x>.  */
  	  LONGEST sz = TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]