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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user