This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] init.c/build_new wrongly implements new-expression
On May 25, 1999, Gabriel Dos_Reis <Gabriel.Dos_Reis@sophia.inria.fr> wrote:
> Checking whether the new-expression ends up by allocating sufficient
> memory is part of the semantics of new-expression.
The problem is that determining how much is `sufficient' overflows ==>
undefined behavior, reboot the universe. Concerned programs have to
prevent the overflow before it is ever calculated, and cannot rely on
new-expressions doing that for them, because that's now what they're
supposed to do.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists