On Thu, Mar 21, 2013 at 11:25 PM, Miles Bader <mi...@gnu.org> wrote: > > Gabriel Dos Reis <g...@axiomatics.org> writes: > > in the C++ front-end. identifier_p is effectively LANG_IDENTIFIER_CAST > > except that it returns a typed pointer instead of a boolean value. > > What's the point of returning a pointer when the name (and apparently, > use, judging from the patch) suggest a boolean...?
consider it to be a generalized boolean, nothing out of ordinary. In many places, we do thinks like: 1. test that we have a identifier. 2. immediately follow that with access to parts of the tree as identifiers, but check again that we really an identifier, etc. Something best written as if (lang_identifier *id = identifier_p (t)) access members of id with no more check please. There is nothing silly about that. -- Gaby