On Fri, Mar 14, 2014 at 5:31 PM, Yunzhong Gao <
[email protected]> wrote:

>
>   I do not know. Are these alternative tokens pretty much set or are we
> expecting to add more in the future?


They're a fixed set, as defined by the C++ standard. It's unlikely that any
more will be added.


> Are
>   they recognized as keywords only under MSVC compat mode?
>

They're not keywords, they're weird ways of spelling things like && and |.
Under MSVC compat mode, we should not recognize them at all (MSVC doesn't
do so in its default mode, and appears to treat them as macros in its
"conforming" mode).


>   I guess we could have another __has_operator_token() test, but I can be
> convinced to rename __has_keyword()
>   to mean any (non-attribute) special tokens.
>

You could instead provide an __is_identifier, which I think might be what
you're really looking for here ("is this token usable as an identifier?").


>   Also, this proposed implementation is not testing those objective-c "at"
> keywords (only a keyword if after an "@"
>   in objc mode). I am not sure if this is a problem.


I don't think that's a problem; that's a distinct namespace from the normal
identifier/keyword/alternative token one.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to