From 79f50f2abde174891bd80390909c410c2296fa10 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Wed, 17 May 2000 19:06:20 +0000 Subject: [PATCH] cpplex.c (expand_name_space): Don't use ptrdiff_t. 2000-05-17 Neil Booth * cpplex.c (expand_name_space): Don't use ptrdiff_t. From-SVN: r33964 --- gcc/ChangeLog | 4 ++++ gcc/cpplex.c | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8d1c0acdf52..a82a24bc4d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2000-05-17 Neil Booth + + * cpplex.c (expand_name_space): Don't use ptrdiff_t. + 2000-05-17 Zack Weinberg * cpplib.c: New feature, #pragma system_header. diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 03b3c35de4b..2549d227cdd 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); } } -- 2.30.2