http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55398



--- Comment #8 from Diego Novillo <dnovillo at gcc dot gnu.org> 2012-11-20 
16:26:24 UTC ---

Author: dnovillo

Date: Tue Nov 20 16:26:09 2012

New Revision: 193667



URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193667

Log:

Convert vec<> into a POD.



This fixes PR 55398 by making vec<> a true POD.  I thought we could get

away with having private fields, but we can't.  We fail to pass vec<>

instances through varargs.



The patch makes every field public and mangles the field names in the

hope that no future patch will try to make use of them directly.  It's

horrible, but I could not think of anything better.



Tested with clang++ as the host compiler.



2012-11-20  Diego Novillo  <dnovi...@google.com>



    PR middle-end/55398

    * vec.h (class vec_prefix): Make every field public.

    Rename field alloc_ to alloc_PRIVATE_.

    Rename field num_ to num_PRIVATE_.

    Update all users.

    (class vec<T, A, vl_embed>): Make every field public.

    Rename field pfx_ to pfx_PRIVATE_.

    Rename field data_ to data_PRIVATE_.

    Update all users.

    (class vec<T, A, vl_ptr>): Make every field public.

    Rename field vec_ to vec_PRIVATE_.

    Update all users.



Modified:

    trunk/gcc/ChangeLog

    trunk/gcc/vec.c

    trunk/gcc/vec.h

Reply via email to