aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-06-26 17:41:27 -0400
committerJosh Triplett <josh@freedesktop.org>2007-07-08 19:12:27 -0700
commit5061de9a365cd88307c9162c5a8558d1905b5d70 (patch)
tree16ac36e927efc7705474d0b4553167e82673134c /target.c
parentfirst pass at null pointer constants (diff)
downloadsparse-5061de9a365cd88307c9162c5a8558d1905b5d70.tar.gz
sparse-5061de9a365cd88307c9162c5a8558d1905b5d70.tar.bz2
sparse-5061de9a365cd88307c9162c5a8558d1905b5d70.zip
make size_t better approximate the reality
Instead of "always unsigned long" go for "unsigned int unless -m64 is given, unsigned long otherwise". Add an option (-msize-long) forcing to unsigned long regardless. Make __SIZE_TYPE__ expansion match that. The thing is, addition of checks on comparisons make for very unhappy min() on (kernel) size_t and sizeof(something) on the targets where the former is unsigned int. Which is to say, more than half of them... AFAICS, the only place needing explicit -msize-long in CHECK_FLAGS is s390 (it's using unsigned long both for 31- and 64-bit). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'target.c')
-rw-r--r--target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target.c b/target.c
index 22e948e..bf1bb8f 100644
--- a/target.c
+++ b/target.c
@@ -3,8 +3,8 @@
#include "symbol.h"
#include "target.h"
-struct symbol *size_t_ctype = &ulong_ctype;
-struct symbol *ssize_t_ctype = &long_ctype;
+struct symbol *size_t_ctype = &uint_ctype;
+struct symbol *ssize_t_ctype = &int_ctype;
/*
* For "__attribute__((aligned))"