[Bug c++/19351] operator new[] can return heap blocks which are too small
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Jan 9 23:12:00 GMT 2005
------- 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
More information about the Gcc-bugs
mailing list