Re: [C++ Patch] PR 29185

2012-05-23 Thread Gabriel Dos Reis
On Wed, May 23, 2012 at 5:24 AM, Paolo Carlini wrote: > On 05/23/2012 04:54 AM, Gabriel Dos Reis wrote: >> >> On Tue, May 22, 2012 at 8:25 PM, Paolo Carlini >>  wrote: >>> >>> Hi, >>> >>> some years ago Martin lamented that we weren't consistently warning about >>> deleting member arrays vs arrays

Re: [C++ Patch] PR 29185

2012-05-23 Thread Jason Merrill
OK. We shouldn't need to worry about null type, since templates are handled at the top of the function. Jason

Re: [C++ Patch] PR 29185

2012-05-23 Thread Paolo Carlini
On 05/23/2012 06:34 AM, Jason Merrill wrote: On 05/22/2012 09:25 PM, Paolo Carlini wrote: some years ago Martin lamented that we weren't consistently warning about deleting member arrays vs arrays. I wonder why we look at the code of exp at all. Surely deleting any expression with array type

Re: [C++ Patch] PR 29185

2012-05-23 Thread Paolo Carlini
On 05/23/2012 04:54 AM, Gabriel Dos Reis wrote: On Tue, May 22, 2012 at 8:25 PM, Paolo Carlini wrote: Hi, some years ago Martin lamented that we weren't consistently warning about deleting member arrays vs arrays. A fix seems simple and passes bootstrap and testing on x86_64-linux. Note I have

Re: [C++ Patch] PR 29185

2012-05-22 Thread Jason Merrill
On 05/22/2012 09:25 PM, Paolo Carlini wrote: some years ago Martin lamented that we weren't consistently warning about deleting member arrays vs arrays. I wonder why we look at the code of exp at all. Surely deleting any expression with array type is questionable. Jason

Re: [C++ Patch] PR 29185

2012-05-22 Thread Gabriel Dos Reis
On Tue, May 22, 2012 at 8:25 PM, Paolo Carlini wrote: > Hi, > > some years ago Martin lamented that we weren't consistently warning about > deleting member arrays vs arrays. A fix seems simple and passes bootstrap > and testing on x86_64-linux. Note I have to change D to E because dump_decl > cann

[C++ Patch] PR 29185

2012-05-22 Thread Paolo Carlini
Hi, some years ago Martin lamented that we weren't consistently warning about deleting member arrays vs arrays. A fix seems simple and passes bootstrap and testing on x86_64-linux. Note I have to change D to E because dump_decl cannot cope with COMPONENT_REFs. Thanks, Paolo. ///