public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Tim Prince <timothyprince@sbcglobal.net>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: libstdc++/10283: operator new does not return null on some windows systems
Date: Tue, 01 Apr 2003 06:16:00 -0000	[thread overview]
Message-ID: <20030401061601.21050.qmail@sources.redhat.com> (raw)

The following reply was made to PR libstdc++/10283; it has been noted by GNATS.

From: Tim Prince <timothyprince@sbcglobal.net>
To: zerovalintine@hotmail.com, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: libstdc++/10283: operator new does not return null on some windows systems
Date: Mon, 31 Mar 2003 22:13:49 -0800

 On Monday 31 March 2003 20:34, zerovalintine@hotmail.com wrote:
 > #include <cstdlib>
 > int main(){
 > char * s = new char[1024 * 1024 * 512];
 > if(s != 0) delete[] s;
 > std::system("");
 > return(0);}
 
 You may be ignored when you make a post with so many troll-like elements.  
 Believe it or not, gcc doesn't check what OS you're running on or what 
 run-time you're planning to link in when it optimizes code.  If you consider 
 your problem to be specific to mingw, then it's specific to the way mingw 
 implements its interface to the Windows .dll's.  If you consider it to be the 
 code generated by gcc, you'll be able to see it by looking at the generated 
 asm code.
 
 BTW, your example says "Aborted" when run under linux on my laptop.  libc 
 calls kill().  No way does gcc know that your code should be shortcut by 
 calling kill() directly, if that's what you mean by optimizing.  Nor is 
 libstdc++ calling kill() directly.  I'll check Windows later.
 -- 
 Tim Prince


             reply	other threads:[~2003-04-01  6:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-01  6:16 Tim Prince [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-04-01 14:29 bangerth
2003-04-01  4:36 zerovalintine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030401061601.21050.qmail@sources.redhat.com \
    --to=timothyprince@sbcglobal.net \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).