[prev in list] [next in list] [prev in thread] [next in thread]
List: pcc-list
Subject: [Pcc] [PATCH 7/9] CC driver: do not use GNU extension case ...
From: Antoine Leca <antoine64leca () hotmail ! com>
Date: 2014-12-12 15:23:59
Message-ID: BLU437-SMTP23A6C227C9AED0AF947BD1B0600 () phx ! gbl
[Download RAW message or body]
... and allows more compiler to compile this code.
---
cc/ccom/gcc_compat.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/cc/ccom/gcc_compat.c b/cc/ccom/gcc_compat.c
index d3eb9bd..7fcfff5 100644
--- a/cc/ccom/gcc_compat.c
+++ b/cc/ccom/gcc_compat.c
@@ -669,7 +669,11 @@ gcc_modefix(NODE *p)
return;
}
i = mods[i].typ;
- switch (i) {
+ if (i>=1 && i<=MAXTYPES) {
+ MODTYPE(p->n_type, ctype(i));
+ if (u)
+ p->n_type = ENUNSIGN(p->n_type);
+ } else switch (i) {
#ifdef TARGET_TIMODE
case 800:
if (BTYPE(p->n_type) == STRTY)
@@ -686,12 +690,6 @@ gcc_modefix(NODE *p)
p->n_ap = attr_add(p->n_ap, a2);
break;
#endif
- case 1 ... MAXTYPES:
- MODTYPE(p->n_type, ctype(i));
- if (u)
- p->n_type = ENUNSIGN(p->n_type);
- break;
-
case FCOMPLEX:
case COMPLEX:
case LCOMPLEX:
--
1.8.0.msysgit.0
_______________________________________________
Pcc mailing list
Pcc@lists.ludd.ltu.se
https://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic