<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:zhongyunde@tom.com" title="Allen zhong <zhongyunde@tom.com>"> <span class="fn">Allen zhong</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Missing optimization for member function with const attribute"
href="https://bugs.llvm.org/show_bug.cgi?id=50735">bug 50735</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>INVALID
</td>
<td>---
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Missing optimization for member function with const attribute"
href="https://bugs.llvm.org/show_bug.cgi?id=50735#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Missing optimization for member function with const attribute"
href="https://bugs.llvm.org/show_bug.cgi?id=50735">bug 50735</a>
from <span class="vcard"><a class="email" href="mailto:zhongyunde@tom.com" title="Allen zhong <zhongyunde@tom.com>"> <span class="fn">Allen zhong</span></a>
</span></b>
<pre>I reopen it as it is undefined behavior, see detail in the link
<a href="https://isocpp.org/wiki/faq/const-correctness#mutable-data-members">https://isocpp.org/wiki/faq/const-correctness#mutable-data-members</a>
Please don't write saying version X of compiler Y on machine Z lets you change
a non-mutable member of a const object. I don’t care - it is illegal according
to the language and your code will probably fail on a different compiler or
even a different version (an upgrade) of the same compiler. Just say no. Use
mutable instead. Write code that is guaranteed to work, not code that doesn't
seem to break</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>