APPROVE COMMIT 21.5
Thanks to Mike Fabian @ Novell for his unrelated bug report that got
me to try GCC 4.3.2 (MacPorts build on Mac OS X 10.4.11, PPC) with and
without G++.
The change to configure.ac weakens to checks for G++ to a name
including "g++" rather than exactly "g++", which is needed if you
have
multiple builds of GCC.
The change to src/lisp.h casts away the warnings that recent g++ emits
about implicit conversions of actual function arguments from const
char to char. As the log says, this would require a fair amount of
work to actually fix. There are a few more in emacs.c and other
places, but they might be fixable with minimal effort....
diff -r dd12adb12b8f -r 66411359ce4e ChangeLog
--- a/ChangeLog Sat Oct 04 13:57:55 2008 +0900
+++ b/ChangeLog Sat Oct 25 21:40:46 2008 +0900
@@ -0,0 +1,4 @@
+2008-10-25 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * configure.ac (xemacs_cc_cc_mismatch): Improve g++ detection.
+
diff -r dd12adb12b8f -r 66411359ce4e src/ChangeLog
--- a/src/ChangeLog Sat Oct 04 13:57:55 2008 +0900
+++ b/src/ChangeLog Sat Oct 25 21:40:46 2008 +0900
@@ -0,0 +1,7 @@
+2008-10-25 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * lisp.h (static_pro): Cast out a warning.
+ g++ 4.3 complains about the conversion of const char to char.
+ These end up in a dynarray, so we would need to define a whole new
+ class of dynarray just to handle the const char stuff.
+
diff -r dd12adb12b8f -r 66411359ce4e configure.ac
--- a/configure.ac Sat Oct 04 13:57:55 2008 +0900
+++ b/configure.ac Sat Oct 25 21:40:46 2008 +0900
@@ -2239,18 +2239,25 @@
dnl If we're specifying XEMACS_CC, it'd better be in the same family
dnl as CC or the following flag calculations are bogus.
-dnl #### We may want to actually error and abort here, but I am not sure.
+dnl No error/abort; detection is too fragile.
+
+xemacs_cc_cc_mismatch=no
if test "$CC" != "$XEMACS_CC"; then
- if test "$XEMACS_CC" = "g++" -a "$GCC" !=
"yes"; then
- AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong])
- xemacs_cc_cc_mismatch=yes
- elif test -n "$GCC" -a "$XEMACS_CC" != "g++"; then
- AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong])
- xemacs_cc_cc_mismatch=yes
+ case "$XEMACS_CC" in
+ *g++* )
+ if test "$GCC" != "yes"; then
+ AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong])
+ xemacs_cc_cc_mismatch=yes ;;
+ esac
+ if test -n "$GCC"; then
+ case $XEMACS_CC in
+ *g++* )
+ ;;
+ * )
+ AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong])
+ xemacs_cc_cc_mismatch=yes ;;
+ esac
dnl #### Add other detectable mismatches here.
- else
- xemacs_cc_cc_mismatch=no
- fi
fi
dnl Calculate optimization flags. These will be off by default in beta
diff -r dd12adb12b8f -r 66411359ce4e src/lisp.h
--- a/src/lisp.h Sat Oct 04 13:57:55 2008 +0900
+++ b/src/lisp.h Sat Oct 25 21:40:46 2008 +0900
@@ -3815,12 +3815,16 @@
MODULE_API void staticpro_1 (Lisp_Object *, Ascbyte *);
MODULE_API void staticpro_nodump_1 (Lisp_Object *, Ascbyte *);
-#define staticpro(ptr) staticpro_1 (ptr, #ptr)
-#define staticpro_nodump(ptr) staticpro_nodump_1 (ptr, #ptr)
+/* g++ 4.3 complains about the conversion of const char to char.
+ These end up in a dynarray, so we would need to define a whole new class
+ of dynarray just to handle the const char stuff.
+ ####Check to see how hard this might be. */
+#define staticpro(ptr) staticpro_1 (ptr, (Ascbyte *) #ptr)
+#define staticpro_nodump(ptr) staticpro_nodump_1 (ptr, (Ascbyte *) #ptr)
#ifdef HAVE_SHLIB
MODULE_API void unstaticpro_nodump_1 (Lisp_Object *, Ascbyte *);
-#define unstaticpro_nodump(ptr) unstaticpro_nodump_1 (ptr, #ptr)
+#define unstaticpro_nodump(ptr) unstaticpro_nodump_1 (ptr, (Ascbyte *) #ptr)
#endif
#else
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches