This is the mail archive of the gcc@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: Null pointer check elimination


Gabriel Dos Reis wrote:
"Michael N. Moran" <mike@mnmoran.org> writes:
| void buzz(Abc& b)
| {
| delete &b;
| }
| | void baz()
| {
| Abc& a = * new Abc();


If no memory is available, the new-expression throws an exception so
the dereference never occurs.  Check out C++ manuals.

As a systems programmer (embedded), I frequently use "-fno-exceptions". What behavior can I expect under these circumstances?


-- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144 http://mnmoran.org

"So often times it happens, that we live our lives in chains
 and we never even know we have the key."
The Eagles, "Already Gone"

The Beatles were wrong: 1 & 1 & 1 is 1



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