This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Update references to C++ working paper


On Tue, 8 Apr 2003 16:17:38 +0100, Jonathan Wakely <cow at compsoc dot man dot ac dot uk> wrote:

>  @item -fcheck-new
>  @opindex fcheck-new
>  Check that the pointer returned by @code{operator new} is non-null
> -before attempting to modify the storage allocated.  The current Working
> -Paper requires that @code{operator new} never return a null pointer, so
> +before attempting to modify the storage allocated.  The ISO standard
> +requires that @code{operator new} never return a null pointer, so
>  this check is normally unnecessary.

Actually, the standard makes an exception for operator new functions which
are declared throw(), so the compiler checks the return value on such
functions even without -fcheck-new.  Would you mind adding a note about
that?

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]