diff options
| author | giovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-08 11:52:41 +0000 |
|---|---|---|
| committer | giovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-08 11:52:41 +0000 |
| commit | ee02b987a650961cf5ca58f2f3038deba4e7a92b (patch) | |
| tree | 3184faaafa8b6c1442dbc638c2b9e93f02163461 | |
| parent | 038251540755c6709b0d431f8903982b2a667883 (diff) | |
| download | ppe42-gcc-ee02b987a650961cf5ca58f2f3038deba4e7a92b.tar.gz ppe42-gcc-ee02b987a650961cf5ca58f2f3038deba4e7a92b.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75546 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/cp/pt.c | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 147ca7dc07e..ef16d19a566 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +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> * parser.c (cp_parser_save_member_function_body): Mark the diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3c0e7d80213..6b099a1d3ab 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11671,6 +11671,9 @@ value_dependent_expression_p (tree expression) } if (TREE_CODE (expression) == SCOPE_REF) 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 value-dependent. */ if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (expression)))) |

