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: RFC: attribute "unpadded"


On 27-Aug-2002, Mark Mitchell <mark@codesourcery.com> wrote:
> 
> >What's the advantage *for users* in being able to emulate the C++ ABI in
> >C?
> 
> Good question.
> 
> There is probably little utility for users, but there is utility for tools,
> and for other languages.

That statement seems plausible, but your examples are not very convincing,
IMHO.

> For example, Ada people have talked about laying
> out objects in a C++-compatible way so that objects could be passed back
> and forth between the languages.

I don't see how extending the C front-end to support attribute "unpadded"
would achieve that goal.  Presumably Ada objects are layed out by GNAT,
not C... if the issue is Ada/C++ compatibility, I don't see where C
comes into it.

> People who generate C from their
> object-oriented language compilers and want C++ interoperability also
> would like to make use of this feature.

Wouldn't those people be better off just retargetting their compilers
to generate C++ rather than C?

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


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