This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch broke bootstrap on i386.
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Nathanael Nerode <neroden at twcny dot rr dot com>, gcc at gcc dot gnu dot org, stephen dot clarke at st dot com, Andrew Pinski <pinskia at physics dot uc dot edu>, gcc-patches at gcc dot gnu dot org, jsm28 at cam dot ac dot uk, Kazu Hirata <kazu at cs dot umass dot edu>, Richard dot Earnshaw at arm dot com
- Date: Thu, 19 Jun 2003 19:09:14 +0100
- Subject: Re: Patch broke bootstrap on i386.
- Organization: SuperH UK Ltd.
- References: <20030618233059.GA4794@doctormoo> <3EF1945F.DE7731CE@superh.com> <20030619165101.GD7120@redhat.com>
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