[FFmpeg-devel] compile error for few days
Geek.Song
ffmpeg at gmail.com
Mon Jul 2 06:47:01 CEST 2012
On Sun, Jul 1, 2012 at 7:56 PM, Alexander Strasser <eclipse7 at gmx.net> wrote:
> Hi,
>
> Geek.Song wrote:
>> On Sun, Jul 1, 2012 at 1:52 PM, Masaru Nomiya <nomiya at galaxy.dti.ne.jp> wrote:
> [problem report skipped]
>> try this patch:
>>
>> Index: intfloat.h
>> ===================================================================
>> --- intfloat.h (revision 3492)
>> +++ intfloat.h (revision 3856)
>> @@ -39,7 +39,12 @@
>
> Hmm, revision dddd ? No, function context info in @@ chunk header line?
>
it's only my local dev branch which I use subversion
>> */
>> static av_always_inline float av_int2float(uint32_t i)
>> {
>> +#ifdef __cplusplus
>> + union av_intfloat32 v;
>> + v.i = i;
>> +#else
>> union av_intfloat32 v = { .i = i };
>> +#endif
>> return v.f;
>> }
>
> I do not think it makes sense to keep both versions.
>
> Also I am not sure how often we export inline functions that contain
> C99 specific features in public API, like in this case designated
> initializers for aggregate/union types.
+1
it is a bad habit to export inline function in public headers.
>
> IIRC Reimar complained from time to time to not use C99 features that
> did not get into the very recent C++ standard in public headers. I am
> personally thinking alike. Maybe we should come up with some guide lines
> about this. E.g. if it is in a macro it might be ok to expose it as it
> won't trigger compile errors when used from C++ assuming that macro is
> not used by the client source code.
>
> I realize that this problem is triggered inside an internal C++ module
> of FFmpeg and not by a non-FFmpeg application that uses libavutil as a
> client. But as the header is public AFAICT it could also trigger problems
> in external libavutil clients.
>
> Just thinking out loud. Comments appreciated.
>
--
-----------------------------------------------------------------------------------------
My key fingerprint: d1:03:f5:32:26:ff:d7:3c:e4:42:e3:51:ec:92:78:b2
More information about the ffmpeg-devel
mailing list