Fix thinko in _cpp_remaining_tokens_num_in_context
libcpp/ * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of number of tokens. From-SVN: r180239
This commit is contained in:
parent
67af611e2e
commit
cbbcf65511
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-10-20 Dodji Seketeli <dodji@redhat.com>
|
||||||
|
|
||||||
|
PR bootstrap/50801
|
||||||
|
* lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of
|
||||||
|
number of tokens.
|
||||||
|
|
||||||
2011-10-18 Dodji Seketeli <dodji@redhat.com>
|
2011-10-18 Dodji Seketeli <dodji@redhat.com>
|
||||||
|
|
||||||
PR bootstrap/50760
|
PR bootstrap/50760
|
||||||
|
|
|
@ -1710,12 +1710,10 @@ _cpp_remaining_tokens_num_in_context (cpp_reader *pfile)
|
||||||
{
|
{
|
||||||
cpp_context *context = pfile->context;
|
cpp_context *context = pfile->context;
|
||||||
if (context->tokens_kind == TOKENS_KIND_DIRECT)
|
if (context->tokens_kind == TOKENS_KIND_DIRECT)
|
||||||
return ((LAST (context).token - FIRST (context).token)
|
return (LAST (context).token - FIRST (context).token);
|
||||||
/ sizeof (cpp_token));
|
|
||||||
else if (context->tokens_kind == TOKENS_KIND_INDIRECT
|
else if (context->tokens_kind == TOKENS_KIND_INDIRECT
|
||||||
|| context->tokens_kind == TOKENS_KIND_EXTENDED)
|
|| context->tokens_kind == TOKENS_KIND_EXTENDED)
|
||||||
return ((LAST (context).ptoken - FIRST (context).ptoken)
|
return (LAST (context).ptoken - FIRST (context).ptoken);
|
||||||
/ sizeof (cpp_token *));
|
|
||||||
else
|
else
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue