home *** CD-ROM | disk | FTP | other *** search
/ Programming Win32 Under the API / ProgrammingWin32UnderTheApiPatVillani.iso / patches / gcc-2_95_2-x86-win32-patches.zi / gcc-2.95.2-patches / broken-down / gcc-2.95.2-c++-com1.diff < prev    next >
Encoding:
Text File  |  1999-11-08  |  2.6 KB  |  79 lines

  1. 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
  2.  
  3.     * class.c (finish_base_struct): Allow non-COM bases for COM classes
  4.     except at the leftmost position.
  5.     (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
  6.     Pass the binfo's class, not the most derived, to skip_rtti_stuff.
  7.     * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
  8.  
  9. Index: gcc-2.95.2/gcc/cp/class.c
  10. ===================================================================
  11. RCS file: /homes/khan/src/CVSROOT/gcc-2.95.2/gcc/cp/class.c,v
  12. retrieving revision 1.3
  13. diff -u -3 -p -r1.3 class.c
  14. --- gcc-2.95.2/gcc/cp/class.c    1999/11/05 06:15:59    1.3
  15. +++ gcc-2.95.2/gcc/cp/class.c    1999/11/05 06:16:10
  16. @@ -1648,7 +1648,7 @@ finish_base_struct (t, b)
  17.            ("COM interface type `%T' must be the leftmost base class",
  18.             basetype);
  19.      }
  20. -      else if (CLASSTYPE_COM_INTERFACE (t))
  21. +      else if (CLASSTYPE_COM_INTERFACE (t) && i == 0)
  22.      {
  23.        cp_error ("COM interface type `%T' with non-COM base class `%T'",
  24.              t, basetype);
  25. @@ -2355,7 +2355,7 @@ modify_one_vtable (binfo, t, fndecl, pfn
  26.    if (fndecl == NULL_TREE)
  27.      return;
  28.  
  29. -  n = skip_rtti_stuff (&virtuals, t);
  30. +  n = skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
  31.  
  32.    while (virtuals)
  33.      {
  34. @@ -2449,7 +2449,7 @@ fixup_vtable_deltas1 (binfo, t)
  35.    tree virtuals = BINFO_VIRTUALS (binfo);
  36.    unsigned HOST_WIDE_INT n;
  37.    
  38. -  n = skip_rtti_stuff (&virtuals, t);
  39. +  n = skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
  40.  
  41.    while (virtuals)
  42.      {
  43. @@ -2622,8 +2622,8 @@ override_one_vtable (binfo, old, t)
  44.    if (BINFO_NEW_VTABLE_MARKED (binfo))
  45.      choose = NEITHER;
  46.  
  47. -  skip_rtti_stuff (&virtuals, t);
  48. -  skip_rtti_stuff (&old_virtuals, t);
  49. +  skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
  50. +  skip_rtti_stuff (&old_virtuals, BINFO_TYPE (binfo));
  51.  
  52.    while (virtuals)
  53.      {
  54. Index: gcc-2.95.2/gcc/cp/search.c
  55. ===================================================================
  56. RCS file: /homes/khan/src/CVSROOT/gcc-2.95.2/gcc/cp/search.c,v
  57. retrieving revision 1.2
  58. diff -u -3 -p -r1.2 search.c
  59. --- gcc-2.95.2/gcc/cp/search.c    1999/11/05 06:16:00    1.2
  60. +++ gcc-2.95.2/gcc/cp/search.c    1999/11/05 06:16:10
  61. @@ -2013,7 +2013,7 @@ get_abstract_virtuals (type)
  62.      {
  63.        tree virtuals = BINFO_VIRTUALS (vbases);
  64.  
  65. -      skip_rtti_stuff (&virtuals, type);
  66. +      skip_rtti_stuff (&virtuals, BINFO_TYPE (vbases));
  67.  
  68.        while (virtuals)
  69.      {
  70. @@ -2488,7 +2488,7 @@ expand_upcast_fixups (binfo, addr, orig_
  71.        *vbase_offsets = delta;
  72.      }
  73.  
  74. -  n = skip_rtti_stuff (&virtuals, t);
  75. +  n = skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
  76.  
  77.    while (virtuals)
  78.      {
  79.