patch-gcc_tree-nested_c 742 B

12345678910111213141516171819202122
  1. $OpenBSD: patch-gcc_tree-nested_c,v 1.1 2012/03/31 20:02:03 pascal Exp $
  2. --- gcc/tree-nested.c.orig Sat Nov 27 16:53:23 2010
  3. +++ gcc/tree-nested.c Mon Mar 12 08:44:07 2012
  4. @@ -1907,6 +1907,17 @@ convert_tramp_reference_op (tree *tp, int *walk_subtre
  5. if (TREE_NO_TRAMPOLINE (t))
  6. break;
  7. + if (!flag_trampolines)
  8. + {
  9. + error ("trampoline code generation is not allowed without -ftrampolines");
  10. + return NULL_TREE;
  11. + }
  12. + if (warn_trampolines)
  13. + {
  14. + warning (OPT_Wtrampolines,
  15. + "local function address taken needing trampoline generation");
  16. + }
  17. +
  18. /* Lookup the immediate parent of the callee, as that's where
  19. we need to insert the trampoline. */
  20. for (i = info; i->context != target_context; i = i->outer)