Lines Matching defs:pos

69 		struct symbol *unqual = alloc_symbol(ctype->pos, 0);
97 addr = alloc_expression(expr->pos, EXPR_SYMBOL);
114 struct symbol *sym = alloc_symbol(expr->pos, SYM_NODE);
115 struct symbol *array = alloc_symbol(expr->pos, SYM_ARRAY);
116 struct expression *addr = alloc_expression(expr->pos, EXPR_SYMBOL);
117 struct expression *initstr = alloc_expression(expr->pos, EXPR_STRING);
121 sym->array_size = alloc_const_expression(expr->pos, length);
236 combine_address_space(node->pos, &as, node->ctype.as);
281 warning(expr->pos, "implicit cast %s nocast type", tofrom);
287 warn_for_different_enum_types (struct position pos,
302 warning(pos, "mixing different enum types:");
303 info(pos, " %s", show_typename(typea));
304 info(pos, " %s", show_typename(typeb));
319 warn_for_different_enum_types (old->pos, old->ctype, type);
324 expr = alloc_expression(old->pos, EXPR_IMPLIED_CAST);
397 sparse_error(expr->pos, "incompatible types for operation (%s):", show_special(expr->op));
398 info(expr->pos, " %s", show_typename(expr->left->ctype));
399 info(expr->pos, " %s", show_typename(expr->right->ctype));
405 sparse_error(expr->pos, "incompatible type for operation (%s):", show_special(expr->op));
406 info(expr->pos, " %s", show_typename(expr->unop->ctype));
514 warning(expr->pos, "%s degrades to integer",
529 warn_for_different_enum_types(right->pos, left->ctype, right->ctype);
601 struct expression *val = alloc_expression(expr->pos, EXPR_VALUE);
621 struct expression *val = alloc_expression(expr->pos, EXPR_VALUE);
622 struct expression *mul = alloc_expression(expr->pos, EXPR_BINOP);
663 combine_address_space(t1->pos, &as1, t1->ctype.as);
671 combine_address_space(t2->pos, &as2, t2->ctype.as);
704 sparse_error(t1->pos,
803 warning(expr->pos, "Using plain integer as NULL pointer");
840 struct expression *sub = alloc_expression(expr->pos, EXPR_BINOP);
842 struct expression *val = alloc_expression(expr->pos, EXPR_VALUE);
850 warning(expr->pos, "potentially expensive pointer subtraction");
851 info(expr->pos, " '%s' has a non-power-of-2 size: %lu", show_typename(lbase), value);
878 warning(expr->pos, "assignment expression in conditional");
884 warning(expr->pos, "testing a 'safe expression'");
887 warning(expr->pos, "the address of %s will always evaluate as true", "a function");
890 warning(expr->pos, "the address of %s will always evaluate as true", "an array");
892 sparse_error(expr->pos, "non-scalar type in conditional:");
893 info(expr->pos, " %s", show_typename(ctype));
949 warning(expr->pos, "dubious: %sx %c %sy",
1044 warning(expr->pos, "testing a 'safe expression'");
1115 info(expr->pos, " %s", show_typename(ltype));
1116 info(expr->pos, " %s", show_typename(rtype));
1255 info(expr->pos, " %s", show_typename(ltype));
1256 info(expr->pos, " %s", show_typename(rtype));
1277 struct symbol *sym = alloc_symbol(ctype->pos, SYM_PTR);
1312 warning(expr->pos, "bad assignment (%s) to %s",
1341 warning(expr->pos, "invalid assignment: %s", show_special(op));
1342 info(expr->pos, " left side has type %s", show_typename(t));
1343 info(expr->pos, " right side has type %s", show_typename(s));
1410 warning((*rp)->pos, "%s degrades to integer",
1497 warning(expr->pos, "incorrect type in %s (%s)", where, typediff);
1498 info(expr->pos, " expected %s", show_typename(target));
1499 info(expr->pos, " got %s", show_typename(source));
1623 ptr = alloc_symbol(s->pos, SYM_PTR);
1628 combine_address_space(s->pos, &ptr->ctype.as, s->ctype.as);
1651 struct symbol *newsym = alloc_symbol(sym->pos, SYM_NODE);
1662 struct symbol *node = alloc_symbol(expr->pos, SYM_NODE);
1663 struct symbol *ptr = alloc_symbol(expr->pos, SYM_PTR);
1674 warning(expr->pos, "taking address of 'register' variable '%s'", show_ident(sym->ident));
1678 combine_address_space(sym->pos, &ptr->ctype.as, sym->ctype.as);
1683 combine_address_space(sym->pos, &ptr->ctype.as, sym->ctype.as);
1715 struct symbol *a = alloc_symbol(expr->pos, SYM_NODE);
1722 e0 = alloc_expression(expr->pos, EXPR_SYMBOL);
1726 e1 = alloc_expression(expr->pos, EXPR_PREOP);
1731 e2 = alloc_expression(expr->pos, EXPR_ASSIGNMENT);
1738 e3 = alloc_expression(expr->pos, EXPR_BINOP);
1741 e3->right = alloc_const_expression(expr->pos,
1748 e4 = alloc_expression(expr->pos, EXPR_COMMA);
1763 sparse_error(expr->pos, "taking the address of built-in function '%s'", show_ident(ctype->ident));
1785 sparse_error(expr->pos, "taking the address of built-in function '%s'", show_ident(ctype->ident));
1832 node = alloc_symbol(expr->pos, SYM_NODE);
1850 node = alloc_symbol(expr->pos, SYM_NODE);
1972 warning(expr->pos, "testing a 'safe expression'");
1978 expr->right = alloc_expression(expr->pos, EXPR_FVALUE);
1982 warning(expr->pos, "%s degrades to integer",
2043 add = alloc_expression(expr->pos, EXPR_BINOP);
2046 add->right = alloc_expression(expr->pos, EXPR_VALUE);
2087 combine_address_space(deref->pos, &address_space, ctype->ctype.as);
2217 warning(expr->pos, "expression using sizeof(void)");
2223 warning(expr->pos, "expression using sizeof _Bool");
2229 warning(expr->pos, "expression using sizeof on a function");
2234 warning(expr->pos, "using sizeof on a flexible structure");
2246 base = alloc_expression(expr->pos, EXPR_SIZEOF);
2251 base = alloc_expression(expr->pos, EXPR_VALUE);
2255 size = alloc_expression(expr->pos, EXPR_CAST);
2408 warning(e->pos, "excessive elements in %s initializer", s);
2425 new = alloc_expression(e->pos, EXPR_INDEX);
2437 new = alloc_expression(e->pos, EXPR_IDENTIFIER);
2538 *v = new = alloc_expression(e->pos, EXPR_INDEX);
2541 new = alloc_expression(e->pos, EXPR_INDEX);
2562 *v = new = alloc_expression(e->pos, EXPR_IDENTIFIER);
2576 new = alloc_expression(e->pos, EXPR_IDENTIFIER);
2625 warning(e->pos, "%s%.*s%spositional init of field in %s %s, declared with attribute designated_init",
2633 warning(e->pos, "advancing past deep designator");
2662 warning(e->pos, "bogus scalar initializer");
2669 warning(e->pos, "missing braces around initializer");
2691 warning(e->pos,
2728 warning(e->pos, "braces around scalar initializer");
2776 warning(e->pos, "non-constant initializer for static object");
2828 p = alloc_expression(e->pos, EXPR_STRING);
2835 warning(e->pos,
2838 warning(e->pos,
2865 zero = alloc_const_expression(expr->pos, 0);
2953 struct expression *addr = alloc_expression(expr->pos, EXPR_SYMBOL);
3037 warning(expr->pos, "cast to union type");
3039 item = alloc_expression(source->pos, EXPR_IDENTIFIER);
3043 init = alloc_expression(source->pos, EXPR_INITIALIZER);
3051 warning(expr->pos, "cast to non-scalar");
3055 warning(expr->pos, "cast from non-scalar");
3063 warning(expr->pos, "cast to %s",
3068 warning(expr->pos, "%s degrades to integer",
3071 warning(expr->pos, "cast from %s",
3092 warning(expr->pos, "cast removes address space '%s' of expression", show_as(sas));
3094 warning(expr->pos, "cast between address spaces (%s -> %s)", show_as(sas), show_as(tas));
3097 warning(expr->pos,
3127 warning(expr->pos, "cast to %s", show_typename(ctype));
3131 warning(expr->pos, "cast from %s", show_typename(source->ctype));
3280 m = alloc_const_expression(expr->pos,
3309 static void check_label_declaration(struct position pos, struct symbol *label)
3315 sparse_error(pos, "label '%s' was not declared", show_ident(label->ident));
3358 sparse_error(stype->pos, "variable length array type in generic selection");
3362 sparse_error(stype->pos, "function type in generic selection");
3366 sparse_error(stype->pos, "incomplete type in generic selection");
3377 sparse_error(expr->pos, "no generic selection for '%s'", show_typename(ctrl));
3458 check_label_declaration(expr->pos, expr->label_symbol);
3498 sparse_error(sym->pos, "symbol '%s' has multiple initializers (originally initialized at %s:%d)",
3500 stream_name(next->pos.stream), next->pos.line);
3507 sparse_error(sym->pos, "symbol '%s' redeclared with different type (%s):",
3509 info(sym->pos, " %s", show_typename(sym));
3510 info(next->pos, "note: previously declared as:");
3511 info(next->pos, " %s", show_typename(next));
3525 warning(sym->pos, "symbol '%s' was not declared. Should it be static?", show_ident(sym->ident));
3592 warning(stmt->pos, "returning void-valued expression");
3597 sparse_error(stmt->pos, "return with no return value");
3635 sparse_error(constraint->pos, "invalid ASM constraint (\"\")");
3650 sparse_error(constraint->pos, "invalid ASM constraint '%c'", c);
3725 addr = alloc_expression(expr->pos, EXPR_PREOP);
3760 warning(expr->pos, "asm output is not an lvalue");
3782 sparse_error(stmt->pos, "bad asm clobbers");
3792 sparse_error(stmt->pos, "bad asm label");
3822 warn_for_different_enum_types(case_expr->pos, case_type, (*enumcase)->ctype);
3884 check_label_declaration(stmt->pos, label);