[FFmpeg-devel] [PATCH 1/2] Define ff_inverse also in libavutil.
Måns Rullgård
mans
Fri Oct 3 01:13:18 CEST 2008
flameeyes at gmail.com (Diego 'Flameeyes' Petten?) writes:
> Uoti Urpala <uoti.urpala at pp1.inet.fi> writes:
>
>> Does the compiler create a ff_sqrt function in those object files even
>> though it's declared "static inline" and not used in those files?
>
> Yes that seems to be the problem, I remembered that it did the same for
> some avfilter inline functions and checked for that.
>
> Unfortunately I'm not enough of a "standards lawyer" to tell if this is
> the correct behaviour in C99 or not (I'd guess not, at a minimum it's a
> missed optimisation). If somebody can tell for sure this is not the
> correct behaviour, it would probably be a good idea to report it to Sun
> upstream, and see what they'll do.
The standard only says that an inline function without the extern
specifier shall not provide an external definition for the function.
In other words, just about anything is allowed for static inline
functions. The inline keyword is nothing but a hint, unless the
function is also explicitly declared extern, in which case things get
a bit more complicated.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list