-w

Category

Listings, messages, and compiler information

Pragma equivalent

None.

Purpose

Suppresses informational, language-level and warning messages.

C only This option is equivalent to specifying -qflag=e : e. C++ only This option is equivalent to specifying -qflag=s : s.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -w---------------------------------------------------------><

Defaults

All informational and warning messages are reported.

Usage

Informational and warning messages that supply additional information to a severe error are not disabled by this option.

Predefined macros

None.

Examples

To compile myprogram.c so that no warning messages are displayed, enter:
xlc myprogram.c -w
The following example shows how informational messages that result from a severe error, in this case caused by problems with overload resolution in C++, are not disabled :
void func(int a){} 
void func(int a, int b){} 
int main(void) 
{ 
func(1,2,3); 
return 0; 
} 
The output is as follows:
"x.cpp", line 6.4: 1540-0218 (S) The call does not match any parameter list for 
                                 "func". 
"x.cpp", line 1.6: 1540-1283 (I) "func(int)" is not a viable candidate. 
"x.cpp", line 6.4: 1540-0215 (I) The wrong number of arguments have been 
                                 specified for "func(int)".
"x.cpp", line 2.6: 1540-1283 (I) "func(int, int)" is not a viable candidate. 
"x.cpp", line 6.4: 1540-0215 (I) The wrong number of arguments have been specified 
                                 for "func(int, int)".

Related information