HP aC++ Online Programmer's Guide © Copyright 1996, 1997, 1998, 1999 Hewlett-Packard Company All rights reserved. Send mail to report errors or comment on the documentation. Welcome to the HP aC++ Online Programmer's Guide. The guide is divided into the following files. String search is available within each file. (Choose Edit, then Find.) Note that each file may contain links to related topics in other files. Command-Line Options What's New - including release notes for this Command Syntax and Environment version of HP aC++ Variables Diagnostic Messages Information Map - where to find more Distributing Your HP aC++ Products information about this guide and about C++ Exception Handling Getting Started Glossary LEX and YACC with HP aC++ Libraries HP C++ (cfront) to HP aC++ Migration Mixing HP aC++ with Other Languages Guide Optimizing Your Code Pragmas Rogue Wave Library Reference Manuals Precompiled Header Files Preprocessing Rogue Wave Tools.h++ Version 7.0.6 Reference Standardizing Your Code Manual Templates Introduction and Overview Rogue Wave Standard C++ Library Version 1.2.1 Detailed Information Reference Manual Threads NOTE: If you are accessing this guide from the World Wide Web URL, http://docs.hp.com, rather than from a system on which HP aC++ is installed, Rogue Wave documentation is not available. The above two links and any other such links within this guide will not succeed. Command Line Options You can specify command-line options to the aCC command. They allow you to override the default actions of the compiler. Each option begins with either a - or a + sign. Any number of options can be interspersed anywhere in the aCC command and they are typically separated by blanks. For a complete list of options, select Alphabetical List of Command Line Options. Otherwise, select a category: Code Generation Naming the Output File Data Alignment and Storage Native Language Support Debugging Null Pointer Handling Error Handling Optimizing Your Code Exception Handling Precompiled Header Files Extensions to the Language Preprocessor Header Files Profiling Your Code Help Online Standards Inlining Subprocesses of the Compiler Libraries Templates Linker Verbose Compile and Link Information See Also: Concatenating Options CXXOPTS Environment Variable Alphabetical List of Command Line Options Select the option for which you want more information: -.suffix +inst_all +O[no]limit -Aa +inst_auto +O[no]size +A +inst_close +Ooptimization -b +inst_directed +[no]objdebug -c +inst_implicit_include +p -Dname +inst_include_suffixes -P +d +inst_none +P +DAarchitecture +inst_used +pa +dfname +inst_v +pal +dryrun -Idirectory +pgmname +DSmodel -I- -q -ext +I -Q -E +k -s +ESfic -lname -S +ESsfc -Ldirectory +time -g +m[d] -tx,name -g0 +M[d] +tmtarget -g1 -n -Uname -G -N +unum +hdr_cache +noeh -v +hdr_create +nostl -V +hdr_dir -o outfile -w +hdr_info -O +w +hdr_use +O1 -Wc,-ansi_for_scope,[on][off] +hdr_v +O2 -Wc,-koenig_lookup,[on][off] +help +O3 -Wx,args +inline_levelnum +O4 +W args +O[no]all +We args +O[no]aggressive -Y +O[no]conservative -z +O[no]info +z +Z Options to Control Code Generation These options allow you to control what kind of code HP aC++ generates. -c Compile to relocatable object file without linking. +DAarchitecture Generate object code for a particular version of the PA-RISC architecture. Also specifie which version of the HP-UX math library to use. Set the target operating system for the compiler. +DSmodel Perform instruction scheduling tuned for a particular implementation of the PA-RISC architecture. +k Generate code for programs that use a large number of global data items in shared libraries. -S Compile to assembly language without linking. +tmtarget Compile code for optimization with a specific machine architecture. +z Generate position-independent code (PIC) to go into a shared library. +Z Generate position-independent code (PIC) to go into a shared library. -c Command Line Option Syntax -c Description: Compiles one or more source files but does not enter the linking phase. The compiler produces an object file (a file ending with .o) for each source file (a file ending with .c, .C, .s, or .i). Note that you must eventually link object files before they can be executed. Example: aCC -c sub.C prog.C Compiles sub.C and prog.C and puts the relocatable object code in the files sub.o and prog.o, respectively. +DAarchitecture Command Line Option Syntax +DAarchitecture architecture can be one of the following: a model number of an HP 9000 system (such as 730, 877, F20, or I50) a PA-RISC architecture designation (such as 2.0 or 1.1) the term portable (Use +DAportable to generate code compatible across 1.1 and 2.0 workstations and servers.) NOTE: See the /opt/langtools/lib/sched.models file for a list of model numbers and their PA-RISC architecture designations. Description: Generates object code for a particular version of the PA-RISC architecture. Also specifies which version of the HP-UX math library to link in when you have specified -lm. (See the HP-UX Floating-Point Guide for more information about using math libraries.) NOTE: Object code generated for PA-RISC 2.0 will not execute on PA-RISC 1.1 systems. To generate code compatible across PA-RISC 1.1 and 2.0 workstations and servers, use the +DAportable option. For best performance use +DA with the model number or architecture where you plan to execute the program. If you do not specify a +DA option, the default code generation is based on that of the system on which you compile. If you specify neither a +DA nor a +DS option, default instruction scheduling is based on that of the system on which you compile. If you do specify a +DA option and do not specify a +DS option, default instruction scheduling is based on what you specify in +DA, and not based on that of the system on which you compile. For example, specify +DA1.1 and do not specify +DS, and instruction scheduling will be for 1.1. Specify +DAportable and do not specify +DS, and instruction scheduling will be for 1.1. (+DAportable is currently equivalent to +DA1.1.) Examples: The following examples generate code for various architectures, as noted: aCC +DA1.1 prog.C (PA-RISC 1.1) aCC +DA867 prog.C (PA-RISC 1.1) aCC +DA2.0 prog.C (PA-RISC 2.0) aCC +DAportable prog.C (compatible across 1.1 and 2.0 workstations and servers) For More Information: Compiling for Different Versions of the PA-RISC Architecture See the file /opt/langtools/lib/sched.models for model numbers and their architectures. Use the command uname -m to determine the model number of your system. Compiling for Different Versions of the PA-RISC Architecture The instruction set on PA-RISC 2.0 is a superset of the instruction set on PA-RISC 1.1. Code generated for HP 9000 PA-RISC 1.1 systems will run on HP 9000 PA-RISC 2.0 systems, though possibly less efficiently than if it were specifically generated for PA-RISC 2.0. Code generated for PA-RISC 2.0 will not run on PA-RISC 1.1 systems. Using +DA to Generate Code for a Specific Version of PA-RISC When you use the +DA option depends on your particular circumstances. If you plan to run your program on the same system where you are compiling, you don't need to use +DA. If you plan to run your program on one particular model of the HP 9000 and that model is different from the one where you compile your program, use +DAarchitecture with the model number of the target system. For example, if you are compiling on a 720 and your program will run on an 855, use +DA855. If you plan to run your program on PA-RISC 2.0 and 1.1 models of the HP 9000, use +DAportable. Compiling in Networked Environments When compiles are performed using diskless workstations or NFS-mounted file systems, it is important to note that the default code generation and scheduling are based on the local host processor. The system model numbers of the hosts where the source or object files reside do not affect the default code generation and scheduling. +DSmodel Command Line Option Syntax +DSmodel model can be either a model number of an HP 9000 system (such as 725, 890, or G40), PA-RISC architecture designation 1.1 or 2.0, or one of the PA-RISC processor names such as PA7000, PA7100, PA7100LC, or PA8000. See the file /opt/langtools/lib/sched.models for model numbers and processor names. Description: Performs instruction scheduling tuned for a particular implementation of the PA-RISC architecture. Object code with scheduling tuned for a particular model will execute on other HP 9000 systems, although possibly less efficiently. If you specify neither a +DA nor a +DS option, default instruction scheduling is based on that of the system on which you compile. If you do specify a +DA option and do not specify a +DS option, default instruction scheduling is based on what you specify in +DA, and not based on that of the system on which you compile. For example, specify +DA1.1 and do not specify +DS, and instruction scheduling will be for 1.1. Specify +DAportable and do not specify +DS, and instruction scheduling will be for 1.1. (+DAportable is currently equivalent to +DA1.1.) If you plan to run your program on both PA-RISC 1.1 and 2.0 systems, use the +DS2.0 designation. Examples: +DS720 Performs instruction scheduling tuned for one implementation of PA-RISC 1.1. +DS745 Performs instruction scheduling for another implementation of PA-RISC 1.1.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages228 Page
-
File Size-