[Bug c++/53159] New: Missing narrowing check
marc.glisse at normalesup dot org
gcc-bugzilla@gcc.gnu.org
Sun Apr 29 14:00:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53159
Bug #: 53159
Summary: Missing narrowing check
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: marc.glisse@normalesup.org
In this example, I get narrowing warnings for a and b but not c.
struct X
{
constexpr operator int() { return __INT_MAX__; }
};
int f(){ return __INT_MAX__; }
signed char a { __INT_MAX__ };
signed char b { f() };
signed char c { X{} };
More information about the Gcc-bugs
mailing list