]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
bb21bb0e34781223296541661c9d15e63aa296f1
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 Upstream-Status: Inappropriate [Backport]
2 From 3a987d8e4a8c885fe7fc54595ebdd82d5291e1e7 Mon Sep 17 00:00:00 2001
3 From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
4 Date: Tue, 29 Mar 2011 14:24:30 +0000
5 Subject: [PATCH 024/200] * except.c (build_noexcept_spec): Call cxx_constant_value after
6 converting to bool.
7
8 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171665 138bc75d-0d04-0410-961f-82ee72b054a4
9
10 index c05e507..a814d67 100644
11 --- a/gcc/cp/except.c
12 +++ b/gcc/cp/except.c
13 @@ -1203,10 +1203,10 @@ build_noexcept_spec (tree expr, int complain)
14 it until instantiation. */
15 if (!processing_template_decl)
16 {
17 - expr = cxx_constant_value (expr);
18 expr = perform_implicit_conversion_flags (boolean_type_node, expr,
19 complain,
20 LOOKUP_NORMAL);
21 + expr = cxx_constant_value (expr);
22 }
23 if (expr == boolean_true_node)
24 return noexcept_true_spec;
25 new file mode 100644
26 index 0000000..7bf961b
27 --- /dev/null
28 +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept5.C
29 @@ -0,0 +1,15 @@
30 +// { dg-options -std=c++0x }
31 +
32 +struct booleable {
33 + bool data;
34 + constexpr explicit operator bool() { return data; }
35 +};
36 +
37 +constexpr booleable truthy_func() { return {true}; }
38 +
39 +void funky() noexcept(truthy_func()) {}
40 +
41 +int main() {
42 + funky();
43 + return 0;
44 +}
45 --
46 1.7.0.4
47