COHERENT manpages
This page displays the COHERENT manpage for cc [C compiler].
List of available manpages
Index
cc -- Command C compiler cc [compiler options] file .... [linker options] cc is the program that compiles C programs. It guides files of source and object code through each phase of compilation and linking. cc has many options to assist in the compilation of C programs; in essence, however, all you need to do to produce an executable file from your C program is type cc followed by the name of the file or files that hold your program. cc checks whether the file names you give it are reasonable, selects the right phase for each file, and performs other tasks that ease the compilation of your programs. How cc Works cc works as follows: -> If a file ends in .c, cc assumes that it contains C code, and compiles it. The compiler generates a relocatable object module with the suffix .o. -> If the file has the suffix .s, cc assumes that it is a file of assembly language, and invokes the assembler as to assemble it. The assembler also generates a relocatable object module with the suffix .o. -> cc assumes that all files with the suffix .o are relocatable object modules. It also assumes that all files with the suffix .a are libraries of object modules. It passes both directly to the linker ld. Additional libraries can also be invoked by using the -l option cc, described below. -> Once all files of C code and assembly language have been compiled or assembled, cc then invokes the linker ld to link the newly created object files with any objects and libraries you named on cc command line. It also automatically includes the C runtime startup routine and the standard C library, so you do not have to name these on your cc command line. -> cc also cleans up after itself. It removes all of its temporary files automatically. If only one object file is created during compilation, cc deletes it after linking; however, if more than one object file is created, or if an object file of the same name existed before you began to compile, then the object file or files are not deleted. Assuming that no error occurs along the way, cc writes the linked result into a file named after the file on its command line, minus that file's suffix -- .c, .s, or .o, depending upon the type of data file holds. It is now ready to be executed. Options The following lists all of cc's command-line options. cc passes some options through to the linker ld unchanged, and correctly interprets for it the options -o and -u. A number of the options are esoteric and normally are not used when compiling a C program. The following are the most commonly used options: -c Compile only; do not link -f Link in floating-point printf() -lname Pass library libname.a to linker -o name Call output file name -V Print verbose listing of cc's action ? Print a detailed usage message that describes available cc's options to the standard output. -A MicroEMACS option. If an error occurs during compilation, cc automatically invokes the MicroEMACS screen editor. The error or errors are displayed in one window and the source code file in the other, with the cursor set to the line number indicated by the first error message. Typing <ctrl-X>> moves to the next error, <ctrl-X>< moves to the previous error. To recompile, close the edited file with <ctrl-Z>. Compilation will continue either until the program compiles without error, or until you exit from the editor by typing <ctrl-U> followed by <ctrl-X><ctrl- C>. -a By default, cc generates an executable file that is named after the source module. For example, the command cc foo.c generates an executable named foo. If you name more than source module on the cc command line, by default it names the executable after the first module you name. The option -a tells cc to create an executable file named a.out. This is for compatibility with other versions of UNIX. Note that option -o, described below, overrides the effect of - a. -B[path] Backup option. Use an alternative path for the compiler phases cc0, cc1, cc2, and cc3. If path is supplied, cc prefixes it onto the name of each phase of the compiler, to form the name of the new compiler phase, and the path to the directory in which it lives. If you do not supply a string, cc prefixes the name of the current directory. If you precede a -B option with a -t option, the -B option affects only the phase of the compiler that the -t option names. For example, the command cc -t0 -B/usr/fred/bin hello.c compiles hello.c using the version of cc0 found in directory /usr/fred/bin. You can include any number of pairs of -t and -B options, with each -t option naming phase of the compiler that the subsequent -B option affects. If followed by the prefix option -M, the name of the compiler phase in question is prefixed by the string named in the -M option. For example, the command cc -t0 -B/usr/fred/cc -Mnew a.c tells the compiler to look for /usr/fred/cc/newcc0 and execute instead of the usual cc0. -c Compile option. Suppress linking and the removal of the object files. -Dname[=value] Define name to the preprocessor, as if set by a #define directive. If value is present, it is used to initialize the definition. -E Expand option. Run the C preprocessor cpp and write its output onto the standard output. -f Floating-point option. Include the version of printf() that converts floating-point numbers to text. If a program is compiled without the - f option but attempts to print a floating-point number during execution by using the e, f, or g format specifications to printf(), the program prints the error message You must compile with -f option for floating point and exits. Note that if you wish to include the libm library routines that perform floating-point mathematics functions, you must specify -lm on the command line to load the library libm.a. -g Generate debugging information. Same as option -VDB, described below. -Iname Include option. Specify a directory the preprocessor should search for files given in #include directives, using the following criteria: If the #include statement reads #include "file.h" cc searches for file.h first in the source directory, then in the directory named in the -Iname option, and finally in the system's default directories. If the #include statement reads #include <file.h> cc searches for file.h first in the directories named in the -Iname option, and then in the system's default directories. Multiple -Iname options are executed in the order of their appearance. -K Keep option. Do not erase the intermediate files generated during compilation. Temporary files will be written into the current directory. -Ldirectory Tell the linker ld to search directory for its libraries before it searches the directories named in the environmental variable LIBPATH. You can use multiple -L options in a cc command. -lname Pass the name of a library to the linker. cc expands -lname into /lib/libname.a. If an alternative library prefix has been specified by the -tl and -Bstring options, then -lname expands to stringlibname.a. Note that this is a linker option, and so must appear at the end of the cc command line, or it will not be processed correctly. -Mstring Machine option. Use an alternate version of cc0, cc1, cc1a, cc1b, cc2, cc3, as, lib*.a, and crts0.o, named by fixing string between the directory name and the pass and file names. For examples, see the description of option -B, above. Before release 4.0 of COHERENT, cc executed the compiler phases /lib/cc0 through /lib/cc3. Beginning with release 4.0, cc itself contains all the compiler phases; the preprocessor /lib/cpp executes the parser /lib/cc0, but compiler phases /lib/cc[123] do not exist for cc. -o name Output option. Rename the executable file from the default to name. Unlike UNIX, the COHERENT implementation of cc by default names an executable after the first first .c or .o file given on the command line, instead of naming it a.out. If you want cc to conform to the UNIX standard, set include the option -o a.out when you set the environmental variable CCHEAD. This environmental variable is described below. Another approach is to invoke make to control compilation. For details, see the Lexicon entry for make. -O Optimize option. Run the code generated by the C compiler through the peephole optimizer. The optimizer pass is mandatory for the i8086, Z8000, and M68000 compilers, and need not be requested. It is optional for the PDP-11 compiler, but is recommended for all files except those that consist entirely of initialized tables of data. -p Generate code to profile functions calls. Programs compiled with this option can be run with the command prof to print a summary of how much time the program spends in each subroutine, to help you optimize your programs. You must use this option to compile each module whose functions you wish to examine; and you must also use this option on the cc command line with which you link the program, to ensure that the appropriate library routines are linked into your executable. -Q Quiet option. Suppress all messages, no matter how awful an error they indicate. -S Suppress the object-writing and link phases, and invoke the disassembler cc3. This option produces an assembly-language version of a C program for examination, for example if a compiler problem is suspected. The assembly-language output file name replaces the .c suffix with .s. This is equivalent to the -VASM option. -Tsize cc writes its temporary data into two 64-kilobytes buffers that grow as needed. The -T option tells cc to use buffers of size bytes each. Setting these to a larger size may help large files compile faster. Setting size to zero forces cc to use temporary files written onto the disk. -tphase Take option. Use an alternate versions of the phase or phases of the compiler specified by phase, which must consist of one or more of the characters 01ab23sdlrt. If no phase string appears, cc uses alternate version of every phase of the compiler, except the preprocessor. If the -t option is followed by a -B option, cc prefixes the path named in the -B option to the phases and files named in the -t option. For examples, see the description of option -B, above, -Uname Undefine symbol name. Use this option to undefine symbols that the preprocessor defines implicitly, such as the name of the native system or machine. Users who wants serious ISO namespace compliance should compile with the options: -UCOHERENT -UMWC -U_I386 -U_IEEE These options turn off the macros COHERENT, MWC, _I386, and _IEEE, all of which are automatically defined by the COHERENT preprocessor. -V Verbose option. cc prints onto the standard output a step-by-step description of each action it takes. -Vstring Variant option. Toggle (i.e., turn on or off) the variant string during the compilation. Variants that are marked on are turned on by default. Options marked Strict: generate messages that warn of the conditions in question. cc recognizes the following variants: -VASM Output assembly-language code. Identical to -S option, above. Default is off. -VCOMM Permit .com-style data items. Default is on. -VCPLUS Ignore C++-style comments, which are deliminted by `//'. -VDB Generate debugging information, same as option -g described above. Default is off. -VFLOAT Include floating-point printf() code. Same as option -f, described above. -VNDP Generate code to execute hardware floating-point arithmetic. cc executes floating-point arithmetic on an 80387 or 80486-DX, if present; or use software emulation if it is not. For more information, see the section on hardware floating-point arithmetic, below. -VNOWARN Suppress all warning and strict messages. Use this option if you wish to suppress cascades of warning message about, say, nested comments. -VPROF Same as the option -p, described above. -VPSTR ``imPure'' strings: Place all string literals into the .data segment rather than in .text. This may be necessary for sloppily written code that assumes it can overwrite string literals. -VQUIET Suppress all messages. Identical to -Q option. Default is off. -VS Turn on all strict checking. Default is on. -VSBOOK Strict: note deviations from The C Programming Language, ed. 1. Default is off. -VSCCON Strict: note constant conditional. Default is off. -VSINU Implement struct-in-union rules instead of Berkeley-member resolution rules. Default is off, i.e., Berkeley rules are the default. -VSLCON Strict: int constant promoted to long because value is too big. Default is on. -VSMEMB Strict: check use of structure/union members for adherence to standard rules of C. Default is on. -VSNREG Strict: register declaration reduced to auto. Default is on. -VSPVAL Strict: pointer value truncated. Default is off. -VSRTVC Strict: risky types in truth contexts. Default is off. -VSTAT Give statistics on optimization. -VSUREG Strict: note unused registers. Default is off. -VSUVAR Strict: note unused variables. Default is on. -VVERSION Print to the standard error the compiler's version number. This information is useful when reporting bugs. -VWIDEN Warn the user if a parameter is widened from char or short to int, or from float to double. Default is off. -V3GRAPH Translate ANSI trigraphs. Default is off. cc reads the environmental variables CCHEAD and CCTAIL and appends their contents to, respectively, the beginning and the end of the cc command. For example, if you insert the following entries into your .profile export CCHEAD='-f -o a.out' export CCTAIL=-lm then cc will always use the floating-point version of printf(), always write its executable into file a.out, and always link in the mathematics library libm. In effect, it turns the command cc hello.c into: cc -f -o a.out hello.c -lm If you set a command option in CCHEAD or CCTAIL, you can always override it for specific cc commands. For example, if you have set -o a.out in CCHEAD, typing the command cc -o hello hello.c generates the command: cc -o a.out -o hello hello.c The latter -o option is the one used, and in effect cancels the effect of the CCHEAD entry. Thus, setting CCHEAD and CCTAIL give you a flexible way to set cc's default behavior. Note that CCHEAD='-Wa,-f -Wl,-oa.out' will give you a compilation environment that matches that of the UNIX operating system. Linking Objects The linker ld does not know about paths: it links exactly what you tell it to link via the cc command line. cc looks for compiler phases and for runtime startoff and library by searching the directories named in the environmental variable LIBPATH. If you do not define LIBPATH in your environment, it searches the default LIBPATH as defined in /usr/include/path.h. If you define LIBPATH, cc searches the directories in the order you specify. For example, a typical definition is: export LIBPATH=:/lib:/usr/lib This searches the current directory `.', then /lib, then /usr/lib. Hardware Floating-Point Arithmetic The C compiler shipped with version of COHERENT prior to release 4.2 generated software floating-point calls. That is, floating-point code such as d1 = d2 + 2.5; generated calls to software routines to perform the desired operations. This is called ``software floating-point arithmetic''. Beginning with release 4.2.05 of COHERENT, cc generates software floating- point arithmetic by default, but let you select ``hardware floating-point arithmetic''. With hardware floating-point arithmetic, cc generates calls to execute floating-point operations on a numeric data processor (NDP), such as the 80387. To do so, use the option -VNDP. A program compiled to perform hardware floating-point arithmetic runs correctly on any computer: if the computer contains an NDP, the code executes on that part; but if the computer does not contain an NDP, the code emulates the operation of the NDP. Note that persons who do not have an NDP on their system must have the floating-point emulation module linked into their kernels; those who do have an NDP, however, do not need this module. The libraries in directories /lib and /usr/lib are compiled using software floating-point arithmetic; the libraries compiled with hardware floating-point arithmetic are kept in sub-directories /lib/ndp and /usr/lib/ndp. As mentioned above, code compiled to use hardware floating-point arithmetic runs much faster when your machine has an NDP installed. If your system does not have a numeric co-processor (i.e., an 80387, 80487, an 80486DX, or a Pentium) and you wish to run programs that intensively use floating-point arithmetic, we strongly urge you to consider upgrading your system to use an NDP. Files /bin/cc -- C compiler See Also as, C language, cc0, cc1, cc2, cc3, commands, C preprocessor, cpp, ld, LIBPATH, make, makedepend, TMPDIR The C Language tutorial Diagnostics The following gives the error messages returned by the COHERENT C compiler. The messages are in alphabetical order, and each is marked as to whether it is a fatal, error, warning, or strict condition. A fatal message usually indicates a condition that caused the compiler to terminate execution. Fatal errors from the later phases of compilation often cannot be fixed, and may indicate problems in the compiler or assembler. An error message points to a condition in the source code that the compiler cannot resolve. This almost always occurs when the program does something illegal, e.g., has unbalanced braces. Warning messages point out code that is compilable, but may produce trouble when the program is executed. A strict message refers to a passage in the code that is unorthodox and may not be portable. For error messages produced by the assembler as, the linker ld, and the preprocessor cpp, see their respective entries in the Lexicon. ambiguous reference to ``string'' (error) string is defined as a member of more than one struct or union, is referenced via a pointer to one of those structs or unions, and there is more than one offset that could be assigned. argument list has incorrect syntax (error) The argument list of a function declaration contains something other than a comma-separated list of formal parameters. array bound must be a constant (error) An array's size can be declared only with a constant; you cannot declare an array's size by using a variable. For example, it is correct to say foo[5], but illegal to say bar = 5; foo[bar]; array bound must be positive (error) An array must be declared to have a positive number of elements. The array flagged here was declared to have a negative size, e.g., foo[- 5]. array bound too large (error) The array is too large to be compiled with 32-bit index arithmetic. You should devise a way to divide the array into compilable portions. array row has 0 length (error) This message can be triggered by either of two problems. The first problem is declaring an array to have a length of zero; e.g., foo[0]. The second problem is failing to declare the size of a dimension other than the first in a multi-dimensional array. C allows you to declare an indefinite number of array elements of n bytes each, but you cannot declare n array elements of an indefinite length. For example, it is correct say foo[][5] but illegal to say foo[5][]. associative expression too complex (fatal) An expression that uses associative binary operators (e.g., `+') has too many operators; for example, i=i1+i2+i3+ . . . +i30;. You should simplify the expression. bad argument storage class (error) An argument was assigned a storage class that the compiler does not recognize. The only valid storage class is register. bad external storage class (error) An extern has been declared with an invalid storage class, e.g., register or auto. bad field width (error) A field width was declared either to be negative or to be larger than the object that holds it. For example, char foo:9 or char foo:-1 will trigger this error. bad filler field width (error) A filler field width was declared either to be negative or to be larger than the object that holds it. For example, char foo:9 or char foo:-1 will trigger this error. bad flexible array declaration (error) A flexible array is missing an array boundary; e.g., foo[5][]. C permits you to declare an indefinite number of array elements of n bytes each, but you cannot declare an array to have n elements of an indefinite number of bytes each. break not in a loop (error) A break occurs that is not inside a loop or a switch statement. call of non function (error) What the program attempted to call is not a function. Check to make sure that you have not accidentally declared a function as a variable; e.g., typing char *foo; when you meant char *foo();. cannot add pointers (error) The program attempted to add two pointers. ints or longs may be added to or subtracted from pointers, and two pointers to the same type may be subtracted, but no other arithmetic operations are legal on pointers. cannot apply unary `&' to a register variable (error) Because register variables are stored within registers, they do not have addresses, which means that the unary & operator cannot be used with them. cannot cast double to pointer (error) The program attempted to cast a double to a pointer. This is illegal. cannot cast pointer to double (error) The program attempted to cast a pointer to a double. This is illegal. cannot cast structure or union (error) The program attempted to cast a struct or a union. This is illegal. cannot cast to structure or union (error) The program attempted to cast a variable to a union or struct. This is illegal. cannot declare array of functions (error) For example, the declaration extern int (*f)[](); declares f to be an array of pointers to functions that return ints. Arrays of functions are illegal. cannot declare flexible automatic array (error) The program does not explicitly declare the number of elements in an automatic array. cannot initialize fields (error) The program attempted to initialize bit fields within a structure. This is not supported. cannot initialize unions (error) The program attempted to initialize a union within its declaration. unions cannot be initialized in this way. string: cannot reopen (fatal) The optimizer cannot reopen a file with which it has worked. Make sure that your mass storage device is working correctly and that it is not full. case not in a switch (error) The program uses a case label outside of a switch statement. See the Lexicon entry for case. character constant overflows long (error) The character constant is too large to fit into a long. It should be redefined. character constant promoted to long (warning) A character constant has been promoted to a long. class not allowed in structure body (error) A storage class such as register or auto was specified within a structure. compound statement required (error) A construction that requires a compound statement does not have one, e.g., a function definition, array initialization, or switch statement. constant expression required (error) The expression used with a #if statement cannot be evaluated to a numeric constant. It probably uses a variable in a statement rather than a constant. constant ``number'' promoted to long (warning) The compiler promoted a constant in your program to long; although this is not strictly illegal, it may create problems when you attempt to port your code to another system, especially if the constant appears in an argument list. constant used in truth context (strict) A conditional expression for an if, while, or for statement has turned out to be always true or always false. For example, while(1) will trigger this message. construction not in Kernighan and Ritchie (strict) This construction is not found in The C Programming Language; although it can be compiled by COHERENT, it may not be portable to another compiler. continue not in a loop (error) The program uses a continue statement that is not inside a for for while loop. declarator syntax (error) The program used incorrect syntax in a declaration. default label not in a switch (error) The program used a default label outside a switch construct. See the Lexicon entry for default. divide by zero (warning) The program will divide by zero if this code is executed. Although the program can be parsed, this statement may create trouble if executed. duplicated case constant (error) A case value can appear only once in a switch statement. See the Lexicon entries for case and switch. empty switch (warning) A switch statement has no case labels and no default labels. See the Lexicon entry for switch. error in enumeration list syntax (error) The syntax of an enumeration declaration contains an error. error in expression syntax (error) The parser expected to see a valid expression, but did not find one. exponent overflow in floating point constant (warning) The exponent in a floating point constant has overflowed. The compiler has set the constant to the maximum allowable value, with the expected sign. exponent underflow in floating point constant (warning) The exponent in a floating point constant has underflowed. The compiler has set the constant to zero, with the expected sign. expression too complex (fatal) The code generator cannot generate code for an expression. You should simplify your code. external syntax (error) This could be one of several errors, most often a missing `{'. file ends within a comment (error) The source file ended in the middle of a comment. If the program uses nested comments, it may have mismatched numbers of begin-comment and end-comment markers. If not, the program began a comment and did not end it, perhaps inadvertently when dividing by *something, e.g., a=b/*cd;. function cannot return a function (error) The function is declared to return another function, which is illegal. A function, however, can return a pointer to a function, e.g., int (*signal(n, a))() function cannot return an array (error) A function is declared to return an array, which is illegal. A function, however, can return a pointer to a structure or array. functions cannot be parameters (error) The program uses a function as a parameter, e.g., int q(); x(q);. This is illegal. identifier ``string'' is being redeclared (error) The program declares variable string to be of two different types. This often is due to an implicit declaration, which occurs when a function is used before it is explicitly declared. Check for name conflicts. identifier ``string'' is not a label (error) The program attempts to goto a nonexistent label. identifier ``string'' is not a parameter (error) The variable ``string'' did not appear in the parameter list. identifier ``string'' is not defined (error) The program uses identifier string but does not define it. identifier ``string'' not usable (error) string is probably a member of a structure or union which appears by itself in an expression. illegal character constant (error) A legal character constant consists of a a backslash `\' followed by a, b, f, n, r, t, v, x, or up to three octal digits. illegal character (number decimal) (error) A control character was embedded within the source code. number is the decimal value of the character. illegal # construct (error) The parser recognizes control lines of the form #line_number (decimal) or #file_name. Anything else is illegal. illegal integer constant suffix (error) Integer constants may be suffixed with u, U, l, or L to indicate unsigned, long, or unsigned long. illegal label ``string'' (error) The program uses the keyword string as a goto label. Remember that each label must end with a colon. illegal operation on ``void'' type (error) The program tried to manipulate a value returned by a function that had been declared to be of type void. illegal structure assignment (error) The structures have different sizes. illegal subtraction of pointers (error) A pointer can be subtracted from another pointer only if both point to objects of the same size. illegal use of a pointer (error) A pointer was used illegally, e.g., multiplied, divided, or &-ed. You may get the result you want if you cast the pointer to a long. illegal use of a structure or union (error) You may take the address of a struct, access one of its members, assign it to another structure, pass it as an argument, and return. All else is illegal. illegal use of floating point (error) A float was used illegally, e.g., in a bit-field structure. illegal use of ``void'' type (error) The program used void improperly. Strictly, there are only void functions; COHERENT also supports the cast to void of a function call. illegal use of void type in cast (error) The program uses a pointer where it should be using a variable. inappropriate signed (error) The signed modifier may only be applied to char, short, int, or long types. inappropriate ``long'' (error) Your program used the type long inappropriately. inappropriate ``short'' (error) Your program used the type short inappropriately. inappropriate ``unsigned'' (error) Your program used the type unsigned inappropriately. indirection through non pointer (error) The program attempted to use a scalar (e.g., a long or int) as a pointer. This may be due to not de-referencing the scalar. initializer too complex (error) An initializer was too complex to be calculated at compile time. You should simplify the initializer to correct this problem. integer pointer comparison (strict) The program compares an integer or long with a pointer without casting one to the type of the other. Although this is legal, the comparison may not work on machines with non-integer size pointers, e.g., Z8001 or LARGE-model on the i8086 family, or on machines with pointers larger than ints, e.g., the M68000 family of microprocessors. integer pointer pun (strict) The program assigns a pointer to an integer, or vice versa, without casting the right-hand side of the assignment to the type of the left- hand side. For example, char *foo; long bar; foo = bar; Although this is permitted, it is often an error if the integer has less precision than the pointer does. Make sure that you properly declare all functions that returns pointers. internal compiler error (fatal) The program produced a state that should not happen during compilation. Try to localize the offending statement if at all possible. Forward a minimal program that exhibits the error, preferably on a machine-readable medium, to Mark Williams Company, together with the version number of the compiler, the command line used to compile the program, and the system configuration. For immediate advice during business hours, telephone Mark Williams Company technical support. ``string'' is a enum tag (error) 7 ``string'' is a struct tag (error) 7 ``string'' is a union tag (error) string has been previously declared as a tag name for a struct, union, or enum, and is now being declared as another tag. Perhaps the structure declarations have been included twice. ``string'' is not a tag (error) A struct or union with tag string is referenced before any such struct or union is declared. Check your declarations against the reference. ``string'' is not a typedef name (error) string was found in a declaration in the position in which the base type of the declaration should have appeared. string is not one of the predefined types or a typedef name. See the Lexicon entry on typedef for more information. ``string'' is not an ``enum'' tag (error) An enum with tag string is referenced before any such enum has been declared. See the Lexicon entry for enum for more information. class ``string'' [number] is not used (strict) Your program declares variable string or number but does not use it. label ``string'' undefined (error) The program does not declare the label string, but it is referenced in a goto statement. left side of ``string'' not usable (error) The left side of the expression string should be a pointer, but is not. lvalue required (error) The left-hand value of a declaration is missing or incorrect. See the Lexicon entries for lvalue and rvalue. member ``string'' is not addressable (error) The array string has exceeded the machine's addressing capability. Structure members are addressed with 16-bit signed offsets on most machines. member ``string'' is not defined (error) The program references a structure member that has not been declared. mismatched conditional (error) In a `?:' expression, the colon and all three expressions must be present. misplaced ``:'' operator (error) The program used a colon without a preceding question mark. It may be a misplaced label. missing ``('' (error) The if, while, for, and switch keywords must be followed by parenthesized expressions. missing ``='' (warning) An equal sign is missing from the initialization of a variable declaration. Note that this is a warning, not an error: this allows COHERENT to compile programs with ``old style'' initializers, such as int i 1. Use of this feature is strongly discouraged, and it will disappear when the ANSI standard for the C language is adopted in full. missing ``,'' (error) A comma is missing from an enumeration member list. missing ``:'' (error) A colon `:' is missing after a case label, after a default label, or after the `?' in a `?'-`:' construction. missing ``;'' (error) A semicolon `;' does not appear after an external data definition or declaration, after a struct or union member declaration, after an automatic data declaration or definition, after a statement, or in a for(;;) statement. missing ``]'' (error) A right bracket `]' is missing from an array declaration, or from an array reference; for example, foo[5. missing ``{'' (error) A left brace `{' is missing after a struct tag, union tag, or enum tag in a definition. missing ``}'' (error) A right brace `}' is missing from a struct, union, or enum definition, from an initialization, or from a compound statement. missing ``while'' (error) A while command does not appear after a do in a do-while() statement. missing label name in goto (error) A goto statement does not have a label. missing member (error) A `.' or `->' is not followed by a member name. missing right brace (error) A right brace is missing at end of file. The missing brace probably precedes lines with errors reported earlier. missing ``string'' (error) The parser cc0 expects to see token string, but sees something else. missing semicolon (error) External declarations should continue with `,' or end with `;'. missing type in structure body (error) A structure member declaration has no type. multiple classes (error) An element has been asigned to more than one storage class, e.g., extern register. multiple types (error) An element has been assigned more than one data type, e.g., int float. nonterminated string or character constant (error) A line that contains single or double quotation marks left off the closing quotation mark. A newline in a string constant may be escaped with `\'. number has too many digits (error) A number is too big to fit into its type. only one default label allowed (error) The program uses more than one default label in a switch expression. See the Lexicon entries for default and switch for more information. out of tree space (fatal) The compiler allows a program to use up to 350 tree nodes; the program exceeded that allowance. parameter string is not addressable (error) The parameter has a stack frame offset greater than 32,767. Perhaps you should pass a pointer instead of a structure. potentially nonportable structure access (strict) A program that uses this construction may not be portable to another compiler. return type/function type mismatch (error) What the function was declared to return and what it actually returns do not match, and cannot be made to match. return(e) illegal in void function (error) A function that was declared to be type void has nevertheless attempted to return a value. Either the declaration or the function should be altered. risky type in truth context (strict) The program uses a variable declared to be a pointer, long, unsigned long, float, or double as the condition expression in an if, while, do, or `?'-`:'. This could be misinterpreted by some C compilers. size of string overflows size_t (strict) A string was so large that it overran an internal compiler limit. You should try to break the string in question into several small strings. size of union ``string'' is not known (error) A pointer to a struct or union is being incremented, decremented, or subjected to array arithmetic, but the struct or union has not been defined. size of string too large (error) The program declared an array or struct that is too big to be addressable, e.g., long a[20000]; on a machine that has a 64-kilobyte limit on data size and four-byte longs. sizeof truncated to unsigned (warning) An object's sizeof value has lost precision when truncated to a size_t integer. sizeof(string) set to number (warning) The program attempts to set the value of string by applying sizeof to a function or an extern; the compiler in this instance has set string to number. storage class not allowed in cast (error) The program casts an item as a register, static, or other storage class. string initializer not terminated by NUL (warning) An array of chars that was initialized by a string is too small in dimension to hold the terminating NUL character. For example, char foo[3] = "ABC". structure ``string'' does not contain member ``m'' (error) The program attempted to address the variable string.m, which is not defined as part of the structure string. structure or union used in truth context (error) The program uses a structure in an if, while, or for, or `?:' statement. switch of non integer (error) The expression in a switch statement is not type int or char. You should cast the switch expression to an int if the loss of precision is not critical. switch overflow (fatal) The program has more than ten nested switches. too many adjectives (error) A variable's type was described with too many of long, short, or unsigned. too many arguments (fatal) No function may have more than 30 arguments. too many cases (fatal) The program cannot allocate space to build a switch statement. too many initializers (error) The program has more initializers than the space allocated can hold. too many structure initializers (error) The program contains a structure initialization that has more values than members. trailing ``,'' in initialization list (warning) An initialization statement ends with a comma, which is legal. type clash (error) The parser expected to find matching types but did not. For example, the types of e1 and e2 in (x) ? e1 : e2 must either both be pointers or neither be pointers. type of function ``string'' adjusted to string (warning) This warning is given when the type of a numeric constant is widened to unsigned, long, or unsigned long to preserve the constant's value. The type of the constant may be explicitly specified with the u or L constant suffixes. type of parameter ``string'' adjusted to string (warning) The program uses a parameter that the C language says must be adjusted to a wider type, e.g., char to int or float to double. type required in cast (error) The type is missing from a cast declaration. unexpected end of enumeration list (error) An end-of-file flag or a right brace occurred in the middle of the list of enumerators. unexpected EOF (fatal) EOF occurred in the middle of a statement. The temporary file may have been corrupted or truncated accidentally. Check your disk drive to see that it is working correctly. union ``string'' does not contain member m (error) The program attempted to address the variable string m, which is not defined as part of the structure string. write error on output object file (fatal) cc could not write the relocatable object module. Most likely, your mass storage device has run out of room. Check to see that your disk drive or hard disk has enough room to hold the object module, and that it is working correctly. zero modulus (warning) The program will perform a modulo operation by zero if the code just parsed is executed. Although the program can be parsed, this statement may create trouble if executed. Notes If you see the message Out of memory when compiling, this probably means that your program has exhausted the buffer space available to it. Use the option -T0 to force cc to write its temporary files on the disk. Prior to COHERENT release 4.2, cc wrote its diagnostic messages to the standard output device. cc now writes its diagnostic messages to the standard error. You may need to modify any scripts that redirect the output of cc.