Commit d063960a by Ziemowit Laski Committed by Ziemowit Laski

Make-lang.in (cp/typeck.o): Depend on c-common.h.

[gcc/cp/ChangeLog]
2004-09-09  Ziemowit Laski  <zlaski@apple.com>

        * Make-lang.in (cp/typeck.o): Depend on c-common.h.
        * typeck.c: Include c-common.h.
        (comptypes): For RECORD_TYPEs, call objc_comptypes() and
        return the result if nonnegative.

From-SVN: r87259
parent 3f3174b6
2004-09-09 Ziemowit Laski <zlaski@apple.com>
* Make-lang.in (cp/typeck.o): Depend on c-common.h.
* typeck.c: Include c-common.h.
(comptypes): For RECORD_TYPEs, call objc_comptypes() and
return the result if nonnegative.
2004-09-09 Zack Weinberg <zack@codesourcery.com>
* decl2.c (import_export_class)
......
......@@ -240,7 +240,7 @@ cp/cp-objcp-common.o : cp/cp-objcp-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h output.h $(TM_P_H) \
diagnostic.h gt-cp-typeck2.h
cp/typeck.o: cp/typeck.c $(CXX_TREE_H) $(TM_H) flags.h $(RTL_H) $(EXPR_H) toplev.h \
diagnostic.h convert.h
diagnostic.h convert.h c-common.h
cp/class.o: cp/class.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h $(RTL_H) $(TARGET_H) convert.h
cp/call.o: cp/call.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h $(RTL_H) $(EXPR_H) \
diagnostic.h intl.h gt-cp-call.h convert.h target.h
......
......@@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA. */
#include "diagnostic.h"
#include "target.h"
#include "convert.h"
#include "c-common.h"
static tree convert_for_assignment (tree, tree, const char *, tree, int);
static tree cp_pointer_int_sum (enum tree_code, tree, tree);
......@@ -919,6 +920,8 @@ comp_array_types (tree t1, tree t2, bool allow_redeclaration)
bool
comptypes (tree t1, tree t2, int strict)
{
int retval;
if (t1 == t2)
return true;
......@@ -1014,6 +1017,12 @@ comptypes (tree t1, tree t2, int strict)
else if ((strict & COMPARE_DERIVED) && DERIVED_FROM_P (t2, t1))
return true;
/* We may be dealing with Objective-C instances... */
if (TREE_CODE (t1) == RECORD_TYPE
&& (retval = objc_comptypes (t1, t2, 0) >= 0))
return retval;
/* ...but fall through if we are not. */
return false;
case OFFSET_TYPE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment