vcc(1)
NAME
vcc − VAX C compiler
SYNTAX
vcc [ option... ] file...
DESCRIPTION
The vcc command invokes the ULTRIX-32 VAX C compiler. The vcc command accepts several types of arguments:
The vcc command program treats arguments whose names end with .c as C source programs. The source code is compiled and the resultant object code is left in a file whose name is that of the source with a .o file extension. If you choose to compile and load a single program in one step, the vcc command program deletes the intermediate object code file.
The vcc command program treats arguments whose names end with .s as assembly source programs. These programs are passed to the assembler. The assembler creates an output file with a .o extension.
The vcc command program treats other command line arguments as either compiler or linker option arguments or C-compatible object programs, produced during an earlier vcc compilation or extracted from the libraries of C-compatible routines.
OPTIONS
These options are accepted by vcc. See lk(1) for load-time options.
−b Do not pass the −lc library to lk(1) by default.
−c Suppress the loading phase of the compilation and force an object file to be produced even if only one program is compiled.
−Dname=def
−Dname Define the name to the preprocessor. This functions as if an additional #define preprocessor directive was imbedded in the source code. If no definition is given, the name is defined as “1”.
−E Run only the macro preprocessor on the named C programs and send the result to the standard output.
−Em Run only the macro preprocessor on the named C programs and produce the makefile dependencies.
−f Use single-precision rather than double-precision floating point representation. Procedure arguments are still promoted to double-precision floating point format. Programs with a large number of single-precision computations will run faster with this option. However, a slight loss in precision may result as intermediate results are saved using a single-precision representation rather than the default double-precision representation.
−g Generate additional symbol table information for dbx(1). This also passes the −lg flag to lk(1).
−Idir Seek #include files, whose names do not begin with a directory specification, first in the directory of the file argument, then in directories named in −I options, and finally in directories in a standard list.
−lx Use the specified library. This option lists an abbreviation for the library name /lib/libx.a, where x is a string. If the library is not found, lk tries /usr/lib/libx.a. If that does not exist, lk tries /usr/local/lib/libx.a. A search for a library starts when the library name is encountered, so the placement of a −l within the compilation or the linker command line is significant.
−Md Specify DFLOAT (the default) double-precision floating point type and pass the −lc flag to lk(1).
−Mg Specify GFLOAT double precision floating point type and pass the −lcg flag to lk(1). This option uses the GFLOAT version of libc. If the math library is used with code compiled with the −Mg flag, the GFLOAT version is linked by specifying −lmg on the vcc(1) or lk(1) command.
−o output Name the final output file output. If this option is used, the file a.out is left undisturbed. If the named file has a .o or .a file extension, the following error message is displayed: -o would overwrite.
−O Invoke the object-code improver.
−p Produce code that counts the number of times each routine is called. If loading takes place, replace the standard startup routine with one that initially calls monitor(3) and writes out a mon.out file upon normal termination of program execution. The prof(1) command can then be used to generate an execution profile.
−pg Produce counting code similar to that generated by −p, but invoke a run-time recording mechanism that keeps more extensive statistics and produces a gmon.out file at normal termination. In addition, a profiling library is searched, rather than the standard C library. The gprof(1) command can then be used to generate an execution profile.
−Uname Remove any initial definition of name.
−v Produce the listing file, complete with cross-reference and machine code listing sections.
−V Compile the source code using vendor specific options. The available options are described in detail in the Guide to VAX C for ULTRIX-32. The following is a list of the available options:
cross_referenceGenerate a cross reference listing section
debugGenerate a loadable module for use with dbx
defineAssign a specified value to a name
g_floatUse the G_floating point type
listGenerate a list file
machine_codeGenerate the machine code listing section
objectGenerate an object file with a specific name
optimizeSelect code optimization
showInclude symbol and intermediate expansions
standardSelect portability mode
undefineRevoke the assignment of a value to a name
warningsDisable warning or informational messages
−w Suppress warning diagnostics.
−Y Compile the source code file for the System V environment. Defines SYSTEM_FIVE for the preprocessor, cpp, and if the loader is invoked, specifies that the System V version of the C runtime library is used. In addition, if the math library is specified with the −lm option, the System V version will be used.
DEFAULT SYMBOLS AND MACROS
The VAX C compiler recognizes the following predefined symbols. The symbols are all assigned the value one (1). You can use these symbols to separate portable and nonportable code within your VAX C programs:
vaxcVAXC
vax11cVAX11
vaxVAX
In addition to the VAX symbols definitions, listed above, the ULTRIX-32 VAX C compiler provides the following default symbols:
unixAny UNIX system
bsd4_2Berkeley UNIX Version 4.2
ultrixULTRIX-32 only
vaxVAX only (as opposed to PDP-11)
The VAX C compiler recognizes the following predefined macros:
__DATE__Evaluates to a string, specifying the compilation date
__FILE__Evaluates to a string, specifying the current source file
__LINE__Evaluates to an integer, specifying the line containing the
macro reference.
__TIME__Evaluates to a string, specifying the compilation time
RESTRICTIONS
The compiler ignores advice to put char, unsigned char, short or unsigned short variables into registers.
If the −Mg flag is used to produce GFLOAT code, it must be used when compiling all of the modules to be linked. Use the −Mg flag if you use the vcc command to indirectly invoke lk(1) to link the modules. If lk(1) is invoked directly, use the −lcg flag rather than −lc flag. If the math library is used, specify the −lmg flag rather than the −lm flag in order to use the GFLOAT version.
The compiler and the linker lk(1) cannot detect the use of mixed double floating point types. If you use them, your program’s results may be erroneous.
DIAGNOSTICS
The diagnostics produced by VAX C are intended to be self-explanatory. Occasional messages may be produced by the assembler or loader.
FILES
file.cinput file
file.oobject file
a.outloaded output
/usr/bin/vcccommand program
/lib/cpppreprocessor
/lib/cerrfileerror message file
/lib/vaxccompiler
/lib/crt0.oruntime startoff
/lib/mcrt0.ostartoff for profiling
/usr/lib/gcrt0.ostartoff for gprof-profiling
/lib/libc.astandard library
/usr/libcg.aGFLOAT version of the standard library
/usr/lib/libc_p.aprofiling library
/usr/includestandard directory for #include files
/usr/man/man1/vcc.1 manual page
mon.outfile produced for analysis by prof(1)
gmon.outfile produced for analysis by gprof(1)
SEE ALSO
adb(1), as(1), dbx(1), gprof(1), lk(1), prof(1), monitor(3)
Guide to VAX C