This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19351] operator new[] can return heap blocks which are too small
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jan 2005 23:11:59 -0000
- Subject: [Bug c++/19351] operator new[] can return heap blocks which are too small
- References: <20050109221816.19351.fw@deneb.enyo.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-09 23:11 -------
(In reply to comment #6)
> There's no multiplication in the source code. The multiplication is an
> implementation detail. You can hardly use it to justify the semantics of the
> operation.
Actually the multiplication is not an implementation detail.
The standard says what opator new[] should be passed, just the multiplication is included.
sizeof(int[i]) (well if it was valid C++, it is valid C99) is defined as a multiplication so it is not an
implemenation detail.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19351