diff --git a/ares/configure.ac b/ares/configure.ac
index 2f7f6c96c67c8af43bc68bbd7eb9f0afc172bc0f..fbcb8513a9330676536a401a1d3b0ea6e03dec95 100644
--- a/ares/configure.ac
+++ b/ares/configure.ac
@@ -239,10 +239,12 @@ if test "$curl_cv_have_def___DECC" = "yes" ||
   AC_MSG_RESULT([yes])
   dnl Select strict ANSI C compiler mode
   CFLAGS="$CFLAGS -std1"
-  dnl Generate verbose messages for errors and warnings
-  CFLAGS="$CFLAGS -verbose"
   dnl Generate warnings for missing function prototypes
   CFLAGS="$CFLAGS -warnprotos"
+  dnl Select highest warning level
+  CFLAGS="$CFLAGS -msg_enable level6"
+  dnl Change some warnings into fatal errors
+  CFLAGS="$CFLAGS -msg_fatal toofewargs,toomanyargs"
 else
   AC_MSG_RESULT([no])
 fi
diff --git a/configure.ac b/configure.ac
index 278f75fa43f3949b2ff333a9d8df87a0d6e9356c..b3cc6c23f1054e29dccba44b1984c8c614342da6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -306,10 +306,12 @@ if test "$curl_cv_have_def___DECC" = "yes" ||
   AC_MSG_RESULT([yes])
   dnl Select strict ANSI C compiler mode
   CFLAGS="$CFLAGS -std1"
-  dnl Generate verbose messages for errors and warnings
-  CFLAGS="$CFLAGS -verbose"
   dnl Generate warnings for missing function prototypes
   CFLAGS="$CFLAGS -warnprotos"
+  dnl Select highest warning level
+  CFLAGS="$CFLAGS -msg_enable level6"
+  dnl Change some warnings into fatal errors
+  CFLAGS="$CFLAGS -msg_fatal toofewargs,toomanyargs"
 else
   AC_MSG_RESULT([no])
 fi