diff --git a/dune/common/configparser.cc b/dune/common/configparser.cc
index 7f621af717c3490ef6997e06808f58aed836d09e..d55388a7a113454099ccf41c0592c1d586864751 100644
--- a/dune/common/configparser.cc
+++ b/dune/common/configparser.cc
@@ -5,6 +5,8 @@
 #include "config.h"
 #endif
 
+#define SILENCE_CONFIGPARSER_HH_DEPRECATION
+
 #include "configparser.hh"
 
 #include <cstdlib>
diff --git a/dune/common/configparser.hh b/dune/common/configparser.hh
index 0defccc68b0d84e254831ec3fa0e3962fde5771e..0e30d5c77b0712a9469d390f1da34ccacf7cefa4 100644
--- a/dune/common/configparser.hh
+++ b/dune/common/configparser.hh
@@ -3,10 +3,12 @@
 #ifndef DUNE_CONFIGPARSER_HH
 #define DUNE_CONFIGPARSER_HH
 
+#ifndef SILENCE_CONFIGPARSER_HH_DEPRECATION
 #warning This file has been deprecated in dune-common 2.1, and will most likely\
   be removed in dune-common 2.2.  In its place, use parametertree.hh to keep\
   hierarchical string-based data, and parametertreeparser.hh to read such data\
   from files and streams.
+#endif // !SILENCE_CONFIGPARSER_HH_DEPRECATION
 
 #include <iostream>
 #include <istream>