2011-07-22 Jason Merrill <jason@redhat.com>
+ PR c++/49793
+ * c.opt (Wnarrowing): New.
+
PR c++/30112
* c-common.h: Declare c_linkage_bindings.
* c-pragma.c (handle_pragma_redefine_extname): Use it.
C ObjC C++ ObjC++ Warning
Warn about use of multi-character character constants
+Wnarrowing
+C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(1)
+-Wno-narrowing In C++0x mode, ignore ill-formed narrowing conversions within { }
+
Wnested-externs
C ObjC Var(warn_nested_externs) Warning
Warn about \"extern\" declarations not at file scope
+2011-07-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/49793
+ * typeck2.c (check_narrowing): Downgrade permerror to pedwarn.
+ Make conditional on -Wnarrowing.
+
2011-07-22 Ville Voutilainen <ville.voutilainen@gmail.com>
Warn about the use of final/override in non-c++0x mode, and
bool ok = true;
REAL_VALUE_TYPE d;
- if (!ARITHMETIC_TYPE_P (type))
+ if (!warn_narrowing || !ARITHMETIC_TYPE_P (type))
return;
if (BRACE_ENCLOSED_INITIALIZER_P (init)
}
if (!ok)
- permerror (input_location, "narrowing conversion of %qE from %qT "
- "to %qT inside { }", init, ftype, type);
+ pedwarn (input_location, OPT_Wnarrowing, "narrowing conversion of %qE "
+ "from %qT to %qT inside { }", init, ftype, type);
}
/* Process the initializer INIT for a variable of type TYPE, emitting
+2011-07-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/49793
+ * g++.dg/cpp0x/initlist55.C: New.
+
2011-07-23 Tobias Burnus <burnus@net-b.de>
PR fortran/49791
-// { dg-options "-std=c++0x" }
+// { dg-options "-std=c++0x -pedantic-errors" }
void f(int i);
// PR c++/44358
-// { dg-options "-std=c++0x" }
+// { dg-options "-std=c++0x -pedantic-errors" }
#include <initializer_list>
// Test for narrowing diagnostics
-// { dg-options "-std=c++0x" }
+// { dg-options "-std=c++0x -pedantic-errors" }
#include <initializer_list>
// PR c++/45378
-// { dg-options -std=c++0x }
+// { dg-options "-std=c++0x -pedantic-errors" }
int main()
{
// PR c++/37932
-// { dg-options "-std=c++0x" }
+// { dg-options "-std=c++0x -pedantic-errors" }
typedef enum { AA=1, BB=2 } my_enum;