]> git.pld-linux.org Git - packages/gcc.git/blame - gcc-pr19664.patch
- fix target bug on ppc (and kernel build too).
[packages/gcc.git] / gcc-pr19664.patch
CommitLineData
82bf6381
PS
1From: "H dot J dot Lu" <hjl at lucon dot org>
2Subject: PATCH: PR 19664: Don't change visibility if set by user
3
4This patch may fix visibility push(default)/pop. When visibility
5has been set by user, we shouldn't change it.
6
7
82005-02-03 H.J. Lu <hongjiu.lu@intel.com>
9
10 PR C++/19664
11 * decl2.c (determine_visibility): Don't set visibility to
12 hidden if it has been set explicitly by user.
13
14--- gcc-4.0.0/gcc/cp/decl2.c.orig 2005-04-05 17:38:09.000000000 +0200
15+++ gcc-4.0.0/gcc/cp/decl2.c 2005-05-05 00:41:14.000000000 +0200
16@@ -1636,8 +1636,12 @@
17 && DECL_DECLARED_INLINE_P (decl)
18 && visibility_options.inlines_hidden)
19 {
20- DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
21- DECL_VISIBILITY_SPECIFIED (decl) = 1;
22+ /* Don't change it if it has been set explicitly by user. */
23+ if (!DECL_VISIBILITY_SPECIFIED (decl))
24+ {
25+ DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
26+ DECL_VISIBILITY_SPECIFIED (decl) = 1;
27+ }
28 }
29 else if (CLASSTYPE_VISIBILITY_SPECIFIED (class_type))
30 {
This page took 0.031161 seconds and 4 git commands to generate.