aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1997-12-22 09:35:49 +0000
committerJeff Law <law@gcc.gnu.org>1997-12-22 02:35:49 -0700
commit7f85441b70954de35ece40b0cff43b97c972f06a (patch)
treecba1ef4d2b5838af886de2683ccf23e4e5c8510b /gcc
parent9e04c65a52d300b345d4136d95c93d49aef54781 (diff)
downloadgcc-7f85441b70954de35ece40b0cff43b97c972f06a.zip
gcc-7f85441b70954de35ece40b0cff43b97c972f06a.tar.gz
gcc-7f85441b70954de35ece40b0cff43b97c972f06a.tar.bz2
call.c (add_builtin_candidate): Add default case in enumeration switch.
* call.c (add_builtin_candidate): Add default case in enumeration switch. (build_new_op): Likewise. (convert_like): Likewise. * cvt.c (build_expr_type_conversion): Likewise. * tree.c (real_lvalue_p): Likewise. (lvalue_p): Likewise. (cp_tree_equal): Likewise. * typeck.c (comptypes): Likewise. (build_component_ref): Likewise. (build_function_call_real): Likewise. (build_binary_op_nodefault): Likewise. (build_unary_op): Likewise. (build_modify_expr): Likewise. * typeck2.c (initializer_constant_valid_p): Likewise. From-SVN: r17187
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog18
-rw-r--r--gcc/cp/call.c18
-rw-r--r--gcc/cp/cvt.c3
-rw-r--r--gcc/cp/tree.c9
-rw-r--r--gcc/cp/typeck.c28
-rw-r--r--gcc/cp/typeck2.c3
6 files changed, 79 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 83b0b69..4f8795b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,21 @@
+Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * call.c (add_builtin_candidate): Add default case in enumeration
+ switch.
+ (build_new_op): Likewise.
+ (convert_like): Likewise.
+ * cvt.c (build_expr_type_conversion): Likewise.
+ * tree.c (real_lvalue_p): Likewise.
+ (lvalue_p): Likewise.
+ (cp_tree_equal): Likewise.
+ * typeck.c (comptypes): Likewise.
+ (build_component_ref): Likewise.
+ (build_function_call_real): Likewise.
+ (build_binary_op_nodefault): Likewise.
+ (build_unary_op): Likewise.
+ (build_modify_expr): Likewise.
+ * typeck2.c (initializer_constant_valid_p): Likewise.
+
Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
* decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index e3c3e51..d803952 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3605,6 +3605,9 @@ add_builtin_candidate (candidates, code, code2, fnname, type1, type2,
case POSTDECREMENT_EXPR:
args[1] = integer_zero_node;
type2 = integer_type_node;
+ break;
+ default:
+ break;
}
switch (code)
@@ -4785,6 +4788,9 @@ build_new_op (code, flags, arg1, arg2, arg3)
case CALL_EXPR:
return build_object_call (arg1, arg2);
+
+ default:
+ break;
}
/* The comma operator can have void args. */
@@ -4920,6 +4926,9 @@ build_new_op (code, flags, arg1, arg2, arg3)
case COMPOUND_EXPR:
case COMPONENT_REF:
return NULL_TREE;
+
+ default:
+ break;
}
if (flags & LOOKUP_COMPLAIN)
{
@@ -4994,6 +5003,9 @@ build_new_op (code, flags, arg1, arg2, arg3)
cp_warning ("comparison between `%#T' and `%#T'",
TREE_TYPE (arg1), TREE_TYPE (arg2));
}
+ break;
+ default:
+ break;
}
/* We need to strip any leading REF_BIND so that bitfields don't cause
@@ -5306,6 +5318,9 @@ convert_like (convs, expr)
/* Call build_user_type_conversion again for the error. */
return build_user_type_conversion
(TREE_TYPE (convs), TREE_OPERAND (convs, 0), LOOKUP_NORMAL);
+
+ default:
+ break;
};
expr = convert_like (TREE_OPERAND (convs, 0), expr);
@@ -5328,6 +5343,9 @@ convert_like (convs, expr)
error_mark_node);
case LVALUE_CONV:
return decay_conversion (expr);
+
+ default:
+ break;
}
return ocp_convert (TREE_TYPE (convs), expr, CONV_IMPLICIT,
LOOKUP_NORMAL|LOOKUP_NO_CONVERSION);
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index fdfdb7f..ad47a84 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -1468,6 +1468,9 @@ build_expr_type_conversion (desires, expr, complain)
win = (desires & WANT_FLOAT); break;
case POINTER_TYPE:
win = (desires & WANT_POINTER); break;
+
+ default:
+ break;
}
if (win)
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 735e1a7a..6b8c54e 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -125,6 +125,9 @@ real_lvalue_p (ref)
case MIN_EXPR:
return (real_lvalue_p (TREE_OPERAND (ref, 0))
&& real_lvalue_p (TREE_OPERAND (ref, 1)));
+
+ default:
+ break;
}
return 0;
@@ -210,6 +213,9 @@ lvalue_p (ref)
case MIN_EXPR:
return (lvalue_p (TREE_OPERAND (ref, 0))
&& lvalue_p (TREE_OPERAND (ref, 1)));
+
+ default:
+ break;
}
return 0;
@@ -2053,6 +2059,9 @@ cp_tree_equal (t1, t2)
if (TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (t1, 0))) == 't')
return comptypes (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0), 1);
break;
+
+ default:
+ break;
}
switch (TREE_CODE_CLASS (code1))
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 5251241..e706e82 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -844,6 +844,9 @@ comptypes (type1, type2, strict)
if (TYPE_IDENTIFIER (t1) != TYPE_IDENTIFIER (t2))
return 0;
return comptypes (TYPE_CONTEXT (t1), TYPE_CONTEXT (t2), 1);
+
+ default:
+ break;
}
return attrval == 2 && val == 1 ? 2 : val;
}
@@ -1788,6 +1791,9 @@ build_component_ref (datum, component, basetype_path, protect)
basetype_path, protect),
build_component_ref (TREE_OPERAND (datum, 2), component,
basetype_path, protect));
+
+ default:
+ break;
}
code = TREE_CODE (basetype);
@@ -2724,6 +2730,9 @@ build_function_call_real (function, params, require_complete, flags)
if (coerced_params == 0)
return integer_zero_node;
return build_unary_op (ABS_EXPR, TREE_VALUE (coerced_params), 0);
+
+ default:
+ break;
}
/* C++ */
@@ -3568,6 +3577,9 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, error_code)
pedwarn ("ANSI C++ forbids comparison between pointer and integer");
}
break;
+
+ default:
+ break;
}
if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE)
@@ -4334,6 +4346,9 @@ build_unary_op (code, xarg, noconvert)
TREE_NO_UNUSED_WARNING (compound) = 1;
return compound;
}
+
+ default:
+ break;
}
/* Complain about anything else that is not a true lvalue. */
@@ -4497,6 +4512,10 @@ build_unary_op (code, xarg, noconvert)
case FIX_CEIL_EXPR:
if (! lvalue_p (arg) && pedantic)
pedwarn ("taking the address of a cast to non-reference type");
+ break;
+
+ default:
+ break;
}
/* Allow the address of a constructor if all the elements
@@ -4550,6 +4569,9 @@ build_unary_op (code, xarg, noconvert)
return addr;
}
+
+ default:
+ break;
}
if (!errstring)
@@ -5783,6 +5805,9 @@ build_modify_expr (lhs, modifycode, rhs)
from warn_if_unused_value. */
cp_convert (void_type_node, rhs), cond);
}
+
+ default:
+ break;
}
if (TREE_CODE (lhs) == OFFSET_REF)
@@ -5934,6 +5959,9 @@ build_modify_expr (lhs, modifycode, rhs)
return result;
return cp_convert (TREE_TYPE (lhs), result);
}
+
+ default:
+ break;
}
/* Now we have handled acceptable kinds of LHS that are not truly lvalues.
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 24e3c5c..e867e44 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -473,6 +473,9 @@ initializer_constant_valid_p (value, endtype)
return null_pointer_node;
return 0;
}
+
+ default:
+ break;
}
return 0;