-w

Description

Requests that warnings and lower-level messages be suppressed. Specifying this option is equivalent to specifying -qflag=e:e.

Syntax

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

Notes

Informational and warning messages that supply additional information to a severe error are not disabled by this option. For example, a severe error caused by problems with overload resolution will also produce information messages. These informational messages are not disabled with -w option:

void func(int a){} 
void func(int a, int b){} 
int main(void) 
{ 
func(1,2,3); 
return 0; 
} 
 

"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)". 

Example

To compile myprogram.c so that no warning messages are displayed, enter:

xlc++ myprogram.C -w

Related information