https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103511

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If __builtin_bit_cast should bypass the ctors, then perhaps something like:
--- gcc/cp/semantics.c.jj
+++ gcc/cp/semantics.c
@@ -11673,7 +11673,7 @@ cp_build_bit_cast (location_t loc, tree type, tree arg,
   SET_EXPR_LOCATION (ret, loc);

   if (!processing_template_decl && CLASS_TYPE_P (type))
-    ret = get_target_expr_sfinae (ret, complain);
+    ret = force_target_expr (type, ret, complain);

   return ret;
 }
would handle it, but I don't know if that is desirable or the right thing.

Reply via email to