Техническая Спецификация для Microchip Technology SW006022-2N

Скачать
Страница из 338
Compiler Command-Line Driver
 2012 Microchip Technology Inc.
DS52071B-page 65
-Wmain
Warn if the type of main is suspicious. main should be a func-
tion with external linkage, returning int, taking either zero, two 
or three arguments of appropriate types.
-Wmissing-braces
Warn if an aggregate or union initializer is not fully bracketed. In 
the following example, the initializer for a is not fully bracketed, 
but that for b is fully bracketed. 
int a[2][2] = { 0, 1, 2, 3 };
int b[2][2] = { { 0, 1 }, { 2, 3 } };
-Wmultichar
-Wno-multichar
Warn if a multi-character character constant is used. 
Usually, such constants are typographical errors. Since they 
have implementation-defined values, they should not be used in 
portable code. The following example illustrates the use of a 
multi-character character constant:
char
xx(void)
{
return('xx');
}
-Wparentheses
Warn if parentheses are omitted in certain contexts, such as 
when there is an assignment in a context where a truth value is 
expected, or when operators are nested whose precedence 
people often find confusing.
-Wreturn-type
Warn whenever a function is defined with a return-type that 
defaults to int. Also warn about any return statement with no 
return-value in a function whose return-type is not void.
TABLE 3-8:
WARNING/ERROR OPTIONS IMPLIED BY -WALL (CONTINUED)
Option
Definition