Commit 7f85441b by Kaveh R. Ghazi Committed by Jeff Law

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
parent 9e04c65a
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.
......
......@@ -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);
......
......@@ -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)
......
......@@ -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))
......
......@@ -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.
......
......@@ -473,6 +473,9 @@ initializer_constant_valid_p (value, endtype)
return null_pointer_node;
return 0;
}
default:
break;
}
return 0;
......
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