diff options
author | Geoffrey Keating <geoffk@apple.com> | 2007-06-14 20:56:25 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2007-06-14 20:56:25 +0000 |
commit | 7dbd86a54129ec1d59bb967256b368facfea29cd (patch) | |
tree | cbdecdf0bd85d53c7362399e887f7bd596322653 | |
parent | 4962b6794346846231f86815740f5f0ba9d18ba3 (diff) | |
download | gcc-7dbd86a54129ec1d59bb967256b368facfea29cd.zip gcc-7dbd86a54129ec1d59bb967256b368facfea29cd.tar.gz gcc-7dbd86a54129ec1d59bb967256b368facfea29cd.tar.bz2 |
re PR libgcj/31093 (Multicast PromiscuousTraffic)
PR 31093
* decl2.c (determine_visibility): Remove duplicate code for
handling type info.
From-SVN: r125721
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/visibility/anon4.C | 16 |
4 files changed, 27 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f9ca050..3946630 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2007-06-14 Geoff Keating <geoffk@apple.com> + + PR 31093 + * decl2.c (determine_visibility): Remove duplicate code for + handling type info. + 2007-06-12 Ian Lance Taylor <iant@google.com> PR libstdc++/29286 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 3e18c4a..4d46410 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1698,10 +1698,6 @@ determine_visibility (tree decl) class can influence the visibility of the DECL. */ if (DECL_CLASS_SCOPE_P (decl)) class_type = DECL_CONTEXT (decl); - else if (TREE_CODE (decl) == VAR_DECL - && DECL_TINFO_P (decl) - && CLASS_TYPE_P (TREE_TYPE (DECL_NAME (decl)))) - class_type = TREE_TYPE (DECL_NAME (decl)); else { /* Not a class member. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fdd9582..4d7a16a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-06-14 Geoff Keating <geoffk@apple.com> + + PR 31093 + * g++.dg/ext/visibility/anon4.C: New. + 2007-06-14 Uros Bizjak <ubizjak@gmail.com> PR target/32268 diff --git a/gcc/testsuite/g++.dg/ext/visibility/anon4.C b/gcc/testsuite/g++.dg/ext/visibility/anon4.C new file mode 100644 index 0000000..6d5d58e --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/visibility/anon4.C @@ -0,0 +1,16 @@ +// PR c++/31903 +// Test for anonymous namespace internal linkage, for typeinfo + +// { dg-do compile } +// { dg-final { scan-assembler-not "globl.*_ZTIN*3fooE" } } + +#include <typeinfo> +namespace +{ + class foo + { + virtual void bar(); + }; +} + +const std::type_info &X = typeid(foo); |