diff options
author | Ben Cheng <bccheng@google.com> | 2014-04-10 22:09:50 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2014-04-10 22:09:50 -0700 |
commit | 0e9bdbff3ee62cb299d50584bca725b1d22b80cf (patch) | |
tree | 704d55ffd9724da6071a52ab838ff9cc196b2e6a /gcc-4.9 | |
parent | 551fff35cb782423f9641c4b3c2b0183f38c9bb3 (diff) | |
download | toolchain_gcc-0e9bdbff3ee62cb299d50584bca725b1d22b80cf.tar.gz toolchain_gcc-0e9bdbff3ee62cb299d50584bca725b1d22b80cf.tar.bz2 toolchain_gcc-0e9bdbff3ee62cb299d50584bca725b1d22b80cf.zip |
[4.9] Temporarily disable __cxa_throw_bad_array_new_length
Hack can be removed when it is supported by NDK.
Change-Id: I043bb12580442fae48298a51d045b73f9cb568d3
Diffstat (limited to 'gcc-4.9')
-rw-r--r-- | gcc-4.9/gcc/cp/call.c | 3 | ||||
-rw-r--r-- | gcc-4.9/gcc/cp/init.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc-4.9/gcc/cp/call.c b/gcc-4.9/gcc/cp/call.c index 877f6d9cf..9a0e3b5a1 100644 --- a/gcc-4.9/gcc/cp/call.c +++ b/gcc-4.9/gcc/cp/call.c @@ -4008,7 +4008,8 @@ build_operator_new_call (tree fnname, vec<tree, va_gc> **args, if (size_check != NULL_TREE) { tree errval = TYPE_MAX_VALUE (sizetype); - if (cxx_dialect >= cxx11 && flag_exceptions) + /* ANDROID - temporarily disable __cxa_throw_bad_array_new_length call. */ + if (cxx_dialect >= cxx11 && flag_exceptions && 0) errval = throw_bad_array_new_length (); *size = fold_build3 (COND_EXPR, sizetype, size_check, original_size, errval); diff --git a/gcc-4.9/gcc/cp/init.c b/gcc-4.9/gcc/cp/init.c index 2e1cddef4..a2549575a 100644 --- a/gcc-4.9/gcc/cp/init.c +++ b/gcc-4.9/gcc/cp/init.c @@ -2552,7 +2552,9 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts, } /* Perform the overflow check. */ tree errval = TYPE_MAX_VALUE (sizetype); - if (cxx_dialect >= cxx11 && flag_exceptions) + /* ANDROID - temporarily disable __cxa_throw_bad_array_new_length + call. */ + if (cxx_dialect >= cxx11 && flag_exceptions && 0) errval = throw_bad_array_new_length (); if (outer_nelts_check != NULL_TREE) size = fold_build3 (COND_EXPR, sizetype, outer_nelts_check, |