Re: C++ PATCH for c++/91548 - fix detecting modifying const objects for ARRAY_REF

2019-10-29 Thread Jason Merrill
On 10/23/19 2:10 PM, Marek Polacek wrote: This fixes a bogus "modifying a const object" error for an array that actually isn't declared const. The problem was how I handled ARRAY_REFs here; we shouldn't look at the ARRAY_REF itself, but at the array its accessing. Bootstrapped/regtested on x86_

C++ PATCH for c++/91548 - fix detecting modifying const objects for ARRAY_REF

2019-10-23 Thread Marek Polacek
This fixes a bogus "modifying a const object" error for an array that actually isn't declared const. The problem was how I handled ARRAY_REFs here; we shouldn't look at the ARRAY_REF itself, but at the array its accessing. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-10-23 Marek P