aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwelinder@darter.rentec.com <welinder@darter.rentec.com>2004-09-13 11:48:37 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:11 -0700
commitf336cf3c5e0b4eeeeb02cdd92828ecca75eea1d7 (patch)
tree51883d13d28f563a5f17a0df9d06032b0b0e1a29 /expression.c
parentsymbol.h, symbol.c: (diff)
downloadsparse-f336cf3c5e0b4eeeeb02cdd92828ecca75eea1d7.tar.gz
sparse-f336cf3c5e0b4eeeeb02cdd92828ecca75eea1d7.tar.bz2
sparse-f336cf3c5e0b4eeeeb02cdd92828ecca75eea1d7.zip
Many files:
warn->warning error->error_die new error lib.h: warn->warning error->error_die new error Add gcc format checking to warning/error/...
Diffstat (limited to 'expression.c')
-rw-r--r--expression.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/expression.c b/expression.c
index ccb1ee0..c5cff5c 100644
--- a/expression.c
+++ b/expression.c
@@ -75,7 +75,7 @@ static struct token *string_expression(struct token *token, struct expression *e
} while (token_type(next) == TOKEN_STRING);
if (totlen > MAX_STRING) {
- warn(token->pos, "trying to concatenate %d-character string (%d bytes max)", totlen, MAX_STRING);
+ warning(token->pos, "trying to concatenate %d-character string (%d bytes max)", totlen, MAX_STRING);
totlen = MAX_STRING;
}
@@ -179,18 +179,18 @@ static void get_number_value(struct expression *expr, struct token *token)
if (!(value & (1ULL << bits)))
goto got_it;
if (!try_unsigned)
- warn(expr->pos, "decimal constant %s is too big for long long",
+ warning(expr->pos, "decimal constant %s is too big for long long",
show_token(token));
modifiers |= MOD_UNSIGNED;
got_it:
if (do_warn)
- warn(expr->pos, "constant %s is so big it is%s%s%s",
+ warning(expr->pos, "constant %s is so big it is%s%s%s",
show_token(token),
(modifiers & MOD_UNSIGNED) ? " unsigned":"",
(modifiers & MOD_LONG) ? " long":"",
(modifiers & MOD_LONGLONG) ? " long":"");
if (do_warn & 2)
- warn(expr->pos,
+ warning(expr->pos,
"decimal constant %s is between LONG_MAX and ULONG_MAX."
" For C99 that means long long, C90 compilers are very "
"likely to produce unsigned long (and a warning) here",
@@ -200,7 +200,7 @@ got_it:
expr->value = value;
return;
Eoverflow:
- error(expr->pos, "constant %s is too big even for unsigned long long",
+ error_die(expr->pos, "constant %s is too big even for unsigned long long",
show_token(token));
return;
Float:
@@ -224,7 +224,7 @@ Float:
return;
Enoint:
- error(expr->pos, "constant %s is not a valid number", show_token(token));
+ error_die(expr->pos, "constant %s is not a valid number", show_token(token));
}
struct token *primary_expression(struct token *token, struct expression **tree)
@@ -258,7 +258,7 @@ struct token *primary_expression(struct token *token, struct expression **tree)
* if (typeof(a) == int) ..
*/
if (sym && sym->namespace == NS_TYPEDEF) {
- warn(token->pos, "typename in expression");
+ warning(token->pos, "typename in expression");
sym = NULL;
}
expr->symbol_name = token->ident;
@@ -359,7 +359,7 @@ static struct token *postfix_expression(struct token *token, struct expression *
deref->deref = expr;
token = token->next;
if (token_type(token) != TOKEN_IDENT) {
- warn(token->pos, "Expected member name");
+ warning(token->pos, "Expected member name");
break;
}
deref->member = token->ident;
@@ -435,7 +435,7 @@ static struct token *unary_expression(struct token *token, struct expression **t
next = cast_expression(token->next, &unop);
if (!unop) {
- warn(token->pos, "Syntax error in unary expression");
+ warning(token->pos, "Syntax error in unary expression");
return next;
}
unary = alloc_expression(token->pos, EXPR_PREOP);
@@ -522,7 +522,7 @@ static struct token *cast_expression(struct token *token, struct expression **tr
top = alloc_expression(next->pos, type); \
next = inner(next->next, &right); \
if (!right) { \
- warn(next->pos, "No right hand side of '%s'-expression", show_special(op)); \
+ warning(next->pos, "No right hand side of '%s'-expression", show_special(op)); \
break; \
} \
top->op = op; \