DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Compiler diagnostics

C compiler diagnostics

This subtopic contains the text and explanation for all the warning and error messages produced by the C compiler. All messages are given as they appear in the C locale. The messages are listed in alphanumeric order (special characters are ignored). Numbers precede capital letters and capital letters precede lowercase letters. n, when it represents a number, comes at the beginning of the list.

The message entries are formatted as follows:

Entry Comment
n extra byte(s) in string literal initializer ignored Text of message.
Type: Warning Options: all Type of message and command-line options which must be set for the message to appear (``all'' indicates that the message is independent of options).
A string literal that initializes a character array contains n more characters than the array can hold. Explanation of message.
char ca[3] = "abcd"; Example of code that might generate the message.
"file", line 1: warning: 1 extra byte(s) in string
literal initializer ignored
Message output.

When an error occurs, the error message is preceded by a file name and line number. All messages output are one line long (no newline characters). The line number is usually the line on which a problem has been diagnosed. Occasionally the compiler must read the next token before it can diagnose a problem, in which case the line number in the message may be a higher line number than that of the offending line.


NOTE: For internationalized systems, the format of the error message output differs slightly. For such systems, the error message will be prefixed by:

UX:acomp:type: error_message

where type is either WARNING or ERROR depending on the type of message. error_message is the message output as shown above.


Note that lint issues all the messages listed in this topic, and additional messages about potential bugs and portability problems.


NOTE: See ``Analyzing your code with lint'' for further information.


Next topic: Message types and applicable options
Previous topic: Compiler diagnostics

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005