Rico Secada <[EMAIL PROTECTED]> writes:
> Date: Mon, 31 Jul 2006 01:37:46 +0200
> From: Rico Secada <[EMAIL PROTECTED]>
> To: [email protected]
> Subject: OpenBSD's own compiler
...
> I am curently studying the Ada programming language and I read about the
> different safety demands, which has been made a standard, upon compilers.
You're probably reading propaganda from the Ada folks. If you check
out the C++ folks, you'll find a different perspective on the design
decisions that were made in Ada. Also note that despite the optimistic
projections of the Ada folks back in the 80's, Ada is even today far
from becoming universally popular.
....
> I was wondering, would it be a stupid and bad idea, for the OpenBSD team to
> develope, an OpenBSD C compiler based upon the OpenBSD security knowledge
> and internal standards regarding the language? Making it impossible
> for the compiler to accept and compile programs with all the knows errors
> which cause problems. The OpenBSDs way of programming has clearly made it
> clear, what security and quality is all about.
...
There is already an "OpenBSD C compiler". It's based mostly on Gnu,
but with a bit of extra stuff pioneered in part by the OpenBSD folks.
The C compiler in OpenBSD is not designed to stop you from writing
buggy code. Even if the compiler were as smart as a human being, it
couldn't do that, and we don't yet have fast enough hardware to make
the compiler anywhere near that smart. The OpenBSD design principals
are designed to do what the compiler cannot do - proactively discover &
fix problems. The hacks in the compiler, library & runtime system of
OpenBSD are designed to limit & contain the effects of several common
bugs, and to encourage good coding practice to avoid those bugs. It's
not designed to ensure that the resulting code is in fact problem-free
or completely secure. For reasons of compatibility (because it's nice
to be able to port other people's code) OpenBSD specifically allows you
to do things that are known to be bad. In this, OpenBSD is following
the well-known C precept: give the programmer enough rope to hang himself.
-Marcus Watts