[FFmpeg-devel] Proposal on clearly delineating nonC99 code in FFmpeg

Michael Niedermayer michaelni
Sun Jul 8 02:47:47 CEST 2007


Hi

On Sat, Jul 07, 2007 at 03:51:17PM -0700, Roman Shaposhnik wrote:
> On Sat, 2007-07-07 at 23:20 +0100, M?ns Rullg?rd wrote:
> >
> > It is fairly common to call such headers compiler.h, so perhaps we
> > should follow suit.
> 
>   That's a good suggestion. Personally I would like the name of the
> file to communicate that it is a central place for all things nonC99,
> but you are right -- most of the projects use compiler.h for 
> that very same purpose. I'm curious to hear what do others think?
>   
> > > I see this proposal giving us two crucial benefits:
> > >    * a centralized location for all things that break out of
> > >      C99 realm would make the job of anybody porting FFmpeg to 
> > >      different platforms much easier. Of course, every construct
> > >      we put in this header file will be heavily commented explaining
> > >      what we expect it to do and giving hints on how it can be
> > >      ported to C99 platforms without direct support for it.
> > >
> > >    * testing whether a known feature actually works instead of
> > >      assuming that it always does if compiler is X and it always
> > >      doesn't if compiler happens to be Y is a much cleaner 
> > >      approach for both cases (in fact I've seen GCC break some
> > >      of the lesser used attributes from time to time -- something
> > >      that won't get caught unless you actually test for the feature).
> > 
> > Crafting a test that really determines whether something works is
> > often less than trivial.  What appears to work in a simple test case
> > may well fail in obscure ways when used in real code.  This
> > notwithstanding, testing whether the constructs in question compile OK
> > is certainly better than only testing a preprocessor definition.
> 
>   Seems like we are in agreement (although I'm waiting for Michael
> to chime in). 

no objections from me


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070708/064e5094/attachment.pgp>



More information about the ffmpeg-devel mailing list