title: How to suppress "warning: missing initializer" caused by Boost.Log and GCC 4.4?
body: <p>Can anyone tell me how to suppress the following warning message which is generated by Boost.Log and GCC 4.4.7? My project is built in C++11 mode (with <code>-std=c++0x</code> in GCC 4.4.7).</p>
  
  <pre><code>src/Logger.cc:7: warning: missing initializer for member ‘boost::log::v2_mt_posix::expressions::attribute_keyword&lt;tag::severity, boost::phoenix::actor&gt;::proto_expr_’
  </code></pre>
  
  <p>where <code>src/Logger.cc</code> is the source file of my logging class which is a wrapper of Boost.Log. Line 7 uses one of Boost.Log macros as follows. <code>Logger::ESeverityLevel</code> is an enum defined in <code>Logger.h</code>.</p>
  
  <pre><code>BOOST_LOG_ATTRIBUTE_KEYWORD(severity, "Severity", Logger::ESeverityLevel)
  </code></pre>
  
  <p>This macro can be expanded as follows.</p>
  
  <pre><code>namespace tag    {\
          struct severity :\
              public ::boost::log::expressions::keyword_descriptor\
          {\
              typedef Logger::ESeverityLevel value_type;\
              static ::boost::log::attribute_name get_name() { return ::boost::log::attribute_name("Severity"); }\
          };\
      }\
      typedef ::boost::log::expressions::attribute_keyword&lt; tag::severity &gt; severity_type;    const severity_type severity = {};
  </code></pre>
  
  <p>It looks that the initialization of <code>severity_type</code> makes this warning, while it is valid with Clang (Apple LLVM version 6.0).</p>
  
  <p>An official example code of this macro can be found at 
  <a href="http://theboostcpplibraries.com/boost.log#ex.log_05" rel="nofollow">http://theboostcpplibraries.com/boost.log#ex.log_05</a> </p>