<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/116218>116218</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
The compiler flag "-w" does **not** silence all the warnings
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:frontend,
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
carlosgalvezp
</td>
</tr>
</table>
<pre>
Hi,
I have posted an identical bug to GCC, but thought it'd be good to have it here as well.
Example:
```c
typedef void (*PFUNC)(int);
void func(double);
int main()
{
PFUNC x = func;
}
```
Compiling with "gcc -w main.c", I still get:
```console
<source>:7:11: error: incompatible function pointer types initializing 'PFUNC' (aka 'void (*)(int)') with an expression of type 'void (double)' [-Wincompatible-function-pointer-types]
7 | PFUNC x = func;
| ^ ~~~~
1 error generated.
Compiler returned: 1
```
https://godbolt.org/z/aYe19Kzab
I can still suppress the warning explicitly via -Wno-incompatible-function-pointer-types, but I would expect "-w" to work here, since this is a warning (not an error) and -w "Inhibit all warning messages" as per the docs.
Why is that?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVEFv4zYT_TX0ZWDDGtmWdNDBsePvCwoUPbQIeqTIscQuTQrkyE5yyG8vKGsTZYsuChgWRQ7fzLw3TzJG0zqiWmwfxPa4kAN3PtRKButjK-2V3vpF4_Vr_X8j8CDWR7He3_-foJNXgt5HJg3SgdHk2ChpoRlaYA__OxwEHqAZGLjzQ9sxGBZYaGgIWu91ChpBDENHgUBGuJG1q3mexxd56S2JfD_fFbv1_afu7_zak6YzXL3RILAUuP_t9MevB4GVwNI4Tov8YQ4xhp4HpwSW2g-NpX_GGMdwkcaNiNV0UkwhAABjEngBkR_vWB_3i-MPlc5xD_7SG2tcCzfDHQjEVilY3sZkKyUQE3NPENlYCy3xv7bvXfSWpt38EP0QFIn8UeT7QuT7LBP5HigEH9LCOOUvvWTTWBrrZeM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