[Ffmpeg-devel] compiler warnings

Rich Felker dalias
Thu Mar 30 10:16:48 CEST 2006


On Thu, Mar 30, 2006 at 08:57:07AM +0100, M?ns Rullg?rd wrote:
> Steve Lhomme <steve.lhomme at free.fr> writes:
> 
> > Having to guess exactly how a C compiler process data to know exactly
> > what is does is bad engineering. Even though the code is correct and
> > small, it makes it harder to read by a large number of coders. Making
> > the code easily readable is important to maintain the code, not wonder
> > if the compiler has to be C90 or C99 or whatever to compile a line
> > correctly.
> 
> Code should be made easy to read for those who will actually read it,
> not necessarily for every school kid with a computer.  Competent
> programmers find the kind of code Rich advocates easier to read.

Moreover, the issues I described:
- implicit casts between appropriate types
- operactor precedence
- == vs =

have nothing to do with C89 vs C90 vs C99. They've been the same ever
since K&R and anyone who knows C knows them.

> > That's why the famous quote from here "fix the compiler" is also not
> > realistic in the real world. Most of the time you are given a compiler
> > (and an IDE) that goes with the hardware you're working with (I'm not

Most of the time you're given a compiler and, for better or worse,
it's gcc....

> > talking about PCs) and you just do with it. You'll just get fired if
> > instead of fixing bugs you were saying your boss "it's not my fault,
> > it's the compiler". It's an engineering practice that will get you
> > nowhere.

Things are the opposite when you work with free software. You can't
expect people to be happy when you try to impost your bad practices
from dysfunctional corporate environments on us. If a compiler/system
is hopelessly broken, the best thing to do is not to support it and
encourage people to switch to one that works.

Rich





More information about the ffmpeg-devel mailing list