+2017-02-19 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/69523
+ * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
+ description.
+
2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
+2017-02-19 Eric Fiselier <eric@efcs.ca>
+ Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/69523
+ * parser.c (cp_parser_unqualified_id): Use OPT_Wliteral_suffix to
+ control warning about literal suffix identifiers without a leading
+ underscore.
+
2017-02-17 Jason Merrill <jason@redhat.com>
PR c++/79508 - lookup error with member template
const char *name = UDLIT_OP_SUFFIX (id);
if (name[0] != '_' && !in_system_header_at (input_location)
&& declarator_p)
- warning (0, "literal operator suffixes not preceded by %<_%>"
- " are reserved for future standardization");
+ warning (OPT_Wliteral_suffix,
+ "literal operator suffixes not preceded by %<_%>"
+ " are reserved for future standardization");
}
return id;
In this case, @code{PRId64} is treated as a separate preprocessing token.
+Additionally, warn when a user-defined literal operator is declared with
+a literal suffix identifier that doesn't begin with an underscore. Literal
+suffix identifiers that don't begin with an underscore are reserved for
+future standardization.
+
This warning is enabled by default.
@item -Wlto-type-mismatch
+2017-02-19 Eric Fiselier <eric@efcs.ca>
+ Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/69523
+ * g++.dg/cpp0x/Wliteral-suffix2.C: New test.
+
2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* gcc.dg/gimplefe-26.c: New test.
--- /dev/null
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wno-literal-suffix" }
+
+// Test user-defined literals.
+// Test "-Wno-literal-suffix" suppresses warnings on declaration without
+// leading underscore.
+
+long double operator"" nounder(long double); // { dg-bogus "" }
+
+template<char...>
+ int operator"" nounder(); // { dg-bogus "" }