commit 75f20c4db1212d43aadc16c32fc9b507b47f9524
parent bbf9abf470ddb8c0baa2424f63f67ce785af47aa
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 23 Jul 2015 21:05:40 +0200
Style patch
Diffstat:
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/cc1/expr.c b/cc1/expr.c
@@ -125,13 +125,18 @@ convert(Node *np, Type *tp, char iscast)
if (eqtype(np->type, tp))
return np;
switch (BTYPE(np)) {
- case ENUM: case INT: case FLOAT:
+ case ENUM:
+ case INT:
+ case FLOAT:
switch (tp->op) {
case PTR:
if (!iscast || BTYPE(np) == FLOAT)
return NULL;
/* PASSTHROUGH */
- case INT: case FLOAT: case ENUM: case VOID:
+ case INT:
+ case FLOAT:
+ case ENUM:
+ case VOID:
break;
default:
return NULL;
@@ -139,7 +144,9 @@ convert(Node *np, Type *tp, char iscast)
break;
case PTR:
switch (tp->op) {
- case ENUM: case INT: case VOID: /* TODO: allow p = 0 */
+ case ENUM: /* TODO: allow p = 0 */
+ case INT:
+ case VOID:
if (!iscast)
return NULL;;
break;