Message ID | AANLkTikvmwa_O3zD3DWW+u7WbB36HemyxSbaTuoTubcR@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 01/08/2011 10:19 AM, Kai Tietz wrote: > if (underlying_vis == VISIBILITY_ANON > - || CLASSTYPE_VISIBILITY_SPECIFIED (underlying_type)) > + || (TYPE_NAME (underlying_type) > + && CLASSTYPE_VISIBILITY_SPECIFIED (underlying_type))) > constrain_visibility (decl, underlying_vis); This should check CLASS_TYPE_P rather than TYPE_NAME. And looking at this I realize that CLASSTYPE_VISIBILITY/_SPECIFIED should use TYPE_MAIN_DECL rather than TYPE_NAME. Jason
Index: decl2.c =================================================================== --- decl2.c (revision 168596) +++ decl2.c (working copy) @@ -2073,7 +2073,8 @@ tree underlying_type = TREE_TYPE (DECL_NAME (decl)); int underlying_vis = type_visibility (underlying_type); if (underlying_vis == VISIBILITY_ANON - || CLASSTYPE_VISIBILITY_SPECIFIED (underlying_type)) + || (TYPE_NAME (underlying_type) + && CLASSTYPE_VISIBILITY_SPECIFIED (underlying_type))) constrain_visibility (decl, underlying_vis); else DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;