On 3/21/19 4:13 PM, Jakub Jelinek wrote:
On Thu, Mar 21, 2019 at 03:59:55PM -0600, Martin Sebor wrote:
1) either an identifier naming a function or variable, or
2) some other expression like a member reference via . or ->,
    an array subscript, or the indirection expression *.

But GCC distinguishes three kinds of arguments:

1) a DECL,
2) some sort of a reference like ARRAY_REF, COMPONENT_REF or
    INDIRECT_REF
3) an expression that satisfies the EXPR_P() predicate (e.g.,
    (struct S*)0, or (struct S){ 1 })

Jeff, you seem to want the built-in to accept just (1) on the GCC
list above and reject (3) (and seem to be waffling on (2)).

How would such an argument be described in a way that users
unfamiliar with GCC internals could easily understand?

Say that the argument is either a type or an expression that is
either an identifier (for C++ id-expression) to cover 1) and
a postfix expression with . or -> operator (to cover COMPONENT_REF)?

That doesn't look easy to understand.

We do not want to allow INDIRECT_REF, ARRAY_REF, etc.

Why not?  What exactly is the concern?

Martin

Reply via email to