diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-07-01 18:00:38 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-07-01 18:00:38 -0700 |
commit | 17605f7782ac9a73a3dacf6ce27e5dae36160f01 (patch) | |
tree | 31acbe279cc6f51730d6f509648ec3ab7d8e43a9 | |
parent | e6db8d726bb971bdc7704d29cd26d80bc299da5a (diff) | |
download | tmwa-17605f7782ac9a73a3dacf6ce27e5dae36160f01.tar.gz tmwa-17605f7782ac9a73a3dacf6ce27e5dae36160f01.tar.bz2 tmwa-17605f7782ac9a73a3dacf6ce27e5dae36160f01.tar.xz tmwa-17605f7782ac9a73a3dacf6ce27e5dae36160f01.zip |
In order to disable them, diagnostic header must be public and included
-rw-r--r-- | .travis.yml | 5 | ||||
-rw-r--r-- | src/diagnostics.hpp (renamed from src/warning_list.hpp) | 7 | ||||
-rw-r--r-- | src/ints/cmp.hpp | 2 | ||||
-rw-r--r-- | src/ints/udl_test.cpp | 1 | ||||
-rw-r--r-- | src/io/cxxstdio.hpp | 2 | ||||
-rw-r--r-- | src/io/fd.hpp | 2 | ||||
-rw-r--r-- | src/warnings.hpp | 7 |
7 files changed, 18 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml index 05dd795..8c2293e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ script: - mkdir build - cd build - git init - - ../configure --dev CPPFLAGS=-DQUIET `! [[ $CXX =~ clang* ]] || echo --disable-abi6` + - ../configure --dev CPPFLAGS=-DQUIET `! [[ $CXX =~ clang* ]] || echo --disable-abi6` $EXTRA_CONFIGURE_ARGS - make -R -k -j2 - make -R -k -j2 test TESTER='valgrind --error-exitcode=1 --track-fds=yes' @@ -91,6 +91,9 @@ matrix: - compiler: gcc env: REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PPA=ppa:ubuntu-toolchain-r/test PACKAGE=g++-4.8 + - compiler: gcc + env: REAL_CC=gcc-4.7 REAL_CXX=g++-4.7 PPA=ppa:ubuntu-toolchain-r/test PACKAGE=g++-4.7 EXTRA_CONFIGURE_ARGS=--disable-warnings + # everything that was pushed to stable was already on 'master', except # the version change and some doc changes. branches: diff --git a/src/warning_list.hpp b/src/diagnostics.hpp index 6b45375..31596dc 100644 --- a/src/warning_list.hpp +++ b/src/diagnostics.hpp @@ -1,5 +1,5 @@ #pragma once -// warning_list.hpp - List of useful warnings. +// diagnostics.hpp - List of useful warnings and macros to control them. // // Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com> // @@ -59,11 +59,6 @@ namespace tmwa # define PRAGMA(x) static_assert(1, "pragmas not available, can't do: " #x) #endif -PRAGMA(GCC diagnostic warning "-Wall"); -PRAGMA(GCC diagnostic warning "-Wextra"); -PRAGMA(GCC diagnostic warning "-Wunused"); -PRAGMA(GCC diagnostic warning "-Wformat"); - #define DIAG_E(tag) DO_DIAG_IF(HAS_DIAG_##tag)(error, DIAG_##tag) #define DIAG_W(tag) DO_DIAG_IF(HAS_DIAG_##tag)(warning, DIAG_##tag) #define DIAG_I(tag) DO_DIAG_IF(HAS_DIAG_##tag)(ignored, DIAG_##tag) diff --git a/src/ints/cmp.hpp b/src/ints/cmp.hpp index 58a33b4..08308e1 100644 --- a/src/ints/cmp.hpp +++ b/src/ints/cmp.hpp @@ -22,6 +22,8 @@ #include <limits> +#include "../diagnostics.hpp" + namespace tmwa { diff --git a/src/ints/udl_test.cpp b/src/ints/udl_test.cpp index 3fa9c31..279edde 100644 --- a/src/ints/udl_test.cpp +++ b/src/ints/udl_test.cpp @@ -22,6 +22,7 @@ #include "../compat/cast.hpp" +#include "../diagnostics.hpp" #include "../poison.hpp" diff --git a/src/io/cxxstdio.hpp b/src/io/cxxstdio.hpp index a8343c0..20d3a33 100644 --- a/src/io/cxxstdio.hpp +++ b/src/io/cxxstdio.hpp @@ -27,6 +27,8 @@ #include "../generic/enum.hpp" +#include "../diagnostics.hpp" + namespace tmwa { diff --git a/src/io/fd.hpp b/src/io/fd.hpp index f1d1751..6fb745d 100644 --- a/src/io/fd.hpp +++ b/src/io/fd.hpp @@ -25,6 +25,8 @@ #include "../strings/fwd.hpp" +#include "../diagnostics.hpp" + namespace tmwa { diff --git a/src/warnings.hpp b/src/warnings.hpp index e5fcf2d..9389766 100644 --- a/src/warnings.hpp +++ b/src/warnings.hpp @@ -23,11 +23,16 @@ // just mention "fwd.hpp" to make formatter happy -#include "warning_list.hpp" +#include "diagnostics.hpp" namespace tmwa { +PRAGMA(GCC diagnostic warning "-Wall"); +PRAGMA(GCC diagnostic warning "-Wextra"); +PRAGMA(GCC diagnostic warning "-Wunused"); +PRAGMA(GCC diagnostic warning "-Wformat"); + DIAG_E(abi); DIAG_W(abi_tag); DIAG_E(address); |