diff options
author | 2010-05-12 13:35:56 +0000 | |
---|---|---|
committer | 2010-05-12 13:35:56 +0000 | |
commit | 85ccd8df33f6867568fc4872c6036e3f1d180748 (patch) | |
tree | 2688c0b99a74a7aaf08a37ea75a36f026579d7b1 /gnu/gcc | |
parent | options.[ch] will auto-define those. (diff) | |
download | wireguard-openbsd-85ccd8df33f6867568fc4872c6036e3f1d180748.tar.xz wireguard-openbsd-85ccd8df33f6867568fc4872c6036e3f1d180748.zip |
port -ftrampolines/-Wtrampolines support from gcc3.
comments and okay kettenis@
Diffstat (limited to 'gnu/gcc')
-rw-r--r-- | gnu/gcc/gcc/c.opt | 8 | ||||
-rw-r--r-- | gnu/gcc/gcc/tree-nested.c | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gnu/gcc/gcc/c.opt b/gnu/gcc/gcc/c.opt index 2d38a89b336..d76cefb280d 100644 --- a/gnu/gcc/gcc/c.opt +++ b/gnu/gcc/gcc/c.opt @@ -407,6 +407,10 @@ Wtraditional C ObjC Var(warn_traditional) Warn about features not present in traditional C +Wtrampolines +Common Var(warn_trampolines) +Warn when trampolines are emitted + Wtrigraphs C ObjC C++ ObjC++ Warn if trigraphs are encountered that might affect the meaning of the program @@ -708,6 +712,10 @@ fthreadsafe-statics C++ ObjC++ -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics +ftrampolines +Common Var(flag_trampolines) +Allows trampolines + funsigned-bitfields C ObjC C++ ObjC++ When \"signed\" or \"unsigned\" is not given make the bitfield unsigned diff --git a/gnu/gcc/gcc/tree-nested.c b/gnu/gcc/gcc/tree-nested.c index e62c47ae175..1cd9999a296 100644 --- a/gnu/gcc/gcc/tree-nested.c +++ b/gnu/gcc/gcc/tree-nested.c @@ -1622,6 +1622,15 @@ convert_tramp_reference (tree *tp, int *walk_subtrees, void *data) if (DECL_NO_STATIC_CHAIN (decl)) break; + if (!flag_trampolines) + { + error ("trampoline code generation is not allowed without -ftrampolines"); + return NULL_TREE; + } + if (warn_trampolines) + { + warning(0, "local function address taken needing trampoline generation"); + } /* Lookup the immediate parent of the callee, as that's where we need to insert the trampoline. */ for (i = info; i->context != target_context; i = i->outer) |