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]

Re: libstdc++/4993: dynamic_cast incorrectly returns 0


Synopsis: dynamic_cast incorrectly returns 0

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Fri Dec  7 13:50:04 2001
State-Changed-Why:
    User error.  Not only must you specify RTDL_GLOBAL when
    loading the dso, you must export symbols from the main
    program. Do this by giving the -E (--export-dynamic)
    flag to the linker.  (Remember to say -Wl,-E, as
    otherwise you'll get confused like I did for 30 seconds
    until you realise a naked -E means something else).
    
    Refer the ld's man page for the meaning of -E.  I will
    prepare a FAQ patch describing this.  I've also
    attached a sample program (taken from your bug report)
    which now prints the expected result.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4993&database=gcc


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