[FFmpeg-devel] [PATCH] Fix compilation when only MPEG-1encoder is enabled

Panagiotis Issaris takis.issaris
Thu May 10 16:42:40 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Panagiotis Issaris wrote:
> Michael Niedermayer wrote:
>> On Thu, May 10, 2007 at 04:06:24PM +0200, Panagiotis Issaris wrote:
>> [...]
>>> I remember reading about this some years ago, but never saw anyone use
>>> it before the codec registration cleanup patches. One thing I'm
>>> wondering about though, could there be compilers that are stupid enough
>>> to just keep the code there even if the " if(0 and" is there?
>> gcc with -O0 ?
> 
> Doesn't seem so.
> 
> This seems to compile fine with gcc -O0:
> int main()
> {
>     if (0)
>         foobar();
> }
> 
> I also tried with an explicit (0 && some_variable) instead of the pure
> if(0). Or is that still an insufficient test?
Euhm, with some_variable defined as int and set to 1 :-)


With friendly regards,
Takis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGQy9g9kOxLuzz4CkRAqJQAJ0d8sCvFqA50QxqJPGPVX1X0HRMWwCdFu46
VrRiGXjiP2EWYusKjTgxQgI=
=fp76
-----END PGP SIGNATURE-----




More information about the ffmpeg-devel mailing list