Home | History | Annotate | Download | only in lint1

Lines Matching refs:LT

885 				  const tnode_t *ln, tspec_t lt,
891 if (lt == CHAR && is_out_of_char_range(rn)) {
914 tspec_t lt = ln->tn_type->t_tspec;
920 if (!is_integer(lt) || !is_integer(rt))
924 if (lt == CHAR && rn->tn_op == CON &&
938 if (!check_nonportable_char_comparison(op, ln, lt, rn, rt))
941 if (is_uinteger(lt) && !is_uinteger(rt) &&
947 } else if (op == LT || op == GE)
952 if (is_uinteger(rt) && !is_uinteger(lt) &&
977 usual_arithmetic_conversion_trad(tspec_t lt, tspec_t rt)
982 if (lt == arith_rank[i] || rt == arith_rank[i])
986 if (is_uinteger(lt) || is_uinteger(rt))
993 usual_arithmetic_conversion_c90(tspec_t lt, tspec_t rt)
996 if (lt == rt)
997 return lt;
999 if (lt == LCOMPLEX || rt == LCOMPLEX)
1001 if (lt == DCOMPLEX || rt == DCOMPLEX)
1003 if (lt == FCOMPLEX || rt == FCOMPLEX)
1005 if (lt == LDOUBLE || rt == LDOUBLE)
1007 if (lt == DOUBLE || rt == DOUBLE)
1009 if (lt == FLOAT || rt == FLOAT)
1012 if (size_in_bits(lt) > size_in_bits(rt))
1013 return lt;
1014 if (size_in_bits(lt) < size_in_bits(rt))
1019 if (arith_rank[i] == lt || arith_rank[i] == rt)
1021 if ((is_uinteger(lt) || is_uinteger(rt)) &&
1048 tspec_t lt = (*lnp)->tn_type->t_tspec;
1050 if (!is_arithmetic(lt) || !is_arithmetic(rt))
1054 ? usual_arithmetic_conversion_c90(lt, rt)
1055 : usual_arithmetic_conversion_trad(lt, rt);
1058 && is_integer(lt) && (*lnp)->tn_op != CON
1064 if (t != lt)
1134 case LT:
1229 case LT:
1490 tspec_t lt = ln->tn_type->t_tspec;
1492 if (lt == PTR && rt != PTR) {
1512 lint_assert(lt == PTR);
1583 tspec_t lt = ln->tn_type->t_tspec;
1587 if (is_arithmetic(lt) && is_arithmetic(rt))
1590 else if (lt == BOOL && rt == BOOL)
1592 else if (lt == VOID || rt == VOID)
1594 else if (is_struct_or_union(lt)) {
1603 } else if (lt == PTR && is_integer(rt)) {
1607 } else if (rt == PTR && is_integer(lt)) {
1608 if (lt != PTRDIFF_TSPEC)
1611 } else if (lt == PTR && is_null_pointer(rn))
1615 else if (lt == PTR && ln->tn_type->t_subt->t_tspec == VOID)
1694 tspec_t lt = ln->tn_type->t_tspec;
1701 if ((op == ADDASS || op == SUBASS) && lt == PTR) {
1712 (lt == STRUCT || rt == STRUCT)) {
1713 lint_assert(lt == rt);
1727 && portable_rank_cmp(lt, rt) < 0)
1729 warning(118, tspec_name(lt), "<<=", tspec_name(rt));
1732 && (op == ASSIGN || lt != PTR)
1733 && (lt != rt || (ln->tn_type->t_bitfield && rn->tn_op == CON))) {
1735 rt = lt;
1738 if (lt == PTR && ln->tn_type->t_subt->t_tspec != VOID
1964 case LT:
2420 typeok_point(const tnode_t *ln, const type_t *ltp, tspec_t lt)
2422 if (is_struct_or_union(lt))
2425 if (lt == FUNC || lt == VOID || ltp->t_bitfield)
2447 typeok_arrow(tspec_t lt)
2455 if (lt == PTR || (!allow_c90 && is_integer(lt)))
2530 const type_t *ltp, tspec_t lt,
2535 if (lt == VOID || (binary && rt == VOID)) {
2553 const type_t *ltp, tspec_t lt,
2557 if ((lt == PTR && !is_integer(rt)) || (rt == PTR && !is_integer(lt))) {
2558 warn_incompatible_types(op, ltp, lt, rtp, rt);
2566 const type_t *ltp, tspec_t lt,
2570 if ((lt == PTR && rt != PTR && !is_integer(rt)) ||
2571 (lt != PTR && rt == PTR)) {
2572 warn_incompatible_types(op, ltp, lt, rtp, rt);
2575 if (lt == PTR && rt == PTR &&
2584 typeok_shr(const tnode_t *ln, tspec_t lt,
2611 warning(118, tspec_name(lt), ">>", tspec_name(rt));
2618 && portable_rank_cmp(lt, rt) < 0
2621 warning(118, tspec_name(lt), ">>", tspec_name(rt));
2648 typeok_shl(const tnode_t *ln, tspec_t lt, const tnode_t *rn, tspec_t rt)
2654 if (hflag && allow_trad && allow_c90 && portable_rank_cmp(lt, rt) < 0)
2656 warning(118, tspec_name(lt), "<<", tspec_name(rt));
2662 typeok_shift(const tnode_t *ln, tspec_t lt, const tnode_t *rn, tspec_t rt)
2670 else if ((uint64_t)rn->u.value.u.integer == size_in_bits(lt))
2674 else if ((uint64_t)rn->u.value.u.integer > size_in_bits(lt)) {
2677 (unsigned long long)size_in_bits(lt),
2683 is_typeok_eq(const tnode_t *ln, tspec_t lt, const tnode_t *rn, tspec_t rt)
2685 if (lt == PTR && is_null_pointer(rn))
2698 tspec_t lt = ltp->t_subt->t_tspec;
2701 if (is_struct_or_union(lt) && is_struct_or_union(rt)) {
2757 const tnode_t *ln, const type_t *ltp, tspec_t lt,
2760 if (lt == PTR && rt == PTR) {
2765 if (lt != PTR && rt != PTR)
2768 if (!is_integer(lt) && !is_integer(rt)) {
2769 warn_incompatible_types(op, ltp, lt, rtp, rt);
2773 const char *lx = lt == PTR ? "pointer" : "integer";
2781 typeok_quest(tspec_t lt, const tnode_t *rn)
2783 if (!is_scalar(lt)) {
2817 typeok_colon(const tnode_t *ln, const type_t *ltp, tspec_t lt,
2821 if (is_arithmetic(lt) && is_arithmetic(rt))
2823 if (lt == BOOL && rt == BOOL)
2826 if (lt == STRUCT && rt == STRUCT && ltp->u.sou == rtp->u.sou)
2828 if (lt == UNION && rt == UNION && ltp->u.sou == rtp->u.sou)
2831 if (lt == PTR && is_null_pointer(rn))
2836 if ((lt == PTR && is_integer(rt)) || (is_integer(lt) && rt == PTR)) {
2837 const char *lx = lt == PTR ? "pointer" : "integer";
2845 if (lt == VOID || rt == VOID) {
2846 if (lt != VOID || rt != VOID)
2852 if (lt == PTR && rt == PTR) {
2880 typeok_assign(op_t op, const tnode_t *ln, const type_t *ltp, tspec_t lt)
2894 || (is_struct_or_union(lt) && has_constant_member(ltp))) {
2904 const type_t *ltp, tspec_t lt,
2907 if (mp->m_takes_bool && lt == BOOL && rt == BOOL)
2910 if (!is_integer(lt) || (mp->m_binary && !is_integer(rt))) {
2911 warn_incompatible_types(op, ltp, lt, rtp, rt);
2915 if ((!is_integer(lt) && !is_complex(lt)) ||
2917 warn_incompatible_types(op, ltp, lt, rtp, rt);
2921 if (!is_scalar(lt) || (mp->m_binary && !is_scalar(rt))) {
2922 warn_incompatible_types(op, ltp, lt, rtp, rt);
2926 if (!is_arithmetic(lt) ||
2928 warn_incompatible_types(op, ltp, lt, rtp, rt);
2937 tspec_t lt, tspec_t lst,
2941 if (!(lt == PTR && rt == PTR && (lst == VOID || rst == VOID)))
3053 tspec_t lt,
3059 if (!(lt == PTR && rt == PTR && (lst == VOID || rst == VOID ||
3098 const type_t *ltp, tspec_t lt,
3102 if (!((lt == PTR && is_integer(rt)) || (is_integer(lt) && rt == PTR)))
3105 const char *lx = lt == PTR ? "pointer" : "integer";
3131 const type_t *ltp, tspec_t lt,
3134 if (!(lt == PTR && rt == PTR))
3147 const type_t *ltp, tspec_t lt,
3164 warn_incompatible_types(op, ltp, lt, rtp, rt);
3178 tspec_t lt, rt, lst = NO_TSPEC, rst = NO_TSPEC;
3181 if ((lt = (ltp = ln->tn_type)->t_tspec) == PTR)
3186 if (lt == BOOL && is_scalar(rt)) /* C99 6.3.1.2 */
3189 if (is_arithmetic(lt) && (is_arithmetic(rt) || rt == BOOL))
3192 if (is_struct_or_union(lt) && is_struct_or_union(rt))
3195 if (lt == PTR && is_null_pointer(rn)) {
3202 check_assign_void_pointer(op, arg, lt, lst, rt, rst);
3205 lt, lstp, lst, rn, rtp, rt, rstp, rst))
3208 if (check_assign_pointer_integer(op, arg, ltp, lt, rtp, rt))
3211 if (check_assign_pointer(op, arg, ltp, lt, rtp, rt))
3214 warn_assign(op, arg, ltp, lt, rtp, rt);
3290 const tnode_t *ln, const type_t *ltp, tspec_t lt,
3295 return typeok_arrow(lt);
3297 return typeok_point(ln, ltp, lt);
3304 return typeok_indir(ltp, lt);
3306 return typeok_address(op, ln, ltp, lt);
3308 return typeok_plus(op, ltp, lt, rtp, rt);
3310 return typeok_minus(op, ltp, lt, rtp, rt);
3312 typeok_shl(ln, lt, rn, rt);
3315 typeok_shr(ln, lt, rn, rt);
3317 typeok_shift(ln, lt, rn, rt);
3319 case LT:
3324 return typeok_compare(op, ln, ltp, lt, rn, rtp, rt);
3327 if (is_typeok_eq(ln, lt, rn, rt))
3331 return typeok_quest(lt, rn);
3333 return typeok_colon(ln, ltp, lt, rn, rtp, rt);
3347 if ((lt == PTR && !is_integer(rt)) || rt == PTR) {
3348 warn_incompatible_types(op, ltp, lt, rtp, rt);
3355 if (pflag && !is_uinteger(lt) &&
3365 return typeok_assign(op, ln, ltp, lt);
3493 tspec_t lt = ltp->t_tspec;
3500 if (!typeok_scalar(op, mp, ltp, lt, rtp, rt))
3503 if (!typeok_op(op, call, arg, ln, ltp, lt, rn, rtp, rt))