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://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
To: | cygwin AT cygwin DOT com |
X-Injected-Via-Gmane: | http://gmane.org/ |
Path: | not-for-mail |
From: | "Dylan Cuthbert" <dylan AT q-games DOT com> |
Newsgroups: | gmane.os.cygwin |
Subject: | Re: g++ global constructor bug? |
Date: | Sat, 6 Jul 2002 12:44:30 +0900 |
Lines: | 52 |
Message-ID: | <ag5oud$2a3$1@main.gmane.org> |
References: | <200207052009 DOT g65K9Fr00451 AT new-york DOT lcs DOT mit DOT edu> <20020705203014 DOT GA18639 AT redhat DOT com> |
NNTP-Posting-Host: | pppa201.kyoto-ip.dti.ne.jp |
Mime-Version: | 1.0 |
X-Trace: | main.gmane.org 1025926926 2371 210.159.246.201 (6 Jul 2002 03:42:06 GMT) |
X-Complaints-To: | usenet AT main DOT gmane DOT org |
NNTP-Posting-Date: | Sat, 6 Jul 2002 03:42:06 +0000 (UTC) |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
I've noticed this too. Using cygwin, the stdio and cout handles are set up a while after the user's global constructors. Is this behaviour changeable or is the order of global construction totally random? Accessing std::cout from some constructors will cause a segfault rather than simply not working too. Regards -- --------------------------------- Q-Games, Dylan Cuthbert. http://www.q-games.com "Christopher Faylor" <cygwin AT cygwin DOT com> wrote in message news:20020705203014 DOT GA18639 AT redhat DOT com... > On Fri, Jul 05, 2002 at 04:09:15PM -0400, Douglas S. J. De Couto wrote: > >the following program doesn't work right with cygwin, it seems the > >global object sh constructor is not being called. > > If I had to guess I'd say that the constructor is kicked off before > stdio is completely set up. > > cgf > > >-------------------- > > > >#include <stdio.h> > > > >struct foobar { > > foobar(int i) { printf ("foobar(%d)\n", i); } > >}; > > > >foobar sh(1); > > > >int > >main(int argc, char **argv) { > > foobar s(2); > >} > -- > Please do not send me personal email with cygwin questions. > Use the resources at http://cygwin.com/ . > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |