aboutsummaryrefslogtreecommitdiffstats
path: root/evaluate.c
diff options
context:
space:
mode:
authorMartin Nagy <nagy.martin@gmail.com>2009-04-25 07:36:16 +0000
committerChristopher Li <sparse@chrisli.org>2009-07-18 05:30:10 +0000
commit909d306e74e73a40aab10dcbe26261fb381a30b2 (patch)
treeb0e287fd0032adab1e01d9e2c0dbef688c5f5306 /evaluate.c
parentf4a530b2be22a04560d41ad1f3d4b50fa0d7687b (diff)
downloadsparse-909d306e74e73a40aab10dcbe26261fb381a30b2.tar.gz
Add missing checks for Waddress-space
Remove all previous checks for Waddress_space and add one centralized to the address_space attribute handler. If user passes the -Wno-address-space option, we behave as if every pointer had no address space. Signed-off-by: Martin Nagy <nagy.martin@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/evaluate.c b/evaluate.c
index 5c3812eb..b63fa367 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -689,7 +689,7 @@ const char *type_difference(struct ctype *c1, struct ctype *c2,
/* XXX: we ought to compare sizes */
break;
case SYM_PTR:
- if (Waddress_space && as1 != as2)
+ if (as1 != as2)
return "different address spaces";
/* MOD_SPECIFIER is due to idiocy in parse.c */
if ((mod1 ^ mod2) & ~MOD_IGNORE & ~MOD_SPECIFIER)
@@ -706,7 +706,7 @@ const char *type_difference(struct ctype *c1, struct ctype *c2,
struct symbol *arg1, *arg2;
int i;
- if (Waddress_space && as1 != as2)
+ if (as1 != as2)
return "different address spaces";
if ((mod1 ^ mod2) & ~MOD_IGNORE & ~MOD_SIGNEDNESS)
return "different modifiers";
@@ -745,7 +745,7 @@ const char *type_difference(struct ctype *c1, struct ctype *c2,
break;
}
case SYM_BASETYPE:
- if (Waddress_space && as1 != as2)
+ if (as1 != as2)
return "different address spaces";
if (base1 != base2)
return "different base types";
@@ -762,7 +762,7 @@ const char *type_difference(struct ctype *c1, struct ctype *c2,
t1 = base1;
t2 = base2;
}
- if (Waddress_space && as1 != as2)
+ if (as1 != as2)
return "different address spaces";
if ((mod1 ^ mod2) & ~MOD_IGNORE & ~MOD_SIGNEDNESS)
return "different modifiers";