Commit 50e60bc3 by Zack Weinberg Committed by Zack Weinberg

c-common.h: Prototype min_precision and c_build_qualified_type here...

	* c-common.h: Prototype min_precision and c_build_qualified_type here...
	* c-tree.h: ... not here.
	* errors.h: Prototype fancy_abort.

	* emit-rtl.c (gen_lowpart_common): Move variable 'c' into
	HOST_BITS_PER_WIDE_INT == 64 ifdef block.
	* regrename.c (regrename_optimize): Make control flow explicit.
	(replace_reg_in_block): Initialize reg_use to 0.

	* i386.c (legitimate_address_p): Rename error label to
	report_error to avoid namespace clash.

cp:
	* cp-tree.h: Don't prototype min_precision here.
	(my_friendly_assert): Cast expression to void.
	* semantics.c (do_poplevel): Initialize scope_stmts.

f:
	* expr.c (ffeexpr_finished_): Cast signed side of ?:
	expression to bool.

java:
	* class.c (build_dtable_decl): Initialize dummy.

intl:
	* dcgettext.c (find_msg): Initialize act before loop.
	(guess_category_value): Add dummy uses of both parameters.
	* localealias.c (read_alias_file): Cast arg of strchr to char *.

From-SVN: r35427
parent 3f954fc3
2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
* c-common.h: Prototype min_precision and c_build_qualified_type here...
* c-tree.h: ... not here.
* errors.h: Prototype fancy_abort.
* emit-rtl.c (gen_lowpart_common): Move variable 'c' into
HOST_BITS_PER_WIDE_INT == 64 ifdef block.
* regrename.c (regrename_optimize): Make control flow explicit.
(replace_reg_in_block): Initialize reg_use to 0.
* i386.c (legitimate_address_p): Rename error label to
report_error to avoid namespace clash.
2000-08-02 Kazu Hirata <kazu@hxi.com> 2000-08-02 Kazu Hirata <kazu@hxi.com>
* fold-const.c: Fix formatting. * fold-const.c: Fix formatting.
......
...@@ -260,6 +260,11 @@ extern tree truthvalue_conversion PARAMS ((tree)); ...@@ -260,6 +260,11 @@ extern tree truthvalue_conversion PARAMS ((tree));
extern tree type_for_mode PARAMS ((enum machine_mode, int)); extern tree type_for_mode PARAMS ((enum machine_mode, int));
extern tree type_for_size PARAMS ((unsigned, int)); extern tree type_for_size PARAMS ((unsigned, int));
extern unsigned int min_precision PARAMS ((tree, int));
/* Add qualifiers to a type, in the fashion for C. */
extern tree c_build_qualified_type PARAMS ((tree, int));
/* Build tree nodes and builtin functions common to both C and C++ language /* Build tree nodes and builtin functions common to both C and C++ language
frontends. */ frontends. */
extern void c_common_nodes_and_builtins PARAMS ((int, int, int)); extern void c_common_nodes_and_builtins PARAMS ((int, int, int));
......
...@@ -151,16 +151,12 @@ extern void c_parse_init PARAMS ((void)); ...@@ -151,16 +151,12 @@ extern void c_parse_init PARAMS ((void));
/* in c-aux-info.c */ /* in c-aux-info.c */
extern void gen_aux_info_record PARAMS ((tree, int, int, int)); extern void gen_aux_info_record PARAMS ((tree, int, int, int));
/* In c-common.c */
extern unsigned int min_precision PARAMS ((tree, int));
/* in c-convert.c */ /* in c-convert.c */
extern tree convert PARAMS ((tree, tree)); extern tree convert PARAMS ((tree, tree));
/* in c-decl.c */ /* in c-decl.c */
extern tree build_enumerator PARAMS ((tree, tree)); extern tree build_enumerator PARAMS ((tree, tree));
/* Add qualifiers to a type, in the fashion for C. */
extern tree c_build_qualified_type PARAMS ((tree, int));
#define c_build_type_variant(TYPE, CONST_P, VOLATILE_P) \ #define c_build_type_variant(TYPE, CONST_P, VOLATILE_P) \
c_build_qualified_type (TYPE, \ c_build_qualified_type (TYPE, \
((CONST_P) ? TYPE_QUAL_CONST : 0) | \ ((CONST_P) ? TYPE_QUAL_CONST : 0) | \
......
...@@ -2396,7 +2396,7 @@ legitimate_address_p (mode, addr, strict) ...@@ -2396,7 +2396,7 @@ legitimate_address_p (mode, addr, strict)
if (! ix86_decompose_address (addr, &parts)) if (! ix86_decompose_address (addr, &parts))
{ {
reason = "decomposition failed"; reason = "decomposition failed";
goto error; goto report_error;
} }
base = parts.base; base = parts.base;
...@@ -2417,20 +2417,20 @@ legitimate_address_p (mode, addr, strict) ...@@ -2417,20 +2417,20 @@ legitimate_address_p (mode, addr, strict)
if (GET_CODE (base) != REG) if (GET_CODE (base) != REG)
{ {
reason = "base is not a register"; reason = "base is not a register";
goto error; goto report_error;
} }
if (GET_MODE (base) != Pmode) if (GET_MODE (base) != Pmode)
{ {
reason = "base is not in Pmode"; reason = "base is not in Pmode";
goto error; goto report_error;
} }
if ((strict && ! REG_OK_FOR_BASE_STRICT_P (base)) if ((strict && ! REG_OK_FOR_BASE_STRICT_P (base))
|| (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (base))) || (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (base)))
{ {
reason = "base is not valid"; reason = "base is not valid";
goto error; goto report_error;
} }
} }
...@@ -2447,20 +2447,20 @@ legitimate_address_p (mode, addr, strict) ...@@ -2447,20 +2447,20 @@ legitimate_address_p (mode, addr, strict)
if (GET_CODE (index) != REG) if (GET_CODE (index) != REG)
{ {
reason = "index is not a register"; reason = "index is not a register";
goto error; goto report_error;
} }
if (GET_MODE (index) != Pmode) if (GET_MODE (index) != Pmode)
{ {
reason = "index is not in Pmode"; reason = "index is not in Pmode";
goto error; goto report_error;
} }
if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (index)) if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (index))
|| (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (index))) || (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (index)))
{ {
reason = "index is not valid"; reason = "index is not valid";
goto error; goto report_error;
} }
} }
...@@ -2471,13 +2471,13 @@ legitimate_address_p (mode, addr, strict) ...@@ -2471,13 +2471,13 @@ legitimate_address_p (mode, addr, strict)
if (!index) if (!index)
{ {
reason = "scale without index"; reason = "scale without index";
goto error; goto report_error;
} }
if (scale != 2 && scale != 4 && scale != 8) if (scale != 2 && scale != 4 && scale != 8)
{ {
reason = "scale is not a valid multiplier"; reason = "scale is not a valid multiplier";
goto error; goto report_error;
} }
} }
...@@ -2489,13 +2489,13 @@ legitimate_address_p (mode, addr, strict) ...@@ -2489,13 +2489,13 @@ legitimate_address_p (mode, addr, strict)
if (!CONSTANT_ADDRESS_P (disp)) if (!CONSTANT_ADDRESS_P (disp))
{ {
reason = "displacement is not constant"; reason = "displacement is not constant";
goto error; goto report_error;
} }
if (GET_CODE (disp) == CONST_DOUBLE) if (GET_CODE (disp) == CONST_DOUBLE)
{ {
reason = "displacement is a const_double"; reason = "displacement is a const_double";
goto error; goto report_error;
} }
if (flag_pic && SYMBOLIC_CONST (disp)) if (flag_pic && SYMBOLIC_CONST (disp))
...@@ -2503,7 +2503,7 @@ legitimate_address_p (mode, addr, strict) ...@@ -2503,7 +2503,7 @@ legitimate_address_p (mode, addr, strict)
if (! legitimate_pic_address_disp_p (disp)) if (! legitimate_pic_address_disp_p (disp))
{ {
reason = "displacement is an invalid pic construct"; reason = "displacement is an invalid pic construct";
goto error; goto report_error;
} }
/* This code used to verify that a symbolic pic displacement /* This code used to verify that a symbolic pic displacement
...@@ -2519,7 +2519,7 @@ legitimate_address_p (mode, addr, strict) ...@@ -2519,7 +2519,7 @@ legitimate_address_p (mode, addr, strict)
return *(&a+i); return *(&a+i);
} }
This code nonsential, but results in addressing This code is nonsensical, but results in addressing
GOT table with pic_offset_table_rtx base. We can't GOT table with pic_offset_table_rtx base. We can't
just refuse it easilly, since it gets matched by just refuse it easilly, since it gets matched by
"addsi3" pattern, that later gets split to lea in the "addsi3" pattern, that later gets split to lea in the
...@@ -2534,7 +2534,7 @@ legitimate_address_p (mode, addr, strict) ...@@ -2534,7 +2534,7 @@ legitimate_address_p (mode, addr, strict)
|| (base != NULL_RTX || index != NULL_RTX)) || (base != NULL_RTX || index != NULL_RTX))
{ {
reason = "displacement is an invalid half-pic reference"; reason = "displacement is an invalid half-pic reference";
goto error; goto report_error;
} }
} }
} }
...@@ -2544,7 +2544,7 @@ legitimate_address_p (mode, addr, strict) ...@@ -2544,7 +2544,7 @@ legitimate_address_p (mode, addr, strict)
fprintf (stderr, "Success.\n"); fprintf (stderr, "Success.\n");
return TRUE; return TRUE;
error: report_error:
if (TARGET_DEBUG_ADDR) if (TARGET_DEBUG_ADDR)
{ {
fprintf (stderr, "Error: %s\n", reason); fprintf (stderr, "Error: %s\n", reason);
......
2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
* cp-tree.h: Don't prototype min_precision here.
(my_friendly_assert): Cast expression to void.
* semantics.c (do_poplevel): Initialize scope_stmts.
2000-08-02 Mark Mitchell <mark@codesourcery.com> 2000-08-02 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_NEEDED_P): Tweak. * cp-tree.h (DECL_NEEDED_P): Tweak.
......
...@@ -3246,7 +3246,6 @@ extern tree convert_and_check PARAMS ((tree, tree)); ...@@ -3246,7 +3246,6 @@ extern tree convert_and_check PARAMS ((tree, tree));
extern void overflow_warning PARAMS ((tree)); extern void overflow_warning PARAMS ((tree));
extern void unsigned_conversion_warning PARAMS ((tree, tree)); extern void unsigned_conversion_warning PARAMS ((tree, tree));
extern void c_apply_type_quals_to_decl PARAMS ((int, tree)); extern void c_apply_type_quals_to_decl PARAMS ((int, tree));
extern unsigned int min_precision PARAMS ((tree, int));
/* Read the rest of the current #-directive line. */ /* Read the rest of the current #-directive line. */
#if USE_CPPLIB #if USE_CPPLIB
...@@ -4628,7 +4627,7 @@ extern void friendly_abort PARAMS ((int, const char *, ...@@ -4628,7 +4627,7 @@ extern void friendly_abort PARAMS ((int, const char *,
#define my_friendly_abort(N) \ #define my_friendly_abort(N) \
friendly_abort (N, __FILE__, __LINE__, __FUNCTION__) friendly_abort (N, __FILE__, __LINE__, __FUNCTION__)
#define my_friendly_assert(EXP, N) \ #define my_friendly_assert(EXP, N) (void) \
(((EXP) == 0) ? (friendly_abort (N, __FILE__, __LINE__, __FUNCTION__), 0) : 0) (((EXP) == 0) ? (friendly_abort (N, __FILE__, __LINE__, __FUNCTION__), 0) : 0)
extern tree store_init_value PARAMS ((tree, tree)); extern tree store_init_value PARAMS ((tree, tree));
......
...@@ -140,7 +140,7 @@ do_poplevel () ...@@ -140,7 +140,7 @@ do_poplevel ()
if (stmts_are_full_exprs_p ()) if (stmts_are_full_exprs_p ())
{ {
tree scope_stmts; tree scope_stmts = NULL_TREE;
if (!processing_template_decl) if (!processing_template_decl)
scope_stmts = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); scope_stmts = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0);
......
...@@ -931,7 +931,6 @@ gen_lowpart_common (mode, x) ...@@ -931,7 +931,6 @@ gen_lowpart_common (mode, x)
REAL_VALUE_TYPE r; REAL_VALUE_TYPE r;
long i[4]; /* Only the low 32 bits of each 'long' are used. */ long i[4]; /* Only the low 32 bits of each 'long' are used. */
int endian = WORDS_BIG_ENDIAN ? 1 : 0; int endian = WORDS_BIG_ENDIAN ? 1 : 0;
int c;
REAL_VALUE_FROM_CONST_DOUBLE (r, x); REAL_VALUE_FROM_CONST_DOUBLE (r, x);
switch (GET_MODE (x)) switch (GET_MODE (x))
...@@ -959,16 +958,20 @@ gen_lowpart_common (mode, x) ...@@ -959,16 +958,20 @@ gen_lowpart_common (mode, x)
#if HOST_BITS_PER_WIDE_INT == 32 #if HOST_BITS_PER_WIDE_INT == 32
return immed_double_const (i[endian], i[1-endian], mode); return immed_double_const (i[endian], i[1-endian], mode);
#else #else
if (HOST_BITS_PER_WIDE_INT != 64) {
abort(); int c;
for (c = 0; c < 4; c++)
i[c] &= 0xffffffffL; if (HOST_BITS_PER_WIDE_INT != 64)
abort();
for (c = 0; c < 4; c++)
i[c] &= 0xffffffffL;
return immed_double_const (i[endian*3] | return immed_double_const (i[endian*3] |
(((HOST_WIDE_INT) i[1+endian]) << 32), (((HOST_WIDE_INT) i[1+endian]) << 32),
i[2-endian] | i[2-endian] |
(((HOST_WIDE_INT) i[3-endian*3]) << 32), (((HOST_WIDE_INT) i[3-endian*3]) << 32),
mode); mode);
}
#endif #endif
} }
#endif /* ifndef REAL_ARITHMETIC */ #endif /* ifndef REAL_ARITHMETIC */
......
...@@ -29,6 +29,8 @@ extern void warning PARAMS ((const char *format, ...)) ATTRIBUTE_PRINTF_1; ...@@ -29,6 +29,8 @@ extern void warning PARAMS ((const char *format, ...)) ATTRIBUTE_PRINTF_1;
extern void error PARAMS ((const char *format, ...)) ATTRIBUTE_PRINTF_1; extern void error PARAMS ((const char *format, ...)) ATTRIBUTE_PRINTF_1;
extern void fatal PARAMS ((const char *format, ...)) extern void fatal PARAMS ((const char *format, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void fancy_abort PARAMS ((const char *file, int line, const char *func))
ATTRIBUTE_NORETURN;
extern int have_error; extern int have_error;
extern const char *progname; extern const char *progname;
......
2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
* expr.c (ffeexpr_finished_): Cast signed side of ?:
expression to bool.
2000-07-31 Zack Weinberg <zack@wolery.cumb.org> 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
* lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
......
...@@ -13162,7 +13162,7 @@ again: /* :::::::::::::::::::: */ ...@@ -13162,7 +13162,7 @@ again: /* :::::::::::::::::::: */
error = (expr == NULL) error = (expr == NULL)
|| ((ffeinfo_rank (info) != 0) ? || ((ffeinfo_rank (info) != 0) ?
ffe_is_pedantic () /* F77 C5. */ ffe_is_pedantic () /* F77 C5. */
: (ffeinfo_kindtype (info) != ffecom_label_kind ())) : (bool) (ffeinfo_kindtype (info) != ffecom_label_kind ()))
|| (ffebld_op (expr) != FFEBLD_opSYMTER); || (ffebld_op (expr) != FFEBLD_opSYMTER);
break; break;
......
2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
* dcgettext.c (find_msg): Initialize act before loop.
(guess_category_value): Add dummy uses of both parameters.
* localealias.c (read_alias_file): Cast arg of strchr to char *.
2000-06-06 Philipp Thomas <pthomas@suse.de> 2000-06-06 Philipp Thomas <pthomas@suse.de>
* Makefile.in: Add -DIN_GCC to DEFS, add appropriate -I switches. * Makefile.in: Add -DIN_GCC to DEFS, add appropriate -I switches.
* dcgettext.c: Define _GNU_SOURCE before any system header is * dcgettext.c: Define _GNU_SOURCE before any system header is
included. Guard getcwd declaration with HAVE_DECL_GETCWD. included. Guard getcwd declaration with HAVE_DECL_GETCWD.
......
...@@ -455,6 +455,7 @@ find_msg (domain_file, msgid) ...@@ -455,6 +455,7 @@ find_msg (domain_file, msgid)
/* Now we try the default method: binary search in the sorted /* Now we try the default method: binary search in the sorted
array of messages. */ array of messages. */
bottom = 0; bottom = 0;
act = 0;
top = domain->nstrings; top = domain->nstrings;
while (bottom < top) while (bottom < top)
{ {
...@@ -547,6 +548,8 @@ guess_category_value (category, categoryname) ...@@ -547,6 +548,8 @@ guess_category_value (category, categoryname)
const char *categoryname; const char *categoryname;
{ {
const char *retval; const char *retval;
(void) category; /* shut up compiler */
(void) categoryname; /* ditto */
/* The highest priority value is the `LANGUAGE' environment /* The highest priority value is the `LANGUAGE' environment
variable. This is a GNU extension. */ variable. This is a GNU extension. */
......
...@@ -257,7 +257,7 @@ read_alias_file (fname, fname_len) ...@@ -257,7 +257,7 @@ read_alias_file (fname, fname_len)
/* Possibly not the whole line fits into the buffer. Ignore /* Possibly not the whole line fits into the buffer. Ignore
the rest of the line. */ the rest of the line. */
if (strchr (buf, '\n') == NULL) if (strchr ((char *)buf, '\n') == NULL)
{ {
char altbuf[BUFSIZ]; char altbuf[BUFSIZ];
do do
......
2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
* class.c (build_dtable_decl): Initialize dummy.
2000-07-27 Tom Tromey <tromey@cygnus.com> 2000-07-27 Tom Tromey <tromey@cygnus.com>
Anthony Green <green@cygnus.com> Anthony Green <green@cygnus.com>
Alexandre Petit-Bianco <apbianco@cygnus.com> Alexandre Petit-Bianco <apbianco@cygnus.com>
......
...@@ -1698,7 +1698,7 @@ build_dtable_decl (type) ...@@ -1698,7 +1698,7 @@ build_dtable_decl (type)
TYPE. */ TYPE. */
if (current_class == type) if (current_class == type)
{ {
tree dummy, aomt, n; tree dummy = NULL_TREE, aomt, n;
dtype = make_node (RECORD_TYPE); dtype = make_node (RECORD_TYPE);
PUSH_FIELD (dtype, dummy, "class", class_ptr_type); PUSH_FIELD (dtype, dummy, "class", class_ptr_type);
......
...@@ -347,32 +347,26 @@ regrename_optimize () ...@@ -347,32 +347,26 @@ regrename_optimize ()
if (consider_available (reg_use, avail_reg, if (consider_available (reg_use, avail_reg,
&avail_regs, rc, &du, &avail_regs, rc, &du,
def_idx[def])) def_idx[def]))
break; goto found_avail_reg;
} }
if (ar_idx == FIRST_PSEUDO_REGISTER) if (rtl_dump_file)
{ {
if (rtl_dump_file) fprintf (rtl_dump_file, "Register %s in class %s",
{ reg_names[r], reg_class_names[rc]);
fprintf (rtl_dump_file, fprintf (rtl_dump_file, " in insn %d",
"Register %s in class %s", INSN_UID (VARRAY_RTX (uid_ruid,
reg_names[r], reg_class_names[rc]); def_idx[def])));
fprintf (rtl_dump_file,
" in insn %d",
INSN_UID (VARRAY_RTX (uid_ruid,
def_idx[def])));
if (TEST_BIT (du.require_call_save_reg,
def_idx[def]))
fprintf (rtl_dump_file, " crosses a call");
fprintf (rtl_dump_file, if (TEST_BIT (du.require_call_save_reg,
". No available registers\n"); def_idx[def]))
} fprintf (rtl_dump_file, " crosses a call");
goto try_next_def; fprintf (rtl_dump_file, ". No available registers\n");
} }
goto try_next_def;
found_avail_reg:
SET_HARD_REG_BIT (renamed_regs, avail_reg); SET_HARD_REG_BIT (renamed_regs, avail_reg);
CLEAR_HARD_REG_BIT (avail_regs, avail_reg); CLEAR_HARD_REG_BIT (avail_regs, avail_reg);
...@@ -530,7 +524,7 @@ replace_reg_in_block (du, uid_ruid, def, reg_def, avail_reg) ...@@ -530,7 +524,7 @@ replace_reg_in_block (du, uid_ruid, def, reg_def, avail_reg)
unsigned int r = REGNO (reg_def); unsigned int r = REGNO (reg_def);
rtx death_note; rtx death_note;
rtx reg_notes; rtx reg_notes;
rtx reg_use; rtx reg_use = 0;
rtx new_reg = gen_rtx_REG (GET_MODE (reg_def), avail_reg); rtx new_reg = gen_rtx_REG (GET_MODE (reg_def), avail_reg);
rr_replace_reg (PATTERN (VARRAY_RTX (*uid_ruid, def)), reg_def, new_reg, rr_replace_reg (PATTERN (VARRAY_RTX (*uid_ruid, def)), reg_def, new_reg,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment