diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-09-27 11:36:35 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-09-27 11:37:29 +0100 |
commit | 3a24dde2e7adec97243b95c79ea7877698f17c19 (patch) | |
tree | 673fbe715bb64aa0add89bee7e7439b9307f615a /gcc/rust/backend/rust-constexpr.cc | |
parent | af3b5be6c99f359691b15001ed04d0d457841ba8 (diff) | |
download | gcc-3a24dde2e7adec97243b95c79ea7877698f17c19.zip gcc-3a24dde2e7adec97243b95c79ea7877698f17c19.tar.gz gcc-3a24dde2e7adec97243b95c79ea7877698f17c19.tar.bz2 |
Make constexpr constructors type-checking more permissive
Diffstat (limited to 'gcc/rust/backend/rust-constexpr.cc')
-rw-r--r-- | gcc/rust/backend/rust-constexpr.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc index 203449b..790a8e9 100644 --- a/gcc/rust/backend/rust-constexpr.cc +++ b/gcc/rust/backend/rust-constexpr.cc @@ -2953,14 +2953,14 @@ eval_store_expression (const constexpr_ctx *ctx, tree t, bool lval, TREE_SIDE_EFFECTS (*valp) = TREE_SIDE_EFFECTS (init); CONSTRUCTOR_NO_CLEARING (*valp) = CONSTRUCTOR_NO_CLEARING (init); } - else if (TREE_CODE (init) == CONSTRUCTOR - && !same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (init), - type)) - { - /* See above on initialization of empty bases. */ - gcc_assert (is_empty_class (TREE_TYPE (init)) && !lval); - return init; - } + // else if (TREE_CODE (init) == CONSTRUCTOR + // && !same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (init), + // type)) + // { + // /* See above on initialization of empty bases. */ + // // gcc_assert (is_empty_class (TREE_TYPE (init)) && !lval); + // return init; + // } else *valp = init; |