aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/cp/init.c
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2016-01-14 14:08:29 -0500
committerThan McIntosh <thanm@google.com>2016-01-14 15:04:35 -0500
commitf1c3ad6cac0465017759cce0cb381ce66760d907 (patch)
treec6ce0987896c065c8422660cbf7fa19667595f69 /gcc-4.9/gcc/cp/init.c
parent9d871e98c80898042fb8cfd20a58feadae1ba60c (diff)
downloadtoolchain_gcc-f1c3ad6cac0465017759cce0cb381ce66760d907.tar.gz
toolchain_gcc-f1c3ad6cac0465017759cce0cb381ce66760d907.tar.bz2
toolchain_gcc-f1c3ad6cac0465017759cce0cb381ce66760d907.zip
Fix toolchain/gcc build for mingw.
Theses changes are intended to restore the ability to build toolchain/gcc cross compiler for non-Android targets (in this specific case, to allow us to compile toolchain/gcc as part of the mingw-w64 build). What has happened over time is that references android-specific synbols and constructs have crept into the non-target-specific portions of the gcc code. I've done my best to push these things back into the config/* subtree. Bug: 26523949 Change-Id: I59334e791875632d51093207c298052a034d2f4a
Diffstat (limited to 'gcc-4.9/gcc/cp/init.c')
-rw-r--r--gcc-4.9/gcc/cp/init.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc-4.9/gcc/cp/init.c b/gcc-4.9/gcc/cp/init.c
index 283843ae9..7313f8477 100644
--- a/gcc-4.9/gcc/cp/init.c
+++ b/gcc-4.9/gcc/cp/init.c
@@ -388,7 +388,7 @@ build_value_init_noctor (tree type, tsubst_flags_t complain)
{
gcc_assert (!TYPE_HAS_COMPLEX_DFLT (type)
|| errorcount != 0);
-
+
if (TREE_CODE (type) != UNION_TYPE)
{
tree field;
@@ -1217,7 +1217,7 @@ expand_virtual_init (tree binfo, tree decl)
}
/* Compute the location of the vtpr. */
- vtbl_ptr = build_vfield_ref (cp_build_indirect_ref (decl, RO_NULL,
+ vtbl_ptr = build_vfield_ref (cp_build_indirect_ref (decl, RO_NULL,
tf_warning_or_error),
TREE_TYPE (binfo));
gcc_assert (vtbl_ptr != error_mark_node);
@@ -2586,10 +2586,8 @@ 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. */
- && !TARGET_ANDROID)
+ if (cxx_dialect >= cxx11 && flag_exceptions &&
+ DISABLE_CXA_THROW_BAD_ARRAY_NEW_LENGTH)
errval = throw_bad_array_new_length ();
if (outer_nelts_check != NULL_TREE)
size = fold_build3 (COND_EXPR, sizetype, outer_nelts_check,
@@ -3220,7 +3218,7 @@ build_vec_delete_1 (tree base, tree maxindex, tree type,
"even if they are declared when the class is defined");
}
return build_builtin_delete_call (base);
- }
+ }
size_exp = size_in_bytes (type);
@@ -3381,7 +3379,7 @@ get_temp_regvar (tree type, tree init)
decl = create_temporary_var (type);
add_decl_expr (decl);
- finish_expr_stmt (cp_build_modify_expr (decl, INIT_EXPR, init,
+ finish_expr_stmt (cp_build_modify_expr (decl, INIT_EXPR, init,
tf_warning_or_error));
return decl;
@@ -3770,7 +3768,7 @@ build_vec_init (tree base, tree maxindex, tree init,
from = NULL_TREE;
if (from_array == 2)
- elt_init = cp_build_modify_expr (to, NOP_EXPR, from,
+ elt_init = cp_build_modify_expr (to, NOP_EXPR, from,
complain);
else if (type_build_ctor_call (type))
elt_init = build_aggr_init (to, from, 0, complain);