Commit 0309d288 by Jason Merrill Committed by Jason Merrill

except.c (build_noexcept_spec): Call cxx_constant_value after converting to bool.

	* except.c (build_noexcept_spec): Call cxx_constant_value after
	converting to bool.

From-SVN: r171609
parent 7450b54f
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.
......
......@@ -1203,10 +1203,10 @@ build_noexcept_spec (tree expr, int complain)
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
......
// { 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment