diff options
author | Martin Sebor <msebor@redhat.com> | 2015-11-10 02:23:34 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2015-11-09 19:23:34 -0700 |
commit | 685c8340ff7b5cfef7bf41c3b5e0d79ad7f7a37b (patch) | |
tree | 2e5bacc1d2b331365198e4be6156f26598c36370 /gcc/tree-vect-data-refs.c | |
parent | 36fa0f5f6875c49560c15dbeaed2b3c95c26687a (diff) | |
download | gcc-685c8340ff7b5cfef7bf41c3b5e0d79ad7f7a37b.zip gcc-685c8340ff7b5cfef7bf41c3b5e0d79ad7f7a37b.tar.gz gcc-685c8340ff7b5cfef7bf41c3b5e0d79ad7f7a37b.tar.bz2 |
PR c++/67913 - new expression with negative size not diagnosed
PR c++/67913 - new expression with negative size not diagnosed
PR c++/67927 - array new expression with excessive number of elements
not diagnosed
gcc/cp/
* call.c (build_operator_new_call): Do not assume size_check
is non-null, analogously to the top half of the function.
* init.c (build_new_1): Detect and diagnose array sizes in
excess of the maximum of roughly SIZE_MAX / 2.
Insert a runtime check only for arrays with a non-constant size.
(build_new): Detect and diagnose negative array sizes.
gcc/testsuite/
* init/new45.C: New test to verify that operator new is invoked
with or without overhead for a cookie.
* init/new44.C: New test for placement new expressions for arrays
with excessive number of elements.
* init/new43.C: New test for placement new expressions for arrays
with negative number of elements.
* other/new-size-type.C: Expect array new expression with
an excessive number of elements to be rejected.
From-SVN: r230081
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
0 files changed, 0 insertions, 0 deletions