libstdc++/4993: dynamic_cast incorrectly returns 0

nathan@gcc.gnu.org nathan@gcc.gnu.org
Fri Dec 7 13:50:00 GMT 2001


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



More information about the Gcc-prs mailing list