listhelper-moderate
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help-gplusplus post from address@hidden requires approval


From: help-gplusplus-owner
Subject: help-gplusplus post from address@hidden requires approval
Date: Thu, 12 Jul 2007 09:40:24 -0400

As list administrator, your authorization is requested for the
following mailing list posting:

    List:    address@hidden
    From:    address@hidden
    Subject: Re: non-local static object initialization problems
    Reason:  Post by non-member to a members-only list

At your convenience, visit:

    http://lists.gnu.org/mailman/admindb/help-gplusplus
        
to approve or deny the request.
--- Begin Message --- Subject: Re: non-local static object initialization problems Date: Thu, 12 Jul 2007 12:47:23 -0000 User-agent: G2/1.0
Hello,

Thank you for your valuable reply. I got the following link from an
other group comp.lang.c++ (many thanks go to user "red floyd")

http://www.parashift.com/c++-faq-lite/ctors.html

My problem is discussed under 10.12-10.16, togehter with its solution.
According to 10.15

"Note that the ANSI/ISO C++ committee is working on this problem, but
compilers aren't yet generally available that handle these change"

I have tried g++ 4.1 but i got segmentation fault due to the
uninitilaized pointer.

Thanks,

Ali


Bernd Strieder írta:
> Ali wrote:
>
> > My problem is quite similar to Item 10 of Effective C++ (Scott
> > Meyers):
> >
> >
> http://www.awprofessional.com/content/downloads/meyerscddemo/DEMO/EC/EI10_FR.HTM
> >
> > I have Airplane objects declared in a namespace myNamespace in a file
> > main.cpp, the memPool is initialized correctly. Everything works fine
> > on Win32 platform with MinGW GCC 3.4.4, Borland C++ Builder 6, Visual
> > Studio 2003 and Visual Studio 2005.
> >
> > On Linux with GCC 3.3.5 and Intel C++ Compiler 8.1 i get segmentation
> > fault, i could debug the reason: memPool is not yet initialized when
> > the constructor is called for the Airplane objects in myNamespace.
> >
> > Could anyone explain why?
>
>
> There might be workarounds involving the order of definitions or the
> linking order.
>
> Maybe you could try a newer gcc release. gcc 3.4 and up include lots of
> fixes wrt. C++. The old Intel compiler might have had to behave exactly
> like the old gcc compiler to be compatible. This might explain, why it
> works with Mingw gcc 3.4.4.
>
> If this does not suffice, then please post minimal compileable code for
> reproducing the problem.
>
> Bernd Strieder


--- End Message ---
--- Begin Message --- Subject: confirm a38eec1de0856b26d65cd9f4776fb5ad3cd04477
If you reply to this message, keeping the Subject: header intact,
Mailman will discard the held message.  Do this if the message is
spam.  If you reply to this message and include an Approved: header
with the list password in it, the message will be approved for posting
to the list.  The Approved: header can also appear in the first line
of the body of the reply.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]