public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: jason@redhat.com
Cc: gcc@gcc.gnu.org, geoffk@apple.com
Subject: Re: Using __extension__ in a struct with a GTY(()) mark
Date: Thu, 03 Apr 2003 05:57:00 -0000	[thread overview]
Message-ID: <200304030208.VAA27214@caip.rutgers.edu> (raw)
In-Reply-To: <wvlznn8pf3h.fsf@prospero.boston.redhat.com>

 > From: Jason Merrill <jason@redhat.com>
 > 
 > 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.

We often use __extension__ when we do one thing conditioned on GNUC
and another when we don't have gcc.  This is specifically to silence
-pendatic warnings, when we know we have acceptable code for both gcc
and non-gcc.  E.g. see the tree/rtl "checking" macros.


 > > 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).

They're interchangable functionally but of course the char bitfield
uses less space.  So if the bootstrap compiler is not gcc, then stage1
cc1plus will use slightly more memory, but stage2 and stage3 will
appropriately have a smaller memory footprint as originally intended.


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

I guess you missed this discussion:
http://gcc.gnu.org/ml/gcc/2003-03/msg00146.html

This is what I'm trying to facilitate.  Since we've approved requiring
ISO C to bootstrap, if cc1plus eliminates gnuc-isms we could build it
in stage1 and allow Tom to use C++ in the java frontend while still
having a 3-stage process (instead of 4.)

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

  reply	other threads:[~2003-04-03  2:08 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
2003-04-03  5:57   ` Kaveh R. Ghazi [this message]
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=200304030208.VAA27214@caip.rutgers.edu \
    --to=ghazi@caip.rutgers.edu \
    --cc=gcc@gcc.gnu.org \
    --cc=geoffk@apple.com \
    --cc=jason@redhat.com \
    /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).