http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50810
Bug #: 50810
Summary: c++0x-compat does not warn about narrowing conversions
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
The following program is rejected by g++ in -std=c++0x mode (assuming 'char' is
signed) but does not raise any warnings when compiled with -Wc++0x-compat:
int main() {
char data[] = { 0xff };
char value = 0xff;
}
This is significantly the largest source of compatibility errors in our
code-base today (>95% of our known issues), so it would be very useful if the
warning caught these.