Commit e210c999 by Martin Sebor Committed by Martin Sebor

PR c++/62096 - unexpected warning overflow in implicit constant conversion

gcc/testsuite/ChangeLog:
2016-03-08  Martin Sebor  <msebor@redhat.com>

        PR c++/62096 
        * g++.dg/warn/overflow-warn-7.C: New test.

From-SVN: r234075
parent f92d4ac2
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.
......
// 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment