30 lines
918 B
Plaintext
30 lines
918 B
Plaintext
|
$OpenBSD: patch-gcc_tree-nested_c,v 1.1.1.1 2012/04/23 15:56:41 pascal Exp $
|
||
|
--- gcc/tree-nested.c.orig Wed Oct 12 15:08:11 2011
|
||
|
+++ gcc/tree-nested.c Mon Apr 2 21:07:24 2012
|
||
|
@@ -22,6 +22,7 @@
|
||
|
#include "system.h"
|
||
|
#include "coretypes.h"
|
||
|
#include "tm.h"
|
||
|
+#include "diagnostic-core.h"
|
||
|
#include "tree.h"
|
||
|
#include "tm_p.h"
|
||
|
#include "function.h"
|
||
|
@@ -1910,6 +1911,17 @@ convert_tramp_reference_op (tree *tp, int *walk_subtre
|
||
|
/* If we don't want a trampoline, then don't build one. */
|
||
|
if (TREE_NO_TRAMPOLINE (t))
|
||
|
break;
|
||
|
+
|
||
|
+ if (!flag_trampolines)
|
||
|
+ {
|
||
|
+ error ("trampoline code generation is not allowed without -ftrampolines");
|
||
|
+ return NULL_TREE;
|
||
|
+ }
|
||
|
+ if (warn_trampolines)
|
||
|
+ {
|
||
|
+ warning (OPT_Wtrampolines,
|
||
|
+ "local function address taken needing trampoline generation");
|
||
|
+ }
|
||
|
|
||
|
/* Lookup the immediate parent of the callee, as that's where
|
||
|
we need to insert the trampoline. */
|