[Bug c++/19476] Missed null checking elimination with new

2013-10-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476 Bug 19476 depends on bug 20318, which changed state. Bug 20318 Summary: RFE: add attribute to specify that a function never returns NULL http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20318 What|Removed |Added

[Bug c++/19476] Missed null checking elimination with new

2013-10-03 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476 --- Comment #18 from Marc Glisse glisse at gcc dot gnu.org --- Author: glisse Date: Thu Oct 3 23:48:18 2013 New Revision: 203194 URL: http://gcc.gnu.org/viewcvs?rev=203194root=gccview=rev Log: 2013-10-04 Marc Glisse marc.gli...@inria.fr

[Bug c++/19476] Missed null checking elimination with new

2013-10-03 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476 Marc Glisse glisse at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug c++/19476] Missed null checking elimination with new

2013-10-03 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476 --- Comment #17 from Marc Glisse glisse at gcc dot gnu.org --- Author: glisse Date: Thu Oct 3 16:13:54 2013 New Revision: 203163 URL: http://gcc.gnu.org/viewcvs?rev=203163root=gccview=rev Log: 2013-10-03 Marc Glisse marc.gli...@inria.fr

[Bug c++/19476] Missed null checking elimination with new

2013-09-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476 --- Comment #15 from Marc Glisse glisse at gcc dot gnu.org --- I posted a patch: http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00676.html However, note that it only optimizes the testcase from this PR if we add #include new at the beginning,

[Bug c++/19476] Missed null checking elimination with new

2013-09-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476 --- Comment #16 from Marc Glisse glisse at gcc dot gnu.org --- (In reply to Marc Glisse from comment #15) However, note that it only optimizes the testcase from this PR if we add #include new at the beginning, otherwise the implicit declaration

[Bug c++/19476] Missed null checking elimination with new

2013-09-06 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476 --- Comment #13 from Marc Glisse glisse at gcc dot gnu.org --- Without adding an attribute, can we identify those operator new that may not return 0? Is DECL_IS_OPERATOR_NEW !TREE_NOTHROW good enough, or completely wrong? I am basing this on: If

[Bug c++/19476] Missed null checking elimination with new

2013-09-06 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added CC|gcc-bugs at gcc dot gnu.org|

[Bug c++/19476] Missed null checking elimination with new

2008-04-10 Thread ian at airs dot com
--- Comment #12 from ian at airs dot com 2008-04-10 23:33 --- Note that bug 35878, which was closed as a duplicate of this one, was a case of placement new. For placement new the check for a NULL pointer is particularly useless, as the language standard says that placement new is

[Bug c++/19476] Missed null checking elimination with new

2008-04-08 Thread pinskia at gcc dot gnu dot org
--- Comment #11 from pinskia at gcc dot gnu dot org 2008-04-08 21:40 --- *** Bug 35878 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/19476] Missed null checking elimination with new

2006-01-09 Thread pinskia at gcc dot gnu dot org
--- Comment #10 from pinskia at gcc dot gnu dot org 2006-01-09 18:33 --- No longer working on this, I am too busy working on the gfortran front-end. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/19476] Missed null checking elimination with new

2005-11-12 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2005-11-12 20:05 --- This is an easy extension on top of PR 20318. Mine. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/19476] Missed null checking elimination with new

2005-11-12 Thread sabre at nondot dot org
--- Comment #5 from sabre at nondot dot org 2005-11-13 01:24 --- Is this safe? People can define their own operator new's, some of which may return null... -Chris -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476

[Bug c++/19476] Missed null checking elimination with new

2005-11-12 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2005-11-13 02:10 --- (In reply to comment #5) Is this safe? People can define their own operator new's, some of which may return null... Yes because the normal operator new guarante not to return NULL by the C++ standard. And if it

[Bug c++/19476] Missed null checking elimination with new

2005-11-12 Thread sabre at nondot dot org
--- Comment #7 from sabre at nondot dot org 2005-11-13 02:13 --- Yes because the normal operator new guarante not to return NULL by the C++ standard. Sure. And if it returns a NULL that is undefined behavior, it should be throwing an exception when memory could not be allocated

[Bug c++/19476] Missed null checking elimination with new

2005-11-12 Thread pinskia at gcc dot gnu dot org
--- Comment #8 from pinskia at gcc dot gnu dot org 2005-11-13 02:24 --- (In reply to comment #7) From 3.7.3/3: Any allocation and/or deallocation functions defined in a C++ program shall conform to the sematics specified in 3.7.3.1 and 3.7.3.2. --- --

[Bug c++/19476] Missed null checking elimination with new

2005-11-12 Thread sabre at nondot dot org
--- Comment #9 from sabre at nondot dot org 2005-11-13 02:51 --- yup, you're right. Great! -Chris -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476

[Bug c++/19476] Missed null checking elimination with new

2005-03-04 Thread dnovillo at gcc dot gnu dot org
-- What|Removed |Added AssignedTo|unassigned at gcc dot gnu |dnovillo at gcc dot gnu dot |dot org |org Status|NEW

[Bug c++/19476] Missed null checking elimination with new

2005-01-19 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-20 06:29 --- Diego raised some questions about this around the same time I filed it so confirmed. -- What|Removed |Added

[Bug c++/19476] Missed null checking elimination with new

2005-01-17 Thread steven at gcc dot gnu dot org
--- Additional Comments From steven at gcc dot gnu dot org 2005-01-17 08:37 --- Is this a regression? -- What|Removed |Added CC|

[Bug c++/19476] Missed null checking elimination with new

2005-01-17 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-17 15:30 --- (In reply to comment #1) Is this a regression? Not that I know of. -- What|Removed |Added