diff options
Diffstat (limited to 'libcpp')
| -rw-r--r-- | libcpp/ChangeLog | 6 | ||||
| -rw-r--r-- | libcpp/lex.c | 6 | 
2 files changed, 11 insertions, 1 deletions
| diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 317d1bd..71a0949 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,9 @@ +2019-05-19  Andrew Pinski  <apinski@marvell.com> + +	PR pch/81721 +	* lex.c (cpp_token_val_index <case SPELL_OPERATOR>): If tok->flags +	has NAMED_OP set, then return CPP_TOKEN_FLD_NODE. +  2019-05-14  Martin Liska  <mliska@suse.cz>  	PR preprocessor/90382 diff --git a/libcpp/lex.c b/libcpp/lex.c index eedfcbb..16ded6e 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -3756,7 +3756,11 @@ cpp_token_val_index (const cpp_token *tok)      case SPELL_LITERAL:        return CPP_TOKEN_FLD_STR;      case SPELL_OPERATOR: -      if (tok->type == CPP_PASTE) +      /* Operands which were originally spelled as ident keep around +         the node for the exact spelling.  */ +      if (tok->flags & NAMED_OP) +	return CPP_TOKEN_FLD_NODE; +      else if (tok->type == CPP_PASTE)  	return CPP_TOKEN_FLD_TOKEN_NO;        else  	return CPP_TOKEN_FLD_NONE; | 
