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

* [Bug c++/50488] Destructor problem in struct
  2011-09-22 17:58 [Bug c++/50488] New: Destructor problem in struct inexinferis at hotmail dot com
@ 2011-09-22 18:00 ` redi at gcc dot gnu.org
  2011-09-22 18:12 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2011-09-22 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-22 17:52:00 UTC ---
you have two problems, one is that the code won't compile because you're
missing a header, the second is that GCC 3.4.5 is ancient, so although this
does appear to be a bug it will never be fixed in GCC 3.4 (it's already fixed
in current releases)


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

* [Bug c++/50488] Destructor problem in struct
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-09-22 18:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-09-22 18:11:03 UTC ---
Also I think he forgot about copy constructor happening.


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

* [Bug c++/50488] Destructor problem in struct
  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
  4 siblings, 0 replies; 6+ messages in thread
From: inexinferis at hotmail dot com @ 2011-09-22 18:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from karman <inexinferis at hotmail dot com> 2011-09-22 18:12:18 UTC ---
(In reply to comment #1)
> you have two problems, one is that the code won't compile because you're
> missing a header, the second is that GCC 3.4.5 is ancient, so although this
> does appear to be a bug it will never be fixed in GCC 3.4 (it's already fixed
> in current releases)

Yes, the thing is that all my projects are working over GCC 3.4.5 and my
attempts to ports to 4.x was with problems, in conclusion, I have to migrate to
GCC 4.x or there is a chance to fix?

Regards


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

* [Bug c++/50488] Destructor problem in struct
  2011-09-22 17:58 [Bug c++/50488] New: Destructor problem in struct inexinferis at hotmail dot com
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2011-09-22 19:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-22 18:41:41 UTC ---
GCC is open source so you can attempt to fix it yourself or pay someone to do
it for you, but it will never be fixed in the official GCC 3.4 because that
release series is discontinued and unsupported


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

* [Bug c++/50488] Destructor problem in struct
  2011-09-22 17:58 [Bug c++/50488] New: Destructor problem in struct inexinferis at hotmail dot com
                   ` (3 preceding siblings ...)
  2011-09-22 19:02 ` redi at gcc dot gnu.org
@ 2011-09-22 19:17 ` inexinferis at hotmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: inexinferis at hotmail dot com @ 2011-09-22 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from karman <inexinferis at hotmail dot com> 2011-09-22 18:43:30 UTC ---
ha, ok, thanks.


^ 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).