unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6577: turn on -Wstrict-prototypes by default
@ 2010-07-07  2:59 Dan Nicolaescu
  2013-02-06  8:45 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Nicolaescu @ 2010-07-07  2:59 UTC (permalink / raw)
  To: 6577

This patch turns on -Wstrict-prototypes to help transition to standard C.
[Archived here so that it does not get lost].

The error and message declarations in lisp.h need to be converted to
standard C (and the definition should use variable number of
arguments), otherwise this patch results in many warnings.

But if someone wants to check this in to speed up the process...

=== modified file 'configure.in'
--- configure.in  2010-07-02 12:55:51 +0000
+++ configure.in  2010-07-02 19:31:41 +0000
@@ -757,6 +757,20 @@ CFLAGS="$SAVE_CFLAGS"
 unset has_option
 unset SAVE_CFLAGS
 
+### Use -Wstrict-prototypes if the compiler supports it
+AC_MSG_CHECKING([whether gcc understands -Wstrict-prototypes])
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wstrict-prototypes"
+AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
+if test $has_option = yes; then
+   C_WARNINGS_SWITCH="-Wstrict-prototypes $C_WARNINGS_SWITCH"
+fi
+AC_MSG_RESULT($has_option)
+CFLAGS="$SAVE_CFLAGS"
+unset has_option
+unset SAVE_CFLAGS
+
+
 #### Some other nice autoconf tests.
 
 dnl checks for programs





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#6577: turn on -Wstrict-prototypes by default
  2010-07-07  2:59 bug#6577: turn on -Wstrict-prototypes by default Dan Nicolaescu
@ 2013-02-06  8:45 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2013-02-06  8:45 UTC (permalink / raw)
  To: 6577-done

Version: 24.3

IIUC we now have this and much more via gnulib with the
--enable-gcc-warnings option of configure.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-06  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-07  2:59 bug#6577: turn on -Wstrict-prototypes by default Dan Nicolaescu
2013-02-06  8:45 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).