This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Op di 08-07-2003, om 06:00 schreef Jim Wilson: > On Fri, 2003-07-04 at 03:00, Steven Bosscher wrote: > > const union tree_node *b1 = (const union tree_node *) v1; > > == > > const tree b1 = (const tree) v1; > > They aren't the same. Nn one case the const applies to the pointer, and > in the other it applies to the union. > > > I always get very nervous when I see so many casts, consts and > > asteriskes on a single line. I suppose I could just leave this code > > as-is. OK then? > > Yes. The patch was approved in its K&R form, so here's what I have just commited. Gr. Steven
Attachment:
ChangeLog.entry
Description: Text document
Index: emit-rtl.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v retrieving revision 1.342 diff -c -3 -p -r1.342 emit-rtl.c *** emit-rtl.c 9 Jul 2003 00:18:19 -0000 1.342 --- emit-rtl.c 10 Jul 2003 09:47:27 -0000 *************** int split_branch_probability = -1; *** 206,212 **** static hashval_t const_int_htab_hash (const void *x) { ! return (hashval_t) INTVAL ((struct rtx_def *) x); } /* Returns nonzero if the value represented by X (which is really a --- 206,212 ---- static hashval_t const_int_htab_hash (const void *x) { ! return (hashval_t) INTVAL ((rtx) x); } /* Returns nonzero if the value represented by X (which is really a Index: ggc.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/ggc.h,v retrieving revision 1.54 diff -c -3 -p -r1.54 ggc.h *** ggc.h 6 Jul 2003 06:15:35 -0000 1.54 --- ggc.h 10 Jul 2003 09:47:28 -0000 *************** extern void *ggc_realloc (void *, size_t *** 197,210 **** extern void *ggc_calloc (size_t, size_t); #define ggc_alloc_rtx(NSLOTS) \ ! ((struct rtx_def *) ggc_alloc (sizeof (struct rtx_def) \ ! + ((NSLOTS) - 1) * sizeof (rtunion))) #define ggc_alloc_rtvec(NELT) \ ! ((struct rtvec_def *) ggc_alloc (sizeof (struct rtvec_def) \ ! + ((NELT) - 1) * sizeof (rtx))) ! #define ggc_alloc_tree(LENGTH) ((union tree_node *) ggc_alloc (LENGTH)) #define htab_create_ggc(SIZE, HASH, EQ, DEL) \ htab_create_alloc (SIZE, HASH, EQ, DEL, ggc_calloc, NULL) --- 197,210 ---- extern void *ggc_calloc (size_t, size_t); #define ggc_alloc_rtx(NSLOTS) \ ! ((rtx) ggc_alloc (sizeof (struct rtx_def) \ ! + ((NSLOTS) - 1) * sizeof (rtunion))) #define ggc_alloc_rtvec(NELT) \ ! ((rtvec) ggc_alloc (sizeof (struct rtvec_def) \ ! + ((NELT) - 1) * sizeof (rtx))) ! #define ggc_alloc_tree(LENGTH) ((tree) ggc_alloc (LENGTH)) #define htab_create_ggc(SIZE, HASH, EQ, DEL) \ htab_create_alloc (SIZE, HASH, EQ, DEL, ggc_calloc, NULL) Index: integrate.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/integrate.h,v retrieving revision 1.27 diff -c -3 -p -r1.27 integrate.h *** integrate.h 6 Jul 2003 06:15:35 -0000 1.27 --- integrate.h 10 Jul 2003 09:47:30 -0000 *************** struct inline_remap *** 40,46 **** copy_rtx_and_substitute. */ int integrating; /* Definition of function be inlined. */ ! union tree_node *fndecl; /* Place to put insns needed at start of function. */ rtx insns_at_start; /* Mapping from old BLOCKs to new BLOCKs. */ --- 40,46 ---- copy_rtx_and_substitute. */ int integrating; /* Definition of function be inlined. */ ! tree fndecl; /* Place to put insns needed at start of function. */ rtx insns_at_start; /* Mapping from old BLOCKs to new BLOCKs. */ *************** extern void allocate_initial_values (rtx *** 150,163 **** /* Copy a declaration when one function is substituted inline into another. */ ! extern union tree_node *copy_decl_for_inlining (union tree_node *, ! union tree_node *, ! union tree_node *); /* Check whether there's any attribute in a function declaration that makes the function uninlinable. Returns false if it finds any, true otherwise. */ ! extern bool function_attribute_inlinable_p (union tree_node *); extern void try_constants (rtx, struct inline_remap *); --- 150,161 ---- /* Copy a declaration when one function is substituted inline into another. */ ! extern tree copy_decl_for_inlining (tree, tree, tree); /* Check whether there's any attribute in a function declaration that makes the function uninlinable. Returns false if it finds any, true otherwise. */ ! extern bool function_attribute_inlinable_p (tree); extern void try_constants (rtx, struct inline_remap *); Index: langhooks.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/langhooks.h,v retrieving revision 1.65 diff -c -3 -p -r1.65 langhooks.h *** langhooks.h 9 Jul 2003 00:31:13 -0000 1.65 --- langhooks.h 10 Jul 2003 09:47:30 -0000 *************** typedef void (*lang_print_tree_hook) (FI *** 33,68 **** struct lang_hooks_for_tree_inlining { ! union tree_node *(*walk_subtrees) (union tree_node **, int *, ! union tree_node *(*) ! (union tree_node **, int *, void *), ! void *, void *); ! int (*cannot_inline_tree_fn) (union tree_node **); ! int (*disregard_inline_limits) (union tree_node *); ! union tree_node *(*add_pending_fn_decls) (void *, union tree_node *); ! int (*tree_chain_matters_p) (union tree_node *); ! int (*auto_var_in_fn_p) (union tree_node *, union tree_node *); ! union tree_node *(*copy_res_decl_for_inlining) (union tree_node *, ! union tree_node *, ! union tree_node *, ! void *, int *, tree); ! int (*anon_aggr_type_p) (union tree_node *); ! bool (*var_mod_type_p) (union tree_node *); ! int (*start_inlining) (union tree_node *); ! void (*end_inlining) (union tree_node *); ! union tree_node *(*convert_parm_for_inlining) (union tree_node *, ! union tree_node *, ! union tree_node *); ! int (*estimate_num_insns) (union tree_node *); }; struct lang_hooks_for_callgraph { /* Function passed as argument is needed and will be compiled. Lower the representation so the calls are explicit. */ ! void (*lower_function) (union tree_node *); /* Produce RTL for function passed as argument. */ ! void (*expand_function) (union tree_node *); }; /* Lang hooks for management of language-specific data or status --- 33,63 ---- struct lang_hooks_for_tree_inlining { ! tree (*walk_subtrees) (tree *, int *, ! tree (*) (tree *, int *, void *), ! void *, void *); ! int (*cannot_inline_tree_fn) (tree *); ! int (*disregard_inline_limits) (tree); ! tree (*add_pending_fn_decls) (void *, tree); ! int (*tree_chain_matters_p) (tree); ! int (*auto_var_in_fn_p) (tree, tree); ! tree (*copy_res_decl_for_inlining) (tree, tree, tree, ! void *, int *, tree); ! int (*anon_aggr_type_p) (tree); ! bool (*var_mod_type_p) (tree); ! int (*start_inlining) (tree); ! void (*end_inlining) (tree); ! tree (*convert_parm_for_inlining) (tree, tree, tree); ! int (*estimate_num_insns) (tree); }; struct lang_hooks_for_callgraph { /* Function passed as argument is needed and will be compiled. Lower the representation so the calls are explicit. */ ! void (*lower_function) (tree); /* Produce RTL for function passed as argument. */ ! void (*expand_function) (tree); }; /* Lang hooks for management of language-specific data or status Index: output.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/output.h,v retrieving revision 1.129 diff -c -3 -p -r1.129 output.h *** output.h 6 Jul 2003 09:56:04 -0000 1.129 --- output.h 10 Jul 2003 09:47:33 -0000 *************** extern FILE *rtl_dump_file; *** 422,431 **** #endif /* Nonnull if the insn currently being emitted was a COND_EXEC pattern. */ ! extern struct rtx_def *current_insn_predicate; /* Last insn processed by final_scan_insn. */ ! extern struct rtx_def *current_output_insn; /* Nonzero while outputting an `asm' with operands. This means that inconsistencies are the user's fault, so don't abort. --- 422,431 ---- #endif /* Nonnull if the insn currently being emitted was a COND_EXEC pattern. */ ! extern rtx current_insn_predicate; /* Last insn processed by final_scan_insn. */ ! extern rtx current_output_insn; /* Nonzero while outputting an `asm' with operands. This means that inconsistencies are the user's fault, so don't abort. *************** extern unsigned int get_named_section_fl *** 473,497 **** extern bool set_named_section_flags (const char *, unsigned int); extern void named_section_flags (const char *, unsigned int); extern bool named_section_first_declaration (const char *); ! ! union tree_node; ! extern unsigned int default_section_type_flags (union tree_node *, ! const char *, int); ! extern unsigned int default_section_type_flags_1 (union tree_node *, ! const char *, int, int); extern void default_no_named_section (const char *, unsigned int); extern void default_elf_asm_named_section (const char *, unsigned int); extern void default_coff_asm_named_section (const char *, unsigned int); extern void default_pe_asm_named_section (const char *, unsigned int); ! extern void default_stabs_asm_out_destructor (struct rtx_def *, int); ! extern void default_named_section_asm_out_destructor (struct rtx_def *, int); ! extern void default_dtor_section_asm_out_destructor (struct rtx_def *, int); ! extern void default_stabs_asm_out_constructor (struct rtx_def *, int); ! extern void default_named_section_asm_out_constructor (struct rtx_def *, ! int); ! extern void default_ctor_section_asm_out_constructor (struct rtx_def *, int); extern void default_select_section (tree, int, unsigned HOST_WIDE_INT); extern void default_elf_select_section (tree, int, unsigned HOST_WIDE_INT); --- 473,492 ---- extern bool set_named_section_flags (const char *, unsigned int); extern void named_section_flags (const char *, unsigned int); extern bool named_section_first_declaration (const char *); ! extern unsigned int default_section_type_flags (tree, const char *, int); ! extern unsigned int default_section_type_flags_1 (tree, const char *, int, int); extern void default_no_named_section (const char *, unsigned int); extern void default_elf_asm_named_section (const char *, unsigned int); extern void default_coff_asm_named_section (const char *, unsigned int); extern void default_pe_asm_named_section (const char *, unsigned int); ! extern void default_stabs_asm_out_destructor (rtx, int); ! extern void default_named_section_asm_out_destructor (rtx, int); ! extern void default_dtor_section_asm_out_destructor (rtx, int); ! extern void default_stabs_asm_out_constructor (rtx, int); ! extern void default_named_section_asm_out_constructor (rtx, int); ! extern void default_ctor_section_asm_out_constructor (rtx, int); extern void default_select_section (tree, int, unsigned HOST_WIDE_INT); extern void default_elf_select_section (tree, int, unsigned HOST_WIDE_INT); *************** extern void file_end_indicate_exec_stack *** 514,521 **** extern bool default_valid_pointer_mode (enum machine_mode); /* Emit data for vtable gc for GNU binutils. */ ! extern void assemble_vtable_entry (struct rtx_def *, HOST_WIDE_INT); ! extern void assemble_vtable_inherit (struct rtx_def *, struct rtx_def *); extern int default_address_cost (rtx); --- 509,516 ---- extern bool default_valid_pointer_mode (enum machine_mode); /* Emit data for vtable gc for GNU binutils. */ ! extern void assemble_vtable_entry (rtx, HOST_WIDE_INT); ! extern void assemble_vtable_inherit (rtx, rtx); extern int default_address_cost (rtx); Index: print-tree.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/print-tree.c,v retrieving revision 1.74 diff -c -3 -p -r1.74 print-tree.c *** print-tree.c 8 Jul 2003 00:35:42 -0000 1.74 --- print-tree.c 10 Jul 2003 09:47:35 -0000 *************** print_node (FILE *file, const char *pref *** 599,605 **** indent_to (file, indent + 4); fprintf (file, "rtl %d ", i); if (TREE_OPERAND (node, i)) ! print_rtl (file, (struct rtx_def *) TREE_OPERAND (node, i)); else fprintf (file, "(nil)"); fprintf (file, "\n"); --- 599,605 ---- indent_to (file, indent + 4); fprintf (file, "rtl %d ", i); if (TREE_OPERAND (node, i)) ! print_rtl (file, (rtx) TREE_OPERAND (node, i)); else fprintf (file, "(nil)"); fprintf (file, "\n"); Index: real.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/real.h,v retrieving revision 1.70 diff -c -3 -p -r1.70 real.h *** real.h 6 Jul 2003 09:56:05 -0000 1.70 --- real.h 10 Jul 2003 09:47:35 -0000 *************** extern REAL_VALUE_TYPE dconsthalf; *** 333,339 **** /* Function to return a real value (not a tree node) from a given integer constant. */ ! REAL_VALUE_TYPE real_value_from_int_cst (union tree_node *, union tree_node *); /* Given a CONST_DOUBLE in FROM, store into TO the value it represents. */ #define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \ --- 333,339 ---- /* Function to return a real value (not a tree node) from a given integer constant. */ ! REAL_VALUE_TYPE real_value_from_int_cst (tree, tree); /* Given a CONST_DOUBLE in FROM, store into TO the value it represents. */ #define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \ Index: reload1.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/reload1.c,v retrieving revision 1.404 diff -c -3 -p -r1.404 reload1.c *** reload1.c 6 Jul 2003 09:56:07 -0000 1.404 --- reload1.c 10 Jul 2003 09:47:52 -0000 *************** static char *reload_insn_firstobj; *** 281,292 **** examine. */ struct insn_chain *reload_insn_chain; - #ifdef TREE_CODE - extern tree current_function_decl; - #else - extern union tree_node *current_function_decl; - #endif - /* List of all insns needing reloads. */ static struct insn_chain *insns_need_reload; --- 281,286 ---- Index: toplev.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/toplev.h,v retrieving revision 1.106 diff -c -3 -p -r1.106 toplev.h *** toplev.h 6 Jul 2003 14:48:56 -0000 1.106 --- toplev.h 10 Jul 2003 09:47:52 -0000 *************** Software Foundation, 59 Temple Place - S *** 26,44 **** #define skip_leading_substring(whole, part) \ (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) ! extern int toplev_main (unsigned int, const char **); ! extern int read_integral_parameter (const char *, const char *, ! const int); ! extern void strip_off_ending (char *, int); ! extern const char *trim_filename (const char *); ! extern void _fatal_insn_not_found (struct rtx_def *, ! const char *, int, ! const char *) ATTRIBUTE_NORETURN; ! extern void _fatal_insn (const char *, ! struct rtx_def *, ! const char *, int, ! const char *) ATTRIBUTE_NORETURN; #define fatal_insn(msgid, insn) \ --- 26,38 ---- #define skip_leading_substring(whole, part) \ (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) ! extern int toplev_main (unsigned int, const char **); ! extern int read_integral_parameter (const char *, const char *, const int); ! extern void strip_off_ending (char *, int); ! extern const char *trim_filename (const char *); ! extern void _fatal_insn_not_found (rtx, const char *, int, const char *) ATTRIBUTE_NORETURN; ! extern void _fatal_insn (const char *, rtx, const char *, int, const char *) ATTRIBUTE_NORETURN; #define fatal_insn(msgid, insn) \ *************** extern void _fatal_insn (const char *, *** 59,93 **** #else #define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m) #endif ! extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; ! extern void warning (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; ! extern void pedwarn (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! extern void inform (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! ! extern void rest_of_decl_compilation (union tree_node *, ! const char *, int, int); ! extern void rest_of_type_compilation (union tree_node *, int); ! extern void rest_of_compilation (union tree_node *); ! ! extern void pedwarn_with_decl (union tree_node *, ! const char *, ...); ! extern void warning_with_decl (union tree_node *, ! const char *, ...); ! extern void error_with_decl (union tree_node *, ! const char *, ...); ! ! extern void announce_function (union tree_node *); ! ! extern void error_for_asm (struct rtx_def *, ! const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); ! extern void warning_for_asm (struct rtx_def *, ! const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); ! extern void warn_deprecated_use (union tree_node *); #ifdef BUFSIZ extern void output_quoted_string (FILE *, const char *); --- 53,81 ---- #else #define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m) #endif ! extern void internal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; ! extern void warning (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! extern void fatal_error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; ! extern void pedwarn (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! extern void inform (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); ! ! extern void rest_of_decl_compilation (tree, const char *, int, int); ! extern void rest_of_type_compilation (tree, int); ! extern void rest_of_compilation (tree); ! ! extern void pedwarn_with_decl (tree, const char *, ...); ! extern void warning_with_decl (tree, const char *, ...); ! extern void error_with_decl (tree, const char *, ...); ! ! extern void announce_function (tree); ! ! extern void error_for_asm (rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); ! extern void warning_for_asm (rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); ! extern void warn_deprecated_use (tree); #ifdef BUFSIZ extern void output_quoted_string (FILE *, const char *); *************** extern void fnotice (FILE *, const cha *** 101,108 **** ATTRIBUTE_PRINTF_2; #endif ! extern int wrapup_global_declarations (union tree_node **, int); ! extern void check_global_declarations (union tree_node **, int); /* A unique local time stamp, might be zero if none is available. */ extern unsigned local_tick; --- 89,96 ---- ATTRIBUTE_PRINTF_2; #endif ! extern int wrapup_global_declarations (tree *, int); ! extern void check_global_declarations (tree *, int); /* A unique local time stamp, might be zero if none is available. */ extern unsigned local_tick; Index: varray.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/varray.h,v retrieving revision 1.31 diff -c -3 -p -r1.31 varray.h *** varray.h 6 Jul 2003 16:53:23 -0000 1.31 --- varray.h 10 Jul 2003 09:47:52 -0000 *************** struct const_equiv_data GTY(()) { *** 50,56 **** pseudos that contain pointers into the replacement area allocated for this inline instance. These pseudos are then marked as being equivalent to the appropriate address and substituted if valid. */ ! struct rtx_def *rtx; /* Record the valid age for each entry. The entry is invalid if its age is less than const_age. */ --- 50,56 ---- pseudos that contain pointers into the replacement area allocated for this inline instance. These pseudos are then marked as being equivalent to the appropriate address and substituted if valid. */ ! rtx rtx; /* Record the valid age for each entry. The entry is invalid if its age is less than const_age. */ *************** typedef union varray_data_tag GTY (()) { *** 110,120 **** tag ("VARRAY_DATA_GENERIC"))) generic[1]; char *GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_CPTR"))) cptr[1]; ! struct rtx_def *GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_RTX"))) rtx[1]; ! struct rtvec_def *GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_RTVEC"))) rtvec[1]; ! union tree_node *GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_TREE"))) tree[1]; struct bitmap_head_def *GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_BITMAP"))) bitmap[1]; --- 110,120 ---- tag ("VARRAY_DATA_GENERIC"))) generic[1]; char *GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_CPTR"))) cptr[1]; ! rtx GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_RTX"))) rtx[1]; ! rtvec GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_RTVEC"))) rtvec[1]; ! tree GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_TREE"))) tree[1]; struct bitmap_head_def *GTY ((length ("%0.num_elements"), tag ("VARRAY_DATA_BITMAP"))) bitmap[1];
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |