This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c++ failures
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>, gdr at integrable-solutions dot net, gcc-patches at gcc dot gnu dot org, nathan at codesourcery dot com
- Date: 28 Feb 2003 17:46:31 -0800
- Subject: Re: c++ failures
- References: <25484732-4B86-11D7-B49B-000393750C1E@redhat.com>
On Fri, 2003-02-28 at 17:35, Aldy Hernandez wrote:
> > The other key point is that you want to check this at
> > template-instantiation time as well, and that doesn't go through the
> > parser -- but it does go through check_initializer. So, the change
> > will
> > make it more correct in that case.
> >
> > When you get a patch that passes regression tests, send it to me, and I
> > promise to review it ASAP.
>
> Well since you are promising... bootstrap/regtest going on in x86.
>
> OK pending completion?
>
> 2003-02-28 Aldy Hernandez <aldyh at redhat dot com>
>
> * decl.c (check_initializer): Check for vector_opaque_p.
>
> Index: decl.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
> retrieving revision 1.1006
> diff -c -p -r1.1006 decl.c
> *** decl.c 28 Feb 2003 20:15:32 -0000 1.1006
> --- decl.c 1 Mar 2003 01:34:52 -0000
> *************** check_initializer (tree decl, tree init,
> *** 7745,7750 ****
> --- 7745,7755 ----
> TREE_TYPE (decl) = error_mark_node;
> init = NULL_TREE;
> }
> + else if ((*targetm.vector_opaque_p) (type))
> + {
> + error ("opaque vector types cannot be initialized");
> + init = error_mark_node;
> + }
I think you probably want to be inside this code:
else if (init)
{
if (TREE_CODE (init) == CONSTRUCTOR && TREE_HAS_CONSTRUCTOR
(init))
{
if you only want the brace-enclosed initializer case.
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery dot com