This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] PR21210: Default construction of complex types
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Jun 2006 09:50:59 -0700
- Subject: Re: [C++ PATCH] PR21210: Default construction of complex types
- References: <Pine.LNX.4.44.0606070822090.9202-100000@www.eyesopen.com>
Roger Sayle wrote:
> 2006-06-07 Roger Sayle <roger@eyesopen.com>
>
> PR c++/21210
> * typeck2.c (build_functional_cast): Use cp_convert to construct
> non-aggregate initializers instead of the user-level build_c_cast.
>
> * g++.dg/init/complex1.C: New test case.
In the abstract, I don't think we should use cp_convert here -- but,
then again, we shouldn't really use build_c_cast either. We should use
some low-level routine which just assembles the right thing, without
doing any semantic checking -- both to avoid any possible error
messages, and to save the expense of checking for errors we know cannot
be there.
However, that's all in the abstract; I think the current patch is
definitely an improvement (fixes a bug!), and I'm not sure there's an
easy way to do the abstractly more right thing, so this patch is OK.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713