From bd65538abb6a48c97f9fd02d037b41e5a6397a70 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 7 Jan 2020 10:05:25 -0500 Subject: PR c++/47877 - -fvisibility-inlines-hidden and member templates. DECL_VISIBILITY_SPECIFIED is also true if an enclosing scope has explicit visibility, and we don't want that to override -fvisibility-inlines-hidden. So check for the attribute specifically on the function, like we already do for template argument visibility restriction. * decl2.c (determine_visibility): -fvisibility-inlines-hidden beats explicit class visibility for a template. From-SVN: r279960 --- gcc/tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index a6e4e9e..9ca9ab5 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2903,8 +2903,8 @@ extern void decl_value_expr_insert (tree, tree); #define DECL_VISIBILITY(NODE) \ (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility) -/* Nonzero means that the decl had its visibility specified rather than - being inferred. */ +/* Nonzero means that the decl (or an enclosing scope) had its + visibility specified rather than being inferred. */ #define DECL_VISIBILITY_SPECIFIED(NODE) \ (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.visibility_specified) -- cgit v1.1