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]

c++/1592: unable to complie code which used simple virtual functions.



>Number:         1592
>Category:       c++
>Synopsis:       unable to complie code which used simple virtual functions.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 09 02:56:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Syam Pannala
>Release:        gcc version 2.96 20000731 (Red Hat Linux 7.0)
>Organization:
>Environment:
/usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
>Description:
g++ <file.c> fails on this file which uses a simple
virtual function call.  It fails and give errors like
/tmp/cc7KdJxv.o: In function `B::B(int)':
/tmp/cc7KdJxv.o(.B::gnu.linkonce.t.(int)+0x10): undefined reference to `A::A(void)'
>How-To-Repeat:
save the attachment to a.c
g++ a.c (does not produce a.out)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
 
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug.c"

I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgQQp7CiAgICBwdWJsaWM6CiAgICBpbnQgYTsKICAg
IEEoaW50IGIpeyBhID0gYjt9CiAgICBBKCl7YSA9IDA7fQogICAgdmlydHVhbCBpbnQgZ2V0X2Eo
KTsKfTsKCmNsYXNzIEIgOiBwdWJsaWMgQQp7CiAgICBwdWJsaWM6CiAgICBCKGludCBiKXsgYSA9
IGI7fQogICAgaW50IGdldF9hKCl7IHJldHVybiAoYSsxKTsgfQp9OwoKY2xhc3MgQyA6IHB1Ymxp
YyBBCnsKICAgIHB1YmxpYzoKICAgIEMoaW50IGIpeyBhID0gYjt9CiAgICBpbnQgZ2V0X2EoKXsg
cmV0dXJuIChhKzIpOyB9Cn07CgppbnQgZ2V0X2Ffb3V0KEEgJmluc3QpCnsKICAgIHJldHVybiBp
bnN0LmdldF9hKCk7Cn0KCm1haW4oKQp7CiAgICBCIGIxKDIpOwogICAgQyBjMSgyKTsKCiAgICBj
b3V0IDw8IGdldF9hX291dChiMSkgPDwgZW5kbDsKICAgIGNvdXQgPDwgZ2V0X2Ffb3V0KGMxKSA8
PCBlbmRsOwp9Cgo=

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