GNU bug report logs -
#6577
turn on -Wstrict-prototypes by default
Previous Next
Reported by: Dan Nicolaescu <dann <at> gnu.org>
Date: Wed, 7 Jul 2010 03:00:03 UTC
Severity: wishlist
Tags: patch
Fixed in version 24.3
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6577 in the body.
You can then email your comments to 6577 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6577
; Package
emacs
.
(Wed, 07 Jul 2010 03:00:04 GMT)
Full text and
rfc822 format available.
Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Wed, 06 Feb 2013 08:48:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dan Nicolaescu <dann <at> gnu.org>
:
bug acknowledged by developer.
(Wed, 06 Feb 2013 08:48:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 6577-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.3
IIUC we now have this and much more via gnulib with the
--enable-gcc-warnings option of configure.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 06 Mar 2013 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.