diff options
author | Neil Booth <neilb@earthling.net> | 2000-05-17 19:06:20 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-05-17 19:06:20 +0000 |
commit | 79f50f2abde174891bd80390909c410c2296fa10 (patch) | |
tree | 19a841348f2b1c10ffe943bd9262cc579de84578 /gcc/cpplex.c | |
parent | ff9f1a5d55bfaec0d7267b5f50bf0048436a119d (diff) | |
download | gcc-79f50f2abde174891bd80390909c410c2296fa10.zip gcc-79f50f2abde174891bd80390909c410c2296fa10.tar.gz gcc-79f50f2abde174891bd80390909c410c2296fa10.tar.bz2 |
cpplex.c (expand_name_space): Don't use ptrdiff_t.
2000-05-17 Neil Booth <neilb@earthling.net>
* cpplex.c (expand_name_space): Don't use ptrdiff_t.
From-SVN: r33964
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 03b3c35..2549d22 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -526,21 +526,19 @@ expand_name_space (list, len) unsigned int len; { const U_CHAR *old_namebuf; - ptrdiff_t delta; old_namebuf = list->namebuf; list->name_cap += len; list->namebuf = (unsigned char *) xrealloc (list->namebuf, list->name_cap); /* Fix up token text pointers. */ - delta = list->namebuf - old_namebuf; - if (delta) + if (list->namebuf != old_namebuf) { unsigned int i; for (i = 0; i < list->tokens_used; i++) if (token_spellings[list->tokens[i].type].type > SPELL_NONE) - list->tokens[i].val.name.text += delta; + list->tokens[i].val.name.text += (list->namebuf - old_namebuf); } } |