diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-14 10:37:09 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-14 10:37:09 +0000 |
commit | bbe68b805cb0e11330b1679c7750f3463988314e (patch) | |
tree | 45dc8fa31accc97f689780edab32eb15d9b3b9f0 | |
parent | e4aaf772b0abbf30c4f609879b927d334102d09a (diff) | |
download | gcc-bbe68b805cb0e11330b1679c7750f3463988314e.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23084 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 50 | ||||
-rw-r--r-- | gcc/cppalloc.c | 2 | ||||
-rw-r--r-- | gcc/demangle.h | 2 | ||||
-rw-r--r-- | gcc/fix-header.c | 3 | ||||
-rw-r--r-- | gcc/gcc.c | 8 | ||||
-rw-r--r-- | gcc/gcov.c | 2 | ||||
-rw-r--r-- | gcc/genattr.c | 5 | ||||
-rw-r--r-- | gcc/genattrtab.c | 5 | ||||
-rw-r--r-- | gcc/gencodes.c | 5 | ||||
-rw-r--r-- | gcc/genconfig.c | 5 | ||||
-rw-r--r-- | gcc/genemit.c | 5 | ||||
-rw-r--r-- | gcc/genextract.c | 5 | ||||
-rw-r--r-- | gcc/genflags.c | 5 | ||||
-rw-r--r-- | gcc/genopinit.c | 5 | ||||
-rw-r--r-- | gcc/genoutput.c | 5 | ||||
-rw-r--r-- | gcc/genpeep.c | 5 | ||||
-rw-r--r-- | gcc/genrecog.c | 5 | ||||
-rw-r--r-- | gcc/libgcc2.c | 11 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 3 | ||||
-rw-r--r-- | gcc/protoize.c | 4 | ||||
-rw-r--r-- | gcc/rtl.c | 2 | ||||
-rw-r--r-- | gcc/rtl.h | 6 | ||||
-rw-r--r-- | gcc/toplev.c | 4 |
23 files changed, 118 insertions, 34 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c5686762464..3fa3e53946f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/cppalloc.c b/gcc/cppalloc.c index bd3a6051971..8f77cc7025b 100644 --- a/gcc/cppalloc.c +++ b/gcc/cppalloc.c @@ -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 () { diff --git a/gcc/demangle.h b/gcc/demangle.h index 1e1e705512a..9fdd80df95e 100644 --- a/gcc/demangle.h +++ b/gcc/demangle.h @@ -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 *)); diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 698c69de80b..ffeede58362 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -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; diff --git a/gcc/gcc.c b/gcc/gcc.c index b9740129884..47a2362682d 100644 --- 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 (); diff --git a/gcc/gcov.c b/gcc/gcov.c index 4fecf0012eb..bbf91127f43 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -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 diff --git a/gcc/genattr.c b/gcc/genattr.c index 191e27486c5..9c062b5d112 100644 --- a/gcc/genattr.c +++ b/gcc/genattr.c @@ -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; diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 40bb38ba03c..593fb26da14 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -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) diff --git a/gcc/gencodes.c b/gcc/gencodes.c index 725cc651e69..429e4635f4d 100644 --- a/gcc/gencodes.c +++ b/gcc/gencodes.c @@ -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; diff --git a/gcc/genconfig.c b/gcc/genconfig.c index 75693c1fb65..3e070a99f9c 100644 --- a/gcc/genconfig.c +++ b/gcc/genconfig.c @@ -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)); diff --git a/gcc/genemit.c b/gcc/genemit.c index d13ff5e35b2..c9e2836cc5a 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -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; diff --git a/gcc/genextract.c b/gcc/genextract.c index 6b64077c026..991d1d0a5e5 100644 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -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; static void gen_insn (insn) diff --git a/gcc/genflags.c b/gcc/genflags.c index dee8128a9c2..c9214abdc9c 100644 --- a/gcc/genflags.c +++ b/gcc/genflags.c @@ -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; diff --git a/gcc/genopinit.c b/gcc/genopinit.c index f0b57bb9be9..c8d7859e978 100644 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -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 diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 400a8be442b..89a37df080a 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -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 (); diff --git a/gcc/genpeep.c b/gcc/genpeep.c index 99fcec54ce5..076f7603560 100644 --- a/gcc/genpeep.c +++ b/gcc/genpeep.c @@ -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; diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 6ea513c6547..5c1046a6b24 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -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; /* Construct and return a sequence of decisions that will recognize INSN. diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 586aa2c7a6d..09e3c7143ea 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -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 () { diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 94c10bcd229..9f8bc51a21a 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -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)); diff --git a/gcc/protoize.c b/gcc/protoize.c index 73d8caba390..3ba8b96be8b 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -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. */ diff --git a/gcc/rtl.c b/gcc/rtl.c index 1929459a8ff..2201c408d33 100644 --- 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 *)); /* Allocate an rtx vector of N elements. diff --git a/gcc/rtl.h b/gcc/rtl.h index 3c78edc4277..7a0259305c3 100644 --- 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)); diff --git a/gcc/toplev.c b/gcc/toplev.c index 8e777b18ccc..23428abbf6b 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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)); |