Lines Matching defs:lt

842 				  const tnode_t *ln, tspec_t lt,
848 if (lt == CHAR && is_out_of_char_range(rn)) {
871 tspec_t lt = ln->tn_type->t_tspec;
877 if (!is_integer(lt) || !is_integer(rt))
881 if (lt == CHAR && rn->tn_op == CON &&
895 if (!check_nonportable_char_comparison(op, ln, lt, rn, rt))
898 if (is_uinteger(lt) && !is_uinteger(rt) &&
909 if (is_uinteger(rt) && !is_uinteger(lt) &&
934 usual_arithmetic_conversion_trad(tspec_t lt, tspec_t rt)
939 if (lt == arith_rank[i] || rt == arith_rank[i])
943 if (is_uinteger(lt) || is_uinteger(rt))
950 usual_arithmetic_conversion_c90(tspec_t lt, tspec_t rt)
953 if (lt == rt)
954 return lt;
956 if (lt == LCOMPLEX || rt == LCOMPLEX)
958 if (lt == DCOMPLEX || rt == DCOMPLEX)
960 if (lt == FCOMPLEX || rt == FCOMPLEX)
962 if (lt == LDOUBLE || rt == LDOUBLE)
964 if (lt == DOUBLE || rt == DOUBLE)
966 if (lt == FLOAT || rt == FLOAT)
969 if (size_in_bits(lt) > size_in_bits(rt))
970 return lt;
971 if (size_in_bits(lt) < size_in_bits(rt))
976 if (arith_rank[i] == lt || arith_rank[i] == rt)
978 if ((is_uinteger(lt) || is_uinteger(rt)) &&
1005 tspec_t lt = (*lnp)->tn_type->t_tspec;
1007 if (!is_arithmetic(lt) || !is_arithmetic(rt))
1011 ? usual_arithmetic_conversion_c90(lt, rt)
1012 : usual_arithmetic_conversion_trad(lt, rt);
1015 && is_integer(lt) && (*lnp)->tn_op != CON
1021 if (t != lt)
1448 tspec_t lt = ln->tn_type->t_tspec;
1450 if (lt == PTR && rt != PTR) {
1470 lint_assert(lt == PTR);
1541 tspec_t lt = ln->tn_type->t_tspec;
1545 if (is_arithmetic(lt) && is_arithmetic(rt))
1548 else if (lt == BOOL && rt == BOOL)
1550 else if (lt == VOID || rt == VOID)
1552 else if (is_struct_or_union(lt)) {
1561 } else if (lt == PTR && is_integer(rt)) {
1565 } else if (rt == PTR && is_integer(lt)) {
1566 if (lt != PTRDIFF_TSPEC)
1569 } else if (lt == PTR && is_null_pointer(rn))
1573 else if (lt == PTR && ln->tn_type->t_subt->t_tspec == VOID)
1652 tspec_t lt = ln->tn_type->t_tspec;
1659 if ((op == ADDASS || op == SUBASS) && lt == PTR) {
1670 (lt == STRUCT || rt == STRUCT)) {
1671 lint_assert(lt == rt);
1685 && portable_rank_cmp(lt, rt) < 0)
1690 && (op == ASSIGN || lt != PTR)
1691 && (lt != rt || (ln->tn_type->t_bitfield && rn->tn_op == CON))) {
1693 rt = lt;
1696 if (lt == PTR && ln->tn_type->t_subt->t_tspec != VOID
2385 typeok_point(const tnode_t *ln, const type_t *ltp, tspec_t lt)
2387 if (is_struct_or_union(lt))
2390 if (lt == FUNC || lt == VOID || ltp->t_bitfield)
2412 typeok_arrow(tspec_t lt)
2420 if (lt == PTR || (!allow_c90 && is_integer(lt)))
2495 const type_t *ltp, tspec_t lt,
2500 if (lt == VOID || (binary && rt == VOID)) {
2518 const type_t *ltp, tspec_t lt,
2522 if ((lt == PTR && !is_integer(rt)) || (rt == PTR && !is_integer(lt))) {
2523 warn_incompatible_types(op, ltp, lt, rtp, rt);
2531 const type_t *ltp, tspec_t lt,
2535 if ((lt == PTR && rt != PTR && !is_integer(rt)) ||
2536 (lt != PTR && rt == PTR)) {
2537 warn_incompatible_types(op, ltp, lt, rtp, rt);
2540 if (lt == PTR && rt == PTR &&
2550 const tnode_t *ln, tspec_t lt,
2577 portable_rank_cmp(lt, rt) < 0) {
2590 typeok_shl(op_t op, tspec_t lt, tspec_t rt)
2599 if (portable_rank_cmp(lt, rt) < 0) {
2611 typeok_shift(const type_t *ltp, tspec_t lt, const tnode_t *rn, tspec_t rt)
2619 else if ((uint64_t)rn->u.value.u.integer == size_in_bits(lt))
2622 else if ((uint64_t)rn->u.value.u.integer > size_in_bits(lt)) {
2625 (unsigned long long)size_in_bits(lt),
2626 tspec_name(lt));
2631 is_typeok_eq(const tnode_t *ln, tspec_t lt, const tnode_t *rn, tspec_t rt)
2633 if (lt == PTR && is_null_pointer(rn))
2646 tspec_t lt = ltp->t_subt->t_tspec;
2649 if (is_struct_or_union(lt) && is_struct_or_union(rt)) {
2705 const tnode_t *ln, const type_t *ltp, tspec_t lt,
2708 if (lt == PTR && rt == PTR) {
2713 if (lt != PTR && rt != PTR)
2716 if (!is_integer(lt) && !is_integer(rt)) {
2717 warn_incompatible_types(op, ltp, lt, rtp, rt);
2721 const char *lx = lt == PTR ? "pointer" : "integer";
2729 typeok_quest(tspec_t lt, const tnode_t *rn)
2731 if (!is_scalar(lt)) {
2765 typeok_colon(const tnode_t *ln, const type_t *ltp, tspec_t lt,
2769 if (is_arithmetic(lt) && is_arithmetic(rt))
2771 if (lt == BOOL && rt == BOOL)
2774 if (lt == STRUCT && rt == STRUCT && ltp->u.sou == rtp->u.sou)
2776 if (lt == UNION && rt == UNION && ltp->u.sou == rtp->u.sou)
2779 if (lt == PTR && is_null_pointer(rn))
2784 if ((lt == PTR && is_integer(rt)) || (is_integer(lt) && rt == PTR)) {
2785 const char *lx = lt == PTR ? "pointer" : "integer";
2793 if (lt == VOID || rt == VOID) {
2794 if (lt != VOID || rt != VOID)
2800 if (lt == PTR && rt == PTR) {
2828 typeok_assign(op_t op, const tnode_t *ln, const type_t *ltp, tspec_t lt)
2842 || (is_struct_or_union(lt) && has_constant_member(ltp))) {
2852 const type_t *ltp, tspec_t lt,
2855 if (mp->m_takes_bool && lt == BOOL && rt == BOOL)
2858 if (!is_integer(lt) || (mp->m_binary && !is_integer(rt))) {
2859 warn_incompatible_types(op, ltp, lt, rtp, rt);
2863 if ((!is_integer(lt) && !is_complex(lt)) ||
2865 warn_incompatible_types(op, ltp, lt, rtp, rt);
2869 if (!is_scalar(lt) || (mp->m_binary && !is_scalar(rt))) {
2870 warn_incompatible_types(op, ltp, lt, rtp, rt);
2874 if (!is_arithmetic(lt) ||
2876 warn_incompatible_types(op, ltp, lt, rtp, rt);
2885 tspec_t lt, tspec_t lst,
2889 if (!(lt == PTR && rt == PTR && (lst == VOID || rst == VOID)))
3001 tspec_t lt,
3007 if (!(lt == PTR && rt == PTR && (lst == VOID || rst == VOID ||
3045 const type_t *ltp, tspec_t lt,
3049 if (!((lt == PTR && is_integer(rt)) || (is_integer(lt) && rt == PTR)))
3052 const char *lx = lt == PTR ? "pointer" : "integer";
3077 const type_t *ltp, tspec_t lt,
3080 if (!(lt == PTR && rt == PTR))
3093 const type_t *ltp, tspec_t lt,
3110 warn_incompatible_types(op, ltp, lt, rtp, rt);
3124 tspec_t lt, rt, lst = NO_TSPEC, rst = NO_TSPEC;
3127 if ((lt = (ltp = ln->tn_type)->t_tspec) == PTR)
3132 if (lt == BOOL && is_scalar(rt)) /* C99 6.3.1.2 */
3135 if (is_arithmetic(lt) && (is_arithmetic(rt) || rt == BOOL))
3138 if (is_struct_or_union(lt) && is_struct_or_union(rt))
3141 if (lt == PTR && is_null_pointer(rn)) {
3148 check_assign_void_pointer(op, arg, lt, lst, rt, rst);
3151 lt, lstp, lst, rn, rtp, rt, rstp, rst))
3154 if (check_assign_pointer_integer(op, arg, ltp, lt, rtp, rt))
3157 if (check_assign_pointer(op, arg, ltp, lt, rtp, rt))
3160 warn_assign(op, arg, ltp, lt, rtp, rt);
3238 const tnode_t *ln, const type_t *ltp, tspec_t lt,
3243 return typeok_arrow(lt);
3245 return typeok_point(ln, ltp, lt);
3252 return typeok_indir(ltp, lt);
3254 return typeok_address(op, ln, ltp, lt);
3256 return typeok_plus(op, ltp, lt, rtp, rt);
3258 return typeok_minus(op, ltp, lt, rtp, rt);
3260 typeok_shl(op, lt, rt);
3263 typeok_shr(op, ln, lt, rn, rt);
3265 typeok_shift(ltp, lt, rn, rt);
3272 return typeok_compare(op, ln, ltp, lt, rn, rtp, rt);
3275 if (is_typeok_eq(ln, lt, rn, rt))
3279 return typeok_quest(lt, rn);
3281 return typeok_colon(ln, ltp, lt, rn, rtp, rt);
3295 if ((lt == PTR && !is_integer(rt)) || rt == PTR) {
3296 warn_incompatible_types(op, ltp, lt, rtp, rt);
3303 if (pflag && !is_uinteger(lt) &&
3313 return typeok_assign(op, ln, ltp, lt);
3439 tspec_t lt = ltp->t_tspec;
3446 if (!typeok_scalar(op, mp, ltp, lt, rtp, rt))
3449 if (!typeok_op(op, arg, ln, ltp, lt, rn, rtp, rt))