From: Ken Raeburn Date: Thu, 11 Dec 2008 21:07:08 +0000 (+0000) Subject: For Sun Studio compilers, set WARN_CFLAGS to emit warning tag names X-Git-Tag: krb5-1.7-alpha1~171 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=75841b4eb32d6b1bc90a097958f7c61235c4ff87;p=krb5.git 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 --- 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)