public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50488] New: Destructor problem in struct
@ 2011-09-22 17:58 inexinferis at hotmail dot com
  2011-09-22 18:00 ` [Bug c++/50488] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: inexinferis at hotmail dot com @ 2011-09-22 17:58 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-22 18:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 17:58 [Bug c++/50488] New: Destructor problem in struct inexinferis at hotmail dot com
2011-09-22 18:00 ` [Bug c++/50488] " redi at gcc dot gnu.org
2011-09-22 18:12 ` pinskia at gcc dot gnu.org
2011-09-22 18:19 ` inexinferis at hotmail dot com
2011-09-22 19:02 ` redi at gcc dot gnu.org
2011-09-22 19:17 ` inexinferis at hotmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).