This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26984] [4.2 Regression] link error with &(typeid(int)) in anonymous namespace
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Apr 2006 08:48:57 -0000
- Subject: [Bug c++/26984] [4.2 Regression] link error with &(typeid(int)) in anonymous namespace
- References: <bug-26984-8486@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-02 08:48 -------
Confirmed, this is a latent bug though. Reduced testcase which shows the bug
even in 4.0.x:
#include <typeinfo>
void g(const std::type_info&);
#pragma GCC visibility push(hidden)
const std::type_info* t = &(typeid(int));
#pragma GCC visibility pop
template <class T>
struct C
{
virtual void foo() const {
g(typeid(int));
}
};
C<void> c;
-----------
And since the anonymous namespace change was introduced for 4.2.0, it makes it
harder to produce correct code now.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC build triplet|i686-pc-linux-gnu |
GCC host triplet|i686-pc-linux-gnu |
GCC target triplet|i686-pc-linux-gnu |
Last reconfirmed|0000-00-00 00:00:00 |2006-04-02 08:48:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26984