Add ATTRIBUTE_NORETURN in a bunch of places:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 1998 10:37:09 +0000 (10:37 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 1998 10:37:09 +0000 (10:37 +0000)
* cppalloc.c (memory_full): Mark function prototype with
ATTRIBUTE_NORETURN.
* demangle.h (collect_exit): Likewise.
* fix-header.c (v_fatal, fatal): Likewise.
* gcc.c (pfatal_with_name, pfatal_pexecute, fatal, fancy_abort):
Likewise.
* gcov.c (print_usage): Likewise.
* genattr.c (fatal, fancy_abort): Likewise.
* genattrtab.c (fatal, fancy_abort): Likewise.
* gencodes.c (fatal, fancy_abort): Likewise.
* genconfig.c (fatal, fancy_abort): Likewise.
* genemit.c (fatal, fancy_abort): Likewise.
* genextract.c (fatal, fancy_abort): Likewise.
* genflags.c (fatal, fancy_abort): Likewise.
* genopinit.c (fatal, fancy_abort): Likewise.
* genoutput.c (fatal, fancy_abort): Likewise.
* genpeep.c (fatal, fancy_abort): Likewise.
* genrecog.c (fatal, fancy_abort): Likewise.
* libgcc2.c (__eprintf, __default_terminate, __sjthrow,
__sjpopnthrow, __throw): Likewise.
* objc/objc-act.c (objc_fatal): Likewise.
* protoize.c (usage, aux_info_corrupted,
declare_source_confusing): Likewise.
* rtl.c (dump_and_abort): Likewise.
* rtl.h (sets_cc0_p): Likewise.
* toplev.c (float_signal, pipe_closed): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23084 138bc75d-0d04-0410-961f-82ee72b054a4

23 files changed:
gcc/ChangeLog
gcc/cppalloc.c
gcc/demangle.h
gcc/fix-header.c
gcc/gcc.c
gcc/gcov.c
gcc/genattr.c
gcc/genattrtab.c
gcc/gencodes.c
gcc/genconfig.c
gcc/genemit.c
gcc/genextract.c
gcc/genflags.c
gcc/genopinit.c
gcc/genoutput.c
gcc/genpeep.c
gcc/genrecog.c
gcc/libgcc2.c
gcc/objc/objc-act.c
gcc/protoize.c
gcc/rtl.c
gcc/rtl.h
gcc/toplev.c

index c568676..3fa3e53 100644 (file)
@@ -1,3 +1,53 @@
+Wed Oct 14 13:26:05 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * cppalloc.c (memory_full): Mark function prototype with
+       ATTRIBUTE_NORETURN.
+
+       * demangle.h (collect_exit): Likewise.
+
+       * fix-header.c (v_fatal, fatal): Likewise.
+
+       * gcc.c (pfatal_with_name, pfatal_pexecute, fatal, fancy_abort):
+       Likewise.
+
+       * gcov.c (print_usage): Likewise.
+
+       * genattr.c (fatal, fancy_abort): Likewise.
+
+       * genattrtab.c (fatal, fancy_abort): Likewise.
+
+       * gencodes.c (fatal, fancy_abort): Likewise.
+
+       * genconfig.c (fatal, fancy_abort): Likewise.
+
+       * genemit.c (fatal, fancy_abort): Likewise.
+
+       * genextract.c (fatal, fancy_abort): Likewise.
+
+       * genflags.c (fatal, fancy_abort): Likewise.
+
+       * genopinit.c (fatal, fancy_abort): Likewise.
+
+       * genoutput.c (fatal, fancy_abort): Likewise.
+
+       * genpeep.c (fatal, fancy_abort): Likewise.
+
+       * genrecog.c (fatal, fancy_abort): Likewise.
+
+       * libgcc2.c (__eprintf, __default_terminate, __sjthrow,
+       __sjpopnthrow, __throw): Likewise.
+
+       * objc/objc-act.c (objc_fatal): Likewise.
+
+       * protoize.c (usage, aux_info_corrupted,
+       declare_source_confusing): Likewise.
+
+       * rtl.c (dump_and_abort): Likewise.
+
+       * rtl.h (sets_cc0_p): Likewise.
+
+       * toplev.c (float_signal, pipe_closed): Likewise.
+       
 1998-10-14  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
 
        * dwarf2out.c (expand_builtin_dwarf_reg_size): Look at all ranges
index bd3a605..8f77cc7 100644 (file)
@@ -27,6 +27,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #include "gansidecl.h"
 #include "cpplib.h"
 
+static void memory_full PROTO ((void)) ATTRIBUTE_NORETURN;
+
 static void
 memory_full ()
 {
index 1e1e705..9fdd80d 100644 (file)
@@ -94,7 +94,7 @@ extern void
 collect_execute PARAMS ((char *, char **, char *));
 
 extern void
-collect_exit PARAMS ((int));
+collect_exit PARAMS ((int)) ATTRIBUTE_NORETURN;
 
 extern int
 collect_wait PARAMS ((char *));
index 698c69d..ffeede5 100644 (file)
@@ -78,7 +78,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "cpplib.h"
 #include "cpphash.h"
 
-void fatal PVPROTO ((const char *, ...)) ATTRIBUTE_PRINTF_1;
+static void v_fatal PROTO ((const char *, va_list)) ATTRIBUTE_NORETURN;
+void fatal PVPROTO ((const char *, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
 
 sstring buf;
 
index b974012..47a2362 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -235,14 +235,14 @@ static int used_arg               PROTO((char *, int));
 static int default_arg         PROTO((char *, int));
 static void set_multilib_dir   PROTO((void));
 static void print_multilib_info        PROTO((void));
-static void pfatal_with_name   PROTO((char *));
+static void pfatal_with_name   PROTO((char *)) ATTRIBUTE_NORETURN;
 static void perror_with_name   PROTO((char *));
-static void pfatal_pexecute    PROTO((char *, char *));
-static void fatal              PVPROTO((char *, ...));
+static void pfatal_pexecute    PROTO((char *, char *)) ATTRIBUTE_NORETURN;
+static void fatal              PVPROTO((char *, ...)) ATTRIBUTE_NORETURN;
 static void error              PVPROTO((char *, ...));
 static void display_help       PROTO((void));
 
-void fancy_abort ();
+void fancy_abort               PROTO((void)) ATTRIBUTE_NORETURN;
 char *xmalloc ();
 char *xrealloc ();
 
index 4fecf00..bbf9112 100644 (file)
@@ -218,7 +218,7 @@ static void open_files PROTO ((void));
 static void read_files PROTO ((void));
 static void scan_for_source_files PROTO ((void));
 static void output_data PROTO ((void));
-static void print_usage PROTO ((void));
+static void print_usage PROTO ((void)) ATTRIBUTE_NORETURN;
 char * xmalloc ();
 
 int
index 191e274..9c062b5 100644 (file)
@@ -32,8 +32,9 @@ struct obstack *rtl_obstack = &obstack;
 #define obstack_chunk_free free
 
 char *xmalloc PROTO((unsigned));
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
-void fancy_abort PROTO((void));
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
 
 /* Define this so we can link with print-rtl.o to get debug_rtx function.  */
 char **insn_name_ptr = 0;
index 40bb38b..593fb26 100644 (file)
@@ -119,8 +119,9 @@ struct obstack *temp_obstack = &obstack2;
 /* Define this so we can link with print-rtl.o to get debug_rtx function.  */
 char **insn_name_ptr = 0;
 
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
-void fancy_abort PROTO((void));
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
 
 /* enough space to reserve for printing out ints */
 #define MAX_DIGITS (HOST_BITS_PER_INT * 3 / 10 + 3)
index 725cc65..429e463 100644 (file)
@@ -34,8 +34,9 @@ struct obstack *rtl_obstack = &obstack;
 #define obstack_chunk_free free
 
 char *xmalloc PROTO((unsigned));
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
-void fancy_abort PROTO((void));
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
 
 /* Define this so we can link with print-rtl.o to get debug_rtx function.  */
 char **insn_name_ptr = 0;
index 75693c1..3e070a9 100644 (file)
@@ -50,8 +50,9 @@ static int clobbers_seen_this_insn;
 static int dup_operands_seen_this_insn;
 
 char *xmalloc PROTO((unsigned));
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
-void fancy_abort PROTO((void));
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
 
 static void walk_insn_part PROTO((rtx, int, int));
 static void gen_insn PROTO((rtx));
index d13ff5e..c9e2836 100644 (file)
@@ -31,8 +31,9 @@ struct obstack *rtl_obstack = &obstack;
 #define obstack_chunk_free free
 
 char *xmalloc PROTO((unsigned));
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
-void fancy_abort PROTO((void));
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
 
 /* Define this so we can link with print-rtl.o to get debug_rtx function.  */
 char **insn_name_ptr = 0;
index 6b64077..991d1d0 100644 (file)
@@ -100,10 +100,11 @@ static void walk_rtx PROTO ((rtx, char *));
 static void print_path PROTO ((char *));
 char *xmalloc PROTO ((unsigned));
 char *xrealloc PROTO ((char *, unsigned));
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
 static char *copystr PROTO ((char *));
 static void mybzero ();
-void fancy_abort PROTO ((void));
+void fancy_abort PROTO ((void)) ATTRIBUTE_NORETURN;
 \f
 static void
 gen_insn (insn)
index dee8128..c9214ab 100644 (file)
@@ -34,8 +34,9 @@ struct obstack *rtl_obstack = &obstack;
 #define obstack_chunk_free free
 
 char *xmalloc PROTO((unsigned));
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
-void fancy_abort PROTO((void));
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
 
 /* Names for patterns.  Need to allow linking with print-rtl.  */
 char **insn_name_ptr;
index f0b57bb..c8d7859 100644 (file)
@@ -31,8 +31,9 @@ struct obstack *rtl_obstack = &obstack;
 #define obstack_chunk_free free
 
 char *xmalloc PROTO((unsigned));
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
-void fancy_abort PROTO((void));
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
 
 /* Many parts of GCC use arrays that are indexed by machine mode and
    contain the insn codes for pattern in the MD file that perform a given
index 400a8be..89a37df 100644 (file)
@@ -108,8 +108,9 @@ struct obstack *rtl_obstack = &obstack;
 #define obstack_chunk_free free
 
 char *xmalloc PROTO((unsigned));
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
-void fancy_abort PROTO((void));
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
 static void error PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
 static void mybcopy ();
 static void mybzero ();
index 99fcec5..076f760 100644 (file)
@@ -47,8 +47,9 @@ struct link
 };
 
 char *xmalloc PROTO((unsigned));
-static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
-void fancy_abort PROTO((void));
+static void fatal PVPROTO ((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
 
 static int max_opno;
 
index 6ea513c..5c1046a 100644 (file)
@@ -191,10 +191,11 @@ static void change_state  PROTO((char *, char *, int));
 static char *copystr           PROTO((char *));
 static void mybzero            PROTO((char *, unsigned));
 static void mybcopy            PROTO((char *, char *, unsigned));
-static void fatal              PVPROTO((char *, ...)) ATTRIBUTE_PRINTF_1;
+static void fatal              PVPROTO((char *, ...))
+  ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
 char *xrealloc                 PROTO((char *, unsigned));
 char *xmalloc                  PROTO((unsigned));
-void fancy_abort               PROTO((void));
+void fancy_abort               PROTO((void)) ATTRIBUTE_NORETURN;
 \f
 /* Construct and return a sequence of decisions
    that will recognize INSN.
index 586aa2c..09e3c71 100644 (file)
@@ -1403,6 +1403,9 @@ __builtin_saveregs ()
 #undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch.  */
 #include <stdio.h>
 /* This is used by the `assert' macro.  */
+extern void __eprintf (const char *, const char *, unsigned int, const char *)
+  __attribute__ ((__noreturn__));
+
 void
 __eprintf (const char *string, const char *expression,
           unsigned int line, const char *filename)
@@ -3023,6 +3026,8 @@ int atexit (func_ptr func)
 
 /* Shared exception handling support routines.  */
 
+extern void __default_terminate (void) __attribute__ ((__noreturn__));
+
 void
 __default_terminate ()
 {
@@ -3226,6 +3231,8 @@ __get_dynamic_handler_chain ()
    dynamic handler chain, and use longjmp to transfer back to the associated
    handler.  */
 
+extern void __sjthrow (void) __attribute__ ((__noreturn__));
+
 void
 __sjthrow ()
 {
@@ -3302,6 +3309,8 @@ __sjthrow ()
    then throw.  This is used to skip the first handler, and transfer
    control to the next handler in the dynamic handler stack.  */
 
+extern void __sjpopnthrow (void) __attribute__ ((__noreturn__));
+
 void
 __sjpopnthrow ()
 {
@@ -3628,6 +3637,8 @@ next_stack_level (void *pc, frame_state *udata, frame_state *caller_udata)
    If we find one, then we unwind the frames down to the one that
    has the handler and transfer control into the handler.  */
 
+extern void __throw(void) __attribute__ ((__noreturn__));
+
 void
 __throw ()
 {
index 94c10bc..9f8bc51 100644 (file)
@@ -284,7 +284,8 @@ static void dump_interface                  PROTO((FILE *, tree));
 
 /* Everything else.  */
 
-static void objc_fatal                         PROTO((void));
+static void objc_fatal                         PROTO((void))
+  ATTRIBUTE_NORETURN;
 static tree define_decl                                PROTO((tree, tree));
 static tree lookup_method_in_protocol_list     PROTO((tree, tree, int));
 static tree lookup_protocol_in_reflist         PROTO((tree, tree));
index 73d8cab..3ba8b96 100644 (file)
@@ -121,6 +121,10 @@ extern int pwait PROTO ((int, int *, int));
 #define PEXECUTE_LAST   2
 #define PEXECUTE_SEARCH 4
 
+static void usage PROTO ((void)) ATTRIBUTE_NORETURN;
+static void aux_info_corrupted PROTO ((void)) ATTRIBUTE_NORETURN;
+static void declare_source_confusing PROTO ((const char *)) ATTRIBUTE_NORETURN;
+
 /* Aliases for pointers to void.
    These were made to facilitate compilation with old brain-dead DEC C
    compilers which didn't properly grok `void*' types.  */
index 1929459..2201c40 100644 (file)
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -195,7 +195,7 @@ char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
                          "REG_BR_PRED", "REG_EH_CONTEXT",
                          "REG_FRAME_RELATED_EXPR" };
 
-static void dump_and_abort     PROTO((int, int, FILE *));
+static void dump_and_abort     PROTO((int, int, FILE *)) ATTRIBUTE_NORETURN;
 static void read_name          PROTO((char *, FILE *));
 \f
 /* Allocate an rtx vector of N elements.
index 3c78edc..7a02593 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1242,7 +1242,11 @@ extern void cse_end_of_basic_block       PROTO ((rtx,
 extern int comparison_dominates_p      PROTO ((enum rtx_code, enum rtx_code));
 extern int condjump_p                  PROTO ((rtx));
 extern int simplejump_p                        PROTO ((rtx));
-extern int sets_cc0_p                  PROTO ((rtx));
+extern int sets_cc0_p                  PROTO ((rtx))
+#ifndef HAVE_cc0
+  ATTRIBUTE_NORETURN
+#endif
+  ;
 extern int invert_jump                 PROTO ((rtx, rtx));
 extern int rtx_renumbered_equal_p      PROTO ((rtx, rtx));
 extern int true_regnum                 PROTO ((rtx));
index 8e777b1..23428ab 100644 (file)
@@ -195,8 +195,8 @@ 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)) ATTRIBUTE_NORETURN;
-static void float_signal PROTO((int));
-static void pipe_closed PROTO((int));
+static void float_signal PROTO((int)) ATTRIBUTE_NORETURN;
+static void pipe_closed PROTO((int)) ATTRIBUTE_NORETURN;
 static void output_lang_identify PROTO((FILE *));
 static void open_dump_file PROTO((char *, char *));
 static void close_dump_file PROTO((void (*) (FILE *, rtx), rtx));