From 75841b4eb32d6b1bc90a097958f7c61235c4ff87 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 11 Dec 2008 21:07:08 +0000 Subject: [PATCH] For Sun Studio compilers, set WARN_CFLAGS to emit warning tag names and make int/ptr mixups a fatal error that will be noticed at build or "make check" time. Tested in a 32-bit build. ticket: 6297 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21325 dc483132-0cff-0310-8789-dd5450dbe970 --- src/aclocal.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index e92bf6aca..d7fb2cc85 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -714,6 +714,16 @@ else ;; esac fi + if test "`uname -s`" = SunOS ; then + # Using Solaris but not GCC, assume Sunsoft compiler. + # We have some error-out-on-warning options available. + # Sunsoft 12 compiler defaults to -xc99=all, it appears, so "inline" + # works, but it also means that declaration-in-code warnings won't + # be issued. + # -v -fd -errwarn=E_DECLARATION_IN_CODE ... + WARN_CFLAGS="-errtags=yes -errwarn=E_BAD_PTR_INT_COMBINATION" + WARN_CXXFLAGS="-errtags=yes +w +w2 -xport64" + fi fi AC_SUBST(WARN_CFLAGS) AC_SUBST(WARN_CXXFLAGS) -- 2.26.2