Commit bf94d1ec by Kaveh R. Ghazi Committed by Kaveh Ghazi

Add ATTRIBUTE_NORETURN in a bunch of places:

	* 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.

From-SVN: r23084
parent c9ab1458
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> 1998-10-14 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* dwarf2out.c (expand_builtin_dwarf_reg_size): Look at all ranges * dwarf2out.c (expand_builtin_dwarf_reg_size): Look at all ranges
......
...@@ -27,6 +27,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -27,6 +27,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "gansidecl.h" #include "gansidecl.h"
#include "cpplib.h" #include "cpplib.h"
static void memory_full PROTO ((void)) ATTRIBUTE_NORETURN;
static void static void
memory_full () memory_full ()
{ {
......
...@@ -94,7 +94,7 @@ extern void ...@@ -94,7 +94,7 @@ extern void
collect_execute PARAMS ((char *, char **, char *)); collect_execute PARAMS ((char *, char **, char *));
extern void extern void
collect_exit PARAMS ((int)); collect_exit PARAMS ((int)) ATTRIBUTE_NORETURN;
extern int extern int
collect_wait PARAMS ((char *)); collect_wait PARAMS ((char *));
......
...@@ -78,7 +78,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -78,7 +78,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "cpplib.h" #include "cpplib.h"
#include "cpphash.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; sstring buf;
......
...@@ -235,14 +235,14 @@ static int used_arg PROTO((char *, int)); ...@@ -235,14 +235,14 @@ static int used_arg PROTO((char *, int));
static int default_arg PROTO((char *, int)); static int default_arg PROTO((char *, int));
static void set_multilib_dir PROTO((void)); static void set_multilib_dir PROTO((void));
static void print_multilib_info 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 perror_with_name PROTO((char *));
static void pfatal_pexecute PROTO((char *, char *)); static void pfatal_pexecute PROTO((char *, char *)) ATTRIBUTE_NORETURN;
static void fatal PVPROTO((char *, ...)); static void fatal PVPROTO((char *, ...)) ATTRIBUTE_NORETURN;
static void error PVPROTO((char *, ...)); static void error PVPROTO((char *, ...));
static void display_help PROTO((void)); static void display_help PROTO((void));
void fancy_abort (); void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
char *xmalloc (); char *xmalloc ();
char *xrealloc (); char *xrealloc ();
......
...@@ -218,7 +218,7 @@ static void open_files PROTO ((void)); ...@@ -218,7 +218,7 @@ static void open_files PROTO ((void));
static void read_files PROTO ((void)); static void read_files PROTO ((void));
static void scan_for_source_files PROTO ((void)); static void scan_for_source_files PROTO ((void));
static void output_data PROTO ((void)); static void output_data PROTO ((void));
static void print_usage PROTO ((void)); static void print_usage PROTO ((void)) ATTRIBUTE_NORETURN;
char * xmalloc (); char * xmalloc ();
int int
......
...@@ -32,8 +32,9 @@ struct obstack *rtl_obstack = &obstack; ...@@ -32,8 +32,9 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_free free #define obstack_chunk_free free
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void fatal PVPROTO ((char *, ...))
void fancy_abort PROTO((void)); 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. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
char **insn_name_ptr = 0; char **insn_name_ptr = 0;
......
...@@ -119,8 +119,9 @@ struct obstack *temp_obstack = &obstack2; ...@@ -119,8 +119,9 @@ struct obstack *temp_obstack = &obstack2;
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
char **insn_name_ptr = 0; char **insn_name_ptr = 0;
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void fatal PVPROTO ((char *, ...))
void fancy_abort PROTO((void)); ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
/* enough space to reserve for printing out ints */ /* enough space to reserve for printing out ints */
#define MAX_DIGITS (HOST_BITS_PER_INT * 3 / 10 + 3) #define MAX_DIGITS (HOST_BITS_PER_INT * 3 / 10 + 3)
......
...@@ -34,8 +34,9 @@ struct obstack *rtl_obstack = &obstack; ...@@ -34,8 +34,9 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_free free #define obstack_chunk_free free
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void fatal PVPROTO ((char *, ...))
void fancy_abort PROTO((void)); 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. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
char **insn_name_ptr = 0; char **insn_name_ptr = 0;
......
...@@ -50,8 +50,9 @@ static int clobbers_seen_this_insn; ...@@ -50,8 +50,9 @@ static int clobbers_seen_this_insn;
static int dup_operands_seen_this_insn; static int dup_operands_seen_this_insn;
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void fatal PVPROTO ((char *, ...))
void fancy_abort PROTO((void)); ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
static void walk_insn_part PROTO((rtx, int, int)); static void walk_insn_part PROTO((rtx, int, int));
static void gen_insn PROTO((rtx)); static void gen_insn PROTO((rtx));
......
...@@ -31,8 +31,9 @@ struct obstack *rtl_obstack = &obstack; ...@@ -31,8 +31,9 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_free free #define obstack_chunk_free free
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void fatal PVPROTO ((char *, ...))
void fancy_abort PROTO((void)); 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. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
char **insn_name_ptr = 0; char **insn_name_ptr = 0;
......
...@@ -100,10 +100,11 @@ static void walk_rtx PROTO ((rtx, char *)); ...@@ -100,10 +100,11 @@ static void walk_rtx PROTO ((rtx, char *));
static void print_path PROTO ((char *)); static void print_path PROTO ((char *));
char *xmalloc PROTO ((unsigned)); char *xmalloc PROTO ((unsigned));
char *xrealloc PROTO ((char *, 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 char *copystr PROTO ((char *));
static void mybzero (); static void mybzero ();
void fancy_abort PROTO ((void)); void fancy_abort PROTO ((void)) ATTRIBUTE_NORETURN;
static void static void
gen_insn (insn) gen_insn (insn)
......
...@@ -34,8 +34,9 @@ struct obstack *rtl_obstack = &obstack; ...@@ -34,8 +34,9 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_free free #define obstack_chunk_free free
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void fatal PVPROTO ((char *, ...))
void fancy_abort PROTO((void)); ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
/* Names for patterns. Need to allow linking with print-rtl. */ /* Names for patterns. Need to allow linking with print-rtl. */
char **insn_name_ptr; char **insn_name_ptr;
......
...@@ -31,8 +31,9 @@ struct obstack *rtl_obstack = &obstack; ...@@ -31,8 +31,9 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_free free #define obstack_chunk_free free
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void fatal PVPROTO ((char *, ...))
void fancy_abort PROTO((void)); 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 /* 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 contain the insn codes for pattern in the MD file that perform a given
......
...@@ -108,8 +108,9 @@ struct obstack *rtl_obstack = &obstack; ...@@ -108,8 +108,9 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_free free #define obstack_chunk_free free
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void fatal PVPROTO ((char *, ...))
void fancy_abort PROTO((void)); ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
static void error PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void error PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
static void mybcopy (); static void mybcopy ();
static void mybzero (); static void mybzero ();
......
...@@ -47,8 +47,9 @@ struct link ...@@ -47,8 +47,9 @@ struct link
}; };
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void fatal PVPROTO ((char *, ...))
void fancy_abort PROTO((void)); ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
static int max_opno; static int max_opno;
......
...@@ -191,10 +191,11 @@ static void change_state PROTO((char *, char *, int)); ...@@ -191,10 +191,11 @@ static void change_state PROTO((char *, char *, int));
static char *copystr PROTO((char *)); static char *copystr PROTO((char *));
static void mybzero PROTO((char *, unsigned)); static void mybzero PROTO((char *, unsigned));
static void mybcopy PROTO((char *, 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 *xrealloc PROTO((char *, unsigned));
char *xmalloc PROTO((unsigned)); char *xmalloc PROTO((unsigned));
void fancy_abort PROTO((void)); void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
/* Construct and return a sequence of decisions /* Construct and return a sequence of decisions
that will recognize INSN. that will recognize INSN.
......
...@@ -1403,6 +1403,9 @@ __builtin_saveregs () ...@@ -1403,6 +1403,9 @@ __builtin_saveregs ()
#undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch. */ #undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch. */
#include <stdio.h> #include <stdio.h>
/* This is used by the `assert' macro. */ /* This is used by the `assert' macro. */
extern void __eprintf (const char *, const char *, unsigned int, const char *)
__attribute__ ((__noreturn__));
void void
__eprintf (const char *string, const char *expression, __eprintf (const char *string, const char *expression,
unsigned int line, const char *filename) unsigned int line, const char *filename)
...@@ -3023,6 +3026,8 @@ int atexit (func_ptr func) ...@@ -3023,6 +3026,8 @@ int atexit (func_ptr func)
/* Shared exception handling support routines. */ /* Shared exception handling support routines. */
extern void __default_terminate (void) __attribute__ ((__noreturn__));
void void
__default_terminate () __default_terminate ()
{ {
...@@ -3226,6 +3231,8 @@ __get_dynamic_handler_chain () ...@@ -3226,6 +3231,8 @@ __get_dynamic_handler_chain ()
dynamic handler chain, and use longjmp to transfer back to the associated dynamic handler chain, and use longjmp to transfer back to the associated
handler. */ handler. */
extern void __sjthrow (void) __attribute__ ((__noreturn__));
void void
__sjthrow () __sjthrow ()
{ {
...@@ -3302,6 +3309,8 @@ __sjthrow () ...@@ -3302,6 +3309,8 @@ __sjthrow ()
then throw. This is used to skip the first handler, and transfer then throw. This is used to skip the first handler, and transfer
control to the next handler in the dynamic handler stack. */ control to the next handler in the dynamic handler stack. */
extern void __sjpopnthrow (void) __attribute__ ((__noreturn__));
void void
__sjpopnthrow () __sjpopnthrow ()
{ {
...@@ -3628,6 +3637,8 @@ next_stack_level (void *pc, frame_state *udata, frame_state *caller_udata) ...@@ -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 If we find one, then we unwind the frames down to the one that
has the handler and transfer control into the handler. */ has the handler and transfer control into the handler. */
extern void __throw(void) __attribute__ ((__noreturn__));
void void
__throw () __throw ()
{ {
......
...@@ -284,7 +284,8 @@ static void dump_interface PROTO((FILE *, tree)); ...@@ -284,7 +284,8 @@ static void dump_interface PROTO((FILE *, tree));
/* Everything else. */ /* 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 define_decl PROTO((tree, tree));
static tree lookup_method_in_protocol_list PROTO((tree, tree, int)); static tree lookup_method_in_protocol_list PROTO((tree, tree, int));
static tree lookup_protocol_in_reflist PROTO((tree, tree)); static tree lookup_protocol_in_reflist PROTO((tree, tree));
......
...@@ -121,6 +121,10 @@ extern int pwait PROTO ((int, int *, int)); ...@@ -121,6 +121,10 @@ extern int pwait PROTO ((int, int *, int));
#define PEXECUTE_LAST 2 #define PEXECUTE_LAST 2
#define PEXECUTE_SEARCH 4 #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. /* Aliases for pointers to void.
These were made to facilitate compilation with old brain-dead DEC C These were made to facilitate compilation with old brain-dead DEC C
compilers which didn't properly grok `void*' types. */ compilers which didn't properly grok `void*' types. */
......
...@@ -195,7 +195,7 @@ char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0", ...@@ -195,7 +195,7 @@ char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
"REG_BR_PRED", "REG_EH_CONTEXT", "REG_BR_PRED", "REG_EH_CONTEXT",
"REG_FRAME_RELATED_EXPR" }; "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 *)); static void read_name PROTO((char *, FILE *));
/* Allocate an rtx vector of N elements. /* Allocate an rtx vector of N elements.
......
...@@ -1242,7 +1242,11 @@ extern void cse_end_of_basic_block PROTO ((rtx, ...@@ -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 comparison_dominates_p PROTO ((enum rtx_code, enum rtx_code));
extern int condjump_p PROTO ((rtx)); extern int condjump_p PROTO ((rtx));
extern int simplejump_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 invert_jump PROTO ((rtx, rtx));
extern int rtx_renumbered_equal_p PROTO ((rtx, rtx)); extern int rtx_renumbered_equal_p PROTO ((rtx, rtx));
extern int true_regnum PROTO ((rtx)); extern int true_regnum PROTO ((rtx));
......
...@@ -195,8 +195,8 @@ static void v_pedwarn_with_decl PROTO((tree, char *, va_list)); ...@@ -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 v_pedwarn_with_file_and_line PROTO((char *, int, char *, va_list));
static void vsorry PROTO((char *, va_list)); static void vsorry PROTO((char *, va_list));
static void v_really_sorry PROTO((char *, va_list)) ATTRIBUTE_NORETURN; static void v_really_sorry PROTO((char *, va_list)) ATTRIBUTE_NORETURN;
static void float_signal PROTO((int)); static void float_signal PROTO((int)) ATTRIBUTE_NORETURN;
static void pipe_closed PROTO((int)); static void pipe_closed PROTO((int)) ATTRIBUTE_NORETURN;
static void output_lang_identify PROTO((FILE *)); static void output_lang_identify PROTO((FILE *));
static void open_dump_file PROTO((char *, char *)); static void open_dump_file PROTO((char *, char *));
static void close_dump_file PROTO((void (*) (FILE *, rtx), rtx)); static void close_dump_file PROTO((void (*) (FILE *, rtx), rtx));
......
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