[Bug c++/50488] New: Destructor problem in struct

inexinferis at hotmail dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 22 17:58:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50488

             Bug #: 50488
           Summary: Destructor problem in struct
    Classification: Unclassified
           Product: gcc
           Version: 3.4.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: inexinferis@hotmail.com


Hi I have this problem and I'm not sure if it's a bug but I guess you can help
me...

class x{
  public:
  x(){printf("cok %p\n",this);}
  ~x(){printf("dok %p\n",this);}
};

static struct _a{
  int a;
  x b;
}a[]={
  {1}
};

int main(void){
  x a;
  return 0;
}

the result:

cok 0022FF14
cok 0022FF40
dok 0022FF40
dok 0040800C //<-- what???

Regards



More information about the Gcc-bugs mailing list