diff --git a/lib/test/test-stream.cc b/lib/test/test-stream.cc
index b1c8f021a607045a6906ab1da19fa40ef2b61c22..1a88f8de2c6d5f60b4fa591b987206a0181ce5c5 100644
--- a/lib/test/test-stream.cc
+++ b/lib/test/test-stream.cc
@@ -13,6 +13,9 @@
 
 #include <dune/common/stdstreams.hh>
 
+// enums are a nice special case (was a bug)
+enum check { VALUE = 5 };
+
 int main () {
   try {
     // let output happen but vanish
@@ -22,8 +25,6 @@ int main () {
     Dune::derr.push(true);
     Dune::derr << "Teststring" << std::endl;
 
-    // enums are a nice special case (was a bug)
-    enum { VALUE = 5 };
     Dune::derr << VALUE << std::endl;
 
     // instantiate private stream and connect global stream