2
0
mirror of https://github.com/boostorg/log.git synced 2026-02-17 13:52:15 +00:00

Disabled 'may be used uninitialized' warnings for gcc caused by boost::optional.

This commit is contained in:
Andrey Semashev
2014-06-23 13:06:27 +04:00
parent dfb3049a7c
commit 9892e3859f

View File

@@ -15,6 +15,14 @@
#ifndef BOOST_LOG_WITHOUT_SETTINGS_PARSERS
#if defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) \
&& (__GNUC__ * 100 + __GNUC_MINOR__) >= 407
// This warning is caused by a compiler bug which is exposed when boost::optional is used: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679
// It has to be disabled here, before any code is included, since otherwise it doesn't help and the warning is still emitted.
// *((void*)& foo +2) may be used uninitialized in this function
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#include "windows_version.hpp"
#include <cstddef>
#include <ios>