C++ PATCH: Warn on deleting void *

Mark Mitchell mark@codesourcery.com
Fri Apr 30 22:47:00 GMT 1999


Nathan --

  This patch is basically fine.  After you get CVS access set up,
please check it in.  If doing CVS is for some reason impractical, let
me know, off-list.

  Please make the warning messages a bit clearer.  I suggest:

    cp_warning ("`%T' is not a pointer-to-object type", type);

  and

    cp_pedwarn ("operator new should throw an exception, not return NULL");

Use `cp_pedwarn' in place of plain `pedwarn' in the C++ front-end,
just in case we ever figure out something else C++-specific to do with
it, rather than formatting tree-codes.

-- 
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com



More information about the Gcc-patches mailing list