public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
Cc: geoffk@apple.com, gcc@gcc.gnu.org
Subject: Re: Using __extension__ in a struct with a GTY(()) mark
Date: Thu, 03 Apr 2003 03:17:00 -0000	[thread overview]
Message-ID: <wvlznn8pf3h.fsf@prospero.boston.redhat.com> (raw)
In-Reply-To: <200304022300.SAA17030@caip.rutgers.edu> ("Kaveh R. Ghazi"'s message of "Wed, 2 Apr 2003 18:00:52 -0500 (EST)")

On Wed, 2 Apr 2003 18:00:52 -0500 (EST), "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> wrote:

> I'm trying to enable compiling the G++ frontend using any ISOC
> compiler.  In effect, this means getting it to compile with gcc
> -pedantic.  I've zapped all problems except one in which I'm running
> into a problem with gengtype and a structure using GTY(()) when I try
> to use the __extension__ keyword.

If you need to use __extension__, it won't work on other ISO C compilers.
If you really want to compile g++ with other C compilers, you need to avoid
using char bitfields.

> I added code in system.h to appropriately use int or char depending on
> whether we're using GCC via a macro CHAR_BITFIELD.

Why?  If they're interchangeable, why not always use int?  The problem is
that they aren't interchangeable on PCC_BITFIELD_TYPE_MATTERS targets;
using int will impose int alignment on the struct, which breaks its
intended use (if I understand it properly).

> Please help?

I'd be inclined to give up.  What's wrong with requiring gcc for building
the other frontends?

Jason

  parent reply	other threads:[~2003-04-03  1:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-03  0:11 Kaveh R. Ghazi
2003-04-03  1:23 ` Geoffrey Keating
2003-04-03  6:45   ` Kaveh R. Ghazi
2003-04-03  3:17 ` Jason Merrill [this message]
2003-04-03  5:57   ` Kaveh R. Ghazi
2003-04-03  6:15     ` Jason Merrill

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=wvlznn8pf3h.fsf@prospero.boston.redhat.com \
    --to=jason@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=geoffk@apple.com \
    --cc=ghazi@caip.rutgers.edu \
    /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).