gcc/testsuite/ChangeLog:
2016-03-08 Martin Sebor <msebor@redhat.com>
PR c++/62096
* g++.dg/warn/overflow-warn-7.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234075
138bc75d-0d04-0410-961f-
82ee72b054a4
+2016-03-08 Martin Sebor <msebor@redhat.com>
+
+ PR c++/62096
+ * g++.dg/warn/overflow-warn-7.C: New test.
+
2016-03-08 Jason Merrill <jason@redhat.com>
* lib/g++-dg.exp (g++-dg-runtest): Handle "concepts" in std list.
--- /dev/null
+// PR c/62096 - unexpected warning overflow in implicit constant conversion
+// { dg-do compile { target c++11 } }
+
+enum E {
+ E_val = 1,
+};
+
+inline constexpr E operator~(E e)
+{
+ return E(~static_cast<int>(e));
+}
+
+int main()
+{
+ int val = ~E_val; // { dg-bogus "overflow in implicit constant conversion" }
+ (void) val;
+}