diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-04-27 14:11:36 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-04-27 14:11:36 +0000 |
commit | a9da8e7bb77c7cb37abe007475a4bfb021c26c94 (patch) | |
tree | 7650376a487e4fe03c56b13665120366d5deae8d /gnu/egcs/gcc/expr.c | |
parent | b76fbb43c872e87ec2d7094cf3b2883d95d49964 (diff) |
Provide -ftrampolines and -Wtrampoline to the gcc 2.95 codebase.
ok espie@
Diffstat (limited to 'gnu/egcs/gcc/expr.c')
-rw-r--r-- | gnu/egcs/gcc/expr.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/expr.c b/gnu/egcs/gcc/expr.c index db562c895d3..7f573d457ba 100644 --- a/gnu/egcs/gcc/expr.c +++ b/gnu/egcs/gcc/expr.c @@ -5562,6 +5562,8 @@ check_max_integer_computation_mode (exp) } } #endif +extern int flag_trampolines; +extern int warn_trampolines; /* expand_expr: generate code for computing expression EXP. @@ -8059,6 +8061,15 @@ expand_expr (exp, target, tmode, modifier) && ! DECL_NO_STATIC_CHAIN (TREE_OPERAND (exp, 0)) && ! TREE_STATIC (exp)) { + if (!flag_trampolines) + { + error_with_decl(exp, "trampoline code generation is not allowed without -ftrampolines"); + return const0_rtx; + } + if (warn_trampolines) + { + warning_with_decl(exp, "local function address taken, needing trampoline generation"); + } op0 = trampoline_address (TREE_OPERAND (exp, 0)); op0 = force_operand (op0, target); } |