This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] [PR/12573] Handle COMPONENT_REFs invalue_dependent_expression_p (mainline regression)


On Tue, 25 Nov 2003 18:38:34 +0100, "Giovanni Bajo" <giovannibajo@libero.it> wrote:

> BTW, COMPONENT_REF internal documentation says that the second operand of a
> COMPONENT_REF is always a FIELD_DECL, whilst it can be an IDENTIFIER_NODE (or a
> SCOPE_REF too, I think). Do we need a patch for documentation?

Quote:

  This documentation describes the use of these nodes in non-template
  functions (including instantiations of template functions).  In template
  functions, the same nodes are used, but sometimes in slightly different
  ways.

Updating the documentation to also describe usage in templates would be
welcome, but would need to cover more than just COMPONENT_REF.

> +   if (TREE_CODE (expression) == COMPONENT_REF)
> +     return value_dependent_expression_p (TREE_OPERAND (expression, 0)) ||
> +          value_dependent_expression_p (TREE_OPERAND (expression, 1));

This doesn't conform to the GNU formatting standards.  It should be

   if (TREE_CODE (expression) == COMPONENT_REF)
     return (value_dependent_expression_p (TREE_OPERAND (expression, 0))
             || value_dependent_expression_p (TREE_OPERAND (expression, 1)));

OK with that change.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]