On 08/16/2017 08:44 AM, Jonathan Wakely wrote:
> On 16 August 2017 at 15:40, Jonathan Wakely wrote:
>> On 16 August 2017 at 15:27, Oleg Endo wrote:
>>> On Wed, 2017-08-16 at 13:30 +0200, Paolo Carlini wrote:
I didn't understand why we don't already handle the easy case:
constexp
On 16 August 2017 at 15:40, Jonathan Wakely wrote:
> On 16 August 2017 at 15:27, Oleg Endo wrote:
>> On Wed, 2017-08-16 at 13:30 +0200, Paolo Carlini wrote:
>>>
>>> I didn't understand why we don't already handle the easy case:
>>>
>>> constexpr int* ptr = nullptr;
>>> delete ptr;
>>>
>>
>> What ab
On 16 August 2017 at 15:27, Oleg Endo wrote:
> On Wed, 2017-08-16 at 13:30 +0200, Paolo Carlini wrote:
>>
>> I didn't understand why we don't already handle the easy case:
>>
>> constexpr int* ptr = nullptr;
>> delete ptr;
>>
>
> What about overriding the global delete operator with some user defin
On Wed, 2017-08-16 at 13:30 +0200, Paolo Carlini wrote:
>
> I didn't understand why we don't already handle the easy case:
>
> constexpr int* ptr = nullptr;
> delete ptr;
>
What about overriding the global delete operator with some user defined
implementation? Is there something in the C++ sta
Hi,
On 16/08/2017 12:09, Daniel Langr wrote:
When compiling the following code:
int* ptr = nullptr;
delete ptr;
I didn't understand why we don't already handle the easy case:
constexpr int* ptr = nullptr;
delete ptr;
and the below tiny front-end tweak would take care of it. But I'm not
sure
On Wed, Aug 16, 2017 at 12:09 PM, Daniel Langr wrote:
> When compiling the following code:
>
> int* ptr = nullptr;
> delete ptr;
>
> GCC 7.1 on x86_64 generates a delete-operator-related call instruction in
> the resulting program with both -O2 and -O3 optimization flags. This is a
> nonsense piec
When compiling the following code:
int* ptr = nullptr;
delete ptr;
GCC 7.1 on x86_64 generates a delete-operator-related call instruction in the
resulting program with both -O2 and -O3 optimization flags. This is a nonsense
piece of code, indeed, but imagine a class that has an owning raw poin