token->type = CPP_KEYWORD;
/* Record which keyword. */
token->keyword = C_RID_CODE (token->u.value);
- /* Update the value. Some keywords are mapped to particular
- entities, rather than simply having the value of the
- corresponding IDENTIFIER_NODE. For example, `__const' is
- mapped to `const'. */
- token->u.value = ridpointers[token->keyword];
}
else
{
/* Save away the identifier that indicates which attribute
this is. */
- identifier = token->u.value;
+ identifier = (token->type == CPP_KEYWORD)
+ /* For keywords, use the canonical spelling, not the
+ parsed identifier. */
+ ? ridpointers[(int) token->keyword]
+ : token->u.value;
+
attribute = build_tree_list (identifier, NULL_TREE);
/* Peek at the next token. */