HPlogo HP C/HP-UX Programmer's Guide: HP 9000 Computers > Chapter 4 Optimizing HP C Programs

Enabling Only Conservative Optimizations

» 

Technical documentation

Complete book in PDF

 » Table of Contents

You can enable conservative optimizations at the second, third, or fourth optimization levels by using the +Oconservative option, as follows:

cc
+O2 +Oconservative sourcefile.c

or:

cc
+O3 +Oconservative sourcefile.c

or:

cc
+O4 +Oconservative sourcefile.c

Conservative optimizations are optimizations that do not change the behavior of code, in most cases, even if the code does not conform to standards.

Use the conservative optimizations provided with level 2, 3, and 4 when your code is non-ANSI.

© Hewlett-Packard Development Company, L.P.