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 <hubicka@ucw.cz> writes:

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

*looks* I think writing a cast with "inline" in it violates the
constraint in C99 6.7.4p2:

    Function specifiers shall be used only in the declaration of an
    identifier for a function.

So I am in favor of making a cast which adds or removes either the
"inline" function-specifier or the "always-inline" attribute be a hard
error.

>> Isn't init_optimization_passes now being called twice?
> Apparently not:
...

So before, it wasn't being called at all?  If so, that piece of the
patch is approved, please commit it separately and iterate.

zw


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