<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/77970>77970</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Support Wchanges-meaning?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
enhancement,
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
shafik
</td>
</tr>
</table>
<pre>
Currently given the following C++ code:
```cpp
enum {i=1};
class A {
char arr[i];
enum {i=2}; // IFNDR changes meaning of i
};
struct B {};
struct C {
typedef B B_type;
void B(); // IFNDR changes meaning of B
};
```
gcc diagnoses this code under `-Wchanges-meaning`: https://godbolt.org/z/rY4W5h31n
This IFNDR according to [class.member.lookup p6](https://eel.is/c++draft/class.member.lookup#6)
[gcc used to diagnose this under -fpermissive](https://developers.redhat.com/articles/2023/06/21/new-c-features-gcc-13).
Maybe we should also consider supporting this diagnostic.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMk82OrDYQhZ-m2JRAYDcwLFgM00LKIlkkka6yioxdgHMNRrbpUefpIzc9umQmi0jIGP-c-qpOIbzX00rUQtlBeU3EHmbrWj-LUX9PBqvu7dvuHK3B3HHSN1oxzISjNca-63XCN2AdsA6lVQT8FfIr5B9jlR-P3LZjhdZ9Qag7DfxaQH0F3p0vSCO8x9d44lhAlLNwKJyDstNQxgv4sXUWY4cYAuuB9fhT_8v113h3ncjjQmKNqHZE_QxXn5SO0Qe3y4DdI_iJ7Ln-doZCDPeNFI3YYfdnnH9KJB65Wa2wA_YCrPk_aN0Z7VMBz9qTlKi0mFbryWOYtX_UHvdVkUOo8vTbUz19qkcB_opzCJuPFj1AJqsGa0Jm3QSs_xtY7_64fCtnXqznaL9H_YNZSGmdirTBIpTdw61soWUglxlrv-8bblU0ib38OxaRybQH1sujWZQTY4ifXxWA8SoW7NxGZRdz3j2pGPkj9yP1I-t03Mgt2nt9o_8CUHQjYzdyPnOkZhEyaRdgvXBBS0MRjeWMA-vzKs4LYP1K76lMRxJhd-TTScq04MCa7Mz2s7gPhO-Efra7USiMtyjt6nXE8vu2WRceJYuwT_SgZZaolquGNyKhtqjzMn9pOKuSuc1Vo8a8Ubwa6FIzIaqKClGXknMqX4gnumU5u-RFwYqmLFmVyUJeBjaWJC6DariAS06L0CYz5rZEfxPt_U5tXTd1nhgxkPGP350xWmexSlpoDcAYsDdgTBqxTsBff8D6uFdeE9dGxXTYJw-X3Ggf_I8YQQdD7W9HxvilBXmf7M60n3pQh3kfnl5Epecr3Zz9i2RskQd69OdB_08AAAD__0PCaQo">