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]

Re: Alternate patch eliminating MD_CALL_PROTOTYPES


On Sat, May 27, 2000 at 02:11:45PM -0700, Richard Henderson wrote:
> On Sat, May 20, 2000 at 12:53:15PM -0700, Zack Weinberg wrote:
> > 	* Makefile.in (WARN_CFLAGS): Add -Wstrict-prototypes
> > 	-Wmissing-prototypes.
> > 	* gcc.texi: Remove explanation of MD_CALL_PROTOTYPES.
> > 
> > 	* builtins.c, calls.c: Change all instances of gen_call_* or
> > 	gen_sibcall_* to GEN_CALL_* and GEN_SIBCALL_*.
> > 	* calls.c (struct_value_size_rtx): Separate definition from
> > 	initialization to avoid unused variable warning.
> > 
> > 	* genflags.c (gen_macro): New function.
> > 	(gen_proto): Call it for gen_call_* and gen_sibcall_*.
> > 	(gen_nonproto): Delete.
> > 	(gen_insn): Put all insns on the same obstack.
> > 	(main): Generate prototypes for everything unconditionally.
> 
> Ok.

The patch required minor revision because the WARN_CFLAGS setting
moved to configure.  I have committed the following:

	* configure.in (stage1_warn_cflags): Add -Wstrict-prototypes
	-Wmissing-prototypes.
	* configure: Regenerate.
	* gcc.texi: Remove explanation of MD_CALL_PROTOTYPES.

	* builtins.c, calls.c: Change all instances of gen_call_* or
	gen_sibcall_* to GEN_CALL_* and GEN_SIBCALL_*.
	* calls.c (struct_value_size_rtx): Separate definition from
	initialization to avoid unused variable warning.

	* genflags.c (gen_macro): New function.
	(gen_proto): Call it for gen_call_* and gen_sibcall_*.
	(gen_nonproto): Delete.
	(gen_insn): Put all insns on the same obstack.
	(main): Generate prototypes for everything unconditionally.

(diff only for configure.in - nothing else changed - note long lines)
===================================================================
Index: configure.in
--- configure.in	2000/05/27 22:05:01	1.379
+++ configure.in	2000/05/27 22:30:27
@@ -342,7 +342,7 @@ echo "$ac_t"$ac_cv_prog_cc_no_long_long 
 # If the native compiler is GCC, we can enable warnings even in stage1.  
 # That's useful for people building cross-compilers, or just running a
 # quick `make'.
-stage1_warn_cflags=" -W -Wall -Wtraditional -Wwrite-strings"
+stage1_warn_cflags=" -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
 stage2_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
 if test "x$GCC" = "xyes"; then 
   if test $ac_cv_prog_cc_no_long_long = yes; then

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