| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <427FFF84.9000803@ateb.com> |
| Date: | Mon, 09 May 2005 20:25:40 -0400 |
| From: | Reid Thompson <reid DOT thompson AT ateb DOT com> |
| User-Agent: | Mozilla Thunderbird 1.0.2 (Windows/20050317) |
| MIME-Version: | 1.0 |
| To: | "William M. (Mike) Miller" <william DOT m DOT miller AT gmail DOT com> |
| Cc: | cygwin AT cygwin DOT com |
| Subject: | Re: Static destructors not running |
| References: | <48781a66050509154660edcc78 AT mail DOT gmail DOT com> |
| In-Reply-To: | <48781a66050509154660edcc78@mail.gmail.com> |
| X-OriginalArrivalTime: | 10 May 2005 00:24:35.0882 (UTC) FILETIME=[A51DF8A0:01C554F6] |
| X-IsSubscribed: | yes |
William M. (Mike) Miller wrote:
>I'm sure this is the result of my having done something stupid
>with the setup application, but suddenly static destructors no
>longer run. That is, for the following program:
>
> #include <stdio.h>
> struct S {
> S();
> ~S();
> } s;
> S::S() {
> printf("In ctor.\n");
> }
> S::~S() {
> printf("In dtor.\n");
> }
> int main() {
> printf("In main.\n");
> }
>
>the output is
>
> In ctor.
> In main.
>
>The output "In dtor." is missing.
>
>I have tried to update all the gcc compilers and mingw libraries to
>the latest versions that the setup application allows me, on the
>assumption that somehow I managed to get an old version of a
>library during my last update, but nothing I have done restores the
>static destructor output. From cygcheck, here are the versions of
>things I think might matter:
>
> gcc 3.4.1-1
> gcc-ada 3.4.1-1
> gcc-core 3.4.1-1
> gcc-g++ 3.4.1-1
> gcc-g77 3.4.1-1
> gcc-java 3.4.1-1
> gcc-mingw 20040810-1
> gcc-mingw-ada 20040822-1
> gcc-mingw-core 20040822-1
> gcc-mingw-g++ 20040822-1
> gcc-mingw-g77 20040822-1
> gcc-mingw-java 20040822-1
> mingw-runtime 3.7-1
>
>Anyone have any idea how I managed to do this to myself and,
>more importantly, how I can undo it?
>
>Thanks!
>
>
>
sorry ---
#include <stdio.h>
struct S
{
S();
~S();
} ;
S::S()
{
printf("In ctor.\n");
}
S::~S()
{
printf("In dtor.\n");
}
int
main()
{
struct S t;
printf("In main.\n");
t;
return (0);
}
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |