C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-98
SSV
However, if you enter the preceding SSV pragma list on the command line, only the
first SSV is set; the others are ignored because of the numeric gap.
The native compilers also support the setting of SSVs using ASSIGN statements. If
you use both ASSIGNs and command-line SSV pragmas, the two sets are unioned
together. If the two sets have any duplicate SSV numbers, the SSV specified in the
command line is used.
If you use SSV pragmas with TNS C, the compiler subvolume is not searched.
Consequently, if your program needs any standard header file, you must add a
search subvolume (SSV) for the system library.
For example, if you specify any SSV pragmas and your program contains a
standard library file header such as #include <stdioh>, you must have an SSV
pragma for “$system.system” (the location of the stdioh file on the NonStop
host), because the compiler does not automatically search the compiler
subvolume.
If you specify SSV pragmas, the compiler does not distinguish between standard
header files and user-defined files. The files are searched according to the SSV
search list that you specified.
When using an SSV search list with the native compilers, the default subvolume is
searched. Therefore, you do not need to add an SSV pragma for the default
subvolume in native mode. When using SSVs with the TNS compilers, however,
you do need to add an SSV pragma for the default subvolume.
For the default searching paradigm used with #include directives, see #include
on page 12-7.
For the native compilers, the way that you specify a #include directive affects the
operation of an SSV search list or a Directories list (in TDS on the PC):
°
If you specify #include "file" in your source, the compiler searches for the
specified file in the subvolume or directory containing the source file and then
in the search subvolumes or directories.
°
If you specify #include <file> in your source, the compiler searches for the
specified file in the search subvolumes or directories, but not in the subvolume
or directory containing the source file.
SSV pragmas on the command line take precedence over SSV pragmas in source
files; that is, those in source files are appended to those from the command line. If
no SSV pragma appears on the command line, two are implicitly created (without
user notification) for the current subvolume and compiler subvolume. This gives
those locations precedence over any SSV pragmas in source files, including
CPATHEQ files. To override the default SSV pragmas, specify at least one SSV
pragma on the command line.