Re: Optimisations and undefined behaviour

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

 



On 9 Nov 2015, at 16:31, Andrew Haley <aph@xxxxxxxxxx> wrote:
> 
> Maybe there should be a nice small
> language which is useful for embedded developers and doesn't have
> all the interesting UB properties that C has.  (Ada, maybe?  Probably
> not.)

Ada certainly has fewer UB properties than C, but Ada programs can be erroneous (anything might happen) or have bounded errors; typically from some form of “unchecked conversion”, e.g. in the embedded context reading from the wrong address and therefore reading invalid (out-of-range) values, and then not validating.

Ada is hardly a small language, but you can leave out a lot of the runtime system (e.g. no task support); for example the tutorial at http://inspirel.com/articles/Ada_On_Cortex.html.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux