mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-16 00:45:48 +08:00
disable Wshadow in gcc
This commit is contained in:
parent
6255180e99
commit
9feb5fbaf0
@ -45,13 +45,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
// Ignore shadow warnings
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wshadow"
|
||||||
|
|
||||||
# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
|
# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
|
||||||
# define FMT_GCC_EXTENSION __extension__
|
# define FMT_GCC_EXTENSION __extension__
|
||||||
// Disable warning about "long long" which is sometimes reported even
|
// Disable warning about "long long" which is sometimes reported even
|
||||||
// when using __extension__.
|
// when using __extension__.
|
||||||
# if FMT_GCC_VERSION >= 406
|
# if FMT_GCC_VERSION >= 406
|
||||||
# pragma GCC diagnostic push
|
# pragma GCC diagnostic push
|
||||||
# pragma GCC diagnostic ignored "-Wshadow"
|
|
||||||
# pragma GCC diagnostic ignored "-Wlong-long"
|
# pragma GCC diagnostic ignored "-Wlong-long"
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
@ -2861,8 +2864,12 @@ FMT_VARIADIC(int, fprintf, std::FILE *, StringRef)
|
|||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define FMT_HEADER_ONLY
|
#define FMT_HEADER_ONLY
|
||||||
# include "format.cc"
|
# include "format.cc"
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# pragma GCC diagnostic pop //pop -Wshadow warnings ignore
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // FMT_FORMAT_H_
|
#endif // FMT_FORMAT_H_
|
||||||
|
Loading…
Reference in New Issue
Block a user