[FFmpeg-devel] [PATCH] remove MSVC cruft

Michael Niedermayer michaelni
Tue Feb 12 19:08:13 CET 2008


Hi

On Tue, Feb 12, 2008 at 10:35:36AM -0700, Loren Merritt wrote:
> On Tue, 12 Feb 2008, Michael Niedermayer wrote:
> >
> > and a #error in the default case _BREAKS_ ALL non GNU compilers, ffmpeg
> > would no longer need just ISO C + POSIX but GNU
> 
> For any other syntax element, I'd agree. But #error is _supposed_ to be 
> fatal. What is a non-gnu compiler going to do: not ignore it (which would 
> be no worse than #warning), not die (who cares if it's a syntax error 
> rather than supporting #error), but rather something that produces a 
> broken binary?


You misunderstood me.

There are 4 possibilities (all non gnu compilers not defining __GNU__
1. supports gnu asm()       , asm being actived (-arch= / uname)
2. doesnt supports gnu asm(), asm being actived (-arch= / uname)
3. supports gnu asm()       , asm not being actived (-arch= / uname)
4. doesnt supports gnu asm(), asm not being actived (-arch= / uname)

with #error all 1,2,3,4 will fail one way or the other as they hit #error
without #error 3,4 will always succeed, 2 will always fail, and 1 will fail
at runtime if and only if the asm code needs alignment and it isnt provided

the code reads
#ifdef __GNU__
#else
#error
#endif

This is not protected by any ARCH_X86 or HAVE_ASM or anything else
it plain ans simple drop support for non gnu compilers.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080212/800c5ab2/attachment.pgp>



More information about the ffmpeg-devel mailing list