This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [tree-ssa/mainline] PR 14756


> Jan Hubicka <jh@suse.cz> writes:
> 
> > Hi,
> > the error is quite right about the fact that called function is not
> > being considered for inlining.  The function is not inline function, but
> > in the macro call it is casted to inline function, so we get the warning
> > output.
> >
> > This patch makes the errors/warnings to be controlled by the function
> > type, not the type it has been possibly casted to.
> 
> That sounds right to me.
> 
> > Zack, perhaps we should issue warning when casting non-inlie to inline
> > and error when casting non-always-inline to always-inline?
> 
> Why are casts which add/remove 'inline' allowed *at all*?

I am not sure.  Outputting hard errors would be fine to me too.  I guess
it depends on what C standard thinks here.
> 
> ...
> >     init_dummy_function_start ();
> >     init_expmed ();
> > +   init_optimization_passes ();
> >     if (flag_caller_saves)
> >       init_caller_save ();
> >     expand_dummy_function_end ();
> 
> Isn't init_optimization_passes now being called twice?
Apparently not:

hubicka@kampanus:/aux/hubicka/egcs4/gcc/gcc$ grep init_optimization_passes *.c *.h
passes.c:init_optimization_passes (void)
toplev.h:extern void init_optimization_passes (void);

Honza
> 
> zw


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