diff options
author | 2009-04-25 07:36:16 +0000 | |
---|---|---|
committer | 2009-07-18 05:30:10 +0000 | |
commit | 909d306e74e73a40aab10dcbe26261fb381a30b2 (patch) | |
tree | b0e287fd0032adab1e01d9e2c0dbef688c5f5306 /evaluate.c | |
parent | .gitignore: Ignore dependencies and Vim swap files (diff) | |
download | sparse-909d306e74e73a40aab10dcbe26261fb381a30b2.tar.gz sparse-909d306e74e73a40aab10dcbe26261fb381a30b2.tar.bz2 sparse-909d306e74e73a40aab10dcbe26261fb381a30b2.zip |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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"; |