VS 2013 Miscompiles
aaron at aaronballman.com
Wed Nov 6 14:44:01 PST 2013
On Wed, Nov 6, 2013 at 12:32 PM, Alp Toker <alp at nuanti.com> wrote:
> On 06/11/2013 17:09, Aaron Ballman wrote:
>> On Fri, Nov 1, 2013 at 5:41 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
>>> On Fri, Nov 1, 2013 at 4:15 PM, Reid Kleckner <rnk at google.com> wrote:
>>>> Thanks for tackling and reducing this! This was reported in July, and it's
>>>> a shame we didn't report it to them before they went from preview to
>>>> release: http://llvm.org/bugs/show_bug.cgi?id=16606
>>> And from what I can tell, the patch I provided is probably the best
>>> way for us to work around the issue for now; the alternative is to
>>> remove the const version of the method from the base class. The good
>>> news is, this only seems to affect situations involving this
>>> particular pattern, which doesn't appear to be very common in the
>>> source base, so we likely are not hitting other miscompiles.
> Confirmed this resolves the problem, and that no other instances of the
> bug seem present.
> Aaron, I'd go with whichever of the two has more locality. Is removing
> the const version of the method a one-liner?
No, it'd require updating a fair amount of code along with losing some
const-correctness. I think the patch as-stands would be the correct
> I think you can go ahead with this and link to the PR in a comment so it
> doesn't get "tidied".
Thanks for the review (I also confirmed with Reid off-list), and it's
been committed in r194176.
More information about the cfe-commits