[FFmpeg-devel] C99 or GCC extensions
Fri Jul 11 18:40:43 CEST 2008
Axel Holzinger <aholzinger at gmx.de> writes:
> "M?ns Rullg?rd" <mans at mansr.com> writes:
> > ...
> > It is almost certainly remnants of days gone by, when rules
> > less strict.
> > > If not, what is the current policy on this and are patches
> > > welcome to remove GCC specifics in favour of C99?
> > The current policy is that new code should compile with a C99
> > compiler, unless it is an optional assembler optimisation.
> > Patches to rectify non-standard code are always welcome.
> Great, lavori in corso.
I looked a bit at statements in expressions, which are not C99
AFAIK and I found an issue with the FASTDIV implementation in
internal.h of libavutil.
The FASTDIV macro uses statements in an expression. The only way
to come around this I can see with C99 is to move the code in an
To enter the discussion on how to fix this correctly I made a
patch which implements a function named FASTDIV, which is not
entirely political correct as capital names normally shouldn't
be used for functions. OTOH I didn't want to completely change
It would also be possible to always implement the function and
inside #ifdef the different architectures. I don't hold stock
options in any of the possibilities, I'm just interested in
C99 "conformizing" the code :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1323 bytes
Desc: not available
More information about the ffmpeg-devel