[FFmpeg-devel] [PATCH] Remove useless preprocessor directives.

Måns Rullgård mans
Fri Jun 18 16:04:09 CEST 2010

Loren Merritt <lorenm at u.washington.edu> writes:

> On Fri, 18 Jun 2010, Michael Niedermayer wrote:
>> On Fri, Jun 18, 2010 at 08:51:29AM +0200, Benoit Fouet wrote:
>>> On Thu, 17 Jun 2010 21:57:09 +0200 Reimar D?ffinger wrote:
>>>> On Thu, Jun 17, 2010 at 03:32:02PM +0200, Benoit Fouet wrote:
>> [...]
>>>> If you don't need/want the whole function, then put the whole function under
>>>> the #if.
>>> that wouldn't work either... as the code using it is in the form of:
>>> if (HAVE_7REGS)
>>>     foo = yuva420_rgb32_MMX;
>>> You'll get an undeclared function error.
>> what if you add a weak attibute at the function declaration?
>> (should in theory work though probably its not portable enough
>> if it does work)
> Can't you just declare the function, no special attributes?

Making it weak wouldn't change anything there.

> I thought ffmpeg policy was to require dead code elimination, so that
> functions used under if(0) need not exist.

That still requires the function itself to be compilable.  Some errors
occur before DCE.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list