aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-09-06 05:56:20 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-09-06 05:56:20 +0000
commit114791ea106f70baadc38ba90e2de769da211333 (patch)
tree56a1b6f86c53492b61290c511a46e98e66967820
parenta269a03c80a4920f09cf0c065a636f6cedf92490 (diff)
downloadgcc-114791ea106f70baadc38ba90e2de769da211333.zip
gcc-114791ea106f70baadc38ba90e2de769da211333.tar.gz
gcc-114791ea106f70baadc38ba90e2de769da211333.tar.bz2
Makefile.in (toplev.o): Depend on $(EXPR_H).
* Makefile.in (toplev.o): Depend on $(EXPR_H). (insn-extract.o, insn-attrtab.o): Depend on toplev.h. * gansidecl.h: Define ATTRIBUTE_NORETURN. * genattrtab.c: Have insn-attrtab.c include toplev.h. * genextract.c: Have insn-extract.c include toplev.h. * rtl.h: Don't prototype `fatal_insn_not_found' and `fatal_insn'. * toplev.c: Include expr.h. (really_sorry, fancy_abort): Remove prototypes. (set_target_switch): Add argument in prototype. (vfatal): Mark prototype with ATTRIBUTE_NORETURN. (v_really_sorry): Likewise. (print_version, print_single_switch, print_switch_values): Make static and add prototype arguments. (decl_printable_name): Add prototype arguments. (lang_expand_expr_t): New typedef. (lang_expand_expr): Declare as a lang_expand_expr_t. (incomplete_decl_finalize_hook): Add prototype argument. (decl_name): Mark variable `verbosity' with ATTRIBUTE_UNUSED. (botch): Likewise for variable `s'. (rest_of_type_compilation): Mark variables `type' and `toplev' with ATTRIBUTE_UNUSED if none of DBX_DEBUGGING_INFO, XCOFF_DEBUGGING_INFO or SDB_DEBUGGING_INFO are defined. (display_help): Make variable `i' an `unsigned long'. (main): Remove unused parameter `envp'. Cast assignment to `lang_expand_expr' to a `lang_expand_expr_t'. Cast -1 when comparing it with a `size_t'. * toplev.h (fatal, fatal_io_error, pfatal_with_name): Mark prototype with ATTRIBUTE_NORETURN. (fatal_insn_not_found, fatal_insn, really_sorry, push_float_handler, pop_float_handler): Add prototypes. (fancy_abort): Mark prototype with ATTRIBUTE_NORETURN. (do_abort, botch): Add prototypes. From-SVN: r22293
-rw-r--r--gcc/ChangeLog41
-rw-r--r--gcc/Makefile.in8
-rw-r--r--gcc/gansidecl.h4
-rw-r--r--gcc/genattrtab.c1
-rw-r--r--gcc/genextract.c3
-rw-r--r--gcc/rtl.h4
-rw-r--r--gcc/toplev.c51
-rw-r--r--gcc/toplev.h18
8 files changed, 96 insertions, 34 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b8d82d6..ca39466 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,44 @@
+Sun Sep 6 08:54:14 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (toplev.o): Depend on $(EXPR_H).
+ (insn-extract.o, insn-attrtab.o): Depend on toplev.h.
+
+ * gansidecl.h: Define ATTRIBUTE_NORETURN.
+
+ * genattrtab.c: Have insn-attrtab.c include toplev.h.
+
+ * genextract.c: Have insn-extract.c include toplev.h.
+
+ * rtl.h: Don't prototype `fatal_insn_not_found' and `fatal_insn'.
+
+ * toplev.c: Include expr.h.
+ (really_sorry, fancy_abort): Remove prototypes.
+ (set_target_switch): Add argument in prototype.
+ (vfatal): Mark prototype with ATTRIBUTE_NORETURN.
+ (v_really_sorry): Likewise.
+ (print_version, print_single_switch, print_switch_values): Make
+ static and add prototype arguments.
+ (decl_printable_name): Add prototype arguments.
+ (lang_expand_expr_t): New typedef.
+ (lang_expand_expr): Declare as a lang_expand_expr_t.
+ (incomplete_decl_finalize_hook): Add prototype argument.
+ (decl_name): Mark variable `verbosity' with ATTRIBUTE_UNUSED.
+ (botch): Likewise for variable `s'.
+ (rest_of_type_compilation): Mark variables `type' and `toplev'
+ with ATTRIBUTE_UNUSED if none of DBX_DEBUGGING_INFO,
+ XCOFF_DEBUGGING_INFO or SDB_DEBUGGING_INFO are defined.
+ (display_help): Make variable `i' an `unsigned long'.
+ (main): Remove unused parameter `envp'.
+ Cast assignment to `lang_expand_expr' to a `lang_expand_expr_t'.
+ Cast -1 when comparing it with a `size_t'.
+
+ * toplev.h (fatal, fatal_io_error, pfatal_with_name): Mark
+ prototype with ATTRIBUTE_NORETURN.
+ (fatal_insn_not_found, fatal_insn, really_sorry,
+ push_float_handler, pop_float_handler): Add prototypes.
+ (fancy_abort): Mark prototype with ATTRIBUTE_NORETURN.
+ (do_abort, botch): Add prototypes.
+
Sat Sep 6 12:05:18 1998 John Carr <jfc@mit.edu>
* final.c (final): If a label is reached only from a single jump,
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 5ee2320..50a959e 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1400,7 +1400,7 @@ fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
insn-codes.h insn-config.h $(RECOG_H) Makefile toplev.h dwarfout.h \
- dwarf2out.h sdbout.h dbxout.h \
+ dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \
$(lang_options_files)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
-DTARGET_NAME=\"$(target_alias)\" \
@@ -1626,7 +1626,7 @@ s-opinit : $(md_file) genopinit $(srcdir)/move-if-change
$(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
touch s-opinit
-insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h
+insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h toplev.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
insn-extract.c: s-extract ; @true
@@ -1644,8 +1644,8 @@ s-peep : $(md_file) genpeep $(srcdir)/move-if-change
$(srcdir)/move-if-change tmp-peep.c insn-peep.c
touch s-peep
-insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h output.h \
- insn-attr.h insn-config.h system.h
+insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h \
+ output.h insn-attr.h insn-config.h system.h toplev.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
insn-attr.h: s-attr ; @true
diff --git a/gcc/gansidecl.h b/gcc/gansidecl.h
index 4f4bb42..f932640 100644
--- a/gcc/gansidecl.h
+++ b/gcc/gansidecl.h
@@ -54,6 +54,10 @@ Boston, MA 02111-1307, USA. */
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif /* ATTRIBUTE_UNUSED */
+#ifndef ATTRIBUTE_NORETURN
+#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#endif /* ATTRIBUTE_NORETURN */
+
#ifndef ATTRIBUTE_PRINTF
#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((format (__printf__, m, n)))
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index adf0749..cb75eaa 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -6000,6 +6000,7 @@ from the machine description file `md'. */\n\n");
printf ("#include \"real.h\"\n");
printf ("#include \"output.h\"\n");
printf ("#include \"insn-attr.h\"\n");
+ printf ("#include \"toplev.h\"\n");
printf ("\n");
printf ("#define operands recog_operand\n\n");
diff --git a/gcc/genextract.c b/gcc/genextract.c
index dfc2ac2..6b64077 100644
--- a/gcc/genextract.c
+++ b/gcc/genextract.c
@@ -458,7 +458,8 @@ from the machine description file `md'. */\n\n");
printf ("#include \"config.h\"\n");
printf ("#include \"system.h\"\n");
- printf ("#include \"rtl.h\"\n\n");
+ printf ("#include \"rtl.h\"\n");
+ printf ("#include \"toplev.h\"\n\n");
/* This variable exists only so it can be the "location"
of any missing operand whose numbers are skipped by a given pattern. */
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 39048a30..eac6671 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1168,10 +1168,6 @@ extern rtx output_constant_def PROTO((union tree_node *));
extern rtx immed_real_const PROTO((union tree_node *));
extern union tree_node *make_tree PROTO((union tree_node *, rtx));
-/* Abort routines */
-extern void fatal_insn_not_found PROTO((rtx));
-extern void fatal_insn PROTO((char *, rtx));
-
/* Define a default value for STORE_FLAG_VALUE. */
#ifndef STORE_FLAG_VALUE
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 7926877..f850cab 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -51,6 +51,7 @@ Boston, MA 02111-1307, USA. */
#include "output.h"
#include "except.h"
#include "toplev.h"
+#include "expr.h"
#ifdef DWARF_DEBUGGING_INFO
#include "dwarfout.h"
@@ -173,9 +174,7 @@ void pedwarn PVPROTO((char *s, ...));
void pedwarn_with_decl PVPROTO((tree decl, char *s, ...));
void pedwarn_with_file_and_line PVPROTO((char *file, int line, char *s, ...));
void sorry PVPROTO((char *s, ...));
-void really_sorry PVPROTO((char *s, ...));
-void fancy_abort ();
-void set_target_switch ();
+static void set_target_switch PROTO((char *));
static char *decl_name PROTO((tree, int));
static void vmessage PROTO((char *, char *, va_list));
static void v_message_with_file_and_line PROTO((char *, int, char *,
@@ -186,7 +185,7 @@ static void v_error_with_file_and_line PROTO((char *, int, char *, va_list));
static void v_error_with_decl PROTO((tree, char *, va_list));
static void v_error_for_asm PROTO((rtx, char *, va_list));
static void verror PROTO((char *, va_list));
-static void vfatal PROTO((char *, va_list));
+static void vfatal PROTO((char *, va_list)) ATTRIBUTE_NORETURN;
static void v_warning_with_file_and_line PROTO ((char *, int, char *, va_list));
static void v_warning_with_decl PROTO((tree, char *, va_list));
static void v_warning_for_asm PROTO((rtx, char *, va_list));
@@ -195,7 +194,7 @@ static void vpedwarn PROTO((char *, va_list));
static void v_pedwarn_with_decl PROTO((tree, char *, va_list));
static void v_pedwarn_with_file_and_line PROTO((char *, int, char *, va_list));
static void vsorry PROTO((char *, va_list));
-static void v_really_sorry PROTO((char *, va_list));
+static void v_really_sorry PROTO((char *, va_list)) ATTRIBUTE_NORETURN;
static void float_signal PROTO((int));
static void pipe_closed PROTO((int));
static void output_lang_identify PROTO((FILE *));
@@ -206,9 +205,11 @@ static void clean_dump_file PROTO((char *));
static void compile_file PROTO((char *));
static void display_help PROTO ((void));
-void print_version ();
-int print_single_switch ();
-void print_switch_values ();
+static void print_version PROTO((FILE *, char *));
+static int print_single_switch PROTO((FILE *, int, int, char *, char *, char *,
+ char *, char *));
+static void print_switch_values PROTO((FILE *, int, int, char *, char *,
+ char *));
/* Length of line when printing switch values. */
#define MAX_LINE 75
@@ -339,16 +340,20 @@ int sorrycount = 0;
2: and any other information that might be interesting, such as function
parameter types in C++. */
-char *(*decl_printable_name) (/* tree decl, int verbosity */);
+char *(*decl_printable_name) PROTO ((tree, int));
/* Pointer to function to compute rtl for a language-specific tree code. */
-struct rtx_def *(*lang_expand_expr) ();
+typedef rtx (*lang_expand_expr_t)
+ PROTO ((union tree_node *, rtx, enum machine_mode,
+ enum expand_modifier modifier));
+
+lang_expand_expr_t lang_expand_expr = 0;
/* Pointer to function to finish handling an incomplete decl at the
end of compilation. */
-void (*incomplete_decl_finalize_hook) () = 0;
+void (*incomplete_decl_finalize_hook) PROTO((tree)) = 0;
/* Highest label number used at the end of reload. */
@@ -1379,7 +1384,7 @@ fatal_insn_not_found (insn)
static char *
decl_name (decl, verbosity)
tree decl;
- int verbosity;
+ int verbosity ATTRIBUTE_UNUSED;
{
return IDENTIFIER_POINTER (DECL_NAME (decl));
}
@@ -2128,7 +2133,7 @@ do_abort ()
void
botch (s)
- char * s;
+ char * s ATTRIBUTE_UNUSED;
{
abort ();
}
@@ -3168,8 +3173,13 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end)
void
rest_of_type_compilation (type, toplev)
+#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO) || defined (SDB_DEBUGGING_INFO)
tree type;
int toplev;
+#else
+ tree type ATTRIBUTE_UNUSED;
+ int toplev ATTRIBUTE_UNUSED;
+#endif
{
#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
@@ -3938,7 +3948,7 @@ static void
display_help ()
{
int undoc;
- long i;
+ unsigned long i;
char * lang;
#ifndef USE_CPPLIB
@@ -4167,10 +4177,9 @@ check_lang_option (option, lang_option)
33 if had nonfatal errors, else success. */
int
-main (argc, argv, envp)
+main (argc, argv)
int argc;
char **argv;
- char **envp;
{
register int i;
char *filename = 0;
@@ -4210,7 +4219,7 @@ main (argc, argv, envp)
#endif
decl_printable_name = decl_name;
- lang_expand_expr = (struct rtx_def *(*)()) do_abort;
+ lang_expand_expr = (lang_expand_expr_t) do_abort;
/* Initialize whether `char' is signed. */
flag_signed_char = DEFAULT_SIGNED_CHAR;
@@ -4314,7 +4323,7 @@ main (argc, argv, envp)
if (check_lang_option (argv[i], documented_lang_options[j].option))
break;
- if (j != -1)
+ if (j != (size_t)-1)
{
/* If the option is valid for *some* language,
treat it as valid even if this language doesn't understand it. */
@@ -4862,7 +4871,7 @@ main (argc, argv, envp)
/* Decode -m switches. */
/* Decode the switch -mNAME. */
-void
+static void
set_target_switch (name)
char *name;
{
@@ -4900,7 +4909,7 @@ set_target_switch (name)
Each line begins with INDENT (for the case where FILE is the
assembler output file). */
-void
+static void
print_version (file, indent)
FILE *file;
char *indent;
@@ -4922,7 +4931,7 @@ print_version (file, indent)
??? We don't handle error returns from fprintf (disk full); presumably
other code will catch a disk full though. */
-int
+static int
print_single_switch (file, pos, max, indent, sep, term, type, name)
FILE *file;
int pos, max;
diff --git a/gcc/toplev.h b/gcc/toplev.h
index d206000..740dda1 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -19,9 +19,13 @@ extern void debug_end_source_file PROTO ((unsigned));
extern void debug_define PROTO ((unsigned, char *));
extern void debug_undef PROTO ((unsigned, char *));
extern void fatal PVPROTO ((char *, ...))
- ATTRIBUTE_PRINTF_1;
-extern void fatal_io_error PROTO ((char *));
-extern void pfatal_with_name PROTO ((char *));
+ ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+extern void fatal_io_error PROTO ((char *)) ATTRIBUTE_NORETURN;
+extern void pfatal_with_name PROTO ((char *)) ATTRIBUTE_NORETURN;
+extern void fatal_insn_not_found PROTO ((struct rtx_def *))
+ ATTRIBUTE_NORETURN;
+extern void fatal_insn PROTO ((char *, struct rtx_def *))
+ ATTRIBUTE_NORETURN;
extern void warning PVPROTO ((char *, ...))
ATTRIBUTE_PRINTF_1;
extern void error PVPROTO ((char *, ...))
@@ -36,6 +40,8 @@ extern void error_with_file_and_line PVPROTO ((char *, int, char *, ...))
ATTRIBUTE_PRINTF_3;
extern void sorry PVPROTO ((char *s, ...))
ATTRIBUTE_PRINTF_1;
+extern void really_sorry PVPROTO((char *s, ...))
+ ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void default_print_error_function PROTO ((char *));
extern void report_error_function PROTO ((char *));
@@ -53,6 +59,8 @@ extern void warning_for_asm PVPROTO((struct rtx_def *, char *, ...))
ATTRIBUTE_PRINTF_2;
#ifdef _JBLEN
extern void set_float_handler PROTO((jmp_buf));
+extern int push_float_handler PROTO((jmp_buf, jmp_buf));
+extern void pop_float_handler PROTO((int, jmp_buf));
#endif
#ifdef BUFSIZ
@@ -60,6 +68,8 @@ extern void output_quoted_string PROTO ((FILE *, char *));
extern void output_file_directive PROTO ((FILE *, char *));
#endif
-extern void fancy_abort PROTO ((void));
+extern void fancy_abort PROTO ((void)) ATTRIBUTE_NORETURN;
+extern void do_abort PROTO ((void)) ATTRIBUTE_NORETURN;
+extern void botch PROTO ((char *)) ATTRIBUTE_NORETURN;
#endif /* __GCC_TOPLEV_H */