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]

Re: Patch broke bootstrap on i386.


Richard Henderson wrote:
> 
> On Thu, Jun 19, 2003 at 11:45:51AM +0100, Joern Rennecke wrote:
> > What was already dodgy was the unprotected use of FILE (rtl.h
> > guards this with #ifdef BUFSIZ), but as this doesn't appear to cause
> > acute brokenness right now, we can leave that for later.
> 
> <stdio.h> is included by system.h; any remaining BUFSIZ guards
> are trash.
> 
> What we've done so far wrt hooks and enums is to not use enums,
> and uses int instead.

I see that this is done for rtx_cost, but the comment there sounds more
apologetic than a design decision.  And it's not consistently, either:

bash-2.05$ grep enum target.h
    void (* select_rtx_section) PARAMS ((enum machine_mode, rtx,
                                  enum machine_mode mode, int ignore));
  enum reg_class (* branch_target_register_class) PARAMS ((void));
  bool (* valid_pointer_mode) PARAMS ((enum machine_mode mode));

bash-2.05$ grep default_expand_builtin *.h
expr.h:extern rtx default_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
target-def.h:#define TARGET_EXPAND_BUILTIN default_expand_builtin
bash-2.05$ grep default_select_rtx_section *.h
output.h:extern void default_select_rtx_section PARAMS ((enum machine_mode, rtx,
target-def.h:#define TARGET_ASM_SELECT_RTX_SECTION default_select_rtx_section
bash-2.05$ grep default_valid_pointer_mode *.h
output.h:extern bool default_valid_pointer_mode PARAMS ((enum machine_mode));
target-def.h:#define TARGET_VALID_POINTER_MODE default_valid_pointer_mode

bash-2.05$ grep enum langhooks.h
  tree (*make_type) PARAMS ((enum tree_code));
  tree (*type_for_mode) PARAMS ((enum machine_mode, int));
  size_t (*tree_size) PARAMS ((enum tree_code));
  /* Handle the switch CODE, which has real type enum opt_code from
     Fourth argument is actually an enum expand_modifier.  */
  rtx (*expand_expr) PARAMS ((tree, rtx, enum machine_mode, int));


Should we place type-dependent hook declarations in related header files
rather than collect them in hooks.h?

-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]