linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add missing checks for Waddress-space
@ 2009-04-23 20:25 Martin Nagy
  2009-04-24 22:53 ` Christopher Li
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Nagy @ 2009-04-23 20:25 UTC (permalink / raw)
  To: linux-sparse


Some of these are missing in evaluate.c. Maybe we should change the
option to not consider address space at all, if unset. It would be much
easier to make attribute_address_space() ignore it.

Signed-off-by: Martin Nagy <nagy.martin@gmail.com>
---
 evaluate.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/evaluate.c b/evaluate.c
index 5c3812e..be7a17c 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -1149,7 +1149,7 @@ static struct symbol *evaluate_conditional_expression(struct expression *expr)
 			goto Err;
 		}
 		/* OK, it's pointer on pointer */
-		if (ltype->ctype.as != rtype->ctype.as) {
+		if (Waddress_space && ltype->ctype.as != rtype->ctype.as) {
 			typediff = "different address spaces";
 			goto Err;
 		}
@@ -1339,7 +1339,7 @@ static int compatible_assignment_types(struct expression *expr, struct symbol *t
 			 * we do not remove qualifiers from pointed to [C]
 			 * or mix address spaces [sparse].
 			 */
-			if (t->ctype.as != s->ctype.as) {
+			if (Waddress_space && t->ctype.as != s->ctype.as) {
 				typediff = "different address spaces";
 				goto Err;
 			}
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-27  6:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-23 20:25 [PATCH] Add missing checks for Waddress-space Martin Nagy
2009-04-24 22:53 ` Christopher Li
2009-04-25  7:36   ` Martin Nagy
2009-04-27  6:08     ` Christopher Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).