From c8a152f6bd7afcd8e84d8e6881e3d2ed434f8466 Mon Sep 17 00:00:00 2001 From: tromey Date: Fri, 16 Nov 2007 00:11:47 +0000 Subject: * tree-ssa-structalias.c (ipa_pta_execute): Rename 'cfun' to 'func'. * tree-parloops.c (create_loop_fn): Use set_cfun. * gengtype.c (open_base_files): Emit #undef cfun. * ipa-struct-reorg.c (do_reorg_1): Use set_cfun. * function.h (cfun): New define. * function.c: Undefine cfun. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130213 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/function.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/function.h') diff --git a/gcc/function.h b/gcc/function.h index 27bde1c3bd0..ff71c9ab516 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -466,6 +466,11 @@ struct function GTY(()) /* The function currently being compiled. */ extern GTY(()) struct function *cfun; +/* In order to ensure that cfun is not set directly, we redefine it so + that it is not an lvalue. Rather than assign to cfun, use + push_cfun or set_cfun. */ +#define cfun (cfun + 0) + /* Pointer to chain of `struct function' for containing functions. */ extern GTY(()) struct function *outer_function_chain; -- cgit v1.2.1