diff options
Diffstat (limited to 'gcc/cp/init.c')
| -rw-r--r-- | gcc/cp/init.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 4ad5e62..1a81961 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1570,17 +1570,17 @@ build_offset_ref (tree type, tree name, bool address_p) tree integral_constant_value (tree decl) { - if ((TREE_CODE (decl) == CONST_DECL - || (TREE_CODE (decl) == VAR_DECL - /* And so are variables with a 'const' type -- unless they - are also 'volatile'. */ - && CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (decl)) - && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl))) - && DECL_INITIAL (decl) - && DECL_INITIAL (decl) != error_mark_node - && TREE_TYPE (DECL_INITIAL (decl)) - && INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (decl))) - return DECL_INITIAL (decl); + while ((TREE_CODE (decl) == CONST_DECL + || (TREE_CODE (decl) == VAR_DECL + /* And so are variables with a 'const' type -- unless they + are also 'volatile'. */ + && CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (decl)) + && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl))) + && DECL_INITIAL (decl) + && DECL_INITIAL (decl) != error_mark_node + && TREE_TYPE (DECL_INITIAL (decl)) + && INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (decl))) + decl = DECL_INITIAL (decl); return decl; } |
