This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++ failures


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]