<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: compiler has some problems with unsat virtual functions in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/compiler-have-some-problems-with-virtual-functions/m-p/3874721#M98823</link>
    <description>&lt;P&gt;Why do you think your small example matches your application?&lt;BR /&gt;&lt;BR /&gt;Your small example is illegal. The C++ Standard says 10.3(8), that if you declare a virtual function you must define it.&lt;BR /&gt;&lt;BR /&gt;Therefore you must not use .h files where you never define virtual functions. You must define Foo::~Foo() &amp;amp; Foo::clear().&lt;BR /&gt;&lt;BR /&gt;aCC6 has been enhanced to realize nothing is needed. aCC3 is stuck in a chicken and egg loop.&lt;/P&gt;</description>
    <pubDate>Sat, 29 Oct 2011 08:38:15 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2011-10-29T08:38:15Z</dc:date>
    <item>
      <title>compiler have some problems with virtual functions</title>
      <link>https://community.hpe.com/t5/operating-system-linux/compiler-have-some-problems-with-virtual-functions/m-p/3874720#M98822</link>
      <description>Hi,&lt;BR /&gt;I am having big problems getting the final binary to link...&lt;BR /&gt;it seems to me that it is the compiler have some problems with virtual functions. If you look at the following small example to trigger the problem:&lt;BR /&gt;# /opt/aCC/bin/aCC -V&lt;BR /&gt;aCC: HP ANSI C++ B3910B A.03.55&lt;BR /&gt;#cat test.cc&lt;BR /&gt;class Foo&lt;BR /&gt;{&lt;BR /&gt;public:&lt;BR /&gt;  virtual ~Foo();&lt;BR /&gt;  Foo() {};&lt;BR /&gt;  virtual void clear();&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;class Bar : public Foo&lt;BR /&gt;{&lt;BR /&gt;public:&lt;BR /&gt;  virtual ~Bar() {};&lt;BR /&gt;  Bar() : Foo() {};&lt;BR /&gt; &lt;BR /&gt;  virtual void clear() {&lt;BR /&gt;     Foo::clear();&lt;BR /&gt;  };&lt;BR /&gt;};&lt;BR /&gt;# aCC -c test.cc&lt;BR /&gt;# nm -u test.o &lt;BR /&gt;&lt;BR /&gt;Undefined symbols from test.o:&lt;BR /&gt;&lt;BR /&gt;   typeid&lt;FOO&gt;&lt;BR /&gt;   Foo::~Foo()&lt;BR /&gt;   Foo::clear()&lt;BR /&gt;   Class tables [Vtable] dependent on key function: "__versioned_type_info::~__versioned_type_info()"&lt;BR /&gt;&lt;BR /&gt;But if we compare this with other compilers we get:&lt;BR /&gt;# /opt/hp-gcc/bin/g++ -c test.cc&lt;BR /&gt;[tn202803@lit01:api] nm -u test.o&lt;BR /&gt;nm:  test.o:  no symbols &lt;BR /&gt;&lt;BR /&gt;Please guide me through the issue.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;Varun&lt;/FOO&gt;</description>
      <pubDate>Wed, 04 Oct 2006 23:49:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/compiler-have-some-problems-with-virtual-functions/m-p/3874720#M98822</guid>
      <dc:creator>Varun_5</dc:creator>
      <dc:date>2006-10-04T23:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: compiler has some problems with unsat virtual functions</title>
      <link>https://community.hpe.com/t5/operating-system-linux/compiler-have-some-problems-with-virtual-functions/m-p/3874721#M98823</link>
      <description>&lt;P&gt;Why do you think your small example matches your application?&lt;BR /&gt;&lt;BR /&gt;Your small example is illegal. The C++ Standard says 10.3(8), that if you declare a virtual function you must define it.&lt;BR /&gt;&lt;BR /&gt;Therefore you must not use .h files where you never define virtual functions. You must define Foo::~Foo() &amp;amp; Foo::clear().&lt;BR /&gt;&lt;BR /&gt;aCC6 has been enhanced to realize nothing is needed. aCC3 is stuck in a chicken and egg loop.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Oct 2011 08:38:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/compiler-have-some-problems-with-virtual-functions/m-p/3874721#M98823</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-10-29T08:38:15Z</dc:date>
    </item>
  </channel>
</rss>

