This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: another set of cross-compile target warning cleanups
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch: another set of cross-compile target warning cleanups
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Tue, 23 Oct 2001 16:22:36 -0400 (EDT)
Here's another set of warning cleanups for various targets. The patch
zaps the following unique warnings found in cross-compiles from
sparc-sun-solaris2.7:
< collect2.c:1761: warning: `is_in_list' defined but not used
< config/convex/convex.c:642: warning: int format, different type arg (arg 3)
< config/convex/convex.c:644: warning: int format, different type arg (arg 3)
< config/convex/convex.c:97: warning: int format, different type arg (arg 3)
< config/darwin.c:1072: warning: assignment discards qualifiers from pointer target type
< config/darwin.c:1103: warning: assignment discards qualifiers from pointer target type
< config/darwin.c:1129: warning: implicit declaration of function `mod_init_section'
< config/darwin.c:1131: warning: implicit declaration of function `constructor_section'
< config/darwin.c:1145: warning: implicit declaration of function `mod_term_section'
< config/darwin.c:1147: warning: implicit declaration of function `destructor_section'
< config/dsp16xx/dsp16xx.c:1367: warning: function declaration isn't a prototype
< config/dsp16xx/dsp16xx.c:1373: warning: function declaration isn't a prototype
< config/dsp16xx/dsp16xx.c:1410: warning: non-static declaration for `dsp16xx_output_function_prologue' follows static
< config/dsp16xx/dsp16xx.c:1428: warning: int format, long unsigned int arg (arg 3)
< config/dsp16xx/dsp16xx.c:1428: warning: int format, long unsigned int arg (arg 4)
< config/dsp16xx/dsp16xx.c:1428: warning: int format, long unsigned int arg (arg 7)
< config/dsp16xx/dsp16xx.c:1432: warning: int format, long int arg (arg 3)
< config/dsp16xx/dsp16xx.c:1432: warning: int format, long unsigned int arg (arg 4)
< config/dsp16xx/dsp16xx.c:1452: warning: int format, long unsigned int arg (arg 4)
< config/dsp16xx/dsp16xx.c:1484: warning: int format, long int arg (arg 4)
< config/dsp16xx/dsp16xx.c:1520: warning: non-static declaration for `dsp16xx_output_function_epilogue' follows static
< config/dsp16xx/dsp16xx.c:1539: warning: int format, long unsigned int arg (arg 4)
< config/dsp16xx/dsp16xx.c:1569: warning: int format, long unsigned int arg (arg 4)
< config/dsp16xx/dsp16xx.c:2192: warning: function declaration isn't a prototype
< config/dsp16xx/dsp16xx.c:2481: warning: zero-length format string
< config/dsp16xx/dsp16xx.c:2613: warning: function declaration isn't a prototype
< config/dsp16xx/dsp16xx.c:499: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:596: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:602: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:608: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:615: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:621: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:627: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:633: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:639: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:645: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:651: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:657: warning: comparison of unsigned expression >= 0 is always true
< config/dsp16xx/dsp16xx.c:663: warning: comparison of unsigned expression >= 0 is always true
< config/fr30/fr30.h:621:1: warning: this is the location of the previous definition
< config/sh/sh.c:5651: warning: unused parameter `link'
< cp/method.c:432: warning: int format, different type arg (arg 3)
< cse.c:880: warning: implicit declaration of function `num_1600_core_shifts'
< dbxout.c:2198: warning: implicit declaration of function `get_frame_size'
< dbxout.c:2212: warning: function `get_frame_size' was previously declared within a block
< dbxout.c:2221: warning: function `get_frame_size' was previously declared within a block
< dbxout.c:2455: warning: function `get_frame_size' was previously declared within a block
< dbxout.c:2636: warning: function `get_frame_size' was previously declared within a block
< dbxout.c:2830: warning: `dbxout_begin_function' defined but not used
< dbxout.c:382: warning: `dbxout_function_end' defined but not used
< dbxout.c:593: warning: `dbxout_source_line' defined but not used
< dwarf2out.c:499: warning: int format, long unsigned int arg (arg 4)
< dwarf2out.c:6927: warning: int format, long unsigned int arg (arg 4)
< dwarf2out.c:7027: warning: int format, long unsigned int arg (arg 4)
< dwarf2out.c:7101: warning: int format, long unsigned int arg (arg 4)
< except.c:1901: warning: comparison of unsigned expression >= 0 is always true
< except.c:2904: warning: comparison of unsigned expression >= 0 is always true
< explow.c:502: warning: comparison of unsigned expression >= 0 is always true
< explow.c:513: warning: comparison of unsigned expression >= 0 is always true
< flow.c:971: warning: comparison of unsigned expression >= 0 is always true
< insn-emit.c:1023: warning: comparison of unsigned expression >= 0 is always true
< insn-emit.c:4616: warning: comparison of unsigned expression >= 0 is always true
< insn-emit.c:4651: warning: comparison of unsigned expression >= 0 is always true
< insn-output.c:232: warning: control reaches end of non-void function
< insn-output.c:288: warning: control reaches end of non-void function
< insn-output.c:416: warning: control reaches end of non-void function
< insn-output.c:434: warning: comparison of unsigned expression >= 0 is always true
< insn-output.c:465: warning: control reaches end of non-void function
< insn-output.c:483: warning: comparison of unsigned expression >= 0 is always true
< insn-output.c:514: warning: control reaches end of non-void function
< insn-output.c:52: warning: control reaches end of non-void function
< insn-output.c:536: warning: passing arg 3 of `mcore_output_cmov' discards qualifiers from pointer target type
< insn-output.c:561: warning: control reaches end of non-void function
< insn-output.c:584: warning: comparison of unsigned expression >= 0 is always true
< insn-output.c:595: warning: control reaches end of non-void function
< insn-output.c:611: warning: passing arg 3 of `mcore_output_cmov' discards qualifiers from pointer target type
< insn-output.c:618: warning: comparison of unsigned expression >= 0 is always true
< insn-output.c:626: warning: control reaches end of non-void function
< insn-output.c:671: warning: passing arg 3 of `mcore_output_cmov' discards qualifiers from pointer target type
< insn-output.c:697: warning: passing arg 3 of `mcore_output_cmov' discards qualifiers from pointer target type
< insn-peep.c:283: warning: comparison of unsigned expression >= 0 is always true
< insn-peep.c:326: warning: comparison of unsigned expression >= 0 is always true
< insn-peep.c:369: warning: comparison of unsigned expression >= 0 is always true
< insn-peep.c:412: warning: comparison of unsigned expression >= 0 is always true
< insn-peep.c:77: warning: implicit declaration of function `uns_comparison_operator'
< insn-recog.c:3252: warning: comparison of unsigned expression >= 0 is always true
< recog.c:1320: warning: comparison of unsigned expression >= 0 is always true
< recog.c:989: warning: comparison of unsigned expression >= 0 is always true
< regclass.c:1215: warning: comparison of unsigned expression >= 0 is always true
< regclass.c:1219: warning: comparison of unsigned expression >= 0 is always true
< regclass.c:1908: warning: comparison of unsigned expression >= 0 is always true
< regclass.c:1913: warning: comparison of unsigned expression >= 0 is always true
< regclass.c:2027: warning: comparison of unsigned expression >= 0 is always true
< regclass.c:2034: warning: comparison of unsigned expression >= 0 is always true
< regclass.c:643: warning: comparison of unsigned expression >= 0 is always true
< regclass.c:651: warning: comparison of unsigned expression >= 0 is always true
< regrename.c:581: warning: comparison of unsigned expression >= 0 is always true
< regrename.c:582: warning: comparison of unsigned expression >= 0 is always true
< regrename.c:584: warning: comparison of unsigned expression >= 0 is always true
< regrename.c:585: warning: comparison of unsigned expression >= 0 is always true
< regrename.c:587: warning: comparison of unsigned expression >= 0 is always true
< regrename.c:589: warning: comparison of unsigned expression >= 0 is always true
< regrename.c:591: warning: comparison of unsigned expression >= 0 is always true
< reload.c:1094: warning: comparison of unsigned expression >= 0 is always true
< reload.c:1097: warning: comparison of unsigned expression >= 0 is always true
< reload.c:2016: warning: comparison of unsigned expression >= 0 is always true
< reload.c:337: warning: comparison of unsigned expression >= 0 is always true
< reload.c:342: warning: comparison of unsigned expression >= 0 is always true
< reload.c:4636: warning: comparison of unsigned expression >= 0 is always true
< reload.c:4716: warning: comparison of unsigned expression >= 0 is always true
< reload.c:5180: warning: comparison of unsigned expression >= 0 is always true
< reload.c:5181: warning: comparison of unsigned expression >= 0 is always true
< reload.c:5183: warning: comparison of unsigned expression >= 0 is always true
< reload.c:5184: warning: comparison of unsigned expression >= 0 is always true
< reload.c:5186: warning: comparison of unsigned expression >= 0 is always true
< reload.c:5189: warning: comparison of unsigned expression >= 0 is always true
< reload.c:5192: warning: comparison of unsigned expression >= 0 is always true
< reload.c:5195: warning: comparison of unsigned expression >= 0 is always true
< reload.c:5247: warning: comparison of unsigned expression >= 0 is always true
< reload.c:993: warning: comparison of unsigned expression >= 0 is always true
< reload.c:996: warning: comparison of unsigned expression >= 0 is always true
< reload1.c:5486: warning: comparison of unsigned expression >= 0 is always true
< reload1.c:6208: warning: comparison of unsigned expression >= 0 is always true
< reload1.c:6466: warning: comparison of unsigned expression >= 0 is always true
< reload1.c:6641: warning: comparison of unsigned expression >= 0 is always true
< system.h:178:1: warning: "IN_RANGE" redefined
< toplev.c:2416: warning: implicit declaration of function `constructor_section'
< toplev.c:2416: warning: implicit declaration of function `destructor_section'
< varasm.c:1267: warning: initialization discards qualifiers from pointer target type
< varasm.c:1695: warning: initialization discards qualifiers from pointer target type
< varasm.c:228: warning: function declaration isn't a prototype
Tested via cross compiles of cc1 for the following targets:
1750a-unknown-elf
a29k-unknown-rtems
alpha-dec-osf4.0
arc-unknown-elf
arm-unknown-pe
avr-unknown-elf
c38-convex-elf
c4x-unknown-rtems
clipper-intergraph-clix
cris-unknown-linux-gnu
d30v-unknown-elf
dsp16xx-unknown-elf
elxsi-elxsi-elf
fr30-unknown-elf
h8300-unknown-rtems
hppa1.1-hp-hpux11
i370-unknown-linux-gnu
i386-dg-dgux
i686-pc-linux-gnu
i860-unknown-sysv4
i960-wrs-vxworks
ia64-unknown-linux-gnu
m32r-unknown-elf
m68hc11-unknown-elf
m68k-motorola-sysv
m88k-tektronix-sysv3
mcore-unknown-elf
mips-sgi-irix6.5
mn10200-unknown-elf
mn10300-unknown-elf
ns32k-tek6200-bsd
pdp11-unknown-bsd
pj-unknown-linux-gnu
powerpc-apple-darwin
romp-unknown-aos
rs6000-ibm-aix4.3.3.0
s390-unknown-linux-gnu
sh-unknown-rtems
sparc-sun-sunos4.1.4
stormy16-unknown-elf
v850-unknown-rtems
vax-dec-vms
we32k-att-sysv
Ok to install?
--Kaveh
2001-10-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (dbxout.o): Depend on function.h.
* collect2.c (is_in_list): Hide unused function.
* dbxout.c: Include function.h.
(source_label_number, dbxout_source_line, dbxout_source_file,
dbxout_function_end, dbxout_begin_function): Wrap/move inside
macros controlling usage.
* gcc.c (TARGET_EXECUTABLE_SUFFIX): Undef before defining.
* output.h (exports_section): Prototype.
* convex.c (convex_output_function_prologue): Fix format specifier
warning.
(asm_declare_function_name): Fix signed/unsigned warning.
(print_operand): Fix format specifier warning.
* convex.h (S_REGNO_P, A_REGNO_P): Fix signed/unsigned warning.
* cris.h (EH_RETURN_DATA_REGNO): Fix unsigned>=0 warning.
* darwin-protos.h (constructor_section, destructor_section,
mod_init_section, mod_term_section): Prototype.
* darwin.c (machopic_finish, update_non_lazy_ptrs, update_stubs):
Const-ify.
* darwin.h (ASM_DECLARE_OBJECT_NAME, ASM_DECLARE_FUNCTION_NAME):
Likewise.
(SECTION_FUNCTION): Prototype `FUNCTION'. Delete
objc_section_init declaration.
(EXTRA_SECTION_FUNCTIONS): Prototype objc_section_init.
(objc_section_init, try_section_alias): Make static.
(alias_section): Make static and hide unused function.
(ASM_GENERATE_INTERNAL_LABEL): Fix format specifier warning.
* dsp16xx-protos.h (uns_comparison_operator,
num_1600_core_shifts): Prototype.
* dsp16xx.c: Include tm_p.h, not dsp16xx-protos.h.
(frame_size, frame_pointer_offset): Delete.
(dsp16xx_output_function_prologue, dsp16xx_output_function_epilogue):
Make static. Fix format specifier warnings.
* dsp16xx.h (IS_ACCUM_REG): Fix unsigned>=0 warning.
(EXTRA_SECTION_FUNCTIONS): Prototype const_section.
* dsp16xx.md: Add default case in switches.
* fr30.h (IN_RANGE): Delete.
* ia64.h (ASM_OUTPUT_MI_THUNK): Fix format specifier warnings.
* mcore-protos.h (mcore_output_cmov): Const-ify.
* mcore.c (mcore_output_cmov): Likewise.
* mcore.h (switch_to_section): Make static and prototype.
* mips-protos.h (mips_hard_regno_nregs): Move prototype outside of
ifdef TREE_CODE.
* mn10200.h (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Fix
unsigned>=0 warnings.
* mn10300.h (REGNO_IN_RANGE_P): Likewise.
* rs6000-protos.h (read_only_data_section,
read_only_private_data_section): Prototype.
* rs6000.h (ASM_OUTPUT_BYTE): Fix format specifier warning.
* sh.c (sh_adjust_cost): Mark parameter with ATTRIBUTE_UNUSED.
* sh.h (GENERAL_REGISTER_P): Fix unsigned>=0 warning.
diff -rup orig/egcs-CVS20011021/gcc/Makefile.in egcs-CVS20011021/gcc/Makefile.in
--- orig/egcs-CVS20011021/gcc/Makefile.in Sun Oct 21 15:36:28 2001
+++ egcs-CVS20011021/gcc/Makefile.in Sun Oct 21 21:17:21 2001
@@ -1424,7 +1424,7 @@ optabs.o : optabs.c $(CONFIG_H) $(SYSTEM
insn-config.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(RECOG_H) reload.h \
toplev.h $(GGC_H) real.h $(TM_P_H) except.h
dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
- $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) \
+ $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) function.h \
insn-config.h reload.h gstab.h xcoffout.h output.h dbxout.h toplev.h
debug.o : debug.c $(CONFIG_H) $(SYSTEM_H)
sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
diff -rup orig/egcs-CVS20011021/gcc/collect2.c egcs-CVS20011021/gcc/collect2.c
--- orig/egcs-CVS20011021/gcc/collect2.c Sun Oct 21 17:27:40 2001
+++ egcs-CVS20011021/gcc/collect2.c Sun Oct 21 23:01:25 2001
@@ -300,7 +300,9 @@ static void scan_libraries PARAMS ((cons
static int is_in_args PARAMS ((const char *, const char **, const char **));
#endif
#ifdef COLLECT_EXPORT_LIST
+#if 0
static int is_in_list PARAMS ((const char *, struct id *));
+#endif
static void write_aix_file PARAMS ((FILE *, struct id *));
static char *resolve_lib_name PARAMS ((const char *));
static int ignore_library PARAMS ((const char *));
@@ -1754,6 +1756,7 @@ is_in_args (string, args_begin, args_end
#ifdef COLLECT_EXPORT_LIST
/* This function is really used only on AIX, but may be useful. */
+#if 0
static int
is_in_list (prefix, list)
const char *prefix;
@@ -1767,6 +1770,7 @@ is_in_list (prefix, list)
return 0;
}
#endif
+#endif /* COLLECT_EXPORT_LIST */
/* Added for debugging purpose. */
#ifdef COLLECT_EXPORT_LIST
diff -rup orig/egcs-CVS20011021/gcc/config/convex/convex.c egcs-CVS20011021/gcc/config/convex/convex.c
--- orig/egcs-CVS20011021/gcc/config/convex/convex.c Sat Aug 18 16:30:25 2001
+++ egcs-CVS20011021/gcc/config/convex/convex.c Sun Oct 21 21:04:43 2001
@@ -94,7 +94,11 @@ convex_output_function_prologue (file, s
{
size = ((size) + 7) & -8;
if (size)
- fprintf (file, "\tsub.w #%d,sp\n", size);
+ {
+ fprintf (file, "\tsub.w #");
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, size);
+ fprintf (file, ",sp\n");
+ }
}
/* This function generates the assembly code for function exit.
@@ -568,7 +572,7 @@ asm_declare_function_name (file, name, d
p = version_string;
for (i = 0; i < 3; ) {
c = *p;
- if (c - '0' < (unsigned) 10)
+ if (ISDIGIT (c))
vers[i++] = c;
if (c == 0 || c == ' ')
vers[i++] = '0';
@@ -639,9 +643,15 @@ print_operand (file, x, code)
break;
default:
if (code == 'u')
- fprintf (file, "#%d", CONST_DOUBLE_HIGH (x));
+ {
+ fprintf (file, "#");
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_HIGH (x));
+ }
else
- fprintf (file, "#%d", CONST_DOUBLE_LOW (x));
+ {
+ fprintf (file, "#");
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x));
+ }
}
break;
diff -rup orig/egcs-CVS20011021/gcc/config/convex/convex.h egcs-CVS20011021/gcc/config/convex/convex.h
--- orig/egcs-CVS20011021/gcc/config/convex/convex.h Sat Aug 18 16:30:25 2001
+++ egcs-CVS20011021/gcc/config/convex/convex.h Sun Oct 21 21:02:57 2001
@@ -642,8 +642,8 @@ enum reg_class {
#define REGNO_REG_CLASS(REGNO) (regno_reg_class[REGNO])
-#define S_REGNO_P(REGNO) (((REGNO) - S0_REGNUM) < (unsigned) 8)
-#define A_REGNO_P(REGNO) (((REGNO) - A0_REGNUM) < (unsigned) 8)
+#define S_REGNO_P(REGNO) ((unsigned)((REGNO) - S0_REGNUM) < 8)
+#define A_REGNO_P(REGNO) ((unsigned)((REGNO) - A0_REGNUM) < 8)
#define S_REG_P(X) (REG_P (X) && S_REGNO_P (REGNO (X)))
#define A_REG_P(X) (REG_P (X) && A_REGNO_P (REGNO (X)))
diff -rup orig/egcs-CVS20011021/gcc/config/cris/cris.h egcs-CVS20011021/gcc/config/cris/cris.h
--- orig/egcs-CVS20011021/gcc/config/cris/cris.h Mon Oct 15 16:30:16 2001
+++ egcs-CVS20011021/gcc/config/cris/cris.h Sun Oct 21 21:10:02 2001
@@ -837,7 +837,7 @@ enum reg_class {NO_REGS, ALL_REGS, LIM_R
number of __builtin_eh_return callers is limited. For now return
parameter registers in reverse order and hope for the best. */
#define EH_RETURN_DATA_REGNO(N) \
- (((N) >= 0 && (N) < 4) ? (CRIS_FIRST_ARG_REG + 3 - (N)) : INVALID_REGNUM)
+ (IN_RANGE((N), 0, 4) ? (CRIS_FIRST_ARG_REG + 3 - (N)) : INVALID_REGNUM)
/* Store the stack adjustment in the structure-return-address register. */
#define CRIS_STACKADJ_REG STRUCT_VALUE_REGNUM
diff -rup orig/egcs-CVS20011021/gcc/config/darwin-protos.h egcs-CVS20011021/gcc/config/darwin-protos.h
--- orig/egcs-CVS20011021/gcc/config/darwin-protos.h Thu Aug 9 22:47:55 2001
+++ egcs-CVS20011021/gcc/config/darwin-protos.h Sun Oct 21 22:33:41 2001
@@ -33,6 +33,11 @@ extern void machopic_symbol_stub_section
extern void machopic_lazy_symbol_ptr_section PARAMS ((void));
extern void machopic_nl_symbol_ptr_section PARAMS ((void));
+extern void constructor_section PARAMS ((void));
+extern void destructor_section PARAMS ((void));
+extern void mod_init_section PARAMS ((void));
+extern void mod_term_section PARAMS ((void));
+
#ifdef RTX_CODE
extern int machopic_operand_p PARAMS ((rtx));
diff -rup orig/egcs-CVS20011021/gcc/config/darwin.c egcs-CVS20011021/gcc/config/darwin.c
--- orig/egcs-CVS20011021/gcc/config/darwin.c Sun Oct 21 17:27:40 2001
+++ egcs-CVS20011021/gcc/config/darwin.c Sun Oct 21 22:29:24 2001
@@ -885,8 +885,8 @@ machopic_finish (asm_out_file)
temp != NULL_TREE;
temp = TREE_CHAIN (temp))
{
- char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
- char *stub_name = IDENTIFIER_POINTER (TREE_PURPOSE (temp));
+ const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
+ const char *stub_name = IDENTIFIER_POINTER (TREE_PURPOSE (temp));
char *sym;
char *stub;
@@ -1066,7 +1066,7 @@ static void
update_non_lazy_ptrs (name)
const char *name;
{
- char *name1, *name2;
+ const char *name1, *name2;
tree temp;
STRIP_NAME_ENCODING (name1, name);
@@ -1097,7 +1097,7 @@ static void
update_stubs (name)
const char *name;
{
- char *name1, *name2;
+ const char *name1, *name2;
tree temp;
STRIP_NAME_ENCODING (name1, name);
diff -rup orig/egcs-CVS20011021/gcc/config/darwin.h egcs-CVS20011021/gcc/config/darwin.h
--- orig/egcs-CVS20011021/gcc/config/darwin.h Wed Oct 17 07:30:31 2001
+++ egcs-CVS20011021/gcc/config/darwin.h Sun Oct 21 23:07:35 2001
@@ -204,7 +204,7 @@ do { text_section (); \
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do { \
- char *xname = NAME; \
+ const char *xname = NAME; \
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
if ((TREE_STATIC (DECL) \
@@ -220,7 +220,7 @@ do { text_section (); \
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
do { \
- char *xname = NAME; \
+ const char *xname = NAME; \
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
if ((TREE_STATIC (DECL) \
@@ -310,11 +310,10 @@ do { text_section (); \
#undef SECTION_FUNCTION
#define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, OBJC) \
+extern void FUNCTION PARAMS ((void)); \
void \
FUNCTION () \
{ \
- extern void objc_section_init (); \
- \
if (in_section != SECTION) \
{ \
if (OBJC) \
@@ -357,6 +356,7 @@ do { if (!strcmp (alias_name, name))
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
+static void objc_section_init PARAMS ((void)); \
SECTION_FUNCTION (const_section, \
in_const, \
".const", 0) \
@@ -461,7 +461,7 @@ SECTION_FUNCTION (darwin_exception_secti
in_darwin_exception, \
".section __TEXT,__gcc_except_tab", 0) \
\
-void \
+static void \
objc_section_init () \
{ \
static int been_here = 0; \
@@ -494,14 +494,18 @@ objc_section_init () \
} \
} \
static tree section_alias[(int) num_sections]; \
-void try_section_alias () \
+static void try_section_alias PARAMS ((void)); \
+static void try_section_alias () \
{ \
if (section_alias[in_section] && asm_out_file) \
fprintf (asm_out_file, "%s\n", \
IDENTIFIER_POINTER (section_alias[in_section])); \
} \
-void alias_section (name, alias) \
- char *name, *alias; \
+
+#if 0
+static void alias_section PARAMS ((const char *, const char *)); \
+static void alias_section (name, alias) \
+ const char *name, *alias; \
{ \
ALIAS_SECTION (in_data, "data"); \
ALIAS_SECTION (in_text, "text"); \
@@ -511,6 +515,7 @@ void alias_section (name, alias) \
ALIAS_SECTION (in_literal4, "literal4"); \
ALIAS_SECTION (in_literal8, "literal8"); \
}
+#endif
#undef READONLY_DATA_SECTION
#define READONLY_DATA_SECTION const_section
@@ -682,7 +687,7 @@ void alias_section (name, alias) \
#undef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
- sprintf (LABEL, "*%s%d", PREFIX, NUM)
+ sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM))
/* This is how to output an internal numbered label where PREFIX is
the class of label and NUM is the number within the class. */
diff -rup orig/egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx-protos.h egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx-protos.h
--- orig/egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx-protos.h Sun Oct 14 07:30:20 2001
+++ egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx-protos.h Sun Oct 21 20:38:31 2001
@@ -49,6 +49,7 @@ extern void output_dsp16xx_float_const P
extern void emit_1600_core_shift PARAMS ((enum rtx_code, rtx *, int));
extern int dsp16xx_address_cost PARAMS ((rtx));
extern int symbolic_address_p PARAMS ((rtx));
+extern int uns_comparison_operator PARAMS ((rtx, enum machine_mode));
#endif /* RTX_CODE */
@@ -87,3 +88,4 @@ extern enum reg_class dsp16xx_reg_class_
extern int regno_reg_class PARAMS ((int));
extern void function_prologue PARAMS ((FILE *, int));
extern void function_epilogue PARAMS ((FILE *, int));
+extern int num_1600_core_shifts PARAMS ((int));
diff -rup orig/egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.c egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.c
--- orig/egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.c Wed Oct 17 07:30:35 2001
+++ egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.c Sun Oct 21 20:51:49 2001
@@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. */
#include "ggc.h"
#include "toplev.h"
#include "recog.h"
-#include "dsp16xx-protos.h"
+#include "tm_p.h"
#include "target.h"
#include "target-def.h"
@@ -1362,21 +1362,6 @@ compute_frame_size (size)
return total_size;
}
-int
-frame_size ()
-{
- return (int) compute_frame_size(get_frame_size());
-}
-
-int
-frame_pointer_offset ()
-{
- if (!leaf_function_p())
- return (-(current_function_outgoing_args_size + 1));
- else
- return 1;
-}
-
int
dsp16xx_call_saved_register (regno)
int regno;
@@ -1405,7 +1390,7 @@ ybase_regs_ever_used ()
return live;
}
-void
+static void
dsp16xx_output_function_prologue (file, size)
FILE *file;
HOST_WIDE_INT size;
@@ -1420,14 +1405,14 @@ dsp16xx_output_function_prologue (file,
total_size = compute_frame_size (size);
fprintf (file, "\t/* FUNCTION PROLOGUE: */\n");
- fprintf (file, "\t/* total=%d, vars= %d, regs= %d, args=%d, extra= %d */\n",
+ fprintf (file, "\t/* total=%ld, vars= %ld, regs= %d, args=%d, extra= %ld */\n",
current_frame_info.total_size,
current_frame_info.var_size,
current_frame_info.reg_size,
current_function_outgoing_args_size,
current_frame_info.extra_size);
- fprintf (file, "\t/* fp save offset= %d, sp save_offset= %d */\n\n",
+ fprintf (file, "\t/* fp save offset= %ld, sp save_offset= %ld */\n\n",
current_frame_info.fp_save_offset,
current_frame_info.sp_save_offset);
/* Set up the 'ybase' register window. */
@@ -1449,7 +1434,7 @@ dsp16xx_output_function_prologue (file,
else
{
if (SMALL_INTVAL(current_frame_info.var_size) && ((current_frame_info.var_size & 0x8000) == 0))
- fprintf (file, "\t%s=%d\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.var_size, sp, reg_names[REG_J]);
+ fprintf (file, "\t%s=%ld\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.var_size, sp, reg_names[REG_J]);
else
fatal_error ("Stack size > 32k");
}
@@ -1481,7 +1466,7 @@ dsp16xx_output_function_prologue (file,
{
fprintf (file, "\t%s=%s\n", a1h, sp);
fprintf (file, "\t%s=%s\n", fp, a1h); /* Establish new base frame */
- fprintf (file, "\t%s=%d\n", reg_names[REG_J], -total_size);
+ fprintf (file, "\t%s=%ld\n", reg_names[REG_J], -total_size);
fprintf (file, "\t*%s++%s\n", fp, reg_names[REG_J]);
}
@@ -1515,7 +1500,7 @@ init_emulation_routines ()
dsp16xx_lshrhi3_libcall = (rtx) 0;
}
-void
+static void
dsp16xx_output_function_epilogue (file, size)
FILE *file;
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
@@ -1535,7 +1520,7 @@ dsp16xx_output_function_epilogue (file,
fprintf (file, "\t*%s--\n", sp);
else
{
- fprintf (file, "\t%s=%d\n\t*%s++%s\n",
+ fprintf (file, "\t%s=%ld\n\t*%s++%s\n",
reg_names[REG_J], -current_frame_info.args_size, sp, reg_names[REG_J]);
}
}
@@ -1565,7 +1550,7 @@ dsp16xx_output_function_epilogue (file,
fprintf (file, "\t*%s--\n", sp);
else
{
- fprintf (file, "\t%s=%d\n\t*%s++%s\n",
+ fprintf (file, "\t%s=%ld\n\t*%s++%s\n",
reg_names[REG_J], -current_frame_info.var_size, sp, reg_names[REG_J]);
}
}
@@ -2478,7 +2463,6 @@ luxworks_dsp16xx_file_start (file)
}
#endif
fprintf (file, "\"%s\"\n", temp_filename);
- fprintf (file, "");
fprintf (file, "#include <%s.h>\n", save_chip_name);
diff -rup orig/egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.h egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.h
--- orig/egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.h Sun Oct 21 17:27:40 2001
+++ egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.h Sun Oct 21 20:40:21 2001
@@ -502,7 +502,7 @@ extern int target_flags;
#define REG_YBASE31 57
/* Do we have a accumulator register? */
-#define IS_ACCUM_REG(REGNO) ((REGNO) >= REG_A0 && (REGNO) <= REG_A1L)
+#define IS_ACCUM_REG(REGNO) IN_RANGE ((REGNO), REG_A0, REG_A1L)
#define IS_ACCUM_LOW_REG(REGNO) ((REGNO) == REG_A0L || (REGNO) == REG_A1L)
/* Do we have a virtual ybase register */
@@ -1604,6 +1604,7 @@ extern struct dsp16xx_frame_info current
#define EXTRA_SECTIONS in_const
#define EXTRA_SECTION_FUNCTIONS \
+extern void const_section PARAMS ((void)); \
void \
const_section () \
{ \
diff -rup orig/egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.md egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.md
--- orig/egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.md Sun Oct 14 07:30:20 2001
+++ egcs-CVS20011021/gcc/config/dsp16xx/dsp16xx.md Sun Oct 21 20:36:35 2001
@@ -146,6 +146,8 @@
case 0:
case 1:
return \"%0&%1\";
+ default:
+ abort();
}
}"
[(set_attr "type" "f3_alu,f3_alu")])
@@ -551,6 +553,8 @@
case 2:
return \"*%0++\;*%0++\";
+ default:
+ abort();
}
case 2:
@@ -571,6 +575,8 @@
case 10:
case 11:
return \"%0=%b1+%H2\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move_memory,data_move_multiple,f3_alu_i,f3_alu_i,f3_alu,f3_alu,f3_alu,f3_alu,f3_alu_i,f3_alu_i,f3_alu_i,f3_alu_i")])
@@ -684,6 +690,8 @@
case 7: case 8:
case 9: case 10:
return \"%0=%b1-%H2\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move_multiple,f3_alu_i,f3_alu_i,f3_alu,f3_alu,f3_alu,f3_alu,f3_alu_i,f3_alu_i,f3_alu_i,f3_alu_i")])
@@ -1408,6 +1416,8 @@
case 8:
case 9:
return \"\";
+ default:
+ abort();
}
}"
[(set_attr "type" "special,data_move_multiple,f3_alu,data_move_multiple,data_move_multiple,data_move_multiple,data_move_multiple,data_move_multiple,nothing,nothing")])
@@ -1473,6 +1483,8 @@
case 9: case 10:
return \"%0=%1\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move,data_move,data_move_short_i,data_move_i,data_move_memory,data_move_memory,data_move_memory,data_move_memory,nothing,malu,malu")])
@@ -1520,6 +1532,8 @@
case 9: case 10:
return \"%0=%1\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move,data_move,data_move_short_i,data_move_i,data_move_memory,data_move_memory,data_move_memory,data_move_memory,nothing,malu,malu")])
@@ -1676,6 +1690,8 @@
case 5:
case 6:
return \"%u0=%u1\;%w0=%w1\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load_i,load,store,load,store")])
@@ -1784,6 +1800,8 @@
;; return \"move %w0=%1\;%0=0\";
;; else
;; return \"%w0=%1\;%0=0\";
+;; default:
+;; abort();
;; }
;; }")
@@ -1836,6 +1854,8 @@
case 3:
return \"%0 = extractz(%m1, 0x1000)\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move_2,data_move_2,data_move_2,shift_i")])
@@ -1864,6 +1884,8 @@
}
else
return \"%w0=%1\;%0=0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "data_move_2,data_move_2,data_move_2")])
diff -rup orig/egcs-CVS20011021/gcc/config/fr30/fr30.h egcs-CVS20011021/gcc/config/fr30/fr30.h
--- orig/egcs-CVS20011021/gcc/config/fr30/fr30.h Fri Oct 19 19:17:58 2001
+++ egcs-CVS20011021/gcc/config/fr30/fr30.h Sun Oct 21 21:13:02 2001
@@ -617,11 +617,6 @@ enum reg_class
/*}}}*/
/*{{{ CONSTANTS. */
-/* Return true if a value is inside a range */
-#define IN_RANGE(VALUE, LOW, HIGH) \
- ( ((unsigned HOST_WIDE_INT)((VALUE) - (LOW))) \
- <= ((unsigned HOST_WIDE_INT)( (HIGH) - (LOW))))
-
/* A C expression that defines the machine-dependent operand constraint letters
(`I', `J', `K', .. 'P') that specify particular ranges of integer values.
If C is one of those letters, the expression should check that VALUE, an
diff -rup orig/egcs-CVS20011021/gcc/config/ia64/ia64.h egcs-CVS20011021/gcc/config/ia64/ia64.h
--- orig/egcs-CVS20011021/gcc/config/ia64/ia64.h Fri Sep 21 16:30:26 2001
+++ egcs-CVS20011021/gcc/config/ia64/ia64.h Sun Oct 21 21:29:35 2001
@@ -1526,13 +1526,25 @@ do { \
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
do { \
if (CONST_OK_FOR_I (DELTA)) \
- fprintf (FILE, "\tadds r32 = %d, r32\n", (DELTA)); \
+ { \
+ fprintf (FILE, "\tadds r32 = "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, ", r32\n"); \
+ } \
else \
{ \
if (CONST_OK_FOR_J (DELTA)) \
- fprintf (FILE, "\taddl r2 = %d, r0\n", (DELTA)); \
+ { \
+ fprintf (FILE, "\taddl r2 = "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, ", r0\n"); \
+ } \
else \
- fprintf (FILE, "\tmovl r2 = %d\n", (DELTA)); \
+ { \
+ fprintf (FILE, "\tmovl r2 = "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
+ } \
fprintf (FILE, "\t;;\n"); \
fprintf (FILE, "\tadd r32 = r2, r32\n"); \
} \
diff -rup orig/egcs-CVS20011021/gcc/config/mcore/mcore-protos.h egcs-CVS20011021/gcc/config/mcore/mcore-protos.h
--- orig/egcs-CVS20011021/gcc/config/mcore/mcore-protos.h Thu Aug 23 16:30:26 2001
+++ egcs-CVS20011021/gcc/config/mcore/mcore-protos.h Sun Oct 21 21:37:18 2001
@@ -57,7 +57,7 @@ extern rtx arch_compare_op1;
extern const char * mcore_output_bclri PARAMS ((rtx, int));
extern const char * mcore_output_bseti PARAMS ((rtx, int));
-extern const char * mcore_output_cmov PARAMS ((rtx *, int, char *));
+extern const char * mcore_output_cmov PARAMS ((rtx *, int, const char *));
extern char * mcore_output_call PARAMS ((rtx *, int));
extern int mcore_is_dead PARAMS ((rtx, rtx));
extern int mcore_expand_insv PARAMS ((rtx *));
diff -rup orig/egcs-CVS20011021/gcc/config/mcore/mcore.c egcs-CVS20011021/gcc/config/mcore/mcore.c
--- orig/egcs-CVS20011021/gcc/config/mcore/mcore.c Tue Oct 9 07:30:34 2001
+++ egcs-CVS20011021/gcc/config/mcore/mcore.c Sun Oct 21 21:37:00 2001
@@ -971,7 +971,7 @@ const char *
mcore_output_cmov (operands, cmp_t, test)
rtx operands[];
int cmp_t;
- char * test;
+ const char * test;
{
int load_value;
int adjust_value;
diff -rup orig/egcs-CVS20011021/gcc/config/mcore/mcore.h egcs-CVS20011021/gcc/config/mcore/mcore.h
--- orig/egcs-CVS20011021/gcc/config/mcore/mcore.h Sun Oct 21 19:12:38 2001
+++ egcs-CVS20011021/gcc/config/mcore/mcore.h Sun Oct 21 21:33:15 2001
@@ -1095,7 +1095,8 @@ extern enum reg_class reg_class_from_let
ASM_DECLARE_OBJECT_NAME and then switch back to the original section
afterwards. */
#define SWITCH_SECTION_FUNCTION \
-void \
+static void switch_to_section PARAMS ((enum in_section, tree)); \
+static void \
switch_to_section (section, decl) \
enum in_section section; \
tree decl; \
diff -rup orig/egcs-CVS20011021/gcc/config/mips/mips-protos.h egcs-CVS20011021/gcc/config/mips/mips-protos.h
--- orig/egcs-CVS20011021/gcc/config/mips/mips-protos.h Sat Sep 15 07:30:20 2001
+++ egcs-CVS20011021/gcc/config/mips/mips-protos.h Sun Oct 21 21:41:31 2001
@@ -50,10 +50,10 @@ extern struct rtx_def * mips16_gp_pseudo
#ifdef ASM_OUTPUT_UNDEF_FUNCTION
extern int mips_output_external_libcall PARAMS ((FILE *, const char *));
#endif /* ASM_OUTPUT_UNDEF_FUNCTION */
+extern unsigned int mips_hard_regno_nregs PARAMS ((int, enum machine_mode));
#ifdef TREE_CODE
-extern unsigned int mips_hard_regno_nregs PARAMS ((int, enum machine_mode));
extern struct rtx_def * function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int));
diff -rup orig/egcs-CVS20011021/gcc/config/mn10200/mn10200.h egcs-CVS20011021/gcc/config/mn10200/mn10200.h
--- orig/egcs-CVS20011021/gcc/config/mn10200/mn10200.h Fri Oct 19 19:18:00 2001
+++ egcs-CVS20011021/gcc/config/mn10200/mn10200.h Sun Oct 21 21:52:54 2001
@@ -280,7 +280,7 @@ enum reg_class {
|| (reg_renumber[regno] > 3 && reg_renumber[regno] < FIRST_PSEUDO_REGISTER))
#define REGNO_OK_FOR_INDEX_P(regno) \
- (((regno) >= 0 && regno < 4) \
+ ( IN_RANGE ((regno), 0, 4) \
|| (reg_renumber[regno] >= 0 && reg_renumber[regno] < 4))
@@ -639,7 +639,7 @@ struct cum_arg { int nbytes; };
/* Nonzero if X is a hard reg that can be used as an index
or if it is a pseudo reg. */
#define REG_OK_FOR_INDEX_P(X) \
- (((REGNO (X) >= 0 && REGNO(X) <= 3) || REGNO (X) >= FIRST_PSEUDO_REGISTER))
+ (IN_RANGE (REGNO (X), 0, 3) || REGNO (X) >= FIRST_PSEUDO_REGISTER)
/* Nonzero if X is a hard reg that can be used as a base reg
or if it is a pseudo reg. */
#define REG_OK_FOR_BASE_P(X) \
diff -rup orig/egcs-CVS20011021/gcc/config/mn10300/mn10300.h egcs-CVS20011021/gcc/config/mn10300/mn10300.h
--- orig/egcs-CVS20011021/gcc/config/mn10300/mn10300.h Fri Oct 19 19:18:00 2001
+++ egcs-CVS20011021/gcc/config/mn10300/mn10300.h Sun Oct 21 21:56:03 2001
@@ -342,7 +342,7 @@ enum reg_class {
(((regno) >= (min) && (regno) <= (max)) || (regno) >= FIRST_PSEUDO_REGISTER)
#else
# define REGNO_IN_RANGE_P(regno,min,max) \
- (((regno) >= (min) && (regno) <= (max)) \
+ ( IN_RANGE ((regno), (min), (max)) \
|| (reg_renumber \
&& reg_renumber[(regno)] >= (min) && reg_renumber[(regno)] <= (max)))
#endif
diff -rup orig/egcs-CVS20011021/gcc/config/rs6000/rs6000-protos.h egcs-CVS20011021/gcc/config/rs6000/rs6000-protos.h
--- orig/egcs-CVS20011021/gcc/config/rs6000/rs6000-protos.h Mon Aug 27 13:29:01 2001
+++ egcs-CVS20011021/gcc/config/rs6000/rs6000-protos.h Sun Oct 21 22:52:11 2001
@@ -170,6 +170,8 @@ extern void sdata_section PARAMS ((void)
extern void sdata2_section PARAMS ((void));
extern void sbss_section PARAMS ((void));
extern void private_data_section PARAMS ((void));
+extern void read_only_data_section PARAMS ((void));
+extern void read_only_private_data_section PARAMS ((void));
extern int get_TOC_alias_set PARAMS ((void));
extern int uses_TOC PARAMS ((void));
extern void rs6000_emit_prologue PARAMS ((void));
diff -rup orig/egcs-CVS20011021/gcc/config/rs6000/rs6000.h egcs-CVS20011021/gcc/config/rs6000/rs6000.h
--- orig/egcs-CVS20011021/gcc/config/rs6000/rs6000.h Tue Oct 2 07:30:22 2001
+++ egcs-CVS20011021/gcc/config/rs6000/rs6000.h Sun Oct 21 22:21:50 2001
@@ -2500,7 +2500,7 @@ do { \
/* This is how to output an assembler line for a numeric constant byte. */
#define ASM_OUTPUT_BYTE(FILE,VALUE) \
- fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
+ fprintf (FILE, "\t.byte 0x%x\n", (int)(VALUE))
/* This is used by the definition of ASM_OUTPUT_ADDR_ELT in defaults.h. */
#define ASM_LONG (TARGET_32BIT ? ".long" : DOUBLE_INT_ASM_OP)
diff -rup orig/egcs-CVS20011021/gcc/config/sh/sh.c egcs-CVS20011021/gcc/config/sh/sh.c
--- orig/egcs-CVS20011021/gcc/config/sh/sh.c Thu Sep 20 23:12:39 2001
+++ egcs-CVS20011021/gcc/config/sh/sh.c Sun Oct 21 23:20:37 2001
@@ -5648,7 +5648,7 @@ sh_asm_named_section (name, flags)
static int
sh_adjust_cost (insn, link, dep_insn, cost)
rtx insn;
- rtx link;
+ rtx link ATTRIBUTE_UNUSED;
rtx dep_insn;
int cost;
{
diff -rup orig/egcs-CVS20011021/gcc/config/sh/sh.h egcs-CVS20011021/gcc/config/sh/sh.h
--- orig/egcs-CVS20011021/gcc/config/sh/sh.h Sun Oct 21 17:27:41 2001
+++ egcs-CVS20011021/gcc/config/sh/sh.h Sun Oct 21 23:16:55 2001
@@ -483,7 +483,7 @@ do { \
#define LAST_XD_REG (FIRST_XD_REG + 7)
#define GENERAL_REGISTER_P(REGNO) \
- ((REGNO) >= FIRST_GENERAL_REG && (REGNO) <= LAST_GENERAL_REG)
+ IN_RANGE ((REGNO), FIRST_GENERAL_REG, LAST_GENERAL_REG)
#define GENERAL_OR_AP_REGISTER_P(REGNO) \
(GENERAL_REGISTER_P (REGNO) || ((REGNO) == AP_REG))
diff -rup orig/egcs-CVS20011021/gcc/dbxout.c egcs-CVS20011021/gcc/dbxout.c
--- orig/egcs-CVS20011021/gcc/dbxout.c Thu Oct 11 07:30:22 2001
+++ egcs-CVS20011021/gcc/dbxout.c Sun Oct 21 22:48:34 2001
@@ -83,6 +83,7 @@ Software Foundation, 59 Temple Place - S
#include "tm_p.h"
#include "ggc.h"
#include "debug.h"
+#include "function.h"
#include "target.h"
#ifdef XCOFF_DEBUGGING_INFO
@@ -148,7 +149,9 @@ static int have_used_extensions = 0;
/* Number for the next N_SOL filename stabs label. The number 0 is reserved
for the N_SO filename stabs label. */
+#if defined (DBX_DEBUGGING_INFO) && !defined (DBX_OUTPUT_SOURCE_FILENAME)
static int source_label_number = 1;
+#endif
#ifdef DEBUG_SYMS_TEXT
#define FORCE_TEXT text_section ();
@@ -289,9 +292,6 @@ static void dbxout_init PARAMS ((const
static void dbxout_finish PARAMS ((const char *));
static void dbxout_start_source_file PARAMS ((unsigned, const char *));
static void dbxout_end_source_file PARAMS ((unsigned));
-static void dbxout_source_line PARAMS ((unsigned int, const char *));
-static void dbxout_source_file PARAMS ((FILE *, const char *));
-static void dbxout_function_end PARAMS ((void));
static void dbxout_typedefs PARAMS ((tree));
static void dbxout_type_index PARAMS ((tree));
#if DBX_CONTIN_LENGTH > 0
@@ -312,12 +312,15 @@ static void dbxout_symbol_name PARAMS (
static void dbxout_prepare_symbol PARAMS ((tree));
static void dbxout_finish_symbol PARAMS ((tree));
static void dbxout_block PARAMS ((tree, int, tree));
-static void dbxout_begin_function PARAMS ((tree));
static void dbxout_global_decl PARAMS ((tree));
/* The debug hooks structure. */
#if defined (DBX_DEBUGGING_INFO)
+static void dbxout_source_line PARAMS ((unsigned int, const char *));
+static void dbxout_source_file PARAMS ((FILE *, const char *));
+static void dbxout_function_end PARAMS ((void));
+static void dbxout_begin_function PARAMS ((tree));
static void dbxout_begin_block PARAMS ((unsigned, unsigned));
static void dbxout_end_block PARAMS ((unsigned, unsigned));
static void dbxout_function_decl PARAMS ((tree));
@@ -377,6 +380,7 @@ struct gcc_debug_hooks xcoff_debug_hooks
};
#endif /* XCOFF_DEBUGGING_INFO */
+#if defined (DBX_DEBUGGING_INFO)
static void
dbxout_function_end ()
{
@@ -397,6 +401,7 @@ dbxout_function_end ()
assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
fprintf (asmfile, "\n");
}
+#endif /* DBX_DEBUGGING_INFO */
/* At the beginning of compilation, start writing the symbol table.
Initialize `typevec' and output the standard data types of C. */
@@ -552,6 +557,7 @@ dbxout_end_source_file (line)
#endif
}
+#if defined (DBX_DEBUGGING_INFO)
/* Output debugging info to FILE to switch to sourcefile FILENAME. */
static void
@@ -600,8 +606,6 @@ dbxout_source_line (lineno, filename)
#endif
}
-#if defined (DBX_DEBUGGING_INFO)
-
/* Describe the beginning of an internal block within a function. */
static void
@@ -2824,6 +2828,7 @@ dbxout_block (block, depth, args)
Usually this follows the function's code,
but on some systems, it comes before. */
+#if defined (DBX_DEBUGGING_INFO)
static void
dbxout_begin_function (decl)
tree decl;
@@ -2833,5 +2838,6 @@ dbxout_begin_function (decl)
if (DECL_NAME (DECL_RESULT (decl)) != 0)
dbxout_symbol (DECL_RESULT (decl), 1);
}
+#endif /* DBX_DEBUGGING_INFO */
#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
diff -rup orig/egcs-CVS20011021/gcc/gcc.c egcs-CVS20011021/gcc/gcc.c
--- orig/egcs-CVS20011021/gcc/gcc.c Sun Oct 21 19:12:38 2001
+++ egcs-CVS20011021/gcc/gcc.c Sun Oct 21 23:25:37 2001
@@ -97,6 +97,7 @@ extern int getrusage PARAMS ((int, struc
#if defined(TARGET_EXECUTABLE_SUFFIX) && defined(HOST_EXECUTABLE_SUFFIX)
#define HAVE_TARGET_EXECUTABLE_SUFFIX
#else
+#undef TARGET_EXECUTABLE_SUFFIX
#define TARGET_EXECUTABLE_SUFFIX ""
#endif
diff -rup orig/egcs-CVS20011021/gcc/output.h egcs-CVS20011021/gcc/output.h
--- orig/egcs-CVS20011021/gcc/output.h Sun Oct 21 19:12:38 2001
+++ egcs-CVS20011021/gcc/output.h Sun Oct 21 21:35:58 2001
@@ -190,6 +190,10 @@ extern void init_section PARAMS ((void))
extern void fini_section PARAMS ((void));
#endif
+#ifdef EXPORTS_SECTION_ASM_OP
+extern void exports_section PARAMS ((void));
+#endif
+
#ifdef TDESC_SECTION_ASM_OP
extern void tdesc_section PARAMS ((void));
#endif