X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fcp%2Finit.c;h=1a8196129845522745b47e7d6d81d886af3e0b27;hp=4ad5e62c4acdda75b6707747ea3882897ae23746;hb=4cbba981b3d1de4043ae5570ed552382a24a939f;hpb=b1456e51715b5bfdacb320c844f77980f3af9195 diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 4ad5e62c4ac..1a819612984 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; }