* Omit guard on static objects ?
@ 2004-04-27 8:11 hartmut.schirmer
2004-04-27 14:16 ` llewelly
0 siblings, 1 reply; 2+ messages in thread
From: hartmut.schirmer @ 2004-04-27 8:11 UTC (permalink / raw)
To: gcc-help
Hi,
is there any way to omit the automatic construction guard
created in
int foo()
{
static class A a;
...
}
Thanks,
Hartmut
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Omit guard on static objects ?
2004-04-27 8:11 Omit guard on static objects ? hartmut.schirmer
@ 2004-04-27 14:16 ` llewelly
0 siblings, 0 replies; 2+ messages in thread
From: llewelly @ 2004-04-27 14:16 UTC (permalink / raw)
To: hartmut.schirmer; +Cc: gcc-help
hartmut.schirmer@arcor.de writes:
> Hi,
>
> is there any way to omit the automatic construction guard
> created in
>
> int foo()
> {
> static class A a;
> ...
> }
If you define A so that its constructor and destructor are trivial,
the gaurd will not be generated, unless there is an initializer
for a.
Otherwise, the gaurd will always be present.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-27 14:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-27 8:11 Omit guard on static objects ? hartmut.schirmer
2004-04-27 14:16 ` llewelly
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).