[LLVMbugs] [Bug 6685] New: clang emits undefined symbol for type info while gcc emits a weak one

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 23 11:04:47 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6685

           Summary: clang emits undefined symbol for type info while gcc
                    emits a weak one
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rdivacky at freebsd.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


pes delta$ cat tinfo2.cc
extern          "C++" {
        namespace       std {
                class           type_info {
                        public:virtual ~ type_info();
                        bool            operator == (const type_info &
__arg)const {
                                return __name == __arg.__name;
                        }
                        virtual bool    __is_function_p() const;
                                        protected:const char *__name;
                };
        }
}
namespace       __cxxabiv1 {
        class           __fundamental_type_info:public std::type_info {
                virtual ~ __fundamental_type_info();
        };
        class           __pbase_type_info:public std::type_info {
                public:unsigned int __flags;
                const           std::   type_info * __pointee;
        };
        class           __pointer_type_info:public __pbase_type_info {
                virtual bool    __pointer_catch(const __pbase_type_info *
__thr_type, void **__thr_obj, unsigned __outer)const;
        };
                        __fundamental_type_info::~__fundamental_type_info() {
        }
        bool            __pointer_type_info::__pointer_catch(const
__pbase_type_info * thrown_type, void **thr_obj, unsigned outer)const {
                if (outer < 2 && *__pointee == typeid(void)) {
                        return !thrown_type->__pointee->__is_function_p();
                }
        }
}

pes delta$ g++ -c tinfo2.cc && nm tinfo2.o | grep _ZTIv
0000000000000000 V _ZTIv
pes delta$ clang++ -c tinfo2.cc && nm tinfo2.o | grep _ZTIv
tinfo2.cc:30:2: warning: control may reach end of non-void function
[-Wreturn-type]
        }
        ^
1 diagnostic generated.
                 U _ZTIv

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list