public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dnovillo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/55398] [4.8 Regression] va_arg usage with non-POD
Date: Tue, 20 Nov 2012 16:28:00 -0000	[thread overview]
Message-ID: <bug-55398-4-bjRnhrogvQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55398-4@http.gcc.gnu.org/bugzilla/>


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  <dnovillo@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


  parent reply	other threads:[~2012-11-20 16:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 21:09 [Bug bootstrap/55398] New: r193595 breaks bootstrap with clang compilers howarth at nitro dot med.uc.edu
2012-11-19 21:41 ` [Bug bootstrap/55398] " howarth at nitro dot med.uc.edu
2012-11-19 21:44 ` pinskia at gcc dot gnu.org
2012-11-19 21:45 ` [Bug bootstrap/55398] [4.8 Regression] var_arg usage with non-POD causes clang to fail to build gcc pinskia at gcc dot gnu.org
2012-11-20  0:03 ` pinskia at gcc dot gnu.org
2012-11-20  0:06 ` [Bug bootstrap/55398] [4.8 Regression] var_arg usage with non-POD pinskia at gcc dot gnu.org
2012-11-20  0:10 ` [Bug middle-end/55398] " pinskia at gcc dot gnu.org
2012-11-20  0:15 ` pinskia at gcc dot gnu.org
2012-11-20 14:13 ` [Bug middle-end/55398] [4.8 Regression] va_arg " dnovillo at gcc dot gnu.org
2012-11-20 16:28 ` dnovillo at gcc dot gnu.org [this message]
2012-11-20 16:30 ` dnovillo at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-55398-4-bjRnhrogvQ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).