public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: corey taylor <corey.taylor@gmail.com>
To: John Love-Jensen <eljay@adobe.com>
Cc: gcc-help@gnu.org
Subject: Re: Reasonable static initialization assurance
Date: Mon, 19 Sep 2005 14:27:00 -0000	[thread overview]
Message-ID: <2e393d0805091907272c7c9460@mail.gmail.com> (raw)
In-Reply-To: <BF541355.1B51%eljay@adobe.com>

Yea, I figured as much.  

Current solution uses a character array for the global variable and a
static accssor that assigns that to a static const std::string.

I knew there was no way around that -- but I thought there might be
some way to do it, in some order.

Eljay,

  Do you know of any difference in this area with the OSX gcc?

corey

On 9/19/05, John Love-Jensen <eljay@adobe.com> wrote:
> Hi Corey,
> 
> > Is there any way to ensure a static variable in file.b is initialized before
> being used?
> 
> Yes, but you'll have to refactor your code a bit.
> 
> Use a static function in FileB to return FileB's static data (which is
> static data inside that static function).
> 
> Have FileA get to the FileB's static data through that accessor function.
> 
> HTH,
> --Eljay
> 
>

  reply	other threads:[~2005-09-19 14:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-17 17:29 corey taylor
     [not found] ` <200509190827.51191.ikrabbe.ask@web.de>
2005-09-19  6:38   ` corey taylor
2005-09-19  7:33     ` Ingo Krabbe
2005-09-19 14:27       ` corey taylor
2005-09-19 12:33 ` John Love-Jensen
2005-09-19 14:27   ` corey taylor [this message]
2005-09-19 15:04     ` John Love-Jensen
2005-09-19 15:03       ` corey taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e393d0805091907272c7c9460@mail.gmail.com \
    --to=corey.taylor@gmail.com \
    --cc=eljay@adobe.com \
    --cc=gcc-help@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).