O'Reilly logo

Solaris™ Application Programming by Darryl Gove

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Correctness and Debug

Introduction

The objective of this chapter is to give an overview of the support for code checking at both compile time and runtime.

The correctness of code is sometimes one of the reasons the compiler cannot be instructed to generate highly optimized code. As an example, consider that at -xO2 the compiler assumes that all variables are volatile; that is, their value may change due to other events within the system. At -xO3, the compiler no longer assumes this, and relies on the programmer explicitly inserting the volatile keyword. If a program is coded to rely on this assumption of volatility, it will fail to work correctly at -xO3.

In general, the higher the level of optimization, the more aggressive the compiler ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required