summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/magic-expr.cpp1
-rw-r--r--src/warnings.hpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp
index 4946de8..5aad257 100644
--- a/src/map/magic-expr.cpp
+++ b/src/map/magic-expr.cpp
@@ -102,6 +102,7 @@ const char *show_entity(dumb_ptr<block_list> entity)
/* Sorry about this one... */
// WTF? item_data is a struct item, not a struct item_data
// return ((struct item_data *) (&entity->as_item()->item_data))->name;
+ abort();
case BL::SPELL:
return "%invocation(ERROR:this-should-not-be-an-entity)";
default:
diff --git a/src/warnings.hpp b/src/warnings.hpp
index 3a81d66..40d214d 100644
--- a/src/warnings.hpp
+++ b/src/warnings.hpp
@@ -213,7 +213,11 @@ EG(-Wclobbered)
E(-Wcomment)
// A fixable difference between c++11 and c++14
+#if (defined(__clang__)) && __has_warning("-Wconstexpr-not-const")
EC(-Wconstexpr-not-const)
+#else
+static_assert('?', "-Wconstexpr-not-const not in this version")
+#endif
/// Warn for implicit type conversions that may
/// change a value