This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/26984] [4.2 Regression] link error with &(typeid(int)) in anonymous namespace



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]