<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/141464>141464</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [LLVM] GCC15 prints thousands of warnings when compiling.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          carlo-bramini
      </td>
    </tr>
</table>

<pre>
    I tried to build the latest development sources with GCC-15.1, the build process runs but I noticed that thousands of warnings like this one are printed on the console:
```
cc1plus: note: unrecognized command-line option â€˜-Wno-unnecessary-virtual-specifier’ may have been intended to silence earlier diagnostics
```
Actually, the effect is just a warning message, but perhaps it would be worth to avoid it, if it's possible.
This flags seems to be added only here:
https://github.com/llvm/llvm-project/blob/926c2013231a030a52037528bac0ba124c35ac32/llvm/cmake/modules/HandleLLVMOptions.cmake#L888
by using a macro called `add_flag_if_supported()` into the code.
Unfurtunately, it seems that it doesn't detect that GCC is not understanding this option.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUlE3r4zYQxj-NchliZPkl9sGHNNtsF7b00pfjH1ka29qVJaOREtJPX-QkLBR6KBhs8KPRo98zI0lkZoc4sOYn1nw6yBQXHwYlg_XHMcjVOHMYvX4MXyAGgxqihzEZqyEuCFZGpAgab2j9tqKLQD4FhQR3Exf4fLkcy6Yombjs-ufKLXiFRBCSIxhThC_gfDQqV19khLj4RNJpAj_BXQZn3ExgzXeEuBgC7xBkQNiCcRE1eLcXV96Rt8iqM-Nn1vLXw89KlZtNxKpz3icLILmAys_O_I0alF9X6fTRGofgt2i8A_azYB1nfXf8y_ljcg6zZRkex5sJMUl7pA2VmQyGt7SHVT5gkTeEEdFBNuf0ExkZi04hoAzWYABt5Ow8RaPoX2bPKle3jzcynCZUEQzBt0QR5BsIrNnPjFmXGW4YFrkRmAh3n6yGEeHuQ1zy9vLmjQYTs9hM-8eJYPNEZrRYMH7-PYOdrJwJCHGlPWcEqfUO2D5gwfBiu8S4ZZpMXJm4ziYuaSyUX5m4Wnt7v45b8N9QRSauo_UjE9detErwshJVKXnFZSN4dWpEN0rFR1mKWlWNVJX4UUet8jsycV29ThaJiesv0mmLX7_--etve1BUvDTV167rGD-PD0iU-UhYpQoelLQWNbCWS60_8hE_zPRBadt8iKiZ6JjoWctzXv7VSHpn8oebUojJyYjPPEx8w8ltaiJoj-SYOOURiDmm_cfnyyXn5XyE5DQGitLpbOnZvbvv4qCHSvdVLw84lKe6E_Wp6fvDMrRYlxJV11Vd01dVW_H6VJ9K3VeqbDTvD2YQXDS8ES3vyr7pi6nux7pSoqn7duJjy2qOqzS2yBQLH-aDIUo4lHVZt_XByhEtvSc-DHtYY5qJ1dwaivRjXTTR7ndDBs6aT_loZfMcPPqPOb0v6PJIbcYaNxeHFOzwvztmN5zzfnm-DeKfAAAA__-6e408">