[Bug c++/50810] New: c++0x-compat does not warn about narrowing conversions
public at alisdairm dot net
gcc-bugzilla@gcc.gnu.org
Thu Oct 20 13:41:00 GMT 2011
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: unassigned@gcc.gnu.org
ReportedBy: public@alisdairm.net
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.
More information about the Gcc-bugs
mailing list