diff options
-rw-r--r-- | gcc/ChangeLog | 32 | ||||
-rw-r--r-- | gcc/c-lang.c | 2 | ||||
-rw-r--r-- | gcc/langhooks-def.h | 2 | ||||
-rw-r--r-- | gcc/langhooks.h | 5 | ||||
-rw-r--r-- | gcc/objc/objc-lang.c | 2 | ||||
-rw-r--r-- | gcc/stmt.c | 3 |
6 files changed, 35 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca2a881..96b0efd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2003-06-25 Zack Weinberg <zack@codesourcery.com> + + PR 10178 + * langhooks.h (struct lang_hooks): Add no_body_blocks bool. + * langhooks-def.h (LANG_HOOKS_NO_BODY_BLOCKS): New; default false. + * c-lang.c, objc/objc-lang.c: Override LANG_HOOKS_NO_BODY_BLOCKS + to true. + * stmt.c (is_body_block): If lang_hooks.no_body_blocks, always + return 0. + 2003-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Makefile.in (bt-load.o): Depend on $(TM_P_H). @@ -87,18 +97,18 @@ Wed Jun 25 11:31:59 CEST 2003 Jan Hubicka <jh@suse.cz> Back out these patches: 2003-06-02 J"orn Rennecke <joern.rennecke@superh.com> - * sh.h (OLD_ARG_MODE): New macro. - (FUNCTION_ARG_ADVANCE, FUNCTION_ARG_PASS_BY_REFERENCE): Use it. - (FUNCTION_ARG_1): Break out of: - (FUNCTION_ARG). Use OLD_ARG_MODE. + * sh.h (OLD_ARG_MODE): New macro. + (FUNCTION_ARG_ADVANCE, FUNCTION_ARG_PASS_BY_REFERENCE): Use it. + (FUNCTION_ARG_1): Break out of: + (FUNCTION_ARG). Use OLD_ARG_MODE. 2003-06-06 J"orn Rennecke <joern.rennecke@superh.com> - * sh.h (FUNCTION_ARG_1): Consistently use NEW_MODE for the mode - of the generated register. + * sh.h (FUNCTION_ARG_1): Consistently use NEW_MODE for the mode + of the generated register. * sh.h (FUNCTION_ARG_SCmode_WART): Define. (FUNCTION_ARG): Unless FUNCTION_ARG_SCmode_WART is defined and an even number of floating point regs are in use, use the same - sequence of argument passing registers for SCmode as would be + sequence of argument passing registers for SCmode as would be used for two SFmode values. * sh.c (sh_va_arg): If FUNCTION_ARG_SCmode_WART is defined, swap real / imaginary parts in incoming SCmode values passed @@ -106,8 +116,8 @@ Wed Jun 25 11:31:59 CEST 2003 Jan Hubicka <jh@suse.cz> 2003-06-24 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> - PR target/11260 - * config/alpha/alpha.md (sqrtdf2): Fix operand substitution. + PR target/11260 + * config/alpha/alpha.md (sqrtdf2): Fix operand substitution. Tue Jun 24 18:49:33 CEST 2003 Jan Hubicka <jh@suse.cz> @@ -167,7 +177,7 @@ Mon Jun 23 23:07:35 CEST 2003 Jan Hubicka <jh@suse.cz> * cgraphunit.c (cgraph_finalize_function): Collect entry points here instead of in cgraph_finalize_compilation_unit; constructors and destructors are entry points. - (cgraph_finalize_compilation_unit): Reorganize debug outout; + (cgraph_finalize_compilation_unit): Reorganize debug outout; examine nested functions after lowerng; call collect_functions hook. (cgraph_mark_local_functions): DECL_COMDAT functions are not local. (cgraph_finalize_compilation_unit): Do not collect entry points. @@ -237,7 +247,7 @@ Mon Jun 23 23:07:35 CEST 2003 Jan Hubicka <jh@suse.cz> * sched-deps.c: Likewise. 2003-06-23 Roger Sayle <roger@eyesopen.com> - Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> + Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/contrib.texi (Contributors): Add a note on testing and remove duplicates from testers list. diff --git a/gcc/c-lang.c b/gcc/c-lang.c index 1b4a4ea..6d8c89a 100644 --- a/gcc/c-lang.c +++ b/gcc/c-lang.c @@ -67,6 +67,8 @@ static int c_init_options (void); #define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval #undef LANG_HOOKS_STATICP #define LANG_HOOKS_STATICP c_staticp +#undef LANG_HOOKS_NO_BODY_BLOCKS +#define LANG_HOOKS_NO_BODY_BLOCKS true #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl #undef LANG_HOOKS_PRINT_IDENTIFIER diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h index 12e4f9b..e6fa38e 100644 --- a/gcc/langhooks-def.h +++ b/gcc/langhooks-def.h @@ -107,6 +107,7 @@ void write_global_declarations PARAMS ((void)); #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME lhd_set_decl_assembler_name #define LANG_HOOKS_CAN_USE_BIT_FIELDS_P lhd_can_use_bit_fields_p #define LANG_HOOKS_HONOR_READONLY false +#define LANG_HOOKS_NO_BODY_BLOCKS false #define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing #define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing #define LANG_HOOKS_PRINT_DECL lhd_print_tree_nothing @@ -266,6 +267,7 @@ int lhd_tree_dump_type_quals PARAMS ((tree)); LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, \ LANG_HOOKS_CAN_USE_BIT_FIELDS_P, \ LANG_HOOKS_HONOR_READONLY, \ + LANG_HOOKS_NO_BODY_BLOCKS, \ LANG_HOOKS_PRINT_STATISTICS, \ LANG_HOOKS_PRINT_XNODE, \ LANG_HOOKS_PRINT_DECL, \ diff --git a/gcc/langhooks.h b/gcc/langhooks.h index 089fc4e..a23db42 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -328,6 +328,11 @@ struct lang_hooks /* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored. */ bool honor_readonly; + /* Nonzero if this front end does not generate a dummy BLOCK between + the outermost scope of the function and the FUNCTION_DECL. See + is_body_block in stmt.c, and its callers. */ + bool no_body_blocks; + /* The front end can add its own statistics to -fmem-report with this hook. It should output to stderr. */ void (*print_statistics) PARAMS ((void)); diff --git a/gcc/objc/objc-lang.c b/gcc/objc/objc-lang.c index 2002840..7d76b6b 100644 --- a/gcc/objc/objc-lang.c +++ b/gcc/objc/objc-lang.c @@ -65,6 +65,8 @@ static int objc_init_options PARAMS ((void)); #define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval #undef LANG_HOOKS_STATICP #define LANG_HOOKS_STATICP c_staticp +#undef LANG_HOOKS_NO_BODY_BLOCKS +#define LANG_HOOKS_NO_BODY_BLOCKS true #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl #undef LANG_HOOKS_PRINT_IDENTIFIER @@ -3511,6 +3511,9 @@ int is_body_block (stmt) tree stmt; { + if (lang_hooks.no_body_blocks) + return 0; + if (TREE_CODE (stmt) == BLOCK) { tree parent = BLOCK_SUPERCONTEXT (stmt); |