This is the mail archive of the gcc@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]

Is this a bug for gcc (2.95 and 3.1)?


HI,All:
There are two problem about g++.
OS:
CYGWIN_NT-5.0 MAGGIE 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown
1:
this program can not pass compilation by gcc2.95 and gcc3.1

//code strat
#include <stdio.h>
class A
{
public:
  virtual ~A()=0
        {
        };
};
class B:public A
{
};

int main()
{
B b;
return 1;
};
//code ends 

2:This program will cause gcc3.1 link error ,but passed by gcc2.95
//code begin
#include <stdio.h>
class A
{
public:
  virtual ~A()=0;
//      {
//      };
};
A::~A()
{
}
class B:public A
{
};

int main()
{
B b;
return 1;
};
//code ends

Why?

Regards
    Maggie

_________________________________________________________________
 MSN Explorerhttp://explorer.msn.com/lccn/intl.asp


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