This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] declare abort in tsystem.h for inhibit_libc case


This patch adds a declaration for abort to remove libgcc2 build warnings
when compiling with inhibit_libc.

./xgcc -B./ -B/home/dje/gnu/rel/play/m32r-elf/bin/ -isystem /home/dje/gnu/rel/play/m32r-elf/include -isystem /home/dje/gnu/rel/play/m32r-elf/sys-include -L/samantha/gnu-build/m32r/bgcc/gcc/../ld -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -G 0 -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc/../include  -msdata=sdata -DL_addvsi3 -c ../../gcc/gcc/libgcc2.c -o libgcc/./_addvsi3.o
../../gcc/gcc/libgcc2.c: In function `__addvsi3':
../../gcc/gcc/libgcc2.c:87: warning: implicit declaration of function `abort'
[...]

2003-06-12  Doug Evans  <dje@sebabeach.org>

	* tsystem.h (abort): Declare in inhibit_libc case to remove build
	warnings for addvsi3, et.al.

Index: tsystem.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tsystem.h,v
retrieving revision 1.9
diff -u -p -r1.9 tsystem.h
--- tsystem.h	22 Apr 2003 17:21:04 -0000	1.9
+++ tsystem.h	13 Jun 2003 06:30:14 -0000
@@ -58,6 +58,10 @@ extern void free (void *);
 extern int atexit (void (*)(void));
 #endif
 
+#ifndef abort
+extern void abort (void) __attribute__ ((__noreturn__));
+#endif
+
 #else /* ! inhibit_libc */
 /* We disable this when inhibit_libc, so that gcc can still be built without
    needing header files first.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]