* except.c (build_noexcept_spec): Call cxx_constant_value after
converting to bool.
From-SVN: r171609
+2011-03-28 Jason Merrill <jason@redhat.com>
+
+ * except.c (build_noexcept_spec): Call cxx_constant_value after
+ converting to bool.
+
2011-03-25 Kai Tietz <ktietz@redhat.com>
* lex.c (interface_strcmp): Handle dos-paths.
it until instantiation. */
if (!processing_template_decl)
{
- expr = cxx_constant_value (expr);
expr = perform_implicit_conversion_flags (boolean_type_node, expr,
complain,
LOOKUP_NORMAL);
+ expr = cxx_constant_value (expr);
}
if (expr == boolean_true_node)
return noexcept_true_spec;
+2011-03-28 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/constexpr-noexcept.C: New.
+
2011-03-28 H.J. Lu <hongjiu.lu@intel.com>
PR testsuite/48276
--- /dev/null
+// { dg-options -std=c++0x }
+
+struct booleable {
+ bool data;
+ constexpr explicit operator bool() { return data; }
+};
+
+constexpr booleable truthy_func() { return {true}; }
+
+void funky() noexcept(truthy_func()) {}
+
+int main() {
+ funky();
+ return 0;
+}