Dodji Seketeli wrote:
> cpp_context *context = pfile->context;
> if (context->tokens_kind == TOKENS_KIND_DIRECT)
> - return ((LAST (context).token - FIRST (context).token)
> - / sizeof (cpp_token));
> + return (LAST (context).token - FIRST (context).token);
> else if (context->tokens_kind == TOKENS_KIND_INDIRECT
> || context->tokens_kind == TOKENS_KIND_EXTENDED)
> return ((LAST (context).ptoken - FIRST (context).ptoken)
B.t.w. isn't the same thinko also present in the "else if" path:
else if (context->tokens_kind == TOKENS_KIND_INDIRECT
|| context->tokens_kind == TOKENS_KIND_EXTENDED)
return ((LAST (context).ptoken - FIRST (context).ptoken)
/ sizeof (cpp_token *));
"ptoken" seems to be of type "const cpp_token **", so the pointer
subtraction already divides by sizeof (cpp_token *).
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
[email protected]