## #error

A `#error` directive is encountered in the source file. The other tokens in the directive are printed as part of the message. Example of code that generates the message:

    #define ONE 2
    #if ONE != 1
    #error ONE != 1
    #endif

Message ID: E_ERROR_PRAGMA

## cannot recover from previous errors

Earlier errors in the compilation have confused the compiler, and it cannot continue to process your program. Correct those errors and try again.

Message ID: E_CANNOT_RECOVER

## cannot close the output file

A file system error has occured when the compiler tries to close stdout. This is not an error from the source program.

Message ID: E_FCLOSE_ERR

## cannot close .ll file

A file system error occured when the compiler was closing the lock lint database (.ll) file.

Message ID: E_FCLOSE_LL_ERR

## cannot open file. File create as

The compiler was unable to create the .ll file. This maybe due to a file system error, or incorrect directory or file permissions.

Message ID: E_CANT_CREATE_LL_FILE

## Unable to malloc filename space.

An internal use of malloc() by the compiler has failed. This is most frequently due to having run out of swap space.

Message ID: E_CANT_MALLOC_FILENAME

## Out of memory

The compiler was unable to acquire sufficient memory to compile this program. This is most frequently due to having run out of swap space.

Message ID: E_OUT_OF_MEMORY

## cannot freopen stdout to /dev/null

A file system error has occured when the compiler was trying to redirect an output file to /dev/null.

Message ID: E_CANT_FREOPEN_STDOUT

## floating-point constant folding causes exception

The compiler has detected an overflow at compile time when it attempts an operation between two floating-point operands. The operation causes a floating-point exception that causes the compiler to exit.

Message ID: E_FP_CONST_CAUSE_EXCEPT

## Unable to malloc filename space

An internal use of malloc() by the compiler has failed. This is most frequently due to having run out of swap space.

Message ID: E_CANT_MALLOC_TMP_FILENAME

## cannot create file:

A file system error has prevented the compiler from creating a .ll file. Make sure you have permission to write into the current working directory.

Message ID: E_CANT_OPEN_LL_FILE

## cannot freopen to /dev/null

The compiler cannot discard the lock_lint database file.

Message ID: E_CANT_FREOPEN_LL_DEV_NULL

## #include <... missing ">"

In a `#include` directive for which the header name begins with <, the closing > character is omitted. Example of code that generates the message:

    #include <stdio.h

Message ID: E_INCLUDE_MISSING

## /* encountered inside a comment

This warning is displayed with the `-v` option. There is a /* inside a comment. Example of code that generates the message:

    /*	This is comment
    	that has another /* inside
    	of the comment
    */

Message ID: E_SLASH_STAR_IN_CMNT

## EOF in comment

The compiler encounters end-of-file while reading a comment.

Message ID: E_EOF_IN_COMMENT

## invalid white space character in directive

The only white space characters that are permitted in preprocessing directives are space and horizontal tab. The source code includes some other white space character, such as form feed or vertical tab. The compiler treats this character like a space.

Message ID: E_WHITE_SPACE_IN_DIRECTIVE

## newline in string literal

A string literal has no closing " on the same line as the beginning " . The diagnostic is a warning if the string literal is part of a preprocessing directive (and the compiler provides the missing " ); an error, otherwise. Example of code that generates the message:

    char *p = "abc
    ;

Message ID: E_NEWLINE_IN_STR_LITERAL

## interpreted as a #line directive

This warning is displayed with the `-Xc` option. A source line is encountered that has a number where the directive name usually goes. Such a line is reserved for the compiler's internal use, but it must be diagnosed in the `-Xc` (strictly conforming) mode. Example of code that generates the message:

    # 9

Message ID: E_INTERPRETED_AS_LINE_DIRECTIVE

## invalid directive

The compiler does not recognize the identifier that follows a # in a preprocessing directive line. Example of code that generates the message:

    # unknown foo

Message ID: E_INVALID_DIRECTIVE

## invalid compiler control line in ".i" file

A `.i` file, the result of a `cc -P` command, is assumed to be a reserved communication channel between the preprocessing phase and the compilation phase of the compiler. By examining the `.i` file, you can detect errors that may otherwise be hard to detect. However, the compiler expects to find only a few directives that are used for internal communication. The source file that is compiled (a `.i` file) contains a preprocessing directive other than one of the special directives.

Message ID: E_BAD_COMP_CNTRL_LINE

## directive is an upward-compatible ANSI C extension

This warning is displayed with the `-Xc` option. The compiler sees a directive that it supports, which is not part of the ANSI C standard, and `-Xc` has been selected. Example of code that generates the message:

    #assert system( unix )

Message ID: E_UP_COMPATIBLE_DIRECTIVE

## directive not honored in macro argument list

A directive has appeared between the ( ) that delimits the arguments of a function-like macro invocation. The following directives are disallowed in such a context: `#ident, #include, #line, #undef.` The diagnostic is a warning if it is displayed within a false group of an `if`-group, and an error otherwise. Example of code that generates the message:

    #define flm(a) a+4
    int i = flm(
    #ifdef flm	/* allowed */
    	#undef flm	/* disallowed:  error */
    	4
    #else	/* allowed */
    	#undef flm/* disallowed:  warn */
    	6
    #endif	/* allowed */
    );

Message ID: E_DIRECTIVE_IN_MACRO_LIST

## string literal expected after #file

The #`file` directive (which is reserved for the compilation system) is used for internal communication between preprocessing and compilation phases. A string literal operand is expected as the operand.

Message ID: E_FILE_MISSING_LITERAL

## string literal expected after #ident

A #`ident` directive must be followed by a normal (not wide-character) string literal. Example of code that generates the message:

    #ident no-string

Message ID: E_IDENT_MISSING_LITERAL

## read error:

The compiler was unable to read an input file, probably due to some kind of file system error. This error was most likely issued for an include file.

Message ID: E_READ_ERROR

## too many errors

The compiler has encountered too many errors to make further processing practicable. Rather than producing more diagnostics, the compiler exits.

Message ID: E_TOO_MANY_ERRS

## malloc() fails

An internal use of malloc() by the compiler has failed. This is most frequently due to having run out of swap space.

Message ID: E_MALLOC_FAILS

## realloc() fails

An internal use of realloc() by the compiler has failed. This is most frequently due to having run out of swap space.

Message ID: E_REALLOC_FAILS

## cannot open

The compiler is unable to open an input or output file. Usually, this means the file name argument passed to the `cc` command is incorrect. The explanation in the diagnostic describes why the file cannot be opened. Example of code that generates the message:

    cc badname.c -c x.c

Message ID: E_CANNOT_OPEN

## macro recursion

This message is displayed when a fatal error occurs with the `-Xt` option. The source code calls a macro that calls itself, either directly or indirectly. The ANSI C semantics prevent further attempts to rescan the macro. Older C compilers try to rescan the macro, which eventually leads to a fatal error. Because the rescanning rules are different for ANSI C and its predecessor, the ANSI C compiler provides the old behavior in `-Xt` mode, which includes producing this diagnostic when macro recursion is detected. Example of code that generates the message:

    #define a(x) b(x)
    #define b(x) a(x)
    a(3)

Message ID: E_MACRO_RECURSION

## null character in input

The compiler encounters a null character--one with a character code of zero.

Message ID: E_NULL_CHAR_INPUT

## trigraph sequence replaced

This warning is displayed with the `-Xt` option. ANSI C introduces the notion of trigraphs, three-character sequences that stand for a single character. All such sequences begin with `??`. Because sequences that are interpreted as trigraphs may appear in existing code, the K&R C compiler produces a transitional diagnostic when such sequences are encountered. Example of code that generates the message:

    char *surprise = "this is a trigraph??!";

Message ID: E_TRIGRAPH_REPLACED

## newline not last character in file

Every non-empty source file and header must consist of complete lines. This diagnostic warns that the last line of a file does not end with a newline.

Message ID: E_NEWLINE_NOT_LAST

## EOF in argument list of macro

The compiler reaches end-of-file while reading the arguments for an invocation of a function-like macro. Example of code that generates the message:

    #define mac(a)
    mac( arg1

Message ID: E_EOF_IN_MACRO_ARG

## bad token in #error directive

The tokens in a `#error` directive must be valid C tokens. The source program contains an invalid token. Example of code that generates the message:

    #error 038 - this is an invalid token

Message ID: E_BAD_TOKEN_IN_ERROR_DIRECTIVE

## cannot open include file (too many open files)

The compiler cannot open a new `include` file, because too many other `include` files are already open. The compiler supports at least eight levels of "nesting," up to a maximum defined by the operating system. The most likely reason for the diagnostic is that at some point an `include` file includes a file that has already been included.

Message ID: E_CANT_OPEN_INCLUDE_FILE

## cannot find include file

A file specified in an `#include` directive cannot be located in any of the directories along the search path Example of code that generates the message:

    #include "where_is_it.h"

Message ID: E_CANT_FIND_INCLUDE_FILE

## invalid token

The compiler encounters a sequence of characters that does not comprise a valid token. An invalid token may result from the preprocessing ## operator. The offending non-token is shown. If non-token is longer than 20 characters, the first 20 are printed, followed by ". . .". The offending invalid token is ignored. Example of code that generates the message:

    #define PASTE(l,r) l ## r
    double d1 = 1e;
    double d2 = PASTE(1,e);
    int i = 1veryverylongnontoken;

Message ID: E_INVALID_TOKEN

## invalid input token:

The compiler has not recognized a sequence of characters as a valid C language token. Example of code that generates the message:

    int i = 1$;

Message ID: E_INVALID_INPUT_TOKEN

## invalid token in #define macro parameters

The compiler encounters an inappropriate token while processing the argument list of a function-like macro definition. Example of code that generates the message:

    #define mac(a,4) a b c

Message ID: E_INVALID_TOKEN_IN_DEFINE_MACRO

## invalid token in directive

The compiler finds an invalid token at the end of what would otherwise be a correctly formed directive. Example of code that generates the message:

    #line 7 "file.c

Message ID: E_INVALID_TOKEN_IN_DIRECTIVE

## token not allowed in directive

You have used a token in a #`if` or #`elif` directive that is neither a valid operator for constant expressions, nor a valid integer constant. Example of code that generates the message:

    #if 1 > "1"
    	int i = 1;
    #endif

Message ID: E_TOKEN_ILLEGAL_IN_DIRECTIVE

## invalid use of "defined" operator

A defined operator in a `#if` or `#elif` directive must be followed by an identifier or ( ) that enclose an identifier. The source code does not use it that way. Example of code that generates the message:

    #if defined
    int i = 1;
    #endif

Message ID: E_INVALID_USE_OF_DEFINE

## argument mismatch

The number of arguments passed to a macro is different from the number in the macro definition. Example of code that generates the message:

    #define twoarg(a,b) a+b
    int i = twoarg(4);

Message ID: E_ARGUEMENT_MISMATCH

## token-less macro argument

The actual argument to a preprocessor macro consists of no tokens. The ANSI C standard regards this condition as undefined. The C compiler treats the empty list of tokens as an empty argument. It also issues this warning under the `-Xc` mode. Example of code that generates the message:

    #define m(x) x+3
    int i = m();

Message ID: E_TOKENLESS_MACRO

## invalid target filename

A compiler internal error.

Message ID: E_INVALID_TARGET_FILENAME

## #include directive missing file name

A `#include` directive does not specify a file to include. Example of code that generates the message:

    #include

Message ID: E_INCLUDE_MISSING_FILENAME

## no file name after expansion

You have used the form of the `#include` directive that permits macro expansion of its argument, but the resulting expansion leaves no tokens to be taken as a file name. Example of code that generates the message:

    #define EMPTY
    #include EMPTY

Message ID: E_INCLUDE_EXPANSION_NO_FILE

## empty file name

The file name in a `#include` directive is null. Example of code that generates the message:

    #include <>

Message ID: E_EMPTY_FILE_NAME

## empty header name

The file name after a macro substitution is null. Example of code that generates the message:

    #define NULLNAME <>
    #include NULLNAME

Message ID: E_EMPTY_HEADER_NAME

## No closing >

The closing > is missing from a `#include` directive. Example of code that generates the message:

    #include <stdio.h         /* closing ">" expected */

Message ID: E_NO_CLOSING_GREATER_THAN

## bad file specification

The file specifier in a `#include` directive was neither a string literal nor a well-formed header name. Example of code that generates the message:

    #include stdio.h

Message ID: E_BAD_FILE_SPEC

## 0 is invalid in # < number > directive

The line number in a line number information directive (which the compiler uses for internal communication) must be a positive, nonzero value. Example of code that generates the message:

    # 0 "foo.c"

Message ID: E_ZERO_INVALID_IN_POUND_NUMBER

## 0 is invalid in #line directive

The line number in a `#line` directive must be a positive, nonzero value. Example of code that generates the message:

    #line 0

Message ID: E_ZERO_INVALID_IN_POUND_LINE

## is invalid in #line directive

The line number specified in a #line directive should be less than or equal to 32767. Example of code that generates the message:

    #line 35767 "string"
    #line 35768

Message ID: E_OUT_OF_RANGE_POUND_NUMBER

## string literal expected after # < number >

A # < `number` > directive may only be followed by a string literal. Example of code that generates the message:

    #15 notstring

Message ID: E_STRING_EXPECTED_POUND_NO

## string literal expected after #line < number >

Only a string literal may follow the number in a #`line` directive. Example of code that generates the message:

    #line 12 int

Message ID: E_STRING_EXPECTED_POUND_LINE_NO

## identifier or digit sequence expected after "#"

An invalid token or non-decimal number follows the # that introduces a preprocessor directive line. Example of code that generates the message:

    #0x12

Message ID: E_POUND_NUMBER_EXPECTED

## digit sequence expected after #line

The compiler expects to find the digit sequence that comprises a line number after `#line,` but the token it finds there is either an inappropriate token or a digit sequence whose value is zero. Example of code that generates the message:

    #line 09a

Message ID: E_POUND_LINE_NO_EXPECTED

## no tokens in #line directive

The rest of a `#line` directive is empty; the line number and optional file name are missing. Example of code that generates the message:

    #line

Message ID: E_NO_TOKENS_IN_POUND_LINE

## no tokens after expansion

After macro expansion is applied to the expression in a `#line` directive, there are no tokens left to be interpreted as a line number. Example of code that generates the message:

    #define EMPTY
    #line EMPTY

Message ID: E_NO_TOKENS_AFTER_EXPANSION

## duplicate formal parameter

In a function-like macro definition, a name is used more than once as a formal parameter. Example of code that generates the message:

    #define add3(a,a,c) a + b + c

Message ID: E_DUPLICATE_FORMAL_PARAM

## macro redefined

The source code redefines a macro. Previous releases of K&R C allow such redefinitions if both definitions are identical except for the order and spelling of formal parameters. ANSI C requires that, when a macro is redefined correctly, the definitions must be identical, including the order and spelling of formal parameters. This diagnostic is produced under all options if the new macro definition disagrees with the old one. For strict conformance, it is also produced under the `-Xc` option when the macro definitions disagree only in the spelling of the formal parameters. Example of code that generates the message:

    #define TIMES(a,b) a * b
    #define TIMES(a,b) a - b

Message ID: E_MACRO_REDEFINED

## more than one character honored in character constant

A character constant has an integral value that derives from the character codes of the characters. If a character constant comprises more than one character, the encoding of the additional characters depends on the implementation. This warning alerts you that the encoding that the preprocessing phase uses for a character constant is different in this release of the C compiler from the one in previous releases, which only honors the first character. The encoding for character constants you use in executable code is unchanged. Example of code that generates the message:

    #if 'ab' != ('b' * 256 + 'a')
    #error unknown encoding
    #endif

Message ID: E_MULTI_CHAR_CHAR_CONST

## operand treated as unsigned

This warning is displayed with the `-Xt` option. An operand you have used in a `#if` or `#elif` directive has a value greater than `LONG_MAX` (2147483647), but has no `unsigned` modifier suffix. Previous releases of K&R C treat such constants as `signed` quantities which, because of their values, actually become negative. ANSI C treats such constants as `unsigned` long integers, which may affect their behavior in expressions. This diagnostic is a transition aid that informs you that the value is being treated differently from before. Example of code that generates the message:

    #if 2147483648 > 0
    	char *mesg = "ANSI C-style";
    #endif

Message ID: E_OPERAND_TREATED_AS_UNSIGNED

## #include of /usr/include/... may be non-portable

The source file includes a file with the explicit prefix `/usr/include.` Such an inclusion is implementation-dependent and nonportable. On some systems, the list of default places to look for a header may not include the `/usr/include` directory, in which case the wrong file may be included. Example of code that generates the message:

    #include </usr/include/stdio.h>

Message ID: E_INC_USR_INC_MAY_NOT_PORTABLE

## directive on line has no matching #endif

The compiler has reached the end of the source file without encountering the matching #endif for a previously encountered `#if, #elif, #else, #ifdef,` or `#ifndef` directive. Example of code that generates the message:

    #ifndef STUB
    	TranslationEntry* pageTable = NULL;
      /* the compiler starts looking for #endif after this point */
    #ifdef CHANGED
    	int newfuntion(int a);
    #endif  /* this #endif match with the #ifdef */
      /* the compiler is still looking for #endif after this */
      /* line but no #endif found after this line */

Message ID: E_NO_MATCHING_ENDIF

## #elif has no preceding #if

A `#elif` directive must be part of a preprocessing `if`-section, which begins with a `#if` directive. The code in question lacks the `#if`. Example of code that generates the message:

    #elif defined(TWO)
    	int i = 2;
    #endif

Message ID: E_ELIF_MISSING_IF

## #elif must be followed by a constant expression

There is no expression following the `#elif` directive. Example of code that generates the message:

    #if defined(ONE)
    	int i = 1;
    #elif
    	int i = 4;
    #endif

Message ID: E_ELIF_REQUIRES_CONST_EXP

## #elif follows #else

A preprocessing `if`-section must be in the order `#if,` optional `#elifs,` followed by optional `#else` and `#endif`. The code contains a `#elif` after the `#else` directive. Example of code that generates the message:

    #if
    defined(ONE)
    	int i = 1;
    #elif defined(TWO)
    	int i = 2;
    #else
    	int i = 3;
    #elif defined(FOUR)
    	int i = 4;
    #endif

Message ID: E_ELIF_FOLLOWS_ELSE

## #else has no preceding #if

A `#else` directive is encountered that is not part of a preprocessing `if`-section. Example of code that generates the message:

    #else
    	int i =7;
    #endif

Message ID: E_ELSE_MISSING_IF

## too many #else's

The code contains more than one #`else` directive in a preprocessing `if`-section. All #else directives after the first are taken to be false. Example of code that generates the message:

    #ifdef ONE
    	int i = 1;
    #else
    	int i = 2;
    #else
    	int i = 3
    #endif

Message ID: E_TOO_MANY_ELSES

## #if-less #endif

A `#endif` directive is encountered that is not part of a preprocessing `if`-section. Example of code that generates the message:

    	int i = 1;
    #endif

Message ID: E_IFLESS_ENDIF

## #if must be followed by a constant expression

No expression appears after a `#if` directive. Example of code that generates the message:

    #if
    	int i = 4;
    #endif

Message ID: E_IF_REQUIRES_CONST_EXP

## #ifdef must be followed by an identifier

A `#ifdef` preprocessing directive must be followed by the name of the macro to check for being defined. The source code has omitted the identifier. The `#ifdef` is treated as if it is false. Example of code that generates the message:

    #ifdef
    	int i = 1;
    #endif

Message ID: E_IFDEF_REQUIRES_IDENTIFIER

## #ifndef must be followed by an identifier

The `#ifndef` directive must be followed by the identifier that is to be tested for having been defined. Example of code that generates the message:

    #ifndef
    	int i = 5;
    #endif

Message ID: E_IFNDEF_REQUIRES_IDENTIFIER

## preprocessing a .i file

A .i file has been supplied when using the -P option. For example: cc -P tst.i

Message ID: E_PREPROCESSING_DOT_I_FILE

## stdout I/O error

A file system error has occured while the compiler was accessing standard output (stdout).

Message ID: E_STDOUT_ERROR

## stderr I/O error

A file system error has occured while the compiler was accessing standard error (stderr).

Message ID: E_STDERR_ERROR

## empty #assert directive

A `#assert` directive contains no predicate name to assert. Example of code that generates the message:

    #assert

Message ID: E_EMPTY_ASSERT_DIRECTIVE

## "#assert identifier" expected

In a `#assert` directive, the token following the directive is not the name of the predicate. Example of code that generates the message:

    #assert 5

Message ID: E_ASSERT_IDENTIFIER_EXPECTED

## "#assert identifier (..." expected

In a `#assert` directive, the token following the predicate is not the ( that is expected. Example of code that generates the message:

    #assert system unix

Message ID: E_ASSERT_ID_DOT_DOT_EXPECTED

## no tokens following "#assert name ("

A use of the `#assert` directive is malformed. The assertions and the ) that should follow are missing. Example of code that generates the message:

    #assert system(

Message ID: E_NO_TOKENS_AFTER_ASSERT_NAME

## missing tokens between parentheses

In a `#assert` directive, there are no assertions within the parentheses of the predicate. Example of code that generates the message:

    #assert system()

Message ID: E_ASSERT_NO_TKNS_BETWEEN_PARENS

## "#assert" missing ")"

In a `#assert` directive, the parenthesized form of the assertion lacks a closing ). Example of code that generates the message:

    #assert system(unix

Message ID: E_ASSERT_MISSING_PAREN

## tokens after -A- are ignored

In the -A- option to the `cc` command, there are additional tokens adjacent to the option. They are ignored. Example of code that generates the message:

    cc -A-extra -c x.c

Message ID: E_TOKENS_AFTER_A_IGNORED

## identifier or "-" expected after -A

The `cc` command-line argument `-A` must be followed by the name of a predicate to assert, or by a -, to eliminate all predefined macros and predicates. The token following `-A` is neither of these. Example of code that generates the message:

    cc -A3b2 -c x.c

Message ID: E_IDENTIFIER_EXPECTED_AFTER_A

## identifier expected after "#"

The compiler expects to find an identifier, a predicate name, after a # in a conditional compilation directive, but none is there. Example of code that generates the message:

    #if #system(unix) || #
    	char *os = "sys";
    #endif

Message ID: E_IDENT_EXPECTED_AFTER_POUND

## "(" expected after "#identifier"

When the # operator is used in a `#if` or `#elif` directive to select a predicate instead of a like-named macro, the predicate must be followed by a parenthesized list of tokens. Example of code that generates the message:

    #assert system(unix)
    #define system "unix"
    #if #system
    	char *systype = system;
    #endif

Message ID: E_PAREN_EXPECTED_AFTER_ID_PND

## tokens expected after "# identifier ("

When the # operator is used in a #`if` or #`elif` directive to select a predicate instead of a like-named macro, the predicate must be followed by a parenthesized list of tokens. Example of code that generates the message:

    #if #system(
    	char *system = "unix";
    #endif

Message ID: E_TOKENS_EXPECTED_AFTER_ID_PND

## tokens expected between parentheses

The name of an assertion of a predicate to test is omitted in a #`if` or #`elif` directive. Example of code that generates the message:

    #if #system()
    	char *sysname = "??";
    #endif

Message ID: E_TKNS_EXPECTED_BETWEEN_PARENS

## missing ")"

In a test of a predicate that follows a # operator in a `#if` or `#elif` directive, the `)` that follows the assertion is missing. Example of code that generates the message:

    #if # system(unix
    char *system = "unix";
    #endif

Message ID: E_MISSING_R_PAREN

## empty #unassert directive

A `#unassert` directive contains no predicate name to discard. Example of code that generates the message:

    #unassert

Message ID: E_EMPTY_UNASSERT_DIRECTIVE

## #unassert requires an identifier token

The #`unassert` directive must name a predicate to "un-assert." Example of code that generates the message:

    #unassert 5

Message ID: E_UNASSERT_REQUIRES_IDENTIFIER

## tokens expected after "("

In a #`unassert` directive, the assertions and the closing ) after the predicate are missing. Example of code that generates the message:

    #unassert system(

Message ID: E_TOKENS_EXPECTED_AFTER_L_PAREN

## ")" expected

In a `unassert` directive, the assertion of a predicate to be dropped must be enclosed in parentheses. Example of code that generates the message:

    #unassert system(unix

Message ID: E_R_PAREN_EXPECTED

## empty predicate argument

The compiler expects to find tokens between the ( ) that delimit a predicate's assertions in a `#unassert` directive. None are present. Example of code that generates the message:

    #unassert machine()

Message ID: E_EMPTY_PREDICATE_ARGUMENT

## "(" expected after first identifier

In an `#unassert` directive, the assertion of a predicate to be dropped must be enclosed in parentheses. Example of code that generates the message:

    #unassert system unix

Message ID: E_L_PAREN_EXPECTED_AFT_FIRST_ID

## ANSI C predefined macro cannot be redefined

The source code attempts to define or redefine a macro that is predefined by ANSI C. The predefined macro is unchanged. Example of code that generates the message:

    #define __FILE__ "xyz.c"
    #define __LINE__ "10"
    #define __DATE__ "Jan 21 1993"
    #define __TIME__ "10:20:04"

Message ID: E_CANT_REDEFINE_ANSI_PREDEFINE

## cannot define "defined"

The predefined preprocessing operator "defined" cannot be defined as a macro name. Example of code that generates the message:

    #define defined xyz

Message ID: E_CANNOT_DEFINE_DEFINED

## undefining __STDC__

ANSI C prohibits undefining the predefined symbol `__STDC__`. You may want to use this feature to test C code that you have written to work in both an ANSI C and non-ANSI C environment. For example, suppose you have C code that checks `__STDC__`, declaring function prototype declarations if it is defined, and old-style function declarations or definitions if not. Because the C compiler predefines `__STDC__`, you would ordinarily be unable to check the old-style code, and you would have to run the code through another (non-ANSI C) compiler. By undefining `__STDC__`, usually on the command-line, you can use the C compiler to do the checking. This diagnostic tells you that you are violating ANSI C constraints. Example of code that generates the message:

    #undef __STDC__	/*usually -U__STDC__on cc line */

    #ifdef __STDC__
    int
    myfunc(const char *arg1, int arg2)
    #else	/* non-ANSI C case */
    int
    myfunc(arg1,arg2)
    char *arg1,	/* oops */
    int arg2;
    #endif
    {
    }

Message ID: E_UNDEFINING__STDC__

## ANSI C predefined macro cannot be undefined

The source code contains an attempt to undefine a macro that is predefined by ANSI C. Example of code that generates the message:

    #undef __FILE__
    #undef __LINE__
    #undef __DATE__
    #undef __TIME__

Message ID: E_CANT_UNDEFINE_ANSI_PREDEFINE

## cannot undefine "defined"

The predefined preprocessing operator "defined" cannot be undefined. Example of code that generates the message:

    #undef defined

Message ID: E_CANT_UNDEFINE_DEFINED

## -D option argument not an identifier

An identifier must follow the `cc -D` command-line option. Example of code that generates the message:

    cc -D3b2 -c x.c

Message ID: E_D_OPT_ARG_NOT_AN_IDENTIFIER

## -D option argument not followed by "="

If any tokens follow an identifier in a `-D` command-line option to the `cc` command, the first such token must be =. Example of code that generates the message:

    cc -DTWO+2 -c x.c

Message ID: E_D_OPT_NOT_FOLLOWED_BY_EQUAL

## -U option argument not an identifier

An identifier must follow the `cc -U` command-line option. Example of code that generates the message:

    cc -U3b2 -c x.c

Message ID: E_U_OPT_ARG_NOT_AN_IDENTIFIER

## tokens ignored after "-U{identifier}"

In the command-line that contains the `-U` option, there are tokens following the name of the macro to be undefined. Example of code that generates the message:

    cc -Uunix,u3b2 -c x.c

Message ID: E_TOKENS_IGNORED_AFTER_U_OPT

## empty #define directive line

A `#define` directive lacks both the name of the macro to define and any other tokens. Example of code that generates the message:

    #define

Message ID: E_EMPTY_POIND_DEFINE_DIRECTIVE

## #define requires macro name

A `#define` directive must be followed by the name of the macro to be defined. Example of code that generates the message:

    #define +3

Message ID: E_PND_DEF_REQUIRES_MACRO_NAME

## incomplete #define macro parameter list

In the definition of a function-like parameter, the compiler cannot find a ) character on the same (logical) line as the `#define` directive. Example of code that generates the message:

    #define mac(a

Message ID: E_INCOMPLETE_DEF_MACRO_PARAMS

## syntax error in macro parameters

The macro parameter list of a function-like macro definition is malformed. The list must be a comma-separated list of identifiers. Example of code that generates the message:

    #define mac(a,b,) a b

Message ID: E_SYNTAX_ERROR_IN_MACRO_PARAMS

## bad use of "#" or "##" in macro #define

In a macro definition, a `#` or `##` operator is followed by a `#` or `##` operator. Example of code that generates the message:

    #define bug(s) # # s
    #define bug2(s) # ## s

Message ID: E_BAD_SHARP_OR_SHARPS_IN_MACRO

## cannot begin macro replacement with "##"

The ## operator is a binary infix operator and cannot be the first token in the macro replacement list of a macro definition. Example of code that generates the message:

    #define mac(s) ## s

Message ID: E_CANT_BEGIN_MACRO_WITH_SHARP

## non-formal identifier follows "#" in #define

The identifier that follows a # operator in a macro definition must be a formal parameter of a function-like macro. Example of code that generates the message:

    #define mac(a) "abc" # b

Message ID: E_NON_FORMAL_ID_FOLLOWS_SHARP

## comment is replaced by "##"

This warning is displayed with the `-Xt` option. The diagnostic indicates that the compiler is treating an apparent concatenation as if it were the `##` operator. The source code should be updated to use the new operator. Example of code that generates the message:

    #define PASTE(a,b) a/*GLUE*/b
    int PASTE(prefix,suffix) = 1; /* creates "prefixsuffix" */

Message ID: E_COMMENT_REPLACED_BY_SHARPS

## comment does not concatenate tokens

This warning is displayed with the `-Xa` and `-Xc` options. In previous releases of K&R C, it is possible to "paste" two tokens together by juxtaposing them in a macro with a comment between them. This behavior is never defined or guaranteed. ANSI C provides a well-defined operator, ##, that serves the same purpose and should be used. This diagnostic warns that the old behavior is not being provided. Example of code that generates the message:

    #define PASTE(a,b) a/*GLUE*/b
    int PASTE(prefix,suffix) = 1; /* does not create "prefixsuffix" */

Message ID: E_COMMENT_DOSNT_CONCAT_TOKENS

## macro replacement within a string literal

Previous releases of K&R C allow the value of a formal parameter to be substituted in a string literal that is part of a macro definition. ANSI C does not permit this use. ANSI C provides a way to accomplish the same thing. The # "string-ize" operator turns the tokens of a macro argument into a string literal, and adjacent string literals are concatenated. The correct form is:

    #define HELLO(name) name
    char *hello_mindy = HELLO("Mindy");

Example of code that generates the message:

    #define HELLO(name) "name"
    char *hello_mindy = HELLO(Mindy);

Message ID: E_MACRO_REPLACEMENT_IN_STRING

## macro replacement within a character constant

Previous releases of K&R C allow the value of a formal parameter to be substituted in a character constant that is part of a macro definition. ANSI C does not permit this use. The proper way to express this construct in ANSI C is:

    #define CTRL(x) (x037)  /* form control character */
    int ctrl_c = CTRL('c');

Example of code that generates the message:

    #define CTRL(x) ('x'037)   /* form control character */
    int ctrl_c = CTRL(c);

Message ID: E_MACRO_REPLACEMENT_CHAR_CONST

## no macro replacement within a string literal

This warning is displayed with the `-Xa` or `-Xc` option. It warns you that the macro replacement that is done for -Xt mode is not being done in `-Xa` or `-Xc` mode.

Message ID: E_NO_REPLACEMENT_IN_STRING

## no macro replacement within a character constant

This warning is displayed with the `-Xa` or `-Xc` option. It warns you that the macro replacement that is done for -Xt mode is not being done in `-Xa` or `-Xt` mode.

Message ID: E_NO_REPLACEMENT_IN_CHAR_CONST

## "#" must be followed by formal identifier in #define

The "string-ize" operator # must be followed by the name of a formal parameter in a function-like macro. Example of code that generates the message:

    #define mac(a) # + a

Message ID: E_ID_REQUIRED_FOR_POUND_DEFINE

## cannot end macro replacement with "#" or "##"

A # or ## operator cannot be the last token in the macro replacement list of a macro definition. Example of code that generates the message:

    #define mac1(s) abc ## s ##
    #define mac2(s) s #

Message ID: E_CANT_END_MACRO_WITH_SHARP

## empty #undef directive, identifier expected

A `#undef` directive lacks the name of a macro to "undefine." Example of code that generates the message:

    #undef

Message ID: E_EMPTY_UNDEF_DIRECTIVE

## identifier expected after #undef

A `#undef` must be followed by the name of the macro to be undefined. The token following the directive is not an identifier. Example of code that generates the message:

    #undef 4

Message ID: E_ID_EXPECTED_AFTER_UNDEF

## tokens ignored at end of directive line

A directive line contains extra tokens that are not expected as part of the directive. Example of code that generates the message:

    #undef a b	/* can only undefine one */

Message ID: E_TKNS_IGNORED_AT_END_OF_DIR

## number expected

The compiler cannot find a number where it expects to find one in a `#if` or `#elif` directive. Example of code that generates the message:

    #if 1 +
    	int i = 1;
    #endif

Message ID: E_NUMBER_EXPECTED

## missing operator

The constant expression of a preprocessing conditional compilation directive is malformed. An operator is expected, but not encountered. Example of code that generates the message:

    #if 1 4
    	int i = 1;
    #endif

Message ID: E_MISSING_OPERATOR

## unexpected ")"

A misplaced ) has been detected in a #`if` or #`elif` directive. Example of code that generates the message:

    #if ) 1
    	int i = 1;
    #endif

Message ID: E_UNEXPECTED_R_PAREN

## unexpected "("

A misplaced ( has been detected in a #`if` or #`elif` directive. Example of code that generates the message:

    #if 1 (
    int i = 1;
    #endif

Message ID: E_UNEXPECTED_L_PAREN

## missing operand

The constant expression of a preprocessing conditional compilation directive is malformed. An expected operand for some operator is missing. Example of code that generates the message:

    #define EMPTY
    #if EMPTY / 4
    	int i = 1;
    #endif

Message ID: E_MISSING_OPERAND

## division by 0

An expression contains a division by zero that is detected at compile-time. If the division is part of a `#if` or `#elif` directive, the result is taken to be zero. The diagnostic is a warning if the division is in executable code, an error if the expression is in a global or `static` initializer. Example of code that generates the message:

    f(void) {
    	int i = 1/0;
    }

Message ID: E_DIVISION_BY_ZERO

## modulus by 0

The second operand of a `%` operator is zero. If the modulus operation is part of a `#if` or `#elif` directive, the result is taken to be zero. The diagnostic is a warning if the modulus is in executable code, an error if the expression is in a global or `static` initializer. Example of code that generates the message:

    #if 42 % 0
    	int i = 1;
    #endif

Message ID: E_MODULUS_BY_ZERO

## dubious escape: \c

Only certain characters can follow \ in string literals and character constants; `c` is not one of them. ANSI C ignores the \. Example of code that generates the message:

    int i = '\c';

Message ID: E_DUBIOUS_ESCAPE_CHAR

## dubious escape

Only certain non-printing characters can follow \ in string literals and character constants. The value between the angle brackets in the diagnostic is the character's code, printed as a hexadecimal number.

Message ID: E_DUBIOUS_ESCAPE_UNPRINTABLE

## \a is ANSI C "alert" character

This warning is displayed with the `-Xt` option. In other K&R C compilers, '\a' is equivalent to 'a'. However, ANSI C defines '\a' to be an alert character. In this implementation, the corresponding character code is 07, the BEL character. Example of code that generates the message:

    int c = '\a';

Message ID: E_ESC_A_IS_ANSI_ALERT

## \x is ANSI C hex escape

When specifying -Xs or -Xt compilation modes the compiler treats "\x" as the character "x". But with ANSI C modes (-Xa and -Xc) of compilation

      "\x<hexadecimal-digits>"

specifies a hexadecimal escape sequence. Example of code that generates the message when compiled with -Xs option:

    char *cp = "This is a hex escape sequence for 254: \xfe";

Message ID: E_ESC_X_IS_ANSI_HEX_ESCAPE

## no hex digits follow \x

This warning is displayed with the `-Xa` or `-Xc` option. The \x escape in character constants and string literals introduces a hexadecimal character escape. \x must be followed by at least one hexadecimal digit. Example of code that generates the message:

    char *cp = "&\xz";

Message ID: E_NO_HEX_DIGITS_AFTER_ESCAPE_X

## overflow in hex escape

In a hexadecimal escape (`\x`) in a character constant or string literal, the accumulated value for the escape has grown too large. Only the low-order 32 bits of value are retained. Example of code that generates the message:

    int i = '\xabcdefedc';

Message ID: E_OVERFLOW_IN_HEX_ESCAPE

## empty character constant

A character constant consisting of no characters has been used. Example of code that generates the message:

    f(void) {

    char c = '';    /* suggestion: char c = ' ';      */
    }

Message ID: E_EMPTY_CHAR_CONSTANT

## character constant too long

The character constant contains too many characters to fit in an integer. Only the first four characters of a regular character constant, and only the first character of a wide character constant, are used. Character constants that are longer than one character are nonportable. Example of code that generates the message:

    int i = 'abcde';

Message ID: E_CHAR_CONST_TOO_LONG

## invalid multibyte character

A multibyte character in a string literal or character constant cannot be converted to a single wide character in the host environment. Or a multibyte character found elsewhere is being ignored.

Message ID: E_INVALID_MULTIBYTE_CHAR

## character escape does not fit in character

A hexadecimal or octal escape sequence in a character constant or string literal produces a value that is too big to fit in an `unsigned char`. The value is truncated to fit. Example of code that generates the message:

    char *p = "\x1ff\400";

Message ID: E_CHAR_ESC_DOES_NO_FIT_IN_CHAR

## bad octal digit

This warning is displayed with the `-Xt` option. An integer constant that begins with 0 includes a non-octal digit. An 8 is taken to have value 8, and a 9 is taken to have value 9, even though they are invalid. Example of code that generates the message:

    int i = 08;

Message ID: E_BAD_OCTAL_DIGIT

## mismatched parentheses

Parentheses are mismatched in a preprocessing conditional compilation directive. Example of code that generates the message:

    #if ((1)
    	int i = 1;
    #endif

Message ID: E_MISMATCHED_PARENS

## mismatched "?" and ":"

An expression in a `#if` or `#elif` directive contains a malformed `?~:` expression. Example of code that generates the message:

    #if defined(foo) ? 5
    	int i;
    #endif

Message ID: E_MISMATCHED_TERNARY_OP

## empty constant expression after macro expansion

A `#if` or `#elif` directive contains an expression that, after macro expansion, consists of no tokens. Example of code that generates the message:

    #define EMPTY
    #if EMPTY
    	char *mesg = "EMPTY is non-empty";
    #endif

Message ID: E_EMPTY_CONST_EXP_AFTER_EXPAND

## preprocessor: cannot duplicate stdout

A file system error has occured while the compiler was accessing standard output (stdout).

Message ID: E_CANT_DUP_STDOUT

## preprocessor: cannot open alternate stdout

A file system error has occured while the compiler was accessing standard output (stdout).

Message ID: E_CANT_OPEN_ALT_STDOUT

## preprocessor: Can't open /dev/null

A file system error has occured while the compiler was accessing /dev/null.

Message ID: E_CANT_OPEN_DEV_NULL

## temporary file write failed: file system full

While writing intermediate files, the compiler runs out of disk space. Verify that the file system on which the temporary files are written has enough free space before starting the compilation. Use the `TMPDIR` environment variable to specify an alternative location for the compiler to write temporary files.

Message ID: E_TMPFILE_FILE_SYSTEM_FULL

## undefined or missing type

In a function definition, a parameter has been declared with invalid type information. Either the type has not been defined, or an identifier not representing a type has been used as a type. This warning is usually issued after a syntax error message. Example of code that generates the message:

    int f1(what arg)
    {
    }

Message ID: E_UNDEFINED_OR_MISSING_TYPE

## syntax error before or at:

This is an all-purpose diagnostic indicating one of many possible syntactical errors found by the compiler, such as a missing semicolon, a missing closing paren or brace, or juxtaposed language tokens. The token in the diagnostic indicates at what point in the source code, on the indicated line, the compiler recognized the error. Example of code that generates the message:

    f(void){
    	int i = 3	/* Missing semicolon here */
    }

    f(int i){
    	int j;

    	j = (i + 24;	/* Missing closing paren here */
    }

Message ID: E_YACC_GENERIC_ERROR

## syntax error before or at:

This is an all-purpose diagnostic indicating one of many possible syntactical errors found by the compiler, such as a missing semicolon, a missing closing paren or brace, or juxtaposed language tokens. The token in the diagnostic indicates at what point in the source code, on the indicated line, the compiler recognized the error. Example of code that generates the message:

    f(void){
    	int i = 3	/* Missing semicolon here */
    }

    f(int i){
    	int j;

    	j = (i + 24;	/* Missing closing paren here */
    }

Message ID: E_YACC_ERROR

## access through "void" pointer ignored

A pointer to `void` cannot be used to access an object. There is an expression in the source that does an indirection through a (possibly qualified) pointer to `void`. The indirection is ignored, although the rest of the expression (if any) is honored. Example of code that generates the message:

    f(void){
    	volatile void *vp1, *vp2;
    	*(vp1 = vp2);/* assignment does get done */
    }

Message ID: E_ACCESS_VIA_VOID_PTR_IGNORED

## duplicate case in switch

There are two case statements in the current `switch` statement that have the same constant value. Example of code that generates the message:

    f(void){
    	long long i = 5;
    	switch(i) {
    	case 4:
    	case 4:
    		    break;
    	}
    }

Message ID: E_DUP_CASE_IN_SWITCH_L

## duplicate case in switch

There are two case statements in the current `switch` statement that have the same constant value. Example of code that generates the message:

    f(void){
    	int i = 5;
    	switch(i) {
    	case 4:
    	case 4:
    		    break;
    	}
    }

Message ID: E_DUP_CASE_IN_SWITCH

## asm statement illegal outside function

The asm statements may appear only inside a function body, not at the level of an external declaration. Example of code that generates the message:

    asm("   .align  4               ");   /* incorrect */
    void f(void) {
            asm("   nop                     ");   /* correct */

Message ID: E_ASM_ILLEGAL_OUTSIDE_FUNC

## asm() argument must be normal string literal

The argument to an old-style `asm()` must be a normal string literal, not a wide one. Example of code that generates the message:

    asm(L"wide string literal not allowed");

Message ID: E_ASM_ARG_MUST_BE_STRING

## embedded NUL not permitted in asm()

The string literal that appears in an old-style `asm`( ) contains an embedded `NUL` character (character code 0). Example of code that generates the message:

    asm("this is an old-style asm with embedded NUL:  \0");

Message ID: E_EMBEDDED_NUL_ILLEGAL_IN_ASM

## asm() statement disables optimization within function

This warning is displayed with the `-v`, `-O`, and `-xO`[level] options. Optimization is turned off for a function if `asm` statements are found within that function. Example of code that generates the message:

    void foo(void)
    {
    asm(".volatile");
    asm("   st      %g0, [%sp+0x44]");
    asm("   ld      [%sp+0x44], %fsr");
    asm("   nop");
    asm(".nonvolatile");
    }

Message ID: E_ASM_DISABLES_OPTIMIZATION

## empty translation unit

The source file has no tokens in it after preprocessing is complete. The ANSI C standard requires the compiler to diagnose a file that has no tokens in it. Example of code that generates the message:

    #ifdef COMPILE
    	int token;
    #endif

Message ID: E_EMPTY_TRANSLATION_UNIT

## ignores a simple pointer to lock

Lock_lint cannot tell which lock is being manipulated when a simple pointer to lock is used. Example of code that generates the message:

    struct G_Mutex {
    	mutex_t* amutex;
    	int global_data;
    };
    struct G_Mutex* global_mutex;

    int add_data() {
    	mutex_lock(global_mutex->amutex);   /* <=== Warning */
    	global_mutex->global_data++;
    	mutex_unlock(global_mutex->amutex); /* <=== Warning */
    	return global_mutex->global_data;
    }
    ==================
    /* Change the code to a form lock_lint can cope with */
    struct G_Mutex {
    	mutex_t amutex;			        /* <=== OK */
    	int global_data;
    };
    int add_data() {
    	mutex_lock(&global_mutex->amutex);      /* <=== OK */
    	global_mutex->global_data++;
    	mutex_unlock(&global_mutex->amutex);    /* <=== OK */
    	return global_mutex->global_data;
    }

Message ID: E_LOCK_FUNC_IGNORES_PTR

## ?: operator being used to choose the lock parameter for function

The static analysis of your source code by lock_lint cannot determine which parameter is being passed to a function when the `?:` operator is used in a function call. The message indicates which value lock_lint will assume is being passed to the function. Example of code that generates the message:

    mutex_t mutex1;
    mutex_t mutex2;

    mutex_lock((1==1)? &mutex1 : &mutex2);

Message ID: E_CONDITIONAL_OP_LOCK_CHOICE

## will assume this call succeeds in obtaining the lock

The static source code analysis by lock_lint will assume the indicated function succeeded in obtaining a lock. Example of code that generates the message:

    	mutex_t mutex1;
    	if (mutex_trylock(&mutex1))
    	  goto getlock;

Message ID: E_ASSUME_SUCCESSFUL_LOCK

## ?: operator being used to choose the condition variable parameter for func; lock_lint will assume condition variable was chosen

The static analysis of your source code by lock_lint cannot determine which parameter is being passed to a function when the ?: operator is used in a function call. The static source code analysis by lock_lint will assume the indicated condition variable is being passed as a parameter to the indicated function. Example of the code that generates this message:

    int waitWriter;
    f() {
      cond_t condt1, condt2;

      cond_wait((waitWriter == 0) ? condt1 : condt2);
    }

Message ID: E_CONDITIONAL_OP_CONDVAR_CHOICE

## lock_lint ignores a simple pointer to condition variable

Lock_lint ignores a simple pointer to condition variable since it cannot tell which lock is being manipulated. Example of code that generates the message:

      cond_t* ptr;
      int count = 0;   /* share variable */

      while (count == 0)
    	cond_wait(ptr);

    /* If rewritten thusly, lock_lint can analyze it */
      cond_t p;
      while (count == 0)
    	cond_wait(&p);

Message ID: E_CV_FUNC_IGNORES_SIMPLE_PTR

## function requires two arguments

The function requires 2 arguments. You didn't specify the second mutex argument. Example of code that generates the message:

    	kcondvar_t cvp;
    	cv_wait(&cvp);

    /*======================
    ** The correct code should be:
    */
    	kcondvar_t cvp;
    	kmutex_t mp;
    	cv_wait(&cvp, &mp);

Message ID: E_SECOND_MUTEX_MISSING

## operand cannot have void type

One of the operands has `void` type. Example of code that generates the message:

    f(void){
    void v(void);
    int i = v();
    }

Message ID: E_OPERAND_CANT_BE_VOID_TYPE

## whitespace between two character assignment operators

The -Xs option allows whitespace in between two character assignment operators. Character assignment operators consists of :

    	+=, -=, *=, /=, &=, |=, ^=, %=

However, all other compiler modes do not allow whitespace between these operators. Example of code that generates the message:

    	int i + = 1;        /* for operator: +=   */
    	int k - = 1;

Message ID: E_WHITESPACE_IN_CHAR_ASSIGN_OPS

## ANSI C treats constant as unsigned

The type promotion rules for ANSI C are slightly different from those of previous versions of K&R C. In the current release, the default behavior is to duplicate the previous rules. You can obtain the ANSI C interpretation by using the `-Xa` option for the `compiler` command. Previous K&R C type promotion rules are `unsigned` preserving. If one of the operands of an expression is of `unsigned` type, the operands are promoted to a common `unsigned` type before the operation is performed. ANSI C uses value-preserving type promotion rules. An `unsigned` type is promoted to a `signed` type if all its values can be represented in the `signed` type. ANSI C also has a different rule from previous K&R C versions for the type of an integral constant that implicitly sets the `sign` bit. The different type promotion rules may lead to different program behavior for the operators that are affected by the "`unsigned`-ness" of their operands:

    o The division operators:       /, /=, %, %=
    o The right shift operators:    >>, >>=
    o The relational operators:     <, <=, >, >=

The warning message tells you that your program contains an expression in which the behavior of an operator will change in the future. You can guarantee the behavior you want by inserting an explicit cast in the expression. Example of code that generates the message:

    f(void){
    	int i;
    	/* constant is integer in K&R C, unsigned in ANSI C */
    	i /= 0xf0000000;
    }

Message ID: E_ANSI_CONST_UNSIGNED_OP

## semantics of operator change in ANSI C; use explicit cast

The type promotion rules for ANSI C are slightly different from those of previous versions of K&R C. In the current release, the default behavior is to duplicate the previous rules. You can obtain the ANSI C interpretation by using the `-Xa` option for the `cc` command. Previous K&R C type promotion rules are `unsigned` preserving. If one of the operands of an expression is of `unsigned` type, the operands are promoted to a common `unsigned` type before the operation is performed. ANSI C uses value-preserving type promotion rules. An `unsigned` type is promoted to a `signed` type if all its values can be represented in the `signed` type. The different type promotion rules can lead to different program behavior for the operators that are affected by the "`unsigned`-ness" of their operands:

    o The division operators:       /, /=, %, %=
    o The right shift operators:    >>, >>=
    o The relational operators:     <, <=, >, >=

The warning message indicates that your program contains an expression in which the behavior of an operator will change in the future. You can guarantee the behavior you want by inserting an explicit cast in the expression, as follows:

    f(void){
    	unsigned char uc;
    	int i;
    	/* is unsigned divide in K&R C, signed in ANSI C */
    	i /= (unsigned int) uc;
    }

Example of code that generates the message:

    f(void){
    	unsigned char uc;
    	int i;
    	/* is unsigned divide in K&R C, signed in ANSI C */
    	i /= uc;
    }

Message ID: E_SEMANTICS_OF_OP_CHG_IN_ANSI_C

## integral constant too large

An integral constant is too large to fit in an `unsigned long`. Example of code that generates the message:

    int i = 123456789012345678901;

Message ID: E_INTEGRAL_CONSTANT_TOO_LARGE

## constant promoted to unsigned int

The suffixed constant is too large to fit in the type specified by the suffix Hence, it is promoted to an unsigned int.

Message ID: E_CONST_PROMOTED_UNSIGNED_INT

## constant promoted to unsigned long

The suffixed constant is too large to fit in the type specified by the suffix Hence, it is promoted to an unsigned long.

Message ID: E_CONST_PROMOTED_UNSIGNED_LONG

## constant promoted to unsigned long long

This warning is displayed with the `-v` option. The suffixed constant is too large to fit in the type indicated by the suffix, so it is promoted to either a `long long` or an `unsigned long long`. Example of code that generates the message:

    if (9223372036854775807L > 0)  printf("promoted\n");
    if (9223372036854775807UL > 0)  printf("promoted\n");

Message ID: E_CONST_PROMOTED_UNSIGNED_LL

## constant promoted to long

The suffixed constant is too large to fit in the type specified by the suffix Hence, it is promoted to long.

Message ID: E_CONST_PROMOTED_LONG

## constant promoted to long long

This warning is displayed with the `-v` option. The suffixed constant is too large to fit in the type indicated by the suffix, so it is promoted to either a `long long` or an `unsigned long long`. Example of code that generates the message:

    if (9223372036854775807L > 0)  printf("promoted\n");
    if (9223372036854775807UL > 0)  printf("promoted\n");

Message ID: E_CONST_PROMOTED_LONG_LONG

## conversion of floating-point constant to float out of range

A floating-point constant has too large a value to fit in type float. Example of code that generates the message:

    float f = 1e300f;

Message ID: E_CONV_CONST_FP_FLOAT_OUT_RANGE

## conversion of floating-point constant to long double out of range

A floating-point constant has too large a value to fit in type long double.

Message ID: E_CNV_CNST_FP_LONG_DBL_OUTRANGE

## conversion of floating-point constant to double out of range

A floating-point constant has too large a value to fit in type double.

Message ID: E_CONV_CONST_FP_DBL_OUT_RANGE

## syntax error: "&..." invalid

This message is displayed when an error occurs with the `-Xc` option. The program contains &... and is compiled with the `-Xc` option. &... is an invalid ANSI C syntax. Do not use this notation explicitly.

Message ID: E_AND_DOT_DOT_DOT_INVALID

## integral constant expression expected

The compiler requires an integral constant or an expression that can be evaluated at compile time to yield an integral value. The expression contains either a non-integral value, a reference to an object, or an operator that cannot be evaluated at compile-time. Example of code that generates the message:

    int ia[5.0];

Message ID: E_INTEGRAL_CONST_EXP_EXPECTED

## improper member use

Your program contains an expression with a -> or . operator, and the name is not a member of the structure or union that the left side of the operator refers to, but is a member of some other structure or union. This diagnostic is an error if the member is not "unique." A unique member is part of one or more structures or unions, but has the same type and offset in all of them. Example of code that generates the message:

    struct s1 { int x,y; };
    struct s2 { int q,r; };
    f(void){
    	struct s1 *ps1;
    	ps1->r = 3;
    }

Message ID: E_IMPROPER_MEMBER_USE

## undefined struct/union member

The program makes reference to a structure or union member that has not been declared as part of any structure. Example of code that generates the message:

    struct s { int x; };
    f(void){
    	struct s q;
    	q.y = 1;
    }

Message ID: E_UNDEFINED_STRUCT_UNION_MEMBER

## non-unique member requires struct/union pointer

The operand on the left side of a -> operator is not a structure, union, or a pointer to one, and the member name is not unique among all structure and union members that you have declared. You should only use -> with structures or unions, and the member should belong to the structure or union corresponding to the left operand.

Message ID: E_NON_UNIQUE_REQRS_S_U_PTR

## non-unique member requires struct/union object

The operand on the left side of a . operator is not a structure, union, or a pointer to one, and the member name is not unique among all structure and union members that you have declared. You should only use . with structures or unions, and the member should belong to the structure or union corresponding to the left operand. Example of code that generates the message:

    struct s1 { int x,y; };
    struct s2 { int y,z; };
    f(void){
    	long *lp;
    	lp.y = 1;
    }

Message ID: E_NON_UNIQUE_REQRS_S_U_OBJ

## implicitly declaring function to return int

This warning is displayed with the `-v` option. The program calls a function which has not been previously declared. The compiler warns you that it is assuming that the function returns `int.` Example of code that generates the message:

    void v(void){
    	g();
    }

Message ID: E_IMPLICIT_DECL_FUNC_RETURN_INT

## undefined symbol

You have referred to a symbol for which there is no declaration in scope. Example of code that generates the message:

    f(void){
    g(i);
    }

Message ID: E_UNDEFINED_SYMBOL

## using out of scope declaration

You previously declared an object in a scope that is no longer active. In some ANSI C implementations, referring to such an object yields an error; calling such a function is interpreted as calling a function returning `int`. The C compiler remembers the previous declaration and uses it. This warning tells you what the compiler has done. Example of code that generates the message:

    f(void){
    	extern int i;
    	double sin(double);
    }
    g(void){
    	double d = sin(1.5);
    	i = 1;
    }

Message ID: E_USING_OUT_OF_SCOPE_DECL

## cannot take sizeof function

The `sizeof` operator cannot be applied to functions. Example of code that generates the message:

    int f(void);
    int i = sizeof(f);

Message ID: E_CANT_TAKE_SIZEOF_FUNC

## cannot take sizeof function

The `sizeof` operator cannot be applied to functions. Example of code that generates the message:

    int f(void);
    int i = sizeof(f);

Message ID: E_CANT_TAKE_SIZEOF_FUNC_N

## cannot take sizeof void

The `sizeof` operator cannot be applied to type `void`. Example of code that generates the message:

    void v(void);
    int i = sizeof(v());

Message ID: E_CANT_TAKE_SIZEOF_VOID

## cannot take sizeof bit-field

The `sizeof` operator cannot be applied to bit-fields. Example of code that generates the message:

    struct s { int x:3; } st;
    int i = sizeof(st.x);

Message ID: E_CANT_TAKE_SIZEOF_BIT_FIELD

## operands have incompatible types

The types of the operands for an operand are unsuitable for that kind of operator. Example of code that generates the message:

    f(void){
    	char *cp;
    	int *ip;
    	void *vp = ip + cp;
    }

Message ID: E_OPERANDS_INCOMPATIBLE_TYPES

## first operand must have scalar type: op "?:"

The conditional expression in a `?:` expression must have a scalar type: integral, floating-point, or pointer. Example of code that generates the message:

    struct s { int x; } st;
    f(void){
    	int i = st ? 3 :  4;
    }

Message ID: E_FIRST_OPERAND_SCALAR_TYPE

## left operand of "." must be struct/union object

The . operator is only supposed to be applied to structure or union objects. The diagnostic is an error if the operand to the left of . is an array, pointer, function call, enumeration constant or variable, or a register value that is allocated to a register; it is a warning otherwise. Example of code that generates the message:

    f(void){
    	struct s { short s; };
    	int i;
    	i.s = 4;
    }

Message ID: E_DOT_L_OPERAND_NOT_STRUCT_U

## cannot access member of non-struct/union object

The structure or union member must be completely contained within the left operand of the . operator. Example of code that generates the message:

    f(void){
    	struct s { int x; };
    	char c;
    	c.x = 1;
    }

Message ID: E_CANT_ACCESS_MBR_NON_STRUCT_U

## left operand of "->" must be pointer to struct/union

The operand on the left side of a -> operator must be a pointer to a structure or union, but it is not. The diagnostic is a warning if the operand is a pointer, an error otherwise. Example of code that generates the message:

    struct s { int x; };
    f(void){
    	long *lp;
    	lp->x = 1;
    }

    g(void) :
    	struct s newStr;
    	newS->x = 1;
      /* newS is a structure, but not ptr to the structure */
    }

Message ID: E_LEFT_MUST_BE_PTR_TO_STRUCT_U

## operands must have integral type

An operator has been used with operands that are required to be of integral type (`short, int, long,` etc.) but are not, for example using a struct. Example of code that generates the message:

    	struct Astr b;
    	int a = 0x345 & b;

Message ID: E_OPERAND_MUST_BE_INTEGRAL_TYPE

## operands must have arithmetic type

Operands of the unary `-, +` operators have to be of arithmetic type. Example of code that generates the message:

    struct Astr {
    	int a;
    	int b;
    }
    g(void) {
    	struct Astr l;
    	int k = l * 2;   /* l is struct Astr, not of arithmetic type */
    	l = -l;		 /* l is operand of unary "-" or "+" */
    	l = +l;		 /* but l is not arithmetic type     */
    }

Message ID: E_OPERAND_MUST_BE_ARITH_TYPE

## operands must have scalar type

Operands of the unary "!" operator must have scalar type. Or code using operators "++" or "--" expects scalar type. Example of code that generates the message:

    struct aStr{
    	int a;
    	int b;
    };
    g(void) {
    	struct aStr newStr;
    	newStr++;               /* operand of the unary ++ must be scalar */
    	newStr.a++;             /* this is correct */
    }

Message ID: E_OPERAND_MUST_BE_SCALAR_TYPE

## cannot do pointer arithmetic on operand of unknown size

An expression involves pointer arithmetic for pointers to objects whose size is unknown. Example of code that generates the message:

    f(void){
    	struct s *ps;
    	g(ps+1);
    }

Message ID: E_PTR_ARITH_MUST_KNOW_SIZE

## improper pointer subtraction

The operands of a subtraction are both pointers, but they point at different types. You can only subtract pointers of the same type that point to the same array. The diagnostic is a warning if the pointers point to objects of the same size, and an error otherwise. Example of code that generates the message:

    f(void){
    	int *ip;
    	char *cp;
    	int i = ip - cp;
    }

Message ID: E_BAD_POINTER_SUBTRACTION

## function designator is not of function type

You have used an expression in a function call as if it were the name of a function or a pointer to a function when it is not. Example of code that generates the message:

    f(void){
    	char *p;
    	p();
    }

Message ID: E_FUNC_DESIGNATOR_NOT_FUNC_TYPE

## prototype mismatch: n args passed, m expected

You have called a function for which there is a function prototype declaration in scope, and the number of arguments in the call does not match the number of parameters in the declaration n. Example of code that generates the message:

    int f(int);
    g(void){
    	f(1,2);
    }

Message ID: E_PROTOTYPE_MISMATCH_ARGS

## prototype mismatch: n arg passed, m expected

You have called a function for which there is a function prototype declaration in scope, and the number of arguments in the call does not match the number of parameters in the declaration n.

Message ID: E_PROTOTYPE_MISMATCH_ARG

## argument mismatch: n args passed, m expected

This warning is displayed with the `-v` option. At a function call, the compiler has determined that the number of arguments passed to a function disagrees with other information it has about the function. That other information comes from two sources: an old-style (non-prototype) function definition, or a function prototype declaration that has gone out of scope, but whose type information is still remembered. This diagnostic may be incorrect if the old-style function definition case applies and the function takes a variable number of arguments. Example of code that generates the message:

    extern int out_of_scope();
    int f()
    {			/* function takes no args */
    	extern int out_of_scope(int);
    }

    int g()
    {
    	f(1);    /* f takes no args */
    	out_of_scope();	 /* out_of_scope expects one arg */
    }

Message ID: E_ARGS_MISMATCH

## argument mismatch: n arg passed, m expected

This warning is displayed with the `-v` option. At a function call, the compiler has determined that the number of arguments passed to a function disagrees with other information it has about the function. That other information comes from two sources: an old-style (non-prototype) function definition, or a function prototype declaration that has gone out of scope, but whose type information is still remembered. This diagnostic may be incorrect if the old-style function definition case applies and the function takes a variable number of arguments.

Message ID: E_ARG_MISMATCH

## cannot return incomplete type

When a function is called that returns a structure or union, the complete declaration for the structure or union must have been seen already. Otherwise, this message results. Example of code that generates the message:

    f(void){
    	struct s g();
    	g();
    }

Message ID: E_CANT_RETURN_INCOMPLETE_TYPE

## void expressions may not be arguments

A function call contains an argument for which the expression type is `void`. Example of code that generates the message:

    f(void){
    	void v(void);
    	g(v());
    }

Message ID: E_VOID_EXP_MAY_NOT_BE_ARGS

## argument cannot have unknown size

An argument in a function call must have a completed type. You have passed a `struct, union,` or `enum` object whose type is incomplete. Example of code that generates the message:

    f(void){
    	struct s *st;
    	g(*st);
    }

Message ID: E_ARG_CANT_BE_UNKNOWN_SIZE

## argument is incompatible with prototype

You have called a function with an argument whose type cannot be converted to the type in the function prototype declaration for the function. Example of code that generates the message:

    struct s {int x;} q;
    f(void){
    	int g(int,int);
    	g(3,q);
    }

Message ID: E_ARG_INCOMPATIBLE_WITH_ARG

## assignment type mismatch

The operand types for an assignment operation are incompatible. The message is a warning when the types are pointer types that do not match. Otherwise, the message is an error. Example of code that generates the message:

    struct s { int x; } st;
    f(void){
    	int i;
    	char *cp;
    	const char *ccp;
    	i = st;
    	cp = ccp;
    }

Message ID: E_ASSIGNMENT_TYPE_MISMATCH

## invalid cast expression

You cannot apply the cast to the expression because the types are unsuitable for casting. Both the type of the expression being cast and the type of the cast must be scalar types. A pointer can only be cast to or from an integral type. Example of code that generates the message:

    f(void){
    	struct s {int x;} st;
    	int i = (int) st;
    }

Message ID: E_INVALID_CAST_EXPRESSION

## return value type mismatch

You are attempting to return a value from a function that cannot be converted to the return-type of the function. Example of code that generates the message:

    f(void){
    	struct s { int x; } st;
    	return( st );
    }

Message ID: E_RETURN_VALUE_TYPE_MISMATCH

## initialization type mismatch

A variable is being initialized with an initializer of incompatible type. For example, initializing a pointer to point to an object of a different type. Example of code that generates the message:

    struct s { int x; int y; };
    const int i = 10;
    int *j = &i;               /* <====== type mismatch */
    struct s *foo = j;         /* <====== type mismatch */

Message ID: E_INITIALIZATION_TYPE_MISMATCH

## invalid switch expression type

The controlling expression of a `switch` statement cannot be converted to `int`. This message always follows the message `switch expression must have integral type.` Example of code that generates the message:

    f(void){
    	struct s {int x;} sx;
    	switch(sx){
    	case 4:  ;
    	}
    }

Message ID: E_INVALID_SWITCH_EXP_TYPE

## argument does not match remembered type

This warning is displayed with the `-v` option. At a function call, the compiler has determined that the type of the argument passed to a function disagrees with other information it has about the function. That other information comes from two sources: an old-style (non-prototype) function definition, or a function prototype declaration that has gone out of scope, but whose type information is still remembered. The argument in question is promoted according to the default argument promotion rules. This diagnostic may be incorrect if the old-style function definition case applies and the function takes a variable number of arguments. Example of code that generates the message:

    void f(i)
    int i;
    { }

    void g(void)
    {
    	f("erroneous");
    }

Message ID: E_ARG_NOT_MATCH_REMEMBERED_TYPE

## cannot take address of bit-field

You cannot take the address of a bit-field member of a structure or union. Example of code that generates the message:

    f(void){
    	struct s { int x:3, y:4; } st;
    	int *ip = &st.y;
    }

Message ID: E_CANT_TAKE_ADDRESS_BIT_FIELD

## cannot take address of register

You have attempted to take the address of an object that is declared with the register storage class. You cannot do so, whether or not the compiler actually allocates the object to a register. The attempt to take an object's address may have been implicit, such as when an array is dereferenced. The diagnostic is an error if a register is allocated for the object and a warning otherwise. Example of code that generates the message:

    f(void){
    	register int i;
    	register int ia[5];
    	int *ip = &i;
    	ia[2] = 1;
    }

Message ID: E_CANT_TAKE_ADDRESS_REGISTER

## unacceptable operand for unary &

You have attempted to take the address of something whose address cannot be taken. Example of code that generates the message:

    f(void){
    	int *ip = &g();
    }

Message ID: E_BAD_OPERAND_FOR_UNARY_AND

## cannot dereference non-pointer type

The operand of the * (pointer dereference) operator must have pointer type. This diagnostic is also issued for an array reference to a non-array. Example of code that generates the message:

    f(void){
    	int i;
    	*i = 4;
    	i[4] = 5;
    }

Message ID: E_CANT_DEREF_NON_POINTER_TYPE

## controlling expressions must have scalar type

The expression for an `if, for, while,` or `do-while` must be an integral, floating-point, or pointer type. Example of code that generates the message:

    f(void){
    	struct s {int x;} st;
    	while (st) {}
    }

Message ID: E_CNTRL_EXP_MUST_BE_SCALAR_TYPE

## a cast does not yield an lvalue

You cannot apply a cast to the operand that constitutes the object to be changed in an assignment operation. The diagnostic is a warning if the size of the operand type and the size of the type being cast to are the same; otherwise, it is an error. Example of code that generates the message:

    f(void){
    	int i;
    	(long) i = 5;
    	(short) i = 4;
    }

Message ID: E_CAST_DOESNT_YIELD_LVALUE

## operand must be modifiable lvalue

The operand of an operator must be a modifiable `lvalue`, but it is not. Example of code that generates the message:

    f(void){
    int i = --3;
    }

Message ID: E_OPERAND_NOT_MODIFIABLE_LVALUE

## left operand must be modifiable lvalue

The operand on the left side of an operator is not a modifiable `lvalue`; it must be one. Example of code that generates the message:

    f(void){
    	int i = 1;
    	+i -= 1;
    }

Message ID: E_L_OPERAND_NOT_MODIFIABLE_LVAL

## improper cast of void expression

You cannot cast a `void` expression to something other than `void.` Example of code that generates the message:

    f(void){
    	void v(void);
    	int i = (int) v();
    }

Message ID: E_BAD_CAST_OF_VOID_EXP

## enum type mismatch: arg

This warning is displayed with the `-v` option. The program is passing an enumeration constant or object to a function for which a prototype declaration is in scope. The passed argument is of a different enumerated type from the one in the function prototype, which may indicate a programming error. Example of code that generates the message:

    enum e1 { ec11 } ev1;
    enum e2 { ec21 } ev2;
    void ef(enum e1);

    void v(void){
    	ef(ec21);
    }

Message ID: E_ENUM_TYPE_MISMATCH_ARG

## enum type mismatch: op

One of the operands of an operator is an enumeration object or constant, and the other is an enumeration object or constant from a different enumerated type. Example of code that generates the message:

    enum e1 { ec11, ec12 } ev1;
    enum e2 { ec21, ec22 } ev2;
    void v(void){
    	if (ev1 > ec22)
    		;
    }

Message ID: E_ENUM_TYPE_MISMATCH_OP

## void function cannot return value

A `return` statement contains an expression, but the declared type of the function is `void`. Example of code that generates the message:

    void v(void){
    return 3;
    }

Message ID: E_VOID_CANT_RETURN_VALUE

## Unable to malloc ND1 tree space

An internal use of malloc() by the compiler has failed. This is most frequently due to having run out of swap space.

Message ID: E_CANT_MALLOC_ND1_TREE

## unknown operand size

You have applied operator ++, --, or = to an operand whose size is unknown. The operand is usually a pointer to a structure or union whose members have not been declared. Example of code that generates the message:

    f(void){
    	struct s *sp;
    	sp++;
    }

Message ID: E_UNKNOWN_OPERAND_SIZE

## enum constants have different types

This warning is displayed with the `-v` option. You have used a relational operator to compare enumeration constants from two different enumeration types. This may indicate a programming error. The sense of the comparison is known at compile time because the constants' values are known. Example of code that generates the message:

    enum e1 { ec11, ec12 } ev1;
    enum e2 { ec21, ec22 } ev2;
    void v(void){
    	if (ec11 > ec22)
    		;
    }

Message ID: E_ENUM_CONSTS_HAVE_DIFF_TYPES

## operands have incompatible pointer types

You have applied an operator to pointers to different types. Example of code that generates the message:

    f(void){
    	char *cp;
    	int *ip;
    	if (ip < cp)
    		;
    }

Message ID: E_OPERANDS_INCOMPAT_PTR_TYPES

## improper pointer/integer combination

One of the operands of an operator is a pointer and the other is an integer; this combination is invalid. Example of code that generates the message:

    f(void){
    	int i = "abc";
    	int j = i ? 4 :  "def";
    }

Message ID: E_BAD_PTR_INT_COMBINATION

## improper pointer/integer combination

At a function call for which there is a function prototype declaration in scope, the code is passing an integer where a pointer is expected, or vice versa. Example of code that generates the message:

    int f(char *);
    g(void){
    	f(5);
    }

Message ID: E_BAD_PTR_INT_COMB_ARG

## long long not allowed in Xc mode

long long int and unsigned long long int are not standard C types, and thus are not available when using the -Xc option.

Message ID: E_LONG_LONG_NOT_ALLOWED_XC

## invalid type combination

You have used an inappropriate combination of type specifiers in a declaration. Example of code that generates the message:

    short float f;

Message ID: E_INVALID_TYPE_COMBINATION

## storage class after type is obsolescent

This warning is displayed with the `-v` option. According to the ANSI C standard, writing declarations in which the storage class specifier is not first is obsolescent. Example of code that generates the message:

    int static i;

Message ID: E_TYP_STORAGE_CLASS_OBSOLESCENT

## only one storage class allowed

You have specified more than one storage class in a declaration. Example of code that generates the message:

    f(void){
    register auto i;
    }

Message ID: E_ONLY_ONE_STORAGE_CLASS_ALLOWD

## auto/register inappropriate here

A declaration outside any function has storage class `auto` or `register`. Example of code that generates the message:

    auto int i;
    f(void){
    }

Message ID: E_AUTO_REG_INAPPROPRIATE_HERE

## only "register" valid as formal parameter storage class

You can specify a storage class specifier in a function prototype declaration, but only `register` is permitted. Example of code that generates the message:

    int f(
    	register int x,
    	auto int y
    );

Message ID: E_ONLY_REG_VALID_FORMAL_PARAM

## modification of typedef ignored

In ANSI C, modify a `typedef` with a type qualifier. Example of code that generates the message:

    typedef int INT;
    unsigned INT i

Message ID: E_MODIFY_TYPEDEF_IGNORED

## typedef already qualified

A type specifier includes a `typedef` and an explicit type qualifier. The `typedef` already includes the qualifier when it is declared. Example of code that generates the message:

    typedef volatile int VOL;
    volatile VOL v;

Message ID: E_TYPE_DEF_ALREADY_QUALIFIED

## dubious reference to typedef

A function prototype declaration refers to a `union, struct,` or `enum typedef` with a name. Because the `struct, union,` or `enum` has been declared within a function, it cannot be in scope when you define the function whose prototype is being declared. The prototype declaration and function definition thus cannot match. Example of code that generates the message:

    f(void){
    	struct s { int x; };
    	typedef struct s ST;
    	extern int g(ST, struct s);
    }

Message ID: E_DUBIOUS_REF_TYPEDEF

## use "double" instead of "long float"

You have declared an object or function to be `long float`, a synonym for `double`. ANSI C does not permit `long float`, although the C compiler accepts it as a transition aid. Example of code that generates the message:

    long float f = 1.0;

Message ID: E_USE_DOUBLE_INSTEAD_LONG_FLOAT

## only qualifiers allowed after *

You can specify only the `const` or `volatile` type qualifiers after a * in a declaration. Example of code that generates the message:

    int * const p;
    int * unsigned q;

Message ID: E_ONLY_QUALS_ALLOWED_AFTER_STAR

## zero or negative subscript

The size in an array declaration is zero or negative. Example of code that generates the message:

    int ia[-5];
    int ib[0];

Message ID: E_ZERO_OR_NEGATIVE_SUBSCRIPT

## array dimension too big

An array declaration has a combination of dimensions such that the declared object is too big for the target machine. Example of code that generates the message:

    int bigarray[2000000000];

Message ID: E_ARRAY_DIMENSION_TOO_BIG

## parameter redeclared

You have used a name more than once as the name for a parameter in a function definition. Example of code that generates the message:

    int f(int i, int i) { }
    int g(i,j)
    int i;
    int i;
    { }

Message ID: E_PARAM_REDECLARED

## "$" sign used in parameter

You have used a "$" in a parameter identifier while using the -Xt option. This will result in a syntax error when using the -Xa or -Xc option. Example of code that generates the messages:

    int f(int i$j ){ };

Message ID: E_DOLLAR_USED_IN_PARAMETER

## "$" used in identifier

You have used a "$" in an identifier while using the -Xt option. This will result in a syntax error when using the -Xa or -Xc option. Example of code that generates the message:

    int a$b;

Message ID: E_DOLLAR_USED_IN_IDENTIFIER

## ANSI C requires formal parameter before "..."

This warning is displayed with the `-Xc` and `-v` options. In K&R C, you can define a function with a variable number of arguments and no fixed arguments. ANSI C requires at least one fixed argument. Example of code that generates the message:

    f(...){}

Message ID: E_ANSI_REQS_FRML_PARM_BFORE_DOT

## "void" must be sole parameter

Only the first parameter in a function prototype declaration can have `void` type, and it must be the only parameter. Example of code that generates the message:

    int f(int,void);

Message ID: E_VOID_MUST_BE_SOLE_PARAMETER

## null dimension

A dimension of an array is null in a context where that is prohibited. The diagnostic is a warning if the offending dimension is outermost; an error, otherwise. Example of code that generates the message:

    int ia[4][];
    struct s { int x, y[]; };
    int i = sizeof(int []);

Message ID: E_NULL_DIMENSION

## cannot declare array of functions or void

You have attempted to declare an array of functions or an array of `void`. Example of code that generates the message:

    int f[5]();

Message ID: E_CANT_DECL_ARY_OF_FUNC_VOID

## function cannot return function or array

You have declared a function whose return type is a function or array, rather than, perhaps, a pointer to one of those. Example of code that generates the message:

    int f(void)[];	/* function returning array of ints */

Message ID: E_FUNC_CANT_RTN_FUNC_ARY

## old style function definition

This warning is displayed with the `-fd` option. An old-style function definition has been found. Example of code that generates the message:

    int f(a)
    char a;
    { }

Message ID: E_OLD_STYLE_FUNC_DEF

## old style function declaration

This warning is displayed with the `-fd` option. An old-style function declaration has been found. Example of code that generates the message:

    int f();

Message ID: E_OLD_STYLE_FUNC_DECL

## function prototype parameters must have types

A function prototype declaration cannot contain an identifier list; it must declare types. The identifier list is ignored. Example of code that generates the message:

    int f(i);

Message ID: E_FUNC_PROTO_REQ_TYPES

## inappropriate qualifiers with "void"

You cannot qualify `void` (with `const` or `volatile`) when it stands by itself. Example of code that generates the message:

    int f(const void);

Message ID: E_BAD_QUALIFIERS_WITH_VOID

## void parameter cannot have name

You have declared a parameter name in a function prototype declaration that has `void` type. Example of code that generates the message:

    int f(void v);

Message ID: E_VOID_PARAM_CANT_HAVE_NAME

## parameter not in identifier list

A variable appears in an old-style function definition's parameter declarations, but not in the parameter identifier list. Example of code that generates the message:

    f(a,b)
    int i;
    {}

Message ID: E_PARAM_NOT_IN_IDENTIFIER_LIST

## asm definition cannot have old-style parameters

You have an asm function which is defined in old style C Example of code that generates the message:

    int f(a)
    int a;
    {
    	asm(" nop ");
    }

Message ID: E_ASM_CANT_HAVE_OLD_STYLE_PARMS

## formal parameter lacks name

There is no parameter name in a function prototype definition. Example of code that generates the message:

    int f(int){
    }

Message ID: E_FORMAL_PARAM_LACKS_NAME

## prototype mismatch in arg n for function name

You have provided a function prototype declaration for a function, but used an old-style definition. The type for parameter name in that definition is incompatible with the type used in the prototype declaration. The following example shows an instance of this diagnostic.

    int f(char);
    int f(c)
    char c;
    { }

`f` has an old-style definition. For compatibility reasons, the `f` arguments must be promoted according to the default argument promotion. Therefore, the value that must actually be passed to `f` is an `int`, although the function only uses the `char` part of the value. The diagnostic then identifies the conflict between the `int` that the function expects, and the `char` that the function prototype causes to be passed. There are two ways to resolve the conflict: o Change the function prototype to read `int f(int);` o Define `f` with a function prototype definition:

    int f(char);
    int f(char c)
    {}

Example of code that generates the message:

    int f(char *);
    int f(p)
    int *p;
    {}

Message ID: E_PROTOTYPE_MISMATCH_PROMOTE

## Prototype mismatch in arg for function

You have provided a function prototype declaration for a function, but used an old-style definition. Either the type for parameter name in that definition is incompatible with the type used in the prototype declaration. Or an incorrect number of parameters have been specified. Check the prototype declaration and the function definition. Example of codes that generates the message:

    int f(char*, int, char*);     /* protype declaration */

    int f(a, b, c)                /* function f definition */
    char* a;
    {
      int b;
    }

`f` has an old-style definition. For compatibility reasons, the `f` arguments must be promoted according to the default argument promotion. Therefore, the value that must actually be passed to `f` is an `int`, although the function only uses the `char` part of the value. The diagnostic then identifies the conflict between the `int` that the function expects, and the `char` that the function prototype causes to be passed. There are two ways to resolve the conflict: o Change the function prototype to read `int f(int);` o Define `f` with a function prototype definition:

Message ID: E_PROTOTYPE_MISMATCH

## parameter mismatch: n declared, m defined

A function prototype declaration and an old-style definition of the function disagree in the number of parameters. The declaration has n parameters, while the definition has m. Example of code that generates the message:

    int f(int);
    int f(i,j)
    int i,j;
    {}

Message ID: E_PARAM_MISMATCH_DECL_DEFINED

## undefined or not a type

An identifier has been declared specifying incorrect type information. Either the type has not been defined or an identifier not representing a type has been used as a type. Example of code that generates the message:

    what id1;
    int id2;
    id2 id3;

Message ID: E_UNDEFINED_OR_NOT_A_TYPE

## ()-less function definition

The declarator portion of a function definition must include parentheses. You cannot define a function by writing a `typedef` name for a function type, followed by an identifier and the braces that define a function. Example of code that generates the message:

    typedef int F();
    F f{ }

Message ID: E_PARENLESS_FUNC_DEF

## old-style declaration or incorrect type for

You have used an old-style declaration for this type or an assignment with an incorrect type. Example of code that generates the message:

    const int i = 10;
    struct foo {int x; int y; };
    foo = &i;                         /* bad type for foo */

    int f();                          /* old style declaration */

Message ID: E_OLD_STYLE_DECL_OR_BAD_TYPE

## cannot initialize parameter

An old-style function parameter name cannot have an initializer. Example of code that generates the message:

    int f(i)
    int i = 4; {}

Message ID: E_CANT_INITIALIZE_PARAM

## syntax error: empty declaration

The code contains a null statement at file scope that looks like an empty declaration statement. K&R C permits this, but ANSI C does not. Example of code that generates the message:

    int i;;

Message ID: E_EMPTY_DECLARATION

## dubious static function at block level

This warning is displayed with the `-Xc` option. You have declared a function with storage class `static` at block scope. The ANSI C standard says that the behavior is undefined if you declare a function at block scope with an explicit storage class other than `extern`. Although in K&R C you can declare functions this way, you cannot do so in other implementations, or they may attach a different meaning to such a declaration. Example of code that generates the message:

    void
    f(void){
    	static void g(void);
    }

Message ID: E_STATIC_FUNC_AT_BLOCK_LEVEL

## "asm" valid only for function definition

The key word "asm" is used outside of function definition. Example of code that generates the message:

    asm(" nop ");
    asm(int f());
    int f() {
    	asm(" ...");
    }

Message ID: E_ASM_VALID_ONLY_FOR_FUNC_DEF

## "typedef" valid only for function declaration

A function definition cannot have the `typedef` storage class. It is ignored here. Example of code that generates the message:

    typedef int f(void){}

Message ID: E_TYPEDEF_VALID_ONLY_FUNC_DEF

## storage class for function must be static or extern

You have used an inappropriate storage class specifier for a function declaration or definition. Only `extern` and `static` can be used, or the storage class can be omitted. The specifier is ignored. Example of code that generates the message:

    f(void){
    	auto g(void);
    }

Message ID: E_SC_FUNC_MUST_STATIC_OR_EXTERN

## cannot initialize "extern" declaration

Within a function, the declaration of an object with `extern` storage class cannot have an initializer. Example of code that generates the message:

    f(void){
    	extern int i = 1;
    }

Message ID: E_CANT_INIT_EXTERN_DECL

## fix and continue: cannot reinitialize

This warning is displayed when an option is invoked from `dbx` with fix-and-continue. A `static` variable cannot be reinitialized to the value it had at the start of the program. This warning is generated when variables are declared inside a nested block. This warning is also issued for var2 of #pragma weak var1 = var2 It is also issued for extern variable redeclared as static. Example of code that generates the message (variables declared inside a nested block):

    void main(int argc, char *argv[])
    {
    		static int g ;

    		{
    		static int k ; /* can't be reinitialized */
    		.........
    		}
    }

Message ID: E_CANT_FIXCONTINUE_REINITIALIZE

## cannot initialize typedef

A `typedef` cannot have an initializer. Example of code that generates the message:

    typedef int INT = 1;

Message ID: E_CANT_INIT_TYPEDEF

## cannot initialize function

A name declared as a function cannot have an initializer. Example of code that generates the message:

    int f(void) = 3;

Message ID: E_CANT_INIT_FUNCTION

## const object should have initializer

This warning is displayed with the `-v` option. A `const` object cannot be modified. If you do not supply an initial value, the object has a value of zero; for automatics, its value is indeterminate. Example of code that generates the message:

    const int i;

Message ID: E_CONST_OBJ_SHOULD_HAVE_INITIZR

## identifier redeclared

You have declared an identifier in a way that is inconsistent with a previous appearance of the identifier or you have declared an identifier twice in the same scope. In the previous releases of K&R C, inconsistent redeclarations are allowed if the types are "nearly" the same (such as `int` and `long` on SPARC). ANSI C considers the types to be different.

    int x;
    long x;
    int y;
    double y;

Declarations of functions with and without argument information can often lead to confusing diagnostics. See the following example.

    int f(char);
    int f();

According to the ANSI C type compatibility rules, a function declaration that lacks type information, that is, one that is not a function prototype declaration, is compatible with a function prototype only when each parameter type is unchanged by the default argument promotion rules. In the example, `char` is affected by the promotion rules--it is promoted to `int.` Therefore, the two declarations have incompatible types.

Message ID: E_IDENTIFIER_REDECLARED

## identifier redefined

You have defined an identifier more than once. That is, you have declared an object more than once with an initializer, or you have defined a function more than once. Example of code that generates the message:

    int i = 1;
    int i = 1;

Message ID: E_IDENTIFIER_REDEFINED

## declaration hides parameter

You have declared an identifier with the same name as one of the parameters of the function. References to the identifier in this block are to the new declaration. The diagnostic is an error in `-Xa` or `-Xc` modes, and a warning in all other modes. Example of code that generates the message:

    int f(int i,int INT){
    	int i;
    	typedef int INT;
    }

Message ID: E_DECLARATION_HIDES_PARAMETER

## identifier redeclared; ANSI C requires "static"

You have declared a name twice at file scope. The first one uses storage class `static,` but the second one specifies no storage class. The ANSI C rules for storage classes require that all redeclarations of a name after the first must specify `static.` Example of code that generates the message:

    static int i;
    int i;

Message ID: E_ID_REDECL_ANSI_REQS_STATIC

## out of scope extern and prior uses redeclared as static

This warning is displayed with the `-Xc` or `-v` options. You have declared a name as `extern` in a block that has gone out of scope, then the name again, this time as `static`. The ANSI C compiler treats the object or function as if it were `static`, and all references, including ones earlier in the source file, apply to the `static` version. Example of code that generates the message:

    f(void){
    	extern int i;
    }
    static int i;

Message ID: E_OUT_SCOPE_EXTERN_REDECL_STAT

## extern and prior uses redeclared as static

This warning is displayed with the `-Xc` or `-v` options. You have declared a name at file scope as an `extern`, then later declare the same object or function as `static`. ANSI C rules require that the first declaration of an object or function give its actual storage class. K&R C accepts the declaration and treats the object or function as if the first declaration is `static`. Example of code that generates the message:

    extern int i;
    static int i;

Message ID: E_EXTERN_PRIOR_REDECL_STATIC

## inconsistent storage class for function

ANSI C requires that the first declaration of a function or object at file scope establish its storage class. You have redeclared a function name in an inconsistent way according to these rules. Example of code that generates the message:

    g(void){
    	int f(void);
    	static int f(void);
    }

Message ID: E_INCONSISTENT_STOR_CLASS_FUNC

## static redeclares external

You have reused a name as the name of a static object or function after using it in the same block as the name of an extern object or function. The version of the name that remains visible is the `static` version. Example of code that generates the message:

    f(void){
    	extern int i;
    	static int i;
    }

Message ID: E_STATIC_REDECLARES_EXTERN

## automatic redeclares external

You have declared an automatic variable name in the same block and with the same name as another symbol that is `extern`. ANSI C prohibits such declarations, but previous versions of K&R C allow them. For compatibility with previous versions, references to name in this block will be to the automatic. Example of code that generates the message:

    f(void){
    extern int i;
    int i;
    }

Message ID: E_AUTO_REDECLARES_EXTERNAL

## typedef redeclares external

You have declared a `typedef` name, but there is an `extern` of the same name in the same block. The `typedef` hides the `external`. Example of code that generates the message:

    f(void){
    	extern int INT;
    	typedef int INT;
    }

Message ID: E_TYPEDEF_REDCLS_EXTERN

## typedef redeclared

You have declared a `typedef` name more than once. The latter declaration has an identical type to the first. Example of code that generates the warningr:

    typedef int i;
    typedef int i;

Message ID: E_TYPEDEF_REDECLARED

## inconsistent redeclaration of extern

You have redeclared a function or object name with storage class `extern` for which there is a previous declaration that has since gone out of scope. The second declaration has a type that conflicts with the first. Example of code that generates the message:

    f(void){
    	int *p = (int *) malloc(5*sizeof(int));
    }
    g(void){
    	void *malloc();
    }

Message ID: E_INCONSISTENT_REDECL_EXTERN

## inconsistent redeclaration of static

You have redeclared an object or function that is originally declared with storage class `static.` The second declaration has a type that conflicts with the first. There are two most frequent conditions under which this diagnostic is issued: o A function is originally declared at other than file scope and with storage class `static.` The subsequent declaration of the function has a type that conflicts with the first. o A function or object is originally declared at file scope and with storage class `static.` A subsequent declaration of the same object or function at other than file scope used storage class `extern,` or possibly no storage class, if a function, and there is an intervening, unrelated, declaration of the same name. Example of code that generates the message:

    f(void){
    	static int myfunc(void);
    }
    g(void){
    	static char *myfunc(void);
    }
    static int x;
    f(void){
    	int x;				/* unrelated */
    {
    		extern float x;		/* related to first declaration */
    	}
    }

Message ID: E_INCONSISTENT_REDECL_STATIC

## old style declaration hides prototype declaration

This warning is displayed with the `-v` option. You have redeclared a function name in an inner scope. The outer declaration is a function prototype declaration, but the inner one lacks parameter information. By the ANSI C scoping rules, the parameter information is hidden and the automatic conversions of types that the prototype would have provided are suppressed. Example of code that generates the message:

    extern double sin(double);
    f(void){
    	extern double sin();
    	double d;
    	d = sin(1);			/* Note: no conversion to double! */
    }

Message ID: E_OLD_STYLE_DECL_HIDES_PROTO

## base type is really "type tag"

This warning is displayed with the `-Xt` option. A type is declared with a `struct, union,` or `enum` type specifier and with "tag" and then used with a different type specifier to declare the type as the type specifier that you have used for the original declaration. For compatibility with previous releases of K&R C, the compiler treats the two types as being the same. In ANSI C (with the `-Xa` or `-Xc` options), the types are different. Example of code that generates the message:

    struct s { int x, y, z; };
    f(void){
    unions foo;
    }

Message ID: E_BASE_TYPE_IS_REALLY

## declaration introduces new type in ANSI C

This warning is displayed with the `-Xt` option. A `struct, union,` or `enum` tag has been redeclared in an inner scope. In previous versions of K&R C, this tag is taken to refer to the previous declaration of the tag. In ANSI C, the declaration introduces a new tag. When the `-Xt` option is selected, the compiler reproduces the earlier behavior. Example of code that generates the message:

    struct s1 { int x; };
    f(void){
    	struct s1;
    	struct s2 { struct s1 *ps1; }; /* s1 refers to line 1 */
    	struct s1 { struct s2 *ps2; };
    }

Message ID: E_DECL_INTRODUCES_NEW_TYPE_ANSI

## useless declaration

ANSI C requires that every declaration actually declare something, such as: o A declarator o A structure or union tag o Enumeration constants The declaration provides no information to the compiler. Example of code that generates the message:

    int;				 	/* no identifier */
    enum e { e1, e2 };			/* introduces enum e */
    enum e;					/* no new information */

Message ID: E_USELESS_DECLARATION

## forward declaring enum

This warning is displayed with the `-v, -Xa,` or `-Xc` options. A declaration implying an empty enumeration has been found; a definition for this enumeration must follow later in the code. Example of code that generates the message:

    enum test *ptr;

Message ID: E_FWD_DECLARING_ENUM

## typedef declares no type name

In a declaration with storage class `typedef`, no type name is actually declared. This is probably a programming error. Example of code that generates the message:

    typedef struct s { int x; };

Message ID: E_TYPEDEF_DECLARES_NO_TYPE_NAME

## "type" tag redeclared

You have redeclared a tag name that is originally a type tag. Example of code that generates the message:

    struct q { int m1, m2; };
    enum q { e1, e2 };

Message ID: E_TAG_REDECLARED

## dubious tag in function prototype

A function prototype declaration refers to a `struct, union,` or `enum` type with a tag. The tag has been declared within a function. Therefore, it cannot be in scope when you define the function whose prototype is being declared. The prototype declaration and function definition thus cannot match. Example of code that generates the message:

    f(void){
    	struct s {int x;};
        int g(struct s *);
    }

Message ID: E_DUBIOUS_TAG_IN_FUNC_PROTO

## dubious "type" declaration; use tag only

You have declared a new `struct, union,` or `enum` type with a tag within a function prototype declaration or the parameter declaration list of an old-style function definition, and the declaration includes a declarator list for type. Calls to the function always produce a type mismatch, because the tag declaration goes out of scope at the end of the function prototype declaration or definition, according to the ANSI C scope rules. You cannot declare an object of that type outside the function. Instead, declare the `struct, union,` or `enum` ahead of the function prototype or function definition and then refer to it just by its tag. The following code:

    struct s {int x;};
    int f(struct s st)
    {}

should be written as:

    int f(struct s {int x;} st)
    {}

Message ID: E_DUBIOUS_DECL_USE_TAG_ONLY

## dubious structure/union/enum type declaration, use tag only

A `struct, union,` or `enum` type has been declared within function prototype scope. That is, a `struct, union,` or `enum` type has been declared within a function prototype declaration or the parameter declaration list of an old-style function definition, and the declaration includes a declarator list for type. Calls to the function always produce a type mismatch, because the tag declaration goes out of scope at the end of the function prototype declaration or definition, according to the standard C scope rules. There is no way to declare an object of that type outside the function prototype. Instead, declare the `struct, union,` or `enum` ahead of the function prototype or function definition and then refer to it by its tag. Example of codes that generates the message:

    int f(struct {int x; int y; }; )
    struct s foo;
    { }
    ============
    /* Correct code */
    struct s {int x; int y; };
    int f(struct s foo)
    { }

Message ID: E_DUB_DECL_USE_TAG_ONLY_UNNAMED

## dubious tag declaration

You have declared a new `struct, union,` or `enum` type with a tag within a function prototype declaration or the parameter declaration list of an old-style function definition. Calls to the function always produce a type mismatch, because the tag declaration goes out of scope at the end of the function declaration or definition, according to the ANSI C scope rules. Do not declare an object of that type outside the function. Example of code that generates the message:

    int f(struct s *);

Message ID: E_DUBIOUS_TAG_DECLARATION

## dubious tag declaration without name

You have declared a new `struct, union,` or `enum` within a function prototype declaration or the parameter declaration list of an old-style function definition. Calls to the function always produce a type mismatch, because the tag declaration goes out of scope at the end of the function declaration or definition, according to standard C scope rules. Do not declare an object of that type outside the function.

Message ID: E_DUBIOUS_TAG_DECL_UNNAMED

## unnamed union member

In the union declaration, a member does not have a name. Example of code that generates the message:

    union s { int i; char c; };

Message ID: E_UNNAMED_UNION_MEMBER

## unnamed struct member

In the struct declaration, a member does not have a name. Example of code that generates the message:

    struct s { int i; char c; };

Message ID: E_UNNAMED_STRUCT_MEMBER

## nonportable bit-field type

This warning is displayed with the `-Xc` option. You have used a bit-field type other than `signed int` or `unsigned int`, which are the only portable bit-field types. ANSI C supports `int, char, short`, and `long` bit-field types that may be `signed, unsigned`, or "plain." It also supports the <TT>enum</TT> bit-field type. Example of code that generates the message:

    1 struct u {
    2 unsigned v:1;
    3 int w:1;
    4 char x:8;
    5 long y:8;
    6 short z:8;
    7 };
    =============
    (3) warning: nonportable bit-field type
    (4) warning: nonportable bit-field type
    (5) warning: nonportable bit-field type
    (6) warning: nonportable bit-field type

Message ID: E_NONPORTABLE_BIT_FIELD_TYPE

## bit-field too big

The declaration for a bit-field specifies more bits than will fit in an object of the declared type. Example of code that generates the message:

    struct s { char c:20; };

Message ID: E_BIT_FIELD_TOO_BIG

## invalid type for bit-field

The type you have chosen for a bit-field is not permitted for bit-fields. Bit-fields can only be declared with integral types. Example of code that generates the message:

    struct s { float f:3; };

Message ID: E_INVALID_TYPE_FOR_BIT_FIELD

## member cannot be function

A function cannot be a member of a structure or union, although a pointer to a function can be one. You have declared a member name as a function. Example of code that generates the message:

    struct s { int f(void); };

Message ID: E_MEMBER_CANT_BE_FUNCTION

## duplicate member name

A `struct` or `union` declaration uses the same name for more than one member. Example of code that generates the message:

    union u {
    	int i;
    	float i;
    };

Message ID: E_DUPLICATE_MEMBER_NAME

## zero-sized struct/union

You have declared a structure or union with size of zero. Example of code that generates the message:

    struct s { int ia[0]; };

Message ID: E_ZERO_SIZED_STRUCT_UNION

## struct/union has no named members

You have declared a structure or union in which none of the members is named. Example of code that generates the message:

    struct s { int :4; char :0; };

Message ID: E_STRUCT_UNION_HAS_NO_NAMD_MBRS

## syntax requires ";" after last struct/union member

The ; that the C syntax requires after the last structure or union member in a structure or union declaration is missing. Example of code that generates the message:

    struct s { int x };

Message ID: E_SEMI_COLON_REQD_AFT_LAST_MBR

## identifier redeclared

The identifier has been declared multiple times within the same scope. Example of code that generates the message:

    f(int i) {
    	int j, i;
    }

Message ID: E_ID_REDECLARED

## enumeration constant hides parameter

A declaration of an enumerated type within a function includes an enumeration constant with the same name as a parameter name. The enumeration constant hides the parameter. Example of code that generates the message:

    int
    f(int i){
    	enum e { l, k, j, i };
    }

Message ID: E_ENUM_CONST_HIDES_PARAMETER

## enumerator value overflows INT_MAX (2147483647)

The value for an enumeration constant overflows the maximum integer value. Example of code that generates the message:

    enum e { e1=2147483647, e2 }; /* overflow for e2 */

Message ID: E_ENUM_VAL_OVERFLOWS_INT_MAX

## enumerator used in its own initializer

When setting the value of an enumerator name in an enumeration type declaration, you have used the name in the expression. The ANSI C scope rules take the name in the expression to be whatever symbol is in scope at the time. Example of code that generates the message:

    int i;
    f(void){
    	enum e { i = i+1, j, k };	/* uses global i in i+1 */
    }

Message ID: E_ENUM_USED_OWN_INITIALIZER

## trailing "," prohibited in enum declaration

This warning is generated with the `-Xc` or `-v` option. You have supplied an extra comma at the end of an enumeration type declaration. The extra comma is prohibited by the syntax. Example of code that generates the message:

    enum e { e1, e2, };

Message ID: E_TRAILING_COMMA_IN_ENUM

## {}-enclosed initializer required

When you initialize an aggregate, you must enclose the initializer in { }, except when you initialize a character array with a string literal or an automatic structure with an expression. Example of code that generates the message:

    int ia[5] = 1;
    f(void){
    	struct s { int x,y; } st = 1;
    }

Message ID: E_INIT_REQUIRED

## struct/union-valued initializer required

In ANSI C, you can initialize an automatic structure or union, but the initializer must have the same type as the object being initialized. Example of code that generates the message:

    f(void){
    	int i;
    	struct s { int x; } st = i;
    }

Message ID: E_STRUCT_UNION_INIT_REQUIRED

## initializer does not fit or is out of range

A value does not fit in the space provided. If it is fetched from that space, it may not reproduce the same value as is put in. In the message, the value is represented as a hexadecimal value if the initializer is `unsigned`, decimal if it is `signed.` The hexadecimal values `0x80` through 0xff do not fit into a `char; 0x8000` through `0xffff` do not fit into a `short; 0x80000000` through `0xffffffff` do not fit into an `int`. These values work with their corresponding `unsigned` types, however. Example of code that generates the message:

    struct s {signed int m1:3; unsigned int m2:3;} st = {4, 5};
    unsigned char uc = 300u;

Message ID: E_INIT_DOES_NOT_FIT

## string literal must be sole array initializer

You cannot initialize a character array with both a string literal and other values in the same initialization. Example of code that generates the message:

    char ca[] = { "abc", 'd' };

Message ID: E_STR_LIT_ARRAY_INIT

## n extra byte(s) in string literal initializer ignored

A string literal that initializes a character array contains n more characters than the array can hold. Example of code that generates the message:

    char ca[3] = "abcd";

Message ID: E_EXTRA_BYTE_IN_STR_IGNORED

## non-constant initializer

The initializer for an `extern, static`, or `array` object must be a compile-time constant. The initializers for an automatic structure or union object, if enclosed in `{}`, must also be compile-time constants. The operator in the diagnostic is the operator whose operands cannot be combined at compile-time. Example of code that generates the message:

    int j;
    int k = j+1;

Message ID: E_NON_CONST_INIT

## too many struct/union initializers

You have provided too many initializers for a structure or union. Example of code that generates the message:

    struct s { int x,y; } st = { 1,2,3 };

Message ID: E_TOO_MANY_STRUCT_UNION_INIT

## too many array initializers

The code contains more initializers for an array than the array can hold. Example of code that generates the message:

    int ia[3] = { 1, 2, 3, 4 };

Message ID: E_TOO_MANY_ARRAY_INIT

## too many initializers for scalar

A { }-bracketed initialization for a scalar contains more than one value. Example of code that generates the message:

    int i = { 1, 2 };

Message ID: E_TOO_MANY_INIT_SCALAR

## initializer will be sign-extended

A value used to initialize an object is sign-extended when converted to fit in that object. Example of code that generates the message:

    unsigned int x = -3;

Message ID: E_INIT_SIGN_EXTEND

## -xO3 or higher not specified, -crossmodinline flag ignored.

The -xO3 option or higher levels of optimization must be used with the -crossfiles flag.

Message ID: E_XO3_NOT_SPECIFIED

## newline in character constant

A character constant that has no closing ' is on the same line as the beginning '. Example of code that generates the message:

    int i = 'a
    ;

Message ID: E_NEWLINE_IN_CHAR_CONST

## invalid source character

This message is displayed when an error occurs with the `-Xa` or `-Xc` options. The compiler encounters a character in the source program that is not a valid ANSI C token. Example of code that generates the message:

    int i = 1$;

Message ID: E_INVALID_SOURCE_CHARACTER

## invalid source character

The compiler encounters a character in the source program that is not a valid ANSI C token. The invalid character is not printable. The hex value in the diagnostic is the hexadecimal value of the character code.

Message ID: E_INVALID_UNPRINTABLE_SRC_CHR

## invalid token:

The indicated set of characters does not form a valid C language token. A token is the minimal lexical element of the C language. The categories of tokens are: `keywords, identifiers, constants, string literals, operators, and punctuators.` Example of code that generates the message:

    5d
    int 1e = 1; /* token should not begin with a digit */

Message ID: E_INVALID_TOKEN_LEX

## invalid token:

The indicated set of characters does not form a valid C language token. A token is the minimal lexical element of the C language. The categories of tokens are: `keywords, identifiers, constants, string literals, operators, and punctuators.` Example of code that generates the message:

    char 2whateveritistoolongmorethan255character... ;   /*long string*/

Message ID: E_INVALID_TOKEN_TOO_LONG_LEX

## cannot concatenate wide and regular string literals

Regular string literals and string literals for wide characters can be concatenated only if they are both regular or both wide. The compiler issues a warning if a wide string literal is followed by a regular one (and both are treated as wide); it issues an error if a regular string literal is followed by a wide one. Example of code that generates the message:

    #include <stddef.h>
    wchar_t wa[] = L"abc" "def";
    char a[] = "abc" L"def";

Message ID: E_CANT_CONCAT_WIDE_REG_STRINGS

## _Restrict is a keyword for -Xa and -Xt

When using the -Xa or -Xt options, `_Restrict` is a C language keyword. Example of code that generates the message:

    void func(int * _Restrict intptr);

Message ID: E_KEYWORD_FOR_XA_AND_XT

## __asm is an extension of ANSI C

When using the -Xc option, the compiler reports uses of the "__asm" statement. The "__asm" function cannot be used in a strictly conforming ANSI C program. Example of code that generates the message:

    int f(int a) {
    	__asm(" nop ");
    }

Message ID: E_ASM_IS_AN_EXTENSION_OF_ANSI

## character escape does not fit in wide character

A hexadecimal or octal escape sequence in a character constant or string literal prefixed by `L` produces a value that is too big to fit in an `unsigned char` . The character escape is too large to fit in an object of `type wchar_t` and is truncated to fit.

Message ID: E_CHR_ESC_DOES_NOT_FIT_WCHAR

## conversion to double is out of range

An expression has too large a value. A conversion of this value is too large to fit in a double. The diagnostic is a waring if the expression is in executable code and an error otherwise. Example of code that generates the message:

    double f() {
    	return 0xFFFFFFFFFFFFFFFF;
    }

Message ID: E_CONV_TO_DOUBLE_OUT_OF_RANGE

## conversion to float is out of range

The expression has too large a value to fit in a float. The diagnostic is a warning if the expression is in executable code and an error otherwise. Example of code that generates the message:

    float f = 1e300 * 1e300;

Message ID: E_CONV_TO_FLOAT_OUT_OF_RANGE

## conversion of double to integral is out of range

A `double` constant has too large a value to fit in an integral type. The diagnostic is a warning if the expression is in executable code, and an error otherwise. Example of code that generates the message:

    int i = 1e100;

Message ID: E_CONV_DOUBLE_INTEGRAL_OUT_RNGE

## shift count negative or too big

The compiler has determined that the shift count (the right operand) for the shift operator is either negative or bigger than the size of the operand being shifted. Example of code that generates the message:

    f(){
    	short s;
    	s <<= 25;
    }

Message ID: E_SHIFT_CNT_NEG_TOO_BIG_L

## shift count negative or too big

The compiler has determined that the shift count (the right operand) for the shift operator is either negative or bigger than the size of the operand being shifted. Example of code that generates the message:

    f(){
    	short s;
    	s <<= 25;
    }

Message ID: E_SHIFT_CNT_NEG_TOO_BIG

## integer overflow detected

The compiler attempts to compute the result of an operator expression at compile-time, and determines that the result overflows. The low-order 32 bits of the result are retained, and the compiler issues this diagnostic. Example of code that generates the message:

    int i = 1000000 * 1000000;

Message ID: E_INTEGER_OVERFLOW_DETECTED

## floating-point constant calculation out of range

The compiler has detected an overflow at compile time when it attempts an operation between two floating-point operands. The diagnostic is a warning if the expression is in executable code, and an error otherwise. Example of code that generates the message:

    double d1 = 1e300 * 1e300;

Message ID: E_FP_CONST_CALC_OUT_OF_RANGE

## loop not entered at top

The controlling expression at the beginning of a `for` or `while loop` cannot be reached by sequential flow of control from the statement before it. Example of code that generates the message:

    f(void){
    	int i;
    	goto lab;
    	for (i = 1; i > 0; --i) {
    lab:;
    		i=5;
    	}
    }

Message ID: E_LOOP_NOT_ENTERED_AT_TOP

## statement not reached

This statement in your program cannot be reached because of the `goto, break, continue,` or `return` statements preceding it. Example of code that generates the message:

    f(void){
    	int i;
    	return i;
    	i = 4;
    }

Message ID: E_STATEMENT_NOT_REACHED

## function has no return statement

This warning is displayed with the `-v` option. The function should include a `return` statement. Example of code that generates the message:

    #include <stdio.h>
    main(void)
    {
    	(void) printf("Do the hippy-hippy shake.\n");
    }

Message ID: E_FUNC_HAS_NO_RETURN_STMT

## label redefined

The same label name has appeared more than once in the current function. A label's scope is an entire function. Example of code that generates the message:

    f(void){
    	int i;
    	i = 1;
    	if (i) {
    L:
    		while (i)
    			g();
    		goto L;
    	}
    L:  ;
    }

Message ID: E_LABEL_REDEFINED

## end-of-loop code not reached

You have written a loop such that the code at the end of the loop that the compiler generates to branch back to the beginning of the loop is not reachable and cannot be executed. Example of code that generates the message:

    f(void){
    	int i = 1;
    	while (i) {
    		return 4;
    	}
    }

Message ID: E_END_OF_LOOP_CODE_NOT_REACHED

## "break" outside loop or switch

A function contains a `break` statement in an inappropriate place, namely, outside any `loop` or `switch` statement. Example of code that generates the message:

    f(void){
        break;
    }

Message ID: E_BREAK_OUTSIDE_LOOP_OR_SWITCH

## "continue" outside loop

Your program contains a `continue` statement outside the scope of any loop. Example of code that generates the message:

    f(void){
    	continue;
    }

Message ID: E_CONTINUE_OUTSIDE_LOOP_SWITCH

## function expects to return value

This warning is displayed with the `-v` option. The current function is declared with a type, but you have used a `return` statement with no return value expression. Example of code that generates the message:

    f(void){
    	return;
    }

Message ID: E_FUNC_EXPECTS_TO_RETURN_VALUE

## switch expression must have integral type

The code contains a `switch` statement in which the controlling expression does not have an integral type. This message is a warning if the invalid type is a floating-point type; an error, otherwise. A floating-point `switch` expression is converted to `int`. Example of code that generates the message:

    f(void){
    	float x;
    	switch (x) {
    	case 4:  ;
    	}
    }

Message ID: E_SWITCH_EXP_MUST_BE_INTEGRAL

## "case" outside switch

A case statement occurs outside the scope of any `switch` statement. Example of code that generates the message:

    f(void){
    	case 4:  ;
    }

Message ID: E_CASE_OUTSIDE_SWITCH

## non-integral case expression

The operand of a `case` statement must be an integral constant. Example of code that generates the message:

    f(void){
    	int i = 1;
    	switch (i) {
    	case 5.0:  ;
    	}
    }

Message ID: E_NON_INTEGRAL_CASE_EXPRESSION

## "default" outside switch

A default label appears outside the scope of a `switch` statement. Example of code that generates the message:

    f(void){
    default: ; }

Message ID: E_DEFAULT_OUTSIDE_SWITCH

## duplicate "default" in switch

There are two `default` labels in the current `switch` statement. Example of code that generates the message:

    f(void){
    	int i = 5;
    	switch(i) {
    	default:
    	default:
    		    break;
    	}
    }

Message ID: E_DUPLICATE_DEFAULT_IN_SWITCH

## unreachable case label

The expression you have specified in a `case` statement has a value outside the range of the type of the controlling expression of the enclosing `switch` statement. Therefore, the case label can never be reached. In the message, the value is represented as a hexadecimal value if the `case` expression is `unsigned`, decimal if it is `signed`. Example of code that generates the message:

    f(void){
    	unsigned char uc;

    	switch( uc ){
    	case 256:
    		;
    	}
    }

Message ID: E_UNREACHABLE_CASE_LABEL

## case label affected by conversion

This warning is displayed with the `-v` option. The value for the `case` label cannot be represented by the type of the controlling expression of a `switch` statement. This warning is generated if the type of the `case` expression and the type of the controlling expression have the same size, and the actual bit representation of the case expression is unchanged. For example, the controlling expression may have type `int` and the case expression may have type `unsigned int`. In the diagnostic, value is represented as a hexadecimal value if the `case` expression is `unsigned,` decimal if it is `signed.` In the example, `0xffffffffu` is not representable as an `int`. When the `case` expression is converted to the type of the controlling expression, its effective value is `-1`. That is, the case is reached if `i` has the value `-1`, rather than `0xffffffff`. Example of code that generates the message:

    f(void){
    	int i;

    	switch( i ){
    	case 0xffffffffu:
    	;
    	}
    }

Message ID: E_CASE_LBL_AFFECTED_CONVERSION

## cannot have void object

You cannot declare an object of type `void`. Example of code that generates the message:

    void v;

Message ID: E_CANT_HAVE_VOID_OBJECT

## incomplete struct/union/enum tag: name

You have declared an object name, with `struct, union,` or `enum` type and a tag, but the type is incomplete. Example of code that generates the message:

    struct s st;

Message ID: E_INCOMPLETE_STRUCT_UNION_ENUM

## st_save() out of memory

The compiler has run out of memory. This is most frequently due to having run out of swap space.

Message ID: E_ST_SAVE_OUT_OF_MEMORY

## st_lookup() out of memory

The compiler has run out of memory. This is most frequently due to having run out of swap space.

Message ID: E_ST_LOOKUP_OUT_OF_MEMORY

## static function called but not defined

The program calls a function name, which has been declared `static`, but no definition of the name appears in the translation unit. The line number that is displayed in the message is one more than the number of lines in the file, because this condition can be diagnosed only after the entire translation unit has been seen. Example of code that generates the message:

    static int statfunc(int);
    void
    f(){
    	int i = statfunc(4);
    }

Message ID: E_STATIC_FUNC_CALLD_NOT_DEFINED

## undefined label

The code contains a `goto` in the current function, but the target label is not defined within the function. Example of code that generates the message:

    f(void){
    	goto L;
    }

Message ID: E_UNDEFINED_LABEL

## unrecognized #pragma ignored

This warning is displayed with the `-v` option. Because #`pragma` directives are implementation-specific, when the `-v` compilation flag is set, the C compiler warns about any such directives that it is ignoring. The C compiler does not recognize the #`pragma` shown in the diagnostic. Example of code that generates the message:

    #pragma list

Message ID: E_UNRECOGNIZED_PRAGMA_IGNORED

## no tokens follow "#pragma"

This warning is displayed with the `-v` option. The compiler encounters a `#pragma` directive that contains no other tokens. Example of code that generates the message:

    #pragma

Message ID: E_NO_TOKENS_FOLLOW_PRAGMA

## do_pragma: out of memory

The compiler has run out of memory. This is most frequently due to having run out of swap space.

Message ID: E_DO_PRAGMA_OUT_OF_MEMORY

## ignoring malformed #pragma pack(n)

The compiler has encountered a `#pragma pack` that does not have the form shown. The erroneous directive is ignored. Example of code that generates the message:

    #pragma pack

Message ID: E_IGNORE_MALFORMED_PRAGMA_PACK

## bad #pragma pack value:

The `pack` pragma controls the layout of structure offsets, and must be of the form:

    #pragma pack(n)

where, `n` is a power of 2 less than the strictest alignment on the platform (4 on Intel, 8 on sparc v8, 16 on sparc v9). If n is omitted, member alignment reverts to the natural alignment boundaries. The pragma specifies the strictest alignment desired for any structure member. The pragma applies to all structure definitions which follow it, until the next pack directive. If the same structure is defined in different translation units with different packing, your program may fail in unpredictable ways. In particular, you should not use pragma pack prior to including a header defining the interface of a precompiled library. Recommended usage is to place the pragma in your program code immediately before any structure to be packed, with #pragma pack() immediately following the structure. Example of code that generates the message:

    #pragma pack(-2)
    #pragma pack(7)
    #pragma pack(256)

Message ID: E_BAD_PRAGMA_PACK_VALUE

## ignoring malformed #pragma weak symbol

The compiler has encountered a `#pragma weak` directive that does not have the form shown. The erroneous directive is ignored. Example of code that generates the message:

    #pragma weak write,_write

Message ID: E_IGNORE_MALFORMED_PRAGMA_WEAK

## symbol in #pragma unknown_control_flow has not been declared

The compiler has encountered a function name in a `#pragma unknown_control_flow` that has not been declared. The `unknown_control_flow` pragma has the following syntax:

      #pragma unknown_control_flow ( name [ , name ... ] )

The function named in the pragma must be declared prior to the #pragma. Example of code that generates the message:

    #pragma unknown_control_flow(foo, bar)
    int foo();
    int bar();

    The code should be specified as:
    int foo();
    int bar();
    #pragma unknown_control_flow(foo, bar)

Message ID: E_UNKNOWN_CTRL_FLOW_UNDECLARED

## symbol in `#pragma no_side_effect` has not been declared

The compiler has encountered a function name in a `#pragma no_side_effect` that has not been declared. The `unknown_control_flow` pragma has the following syntax:

      #pragma no_side_effect (name [, name ...])

Any function named in the id list must be declared prior to the pragma. Example of code that generates the message:

    /* ABS function is not defined or declared anywhere */
    #pragma no_side_effect (abc)

============ The code should be:

    int abc();
    #pragma no_side_effect (abc)

Message ID: E_NO_SIDE_EFFECT_UNDECLARED

## ignoring malformed #pragma unknown_control_flow ( id [,id ...] )

A `#pragma unknown_control_flow` has been specified with incorrect syntax. The correct syntax for the pragma is:

      #pragma unknown_control_flow ( id [,id ...] )

Example of code that generates the message:

    #pragma unknown_control_flow {a, b c}

Message ID: E_IGNORE_MALFORMED_PRAGMA_UCF

## ignoring malformed #pragma no_side_effect ( id [,id ...] )

A `#pragma unknown_control_flow` has been specified with incorrect syntax. The correct syntax for the pragma is:

    #pragma no_side_effect (id [, id ...])

Example of code that generates the message:

    #pragma no_side_effect {a b}

Message ID: E_IGNORE_MALFORMED_PRAGMA_NSE

## ignoring malformed #pragma init/fini

Incorrect syntax used for a `#pragma init` or `#pragma fini`. The `fini` and `init` pragmas must be specified as:

      #pragma fini (f1 [,f2, ...,fn])
      #pragma init (f1 [,f2, ...,fn])

Example of code that generates the message:

    #define ONE 1
    f();
    g();
    #pragma fini {f, g}

Message ID: E_IGNORE_MALFORMED_PRAGMA

## must have type "function-returning-unsigned"

The name that is a part of a `#pragma int_to_unsigned` directive must be an identifier whose type is function-returning-`unsigned.` Example of code that generates the message:

    extern int f(int);
    #pragma int_to_unsigned f

l

Message ID: E_MUST_B_TYPE_FUNC_RTN_UNSIGNED

## ignoring malformed #pragma int_to_unsigned symbol

The compiler has encountered a `#pragma int_to_unsigned` directive that does not have the form shown. The erroneous directive is ignored. Example of code that generates the message:

    #pragma int_to_unsigned strlen();

Message ID: E_IGNORE_MALFORMED_INTTOUNSIGND

## bad #pragma align value

The value for `#pragma align` has to be positive a positive power of 2, no greater than 128. The syntax for the `align` pragma is: `#pragma align integer (id [, id...])` Example of code that generates the message:

    #define ANO 129
    #pragma align ANO (astruct)

Good examples:

    #define MAX 128
    #pragma align MAX (astruct, aint, aptr)

Message ID: E_BAD_PRAGMA_ALIGN_VALUE

## ignoring malformed #pragma align int ( ident [,ident ...] )

Incorrect syntax used for `#pragma align`. The correct syntax is:

    #pragma align integer (ident [,ident ...])

where integer is a power of 2 between 1 and 128; valid values are: 1, 2, 4, 8, 16, 32, 64, 128. `ident` must be a global or static variable; it cannot be an automatic variable. Example of code that generates the message:

    #pragma align 128 {astruct, aunion}

Message ID: E_IGNORE_MALFORMED_PRAGMA_ALIGN

## Cannot allocate space, out of memory

The compiler has run out of memory. This is most frequently due to having run out of swap space.

Message ID: E_REALLOC_OUT_OF_MEMORY

## string literal expected after #line < number >

A #`line` < number > directive must be followed by a normal string literal.

Message ID: E_STRING_EXPECTED_POUND_LINE

## precision lost in bit-field assignment

A constant is assigned to a bit-field too small to hold the value without truncation. In the following example, the bit-field z may have values that range from 0 to 7 or -4 to 3, depending on the machine. Example of code that generates the message:

    void
    v(void)
    {
    	struct {
    		signed          x:3;	/* max value allowed is 3 */
    		unsigned        y:3;	/* max value allowed is 7 */
    		int             z:3;	/* max value allowed is 7 */
    	}               st;
    	st.x = 3;
    	st.x = 4;
    	st.y = 7;
    	st.y = 8;
    	st.z = 7;
    	st.z = 8;
    }

Message ID: E_PRECISION_LOST_IN_BIT_FIELD

## enum never defined

An `enum` is incorrectly declared. Format: Simple Example of code that generates the message:

    1  enum e {int, two} en;
    ============
    (1) warning: enum never defined: e

Message ID: E_ENUM_NEVER_DEF

## equality operator == found where assignment = expected

An equality operator is found where a side effect is expected. Format: Simple Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	int             i = 0, j = 1;
    5 	for (i == j; i < 10; i++)
    6 		i == j;
    7 }
    ============
    (5) warning: equality operator "==" found where assignment "=" expected
    (6) warning: equality operator "==" found where assignment "=" expected

Message ID: E_ASSIGNMENT_NOT_EQUALITY

## assignment operator = found where == was expected

An assignment operator is found where a conditional expression is expected. This message is not issued when an assignment is made to a variable using the value of a function call or in the case of string copying (see the example below). This warning is suppressed when `lint` is invoked with `-h`. Format: Simple Example of code that generates the message:

    1 int
    2 main(void)
    3 {
    4 	int             y = 0;
    5 	int             z = 0;
    6 	int             j = 0;
    7 	int             x, i;
    8 	i = (x = y) & (z == j);
    9 	if (y = x)
    10 		i = 1;
    11 	while (z = y)
    12 		i++;
    13 	while ((x = z) == y)
    14 		i--;
    15 	return (i + x);
    16 }
    ============
    (8) warning: assignment operator "=" found where "==" was expected
    (9) warning: assignment operator "=" found where "==" was expected
    (11) warning: assignment operator "=" found where "==" was expected

Message ID: E_EQUALITY_NOT_ASSIGNMENT

## only 0 or 2 parameters allowed: main()

The function `main()` in your program is defined with only one parameter or more than two parameters, in violation of the ANSI C requirement. Format: Simple Example of code that generates the message:

    1 void
    2 main(int argc, char **argv, char **envp)
    3 {}
    ============
    (2) warning: only 0 or 2 parameters allowed: main()

Message ID: E_MAIN_PARAM

## function must be of type int: main()

You have used a `main()` that does not return `int` in violation of ANSI C restrictions. Format: Simple Example of code that generates the message:

    1 char           *
    2 main(void)
    3 {
    4 	return "a";
    5 }
    ============
    (2) warning: function must be of type int: main()

Message ID: E_MAIN_RET_VAL

## nonportable character constant

A multicharacter character constant in your program may not be portable. Format: Simple Example of code that generates the message:

    1  int c = 'abc';
    ============
    (1) warning: nonportable character constant

Message ID: E_NONPORTABLE_CHAR_CONST

## function returns pointer to automatic

A function returns a pointer to an automatic variable. Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object is undefined after the end of the block. Example of code that generates the message:

    1 int *
    2 f(int x)
    3 {
    4 	int             ia[10];
    5 	int             i;
    6 	if (x == 1)
    7 		return ia;
    8 	else
    9 		return &i;
    10 }
    ============
    (7) warning: function returns pointer to automatic
    (9) warning: function returns pointer to automatic

Message ID: E_FUNC_RET_PTR_TO_AUTO

## function returns pointer to parameter

A function returns a pointer to a parameter. Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object is undefined after the end of the block. Example of code that generates the message:

    1 int	*f(int i)
    2 {
    3 	return &i;
    4 }
    ============
    (3) warning: function returns pointer to parameter

Message ID: E_FUNC_RET_PTR_TO_PARAM

## fallthrough on case statement

Execution falls through one `case` to another without a `break` or `return`. Preceding a `case` statement with `/* FALLTHRU */`, or `/* NOTREACHED */` when the `case` cannot be reached from the preceding `case` (see example below), suppresses this message for that statement; invoking `lint` with `-h` suppresses it for every statement. Format: Simple Example of code that generates the message:

    1 int
    2 f(int i)
    3 {
    4 	void            error();
    5 	switch (i) {
    6 	case 10:
    7 		i = 0;
    8 	case 12:
    9 		return (i);
    10 	case 14:
    11 		break;
    12 	case 15:
    13 	case 16:
    14 		break;
    15 	case 18:
    16 		i = 0;
    17 		/* FALLTHRU */
    18 	case 20:
    19 		error("bad number");
    20 		/* NOTREACHED */
    21 	case 22:
    22 		return (i);
    23 	}
    24 	return (i);
    25 }
    ============
    (8) warning: fallthrough on case statement

Message ID: E_CASE_FALLTHRU

## directive must be in if/else: /* EMPTY */

The lint directive `/* EMPTY */` must occure within the scope of an `#if` or `#else`. Example of code the generates the message:

    int f(void) {
    /* EMPTY */
    };

Message ID: E_IF_ELSE_DIRECTIVE

## statement has no consequent: if

An `if` statement has a null `if` part. Inserting `/* EMPTY */` between the controlling expression of the `if` and semicolon suppresses this message for that statement; invoking `lint` with `-h` suppresses it for every statement. Format: Simple Example of code that generates the message:

    1 void
    2 v(int i)
    3 {
    4 	if (i);
    5 	if (i == 10)
    6 		 /* EMPTY */ ;
    7 	else
    8 		return;
    9 }
    ============
    (4) warning: statement has no consequent: if

Message ID: E_NOP_IF_STMT

## statement has no consequent: else

An `if` statement has a null `else` part. Inserting `/* EMPTY */` between the `else` and semicolon suppresses this message for that statement; invoking `lint` with `-h` suppresses it for every statement. Format: Simple Example of code that generates the message:

    1 void
    2 v(int i)
    3 {
    4 	if (i)
    5 		return;
    6 	else;
    7 }
    ============
    (6) warning: statement has no consequent: else

Message ID: E_NOP_ELSE_STMT

## static unused

A variable or function is defined or declared `static` in a file, but not used in that file. Doing so is probably a programming error because the object cannot be used outside the file. Example of code that generates the message:

    1  static int i;
    2  static int f(void);
    3  static int j = 1;
    ============
    static unused
        (1) i               (2) f               (3) j

Message ID: E_STATIC_UNUSED1

## static unused

A variable or function is defined or declared `static` in a file, but not used in that file. Doing so is probably a programming error because the object cannot be used outside the file. Example of code that generates the message:

    1  static int i;
    2  static int f(void);
    3  static int j = 1;

Message ID: E_STATIC_UNUSED

## argument unused in function

A function argument is not used. Preceding the function definition with `/* ARGSUSEDn */` suppresses this message for all but the first n arguments; invoking `lint` with `-v` suppresses it for every argument. Example of code that generates the message:

    1 static int      f(int, int);
    2 int
    3 main(int argc, char *argv[])
    4 {
    5 	return (f(argc, 0));
    6 }
    7 /* ARGSUSED1 */
    8
    9 int
    10 f(int x, int y)
    11 {
    12 	return x;
    13 }
    14
    ============
    argument unused in function
        (3) argv in main

Message ID: E_FUNC_ARG_UNUSED1

## argument unused in function

A function argument is not used. Preceding the function definition with `/* ARGSUSEDn */` suppresses this message for all but the first n arguments; invoking `lint` with `-v` suppresses it for every argument. Example of code that generates the message:

    1 static int      f(int, int);
    2 int
    3 main(int argc, char *argv[])
    4 {
    5 	return (f(argc, 0));
    6 }
    7 /* ARGSUSED1 */
    8
    9 int
    10 f(int x, int y)
    11 {
    12 	return x;
    13 }
    14

Message ID: E_FUNC_ARG_UNUSED

## variable unused in function

A variable is declared, but never used in a function. Example of code that generates the message:

    1 void main(void)
    2 {
    3 	int i, j;
    4 	static k;
    5 }
    6
    7
    ============
    variable unused in function
        (3) i in main
        (3) j in main
        (4) k in main

Message ID: E_FUNC_VAR_UNUSED1

## variable unused in function

A variable is declared, but never used in a function. Example of code that generates the message:

    1 void main(void)
    2 {
    3 	int i, j;
    4 	static k;
    5 }
    6
    7

Message ID: E_FUNC_VAR_UNUSED

## set but not used in function

An automatic variable or a function parameter is declared and set, but not used in a function. Example of code that generates the message:

    1 void f(int i)
    2 {
    3 	int j = 1;
    4 	i = 1;
    5 }
    ============
    set but not used in function
        (1) i in f
        (3) j in f

Message ID: E_FUNC_SET_NOT_USED1

## set but not used in function

An automatic variable or a function parameter is declared and set, but not used in a function. Example of code that generates the message:

    1 void f(int i)
    2 {
    3 	int j = 1;
    4 	i = 1;
    5 }

Message ID: E_FUNC_SET_NOT_USED

## pointer casts may be troublesome

You have cast a pointer to one object type to a pointer to a different object type. This message is issued only when `lint` is invoked with `-p`, and is not issued for the generic pointer `void *`. Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	int            *ip;
    5 	char           *cp = 0;
    6 	ip = (int *) cp;
    7 }
    ============
    pointer casts may be troublesome
        (6)

Message ID: E_BAD_PTR_CAST

## statement not reached

A function contains a statement that cannot be reached. Preceding an unreached statement with `/* NOTREACHED */` suppresses this message for that statement; invoking `lint` with `-b` suppresses it for every unreached `break` and empty statement. This message is also issued by the compiler, but cannot be suppressed. Example of code that generates the message:

    1 void
    2 v(int i)
    3 {
    4 	switch (i) {
    5 	case 1:
    6 		return;
    7 		break;
    8 	case 2:
    9 		return;
    10 		/* NOTREACHED */
    11 		break;
    12 	}
    13 }
    ============
    statement not reached
        (7)

Message ID: E_STMT_NOT_REACHED

## implicitly declared to return int

The program calls a function which has not been previously declared. In this case, `lint` assumes the function returns an `int`. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4 	f();
    5 }
    ============
    implicitly declared to return int
        (4) f

Message ID: E_RET_INT_IMPLICITLY1

## implicitly declared to return int

The program calls a function which has not been previously declared. In this case, `lint` assumes the function returns an `int`. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4 	f();
    5 }

Message ID: E_RET_INT_IMPLICITLY

## pointer cast may result in improper alignment

You have cast a pointer to one object type to a pointer to an object type with stricter alignment requirements. Doing so may result in a value that is invalid for the second pointer type. This warning is suppressed when `lint` is invoked with `-h`. Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	short          *sp = 0;
    5 	int            *ip;
    6 	ip = (int *) sp;
    7 }
    8
    ============
    pointer cast may result in improper alignment
        (6)

Message ID: E_BAD_PTR_CAST_ALIGN

## bitwise operation on signed value possibly nonportable

The operand of a bitwise operator is a variable of signed integral type, as defined by ANSI C. Because these operators return values that depend on the internal representations of integers, their behavior is implementation-defined for operands of that type.

Message ID: E_POSSIBLY_NONPORT_SBITWISE_OP

## bitwise operation on signed value nonportable

The operand of a bitwise operator is a variable of signed integral type, as defined by ANSI C. Because these operators return values that depend on the internal representations of integers, their behavior is implementation-defined for operands of that type. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4 	int             i;
    5 	signed int      j;
    6 	i = i & 055;
    7 	j = j | 022;
    8 }
    ============
    bitwise operation on signed value nonportable
        (6)                 (7)

Message ID: E_NONPORT_SBITWISE_OP

## conversion to larger integral type may sign-extend incorrectly

A variable of type "plain" `char` is assigned to a variable of a larger integral type. Whether a "plain" `char` is treated as signed or unsigned is implementation-defined. This message is issued only when `lint` is invoked with `-p`, and is suppressed when it is invoked with `-a`. Example of code that generates the message:

    1 int
    2 main(void)
    3 {
    4 	char            c = 0;
    5 	long            l;
    6 	l = c;
    7 	return (l);
    8 }
    ============
    conversion to larger integral type may sign-extend incorrectly
        (6)

Message ID: E_BAD_SIGN_EXTEND

## assignment causes implicit narrowing conversion

An object is assigned to one of a smaller type. Invoking `lint` with `-a` suppresses this message. So does an explicit cast to the smaller type. Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	float         f;
    5 	long long     l = 2.5;
    6 	f = l;
    7 }
    ============
    assignment causes implicit narrowing conversion
        (6)

Message ID: E_ASSIGN_NARROW_CONV

## function falls off bottom without returning value

A non-`void` function does not return a value to the invoking function. If the closing curly brace is truly not reached, preceding it with `/* NOTREACHED */` suppresses this message. Example of code that generates the message:

    1 int f(void) {}
    2 void v(void) {}
    3 h(void)
    4 {
    5 	exit(1);
    6 	/* NOTREACHED */
    7 }
    ============
    function falls off bottom without returning value
        (1) f

Message ID: E_FUNC_NO_RET_VAL1

## function falls off bottom without returning value

A non-`void` function does not return a value to the invoking function. If the closing curly brace is truly not reached, preceding it with `/* NOTREACHED */` suppresses this message. Example of code that generates the message:

    1 int f(void) {}
    2 void v(void) {}
    3 h(void)
    4 {
    5 	exit(1);
    6 	/* NOTREACHED */
    7 }

Message ID: E_FUNC_NO_RET_VAL

## declaration unused in block

An external variable or function is declared but not used in an inner block. Example of code that generates the message:

    1 int
    2 main(void)
    3 {
    4 	int             f();
    5 	int             g();
    6 	return f();
    7 }
    ============
    declaration unused in block
        (5) g

Message ID: E_BLOCK_DECL_UNUSED1

## declaration unused in block

An external variable or function is declared but not used in an inner block. Example of code that generates the message:

    1 int
    2 main(void)
    3 {
    4 	int             f();
    5 	int             g();
    6 	return f();
    7 }

Message ID: E_BLOCK_DECL_UNUSED

## name used but not defined

A nonstatic external variable or function is declared but not defined in any file. This message is suppressed when `lint` is invoked with `-u`. Example of code that generates the message:

    1 extern int      f(void);
    2 int
    3 main(void)
    4 {
    5 	return f();
    6 }
    ============
    name used but not defined
        f                	f.c(5)

Message ID: E_NAME_USED_NOT_DEF1

## name used but not defined

A nonstatic external variable or function is declared but not defined in any file. This message is suppressed when `lint`is invoked with `-u`. Example of code that generates the message:

    1 extern int      f(void);
    2 int
    3 main(void)
    4 {
    5 	return f();
    6 }

Message ID: E_NAME_USED_NOT_DEF2

## name defined but never used

A variable or function is defined but not used in any file. This message is suppressed when `lint` is invoked with `-u`. Example of code that generates the message:

    1  int i;
    ============
    name defined but never used
        i                	f.c(1)

Message ID: E_NAME_DEF_NOT_USED1

## name defined but never used

A variable or function is defined but not used in any file. This message is suppressed when `lint` is invoked with `-u`. Example of code that generates the message:

    1  int i;

Message ID: E_NAME_DEF_NOT_USED2

## name declared but never used or defined

A nonstatic external variable or function is declared but not used or defined in any file. This message is suppressed when `lint` is invoked with `-x`. Example of code that generates the message:

    1 extern int f(void);
    2 static int g(void);
    ============
    name declared but never used or defined
        f                	f.c(1)

Message ID: E_NAME_DECL_NOT_USED_DEF1

## name declared but never used or defined

A nonstatic external variable or function is declared but not used or defined in any file. This message is suppressed when `lint` is invoked with `-x`. Example of code that generates the message:

    1 extern int f(void);
    2 static int g(void);

Message ID: E_NAME_DECL_NOT_USED_DEF2

## name multiply defined

A variable is defined in more than one source file. Example of code that generates the message:

    file f.c:
    1  char i = 'a';

    file f_1.c:
    1  long i = 1;
    ============
    name multiply defined
        i                	f.c(1) :: f_1.c(1)

Message ID: E_NAME_MULTIPLY_DEF1

## name multiply defined

A variable is defined in more than one source file. Example of code that generates the message:

    file f.c:
    1  char i = 'a';

    file f_1.c:
    1  long i = 1;

Message ID: E_NAME_MULTIPLY_DEF2

## value type used inconsistently

The return type in a function call does not match the return type in the function definition. Example of code that generates the message:

    file f.c:
    1 int            *
    2 f(int *ip)
    3 {
    4 	return ip;
    5 }

    file f_1.c:
    1 void
    2 g(void)
    3 {
    4 	int             i, *ip = &i;
    5 	i = f(ip);
    6 }
    ============
    value type used inconsistently
        f                	f.c(2) int *() :: f_1.c(5) int ()

Message ID: E_INCONS_VAL_TYPE_USED1

## value type used inconsistently

The return type in a function call does not match the return type in the function definition. Example of code that generates the message:

    file f.c:
    1 int            *
    2 f(int *ip)
    3 {
    4 	return ip;
    5 }

    file f_1.c:
    1 void
    2 g(void)
    3 {
    4 	int             i, *ip = &i;
    5 	i = f(ip);
    6 }

Message ID: E_INCONS_VAL_TYPE_USED2

## value type declared inconsistently

The return type in a function declaration or definition does not match the return type in another declaration or definition of the function. This message is also issued for inconsistent declarations of variable types. Example of code that generates the message:

    file f.c:
    1 void v(void) {}
    2 void g(void);
    3 extern int i;

    file f_1.c:
    1 extern int f(void);
    2 extern int g(void);
    3 extern char i;
    ============
    value type declared inconsistently
        g                	f.c(2) void () :: f_1.c(2) int ()
        i                	f.c(3) int  :: f_1.c(3) char

Message ID: E_INCONS_VAL_TYPE_DECL1

## value type declared inconsistently

The return type in a function declaration or definition does not match the return type in another declaration or definition of the function. This message is also issued for inconsistent declarations of variable types. Example of code that generates the message:

    file f.c:
    1 void v(void) {}
    2 void g(void);
    3 extern int i;

    file f_1.c:
    1 extern int f(void);
    2 extern int g(void);
    3 extern char i;

Message ID: E_INCONS_VAL_TYPE_DECL2

## function argument ( number ) used inconsistently

The argument types in a function call does not match the types of the formal parameters in the function definition. Example of code that generates the message:

    file f.c:

    1 int
    2 f(int *x, int *y)
    3 {
    4 	return *x + *y;
    5 }

    file f1.c:

    1 int
    2 main(void)
    3 {
    4 	int             i = 0;
    5 	extern int      f(int, int);
    6 	return f(1, i);
    7 }
    ============
    function argument ( number ) used inconsistently
        f (arg 2) 	f.c(3) int * :: f1.c(6) int

Message ID: E_INCONS_ARG_USED1

## argument used inconsistently

The types of actual and dummy arguments are mismatched for the function call. Format: Simple Example of code that generates the message:

    1 static void
    2 g(x, y)
    3 	int             x;
    4 	int            *y;
    5 {
    6 	return;
    7 }
    8 void
    9 main(void)
    10 {
    11 	float           f = 4.5;
    12 	g(f, (int *) &f);
    13 }
    ============
    "f.c", line 12: warning: argument does not match remembered type: arg #1
    argument used inconsistently: g(arg 1) in f.c(5) int  and f.c(12) double

Message ID: E_INCONS_ARG_USED2

## function called with variable number of arguments

A function is called with the wrong number of arguments. Preceding a function definition with `/* VARARGSn */` suppresses this message for calls with n or more arguments; defining and declaring a function with the ANSI C notation "..." suppresses it for every argument. Example of code that generates the message:

    1  int f(int x, int y, int z)
    2  {
    3  	return x + y + z;
    4  }
    5  int g(int x, ...)
    6  {
    7  	return x;
    8  }
    9  /* VARARGS1 */
    10  int h(int x, int y, int z)
    11  {
    12  	return x + y + z;
    13  }
    14  void main(void)
    15  {
    16  	extern int f(), h(), g(int i, ...);
    17  	f();
    18  	g(1, 2, 3, 4);
    19  	h(1, 2, 3, 4, 5);
    20  }
    ============
    function called with variable number of arguments
        f                	f.c(1) :: f.c(17)

Message ID: E_FUNC_USED_VAR_ARG1

## function called with variable number of arguments

A function is called with the wrong number of arguments. Preceding a function definition with `/* VARARGSn */` suppresses this message for calls with n or more arguments; defining and declaring a function with the ANSI C notation "..." suppresses it for every argument. Example of code that generates the message:

    1  int f(int x, int y, int z)
    2  {
    3  	return x + y + z;
    4  }
    5  int g(int x, ...)
    6  {
    7  	return x;
    8  }
    9  /* VARARGS1 */
    10  int h(int x, int y, int z)
    11  {
    12  	return x + y + z;
    13  }
    14  void main(void)
    15  {
    16  	extern int f(), h(), g(int i, ...);
    17  	f();
    18  	g(1, 2, 3, 4);
    19  	h(1, 2, 3, 4, 5);
    20  }

Message ID: E_FUNC_USED_VAR_ARG2

## function value is used, but none returned

A non-`void` function does not contain a `return` statement, yet is used for its value in an expression. Example of code that generates the message:

    file f.c:
    1 extern int fun();
    2 main()
    3 {
    4 	return fun();
    5 }
    file f2.c:
    1 int fun()
    2 {}
    ============
    function value is used, but none returned
        fun

Message ID: E_FUNC_VAL_USED_NONE_RET1

## function value is used, but none returned

A non-`void` function does not contain a `return` statement, yet is used for its value in an expression. Example of code that generates the message:

    file f.c:
    1 extern int fun();
    2 main()
    3 {
    4 	return fun();
    5 }
    file f2.c:
    1 int fun()
    2 {}

Message ID: E_FUNC_VAL_USED_NONE_RET2

## function returns value which is always ignored

A function contains a `return` statement, and every call to the function ignores its return value. Example of code that generates the message:

    1 int f(void)
    2 {
    3 	return 1;
    4 }
    5 extern int f(void);
    6 int main(void)
    7 {
    8 	f();
    9 	return 1;
    10 }
    ============
    function returns value which is always ignored
        f

Message ID: E_FUNC_RET_ALWAYS_IGNOR1

## function returns value which is always ignored

A function contains a `return` statement, and every call to the function ignores its return value. Example of code that generates the message:

    1 int f(void)
    2 {
    3 	return 1;
    4 }
    5 extern int f(void);
    6 int main(void)
    7 {
    8 	f();
    9 	return 1;
    10 }

Message ID: E_FUNC_RET_ALWAYS_IGNOR2

## function returns value which is sometimes ignored

A function contains a `return` statement and some, but not all, calls to the function ignored its return value. Example of code that generates the message:

    1  int f(void)
    2  {
    3  	return 1;
    4  }
    5  extern int f(void);
    6  int main(void)
    7  {
    8  	if(f()) {
    9  		return f();
    10  	}
    11 	else {
    12  		f();
    13  		return 1;
    14  	}
    15  }
    ============
    function returns value which is sometimes ignored
        f

Message ID: E_FUNC_RET_MAYBE_IGNORED1

## function returns value which is sometimes ignored

A function contains a `return` statement and some, but not all, calls to the function ignored its return value. Example of code that generates the message:

    1  int f(void)
    2  {
    3  	return 1;
    4  }
    5  extern int f(void);
    6  int main(void)
    7  {
    8  	if(f()) {
    9  		return f();
    10  	}
    11 	else {
    12  		f();
    13  		return 1;
    14  	}
    15  }

Message ID: E_FUNC_RET_MAYBE_IGNORED2

## function argument ( number ) declared inconsistently

The parameter types in a function prototype declaration or definition differ from their types in another declaration or definition. Example of code that generates the message:

    file f.c:

    1 int f(int);
    2 int g(int);

    file f_1.c:

    1 int f(int *ip);
    2 int g(int *ip) {return *ip;}
    3
    ============
    function argument ( number ) declared inconsistently
        g (arg 1) 	f_1.c(2) int * :: f.c(2) int
        f (arg 1) 	f.c(1) int  :: f_1.c(1) int *

Message ID: E_INCONS_ARG_DECL1

## function declared with variable number of arguments

The number of parameters in a function prototype declaration or definition differ from their number in another declaration or definition. Declaring and defining the prototype with the ANSI C notation "..." suppresses this warning if all declarations have the same number of arguments. Example of code that generates the message:

    file f.c:

    1 int
    2 f(int x, int y)
    3 {
    4 	return (x + y);
    5 }
    6 int
    7 g(void)
    8 {
    9 	int             i, j = 0, k = 0;
    10 	i = f(j, k);
    11 	return (i);
    12 }

    file f_1.c:

    1 int             f(int);
    2 int             g(int);
    ============
    function declared with variable number of arguments
        f                	f.c(2) :: f_1.c(1)
        g                	f.c(7) :: f_1.c(2)

Message ID: E_FUNC_DECL_VAR_ARG1

## function declared with variable number of args

The number of parameters in a function prototype declaration or definition differ from their number in another declaration or definition. Declaring and defining the prototype with the ANSI C notation "..." suppresses this warning if all declarations have the same number of arguments. Example of code that generates the message:

    file f.c:

    1 int
    2 f(int x, int y)
    3 {
    4 	return (x + y);
    5 }
    6 int
    7 g(void)
    8 {
    9 	int             i, j = 0, k = 0;
    10 	i = f(j, k);
    11 	return (i);
    12 }

    file f_1.c:

    1 int             f(int);
    2 int             g(int);

Message ID: E_FUNC_DECL_VAR_ARG2

## may be indistinguishable due to truncation

External names in your program may be indistinguishable when it is ported to another machine because of implementation-defined restrictions as to length or case. Under `-Xc`, external names are truncated to the first 6 characters with one case, in accordance with the ANSI C lower bound; under `-p`, to the first 8 characters with one case. Example of code that generates the message:

    1  int foobar1;
    2  int FooBar12;
    3  int foobar2;
    4  int FOOBAR12;
    ============
    under -Xc:
    may be indistinguishable due to truncation
        FooBar12 in f.c(2) :: foobar1 in f.c(1)
        foobar2 in f.c(3) :: FooBar12 in f.c(2)
        FOOBAR12 in f.c(4) :: foobar2 in f.c(3)

    under -p:
    may be indistinguishable due to truncation
        FOOBAR12 (4) in f.c :: FooBar12 (2) in f.c

Message ID: E_INDISTING_FROM_TRUNC1

## may be indistinguishable due to truncation

External names in your program may be indistinguishable when it is ported to another machine because of implementation-defined restrictions as to length or case. Under `-Xc`, external names are truncated to the first 6 characters with one case, in accordance with the ANSI C lower bound; under `-p`, to the first 8 characters with one case. Example of code that generates the message:

    1  int foobar1;
    2  int FooBar12;
    3  int foobar2;
    4  int FOOBAR12;

Message ID: E_INDISTING_FROM_TRUNC2

## too many arguments for format

A control string of a [fs]printf() or [fs]scanf() function call has fewer conversion specifications than there are arguments remaining in the call. Example of code that generates the message:

    1 #include <stdio.h>
    2 void
    3 main(void)
    4 {
    5 	int             i = 0, j = 1;
    6 	(void) printf("%d", i, j);
    7 }
    ============
    too many arguments for format
        printf           	f.c(6)

Message ID: E_TOO_MANY_ARG_FOR_FMT1

## too many arguments for format

A control string of a [fs]printf() or [fs]scanf() function call has fewer conversion specifications than there are arguments remaining in the call. Example of code that generates the message:

    1 #include <stdio.h>
    2 void
    3 main(void)
    4 {
    5 	int             i = 0, j = 1;
    6 	(void) printf("%d", i, j);
    7 }

Message ID: E_TOO_MANY_ARG_FOR_FMT2

## malformed format string

A [fs]printf() or [fs]scanf() control string is formed incorrectly. Example of code that generates the message:

    1 #include <stdio.h>
    2 void
    3 main(void)
    4 {
    5 	(void) printf("%y");
    6 }
    ============
    malformed format string
        printf           	f.c(5)

Message ID: E_BAD_FORMAT_STR1

## malformed format string

A [fs]printf() or [fs]scanf() control string is formed incorrectly. Example of code that generates the message:

    1 #include <stdio.h>
    2 void
    3 main(void)
    4 {
    5 	(void) printf("%y");
    6 }

Message ID: E_BAD_FORMAT_STR2

## too few arguments for format

A control string of a [fs]printf() or [fs]scanf() function call has more conversion specifications than there were arguments remaining in the call. Example of code that generates the message:

    1 #include <stdio.h>
    2 void
    3 main(void)
    4 {
    5 	int             i = 1;
    6 	(void) printf("%d%d", i);
    7 }
    ============
    too few arguments for format
        printf           	f.c(6)

Message ID: E_TOO_FEW_ARG_FOR_FORMAT1

## too few arguments for format

A control string of a [fs]printf() or [fs]scanf() function call has more conversion specifications than there were arguments remaining in the call. Example of code that generates the message:

    1 #include <stdio.h>
    2 void
    3 main(void)
    4 {
    5 	int             i = 1;
    6 	(void) printf("%d%d", i);
    7 }

Message ID: E_TOO_FEW_ARG_FOR_FORMAT2

## function argument ( number ) type inconsistent with format

An argument is inconsistent with the corresponding conversion specification in the control string of a [fs]printf() or [fs]scanf() function call. Example of code that generates the message:

    1 #include <stdio.h>
    2 void
    3 main(void)
    4 {
    5 	int             i = 0;
    6 	(void) printf("%s", i);
    7 }
    8
    ============
    function argument ( number ) type inconsistent with format
        printf (arg 2) 	int  :: (format) char *	f.c(6)

Message ID: E_BAD_FORMAT_ARG_TYPE1

## function argument ( number ) type inconsistent with format

An argument is inconsistent with the corresponding conversion specification in the control string of a [fs]printf() or [fs]scanf() function call. Example of code that generates the message:

    1 #include <stdio.h>
    2 void
    3 main(void)
    4 {
    5 	int             i = 0;
    6 	(void) printf("%s", i);
    7 }
    8

Message ID: E_BAD_FORMAT_ARG_TYPE2

## declared global, could be static

An external variable or function is declared global, that is, not declared static, but is referenced only in the file in which it is defined. This message is suppressed when `lint` is invoked with `-m`. Example of code that generates the message:

    1 int
    2 f(void)
    3 {
    4 	return 1;
    5 }
    6 main(void)
    7 {
    8 	return f();
    9 }
    ============
    declared global, could be static
        f                	f.c(2)

Message ID: E_GLOBAL_COULD_BE_STATIC1

## declared global, could be static

An external variable or function is declared global, that is, not declared static, but is referenced only in the file in which it is defined. This message is suppressed when `lint` is invoked with `-m`. Example of code that generates the message:

    1 int
    2 f(void)
    3 {
    4 	return 1;
    5 }
    6 main(void)
    7 {
    8 	return f();
    9 }

Message ID: E_GLOBAL_COULD_BE_STATIC2

## type has > 16 modifiers, only 16 will be used

The number of modifiers used for a name description exceeds the limit of 16. Format: Simple Example of code that generates the message:

    1 int ************************ip = 0;
    ============
    (1) warning: type has > 16 modifiers, only 16 will be used

Message ID: E_MODIFIER_OVERFLOW

## argument number mismatch with directive: /* VARARGS */:effective args() must be no less than those checked by directive(n)

If the directive `/* VARARGSn */` is applied to a function having less than n parameters, n is decreased to the number of parameters appearing in the function header. Example of code that generates the message:

    1 /* VARARGS4 */
    2 int
    3 f(int x, int y, int z)
    4 {
    5 	return (x + y + z);
    6 }
    ============
    (3) warning: argument number mismatch with directive: /* VARARGS4 */:
    	effective args(3) must be no less than those checked by directive(4)

Message ID: E_DIRECTIVE_TOO_MANY_ARG

## argument number mismatch with directive: /* VARARGS */:effective args() must be no less than those checked by directive(n)

If the directive `/* VARARGSn */` is applied to a function having less than n parameters, n is decreased to the number of parameters appearing in the function header. Example of code that generates the message:

    1 /* VARARGS4 */
    2 int
    3 f(int x, int y, int z)
    4 {
    5 	return (x + y + z);
    6 }
    ============
    (3) warning: argument number mismatch with directive: /* VARARGS4 */:
    	effective args(3) must be no less than those checked by directive(4)

Message ID: E_DIRECTIVE_TOO_MANY_ARG2

## variable may be used before set

The first reference to an automatic, non-array variable occurs at a line number earlier than the first assignment to the variable. Taking the address of a variable implies both a set and a use; the first assignment to any member of a `struct` or `union` implies an assignment to the entire `struct` or `union`. Format: Simple Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4 	int             i, j, k;
    5 	static int      x;
    6 	k = j;
    7 	i = i + 1;
    8 	x = x + 1;
    9 }
    ============
    (6) warning: variable may be used before set: j
    (7) warning: variable may be used before set: i

Message ID: E_VAR_USED_BEFORE_SET

## constant in conditional context

The controlling expression of an `if`, `while`, or `for` statement is a constant. Preceding the statement with `/* CONSTCOND */` suppresses this message. Format: Simple Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	if (!1)
    5 		return;
    6 	while (1)
    7 		f();
    8 	for (; 1;);
    9 	for (;;);
    10 	/* CONSTCOND */
    11 	while (1);
    12 }
    ============
    (4) warning: constant in conditional context
    (6) warning: constant in conditional context
    (8) warning: constant in conditional context

Message ID: E_CONSTANT_CONDITION

## evaluation order undefined

A variable is changed by a side effect and used elsewhere in the same expression. Format: Simple Example of code that generates the message:

    1 static int      ia[10];
    2 void
    3 v(void)
    4 {
    5 	int             i = 2;
    6 	ia[i++] = i;
    7 }
    ============
    (6) warning: evaluation order undefined: i

Message ID: E_UNDEF_EVAL_ORDER

## logical expression always false: op "&"

A logical `AND` expression checks for equality of the same variable to two different constants, or has the constant 0 as an operand. In the latter case, preceding the expression with `/* CONSTCOND */` suppresses this message. Format: Simple Example of code that generates the message:

    1 int
    2 main(int argc, char *argv[])
    3 {
    4 	int             i = argc;
    5 	i = (i == 1) & (i == 2);
    6 	i = (i == 1) & (i == 1);
    7 	i = (1 == i) & (i == 2);
    8 	i = (i == 1) & 0;
    9 	/* CONSTCOND */
    10 	i = (0 & (i == 1));
    11 	return (i);
    12 }
    ============
    (5) warning: logical expression always false: op "&"
    (7) warning: logical expression always false: op "&"
    (8) warning: logical expression always false: op "&"

Message ID: E_FALSE_LOGICAL_EXPR

## logical expression always true: op "|| "

A logical `OR` expression checks for inequality of the same variable to two different constants, or has a nonzero integral constant as an operand. In the latter case, preceding the expression with `/* CONSTCOND */` suppresses this message. Format: Simple Example of code that generates the message:

    1  int f(int i)
    2  {
    3  	i = (i != 1) || (i != 2);
    4  	i = (i != 1) || (i != 1);
    5  	i = (1 != i) || (i != 2);
    6  	i = (i == 10) || 1;
    7  /* CONSTCOND */
    8  	i = (1 || (i == 10));
    9 	return i;
    10  }
    ============
    (3) warning: logical expression always true: op "||"
    (5) warning: logical expression always true: op "||"
    (6) warning: logical expression always true: op "||"

Message ID: E_TRUE_LOGICAL_EXPR

## suspicious comparison of char or unsigned value with a negative constant or 0

A comparison is performed on a variable of type "plain" `char` or `unsigned` that implies it may have a negative value or 0. Whether a "plain" `char` is treated as `signed` or nonnegative is implementation-defined. Format: Simple Example of code that generates the message:

    1 void
    2 v(char c, signed char sc)
    3 {
    4 	int             i;
    5 	i = (c == -5);
    6 	i = (c < 0);
    7 	i = (sc < 0);
    8 }
    ============
    (5) warning: suspicious comparison of char with negative constant: op "=="
    (6) warning: suspicious comparison of char with 0: op "<"

Example of code that generates the message:

    1 void
    2 v(unsigned int ui)
    3 {
    4 	int             i;
    5 	i = (ui > -2);
    6 	i = (ui < 0);
    7 	i = (ui <= 0);
    8 	i = (ui >= 0);
    9 	i = (ui > 0);
    10 	i = (-2 < ui);
    11 	i = (ui == -1);
    12 	i = (ui == -1U);
    13 }
    ============
    (5) warning: suspicious comparison of unsigned with negative constant: op ">"
    (6) warning: suspicious comparison of unsigned with 0: op "<"
    (7) warning: suspicious comparison of unsigned with 0: op "<="
    (8) warning: suspicious comparison of unsigned with 0: op ">="
    (9) warning: suspicious comparison of unsigned with 0: op ">"
    (10) warning: suspicious comparison of unsigned with negative constant: op "<"
    (11) warning: suspicious comparison of unsigned with negative constant: op "=="

Message ID: E_SUSPICIOUS_COMPARISON

## constant operand to op

The operand of the `NOT` operator is a constant. Preceding the statement with `/* CONSTCOND */` suppresses this message for that statement; invoking `lint` with `-h` suppresses it for every statement. Format: Simple Example of code that generates the message:

    1  void main(void)
    2  {
    3  	if (! 0) return;
    4  	/* CONSTCOND */
    5  	if (! 0) return;
    6  }
    ============
    (3) warning: constant operand to op: "!"

Message ID: E_CONST_EXPR

## assignment of negative constant to unsigned type

You have assigned a negative constant to an unsigned integral type. An unsigned integral type can only hold positive values or the value zero. Example of code that generates the message:

    unsigned char uc = -1;
    unsigned int b = -13;

Message ID: E_ASSIGN_NEG_CONST_TO_UNSIGNED

## constant truncated by assignment

An integral constant expression is assigned or returned to an object of an integral type that cannot hold the value without truncation. Format: Simple Example of code that generates the message:

    1 unsigned char
    2 f()
    3 {
    4 	unsigned char   uc;
    5 	uc = 255;
    6 	uc = 256;
    7 	return uc;
    8 }
    ============
    (6) warning: constant truncated by assignment

Message ID: E_CONST_TRUNCATED_BY_ASSIGN

## conversion of pointer loses bits

A pointer is assigned to an object of an integral type that is smaller than the pointer. Format: Simple Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4 	int            *ip;
    5 	char            c;
    6 	c = ip;
    7 }
    ============
    (6) warning: conversion of pointer loses bits

Message ID: E_PTR_CONV_LOSES_BITS

## array subscript cannot be negative

The constant expression that represents the subscript of a true array (as opposed to a pointer) had a negative value. Format: Simple Example of code that generates the message:

    1 int
    2 main(void)
    3 {
    4 	int             ia[10];
    5 	return ia[5 * 2 / 10 - 2];
    6 }
    ============
    (5) warning: array subscript cannot be negative: -1

Message ID: E_NEG_ARRAY_SUBSCRIPT

## array subscript cannot be > value

The value of an array element's subscript exceeds the upper array bound. Format: Simple Example of code that generates the message:

    1 int
    2 f(void)
    3 {
    4 	int             ia[10];
    5 	int            *ip = ia;
    6 	while (ip != &ia[10])	/* using address is ok */
    7 		ip++;
    8 	return ia[5 + 6];
    9 }
    ============
    (8) warning: array subscript cannot be > 9: 11

Message ID: E_OVERFLOW_ARRAY_SUBSCRIPT

## precedence confusion possible; parenthesize

You have not parenthesized an expression that mixes a logical and a bitwise operator. This message is suppressed when `lint` is invoked with `-h`. Format: Simple Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4 	int             i = 0, j = 0, x;
    5 	x = (2 + i == 0);
    6 	x = (i & j == 0);	/* eval'd (i & (j == 0)) */
    7 	x = (j == 1 & i);	/* eval'd ((j == 1) & i) */
    8 }
    ============
    (6) warning: precedence confusion possible; parenthesize
    (7) warning: precedence confusion possible; parenthesize

Message ID: E_PRECEDENCE_CONFUSION

## variables of type long long not allowed by printf and scanf family of routines on hp

Printing or reading variables of type long long is not supported by the printf and scanf family of routines on HP-UX.

Message ID: E_HPUX_BAD_FORMAT_STR1

## variables of type long long not allowed by printf and scanf family of routines on hp

Printing or reading variables of type long long is not supported by the printf and scanf family of routines on HP-UX.

Message ID: E_HPUX_BAD_FORMAT_STR2

## name defined but never used:

You have defined a variable or function but never accessed it anywhere in the source file. Example of code that generates the message:

    int f();
    int main() {
      int a = 10;
      printf("never call function f() " );
      return 0;
    }
    int f() {
      return (1+1);
    }

Message ID: E_NAME_DEF_NOT_USED

## name declared but never used or defined

You have declared a variable or function but never accessed it anywhere in the source file. Example of code that generates the message:

    int f();
    int main() {
    	int a;
    	printf("never call to function f() or use a");
    	return 0;
    }

Message ID: E_NAME_DECL_NOT_USED_DEF

## name multiply defined:

You have declared a variable several times in different places. Watch out that the variable you wish to reference is not hidden by a definition of another variable within the current scope. Example of code that generate the message:

    int x = 10;        /* global var: x */
    int main() {
      int x = 1;	   /* another declaration of x */
      return f(x);
    }
    int f(int y) {
      int x = 5;	       /* declare local x */
      return (y + g(x));   /* using x in the current scope */
    }
    int g(int z) {
      return (x*z);       /* using x here */
    }

Message ID: E_NAME_MULTIPLY_DEF

## read error from file

A file system error has occured when reading the indicated file. This is not an error from the source program.

Message ID: E_F_RD_ERR

## write error in file

A file system error has occured when reading the indicated file. This is not an error from the source program.

Message ID: E_F_WR_ERR

## cannot open file

A file system error has occured when reading the indicated file. This is not an error from the source program.

Message ID: E_OPEN_F

## enum member declared inconsistently

Different values defined for the `enum` members with the same name. Example of code that generates the message:

    file f.c:
    1 typedef enum {
    2 	ONE = 1, TWO = 3
    3 } e;
    file f_1.c:

    1 typedef enum {
    2 	ONE = 1, TWO
    3 } e;
    ============
    enum member declared inconsistently
        TWO              3 f.c(2) :: 2 f_1.c(2)

Message ID: E_ENUM

## different definitions of macro

Two or more source files define the same macro name differently. Example of code that generates the message:

    file f.c:
    1 #define MAX_I   1
    file f_1.c:
    1 #define MAX_I   2
    ============
    different definitions of macro
        MAX_I            	f.c(1) :: f_1.c(1)

Message ID: E_MCR_NODIFF

## include file is unnecessary

The indicated include file is not used during the compilation of the program. Example of code that generates the message:

    #include <math.h>     /* no math functions used */
    int main () {
    	return 0;
    }

Message ID: E_INCL_NO_US

## enum member defined but never used

Unused `enum` member found. Example of code that generates the message:

    1 enum {
    2 	x,
    3 	y = 3,
    4 	z
    5 } en;
    6 main(void)
    7 {
    8 	en = z;
    9 	return en;
    10 }
    ============
    enum member defined but never used
        x                	f.c(2)
        y                	f.c(3)

Message ID: E_ENUM_UNUSE

## typedef defined but not used

Declared `typedef` is never used in the program. Example of code that generates the message:

    1 typedef long int LONG_INT_t;
    2 void
    3 main(void)
    4 {
    5 	return;
    6 }
    ============
    typedef defined but not used
        LONG_INT_t       	f.c(1)

Message ID: E_TYPEDEF_UNUSE

## typedef declared inconsistently

Different definitions exist for the same `typedef` name. Example of code that generates the message:

    1 typedef long int LONG_INT_t;
    2 int
    3 f(void)
    4 {
    5 	typedef long long int LONG_INT_t;
    6 	LONG_INT_t      li = 1;
    7 	return li;
    8 }
    ============
    typedef declared inconsistently
        LONG_INT_t       	long long  f.c(1) :: long  f.c(5)

Message ID: E_TYPEDEF_INCONSIST

## .c file has no corresponding .h file

There is no `.h` file with a name equal to the name of the `.c` file. Format: Simple Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	int            *ip;
    5 	ip = (int *) sizeof(int);
    6 	free(ip);
    7 	ip = (int *) malloc(sizeof(int) * 10);
    8 	ip++;
    9 	free(ip);
    10 }
    ============
    .c file has no corresponding .h file
        /export/ld6/clint/LINT.EXMPLS/f/f.c

Message ID: E_H_C_CHECK0

## extern declared in .h file but not defined in corresponding .c file

There is an `extern` name declared in a `.h` file, but this name isn't defined in the corresponding `.c` file. Example of code that generates the message:

    file f.h:
    1 extern int      i;
    2 extern int      f(int x, int y);

    file f.c:
    1 #include "f.h"
    2 int             ia[2];
    3 int             i;
    4 int
    5 f(int x, int y)
    6 {
    7 	ia[0] = x;
    8 	ia[1] = y;
    9 	if (ia[i] > ia[1])
    10 		ia[0] = ia[1];
    11 	return (x + y) / 2;
    12 }
    ============
    extern defined in .c file but not declared in corresponding .h file
        ia               	f.c(2)

Message ID: E_H_C_CHECK1

## extern defined in .c file but not declared in corresponding .h file

There is an `extern` name defined in a `.c` file, but this name isn't declared in its corresponding `.h` file. Example of code that generates the message:

    file f.h:
    1 int             i;
    2 extern int      f(int x, int y);

    file f.c:
    1 #include "f.h"
    2 extern int      i;
    3 int
    4 f(int x, int y)
    5 {
    6 	int             ia[2];
    7 	ia[0] = x;
    8 	ia[1] = y;
    9 	if (ia[i] > ia[1])
    10 		ia[0] = ia[1];
    11 	return (x + y) / 2;
    12 }
    13 int
    14 main(void)
    15 {
    16 	i = 5;
    17 	return f(i, -i);
    18 }
    ============
    extern defined in .c file but not declared in corresponding .h file
        main             	f.c(14)

Message ID: E_H_C_CHECK2

## name defined but not used at runtime

A function is defined but not used at runtime, for example, when the function is called from unreachable code. Example of code that generates the message:

    file f.c:
    1 extern int      f(void);
    2
    3 main(void)
    4 {
    5 	int             i = 0;
    6 	if (i > 0)
    7 		i = f();
    8 	return i;
    9 }

    file f_1.c:
    1 int
    2 f(void)
    3 {
    4 	return 3;
    5 }
    ============

Message ID: E_UNCAL_F

## statement not reached

You have a statement in your program that is never executed. Example of code that generate the message:

    int f() {
      printf("return before reach\n");
      return 0;

      assert(FALSE);    /* <==== this statement is not reached */
    }

Message ID: E_STM_RCH

## memory can not be deallocated due to bad argument

The argument is not a pointer to allocated memory. Format: Simple Example of code that generates the message:

    1 #include <stdlib.h>
    2 int            *ip;
    3 void
    4 main(void)
    5 {
    6 	free(*ip);
    7 	return;
    8 }
    ============
    f.c(6) warning: memory can not be deallocated due to bad argument

Message ID: E_A_NOMEM

## duplicate deallocation of memory

You are deallocating memory that has already been deallocated. Example of code that generates the message:

    1 #include <malloc.h>
    2 static int     *ip, *jp;
    3 void
    4 main(void)
    5 {
    6 	ip = malloc(sizeof(int));
    7 	jp = ip;
    8 	free(ip);
    9 	free(jp);
    10 }
    ============
    duplicate deallocation of memory
        f.c(9)	:: f.c(8)

Message ID: E_P_FREE_DEALLOC

## possible duplicate deallocation of memory

You are deallocating memory that may have already been deallocated. Example of code that generates the message:

    1 #include <malloc.h>
    2 static int     *ip, *jp;
    3 void
    4 main(int argc, char *argv[])
    5 {
    6 	ip = malloc(sizeof(int));
    7 	*ip = 4;
    8 	jp = ip;
    9 	if (argc > 2)
    10 		free(ip);
    11 	free(jp);
    12 }
    ============
    possible duplicate deallocation of memory
        f.c(11)	:: f.c(10)

Message ID: E_P_FREE_DEALLOC_PSBL

## reference to deallocated memory

Reference to deallocated memory. Example of code that generates the message:

    1 #include <malloc.h>
    2 static int     *ip;
    3 int
    4 main(void)
    5 {
    6 	int             i;
    7 	ip = malloc(10);
    8 	*ip = 2;
    9 	free(ip);
    10 	i = *ip;
    11 	return (i);
    12 }
    ============
    reference to deallocated memory
        f.c(10)	:: f.c(9)

Message ID: E_P_REF_DEALLOC

## possible reference to deallocated memory

There may be a reference to deallocated memory. Example of code that generates the message:

    1 #include <malloc.h>
    2 static int     *ip;
    3 int
    4 main(int argc, char *argv[])
    5 {
    6 	int             i;
    7 	ip = malloc(10);
    8 	*ip = 2;
    9 	if (argc > 2)
    10 		free(ip);
    11 	i = *ip;
    12 	return (i);
    13 }
    ============
    possible reference to deallocated memory
        f.c(13)	:: f.c(12)

Message ID: E_P_REF_DEALLOC_PSBL

## use of a pointer to deallocated memory

Use of a pointer to deallocated memory. Example of code that generates the message:

    1 #include <malloc.h>
    2 static int     *ip;
    3 void
    4 main(void)
    5 {
    6 	int            *jp;
    7 	ip = malloc(10);
    8 	free(ip);
    9 	jp = ip;
    10 }
    ============
    use of a pointer to deallocated memory
        f.c(9)	:: f.c(8)

Message ID: E_P_USE_DEALLOC

## possible use of a pointer to deallocated memory

Possible use of a pointer to deallocated memory. Example of code that generates the message:

    1 #include <malloc.h>
    2 void
    3 f(char*ip)
    4 { free(ip);
    5 }
    6
    7 char
    8 main(int argc, char *argv[])
    9 { char *ip, *jp;
    10
    11  ip = malloc(argc+4);
    12  if (argc-- == 0) f(ip);
    13  if (argc > 1)
    14  {  jp = ip;
    15     return *jp; }
    16  else
    17     return '0';
    18 }
    ============

Message ID: E_P_USE_DEALLOC_PSBL

## deallocating a pointer to a variable

Deallocating a pointer to a variable is prohibited. Example of code that generates the message:

    1 #include <malloc.h>
    2 int
    3 main(void)
    4 {
    5 	int            *ip;
    6 	int             i;
    7 	ip = &i;
    8 	free(ip);
    9 }
    ============
    deallocating a pointer to a variable
        i defined at f.c(6)	:: f.c(8)

Message ID: E_P_FREE_VAR

## deallocating a pointer that could point to a variable

Deallocating a pointer that could point to a variable. Example of code that generates the message:

    1 #include <malloc.h>
    2 static int     *ip;
    3 int
    4 main(int argc, char *argv[])
    5 {
    6 	int             i;
    7 	if (argc > 2)
    8 		ip = &i;
    9 	else
    10 		ip = malloc(sizeof i);
    11 	*ip = 99;
    12 	free(ip);
    13 	return (++*ip);
    14 }
    ============
    deallocating a pointer that could point to a variable
        i defined at f.c(6)	:: f.c(12)

Message ID: E_P_FREE_VAR_PSBL

## dereference of a pointer that points to a variable that no longer exists

Reference using a pointer that points to a variable that no longer exists. Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object is undefined after the end of the block. Example of code that generates the message:

    1 int            *ip;
    2 f(void)
    3 {
    4 	int             i = 0;
    5 	ip = &i;
    6 	return (i);
    7 }
    8 main(void)
    9 {
    10 	int             j;
    11 	j = f();
    12 	j += *ip;
    13 	return (j);
    14 }
    ============
    reference using a pointer that points to a variable that no longer exists
        i defined at f.c(4)	:: f.c(12)

Message ID: E_P_REF_VAR

## possible reference using a pointer to a variable that no longer exists

Possible reference using a pointer to a variable that no longer exists. Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object is undefined after the end of the block. Example of code that generates the message:

    1 int            *ip, ei;
    2 f(int n)
    3 {
    4 	int             i = 0;
    5 	ip = &ei;
    6 	if (n > 0)
    7 		ip = &i;
    8 	return (i);
    9 }
    10 main(int argc, char *argv[])
    11 {
    12 	int             j;
    13 	j = f(argc);
    14 	j += *ip;
    15 	return (ei + j);
    16 }
    ============
    possible reference using a pointer to a variable that no longer exists
        i defined at f.c(4)	:: f.c(14)

Message ID: E_P_REF_VAR_PSBL

## use of a pointer to a variable that no longer exists

Use of a pointer to a variable that no longer exists. Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object is undefined after the end of the block. Example of code that generates the message:

    1 int            *ip, ei;
    2 f(void)
    3 {
    4 	int             x = 0;
    5 	ip = &x;
    6 	return (x);
    7 }
    8 main(void)
    9 {
    10 	int             i;
    11 	i = f();
    12 	ip++;
    13 	return (ei + i);
    14 }
    ============
    use of a pointer to a variable that no longer exists
        x defined at f.c(4)	:: f.c(12)

Message ID: E_P_USE_VAR

## use of a pointer to a variable that may no longer exist

A pointer is used that could point to a variable that no longer exists. Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object is undefined after the end of the block. Example of code that generates the message:

    1 int            *ip, ei;
    2 g(int n)
    3 {
    4 	int             x = 0, y = 1;
    5 	ip = &ei;
    6 	if (n > 0)
    7 		ip = &x;
    8 	return (x);
    9 }
    10 main(int argc, char * argv[])
    11 {
    12 	int             i;
    13 	i = g(argc);
    14 	ip++;
    15 	return (ei + i);
    16 }
    ============
    use of a pointer to a variable that may no longer exist
        x defined at f.c(4)	:: f.c(14)

Message ID: E_P_USE_VAR_PSBL

## return of a pointer to local variable

Function returns the address of its automatic local variable or parameter stored in some pointer. Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object will be undefined after the end of the block. Example of code that generates the message:

    1 int            *
    2 f(void)
    3 {
    4 	int             i;
    5 	int            *ip = &i;
    6 	return (ip);
    7 }
    8 void
    9 main(void)
    10 {
    11 	int            *jp;
    12 	jp = f();
    13 	(*jp)++;
    14 }
    ============
    return of a pointer to local variable
        i defined at f.c(4)	:: f.c(6)

Message ID: E_P_RET_VAR

## possible return of a pointer to local variable

A routine may return the address of its automatic local variable. Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object will be undefined after the end of the block. Example of code that generates the message:

    1 static int     *
    2 f(int *ip)
    3 {
    4 	int             i;
    5 	int            *jp = ip;
    6 	if (*ip > 5)
    7 		jp = &i;
    8 	return jp;
    9 }
    10 main(void)
    11 {
    12 	int             i = 1;
    13 	i += *f(&i);
    14 	return i;
    15 }
    ============
    possible return of a pointer to local variable
        i defined at E_P_RET_VAR_PSBL.c(4)	:: E_P_RET_VAR_PSBL.c(8)

Message ID: E_P_RET_VAR_PSBL

## deallocating NULL pointer

Argument is equal to `NULL`. Example of code that generates the message:

    1 #include <malloc.h>
    2 #define ADDR	0
    3 static int     *ip;
    4 main(void)
    5 {
    6 	ip = ADDR * sizeof(int);
    7 	free(ip);
    8 	return 0;
    9 }
    ============
    deallocating NULL pointer
        f.c(7)

Message ID: E_P_FREE_NULL

## deallocating a pointer that could be NULL

Deallocating a pointer that could be `NULL`. Example of code that generates the message:

    1 #include <malloc.h>
    2 static int     *ip;
    3 main(int argc, char *argv[])
    4 {
    5 	if (argc == 2)
    6 		ip = 0;
    7 	else
    8 		ip = malloc(sizeof(int));
    9 	free(ip);
    10 	return 0;
    11 }
    ============
    deallocating a pointer that could be NULL
        f.c(9)

Message ID: E_P_FREE_NULL_PSBL

## reference using a `NULL` pointer

Reference using a NULL pointer. Example of code that generates the message:

    1 static int     *ip;
    2 int
    3 main(void)
    4 {
    5 	int             i = 0;
    6 	ip = (int *) 0;
    7 	i = *ip;
    8 	i = i + *ip;
    9 	return (i);
    10 }
    ============
    reference using a NULL pointer
        f.c(7)

Message ID: E_P_REF_NULL

## possible reference using NULL pointer

There may be a reference using a `NULL` pointer. Example of code that generates the message:

    1 static int     *ip;
    2 static int      si = 99;
    3 int
    4 main(int argc, char *argv[])
    5 {
    6 	int             i = 0;
    7 	if (argc == 2)
    8 		ip = (int *) 0;
    9 	else
    10 		ip = &si;
    11 	i = i + *ip;
    12 	return (i);
    13 }
    ============
    possible reference using NULL pointer
        f.c(11)

Message ID: E_P_REF_NULL_PSBL

## possible illegal use of NULL pointer

A `NULL` pointer may be used incorrectly. Example of code that generates the message:

    1 int
    2 main(int argc, char * argv[])
    3 {
    4 	int            *ip, *jp;
    5 	int             i;
    6 	ip = 0;
    7 	if (argc > 1)
    8 		ip = &i;
    9 	jp = ip;
    10 	return (*jp)++;
    11 }
    ============
    modification using a pointer that could be NULL
        ip defined at f.c(4)	:: f.c(10)

Message ID: E_P_USE_NULL_PSBL

## deallocating uninitialized pointer

Argument is not initialized. Example of code that generates the message:

    1 #include <malloc.h>
    2 void
    3 main(void)
    4 {
    5 	int            *ip;
    6 	free(ip);
    7 }
    ============
    deallocating uninitialized pointer
        ip defined at f.c(5)	:: f.c(6)

Message ID: E_P_FREE_UNINI

## deallocating a pointer that could be an uninitialized value

Deallocating a pointer that could be an uninitialized value. Example of code that generates the message:

    1 #include <malloc.h>
    2
    3 void
    4 main(int argc, char *argv[])
    5 {
    6	int     *ip;
    7 	if (argc == 0)
    8 		ip = malloc(sizeof(int));
    9 	free(ip);
    10 }
    ============
    deallocating a pointer that could be an uninitialized value
        ip defined at f.c(5)	:: f.c(8)

Message ID: E_P_FREE_UNINI_PSBL

## reference using a pointer that is an uninitialized value

Reference using a pointer that is an uninitialized value. Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	int             i;
    5 	int            *ip;
    6
    7 	i = *ip;
    8 }
    ============
    reference using a pointer that is an uninitialized value
        ip defined at f.c(5)	:: f.c(7)

Message ID: E_P_REF_UNINI

## possible reference using an uninitialized pointer

There may be a reference using an uninitialized pointer. Example of code that generates the message:

    1 #include <malloc.h>
    2
    3 void
    4 v(int i, char **p)
    5 {
    6	*p = (char *) malloc(sizeof(int) * (i + 1));
    7	**p = '0';
    8 }
    9
    10 char
    11 main(int argc, char *argv[])
    12 {
    13	char           *cp;
    14	if (argc)
    15		v(argc, &cp);
    16	return *cp;
    17 }
    ============
    possible reference using an uninitialized pointer
        cp defined at f.c(13)	:: f.c(16)

Message ID: E_P_REF_UNINI_PSBL

## use of a pointer that is an uninitialized value

Use of a pointer that is an uninitialized value. Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	int            *ip;
    5
    6 	ip++;
    7 }
    ============
    use of a pointer that is an uninitialized value
        ip defined at f.c(4)	:: f.c(6)

Message ID: E_P_USE_UNINI

## use of a pointer that could be an uninitialized value

Use of a pointer that could be an uninitialized value. Example of code that generates the message:

    1 void
    2 main(int argc, char *argv[])
    3 {
    4 	int             i;
    5 	int            *ip;
    6 	if (argc > 1)
    7 		ip = &i;
    8 	ip++;
    9 }
    ============
    use of a pointer that could be an uninitialized value
        ip defined at f.c(5)	:: f.c(8)

Message ID: E_P_USE_UNINI_PSBL

## deallocating a pointer produced in a questionable way

Deallocating a pointer produced in a questionable way, for example, by conversion of an integral value to a pointer value. Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	int            *ip;
    5 	ip = (int *) sizeof(int);
    6 	free(ip);
    7 }
    ============
    deallocating a pointer produced in a questionable way
        f.c(6)

Message ID: E_P_FREE_SUSP

## deallocating a pointer that could be produced in a questionable way

Deallocating a pointer that could be produced in a questionable way. Example of code that generates the message:

    1 #include <malloc.h>
    2 void
    3 main(int argc, char *argv[])
    4 {
    5 	int            *ip;
    6 	ip = (int *) malloc(sizeof(int) * 10);
    7 	*ip = argc - 1;
    8 	if (*ip == 0)
    9 		ip = (int *) sizeof(int);
    10 	free(ip);
    11 }
    ============
    deallocating a pointer that could be produced in a questionable way
        f.c(10)

Message ID: E_P_FREE_SUSP_PSBL

## reference using a pointer produced in a questionable way

Reference using a pointer produced in a questionable way. Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	int            *ip;
    5 	int             i;
    6 	ip = (int *) sizeof i;
    7 	i = *ip;
    8 }
    ============
    reference using a pointer produced in a questionable way
        f.c(7)

Message ID: E_P_REF_SUSP

## possible reference using a pointer produced in a questionable way

Possible reference using a pointer that could be produced in a questionable way. Example of code that generates the message:

    1 main(int argc, char *argv[])
    2 {
    3 	int            *ip;
    4 	int             i = argc;
    5 	ip = (int *) sizeof i;
    6 	if (argc > 2)
    7 		ip = &i;
    8 	return *ip;
    9 }
    ============
    possible reference using a pointer produced in a questionable way
        E_P_REF_SUSP_PSBL.c(8)

Message ID: E_P_REF_SUSP_PSBL

## use of a pointer produced in a questionable way

A pointer is used that was produced in a questionable way. Example of code that generates the message:

    1 void
    2 main(void)
    3 {
    4 	int            *ip, *jp;
    5 	int             i = 0;
    6 	ip = (int *) sizeof i;
    7 	jp = ip;
    8 }
    ============
    use of a pointer produced in a questionable way
        f.c(7)

Message ID: E_P_USE_SUSP

## possible use of a pointer produced in a questionable way

A pointer is used that was possibly produced in a questionable way. Example of code that generates the message:

    1 void
    2 main(int argc, char *argv[])
    3 {
    4 	int            *ip, *jp;
    5 	int             i = 99;
    6 	ip = (int *) sizeof i;
    7 	if (argc > 2)
    8 		ip = &i;
    9 	jp = ++ip;
    10 }
    ============
    possible use of a pointer produced in a questionable way
        f.c(9)

Message ID: E_P_USE_SUSP_PSBL

## assigned value never used

The variable value is not used in the program. The superfluous assignment can be removed. Example of code that generates the message:

    1 static int     *ip, i;
    2 static void
    3 f(void)
    4 {
    5 	int            *iq;
    6 	ip = &i;
    7 	iq = ip;
    8 	*ip = 7;
    9 }
    10 int
    11 main(int argc, char *argv[])
    12 {
    13 	int             j = 0xff;
    14 	f();
    15 	j = 0x01;
    16 	if (argc > 2)
    17 		ip = &i;
    18 	else
    19 		ip = &j;
    20 	*ip = 1;
    21 	ip = ip + 1;
    22 	*ip = 2;
    23 	return (0);
    24 }
    ============
    assigned value never used
        iq defined at f.c(5)	:: set at f.c(7)
        i defined at f.c(1)	:: set at f.c(8)
        j defined at f.c(13)	:: set at f.c(13)
        j defined at f.c(13)	:: set at f.c(15)
        j defined at f.c(13)	:: set at f.c(22)
        i defined at f.c(1)	:: set at f.c(22)

    assigned value never used
        j defined at f.c(13)	:: set at f.c(20)	:: reset at f.c(22)
        i defined at f.c(1)	:: set at f.c(20)	:: reset at f.c(22)

Message ID: E_ASGN_NEVER_USED

## assigned value never used: ; reset at

A variable has been assigned a value which is never used prior to resetting the variable to another value. The superfluous assignment can be removed. Example of code that generates the message:

    1 static int     i;
    2 int main (void)
    3 {
    4       int            iq;
    5       iq = 8;
    6       i = 7;
    7       iq = i;
    8       return iq;
    9 }
    ==========
    "t2.c", line 5: warning: assigned value never used: iq defined at t2.c(4); reset at t2.c(7)

Message ID: E_ASGN_RESET

## modification of constant data

A constant data or variable is changed. Example of code that generates the message:

    1 static const int ic = 1;
    2 static void
    3 f(int *ip)
    4 {
    5 	(*ip)++;
    6 }
    7 main(void)
    8 {
    9 	int            *ip = (int *) &ic;
    10 	f(ip);
    11 	return ic;
    12 }
    ============
    modification of constant data
        ic defined at f.c(1)	:: f.c(5)

Message ID: E_ASGN_CONST

## possible modification of constant data

A constant data or value may be changed. Example of code that generates the message:

    1 static const int ic = 1;
    2 static void
    3 f(int *iq)
    4 {
    5 	(*iq)++;
    6 }
    7 main(int argc , char* argv[])
    8 {
    9 	int            *ip = (int *) &ic;
    10 	int             i;
    11 	if (argc > 2)
    12 		ip = &i;
    13 	f(ip);
    14 	return (*ip);
    15 }
    ============
    possible modification of constant data
        ic defined at f.c(1)	:: f.c(5)

Message ID: E_ASGN_CONST_PSB

## memory not deallocated

Allocated memory is not released explicitly in the program. Example of code that generates the message:

    1 #include <stdlib.h>
    2 main(void)
    3 {
    4 	int            *ip;
    5 	ip = malloc(sizeof(long));
    6 	*ip += 5;
    7 	return *ip;
    8 }
    ============
    memory not deallocated
        f.c(5)

Message ID: E_NEVER_DEALLOC

## memory possibly not deallocated

Allocated memory may not have been released in the program. Example of code that generates the message:

    1 #include <malloc.h>
    2 void
    3 v(int i)
    4 {
    5 	char           *cp;
    6 	cp = (char *) malloc(sizeof(int) * i);
    7 	*cp = 3;
    8 	if (i > 1)
    9 		free(cp);
    10 }
    11 main(int argc, char *argv[])
    12 {
    13 	v(argc);
    14 }
    ============

Message ID: E_NEVER_DEALLOC_PSB

## use before set

A variable or memory is used before set. Example of code that generates the message:

    1 static int      i;
    2 void
    3 main(void)
    4 {
    5 	int             j;
    6 	j += i;
    7 }
    ============
    use before set
        j defined at f.c(5)

Message ID: E_USE_BEFORE_SET

## possible use before set

A variable may have been used before set. Example of code that generates the message:

    1 int
    2 main(int argc, char * argv[])
    3 {
    4 	int             i;
    5 	if (argc>2)
    6 		i = 99;
    7 	i++;
    8 	return i;
    9 }
    ============
    possible use before set
        i defined at f.c(4)

Message ID: E_USE_BEFORE_SET_PSB

## inconsistent use of a value type

A value of one type stored in a variable or memory is used as a value of another inconsistent type. Example of code that generates the message:

    1 main(void)
    2 {
    3 	int             i;
    4 	int            *ip = &i;
    5 	*((char *) ip) = '1';
    6 	return (*ip);
    7 }
    ============
    inconsistent use of a value type
        used as int 	:: i defined at f.c(3)	f.c(6) :: f.c(5) set as char

Message ID: E_VALUE_TYPE

## possible inconsistent use of a value type

A value of one type stored in a variable or memory is possibly used as a value of another inconsistent type. Example of code that generates the message:

    1 main(int argc, char * argv[])
    2 {
    3 	int             i;
    4 	int            *ip = &i;
    5 	*ip = 0;
    6 	if (argc > 2)
    7 		*((char *) ip) = '1';
    8 	return (*ip);
    9 }
    ============
    possible inconsistent use of a value type
        used as int 	:: i defined at f.c(3)	f.c(8) :: f.c(7) set as char

Message ID: E_VALUE_TYPE_PSB

## unreached function

Lint has determined that the program flow will never call the named function.

Message ID: E_FUNC_UNREACHED

## modification to deallocated memory

Modification to deallocated memory. Example of code that generates the message:

    1 #include <malloc.h>
    2 static int *ip;
    3 static void f(void)  { *ip=1;}
    4 static void g(int i) { ip = malloc(i);}
    5 static void h(void)  { free(ip);}
    6 void
    7 main(void)
    8 {
    9 	ip = malloc(10);
    10 	free(ip);
    11 	*ip = 1;
    12 	g(10);
    13 	h();
    14 	f();
    15 }
    ============
    modification to deallocated memory
        f.c(3)	:: f.c(5)
        f.c(11)	:: f.c(10)

Message ID: E_P_WRT_DEALLOC

## possible modification to deallocated memory

Possible modification to deallocated memory. Example of code that generates the message:

    1 #include <malloc.h>
    2 static int     *ip;
    3 int
    4 main(int argc, char *argv[])
    5 {
    6 	ip = malloc(8);
    7 	if (argc > 1)
    8 		free(ip);
    9 	*ip = argc;
    10 	return (*ip);
    11 }
    ============
    possible modification to deallocated memory
        f.c(9)	:: f.c(8)

Message ID: E_P_WRT_DEALLOC_PSBL

## modification to a variable that no longer exists

Modification to a variable that no longer exists. Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object is undefined after the end of the block. Example of code that generates the message:

    1 static int     *ip;
    2 static int      si;
    3 static int
    4 f(void)
    5 {
    6 	int             i;
    7 	ip = &i;
    8 	i = 0;
    9 	return (i);
    10 }
    11 main(void)
    12 {
    13 	int             j;
    14 	j = f();
    15 	*ip = 1;
    16 	j = j + f();
    17 	*ip = 1;
    18 	return (si + j);
    19 }
    ============
    modification to a variable that no longer exists
        i defined at f.c(6)	:: f.c(15)
        i defined at f.c(6)	:: f.c(17)

Message ID: E_P_WRT_VAR

## modification to a variable that may no longer exist

Since an object with automatic storage duration is no longer guaranteed to be reserved after the end of the block, the pointer to that object is undefined after the end of the block. Example of code that generates the message:

    1 static int     *ip;
    2 static int      si;
    3 static int
    4 f(void)
    5 {
    6 	int             i;
    7 	ip = &i;
    8 	i = 0;
    9 	if (si)
    10 		ip = &si;
    11 	return (i);
    12 }
    13 main(void)
    14 {
    15 	int             j;
    16 	j = f();
    17 	*ip = 1;
    18 	j = j + f();
    19 	*ip = 1;
    20 	return (si + j);
    21 }
    ============
    modification to a variable that may no longer exist
        i defined at f.c(6)	:: f.c(17)
        i defined at f.c(6)	:: f.c(19)

Message ID: E_P_WRT_VAR_PSBL

## modification using a NULL pointer

Modification using a `NULL` pointer. Example of code that generates the message:

    1 static int     *ip;
    2 static void
    3 v(void)
    4 {
    5 	*ip = 1;
    6 }
    7 void
    8 main(int argc, char *argv[])
    9 {
    10 	switch (argc) {
    11 	case 1:
    12 		ip = (int *) 0;
    13 		*ip = 1;
    14 		break;
    15 	case 2:
    16 		ip = (int *) 0;
    17 		v();
    18 		break;
    19 	default:
    20 		v();
    21 	}
    22 }
    ============
    modification using a NULL pointer
        ip defined at f.c(1)	:: f.c(5)
        ip defined at f.c(1)	:: f.c(5)
        ip defined at f.c(1)	:: f.c(13)

Message ID: E_P_WRT_NULL

## modification using a pointer that could be NULL

Modification using a pointer that could be `NULL`. Example of code that generates the message:

    1 #define VALUE	0
    2 static int     *ip;
    3 static int      si;
    4 int
    5 main(void)
    6 {
    7 	ip = (int *) VALUE;
    8 	if (si)
    9 		ip = &si;
    10 	*ip = VALUE + 1;
    11 	return (si);
    12 }
    ============
    modification using a pointer that could be NULL
        ip defined at f.c(2)	:: f.c(10)

Message ID: E_P_WRT_NULL_PSBL

## modification using a pointer that is an uninitialized value

A pointer is dereferenced prior to initializing it to point to an object. Example of code that generates the message:

    1 f() {
    2       int *p;
    3
    4       *p = 5;
    5 }
    ==========
    "t2.c", line 4: warning: modification using a pointer that is an uninitialized value
    	p defined at t2.c(2)	:: t2.c(4)

Message ID: E_P_WRT_UNINI

## modification using a pointer that could be an uninitialized value

Modification using a pointer that could be an uninitialized value. Example of code that generates the message:

    1 int
    2 main(int argc, char *argv[])
    3 {
    4 	int            *ip, i;
    5 	if (argc > 2)
    6 		ip = &i;
    7 	*ip = 1;
    8 	return i;
    9 }
    ============
    modification using a pointer that could be an uninitialized value
        ip defined at f.c(4)	:: f.c(7)

Message ID: E_P_WRT_UNINI_PSBL

## modification using a pointer produced in a questionable way

Modification using a pointer produced in a questionable way. Example of code that generates the message:

    1 static int     *ip;
    2 static void
    3 f(void)
    4 {
    5 	*ip = 1;
    6 }
    7 void
    8 main(void)
    9 {
    10 	ip = (int *) 4;
    11 	*ip = 1;
    12 	ip = (int *) 5;
    13 	f();
    14 	*ip = 1;
    15 }
    ============
    modification using a pointer produced in a questionable way
        f.c(5)
        f.c(11)
        f.c(14)

Message ID: E_P_WRT_SUSP

## modification using a pointer that could be produced in a questionable way

Modification using a pointer that could be produced in a questionable way. Example of code that generates the message:

    1 #define VALUE 4
    2 static int     *ip;
    3 static int      si;
    4 int
    5 main(void)
    6 {
    7 	ip = (int *) VALUE;
    8 	if (si)
    9 		ip = &si;
    10 	*ip = VALUE + 1;
    11 	return (si);
    12 }
    ============
    modification using a pointer that could be produced in a questionable way
        f.c(10)

Message ID: E_P_WRT_SUSP_PSBL

## content of variable or memory is not used

A variable is defined, but its value or occupied memory is not used in a program. Example of code that generates the message:

    1 int            *
    2 f(void)
    3 {
    4 	int             i;
    5 	return (&i + (sizeof(int)));
    6 }
    ============
    content of variable or memory is not used
        i defined at f.c(4)

Message ID: E_VRB_NEVER_USED

## label unused

A label is defined, but not used. Example of code that generates the message:

    1 f()
    2 {
    3	int k =7;
    4	switch(k) {
    5	case 1:
    6	    	break;
    7	defult:               /* syntax error undetected */
    8	    	return (10);
    9	}
    10 }
    ===============
    label unused
        (7) defult in f

Message ID: E_LABEL_NOT_USED

## empty loop body

Lint detected a loop containing no executable statements. Example of code that generates the message:

    1       int i;
    2       for (i = 0; i < 5; i++) ; /* empty for loop */
    3       while (i < 7) { }	  /* empty while loop */

Message ID: E_LOOP_EMPTY

## parameter is converted to type

An actual parameter is implicitly converted to the type of the matching parameter. Format: Simple Example of code that generates the message:

    1 static void f(int x1)
    2 {
    3	printf("%d\n", x1);
    4 }
    5 void main ()
    6 {
    7	float x;
    8	x = 4.5;
    9	f(x);
    10 }
    ============
    (9) warning: float is converted to int : arg #1 of function f

Message ID: E_ARGUMENT_CONVERT

## bad file number

The compiler or lint detects invalid file number (greater than free slot in file list). This is an internal error.

Message ID: E_BAD_FILE_NUMBER

## source line is not accessible

`lint` is not able to print the source line corresponding to the message because the source file is unaccessible, for example, the source file may have been renamed, deleted, or moved. Format: Simple Example of code that generates the message:

      |
      |******* source line is not accessible ...
      |              !  line 677, file.c
    warning: assigned value never used: ReturnVal

Message ID: E_SRC_LINE_UNACCESSIBLE

## can not find source line because the file contains #line directives

Certain `#line` directives prevent `lint` from printing the source line corresponding to the message. Format: Simple Example of code that generates the message:

    file f.c:
    1 #line 20 "nofile.c"
    2 int             i;
    3 void
    4 main(void)
    5 {
    6 	return 99;
    7 }
    ============
          |
          |******* can not find source line because the file contains #line directives
          |!  line 24, nofile.c
          |
    error: void function cannot return value

Message ID: E_SRC_LINE_UNACCESSIBLE2

## argument is incompatible with prototype

You called a function with an argument whose type cannot be converted to the type in the function prototype declaration for the function Example of code that generates the message:

    struct s {int x; } q;
    int g(int, int);
    f() {
    	g(3, q);
    }

Message ID: E_ARG_INCOMPATIBLE_WITH_ARG_L

## expression, or sub-expression, has null effect

This code contains an expression or sub-expression that has no effect. Example of code that generates the message:

    int g() {
            1;
            return 0;
    }

Message ID: E_EXPR_NULL_EFFECT

## return type is converted to function return-type

You have return from this function a type that is different from its declared return type, and the compiler converts it to the function return type Example of code that generates the message:

    1 char f() {
    2        return 0xffffffffL;
    3 }

Message ID: E_IMPL_CONV_RETURN

## cast to pointer from n-bit integer

An explicit cast of an object of integral type that is smaller than the size of a pointer is being cast to a pointer type. For example, a 32-bit integer being cast to a 64-bit pointer. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4	int             i;
    5	char           *ip;
    6	ip = (char *) i;
    7 }
    ============
    "t.c", line 6: warning: cast to pointer from 32-bit integer

Message ID: E_CAST_TO_PTR_FROM_INT

## cast from n-bit integer to m-bit integer

An explicit cast of an object of an integral type to another integral type that is smaller. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4	int             i;
    5	long            l;
    6	i = (int) l;
    7 }
    ============
    "t.c", line 6: warning: cast from 64-bit integer to 32-bit integer

Message ID: E_CAST_INT_TO_SMALL_INT

## cast from n-bit integer constant expression to m-bit integer

An explicit cast of an integer constant expression to integral type that is smaller than the type of the integer constant expression. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4	char            c;
    5	c = (char) 1024;
    6 }
    ============
    "t.c", line 5: warning: cast from 32-bit integer constant expression to 8-bit integer

Message ID: E_CAST_INT_CONST_TO_SMALL_INT

## assignment of n-bit integer to m-bit integer

An object of an integral type is assigned to an object of another (smaller) integral type. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4	int             i;
    5	long            l;
    6	i = l;
    7 }
    ============
    "t.c", line 6: warning: assignment of 64-bit integer to 32-bit integer

Message ID: E_ASSIGN_INT_TO_SMALL_INT

## n-bit constant truncated to m-bit by assignment

An integral constant expression is assigned or returned to an object of an integral type that cannot hold the value without truncation. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4	char            c;
    5	c = 1024;
    6 }
    ============
    "t.c", line 5: warning: 32-bit constant truncated to 8 bits by assignment

Message ID: E_ASSIGN_INT_FROM_BIG_CONST

## passing n-bit integer, expecting m-bit integer

A function call contains an argument of an integral type which is larger than the type of the formal parameter in the function definition. This error message is issued with the -errchk=longptr64 option. Example of code that generates the message:

     1 void
     2 print_int(int i)
     3 {
     4	printf("int %d\n", i);
     5 }
     6
     7 void
     8 v(void)
     9 {
    10	long l = 5;
    11	print_int(l);
    12 }
    ============
    "t.c", line 11: warning: passing 64-bit integer arg, expecting 32-bit integer: print_int(arg 1)

Message ID: E_PASS_INT_TO_SMALL_INT

## passing n-bit integer constant, expecting m-bit integer

A function call contains an argument which is an integral constant expression. The type of the integral constant expression is larger than the type of the formal parameter in the function definition. This error message is issued with the -errchk=longptr64 option. Example of code that generates the message:

     1 void
     2 print_int(int i)
     3 {
     4	printf("int %d\n", i);
     5 }
     6
     7 void
     8 v(void)
     9 {
    10	print_int(11111111024L);
    11 }
    ============
    "t.c", line 10: warning: passing 64-bit integer constant arg, expecting 32-bit integer: printi(arg 1)

Message ID: E_PASS_INT_FROM_BIG_CONST

## ?: operator being used to choose the lock parameter

When the operator ?: is used in a mutex_lock function call lock_lint cannot determine which lock was used. Lock_lint will assume the indicated lock was used in the function call. Example of the code that generates this message:

    int waitWriter;
    f() {
      mutex_t mutex1, mutex2;

      mutex_lock((waitWriter == 0) ? &mutex1 : &mutex2);
    }

Message ID: E_CONDITIONAL_OP_LOCKCHOICE

## unexpected unary operation

An unexpected unary operation has been detected in a #`if` or #`elif` directive. Example of code that generates the message:

    main()
    {
    #define x 0
    #define y 1

    #if x ! y == 0
            printf("Hello\n");
    #endif
    }

Message ID: E_UNEXPECTED_UNARY

## A pointer to any object or function cannot compare equal to a null pointer

This warning is displayed with the `-p` option. A compiler may optimize a pointer to any object or function to always evaluating as true. Example of code that generates the message:

    extern int foo;
    #pragma weak foo
    int main()
    {
            if (&foo)
                    return foo;
    }

Message ID: E_POINTER_TO_OBJECT

## an address is not allowed in a constant initializer for an integral type whose size is smaller than the size of a pointer

An address in a constant initializer must be an arithmetic constant expression. As an extension, an address is allowed in a constant initializer for an integral type whose size is greater than or equal to the size of a pointer. An address in a constant initializer for an integral type whose size is smaller than the size of a pointer is not allowed. Example of code that generates the message:

    int x;
    char c = &x;

Message ID: E_ADDRESS_IN_CONST_INITIALIZER

## comparing n-bit integer with m-bit integer

An object of an integral type is compared with an object of another (larger) integral type. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4	int             i;
    5	long            l;
    6	i = i > l;
    7 }
    ============
    "t.c", line 6: warning: comparing 32-bit integer with 64-bit integer

Message ID: E_COMP_INT_WITH_LARGE_INT

## assignment of n-bit unsigned integer to n-bit signed integer

An object of an unsigned integral type is assigned to an object of signed integral type with equal size. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4	int             i;
    5	unsigned int   ui;
    6	i = ui;
    7 }
    ============
    "t.c", line 6: warning: assignment of 32-bit unsigned integer to 32-bit signed integer

Message ID: E_ASSIGN_UINT_TO_SIGNED_INT

## passing n-bit unsigned integer, expecting n-bit signed integer

A function call contains an argument of an unsigned integral type whereas the type of the formal parameter in the function definition is signed integral type with equal size. This error message is issued with the -errchk=longptr64 or -errchk=sizematch option. Example of code that generates the message:

     1 void
     2 print_int(int i)
     3 {
     4	printf("int %d\n", i);
     5 }
     6
     7 void
     8 v(void)
     9 {
    10	unsigned int   ui = 5;
    11	print_int(ui);
    12 }
    ============
    "t.c", line 11: warning: passing 32-bit unsigned integer arg, expecting 32-bit signed integer: print_int(arg 1)

Message ID: E_PASS_UINT_TO_SIGNED_INT

## cast from n-bit unsigned integer to n-bit signed integer

An explicit cast of an object of an unsigned integral type to signed integral type with same size. Example of code that generates the message:

    1 void
    2 v(void)
    3 {
    4	int             i;
    5	unsigned int   ui;
    6	i = (int) ui;
    7 }
    ============
    "t.c", line 6: warning: cast from 32-bit unsigned integer to 32-bit signed integer

Message ID: E_CAST_UINT_TO_SIGNED_INT

## ignoring malformed #pragma error_messages

Incorrect syntax used for a `#pragma error_messages`. The `error_messages` pragma must be specified as:

      #pragma error_messages ({on|off|default}, errtag1 [,errtag2, ... ,errtag-n])

Example of code that generates this message:

    #pragma error_messages {off: E_BAD_PTR_INT_COMBINATION, }

Message ID: E_IGNORE_MALFORMED_PRAGMA_EMSG

## symbol1 and symbol2 cannot be the same in #pragma weak symbol1 = symbol2

`#pragma weak symbol1 = symbol2` defines `symbol1` to be a weak symbol, which is an alias for the symbol `symbol2`. These symbols cannot be the same. Example of code that generates the message:

         1	#pragma weak function_name = function_name
         2
         3	int
         4	_function_name(void) {
         5	       return 1;
         6	}
    ============
    "test.c", line 1: symbol1 and symbol2 cannot be the same in #pragma weak symbol1 = symbol2: function_name
    cc: acomp failed for test.c

Message ID: E_SYMBOL_IN_PRAGMA_WEAK

## non-constant initializer involving a cast

The initializer for an `extern, static`, or `array` object must be a compile-time constant. The initializers for an automatic structure or union object, if enclosed in `{}`, must also be compile-time constants. Cast operators in an integral constant expression must only convert arithmetic types to integral types. For example, a cast of a pointer type to an arithmetic type is not a constant expression. And when the type of the variable to be initialized is smaller than a pointer the compiler issues this error message. Example of code that generates the message:

    extern  int     myf();
    int (*  fptr)() = (int (*)())((int)myf + 1);

Message ID: E_NON_CONST_INIT_SCONV

## undefining __STDC_VERSION__

ISO C prohibits undefining the predefined symbol `__STDC_VERSION__`. You may want to use this feature to test C code that you have written to work in both an ISO C and non-ISO C environment. For example, suppose you have C code that checks `__STDC_VERSION__`, declaring function prototype declarations if it is defined, and old-style function declarations or definitions if not. Because the C compiler predefines `__STDC_VERSION__`, you would ordinarily be unable to check the old-style code, and you would have to run the code through another (non-ISO C) compiler. By undefining `__STDC_VERSION__`, usually on the command-line, you can use the C compiler to do the checking. This diagnostic tells you that you are violating ISO C constraints. Example of code that generates the message:

    #undef __STDC_VERSION__	/* usually -U__STDC_VERSION_ */
                                            /* _on cc line */

    #ifdef __STDC_VERSION__
    int
    myfunc(const char *arg1, int arg2)
    #else	/* non-ISO C case */
    int
    myfunc(arg1,arg2)
    char *arg1,	/* oops */
    int arg2;
    #endif
    {
    }

Message ID: E_UNDEFINING__STDC_VERSION__

## a function in a `#pragma ?` has not been declared

The compiler has encountered a function name that must be prototyped prior to its use in the indicated pragma. Example of code that generates the message:

    /* abc function is not defined or declared anywhere */
    #pragma inline (abc)

============ The function abc should be prototyped prior to the pragma:

    int abc();
    #pragma inline (abc)

Message ID: E_PRAGMA_FUNC_UNDECLARED

## identifier must specify a function for the `#pragma ?`

The compiler has encountered a identifer that is not a function name where a function name is required for the indicated pragma. Example of code that generates the message:

    int abc;
    #pragma inline (abc)

Message ID: E_PRAGMA_FUNC_REQUIRED

## ignoring malformed #pragma ?

The indicated `#pragma` has been specified with incorrect syntax. The correct syntax for the pragma is:

    #pragma  (funcname [, funcname ...])

Example of code that generates the message:

    #pragma no_side_effect {a b}

Message ID: E_MALFORMED_PRAGMA_W_FUNC

## promotion of an unsigned integer type to a larger integer type or to the size of a pointer

To calculate the expression with different type operands the compiler promotes the operand of unsigned integer type to a larger integer type or to the size of a pointer. Example of code that generates the message:

         1	main()
         2	{
         3		unsigned int i = 1;
         4		unsigned long long ll = 1;
         5		char *p = "hello";
         6		char c;
         7
         8		c = *(p + (-i));
         9		return (ll + (-i));
        10	}
    ============
    (8) warning: promotion of an unsigned integer type to a larger integer type or to the size of a pointer may have unexpected results, there is no sign extension.
    (9) warning: promotion of an unsigned integer type to a larger integer type or to the size of a pointer may have unexpected results, there is no sign extension.

Message ID: E_UNEXPECTED_UINT_PROMOTION

## promotion of an unsigned integer to the size of a pointer during subscript evaluation

During subscript evaluation the compiler promotes an unsigned integer to the size of a pointer. Example of code that generates the message:

         1	void main()
         2	{
         3		unsigned int i = 1;
         4		char *p = "hello";
         5		char c;
         6
         7		c = p[-i];
         8	}
    ============
    (7) warning: promotion of an unsigned integer to the size of a pointer during subscript evaluation may have unexpected results, there is no sign extension.

Message ID: E_UNEXPECTED_UINT_PROMOTION_SUB

## sign extension from n-bit to m-bit integer

A sign extension occured when the compiler promoted an operand of signed integer type to a larger unsigned integer type. Example of code that generates the message:

         1	void main()
         2	{
         3		int i = -1;
         4		unsigned long ul;
         5
         6		ul = (unsigned long)i;
         7	}
    ============
    (6) warning: sign extension from 32-bit to 64-bit integer

Message ID: E_SIGN_EXTENSION_PSBL

## `#pragma opt` level reduced to value of -xmaxopt

The compiler has encountered a `#pragma opt` with a level that exceeds the value of the command line -xmaxopt value. The optimization level of the functions encountered with this `#pragma opt` are lowered to the value specified by the -xmaxopt option to the compiler. Example of code that generates the message:

    int abc(); /* compiler invoked with -xO5 -xmaxopt=2 */
    #pragma opt 4 (abc)

Message ID: E_PRAGMA_OPT_REDUCED

## ignoring malformed `#pragma opt`

A `#pragma opt` has been specified with incorrect syntax. The correct syntax for the pragma is:

    #pragma opt level (funcname [, funcname ...])

Example of code that generates the message:

    #pragma opt 3 {a b}

Message ID: E_IGNORE_MALFORMED_PRAGMA_OPT

## identifier with dubious declaration redeclared

This message will be printed if you redeclare an identifier with a dubious declaration or definition. In this case the type of identifier can not be printed. Example of code that generates the message:

         1	#include <stdio.h>
         2	void Function( struct IamNotDefined  *b);
         3	int     counter = 0;
         4	main()
         5	{
         6	}
         7
         8	void Function( struct IamNotDefined *b) ;

Message ID: E_DUBIOUS_ID_REDECLARED

## identifier with dubious declaration redefined

This message will be printed if you redefine an identifier with a dubious definition. In this case the type of identifier can not be printed. Example of code that generates the message:

         1	#include <stdio.h>
         2	void Function( struct IamNotDefined  *b) { }
         3
         4  int     counter = 0;
         5	main()
         6	{
         7	}
         8
         9	void Function( )
        10	{
        11	}

Message ID: E_DUBIOUS_ID_REDEFINED

## identifier redefined by use in pragma redefine_extname

The compiler has encountered a redefinition of an externally defined object or function. The original external name has been changed through use of `#pragma redefine_extname`, and the compiler has detected a redefinition of the new external name. Example of code that generates the message:

         1  #pragma redefine_extname fold fnew
         2
         3  fold ()
         4  {
         5  }
         6
         7  fnew ()
         8  {
         9  }
        10
        11  main ()
        12  {
        13  }

-#

Message ID: E_FUNC_REDEFINED_THROUGH_PRAGMA

## struct is too big

Structure declaration has been constructed such that the declared object is too big for the target machine. Example of code that generates the message:

    typedef int Not_that_big_array[0x10000000];
    struct {
      Not_that_big_array m1,m2,m3,m4,m5,m6,m7,m8;
    }

Message ID: E_STRUCT_SIZE_TOO_BIG

## struct/union missing tag in #pragma

Either the tag following a struct or union keyword is missing or the tag following a struct or union keyword does not appear to be referencing a struct or union properly declared prior to to this #pragma Example of code that generates the message:

    /* struct bar is not defined  yet */
    void foo() {
    #pragma alias_level strict (struct bar)
        return;
    }

Message ID: E_ALIAS_NO_TAG

## struct `<name>` must be defined prior to use in #pragma

The indicate identifier must be defined as a struct prior to this pragma. Example of code that generates the message:

    union bar { int field; };
    void foo() {
    #pragma alias_level strict (struct bar)
        return;

}

Message ID: E_ALIAS_NOT_A_STRUCT

## union `<name>` must be defined prior to use in #pragma

The indicate identifier must be defined as a union prior to this pragma. Example of code that generates the message:

    struct bar { int field; };
    void foo() {
    #pragma alias_level strict (union bar)
        return;
    }

Message ID: E_ALIAS_NOT_A_UNION

## enum `<name>` must be defined prior to use in #pragma

The indicated identifier must be declared as an enum prior to referencing in this pragma. Example of code that generates the message:

    /* enum bar is not defined  yet */
    void foo() {
    #pragma alias_level strict (enum bar)
        return;
    }

Message ID: E_ALIAS_NOT_AN_ENUM

## `<name>` must be defined as a pointer prior to use in #pragma

The indicated identifier must be declared as a pointer prior to referencing in this pragma. Example of code that generates the message:

    int bar;
    void foo() {
    #pragma alias_level strict (bar)
        return;
    }

Message ID: E_ALIAS_EXPECTING_POINTER

## `<type>` is not a struct

The identifier noted in this message is not declared as a struct prior to its usage as a struct in this pragma. Example of code that generates the message:

    enum abc {one, two};
    #pragma alias_level strict (struct abc)

Message ID: E_ALIAS_STRUCT_LIE

## `<type>` is not a union

The identifier noted in this message is not declared as a union prior to its usage as a union in this pragma Example of code that generates the message:

    enum abc {one, two};
    #pragma alias_level strict (union abc)

Message ID: E_ALIAS_UNION_LIE

## `<type>` is not an enum

The identifier noted in this message is not declared as an enum prior to its usage as an enum in this pragma Example of code that generates the message:

    struct abc {int field;};
    #pragma alias_level strict (enum abc)

Message ID: E_ALIAS_ENUM_LIE

## expecting type in #pragma

Something other than a type was given in the indicated pragma. `#pragma alias` and `alias_level` expect a list of types. Example of code that generates the message:

    int i;
    #pragma alias_level strict (i)

Message ID: E_ALIAS_EXPECTING_TYPE

## `<identifier>` must be declared as a variable prior to use in #pragma

The indicated identifier must be declared as a variable prior to referencing in this pragma. Example of code that generates the message:

    int myfunc();
    #pragma alias (myfunc)

Message ID: E_ALIAS_EXPECTING_VARIABLE

## ignoring malformed #pragma alias_level

The alias_level pragma has the forms:

    #pragma alias_level  (  [, ]... )
    #pragma alias_level  (  [, ]... )

Example of code that generates the message:

    #pragma alias_level std (

Message ID: E_IGNORE_BAD_ALIAS_LEVEL_PRAGMA

## ignoring malformed #pragma alias

The alias pragma has the forms:

    #pragma alias (  [, ]... )
    #pragma alias ( ,  [, ]... )

Example of code that generates the message:

    #pragma alias (

Message ID: E_IGNORE_BAD_ALIAS_PRAGMA

## ignoring malformed #pragma noalias

The alias pragma has the forms:

    #pragma noalias (  [, ]... )
    #pragma noalias ( ,  [, ]... )

Example of code that generates the message:

    #pragma alias (

Message ID: E_IGNORE_BAD_NOALIAS_PRAGMA

## ignoring malformed #pragma may_point_to

The may_point_to pragma has the form:

    pragma may_point_to ( ,  [, ]... )

Example of code that generates the message:

    #pragma may_point_to (

Message ID: E_IGNORE_BAD_MAYPTTO_PRAGMA

## ignoring malformed #pragma may_not_point_to

The may_not_point_to pragma has the form:

    pragma may_not_point_to ( ,  [, ]... )

Example of code that generates the message:

    #pragma may_not_point_to (

Message ID: E_IGNORE_BAD_MAYNOTPTTO_PRAGMA

## %s in #pragma %s must be a pointer

The may_not_point_to and may_point_to pragmas have the form:

    pragma may_not_point_to ( ,  [, ]... )
    pragma may_point_to ( ,  [, ]... )

Example of code that generates the message:

    int i, j;
    #pragma may_point_to ( i, j);

Message ID: E_POINTTO_NOT_A_POINTER

## dubious escape: \c

Only certain characters can follow \ in string literals and character constants: `\' \" \? \\ \a \b \f \n \r \t \v \<octal-digit> \x<hexadecimal-digit>`. ANSI C ignores the \. Example of code that generates the message:

    int i = '\c';

Message ID: E_DUBIOUS_ESCAPE_MBCHAR

## #pragma %s must be at file or function scope

Aliasing pragmas may only be used at file or function scope. Example of code that generates the message:

    struct s1 {...};
    struct s2 {...};
    main()
    {
      {
    #pragma alias (struct s1, struct s1)
      }
    }

Message ID: E_IGNORE_BAD_SCOPE_FOR_PRAGMA

## parameter has incomplete type: %s

Use a pointer instead of an incomplete array type as the parameter in a function prototype. Example of code that generates the message:

    main()
    {
        extern somefunc(void array[]);
    }

Message ID: E_ARRAY_OF_INCOMPLETE

## parameter has incomplete type

Use a pointer instead of an incomplete type as the parameter in a function prototype. Example of code that generates the message:

    struct xxx;
    extern lastfunc(struct xxx xs[]);

Message ID: E_ARRAY_OF_INCOMPLETE_NONAME

## automatic variable is too big

Automatic variable declaration has been constructed such that the declared object doesnt fit the stack of target machine. Example of code that generates the message:

    void foo(void) {
    	int big_array[0x100000000LL];
    }

Message ID: E_AUTO_VARIABLE_TOO_BIG

## cast of scalar pointer to struct pointer

During alias analysis for optimizations allowed under -xalias_level a cast of scalar pointer to struct pointer may result in undefined behavior. Example of code that generates the message:

    struct foo {
      int a;
    };

    struct foo *foop;
    int *p;

    void
    main()
    {
      foop = (struct foo *)p;
    }

Message ID: E_CAST_SCALAR_TO_STRUCT

## cast of void pointer to struct pointer

During alias analysis for optimizations allowed under -xalias_level a cast of void pointer to struct pointer may result in undefined behavior. Example of code that generates the message:

    struct foo {
      int a;
    };

    struct foo *foop;
    void *p;

    void
    main()
    {
      foop = (struct foo *)p;
    }

Message ID: E_CAST_VOID_PTR_TO_STRUCT

## cast of struct field to scalar pointer

During alias analysis for optimizations allowed under -xalias_level a cast of struct field to struct pointer may result in undefined behavior. Example of code that generates the message:

    struct foo {
      int a;
    };

    struct foo *foop;
    int *p;

    void
    main()
    {
      p = (int *)&foop.a
    }

Message ID: E_CAST_SCALAR_STRUCT_TO_SCALAR

## cast of struct pointer to struct pointer requires explicit aliasing under alias_level=strict

During alias analysis for optimizations allowed under -xalias_level=strict, a cast of pointers to two unaliased structures may result in undefined behavior. Example of code that generates the message:

    struct fooa {
      int a;
    };

    struct foob {
      int b;
    };

    struct fooa *fooaa;
    struct foob *foobb;

    void
    main()
    {
      fooaa = (struct fooa *)foobb;
    }

Message ID: E_CAST_STRUCT_TO_STRUCT

## cant redeclare variable from extern to static in -xcrossfile mode

This warning is displayed when compiler is invoked with option -xcrossfile. Variable declared previously as `extern` variable cannot be redeclared as static. Example of code that generates the message :

    extern int local_i;
    void main(int argc, char *argv[])
    {
    	return local_i;
    }
    static int local_i=10;

Message ID: E_CANT_XCROSSFILE_GLOBSTATIC

## cast of scalar pointer to scalar pointer requires explicit aliasing at all -xalias_level(s) except any

During alias analysis for optimizations allowed under -xalias_level=weak and higher, a cast of a scalar pointer to a scalar may result in undefined behavior. Example of code that generates the message:

    int *ip;
    long *lp;

    void
    main()
    {
      ip = (int *)lp;
    }

Message ID: E_CAST_SCALAR_TO_SCALAR

## cast of non-scalar pointer to scalar pointer is valid only at -xalias_level=any

During alias analysis for optimizations allowed under -xalias_level=weak and higher, a cast of a non-scalar pointer to a scalar pointer may result in undefined behavior. Example of code that generates the message:

    int *ip;
    long a[10];

    void
    main()
    {
      ip = (int *)a[3];
    }

Message ID: E_CAST_NONSCALAR_TO_SCALAR

## threadprivate directive must appear at file scope

A threadprivate directive must appear at file scope, outside of any definition or declaration. Example of code that generates the message:

    int i;

    void
    main()
    {
      #pragma omp threadprivate(i)
    }

Message ID: E_OMP_NONFILE_THREADPRIV

## variable specified in threadprivate pragma must be either extern or static

Each variable in the list of a threadprivate directive must have a file-scope declaration. Example of code that generates the message:

    void
    main()
    {
      int i;
      #pragma omp threadprivate(i)
    }

Message ID: E_OMP_AUTO_THREADPRIV

## threadprivate directive must precede all references to variable

Threadprivate directive must lexically precede all references to any of the variables in its list. Example of code that generates the message:

    int i;

    void foo() {
      i = 10;
    }

    #pragma omp threadprivate(i)

Message ID: E_OMP_THREADPRIV_REF

## threadprivate, firstprivate, lastprivate and private variable must not have an incomplete type

Threadprivate, firstprivate, lastprivate and private variable must not have an incomplete type. Example of code that generates the message:

    struct S s;

    #pragma omp threadprivate(s)

    struct S {
      int i;
    }
    void foo() {
      #pragma omp parallel private(s)
      {
      }
    }

Message ID: E_OMP_VAR_INCOMPLETE

## a threadprivate variable is not permitted in this clause

Threadprivate variables are not permitted in private, firstprivate, lastprivate, shared or reduction clauses. They are not affected by default clause though. Example of code that generates the message:

    int i;
    #pragma omp threadprivate(i)

    void
    main()
    {
      #pragma omp parallel private(i)
          i++;
    }

Message ID: E_OMP_THREADPRIV_WRONG_CLAUSE

## variable must not be specified in more than one clause

No variable may be specified in more than one clause, except that a variable can be specified in both a firstprivate and a lastprivate clause. Example of code that generates the message:

    void
    main()
    {
      int i;
      #pragma omp parallel private(i) copyin(i)
          i++;
    }

Message ID: E_OMP_DUP_CLAUSE

## private variable must not have a const-qualified type

Variable specified in private (or lastprivate) clause must not have a const-qualified type. Example of code that generates the message:

    void
    main()
    {
      const int ci;
      #pragma omp parallel private(ci)
          ;
    }

Message ID: E_OMP_CONST_PRIVATE

## variable is already specified as private in enclosing openmp pragma

Variables that are private (firstprivate/lastprivate) within a parallel region cannot be specified in a private (firstprivate/lastprivate) clause on an enclosed work-sharing or parallel directive. As a result, variables that are specified private on a work-sharing or parallel directive must be shared in the enclosing parallel region. Example of code that generates the message:

    void
    main()
    {
      int i,j;
      #pragma omp parallel private(j)
      {
        #pragma omp for lastprivate(j)
        for (i=0; i<10; i++)
          j++;
      }
    }

=======

Message ID: E_OMP_PRIVATE_PRIVATE

## syntax error: empty initializer

The initializer contains nothing between the braces. Example of code that generates the message:

    struct {int i;} = {};

Message ID: E_EMPTY_INITIALIZER

## possible ptrdiff_t overflow

This message is being displayed when difference of two pointers might overflow through ptrdiff_t. In the following example the message will be generated for char pointers difference. Note that it will not be generated for int pointers difference.

    #include
    void foo(void){
        char *pc1, *pc2;
        int * pi1, *pi2;
        ptrdiff_t ptrdiff;
        ptrdiff = pc1 - pc2;
        ptrdiff += pi1 - pi2;
    }

Message ID: E_PTRDIFF_OVERFLOW

## badly formed OpenMP pragma

This message is displayed when general syntax error is discovered in OpenMP pragma. Example of code that generates the message:

    void main() {

      #pragma omp parallel private
      {
      }
    }

Message ID: E_OMP_SYNTAX_ERROR

## inline keyword cannot be applied to function \"main\"

Example of code that generates the message:

    void
    inline main()
    {
      int i;

      i = 1;
    }

Message ID: E_INLINE_MAIN

## extern inline function \"%s\" not defined in translation unit

Example of code that generates the message:

    inline void foo();
    extern foo();

    void
    main()
    {
        foo();
    }
    =======

Message ID: E_EXTERN_INLINE_UNDEFINED

## syntax error: empty member declaration

The code contains a null struct member declaration. Example of code that generates the message:

    struct {
      int i;;
    } s;

Message ID: E_EMPTY_MBR_DECLARATION

## bad chunksize expression in schedule clause

This message is displayed when chunksize expression specified in schedule clause of OpenMP for pragma is badly formed. Example of code that generates the message:

    void main() {
      int i;
      #pragma omp parallel for schedule(static,1.0)
      for (i=0;i<10;i++) {
      }
    }

Message ID: E_OMP_BAD_CHUNKSIZE

## chunksize is not allowed in runtime schedule

Chunksize value has no meaning and is not allowed in runtime schedule of OpenMP for pragma. Example of code that generates the message:

    void main() {
      int i;
    #pragma omp parallel for schedule(runtime,1)
      for (i=0;i<10;i++) {
      }
    }

Message ID: E_OMP_RUNTIME_CHUNKSIZE

## invalid kind for schedule clause

The schedule clause kind must be one of - static, dynamic, guided, runtime. Example of code that generates the message:

    void main() {
      int i;
    #pragma omp parallel for schedule(normal,1)
      for (i=0;i<10;i++) {
      }
    }

Message ID: E_OMP_BAD_SCHEDULE_KIND

## definition of non-constant static variable in inline extern function

Example of code that generates the message:

    void foo() {
        static int j = 1;

        i += j;
    }

Message ID: E_DEF_STATIC_INLINE_EXTERN

## label should be followed by a (possibly empty) statement

ANSI C standard requires labels to be followed by a statement. GNU C extensions allow such constructs yet this warning is being displayed, and it becomes an error when using the `-Xs` option. Example of code that generates the message:

    void
    main()
    {
    some_label:
    }

Message ID: E_LABEL_NO_STMT

## white-space is required between the identifier and replacement list of an object-like macro

There shall be white-space between the identifier and the replacement list in the definition of an object-like macro Example of code that generates the message:

    #define THIS$AND$THAT(a, b)  ((a) + (b))
    int c = THIS$AND$THAT(1, 7);

Message ID: E_NO_WHITE_SPACE

## if clause expression does not have scalar type

Expression specified in if clause of OpenMP parallel must have scalar type. Example of code that generates the message:

    void main() {
      struct { int val; } true = {1};

      #pragma omp parallel if(true)
    	printf("Hello,worlds!\n");
    }

Message ID: E_OMP_BAD_IF_TYPE

## init expression of omp for loop does not have a canonical shape

Init expression of OpenMP for must have canonical shape of the following form: = or = Example of code that generates the message:

    void main() {
      int i=0;
      #pragma omp parallel for
      for (; i<10; i++) {
      }
    }

Message ID: E_OMP_FOR_BAD_INIT

## index variable of omp for loop must be a signed integer

Index variable of OpenMP for must have a signed integer type Example of code that generates the message:

    void main() {
      unsigned char c;
      #pragma omp parallel for
      for (c=0; c<10; c++) {
      }
    }

Message ID: E_OMP_FOR_BAD_INDEX_TYPE

## control expression of omp for loop does not have a canonical shape

Control expression of OpenMP for must have canonical shape of the following form: Example of code that generates the message:

    void main() {
      int i,j=0;
      #pragma omp parallel for
      for (i=0; j<10; i++) {
      }
    }

Message ID: E_OMP_FOR_BAD_CONTROL

## iteration expression of omp for loop does not have a canonical shape

Iteration expression of OpenMP for must have a canonical shape. Example of code that generates the message:

    void main() {
      int i;
      #pragma omp parallel for
      for (i=0; i<10; foo(&i)) {
      }
    }

Message ID: E_OMP_FOR_BAD_ITER

## copyin variable is not threadprivate

A variable that is specified in copyin clause must be a threadprivate variable. Example of code that generates the message:

    void main() {
      int i;
      #pragma omp parallel copyin(i)
    	i++;
    }

Message ID: E_OMP_COPYIN_NOT_THREADPRIVATE

## inline, restrict, _Bool, _Complex and _Imaginary are a keywords in ISO C99

C99 introduces the following new keywords: inline restrict _Bool _Complex _Imaginary Example of code that generates the message:

    int _Bool;

Message ID: E_KEYWORD_IN_C99

## variable length array with unspecified size is valid only as prototype parameter

Variable length array can be declared with unspecified size (via[*]). Such a declaration can only be used in declarations with function prototype scope. Example of code that generates the message:

    int foo (int a[*]) {
       typedef int A[*];
    }

Message ID: E_UNSPEC_VLA_SIZE

## can not declare variably modified type at file scope

Variably modified type can not be declared at file scope. Example of code that generates the message:

    int n;
    typedef int A[n];
    int a[n];

Message ID: E_CANT_DECL_FILESCOPE_VM

## variable length array can not be declared with a static storage class

If an identifier is declared to be an object with static storage duration it shall not have a variable length array type. Example of code that generates the message:

    int foo(int n) {
       static int a[n];
    }

Message ID: E_STATIC_VLA

## member cannot have variably modified type

Only an ordinary identifier shall have a variably modified type. Thus structure/union members are not allowed to have such a type. Example of code that generates the message:

    void foo() {
        int n;
        struct s { int a[n]; };
    }

Message ID: E_MEMBER_CANT_BE_VM

## variable length array may not be initialized

Variable lengths arrays are not allowed to be initialized. Example of code that generates the message:

    void foo() {
        int n;
        int x[n] = { 1 };
    }

Message ID: E_CANT_INIT_VLA

## array size expression is not of integer type

Expression which specifies the size of an array shall have an integer type. Example of code that generates the message:

    void foo() {
       int a[1.1];
       float f;
       int b[f];
    }

Message ID: E_ARRAY_SIZE_NONINTEGER

## wrong storage class keyword in array size expression

Only static keyword allowed to be specified in array size expression. Example of code that generates the message:

    int a[extern 3];

Message ID: E_BAD_ARRSIZE_STORAGE_CLASS

## type specifier can not be used as array size expression qualifier

Only keyword static and type qualifiers (const, restrict, volatile) are allowed to be specified in array size expression. Example of code that generates the message:

    int a[int 3];

Message ID: E_ARRSIZE_TYPE_SPECIFIER

## only outermost array type derivation of a function parameter can be qualified

The optional type qualifiers and the keyword static shall appear only in a declaration of a function parameter with an array type, and the only in the outermost array type derivation. Example of code that generates the message:

    int a[static 3];
    int bar(int[*][restrict]);

Message ID: E_CANT_QUAL_NONPARAM_ARY

## variable length array with unspecified size is valid only as prototype parameter

Variable length array can be declared with unspecified size (via[*]). Such a declaration can only be used in declarations with function prototype scope. Example of code that generates the message:

    int foo () {
       int i = sizeof(int[*]);
    }

Message ID: E_UNSPEC_VLA_SIZE_NONAME

## no for loop after openmp for pragma

OpenMP for and parallel for constructs are require to be followed by a for loop statement. Example of code that generates the message:

    int foo() {
      #pragma omp parallel for
      while(1) {
      }
    }

Message ID: E_OMP_FOR_WITHOUT_FOR

## pointer to void or function used in arithmetic

There is an argument of type pointer to void or pointer to function used in expression. Size of void or function assumed to be 1. Example of code that generates the message:

    void *mem = (void*)7, *retval;
    int sz = 4;
    retval = mem + sz;

Message ID: E_PTR_TO_VOID_IN_ARITHMETIC

## bad token in #warning directive

The tokens in a `#warning` directive must be valid C tokens. The source program contains an invalid token. Example of code that generates the message:

    #warning 038 - this is an invalid token

Message ID: E_BAD_TOKEN_IN_WARN_DIRECTIVE

## #warning

A `#warning` directive is encountered in the source file. The other tokens in the directive are printed as part of the message. Example of code that generates the message:

    #define ONE 2
    #if ONE != 1
    #warning ONE != 1
    #endif

Message ID: E_WARNING_PRAGMA

## goto into the scope of identifier with variably modified type is not allowed

A goto statement shall not jump from outside the scope of an identifier having a variably modified type to inside the scope of that identifier. Example of code that generates the message:

    void foo() {
       int n = 10;
       {
    	int a[n];
    	vla_scope:
    	a[n-1] = 0;
       }
       goto vla_scope;
    }

Message ID: E_GOTO_INTO_VLA_SCOPE

## openmp directive can not be labeled

OpenMP directives flush and barrier are not statements and thus can not be labeled. Example of code that generates the message:

    void foo() {
      int i;
    wrong_label:
      #pragma omp barrier
      i++;
    }

Message ID: E_OMP_LABELED_DIRECTIVE

## reduction variable is not shared

A variable that is specified in reduction clause must be shared in the enclosing context. Example of code that generates the message:

    void main() {
      int i;
      #pragma omp parallel private(i)
    	#pragma omp sections reduction(+:i)
    	{
    	   i++;
    	}
    }

Message ID: E_OMP_REDUCTION_NOTSHARED

## reduction variable must not have a const-qualified type

Variable specified in reduction clause must not have a const-qualified type. Example of code that generates the message:

    void
    main()
    {
      const int ci;
      #pragma omp parallel reduction(+:ci)
          ;
    }

Message ID: E_OMP_CONST_REDUCTION

## type of reduction variable is invalid

Type of the variable specified in reduction clause must be valid for the reduction operator except that pointer types are never permitted. Example of code that generates the message:

    void
    main()
    {
      float f;
      #pragma omp parallel reduction(^:f)
          ;
    }

Message ID: E_OMP_REDUCTION_BADTYPE

## function \"%s\" not inlined. Already defined as extern.

Example of code that generates the message:

    extern int foo(int i)
    {
      i++;

      return i;
    }

    inline int foo(int i);

Message ID: E_INLINE_DEFINED_EXTERN

## function \"%s\" not made external. Already defined as inline.

Example of code that generates the message:

    inline int foo()
    {
      return 5;
    }

    extern foo(void);

Message ID: E_INLINE_DEFINED_INLINE

## badly formed STDC pragma

This message is displayed when general syntax error is discovered in OpenMP pragma. Example of code that generates the message:

    #pragma STDC L_FENV_ACCESS ON
    /* "ON" used instead "on" */

Message ID: E_STDC_SYNTAX_ERROR

## Non-pointer types cannot be restrict qualified

Restrict qualifier is meaningful only for pointer types. Types other than pointer types shall not be restrict-qualified. Example of code that generates the message:

    restrict int a;

Message ID: E_NON_PTR_CANT_RESTRICT_QUAL_2

## ordered directive used within the lexical extent of non-ordered for

OpenMP directive ordered must not be in the dynamic extent of a for directive that does not have ordered clause specified. Example of code that generates the message:

    void
    main()
    {
      int i, a = 0;
      #pragma omp for
      for (i=0; i<10; i++) {
          #pragma omp ordered
    	a+=i;
      }
    }

Message ID: E_OMP_NONORDERED_FOR

## ordered directive outside the lexical extent of for directive

OpenMP directive ordered must be within the dynamic extent of a for or parallel-for construct that has an ordered clause. Example of code that generates the message:

    void
    main()
    {
      int i, a = 0;
      for (i=0; i<10; i++) {
          #pragma omp ordered
    	a+=i;
      }
    }

Message ID: E_OMP_ORDERED_NOFOR

## section directive should be used inside of sections directive only

OpenMP directive section must appear within the lexical extent of the sections directive Example of code that generates the message:

    void
    main()
    {
      int i;
      #pragma omp parallel
      {
          #pragma omp section
    	i++;
      }
    }

Message ID: E_OMP_SECTION_NO_SECTIONS

## bad value for default clause

Only none or shared are valid values for default clause. Example of code that generates the message:

    void
    main()
    {
      int i;
      #pragma omp parallel default(private)
      {
    	i++;
      }
    }

Message ID: E_OMP_BAD_DEFAULT

## #pragma alias_level valid only at file scope.

Pragma alias_level is meaningful only at file scope, because the alias level that is set via the pragma applies through the remainder of the translation unit. Example of code that generates the message:

    struct s1 {...};
    struct s2 {...};
    foo()
    {
    #pragma alias_level strict (struct s1, struct s2)
    }

Message ID: E_FILE_SCOPE_ALIAS_LEVEL_PRAGMA

## macro definition _Pragma hides preprocessing operator _Pragma

The preprocessing operator _Pragma is allowed to be redefined via macro definition. However such a redefinition completely hides _Pragma operator. Example of code that generates the message.

    #define _Pragma printf("Pragma\n")

Message ID: E_PP_PRAGMA_REDEFINED

## argument mismatch in _Pragma operator

The preprocessing operator _Pragma takes a single argument that should be a single string literal. Example of code that generates the message.

    _Pragma("omp", "parallel")
    _Pragma("omp" "parallel")

Message ID: E_PP_PRAGMA_ARG_MISMATCH

## pragma critical is not allowed to be nested inside of critical with the same name

Critical directives with the same name are not allowed to be nested inside each other. Example of code that generates the message.

    void main(void) {
        #pragma omp critical(foo)
            #pragma omp critical(foo)
            ;
    }

Message ID: E_OMP_BAD_CRITICAL_NESTING

## declaration can not follow a statement

Declarations must precede any statements. Example of code that generates the message.

    void main(void) {
        int i = 1;
        i++;
        int j = i;
    }

Message ID: E_DECLARATION_IN_CODE

## declaration statement is not allowed in for-loop initialization

The initialization part of a for statement shall only be an expression statement. Example of code that generates the message.

    void main(void) {
        for (int i = 1; i<10; i++);
    }

Message ID: E_DECLARATION_IN_FOR

## wrong storage class in for-loop declaration

The declaration part of a for statement shall only declare variables with storage class auto or register. Example of code that generates the message.

    void main(void) {
        for (static int i = 1; i<10;)
    	i++;
    }

Message ID: E_BAD_STORAGE_IN_FOR_DECL

## no array size after static array qualifier

When used as qualifier in array declarator keyword static should be followed by array size expression. This expression cant be omitted. Example of code that generates the message.

    void foo (int a[static]);

Message ID: E_INVALID_STATIC_VLA_QUAL

## cannot access include file

No read permissions for the file specified in #include directive. Example of code that generates the message:

    #include "noperm.h"

Message ID: E_CANT_ACCESS_INCLUDE_FILE

## too many open files

The file specified in #include directive cannot be open because there are too many files opened already. Example of code that generates the message:

    #include __FILE__

Message ID: E_TOO_MANY_FILES

## license error "description of error"

A problem has occured when trying to obtain a license or when trying to obtain information about licenses.

Message ID: E_LICENSE_ERROR

## no explicit type given

Variable is declared without any explicit type specifier, assuming implicit int. Example of code that generates the message.

    static a;

Message ID: E_NO_EXPLICIT_TYPE_GIVEN

## no explicit type given for parameter

Parameter is declared without any explicit type specifier, assuming implicit int. Example of code that generates the message.

    void
    fux(a)
    {
    	/* body */
    }

Message ID: E_NO_TYPE_FOR_OLDSTYLE_PARAM

## implicit function declaration

Implicit function declarations are no longer allowed. Example of code that generates the message.

    /* No #include  here */
    void main(void)
    {
    	printf("Hello world!\n");
    }

Message ID: E_NO_IMPLICIT_DECL_ALLOWED

## designated initializer field reference on non-struct/union type

struct/union field name was used in a non-struct/union initializer context. Example of an initializer that generates the message:

    int a[10] = {.field=1}

Message ID: E_DESIG_INIT_FIELD

## designated initializer index for array is not constant

designated index for an array initializer is not a constant value. Example of an initializer that generates the message:

    int i;
    int a[10] = {[i]=1}

Message ID: E_DESIG_INIT_INDEX_CONST

## array designated initializer used on non-array type

designated index for an array initializer was used to initialize non-array variable. Example of an initializer that generates the message:

    int a = {[5]=1}

Message ID: E_DESIG_INIT_NON_ARRAY

## compound literal not allowed

A compound literal was specified even though the -xc99=no%initialize flag was specified on the command line. Example of source that would generate this error message:

    main()
    {
      bar((int [12]){0,1,2,3,4,5,6,7,8,9,10,11},12);
    }

Message ID: E_COMP_LIT_NOT_ALLOWED

## identifier redeclared

You have declared an identifier in a way that is inconsistent with a previous appearance of the identifier or you have declared an identifier twice in the same scope. In the previous releases of K&R C, inconsistent redeclarations are allowed if the types are "nearly" the same (such as `int` and `long` on SPARC). ANSI C considers the types to be different.

    int x;
    static long x;

Message ID: E_IDENTIFIER_REDECLARED_STATIC

## address of a void object cannot be taken

When the & is applied to an operand, the operand cannot be of type void. Example of code that generates the message.

    void *p;
    *p = &*p;

Message ID: E_TAKING_ADDRESS_OF_VOID

## return, goto, break or continue statement not allowed to enter or exit an openmp structured block

OpenMP parallel and worksharing constructs are require to be followed by structured block. A structured block is a statement that has a single entry and a single exit. No statement that causes a jump into or out of the block is allowed. A structured block cannot contain a return, goto, break or continue statement that causes control to flow out of the block. Example of code that generates the message:

    int foo() {
      #pragma omp parallel
      {
         return;
      }
    }

Message ID: E_OMP_STRUCTBLK_VIOLATION

## parameter has incomplete type

You have declared a function parameter with `struct`, `union`, or `enum` type that is incomplete. Example of code that generates the message:

    typedef struct foo
    {
        void (*function)(struct foo bar);
    } foobar;

Message ID: E_INCOMPLETE_PARAMETER

## __thread variable specifier ignored

The __thread keyword may be applied to extern or static variable. It has no effect on automatic variables. Example of code that generates the message:

    int foo() {
        __thread int i;
    }

Message ID: E_BAD_STORAGE_THREAD_IGNORED

## bad expression for atomic construct

The expression statement must have one of the following forms: x binop= expr, x++, x--, ++x, --x. where x is an lvalue expression with scalar type. binop is one of the following: +, *, -, /, &, ^, |, << or >>. expr is an expression with scalar type, and it does not reference the object designated by x. Example of code that generates the message:

    void
    main()
    {
      int i;
      #pragma omp atomic
      	i = i+1;
    }

Message ID: E_OMP_BAD_ATOMIC_EXPR

## constant promoted according to the 1999 ISO C standard

1999 ISO C standard changes rules for integer constant typing. Compiler issues this message for any integer constant that would have different type set by ANSI standard rules. Example of code that generates the message:

    long long a = 2147483648;

Message ID: E_C99_INTEGER_PROMOTION

## ignoring extra #pragma parameters

The compiler has encountered `#pragma` with too many parameters. Extra parameters are ignored. Example of code that generates the message:

    #pragma MP taskloop maxcpus (2) savelast

Message ID: E_IGNORE_EXTRA_PRAGMA_PARAMS

## Small struct containing array of floating point type being passed or returned.

A small struct containing an array of {float|double|long double} has been found either being passed as a parameter or returned as a value from a function on a v9. Small structs consist of 16 bytes as arguments to and 32 bytes as returned values from a function.

    typedef struct {
    	double tf[4];
    } t_st;

    t_st myfunc(t_st arg) {
    	t_st rv;

    	return rv;
    }

Message ID: E_FLTARRSMLSTRUCT

## left operand of "." must be lvalue in this context, program behavior is undefined

The operand on the left side of a . operator is an expression that does not yield an lvalue. Usually, this warning is issued for programs that try to change the return value of a function that returns a structure. Example of code that generates the message:

    struct s { int ia[10]; };
    struct s sf(void);
    f(void){
    	sf().ia[0] = 3;
    }

Message ID: E_L_OPERAND_DOT_NOT_LVALUE_NOW

## pragma omp should be followed by a statement

Statement was expected in an omp pragma construct. Example of code that causes this error:

    {
    #pragma omp master
    }

Message ID: E_OMP_NO_STATEMENT

## shared loop control variable was made private

Variables that are used for loop control in parallel for are implicitly declared private, as a result shared() clause has no effect on such variables. Example of code that generates the message:

    void
    main()
    {
      int i,j;
      #pragma omp parallel for shared(i,j)
      for (i=0; i<10; i++) j = i;

      printf("i=%d\tj=%d\n",i,j);
    }

Message ID: E_OMP_SHARED_CONTROL_VAR

## conversion of hex floating-point constant cannot be represented exactly in its evaluation format

Example of code that generates the message:

    main()
    {
            float f;

            f = 0x1.ffffffp0f;
    }

Message ID: E_CNV_HEX_CONST_EVAL_FMT

## num_threads clause expression does not have integer type

Expression specified in num_threads clause of OpenMP parallel must have integer type. Example of code that generates the message:

    void main() {
      struct { int val; } true = {1};

      #pragma omp parallel num_threads(true)
    	printf("Hello,worlds!\n");
    }

Message ID: E_OMP_BAD_NUM_THREADS_TYPE

## pragma STDC must preceed explicit declarations and statements inside a compound statement

Example of code that generates the message

    void foo() {
      int i;
      #pragma STDC FP_CONTRACT OFF
    }

Message ID: E_STDC_PRAGMA_WRONG

## num_threads clause expression must be positive integer

Expression specified in num_threads clause of OpenMP parallel must be positive integer Example of code that generates the message:

    void main() {
      #pragma omp parallel num_threads(-1)
    	printf("Hello,worlds!\n");
    }

Message ID: E_OMP_NEGATIVE_NUM_THREADS

## private variable cannot be specified in the clause

Variables that are private withing a parallel region cannot be specified in the reduction clause on a work-sharing directive that binds to the parallel construct. Example of code that generates the message:

    void main() {
      int i;
      #pragma omp parallel private(i)
    	#pragma omp sections reduction(+:i)
    	{
    	   i++;
    	}
    }

Message ID: E_OMP_CANT_BE_IN_PRIVATE

## reduction variable cannot be specified in the clause

Variables that appear in the reduction clause of a parallel directive cannot be specified in the reduction clause on a work-sharing directive that binds to the parallel construct. Example of code that generates the message:

    void main() {
      int i;
      #pragma omp parallel reduction(+:i)
    	#pragma omp sections reduction(+:i)
    	{
    	   i++;
    	}
    }

Message ID: E_OMP_CANT_BE_IN_REDUCTION

## section directive should be followed by a statement

OpenMP sections directive contains a sequence of section directives, each directive being followed by a single statement. First section directive might be omitted though.

    void foo() {
         int i,j;
         #pragma omp parallel sections private(i, j)
         {
    	i++;
    	i = i + 1;
    	j++;
         }
    }

Message ID: E_OMP_BAD_SECTION_STATEMENT

## operand must have floating type

An operator has been used with operand that are required to be of floating type (`float, double, long double,` etc.) but are not, for example using an int Example of code that generates the message:

          int i;
          int a = __builtin_fpclassify i;

Message ID: E_OPERAND_MUST_BE_FLOATING_TYPE

## threadprivate directive must appear at the scope of variable

Threadprivate directive for a file-scope variable must appear at the file scope. Threadprivate directive for a block-scope variable must appear in the scope of this variable and not in a nested scope. Example of code that generates the message:

    extern int x;
    void
    main()
    {
      #pragma omp threadprivate(x)
      static int i;
      {
        #pragma omp threadprivate(i)
      }
    }

Message ID: E_OMP_THREADPRIV_WRONG_SCOPE

## variable specified in threadprivate directive in block scope must be static

Each variable in the list of a threadprivate directive must have a file-scope or static block-scope declaration. Example of code that generates the message:

    void
    foo(int i)
    {
       #pragma omp threadprivate(i)
       int j;
       #pragma omp threadprivate(j)
    }

Message ID: E_OMP_STATIC_THREADPRIV

## right hand side of atomic expression references variable

Right hand side of atomic expression should not reference object of the left hand side. Example of code that generates the message:

    void
    main()
    {
      int i;
      #pragma omp atomic
      	i += i;
    }

Message ID: E_OMP_ATOMIC_EXPR_REFERENCE

## cannot open PCH file:

A file system error has prevented the compiler from opening a .cpch file. Make sure you have permission to read/write into the current working directory.

Message ID: E_CANT_OPEN_PCH_FILE

## No #pragma hdrstop or #include that matches -xpchstop=file

The end of the initial common source to be used to identify the portion of a program that can be reused via a precompiled header must be marked with either a #pragma hdrstop or a -xpchstop=filename, where filename is the same as the name associated with one of the #include's in the program source.

Message ID: E_NO_PCH_STOP_POINT

## #pragma hdrstop/-xpchstop before first #include disables PCH

Using a #pragma hdrstop or -xpchstop prior to any #include directives disables use of precompiled headers.

Message ID: E_HDRSTOP_BEFORE_INCLUDE

## Functions cannot be defined in header files used for precompiled headers

Functions cannot be defined in a header file that is to be used as part of a PCH file. Example of code that generate the error:

    int
    foo()
    {
        return 1;
    }

Message ID: E_CANT_INIT_IN_PCH

## directive is invalid with precompiled headers

Some directives are invalid when using precompiled headers. If they are used, an error will be generated. Examples of code that will cause this error

    #line 1
    #error "error message"
    #file "file.h"
    #warning "warning message"
    #assert system (unix)
    #unassert system

Message ID: E_PCH_INVALID_DIRECTIVE

## __DATE__ and __TIME__ are invalid with precompiled headers

The __DATE__ and __TIME__ predefined macros cannot be used in a header file when creating a precompiled header.

Message ID: E_PCH_INVALID_PREDEFINED

## __LINE__ and __FILE__ are invalid in precompiled header prefix

The __LINE__ and __FILE__ predefined macros cannot be used in a precompiled header prefix when collecting or using precompiled headers.

Message ID: E_PCH_PREFIX_PREDEFINED

## unrecognized magic number in PCH file

The PCH file is unusable because the magic number was not recognized.

Message ID: E_PCH_FILE_UNUSABLE_MAGIC

## cannot read PCH file with incorrect version stamp, recreate PCH file

The PCH file is unusable because the PCH version number is incorrect. The PCH file must be regenerated using the current compiler.

Message ID: E_PCH_FILE_UNUSABLE_VERSION

## PCH file unusable, -D or -U options must match those used when creating PCH file

The PCH file is unusable because the -D or -U options did not exactly match those used when the PCH file was created.

Message ID: E_PCH_FILE_UNUSABLE_DEFS

## PCH file unusable, cc command options must match those used when creating PCH file

The PCH file is unusable because the command line options did not exactly match those used when the PCH file was created.

Message ID: E_PCH_FILE_UNUSABLE_OPS

## PCH file unusable, sequence of pre-processing directives, including #include directives, must match those used when PCH file was created

The PCH file is unusable with the current source file because the initial sequence of pre-processing directives, including #include directives, did not exactly (excluding any comments) match those used when the PCH file was created.

Message ID: E_PCH_FILE_UNUSABLE_PREFIX

## variable specified in a copyprivate clause must be private in an enclosing context

Example of code that generates the message:

    void foo() {
         int i;
         #pragma omp parallel
         {
            #pragma omp single copyprivate(i)
    	;
         }
    }

Message ID: E_OMP_COPYPRIV_MUST_BE_PRIVATE

## the copyprivate clause must not be used with the nowait clause

Example of code that generates the message:

    int main() {
        int i = 42;
        #pragma omp single nowait copyprivate(i)
        {
          i++;
        }
    }

Message ID: E_OMP_COPYPRIV_WITH_NOWAIT

## inline keyword applied to non-function identifier

The inline keyword is valid only when applied to a function identifier. Examples of code that would cause this error are:

    inline int i;

    main()
    {
        inline float f[10];
    }

Message ID: E_INLINE_NEEDS_FUNC

## inline function definition redeclared to be static

Function declaration is inconsistent with a previous inline function definition. Example of code that will cause this error:

    inline int func(int i)
    {
        return ++i
    }

    static int func();

Message ID: E_INLINE_FUNC_REDECL_STATIC

## conditional expression is not a valid lvalue

Example of code that generates the message:

    void
    main(void) {
            int a=1, b=0, c=0;
            (a ? b : c) = 5;
    }

Message ID: E_ASSIGNMENT_TO_COND_EXPR

## compound literal is a C99 ISO feature

Example of code that generates the message:

    int *a = &(int[]){10, 20};

Message ID: E_NONC99_COMPOUND_LITERAL

## array member of function with struct type assigned to pointer is undefined

An array member of a function of type struct is being assigned to a pointer. The result of this assignment is undefined beyond the next sequence point. Example of code that generates the message:

    main()
    {
        int *i;

        i = foo().bar;
        printf("i is %d\n", *i);
    }

Message ID: E_ASG_ARY_TO_PTR

## invalid use of inline keyword

invalid use of inline keyword Example of code that generates the message.

    int foo(inline int);

Message ID: E_INLINE_INVALID_USE

## operand must be of integer, real or pointer type : op \"%s\"

Operand of the ++ and -- operators must be of integer, real or pointer type. Example of code that generates the message:

    double _Complex dc = 1.0 + 2.0 * _Imaginary_I;
    dc++; // error here

    double _Imaginary di = 2.0 * _Imaginary_I;
    --di; // error here

Message ID: E_OPERAND_MUST_BE_REAL_OR_PTR

## reference to static identifier in extern inline function

Example of code that generates the message:

    static int bar();

    inline int foo() {
        static int i;

        return i + bar();
    }

    The references to variable 'i' and function 'bar' are both invalid.

Message ID: E_REF_STATIC_EXTERN_INLINE

## incomplete %s type specifier

Complex/Imaginary type specifier incomplete Example of code that generates the message:

    _Complex c = 1.1 + 2.2 * _Imaginary_I;
    _Imaginary i;

Message ID: E_INCOMPLETE_COMPLEX_IMAGINARY

## invalid floating point operation

invalid floating point operation

Message ID: E_FP_INVALID

## floating point operation causes overflow

floating point operation causes overflow

Message ID: E_FP_OVERFLOW

## floating point operation causes underflow

floating point operation causes underflow

Message ID: E_FP_UNDERFLOW

## division by 0

division by zero

Message ID: E_FP_DIVISION_BY_ZERO

## real types converted to _Imaginary types result in a 0.0 of _Imaginary type

real types converted to _Imaginary types result in a 0.0 of _Imaginary type Example of code that generates the message:

    double d = 1.0;
    double _Imaginary di = d;     // warning here: di gets 0

Message ID: E_REAL_CONV_TO_ZERO

## _Imaginary types converted to real types result in a 0.0 of real type

_Imaginary types converted to real types result in a 0.0 of real type Example of code that generates the message:

    double _Imaginary di = _Imaginary_I;
    double d = di;        // warning here: d gets 0

Message ID: E_IMAGINARY_CONV_TO_ZERO

## iteration expression of omp for loop is inconsistent with control expression

Iteration expression of OpenMP for must be consistent with control expression. If logical operator in the for loop is <=, then the loop variable should be incremented and vice versa. Example of code that generates the message:

    void main() {
      int i;
      #pragma omp parallel for
      for (i=0; i<10; i--) {
      }
    }

Message ID: E_OMP_FOR_INCONSIST_ITER

## cannot concatenate sixteen-bit string literal with wide or regular string literal

Sixteen-bit string literals can only be concatenated with other sixteen-bit string literals. Example of code that generates the message:

    unsigned short *s = U"abc" "def";

Message ID: E_CANT_CONCAT_MIXED_UTF_STRINGS

## U string literals may only contain ASCII

Example of code that generates the warning:

    unsigned short bar[] = U"é";

Message ID: E_ASCII_UTF16_USHORT_CHAR_ERR

## Globalizing variable names for dbx fix and continue, crossfile optimization flag ignored.

The -xcrossfile flag is ignored when compiling using fix and continue from the debugger.

Message ID: E_X_CROSSFILE_IGNORED

## only identifiers with external linkage may have linker scoping

Example of code that generates the error:

    static __symbolic int i;

Message ID: E_LDSCOPE_FOR_EXTERN_ONLY

## redeclaration must have the same or more restrictive linker scoping

Example of code that generates the error:

    __symbolic void rescopedcl();
    __global void rescopedcl();

Message ID: E_NEW_LDSCOPE_MUST_BE_HIGHER

## linker scoping must match definition

Example of code that generates the error:

    __symbolic void rescopedef() { } __hidden void rescopedef();

Message ID: E_NO_LDSCOPE_AFTER_DEFN

## PCH viable prefix must contain only pre-processor directives, including #include directives, and comments

Example of code that generates error:

    int i;
    #include "file.h"
    #pragma hdrstop
    main()
    {
    }

Message ID: E_PCH_BAD_VIABLE_PREFIX

## bit-field size < 0

The declaration for a bit-field specifies negative number of bits. Example of code that generates the message:

    struct s { int x:-3 };

Message ID: E_BIT_FLD_SIZE_LESS_ZERO

## zero sized bit-field

The declaration for a bit-field specifies zero size. Example of code that generates the message:

    struct s {
           int x:1;
           int y:0;
    };

Message ID: E_BIT_FLD_SIZE_EQUAL_ZERO

## variable format specifier to printf-like function; possible expansion issues

When user defined data (e.g., derived from input or command-line options) is passed as the format argument of printf-like functions, you should make sure that there are no unintended %n specifiers in the format string. %n-expansion is a well-known source for security exploits. Example of code that generates the error:

    (void) fprintf(stderr, fmt, i1, i2, i3);

Message ID: E_SEC_PRINTF_VAR_FMT

## format argument to sprintf-like function contains an unbounded string specifier

Unbounded %s specifiers in the format can cause buffer overflows if the argument that is formatted is larger than the buffer. Example of code that generates the error:

    (void) sprintf(buf, "%s", string);

Message ID: E_SEC_SPRINTF_UNBOUNDED_COPY

## variable format specifier to sprintf-like function; possible expansion issues

When user defined data (e.g., derived from input or command-line options) is passed as the format argument of scanf-like functions, you should make sure that there are no unintended %n specifiers in the format string. %n-expansion is a well-known source for security exploits. Example of code that generates the error:

    (void) fscanf(stdin, fmt, &i1, &i2, &i3);

Message ID: E_SEC_SCANF_VAR_FMT

## format argument to scanf-like function contains an unbounded string specifier

Unbounded %s specifiers in the format can cause buffer overflows if the argument that is formatted is larger than the buffer. Example of code that generates the error:

    (void) scanf("%s", string);

Message ID: E_SEC_SCANF_UNBOUNDED_COPY

## variable argument to strcpy-like function; make sure it's safe

Copying strings with strcpy() can result in an overflow of the destination buffer if that buffer is too small to hold the contents of the source buffer. Make sure that the destination buffer is large enough, or use strlcpy(). Example of code that generates the error:

    (void) strcpy(dst, src);

Message ID: E_SEC_STRCPY_WARN

## don't use strncpy-like functions in new code. strl*()'s are preferred.

The library function strncpy() is sometimes difficult to use since it does not NUL-terminate the destination string if there is insufficient space. strlcpy() does not have this limitation and is usually a better choice of function. There is one exception: when you are updating structures that reside on disk, you might depend on the fact that strncpy() will NUL-fill any unused space in the destination buffer. Example of code that generates the error:

    (void) strncpy(dst, src, size);

Message ID: E_SEC_STRNCPY_WARN

## don't use strncat-like functions in new code. strl*()'s are preferred

The use of strncat() is discouraged since it requires you to calculate the space remaining before calling this function. strlcat() is much easier to use safely. Example of code that generates the error:

    (void) strncat(dst, src, size);

Message ID: E_SEC_STRNCAT_WARN

## do not use gets(); use fgets(buf, sizeof(buf), stdin) instead

There is no situation where you can use gets() safely. It is always prone to buffer overflows since it doesn't have information on the size of the buffer it is supplied with. Use fgets(). Example of code that generates the error:

    (void) gets(buf);

Message ID: E_SEC_FORBIDDEN_WARN_GETS

## do not use cftime-like functions; use strftime(buf, sizeof(buf), fmt, &tm) instead

cftime() relies on a large enough buffer to hold the result. Since it imports information from the environment (CFTIME) you can't be sure that the result will fit in the buffer you supplied. Use strftime() instead. Example of code that generates the error:

    (void) cftime(buf, fmt, clock);

Message ID: E_SEC_FORBIDDEN_WARN_CFTIME

## do not use ascftime-like functions; use strftime(buf, sizeof(buf), fmt, &tm) instead

ascftime() relies on a large enough buffer to hold the result. Since it imports information from the environment (CFTIME) you can't be sure that the result will fit in the buffer you supplied. Use strftime() instead. Example of code that generates the error:

    (void) ascftime(buf, fmt, time);

Message ID: E_SEC_FORBIDDEN_WARN_ASCFTIME

## do not use creat-like functions; use open(path, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, mode) instead

creat() is vulnerable to a symlink attack; that is, if the file name to be created already exists as a symbolic link, creat() will follow the symbolic link and create the file at the location pointed to by the symlink. Because of this implementation artifact, you can't create files securely. Example of code that generates the error:

    fd = creat(fname, mode);

Message ID: E_SEC_FORBIDDEN_WARN_CREAT

## direct memory copying should not be used for copying strings; use strlcpy() instead

Using bcopy() or memcpy() to copy strings is error prone since it requires that the programmer has calculated the correct sizes. Therefore we suggest to use strlcpy() instead. Example of code that generates the error:

    char *src, dst;
    ...
    (void) bcopy(dst, src, len);

Message ID: E_SEC_BCOPY_WARN

## use of rand() is discouraged. Alternative: /dev/random

The rand()-family of functions implement a rather weak random number generator. If you rely on strong random numbers, use the /dev/random or /dev/urandom interface. Example of code that generates the error:

    i = rand();

Message ID: E_SEC_RAND_WARN

## chdir is prone to pathname-race conditions. Do not use in multi-threaded programs

Using this function in combination with another function that deals with the same object (directory) can lead to pathname-based race conditions. Use fchdir() as an alternative. Example of code that generates the error:

    (void) chdir(dirname);

Message ID: E_SEC_CHDIR_WARN

## don't call catopen-like functions with a user-supplied message catalog

Libraries and programs should not call this function on user supplied pathnames. User supplied message catalogues can be leveraged to break privileged code easily. Example of code that generates the error:

    (void) catopen(fname, flag);

Message ID: E_SEC_CATOPEN_WARN

## make sure that dl_open() parameter is not constructed from user input, including argv[0]

Parameters to this function should only be unqualified pathnames which are then found using the runtime linker's path, or full pathnames which are not in any way derived from user input (including argv[0]). Note that there is no way to safely open a user supplied shared object since the _init() function is executed before dlopen() returns. Example of code that generates the error:

    dlopen(fname, dlopen_mode);

Message ID: E_SEC_DLOPEN_WARN

## this function opens files; verify that the filename is safe

This function opens several files and should only be used with pathnames that are known to be safe.

Message ID: E_SEC_PATH_WARN

## chroot()-ed environments offer little protection

chroot-ed environments offer little protection. Make sure you run no privileged programs in a chroot-ed environment and that you chdir() to a point below the new root after chroot().

Message ID: E_SEC_CHROOT_WARN

## environment variables are completely user-controlled; caution needed

Treat the values returned by getenv() carefully. They are under complete control of the user and can be large (up to NCARGS () characters. They can also contain all sorts of unexpected data that your program needs to sanitize before use.

Message ID: E_SEC_GETENV_WARN

## avoid getlogin(); the return value is a mere hint as to the user id

Avoid using getlogin(); you can't rely on it's output, and it is not multithread-safe (use getlogin_r() instead). In either case, you should not trust the returned login; use uid or provide alternative user authentification method.

Message ID: E_SEC_GETLOGIN_WARN

## be carefull about the user-supplied path for mkdir()

Check that the path used for mkdir() is safe if it is derived from user input.

Message ID: E_SEC_MKDIR_WARN

## avoid using mktemp-like functions; generated pathname is not guaranteed to be safe to use

There is no guarantee that the generated pathname can be used safely as there is a race condition between the generation of the pathname and its use in open(). Use "fd = mkstemp(template);" instead.

Message ID: E_SEC_MKTEMP_WARN

## avoid using functions which invoke the shell

This function creates a child process that runs the shell (/bin/sh) to perform its job. Spawning a shell involves $PATH, $IFS and other environment variables, which make it difficult to use securely. Also, keep in mind that the shell will interpret special characters present in its argument.

Message ID: E_SEC_SHELL_WARN

## avoid using kvm_* functions; write a proper kstat() interface if you need information from the kernel

If you accept a user specified \"namelist\" argument, make sure you revoke privileges before using it.

Message ID: E_SEC_KVM_WARN

## return value of readlink is not guaranteed to be NUL terminated

Make sure you handle the case where the contents of the symbolic link are too large for the supplied buffer.

Message ID: E_SEC_READLINK_WARN

## getpass() returns at most 8 characters. getpassphrase() is preferred

Avoid using getpass() in secure applications. getpassphrase() is preferred since it can return up to 256 characters of password.

Message ID: E_SEC_GETPASS_WARN

## avoid using tempnam-like functions; use mkstemp() instead

There is no guarantee that the generated pathname can be used safely as there is a race condition between the generation of the pathname and its use in open(). Use mkstemp() instead.

Message ID: E_SEC_TEMPNAM_WARN

## tmpfile-like function is NOT MT-safe (it changes the umask)

This function calls umask() which is dangerous in multi-threaded applications.

Message ID: E_SEC_TMPFILE_WARN

## avoid using truncate-like functions; use ftruncate() instead

This function is subject to pathname race conditions since it operates on an object in the file namespace. The object presented to this function might be different than the object in prior or subsequent calls because the file system may have changed between these subsequent calls.

Message ID: E_SEC_TRUNCATE_WARN

## avoid using umask-changing functions in secure applications, if possible

Avoid using umask() since it modifies user-defined umask. Consider using file creation modes in open-like functions.

Message ID: E_SEC_UMASK_WARN

## avoid using utmp name changing functions; use default utmp files

Avoid using utmpname() in secure applications; you should use default utmp file names instead.

Message ID: E_SEC_UTMP_WARN

## avoid using select-like functions, poll() is preferred

Programming with select() is error-prone because of the difficult API and is known to have caused several security problems. poll() has a much easier interface to use, has less restrictions and is faster.

Message ID: E_SEC_SELECT_WARN

## strcpy-like function is subject to buffer overruns; check bounds

Copying strings with this function can result in an overflow of the destination buffer if that buffer is too small to hold the contents of the source buffer. Make sure that the destination buffer is large enough.

Message ID: E_SEC_EXPAND_WARN

## the use of chmod()-like functions is prone to race conditions

Processes should honor the current real-uid, switch back to the real-uid before opening files if you need to. If you must change the attributes of a file-system object, preferably use open() together with fchown()/fchmod().

Message ID: E_SEC_CHMOD_WARN

## avoid using exec*() functions in privileged software

execvp() and execlp() rely on $PATH to find the proper binary to run and $PATH is often under the user's control. Instead use one of execl(), execv() or execve().

Message ID: E_SEC_EXEC_PATH

## the use of exec()-like functions is restricted

Make sure that the environment is sanitized before you exec() another application, and that you have closed all sensitive file descriptors.

Message ID: E_SEC_EXEC_WARN

## if you incrementally store the input in a buffer, make sure you check the boundary conditions

This is a security reminder: you should check bounds when appending to a buffer inside a loop. Incorrect or absent bounds calculations may result in buffer overruns; never assume that user input has fixed length, check for bounds signedness, etc.

Message ID: E_SEC_LOOP_WARN

## the use of access-like functions should be avoided

This function can't be used securely since the information it returns is outdated by the time you can act on it. Using access() followed by open() has a race condition that can't be solved. Alternative: open() with permissions of intended user.

Message ID: E_SEC_ACCESS_WARN

## O_CREAT without O_EXCL specified

If you call open() with O_CREAT, but without O_EXCL, open() will follow a symlink as the last component of the pathname. This could enable users to creat files in a destination that was not intended.

Message ID: E_SEC_CREAT_WITHOUT_EXCL

## O_CREAT specified, but \"mode\" parameter not set

You should always specify file creation mode, setting permissions as narrow as possible (current user only, usually), extending them later if needed; otherwise users may get undesired access to created files.

Message ID: E_SEC_CREAT_WITHOUT_MODE

## fopen-like functions can't be used to safely create files

This function does not allow to specify permissions for new files. Make sure that the pathname already exists or that the directory is not publicly writable. Alternative: use open()/fdopen() sequence.

Message ID: E_SEC_FOPEN_MODE

## possible race-condition detected - parameter has been passed to stat() before

Malicious user may modify the filesystem object after the stat-like call has completed, resulting in possible race condition. Use fstat() instead.

Message ID: E_SEC_USE_AFTER_STAT

## variable mask specifier to glob; possible expansion issues

When user defined data (e.g., derived from input or command-line options) is passed as a mask argument to glob(), you should validate input to make sure that the string is well-formed and would not pose a security threat. Check for extended symbols, '..', '/', '-', spaces, and other special characters.

Message ID: E_SEC_GLOB_WARN