Commit 3d5ddced by Giovanni Bajo

re PR c++/12573 (ICE (segfault) with Boost.Python)

	PR c++/12573
	* pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
	looking into them recursively. They can be there because of the
	new __offsetof__ extension.

From-SVN: r75546
parent bafa7fed
2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/12573
* pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
looking into them recursively. They can be there because of the
new __offsetof__ extension.
2004-01-07 Zack Weinberg <zack@codesourcery.com> 2004-01-07 Zack Weinberg <zack@codesourcery.com>
* parser.c (cp_parser_save_member_function_body): Mark the * parser.c (cp_parser_save_member_function_body): Mark the
......
...@@ -11671,6 +11671,9 @@ value_dependent_expression_p (tree expression) ...@@ -11671,6 +11671,9 @@ value_dependent_expression_p (tree expression)
} }
if (TREE_CODE (expression) == SCOPE_REF) if (TREE_CODE (expression) == SCOPE_REF)
return dependent_scope_ref_p (expression, value_dependent_expression_p); return dependent_scope_ref_p (expression, value_dependent_expression_p);
if (TREE_CODE (expression) == COMPONENT_REF)
return (value_dependent_expression_p (TREE_OPERAND (expression, 0))
|| value_dependent_expression_p (TREE_OPERAND (expression, 1)));
/* A constant expression is value-dependent if any subexpression is /* A constant expression is value-dependent if any subexpression is
value-dependent. */ value-dependent. */
if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (expression)))) if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (expression))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment