<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56487>56487</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Implement -Wlto-type-mismatch?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
thesamesam
</td>
</tr>
</table>
<pre>
GCC [supports](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html) -Wlto-type-mismatch to warn when the same type is redefined across different units:
> -Wno-lto-type-mismatch
>
> During the link-time optimization, do not warn about type mismatches in global declarations from different compilation units. >Requires -flto to be enabled. Enabled by default.
Clang doesn't support this flag and I don't think I see an [equivalent](https://clang.llvm.org/docs/DiagnosticsReference.html) on the list.
Does it make sense for Clang to implement an equivalent flag? Or does it have one I'm missing? Thanks!
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtk9tunDAQhp8GbkYgDkvYveAi3U2qXEWKKuXa2AO46wO1TaL06TuG7aZJgziZGWa--X_orXjrvh-PkDTf_DLP1gWfNKek2k8hzD6pb5PqnvaR83w0S27dSCtrlDQoLPdbiM7PzBlpxuxxDtIan09Bq6Q6QPasgs3C24yZll6zwCcIFl4pHV4nNBAmBM80QswB6cGhwCGWB8ad9R6EHAZ0aAIsRoaVqTglxW1S30Hcsmdjs_-6XHM-JJ8WR5RrUxrhnAVJnS0xa_mbRfKkOoKwYGzYGFlvl7Cx_a2MHqSBUdmeKRDIFXPrqx4GZ_U_uNzqWao1tqHnQBhP-GuRjopkA0FHMXoENKxXKHK4226gf6PSA1tUyC8DrOejYoQvLHoibQNcPKOBSLlBsRGYEfBAGVucnpszrT0iRaLLsfsLU8T3lc881s-VetEXqy8mnyQbjfVBcv-E63gcrx5bcxHUf4Q92ShVAM3O5DEajzBYB9sMNLfUs0IdlSK0d651jqS-h0e3ThpLTOyFfDIIDzSWjlZ48jEm_ZiYORNimYquFof6wNIgg8Lu4Vr9i2-Q3kwXp7pPX7kM09Ln5BstogiXSzY7-xN5oCU1XjAq0tzs9m06dWUtBlYIvj-UvKnbcmCHoq3aouGM3WDLU8V6VL4j6ZOqMvgKawm6J_1T2VVFVRVtSUfdlPu8aXpR4r7fFf2u52WZ7ArUTKqrJ6nrVqR-GT0Fo-j-PchIl9Egru2oPlvCZF1H9sR_jI507d6t9H8AQidVdQ">