[FFmpeg-devel] FFmpeg source code is no longer C99 because of GNUism called case ranges

Reimar Doeffinger Reimar.Doeffinger
Mon Jun 25 09:41:47 CEST 2007


Hello,
On Mon, Jun 25, 2007 at 08:45:33AM +0200, Guillaume POIRIER wrote:
> On 6/25/07, Roman Shaposhnik <rvs at sun.com> wrote:
> > I've always been very happy about the fact that ffmpeg's
> > source code has been more or less C99. Well it seems that
> > it is no longer the case and I just wanted to get your
> > opinion on what should be done about it. The major GNUism
> > that sneaked through is 'case ranges'. Things like:
> >
> >    switch (i) {
> >       case 1 ... 100:
> >               break;
> >    }
> 
> Mmmm... Though I don't like product-specific language extensions, I
> must admit it would be cool if this one was part of the standard.

Though the way it is used in mp3.c borders on idiotic.
And the use in rv10.c probably can be replaced by a much cleaner
if-then-else as well, at the "expense" of not warning about some to us
unknown version numbers but instead falling back to some sensible
defaults.

Greetings,
Reimar Doeffinger




More information about the ffmpeg-devel mailing list