tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NULL pointer arithmetic issues

>>> It is now in C++ mainstream and already in C2x draft.
>> Then those are not suitable languages for OS implementations.
> This battle is lost for C

C is not a language.  C is a family of closely related languages.

Some of them are suitable for OS implementation.  It appears some of
the more recent ones are not, but this does not mean the older ones 
also aren't.

Undefined behaviour as a way of describing differences between
implementations, things that it limits portability to depend on, is
useful.  Undefined behaviour as a license-by-fiat for compilers to
unnecessarily transform code in unexpected ways is not.  Software
languages and their compilers exist to serve their users, not the other
way around; it is not a compiler's place to take the position of "ha
ha, the code you wrote is clear but I can find a way to lawyer it into
formally undefined behaviour, so I'm going to transform it into
something I know damn well you didn't expect".

> RUST is better defined that C and is indeed used in OS development
> these days  I don't see how this is related to the rest of the discussion.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index