aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLinus Torvalds <torvalds@home.transmeta.com>2003-03-25 22:39:41 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 20:59:47 -0700
commitad4dd337f42303a11b478afe29ebaede2fe57400 (patch)
treef6ad6ff810a12cb03aee8a5c70e76afd7c63e93b
parent6093c190f23c24fbe55eae0fd233d14e6dfd1643 (diff)
downloadsparse-dev-ad4dd337f42303a11b478afe29ebaede2fe57400.tar.gz
Add a generic internal pointer type (void *)
-rw-r--r--symbol.c4
-rw-r--r--symbol.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/symbol.c b/symbol.c
index 42454de7..079edfc4 100644
--- a/symbol.c
+++ b/symbol.c
@@ -268,7 +268,7 @@ struct symbol bool_ctype, void_ctype,
long_ctype, ulong_ctype,
llong_ctype, ullong_ctype,
float_ctype, double_ctype, ldouble_ctype,
- string_ctype;
+ string_ctype, ptr_ctype;
struct ctype_declare {
struct symbol *ptr;
@@ -296,6 +296,7 @@ struct ctype_declare {
{ &ldouble_ctype,MOD_LONG | MOD_LONGLONG, BITS_IN_LONGDOUBLE,MAX_FP_ALIGNMENT, &fp_type },
{ &string_ctype, 0, BITS_IN_POINTER, POINTER_ALIGNMENT, &char_ctype },
+ { &ptr_ctype, 0, BITS_IN_POINTER, POINTER_ALIGNMENT, &void_ctype },
{ NULL, }
};
@@ -353,6 +354,7 @@ void init_symbols(void)
sym->ctype.modifiers = ptr->modifiers;
}
+ ptr_ctype.type = SYM_PTR;
string_ctype.type = SYM_PTR;
for (ctype = ctype_declaration ; ctype->ptr; ctype++) {
struct symbol *sym = ctype->ptr;
diff --git a/symbol.h b/symbol.h
index d8cf70c1..b854adeb 100644
--- a/symbol.h
+++ b/symbol.h
@@ -121,7 +121,7 @@ extern struct symbol bool_ctype, void_ctype,
long_ctype, ulong_ctype,
llong_ctype, ullong_ctype,
float_ctype, double_ctype, ldouble_ctype,
- string_ctype;
+ string_ctype, ptr_ctype;
/* Basic identifiers */