]> git.pld-linux.org Git - packages/gcc.git/blob - gcc-pr19664.patch
- pr22493 patch updated, release 0.3.
[packages/gcc.git] / gcc-pr19664.patch
1 From: "H dot  J dot  Lu" <hjl at lucon dot org>
2 Subject: PATCH: PR 19664: Don't change visibility if set by user
3
4 This patch may fix visibility push(default)/pop. When visibility
5 has been set by user, we shouldn't change it.
6
7
8 2005-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.062612 seconds and 3 git commands to generate.