/cp
2016-11-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55080
* parser.c (cp_parser_non_integral_constant_expression): Issue a
pedwarn instead of an error for case NIC_FLOAT.
/testsuite
2016-11-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/55080
* g++.dg/parse/pr55080.C: New.
From-SVN: r242565
+2016-11-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55080
+ * parser.c (cp_parser_non_integral_constant_expression): Issue a
+ pedwarn instead of an error for case NIC_FLOAT.
+
2016-11-17 Jason Merrill <jason@redhat.com>
PR c++/78124 - list-initialization and inherited ctor
switch (thing)
{
case NIC_FLOAT:
- error ("floating-point literal "
- "cannot appear in a constant-expression");
+ pedwarn (input_location, OPT_Wpedantic,
+ "ISO C++ forbids using a floating-point literal "
+ "in a constant-expression");
return true;
case NIC_CAST:
error ("a cast to a type other than an integral or "
+2016-11-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55080
+ * g++.dg/parse/pr55080.C: New.
+
2016-11-17 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/78101
--- /dev/null
+// PR c++/55080
+// { dg-options "-std=c++98 -pedantic" }
+
+class B {
+ static const int c = 3.1415926; // { dg-warning "constant-expression" }
+};