This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: constructor attribute function call output twice in g++ 2.96
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: constructor attribute function call output twice in g++ 2.96
- From: "Mark E." <snowball3 at bigfoot dot com>
- Date: Thu, 20 Jul 2000 14:47:42 -0400
> Hi guys,
> I've been taking a look at why the constructor and destructor attributes
> don't work because it's used by at least one widely used C++ DJGPP program
> (see problem report #114). My fix works fine in gcc 2.95.2, but the function
> calls are emitted twice in 2.96. An example with that demonstrates this with
> gcc 2.96 without changes is included below. Notice that 'call _f2__Fv' and '
> call _f__Fv' are output twice.
>
Hi again,
Using DJGPP's graphical debugger, I think I know why the functions are
emitted twice. It's because finish_function() in cp/decl.c is called twice!
It's called once by yyparse() and once again by expand_body in
cp/semantics.c.