decl2.c (determine_visibility): Ensure that functions with hidden types as parameters are hidden.
* decl2.c (determine_visibility): Ensure that functions with hidden types as parameters are hidden. From-SVN: r125722
This commit is contained in:
parent
7dbd86a541
commit
c96f00012b
@ -1,5 +1,8 @@
|
||||
2007-06-14 Geoff Keating <geoffk@apple.com>
|
||||
|
||||
* decl2.c (determine_visibility): Ensure that functions with
|
||||
hidden types as parameters are hidden.
|
||||
|
||||
PR 31093
|
||||
* decl2.c (determine_visibility): Remove duplicate code for
|
||||
handling type info.
|
||||
|
@ -1783,7 +1783,8 @@ determine_visibility (tree decl)
|
||||
{
|
||||
/* Propagate anonymity from type to decl. */
|
||||
int tvis = type_visibility (TREE_TYPE (decl));
|
||||
if (tvis == VISIBILITY_ANON)
|
||||
if (tvis == VISIBILITY_ANON
|
||||
|| ! DECL_VISIBILITY_SPECIFIED (decl))
|
||||
constrain_visibility (decl, tvis);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
2007-06-14 Geoff Keating <geoffk@apple.com>
|
||||
|
||||
* g++.dg/ext/visibility/overload-1.C: New.
|
||||
|
||||
PR 31093
|
||||
* g++.dg/ext/visibility/anon4.C: New.
|
||||
|
||||
|
9
gcc/testsuite/g++.dg/ext/visibility/overload-1.C
Normal file
9
gcc/testsuite/g++.dg/ext/visibility/overload-1.C
Normal file
@ -0,0 +1,9 @@
|
||||
/* Test that visibility of function parameters propagates to an undecorated
|
||||
function. */
|
||||
/* { dg-require-visibility "" }
|
||||
/* { dg-final { scan-hidden "_Z3fooP8a_struct" } } */
|
||||
|
||||
struct __attribute__((visibility("hidden"))) a_struct;
|
||||
|
||||
void foo(a_struct * p)
|
||||
{ }
|
Loading…
Reference in New Issue
Block a user