mirror of
https://github.com/pret/agbcc.git
synced 2026-08-20 09:24:19 -05:00
fix warnings
This commit is contained in:
@@ -42,7 +42,6 @@ extern int arm_structure_size_boundary;
|
||||
|
||||
/* Debug */
|
||||
#define DWARF2_DEBUGGING_INFO
|
||||
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
|
||||
|
||||
|
||||
/* Note - it is important that these definitions match those in semi.h for the ARM port. */
|
||||
|
||||
@@ -29,9 +29,12 @@
|
||||
#include "output.h"
|
||||
#include "insn-flags.h"
|
||||
#include "insn-attr.h"
|
||||
#include "insn-config.h"
|
||||
#include "flags.h"
|
||||
#include "tree.h"
|
||||
#include "expr.h"
|
||||
#include "toplev.h"
|
||||
#include "recog.h"
|
||||
|
||||
int current_function_anonymous_args = 0;
|
||||
static int current_function_has_far_jump = 0;
|
||||
@@ -41,16 +44,6 @@ char *structure_size_string = NULL;
|
||||
int arm_structure_size_boundary = 32; /* Used to be 8 */
|
||||
|
||||
/* Predicates */
|
||||
int
|
||||
reload_memory_operand(rtx op, enum machine_mode mode)
|
||||
{
|
||||
int regno = true_regnum(op);
|
||||
|
||||
return (!CONSTANT_P(op)
|
||||
&& (regno == -1
|
||||
|| (GET_CODE(op) == REG
|
||||
&& REGNO(op) >= FIRST_PSEUDO_REGISTER)));
|
||||
}
|
||||
|
||||
/* Return nonzero if op is suitable for the RHS of a cmp instruction. */
|
||||
int
|
||||
@@ -1278,13 +1271,6 @@ output_move_mem_multiple(int n, rtx *operands)
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
thumb_epilogue_size()
|
||||
{
|
||||
return 42; /* The answer to .... */
|
||||
}
|
||||
|
||||
static char *conds[] =
|
||||
{
|
||||
"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
|
||||
@@ -1524,7 +1510,7 @@ arm_valid_machine_decl_attribute(tree decl, tree attributes, tree attr, tree arg
|
||||
reloading. */
|
||||
|
||||
int
|
||||
s_register_operand(register rtx op, enum machine_mode mode)
|
||||
s_register_operand(rtx op, enum machine_mode mode)
|
||||
{
|
||||
if (GET_MODE(op) != mode && mode != VOIDmode)
|
||||
return 0;
|
||||
|
||||
@@ -1107,8 +1107,31 @@ int thumb_shiftable_const ();
|
||||
limited PC addressing range: */
|
||||
#define MACHINE_DEPENDENT_REORG(INSN) thumb_reorg ((INSN))
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
enum machine_mode;
|
||||
|
||||
struct rtx_def;
|
||||
typedef struct rtx_def *rtx;
|
||||
|
||||
union tree_node;
|
||||
typedef union tree_node *tree;
|
||||
|
||||
extern int thumb_cmp_operand(rtx, enum machine_mode);
|
||||
extern void thumb_reorg(rtx first);
|
||||
extern void thumb_expand_movstrqi(rtx *);
|
||||
extern void thumb_reload_out_si(rtx);
|
||||
extern void final_prescan_insn(rtx);
|
||||
extern int far_jump_used_p();
|
||||
extern void thumb_function_prologue(FILE *, int);
|
||||
extern void thumb_expand_prologue();
|
||||
extern void thumb_function_epilogue(FILE *, int);
|
||||
extern void thumb_expand_epilogue();
|
||||
extern char *thumb_unexpanded_epilogue();
|
||||
extern char *output_move_mem_multiple();
|
||||
extern char *thumb_load_double_from_address();
|
||||
extern int far_jump_used_p();
|
||||
extern void thumb_override_options();
|
||||
extern char *output_move_mem_multiple();
|
||||
extern void thumb_print_operand(FILE *, rtx, int);
|
||||
extern int thumb_return_in_memory(tree);
|
||||
extern void thumb_override_options();
|
||||
extern int arm_valid_machine_decl_attribute(tree, tree, tree, tree);
|
||||
extern int s_register_operand(rtx, enum machine_mode);
|
||||
|
||||
@@ -95,17 +95,6 @@
|
||||
operands[1] = GEN_INT (- INTVAL (operands[1]));
|
||||
")
|
||||
|
||||
;;(define_expand "reload_outsi"
|
||||
;; [(set (match_operand:SI 2 "register_operand" "=&l")
|
||||
;; (match_operand:SI 1 "register_operand" "h"))
|
||||
;; (set (match_operand:SI 0 "reload_memory_operand" "=o")
|
||||
;; (match_dup 2))]
|
||||
;; ""
|
||||
;; "
|
||||
;;/* thumb_reload_out_si (operands);
|
||||
;; DONE; */
|
||||
;;")
|
||||
|
||||
(define_expand "movhi"
|
||||
[(set (match_operand:HI 0 "general_operand" "")
|
||||
(match_operand:HI 1 "general_operand" ""))]
|
||||
|
||||
@@ -45,10 +45,6 @@ enum debug_info_level
|
||||
/* Specify how much debugging info to generate. */
|
||||
extern enum debug_info_level debug_info_level;
|
||||
|
||||
/* Nonzero means use GNU-only extensions in the generated symbolic
|
||||
debugging information. */
|
||||
extern int use_gnu_debug_info_extensions;
|
||||
|
||||
/* Nonzero means do optimizations. -opt. */
|
||||
|
||||
extern int optimize;
|
||||
|
||||
@@ -5142,9 +5142,8 @@ invalidate_nonnull_info (x, setter)
|
||||
This could probably be integrated with global cprop with a little work. */
|
||||
|
||||
void
|
||||
delete_null_pointer_checks (f, pass)
|
||||
delete_null_pointer_checks (f)
|
||||
rtx f;
|
||||
int pass;
|
||||
{
|
||||
int_list_ptr *s_preds, *s_succs;
|
||||
int *num_preds, *num_succs;
|
||||
|
||||
@@ -1395,9 +1395,11 @@ extern rtx expand_mult_highpart (enum machine_mode, rtx,
|
||||
/* In gcse.c */
|
||||
#ifdef BUFSIZ
|
||||
/* CYGNUS LOCAL gcse/law */
|
||||
extern int gcse_main (rtx, FILE *);
|
||||
extern int gcse_main(rtx, FILE *);
|
||||
/* END CYGNUS LOCAL */
|
||||
#endif
|
||||
extern void delete_null_pointer_checks(rtx);
|
||||
extern void merge_blocks(rtx);
|
||||
|
||||
/* In global.c */
|
||||
extern void mark_elimination (int, int);
|
||||
|
||||
@@ -24,6 +24,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Algorithms. Harper-Collins, Inc. 1991. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "splay-tree.h"
|
||||
|
||||
181
gcc/toplev.c
181
gcc/toplev.c
@@ -40,6 +40,7 @@
|
||||
|
||||
#include "input.h"
|
||||
#include "tree.h"
|
||||
#include "c-tree.h"
|
||||
#include "rtl.h"
|
||||
#include "flags.h"
|
||||
#include "insn-attr.h"
|
||||
@@ -56,16 +57,6 @@
|
||||
#include "dwarf2out.h"
|
||||
#endif
|
||||
|
||||
#ifdef DWARF2_DEBUGGING_INFO
|
||||
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
|
||||
#endif
|
||||
|
||||
/* If still not defined, must have been because no debugging formats
|
||||
are supported. */
|
||||
#ifndef PREFERRED_DEBUGGING_TYPE
|
||||
#define PREFERRED_DEBUGGING_TYPE NO_DEBUG
|
||||
#endif
|
||||
|
||||
extern int rtx_equal_function_value_matters;
|
||||
|
||||
extern char **environ;
|
||||
@@ -217,9 +208,7 @@ int global_reg_dump = 0;
|
||||
int sched2_dump = 0;
|
||||
int jump2_opt_dump = 0;
|
||||
int flag_print_asm_name = 0;
|
||||
#ifdef MACHINE_DEPENDENT_REORG
|
||||
int mach_dep_reorg_dump = 0;
|
||||
#endif
|
||||
enum graph_dump_types graph_dump_format;
|
||||
|
||||
/* Name for output file of assembly code, specified with -o. */
|
||||
@@ -615,31 +604,12 @@ int flag_strict_aliasing = 0;
|
||||
/* Instrument functions with calls at entry and exit, for profiling. */
|
||||
int flag_instrument_function_entry_exit = 0;
|
||||
|
||||
|
||||
/* Table of supported debugging formats. */
|
||||
static struct
|
||||
{
|
||||
char * arg;
|
||||
/* Since PREFERRED_DEBUGGING_TYPE isn't necessarily a
|
||||
constant expression, we use NO_DEBUG in its place. */
|
||||
enum debug_info_type debug_type;
|
||||
char * description;
|
||||
} *da,
|
||||
debug_args[] =
|
||||
{
|
||||
{ "g", NO_DEBUG, "Generate default debug format output" },
|
||||
#ifdef DWARF2_DEBUGGING_INFO
|
||||
{ "gdwarf-2", DWARF2_DEBUG, "Enable DWARF-2 debug output" },
|
||||
#endif
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char * string;
|
||||
int * variable;
|
||||
char *string;
|
||||
int *variable;
|
||||
int on_value;
|
||||
char * description;
|
||||
char *description;
|
||||
}
|
||||
lang_independent_options;
|
||||
|
||||
@@ -2311,14 +2281,12 @@ char *name;
|
||||
if (graph_dump_format != no_graph)
|
||||
clean_graph_dump_file(dump_base_name, ".gcse");
|
||||
}
|
||||
#ifdef MACHINE_DEPENDENT_REORG
|
||||
if (mach_dep_reorg_dump)
|
||||
{
|
||||
clean_dump_file(".mach");
|
||||
if (graph_dump_format != no_graph)
|
||||
clean_graph_dump_file(dump_base_name, ".mach");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Open assembler code output file. */
|
||||
|
||||
@@ -2731,10 +2699,8 @@ finish_syntax:
|
||||
finish_graph_dump_file(dump_base_name, ".jump2");
|
||||
if (gcse_dump)
|
||||
finish_graph_dump_file(dump_base_name, ".gcse");
|
||||
#ifdef MACHINE_DEPENDENT_REORG
|
||||
if (mach_dep_reorg_dump)
|
||||
finish_graph_dump_file(dump_base_name, ".mach");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Free up memory for the benefit of leak detectors. */
|
||||
@@ -3446,8 +3412,7 @@ tree decl;
|
||||
}
|
||||
}
|
||||
|
||||
/* If a machine dependent reorganization is needed, call it. */
|
||||
#ifdef MACHINE_DEPENDENT_REORG
|
||||
/* Do machine-dependent reorganization. */
|
||||
MACHINE_DEPENDENT_REORG(insns);
|
||||
|
||||
if (mach_dep_reorg_dump)
|
||||
@@ -3456,7 +3421,6 @@ tree decl;
|
||||
if (graph_dump_format != no_graph)
|
||||
print_rtl_graph_with_bb(dump_base_name, ".mach", insns);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Shorten branches. */
|
||||
TIMEVAR(shorten_branch_time,
|
||||
@@ -3496,7 +3460,7 @@ tree decl;
|
||||
regset_release_memory();
|
||||
});
|
||||
|
||||
/* Write DBX symbols if requested */
|
||||
/* Write debug symbols if requested */
|
||||
|
||||
/* Note that for those inline functions where we don't initially
|
||||
know for certain that we will be generating an out-of-line copy,
|
||||
@@ -3506,8 +3470,6 @@ tree decl;
|
||||
for those inline functions that need to have out-of-line copies
|
||||
generated. During that call, we *will* be routed past here. */
|
||||
|
||||
|
||||
|
||||
#ifdef DWARF2_DEBUGGING_INFO
|
||||
if (write_symbols == DWARF2_DEBUG)
|
||||
TIMEVAR(symout_time, dwarf2out_decl(decl));
|
||||
@@ -3989,9 +3951,7 @@ char **argv;
|
||||
gcse_dump = 1;
|
||||
sched_dump = 1;
|
||||
sched2_dump = 1;
|
||||
#ifdef MACHINE_DEPENDENT_REORG
|
||||
mach_dep_reorg_dump = 1;
|
||||
#endif
|
||||
break;
|
||||
case 'A':
|
||||
flag_debug_asm = 1;
|
||||
@@ -4023,11 +3983,9 @@ char **argv;
|
||||
case 'L':
|
||||
loop_dump = 1;
|
||||
break;
|
||||
#ifdef MACHINE_DEPENDENT_REORG
|
||||
case 'M':
|
||||
mach_dep_reorg_dump = 1;
|
||||
break;
|
||||
#endif
|
||||
case 'p':
|
||||
flag_print_asm_name = 1;
|
||||
break;
|
||||
@@ -4206,122 +4164,25 @@ larger_than_lose:;
|
||||
else
|
||||
error("Invalid option `%s'", argv[i]);
|
||||
}
|
||||
else if (!strcmp(str, "p"))
|
||||
{
|
||||
warning("`-p' option (function profiling) not supported");
|
||||
}
|
||||
else if (!strcmp(str, "a"))
|
||||
{
|
||||
warning("`-a' option (basic block profile) not supported");
|
||||
}
|
||||
else if (!strcmp(str, "ax"))
|
||||
{
|
||||
warning("`-ax' option (jump profiling) not supported");
|
||||
}
|
||||
else if (str[0] == 'g')
|
||||
{
|
||||
unsigned len;
|
||||
unsigned level;
|
||||
/* A lot of code assumes write_symbols == NO_DEBUG if the
|
||||
debugging level is 0 (thus -gstabs1 -gstabs0 would lose track
|
||||
of what debugging type has been selected). This records the
|
||||
selected type. It is an error to specify more than one
|
||||
debugging type. */
|
||||
static enum debug_info_type selected_debug_type = NO_DEBUG;
|
||||
/* Non-zero if debugging format has been explicitly set.
|
||||
-g and -ggdb don't explicitly set the debugging format so
|
||||
-gdwarf -g3 is equivalent to -gdwarf3. */
|
||||
static int type_explicitly_set_p = 0;
|
||||
/* Indexed by enum debug_info_type. */
|
||||
static char *debug_type_names[] =
|
||||
unsigned level = 0;
|
||||
|
||||
if (str[1] == 0)
|
||||
{
|
||||
"none", "stabs", "coff", "dwarf-1", "dwarf-2", "xcoff"
|
||||
};
|
||||
|
||||
/* Look up STR in the table. */
|
||||
for (da = debug_args; da->arg; da++)
|
||||
{
|
||||
if (!strncmp(str, da->arg, strlen(da->arg)))
|
||||
{
|
||||
enum debug_info_type type = da->debug_type;
|
||||
char *p, *q;
|
||||
|
||||
p = str + strlen(da->arg);
|
||||
if (*p && (*p < '0' || *p > '9'))
|
||||
continue;
|
||||
len = p - str;
|
||||
q = p;
|
||||
while (*q && (*q >= '0' && *q <= '9'))
|
||||
q++;
|
||||
if (*p)
|
||||
{
|
||||
level = atoi(p);
|
||||
if (len > 1 && !strncmp(str, "gdwarf", len))
|
||||
{
|
||||
error("use -gdwarf -g%d for DWARF v1, level %d",
|
||||
level, level);
|
||||
if (level == 2)
|
||||
error("use -gdwarf-2 for DWARF v2");
|
||||
}
|
||||
}
|
||||
else
|
||||
level = 2; /* default debugging info level */
|
||||
if (*q || level > 3)
|
||||
{
|
||||
warning("invalid debug level specification in option: `-%s'",
|
||||
str);
|
||||
/* ??? This error message is incorrect in the case of
|
||||
-g4 -g. */
|
||||
warning("no debugging information will be generated");
|
||||
level = 0;
|
||||
}
|
||||
|
||||
if (type == NO_DEBUG)
|
||||
{
|
||||
type = PREFERRED_DEBUGGING_TYPE;
|
||||
if (len > 1 && strncmp(str, "ggdb", len) == 0)
|
||||
{
|
||||
#if defined (DWARF2_DEBUGGING_INFO) && !defined (LINKER_DOES_NOT_WORK_WITH_DWARF2)
|
||||
type = DWARF2_DEBUG;
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (type == NO_DEBUG)
|
||||
warning("`-%s' not supported by this configuration of GCC",
|
||||
str);
|
||||
|
||||
/* Does it conflict with an already selected type? */
|
||||
if (type_explicitly_set_p
|
||||
/* -g/-ggdb don't conflict with anything */
|
||||
&& da->debug_type != NO_DEBUG
|
||||
&& type != selected_debug_type)
|
||||
warning("`-%s' ignored, conflicts with `-g%s'",
|
||||
str, debug_type_names[(int) selected_debug_type]);
|
||||
else
|
||||
{
|
||||
/* If the format has already been set, -g/-ggdb
|
||||
only change the debug level. */
|
||||
if (type_explicitly_set_p
|
||||
&& da->debug_type == NO_DEBUG)
|
||||
; /* don't change debugging type */
|
||||
else
|
||||
{
|
||||
selected_debug_type = type;
|
||||
type_explicitly_set_p = da->debug_type != NO_DEBUG;
|
||||
}
|
||||
write_symbols = (level == 0
|
||||
? NO_DEBUG
|
||||
: selected_debug_type);
|
||||
debug_info_level = (enum debug_info_level) level;
|
||||
}
|
||||
break;
|
||||
}
|
||||
level = 2; /* default debugging info level */
|
||||
}
|
||||
if (!da->arg)
|
||||
warning("`-%s' not supported by this configuration of GCC",
|
||||
str);
|
||||
else if (str[1] >= '0' && str[1] <= '3' && str[2] == 0)
|
||||
{
|
||||
level = str[1] - '0';
|
||||
}
|
||||
else
|
||||
{
|
||||
warning("invalid debug option `-%s'", str);
|
||||
}
|
||||
|
||||
write_symbols = (level == 0) ? NO_DEBUG : DWARF2_DEBUG;
|
||||
debug_info_level = (enum debug_info_level)level;
|
||||
}
|
||||
else if (!strcmp(str, "o"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user