diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e36c5ccc906..3120bd487eb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,38 @@ +Wed Aug 26 10:53:03 1998 Kaveh R. Ghazi + + * system.h: Include stdarg.h/varargs.h, make sure they are ordered + correctly with regards to stdio.h. + + * calls.c: Remove stdarg.h/varargs.h. + * cccp.c: Likewise. + * cexp.y: Likewise. + * combine.c: Likewise. + * cpperror.c: Likewise. + * cpplib.c: Likewise. + * cpplib.h: Likewise. + * doprint.c: Likewise. + * emit-rtl.c: Likewise. + * final.c: Likewise. + * fix-header.c: Likewise. + * gcc.c: Likewise. + * genattr.c: Likewise. + * genattrtab.c: Likewise. + * gencodes.c: Likewise. + * genconfig.c: Likewise. + * genemit.c: Likewise. + * genextract.c: Likewise. + * genflags.c: Likewise. + * genopinit.c: Likewise. + * genoutput.c: Likewise. + * genpeep.c: Likewise. + * genrecog.c: Likewise. + * mips-tfile.c: Likewise. + * prefix.c: Likewise. + * protoize.c: Likewise. + * regmove.c: Likewise. + * toplev.c: Likewise. + * tree.c: Likewise. + Wed Aug 26 05:09:27 1998 Jakub Jelinek * config/sparc/sparc.c (sparc_override_options): If not diff --git a/gcc/calls.c b/gcc/calls.c index 8b140190c7e..233b1a7bd9d 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -19,11 +19,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "tree.h" diff --git a/gcc/cccp.c b/gcc/cccp.c index f684d2d3ed9..5214c2c5cd3 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -19,11 +19,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#ifdef __STDC__ -# include -#else -# include -#endif #define PRINTF_PROTO(ARGS, m, n) PVPROTO (ARGS) ATTRIBUTE_PRINTF(m, n) diff --git a/gcc/cexp.c b/gcc/cexp.c index 138a8a046b5..a577b24b2d1 100644 --- a/gcc/cexp.c +++ b/gcc/cexp.c @@ -22,11 +22,6 @@ #line 27 "cexp.y" #include "config.h" -#ifdef __STDC__ -# include -#else -# include -#endif #define PRINTF_PROTO(ARGS, m, n) PVPROTO (ARGS) ATTRIBUTE_PRINTF(m, n) diff --git a/gcc/cexp.y b/gcc/cexp.y index 5d36329e7e9..c7d25c19658 100644 --- a/gcc/cexp.y +++ b/gcc/cexp.y @@ -26,11 +26,6 @@ Boston, MA 02111-1307, USA. %{ #include "config.h" -#ifdef __STDC__ -# include -#else -# include -#endif #define PRINTF_PROTO(ARGS, m, n) PVPROTO (ARGS) ATTRIBUTE_PRINTF(m, n) diff --git a/gcc/combine.c b/gcc/combine.c index 5c050f2a9ba..8f0ea65346e 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -75,16 +75,8 @@ Boston, MA 02111-1307, USA. */ combine anyway. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif - -/* stdio.h must precede rtl.h for FFS. */ #include "system.h" - -#include "rtl.h" +#include "rtl.h" /* stdio.h must precede rtl.h for FFS. */ #include "flags.h" #include "regs.h" #include "hard-reg-set.h" diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 80ba077e5dd..86ff9df2f62 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi + + * errfn.c: Remove stdarg.h/varargs.h. + * tree.c: Likewise. + 1998-08-25 Brendan Kehoe * pt.c (tsubst_copy): Only do typename overloading on an diff --git a/gcc/cp/errfn.c b/gcc/cp/errfn.c index 8d20682bcba..10de8a9d12b 100644 --- a/gcc/cp/errfn.c +++ b/gcc/cp/errfn.c @@ -24,12 +24,6 @@ Boston, MA 02111-1307, USA. */ #include "tree.h" #include "toplev.h" -#ifdef __STDC__ -#include -#else -#include -#endif - /* cp_printer is the type of a function which converts an argument into a string for digestion by printf. The cp_printer function should deal with all memory management; the functions in this file will not free diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index d598001a56b..fbd8542a029 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -28,12 +28,6 @@ Boston, MA 02111-1307, USA. */ #include "rtl.h" #include "toplev.h" -#ifdef __STDC__ -#include -#else -#include -#endif - extern void compiler_error (); static tree get_identifier_list PROTO((tree)); diff --git a/gcc/cpperror.c b/gcc/cpperror.c index c4cac065e7c..308ef299a18 100644 --- a/gcc/cpperror.c +++ b/gcc/cpperror.c @@ -24,11 +24,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef EMACS #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "gansidecl.h" #else diff --git a/gcc/cpplib.c b/gcc/cpplib.c index b9ded523c1d..f1b5b0dbfa8 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -19,11 +19,6 @@ along with this program; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #ifndef STDC_VALUE diff --git a/gcc/cpplib.h b/gcc/cpplib.h index 65cb5daff91..ad69646d4fe 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -22,11 +22,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#ifdef __STDC__ -#include -#else -#include -#endif #ifdef __cplusplus extern "C" { diff --git a/gcc/doprint.c b/gcc/doprint.c index dc36254006e..e09e1988122 100644 --- a/gcc/doprint.c +++ b/gcc/doprint.c @@ -4,11 +4,6 @@ */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "gansidecl.h" #undef _doprnt diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 2ca007a2003..d5ed39205eb 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -35,11 +35,6 @@ Boston, MA 02111-1307, USA. */ is the kind of rtx's they make and what arguments they use. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "tree.h" diff --git a/gcc/final.c b/gcc/final.c index 621f61f60ce..0938e221d5e 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -45,11 +45,6 @@ Boston, MA 02111-1307, USA. */ FUNCTION_EPILOGUE. Those instructions never exist as rtl. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "tree.h" diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 8ba79ff6590..2981f9fe0d6 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -71,11 +71,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Written by Per Bothner , July 1993. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "gansidecl.h" #include "obstack.h" diff --git a/gcc/gcc.c b/gcc/gcc.c index 1787d0f1c93..28b6206cb27 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -32,12 +32,6 @@ Once it knows which kind of compilation to perform, the procedure for compilation is specified by a string called a "spec". */ #include "config.h" - -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include #include diff --git a/gcc/genattr.c b/gcc/genattr.c index c50e0fd45c5..191e27486c5 100644 --- a/gcc/genattr.c +++ b/gcc/genattr.c @@ -21,11 +21,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 686bf5c749a..adf07496c18 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -96,12 +96,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -/* varargs must always be included after *config.h, but before stdio.h. */ -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "insn-config.h" /* For REGISTER_CONSTRAINTS */ diff --git a/gcc/gencodes.c b/gcc/gencodes.c index a3aa1fe2df1..725cc651e69 100644 --- a/gcc/gencodes.c +++ b/gcc/gencodes.c @@ -23,11 +23,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genconfig.c b/gcc/genconfig.c index b01a24bfc28..75693c1fb65 100644 --- a/gcc/genconfig.c +++ b/gcc/genconfig.c @@ -21,11 +21,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genemit.c b/gcc/genemit.c index 88789e74121..d13ff5e35b2 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -20,11 +20,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genextract.c b/gcc/genextract.c index c06a74ca639..dfc2ac23122 100644 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -20,11 +20,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genflags.c b/gcc/genflags.c index d389a733e51..dee8128a9c2 100644 --- a/gcc/genflags.c +++ b/gcc/genflags.c @@ -23,11 +23,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genopinit.c b/gcc/genopinit.c index a31a444642a..f0b57bb9be9 100644 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -20,11 +20,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 9f40c85eeec..400a8be442b 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -91,11 +91,6 @@ It would not make an case in output_insn_hairy because the template given in the entry is a constant (it does not start with `*'). */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genpeep.c b/gcc/genpeep.c index ab65df7b5af..99fcec54ce5 100644 --- a/gcc/genpeep.c +++ b/gcc/genpeep.c @@ -20,11 +20,6 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 4dd5ec7cdbb..cffa47fd7b9 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -47,11 +47,6 @@ Boston, MA 02111-1307, USA. */ it returns the split rtl in a SEQUENCE. */ #include "hconfig.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c index 991839704e6..71c39628133 100644 --- a/gcc/mips-tfile.c +++ b/gcc/mips-tfile.c @@ -600,11 +600,6 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #ifndef __SABER__ diff --git a/gcc/prefix.c b/gcc/prefix.c index 06b0610871b..778600bff8d 100644 --- a/gcc/prefix.c +++ b/gcc/prefix.c @@ -64,11 +64,6 @@ Boston, MA 02111-1307, USA. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #ifdef _WIN32 #include diff --git a/gcc/protoize.c b/gcc/protoize.c index 48908e520c3..a7a5ae92e2b 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -57,11 +57,6 @@ Boston, MA 02111-1307, USA. */ #define _POSIX_SOURCE #endif -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include #if ! defined (_WIN32) || defined (__CYGWIN32__) diff --git a/gcc/regmove.c b/gcc/regmove.c index b4f7b6dd1bc..d470bd52ac2 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -24,16 +24,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ instruction to avoid the move instruction. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif - -/* stdio.h must precede rtl.h for FFS. */ #include "system.h" - -#include "rtl.h" +#include "rtl.h" /* stdio.h must precede rtl.h for FFS. */ #include "insn-config.h" #include "recog.h" #include "output.h" diff --git a/gcc/system.h b/gcc/system.h index 27b1fee6bdf..e16cd2ea312 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -7,6 +7,13 @@ #ifndef __GCC_SYSTEM_H__ #define __GCC_SYSTEM_H__ +/* We must include stdarg.h/varargs.h before stdio.h. */ +#ifdef __STDC__ +#include +#else +#include +#endif + #include /* Define a generic NULL if one hasn't already been defined. */ diff --git a/gcc/toplev.c b/gcc/toplev.c index 976f8a1cd1c..79268778f17 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -24,11 +24,6 @@ Boston, MA 02111-1307, USA. */ Error messages and low-level interface to malloc also handled here. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #undef FLOAT /* This is for hpux. They should change hpux. */ #undef FFS /* Some systems define this in param.h. */ #include "system.h" diff --git a/gcc/tree.c b/gcc/tree.c index 532dd1908a8..2ae6d0b5cc2 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -34,11 +34,6 @@ Boston, MA 02111-1307, USA. */ by all passes of the compiler. */ #include "config.h" -#ifdef __STDC__ -#include -#else -#include -#endif #include "system.h" #include #include "flags.h"