Re: [PATCH] Add configure flag for operator new (std::nothrow)

2016-02-22 Thread Jonathan Wakely
On 19/02/16 18:56 -0300, Daniel Gutson wrote: On Mon, Nov 16, 2015 at 3:56 PM, Pedro Alves wrote: On 11/10/2015 01:10 PM, Jonathan Wakely wrote: On 06/11/15 09:59 +, Pedro Alves wrote: On 11/06/2015 01:56 AM, Jonathan Wakely wrote: On 5 November 2015 at 23:31, Daniel

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2016-02-19 Thread Daniel Gutson
On Mon, Nov 16, 2015 at 3:56 PM, Pedro Alves wrote: > On 11/10/2015 01:10 PM, Jonathan Wakely wrote: >> On 06/11/15 09:59 +, Pedro Alves wrote: >>> On 11/06/2015 01:56 AM, Jonathan Wakely wrote: On 5 November 2015 at 23:31, Daniel Gutson >>> > The issue is, as I

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2016-02-19 Thread Daniel Gutson
On Tue, Nov 10, 2015 at 10:10 AM, Jonathan Wakely wrote: > On 06/11/15 09:59 +, Pedro Alves wrote: >> >> On 11/06/2015 01:56 AM, Jonathan Wakely wrote: >>> >>> On 5 November 2015 at 23:31, Daniel Gutson >> >> The issue is, as I understand it, to do the actual work of

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-17 Thread Sebastian Huber
On 05/11/15 16:22, Daniel Gutson wrote: On Wed, Nov 4, 2015 at 3:20 AM, Jonathan Wakely wrote: >On 4 November 2015 at 02:11, Daniel Gutson wrote: >>Since this is a nothrow new, we thought that probably the system >>might not be exceptions-friendly (such as certain

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-16 Thread Pedro Alves
On 11/10/2015 01:10 PM, Jonathan Wakely wrote: > On 06/11/15 09:59 +, Pedro Alves wrote: >> On 11/06/2015 01:56 AM, Jonathan Wakely wrote: >>> On 5 November 2015 at 23:31, Daniel Gutson >> The issue is, as I understand it, to do the actual work of operator new, i.e. allocate memory.

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-10 Thread Jonathan Wakely
On 06/11/15 09:59 +, Pedro Alves wrote: On 11/06/2015 01:56 AM, Jonathan Wakely wrote: On 5 November 2015 at 23:31, Daniel Gutson The issue is, as I understand it, to do the actual work of operator new, i.e. allocate memory. It should force us to copy most of the code of the original

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-06 Thread Pedro Alves
On 11/06/2015 01:56 AM, Jonathan Wakely wrote: > On 5 November 2015 at 23:31, Daniel Gutson >> The issue is, as I understand it, to do the actual work of operator >> new, i.e. allocate memory. It should force >> us to copy most of the code of the original code of operator new, >> which may change

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-05 Thread Jonathan Wakely
On 5 November 2015 at 20:52, Daniel Gutson wrote: > Real use cases: statistics and logging. It's a (one time) callback > reporting that something went wrong, > but not intended to fix things e.g. by attempting to free more memory. Why can't that be done by replacing operator new with a

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-05 Thread Daniel Gutson
On Thu, Nov 5, 2015 at 2:11 PM, Jonathan Wakely wrote: > On 5 November 2015 at 20:52, Daniel Gutson wrote: >> Real use cases: statistics and logging. It's a (one time) callback >> reporting that something went wrong, >> but not intended to fix things e.g. by attempting to

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-05 Thread Jonathan Wakely
On 5 November 2015 at 23:31, Daniel Gutson wrote: > On Thu, Nov 5, 2015 at 2:11 PM, Jonathan Wakely wrote: >> On 5 November 2015 at 20:52, Daniel Gutson wrote: >>> Real use cases: statistics and logging. It's a (one time) callback >>>

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-05 Thread Jonathan Wakely
On 6 November 2015 at 09:02, Daniel Gutson wrote: > > El 5/11/2015 22:56, "Jonathan Wakely" escribió: >> >> On 5 November 2015 at 23:31, Daniel Gutson >> wrote: >> > On Thu, Nov 5, 2015 at 2:11

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-05 Thread Marc Glisse
On Fri, 6 Nov 2015, Jonathan Wakely wrote: On 6 November 2015 at 09:02, Daniel Gutson wrote: El 5/11/2015 22:56, "Jonathan Wakely" escribió: It can just call malloc, and the replacement operator delete can call free. It can

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-05 Thread Daniel Gutson
On Wed, Nov 4, 2015 at 3:20 AM, Jonathan Wakely wrote: > On 4 November 2015 at 02:11, Daniel Gutson wrote: >> Since this is a nothrow new, we thought that probably the system >> might not be exceptions-friendly (such as certain embedded systems), >> so we wanted to provide

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-04 Thread Martin Sebor
I share your concerns, but I'm also sympathetic to the changes that the Taller Technologies team are trying to make, to allow libstdc++ to be more useful in exception-free systems. At the very least the patch to doc/xml/manual/configure.xml must document that this option enables behaviour that

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-04 Thread Marc Glisse
On Tue, 3 Nov 2015, Mike Stump wrote: On Nov 3, 2015, at 1:10 PM, Martin Sebor wrote: The "as if" requirement implies that any observable effects of "the (possibly replaced) ordinary version" must be preserved. The repeated calls to the new handler are among such effects.

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Paolo Carlini
Hi, On 11/03/2015 01:35 PM, Aurelio Remonda wrote: diff --git a/ChangeLog b/ChangeLog index 5b16ca2..a1cd0d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2015-10-30 Aurelio Remonda + + * libstdc++-v3/acinclude.m4: add

[PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Aurelio Remonda
Currently, whenever operator new (std::nothrow) fails to allocate memory, it'll check if there is a new-handler function available. If there is, it'll call the handler and then try to allocate again. Otherwise, it'll return a null pointer. This retrying behavior may not always be desirable. If

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Aurelio Remonda
On Tue, Nov 3, 2015 at 10:26 AM, Paolo Carlini wrote: > Finally, since you are touching acinclude.m4 you should > normally run autoreconf, mention in the ChangeLog the changed regenerated > files and eventually commit those changes too (like the ChangeLog entries, >

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Mike Stump
On Nov 3, 2015, at 1:10 PM, Martin Sebor wrote: > The "as if" requirement implies that any observable effects of > "the (possibly replaced) ordinary version" must be preserved. > The repeated calls to the new handler are among such effects. Unless the standard is fixed to say

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Martin Sebor
Besides violating the requirement of the C++ standard, replacing Could you please point us to the relevant section where this behavior is enforced? We couldn't find it so far. The Required behavior of the nothrow operator new reads: This nothrow version of operator new returns a pointer

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Martin Sebor
On 11/03/2015 05:35 AM, Aurelio Remonda wrote: Currently, whenever operator new (std::nothrow) fails to allocate memory, it'll check if there is a new-handler function available. If there is, it'll call the handler and then try to allocate again. Otherwise, it'll return a null pointer. This

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Daniel Gutson
On Tue, Nov 3, 2015 at 5:25 PM, Martin Sebor wrote: > On 11/03/2015 05:35 AM, Aurelio Remonda wrote: >> >> Currently, whenever operator new (std::nothrow) fails to allocate memory, >> it'll >> check if there is a new-handler function available. If there is, it'll >> call >> the

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Martin Sebor
On 11/03/2015 04:08 PM, Mike Stump wrote: On Nov 3, 2015, at 1:10 PM, Martin Sebor wrote: The "as if" requirement implies that any observable effects of "the (possibly replaced) ordinary version" must be preserved. The repeated calls to the new handler are among such effects.

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Jonathan Wakely
On 4 November 2015 at 01:55, Martin Sebor wrote: > On 11/03/2015 05:35 AM, Aurelio Remonda wrote: >> >> Currently, whenever operator new (std::nothrow) fails to allocate memory, >> it'll >> check if there is a new-handler function available. If there is, it'll >> call >> the handler and then try

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Jonathan Wakely
On 4 November 2015 at 02:11, Daniel Gutson wrote: > Since this is a nothrow new, we thought that probably the system > might not be exceptions-friendly (such as certain embedded systems), > so we wanted to provide the new_handler the ability to do something else > other than trying to allocate

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Jonathan Wakely
On 4 November 2015 at 11:50, Jonathan Wakely wrote: > On 4 November 2015 at 02:11, Daniel Gutson wrote: >> Since this is a nothrow new, we thought that probably the system >> might not be exceptions-friendly (such as certain embedded systems), >> so we wanted to provide the new_handler the ability

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Andreas Schwab
Aurelio Remonda writes: > aurelio-remonda@Remonda-PC:~/gcc/libstdc++-v3$ autoreconf > configure.ac:74: error: Autoconf version 2.65 or higher is required Make sure you have automake 1.11.6. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key

Re: [PATCH] Add configure flag for operator new (std::nothrow)

2015-11-03 Thread Aurelio Remonda
On Tue, Nov 3, 2015 at 10:26 AM, Paolo Carlini wrote: > Hi, > > On 11/03/2015 01:35 PM, Aurelio Remonda wrote: >> >> diff --git a/ChangeLog b/ChangeLog >> index 5b16ca2..a1cd0d3 100644 >> --- a/ChangeLog >> +++ b/ChangeLog >> @@ -1,3 +1,12 @@ >> +2015-10-30 Aurelio