summaryrefslogtreecommitdiff
path: root/src/warnings.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-22 17:14:28 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-22 17:57:08 -0700
commit1cc5fee5904832da6564f12c858423fd5bd1b2b6 (patch)
treef9318cdd5f45acdd1aceef875de20a0c5b9bde6b /src/warnings.hpp
parentb195ac27e8234160b29698802deccd109a6fdc25 (diff)
downloadtmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.tar.gz
tmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.tar.bz2
tmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.tar.xz
tmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.zip
Make travis happy
Diffstat (limited to 'src/warnings.hpp')
-rw-r--r--src/warnings.hpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/warnings.hpp b/src/warnings.hpp
index 1ea0074..0b2358a 100644
--- a/src/warnings.hpp
+++ b/src/warnings.hpp
@@ -21,9 +21,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-#if 0
-# include "../sanity.hpp"
-#endif
+// just mention "fwd.hpp" to make formatter happy
// This file is currently targeted at:
// GCC 4.6 (incomplete due to bugs)
@@ -221,6 +219,18 @@ E("-Wbuiltin-macro-redefined")
//W("-Wc++11-compat")
I("-Wc++0x-compat")
+// I care about whether my code compiles with the standard as implemented
+// by certain compilers, not whether it matches with an *exact* standard.
+#ifdef __clang__
+# if __has_warning("-Wc++1y-extensions")
+IC("-Wc++1y-extensions")
+# else
+static_assert('E', "-Wc++1y-extensions not in this clang version");
+# endif
+#else
+static_assert('E', "-Wc++1y-extensions not in GCC");
+#endif
+
/// Warn about pointer casts which increase alignment
X("-Wcast-align")
@@ -355,6 +365,10 @@ EG47("-Wfree-nonheap-object")
// -Wgnu is a clang alias for -Wpedantic
+// Foo{x: y}
+EC("-Wgnu-designator")
+
+
/// Warn whenever type qualifiers are ignored.
E("-Wignored-qualifiers")
@@ -404,6 +418,9 @@ E("-Wmain")
/// Warn about maybe uninitialized automatic variables
EG47("-Wmaybe-uninitialized")
+// bitch about 'struct Foo' vs 'class Foo'
+IC("-Wmismatched-tags")
+
/// Warn about possibly missing braces around
/// initializers
// beware of things like std::array!