Tech Papers
Prevention is Better Than The Cure: Compiler Run Time Error Checking
Mentor Graphics
Mentor Graphics Technical Library
June 2009
Compilers are generally thought of as being tools that convert a high level language, like C or C++, into assembler or machine code. Of course, they do perform this function, but have the potential to do much more. Code may be generated by a compiler, or be extracted from its run-time library, which adds to the functionality of the user-written code in order to detect run-time errors and take appropriate action. This is useful in any software development context, but for embedded systems, where a fail-safe error control system is often required, this compiler functionality is essential. This paper reviews a number of the error detecting and trapping techniques that are available and discusses how these techniques are implemented in modern compilers. The availability of such functionality in embedded compilers on the market today is also reviewed.




