From: Joe Buck <jbuck@synopsys.com>
To: Craig Rodrigues <rodrigc@attbi.com>
Cc: gcc@gcc.gnu.org
Subject: Re: 3.2.2 c++ compile problems
Date: Mon, 23 Dec 2002 13:02:00 -0000 [thread overview]
Message-ID: <20021223115552.A31822@synopsys.com> (raw)
In-Reply-To: <20021223132908.A8107@attbi.com>; from rodrigc@attbi.com on Mon, Dec 23, 2002 at 01:29:08PM -0500
On Mon, Dec 23, 2002 at 01:29:08PM -0500, Craig Rodrigues wrote:
> g++ 3.x conforms quite closely to Standard C++, so understanding
> this standard will help you fix these types of problems.
>
> See the attached patch.
Craig, your patch seems to assume that the compiler will always be GCC:
you test for GCC 3, and otherwise explicitly declare new and delete
in the global namespace (which is correct only for GCC 2).
> #include <stddef.h> // use size_t
>
> +#if __GNUC__ >= 3
> +#include <new>
> +using namespace std;
> +#else
> void *operator new(size_t size);
> void operator delete(void *p);
>
> void *operator new[](size_t size);
> void operator delete[](void *p);
> +#endif
This should probably be reversed, making GCC 2 the nonstandard
environment to test for.
next prev parent reply other threads:[~2002-12-23 19:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-23 9:53 Jack Howarth
2002-12-23 10:11 ` Craig Rodrigues
2002-12-23 10:50 ` Jack Howarth
2002-12-23 11:24 ` Gabriel Dos Reis
2002-12-23 11:56 ` Craig Rodrigues
2002-12-23 13:02 ` Joe Buck [this message]
2002-12-23 13:02 ` Craig Rodrigues
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=20021223115552.A31822@synopsys.com \
--to=jbuck@synopsys.com \
--cc=gcc@gcc.gnu.org \
--cc=rodrigc@attbi.com \
/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).