summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-02 11:09:52 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-02 11:09:52 +0000
commit59cf33e04e88f25fc3a760d6355e52a6feacac6c (patch)
tree47bfbd6ef6b5e5a466f884466988ae86f19e574c
parentb7c4ee2043eb17cd6a57871a7ee78c0b7bcd8e94 (diff)
downloadppe42-gcc-59cf33e04e88f25fc3a760d6355e52a6feacac6c.tar.gz
ppe42-gcc-59cf33e04e88f25fc3a760d6355e52a6feacac6c.zip
2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* typeck.c (common_base_type): Delete unused function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122472 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/typeck.c54
2 files changed, 4 insertions, 54 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 741a546a61d..8b19a86fc3a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ * typeck.c (common_base_type): Delete unused function.
+
2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
* Make-lang.in: Add dummy lang.install-pdf target.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index b8ae880440d..81fe195f269 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -53,7 +53,6 @@ static tree rationalize_conditional_expr (enum tree_code, tree);
static int comp_ptr_ttypes_real (tree, tree, int);
static bool comp_except_types (tree, tree, bool);
static bool comp_array_types (tree, tree, bool);
-static tree common_base_type (tree, tree);
static tree pointer_diff (tree, tree, tree);
static tree get_delta_difference (tree, tree, bool, bool);
static void casts_away_constness_r (tree *, tree *);
@@ -1196,59 +1195,6 @@ comp_cv_qual_signature (tree type1, tree type2)
else
return 0;
}
-
-/* If two types share a common base type, return that basetype.
- If there is not a unique most-derived base type, this function
- returns ERROR_MARK_NODE. */
-
-static tree
-common_base_type (tree tt1, tree tt2)
-{
- tree best = NULL_TREE;
- int i;
-
- /* If one is a baseclass of another, that's good enough. */
- if (UNIQUELY_DERIVED_FROM_P (tt1, tt2))
- return tt1;
- if (UNIQUELY_DERIVED_FROM_P (tt2, tt1))
- return tt2;
-
- /* Otherwise, try to find a unique baseclass of TT1
- that is shared by TT2, and follow that down. */
- for (i = BINFO_N_BASE_BINFOS (TYPE_BINFO (tt1))-1; i >= 0; i--)
- {
- tree basetype = BINFO_TYPE (BINFO_BASE_BINFO (TYPE_BINFO (tt1), i));
- tree trial = common_base_type (basetype, tt2);
-
- if (trial)
- {
- if (trial == error_mark_node)
- return trial;
- if (best == NULL_TREE)
- best = trial;
- else if (best != trial)
- return error_mark_node;
- }
- }
-
- /* Same for TT2. */
- for (i = BINFO_N_BASE_BINFOS (TYPE_BINFO (tt2))-1; i >= 0; i--)
- {
- tree basetype = BINFO_TYPE (BINFO_BASE_BINFO (TYPE_BINFO (tt2), i));
- tree trial = common_base_type (tt1, basetype);
-
- if (trial)
- {
- if (trial == error_mark_node)
- return trial;
- if (best == NULL_TREE)
- best = trial;
- else if (best != trial)
- return error_mark_node;
- }
- }
- return best;
-}
/* Subroutines of `comptypes'. */
OpenPOWER on IntegriCloud