[FFmpeg-devel] [PATCH] Fix compilation (?)

Måns Rullgård mans
Fri Dec 26 01:44:31 CET 2008

"Jason Garrett-Glaser" <darkshikari at gmail.com> writes:

> On Thu, Dec 25, 2008 at 7:19 PM, M?ns Rullg?rd <mans at mansr.com> wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
>>> On Thu, Dec 25, 2008 at 04:23:37PM -0500, Jason Garrett-Glaser wrote:
>>>> Someone on mplayer-users reported a compile failure, which is rather
>>>> odd since this function should be optimized out on 64-bit (as it is
>>>> static and never used).
>>>> But since it clearly wasn't, here's a patch to fix it.
>>> welcome to the world of gcc
>> The standard does not require that the compiler remove unused
>> functions.  That's just a nice feature of most implementations.
> Oh, I know, the point is I was rather curious why in the world it
> wasn't removed, as in my experience gcc does do that pretty
> reliably...

Unused function removal only happens with optimisation enabled, and
your commit message suggests it wasn't when the error occurred.

Furthermore, gcc seems to unable to eliminate but the first in an
unused chain of functions.  This probably wasn't the cause of the
trouble here though.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list