This is the mail archive of the gcc-bugs@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]

PATCH: Protect "abort" prototype


Now that gcc's system.h defines a macro "abort" taking no arguments,
the probably generated prototype in the fixed stdlib.h file conflicts
with this macro. Although this happens only when compiling with
-D__USE_FIXED_PROTOTYPES__, which is not recommended, I think we should
fix it:

Tue May  5 08:26:33 1998  Manfred Hollstein  <manfred@s-direktnet.de>

	* fix-header.c (write_rbrac): Add "abort" to functions which need to
	be protected.

diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980501.orig/gcc/fix-header.c egcs-19980501/gcc/fix-header.c
--- egcs-19980501.orig/gcc/fix-header.c	Sun Apr 19 15:41:03 1998
+++ egcs-19980501/gcc/fix-header.c	Sun Apr 19 15:41:03 1998
@@ -812,7 +812,8 @@ write_rbrac ()
 	      || !strcmp (fn->fname, "vprintf")
 	      || !strcmp (fn->fname, "vfprintf")
 	      || !strcmp (fn->fname, "vsprintf")
-	      || !strcmp (fn->fname, "rewinddir"))
+	      || !strcmp (fn->fname, "rewinddir")
+	      || !strcmp (fn->fname, "abort"))
 	    macro_protect = 1;
 
 	  if (macro_protect)


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