This is the mail archive of the gcc@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: Using __extension__ in a struct with a GTY(()) mark


On Wed, 2 Apr 2003 18:00:52 -0500 (EST), "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot 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


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