For Sun Studio compilers, set WARN_CFLAGS to emit warning tag names
authorKen Raeburn <raeburn@mit.edu>
Thu, 11 Dec 2008 21:07:08 +0000 (21:07 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 11 Dec 2008 21:07:08 +0000 (21:07 +0000)
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

index e92bf6acadcdaeaecf356d75249bf53110ea9990..d7fb2cc85fe4a6495b09dd2da8962c9763b52d67 100644 (file)
@@ -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)