This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: constructor attribute function call output twice in g++ 2.96


> 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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]