[Bug c++/69631] New: Bogus overflow in constant expression error
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 2 16:19:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69631
Bug ID: 69631
Summary: Bogus overflow in constant expression error
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
Starting with the C++ delayed folding merge, we reject this test with -fwrapv:
struct C {
static const unsigned short max = static_cast<unsigned short>((32767 * 2 +
1));
};
q.C:2:80: error: overflow in constant expression [-fpermissive]
static const unsigned short max = static_cast<unsigned short>((32767 * 2 +
1));
^
q.C:2:80: error: overflow in constant expression [-fpermissive]
q.C:2:80: error: overflow in constant expression [-fpermissive]
q.C:2:80: error: overflow in constant expression [-fpermissive]
More information about the Gcc-bugs
mailing list