public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dgraham at nortel dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/24830] Duplicate constructors with -fmudflap
Date: Sun, 13 Nov 2005 20:17:00 -0000 [thread overview]
Message-ID: <20051113201718.30375.qmail@sourceware.org> (raw)
In-Reply-To: <bug-24830-11705@http.gcc.gnu.org/bugzilla/>
------- Comment #2 from dgraham at nortel dot com 2005-11-13 20:17 -------
Subject: Re: Duplicate constructors with -fmudflap
On Sun, Nov 13, 2005 at 04:20:06PM -0000, pinskia at gcc dot gnu dot org wrote:
>
> ------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-13 16:20 -------
> Do you have an example source?
Sure:
-------- begin foo.c ---------
static int foo;
int main(int argc, char **argv)
{
printf("%d\n", foo);
}
-------- end foo.c ---------
Compile with "gcc -g -fmudflap foo.c -lmudflap".
Put a breakpoint on _GLOBAL__I_0_main. It will be hit twice.
I forgot to mention that I'm talking about static constructors only.
I don't think this is a serious problem for mudflap, except maybe for
its performance implications (all static data gets registered twice),
but there may be other uses of constructors in C where having those
constructors called twice would be a serious problem.
--Doug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24830
next prev parent reply other threads:[~2005-11-13 20:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-13 4:05 [Bug c/24830] New: " dgraham at nortel dot com
2005-11-13 16:20 ` [Bug c/24830] " pinskia at gcc dot gnu dot org
2005-11-13 20:17 ` dgraham at nortel dot com [this message]
2005-12-05 3:03 ` [Bug libmudflap/24830] " pinskia at gcc dot gnu dot org
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=20051113201718.30375.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.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).