FCC(1) UNIX Programmer's Manual FCC(1) NAME fcc - C compiler for use with flexible discs SYNOPSIS fcc [ option ] ... file ... HP-UX COMPATIBILITY Level: C Compiler - OPTIONAL Origin: Hewlett-Packard DESCRIPTION Fcc is a HP-UX C compiler customized for use in flexible disc environments. It accepts several types of arguments (these are, for the most part, the same as those accepted by cc(1)): Arguments whose names end with .c or .i are taken to be C source programs; they are compiled, and each object program is left in the directory /tmp on the file whose name is that of the source with .o substituted for .c or .i. If the original extension was .i, the C preprocessor pass, cpp(1), is skipped. The .o file is normally deleted if a single C program is compiled and linked all in one step. In the same way, arguments whose names end with .s are taken to be assembly source programs and are assembled, producing a .o file. Arguments whose names end with .o are taken to be relocatable object files which are to be included in the link operation. The following options are interpreted by fcc. Options may not be concatenated. See ld(1) for link editor options. -c Suppress the link edit phase of the compilation, and force an object (.o) file to be produced even if only one program is compiled. Produces a .o file for each .c, .s or .i file. -E Run only the macro preprocessor on the named C programs, and send the result to the standard output. The result is compatible with the /lib/ccom step of fcc. -O Invoke an object-code optimizer. -S Compile the named C programs, and leave the assembler-language output on corresponding files suffixed .s. -C -Dname=def -Dname -H nnn -Idir -T -Uname These options are passed through to the C preprocessor, cpp. Refer to cpp(1) for details. Other arguments are taken to be either link editor option arguments, or C-compatible object programs, typically produced by an earlier fcc run, or perhaps libraries of C-compatible routines. These programs, together with the results of any compilations specified, are linked (in the order given) to produce an executable program with the name a.out. The Kernighan and Ritchie C text, and the various addenda to it, comprise the best available reference on C. The documents are intentionally ambiguous in some areas. HP-UX specifies some of these. char The char type is treated as signed by default. It may be declared unsigned. pointers Dereference of a NULL (zero) pointer is illegal and may cause a SIGSEGV error. This applies whether the access is for reading or writing. Programs which rely on being able to derefrence a null pointer are not considered portable within HP-UX. identifiers Identifiers are significant up to (at least) 255 charac- ters. Whether or not longer identifiers are handled is machine dependent. The assembler and loader must also support long identifiers to 255 characters. FILES file.c input file file.o object file /tmp/a.out linked output /tmp/file.[iso] temporaries /cpp/bin/cpp preprocessor /c/bin/ccom compiler, cc /c/bin/c2 optional optimizer /c/lib/crt0.o runtime startoff /c/lib/libc.a standard library, see /man/man2 and /man/man3 /cpp/include directory for #include files SEE ALSO B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall, 1978. as(1), ld(1). DIAGNOSTICS The diagnostics produced by C itself are intended to be self-explanatory. Occasional messages may be produced by the assembler or the link editor. WARNINGS Fcc moves source files to /tmp before compilation. This includes all .i, .c and .s files, as well as .o files not found on the /c disc. This can cause #include directives to cpp to fail if the included file is specified using the "" syntax (as opposed to the <> syntax, see cpp(1)). In particular, cpp will look for the specified .h files in the /tmp directory. Fcc will cause cpp to also examine the original source directory, but if that disc has been removed, an error will occur. This can be worked around by placing the .h file in /tmp, or on the /cpp disc in the include directory. Absent a -o switch to fcc, the output will be placed in /tmp/a.out. This differs from cc, which places the output in a.out of the original source directory. Cc's default behavior was deemed inappropriate in a flexible disc environment, due to the extra disc exchanges that could be required.