[PATCH] Make `outer_function_chain' external
Waldek Hebisch
hebisch@math.uni.wroc.pl
Sun Nov 23 16:12:00 GMT 2003
I propose the following patch. The patch is needed to link GNU Pascal.
GNU Pascal need to iterate over all functions containing current function.
If there is a significant reason to keep `outer_function_chain' local
to `function.c' Pascal may just duplicate need bookkeeping, however
making `outer_function_chain' looks much cleaner.
I have bootstraped gcc-3.3.2 and gcc-3.4-20031015 (the latest snapshot where
I am able to build Ada) witch the patch on i386-linux (Debian Woody on Athlon
XP). I ran the testsuite and I saw no new failures.
Authors of the patch: Waldek Hebisch and Frank Heckenbach
If OK please apply, I have no CVS write access.
ChangeLog:
* function.c and function.h: make `outer_function_chain' external
diff -ru gcc-3.3.2.orig/gcc/function.c gcc-3.3.2/gcc/function.c
--- gcc-3.3.2.orig/gcc/function.c Thu Nov 20 16:00:45 2003
+++ gcc-3.3.2/gcc/function.c Thu Nov 20 16:35:17 2003
@@ -294,7 +294,7 @@
static void instantiate_virtual_regs_lossage PARAMS ((rtx));
/* Pointer to chain of `struct function' for containing functions. */
-static GTY(()) struct function *outer_function_chain;
+struct function *outer_function_chain;
/* Given a function decl for a containing function,
return the `struct function' for it. */
diff -ru gcc-3.3.2.orig/gcc/function.h gcc-3.3.2/gcc/function.h
--- gcc-3.3.2.orig/gcc/function.h Thu Nov 20 16:00:45 2003
+++ gcc-3.3.2/gcc/function.h Thu Nov 20 16:35:17 2003
@@ -513,6 +513,9 @@
/* The function currently being compiled. */
extern GTY(()) struct function *cfun;
+/* Pointer to chain of `struct function' for containing functions. */
+extern GTY(()) struct function *outer_function_chain;
+
/* Nonzero if we've already converted virtual regs to hard regs. */
extern int virtuals_instantiated;
--
Waldek Hebisch
hebisch@math.uni.wroc.pl
More information about the Gcc-patches
mailing list