This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Failed compile on mips-sgi-irix6.5



Bootstrapping with the system compiler resulted in the following
failures:

cc -n32 -woff 1185 -c  -DIN_GCC    -g -O2   -DHAVE_CONFIG_H    -I. -Icp 
-I../../gcc -I../../gcc/cp -I../../gcc/config -I../../gcc/../include 
../../gcc/cp/class.c -o cp/class.o
cc-1552 cc: WARNING File = ../../gcc/cp/class.c, Line = 376
  The variable "basetype" is set but never used.

    tree basetype;
         ^

cc-1552 cc: WARNING File = ../../gcc/cp/class.c, Line = 873
  The variable "offset" is set but never used.

    tree offset;
         ^

cc-1042 cc: ERROR File = ../../gcc/cp/class.c, Line = 7545
  The types of operands "void" and "unsigned int" are incompatible.

      CLEAR_BINFO_VTABLE_PATH_MARKED (TREE_VALUE (vbase));
      ^

cc-1042 cc: ERROR File = ../../gcc/cp/class.c, Line = 7681
  The types of operands "void" and "unsigned int" are incompatible.

        SET_BINFO_VTABLE_PATH_MARKED (b);
        ^

cc-1552 cc: WARNING File = ../../gcc/cp/class.c, Line = 7809
  The variable "binfo_inits" is set but never used.

    tree binfo_inits;
         ^

2 errors detected in the compilation of "../../gcc/cp/class.c".
make[1]: *** [cp/class.o] Error 2

Examination reveals that a cast is missing in these an a couple of
other conditional macros to ensure that both sides return void.

Patch enclosed.

-------------------------------------------------------------------------------
Lee Iverson     		SRI International
leei@ai.sri.com			333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/	(650) 859-3307

2001-05-01  Lee Iverson  <leei@Canada.AI.SRI.COM>

	* cp-tree.h (SET_BINFO_MARKED): Void cast to ensure both sides of
	  conditional have same type.
	(CLEAR_BINFO_MARKED): Ditto.
	(SET_BINFO_VTABLE_PATH_MARKED): Ditto.
	(CLEAR_BINFO_VTABLE_PATH_MARKED): Ditto.

Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/cp-tree.h,v
retrieving revision 1.606
diff -p -u -r1.606 cp-tree.h
--- cp-tree.h	2001/05/01 12:56:11	1.606
+++ cp-tree.h	2001/05/01 23:28:29
@@ -1651,14 +1651,14 @@ struct lang_type
 #define BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED(BINFO_TYPE
(NODE)):TREE_LANG_FLAG_0(NODE))
 /* Macros needed because of C compilers that don't allow conditional
    expressions to be lvalues.  Grr!  */
-#define SET_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED(BI
NFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=1))
-#define CLEAR_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKE
D(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_0(NODE)=0))
+#define SET_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTYPE_MARKED(BI
NFO_TYPE(NODE)):(void)(TREE_LANG_FLAG_0(NODE)=1))
+#define CLEAR_BINFO_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLASSTYPE_MARKE
D(BINFO_TYPE(NODE)):(void)(TREE_LANG_FLAG_0(NODE)=0))
 
 /* Nonzero means that this class is on a path leading to a new vtable.  */
 #define BINFO_VTABLE_PATH_MARKED(NODE) \
   (TREE_VIA_VIRTUAL(NODE)?CLASSTYPE_MARKED3(BINFO_TYPE(NODE)):TREE_LANG_FLAG_3
(NODE))
-#define SET_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTY
PE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=1))
-#define CLEAR_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLA
SSTYPE_MARKED3(BINFO_TYPE(NODE)):(TREE_LANG_FLAG_3(NODE)=0))
+#define SET_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?SET_CLASSTY
PE_MARKED3(BINFO_TYPE(NODE)):(void)(TREE_LANG_FLAG_3(NODE)=1))
+#define CLEAR_BINFO_VTABLE_PATH_MARKED(NODE) (TREE_VIA_VIRTUAL(NODE)?CLEAR_CLA
SSTYPE_MARKED3(BINFO_TYPE(NODE)):(void)(TREE_LANG_FLAG_3(NODE)=0))
 
 /* Nonzero means B (a BINFO) has its own vtable.  Under the old ABI,
    secondary vtables are sometimes shared.  Any copies will not have



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