This is the mail archive of the
mailing list for the GCC project.
Re: RFC: attribute "unpadded"
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 27 Aug 2002 11:59:08 -0700
- Subject: Re: RFC: attribute "unpadded"
That statement seems plausible, but your examples are not very convincing,
All I can tell you is what our customers tell us...
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.
This was meant as an example of an object-oriented language that might
like to be binary-compatible with C++.
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?
There are things that can make that difficult; C++ has some pretty complex
rules that you can dodge for C. And, a lot of these compilers already
As you say, the primary motivation was testing. We're trying to provide
a tool that will make it easier for G++ to make sure its ABI-compliant.
This would make it easier for us to build the tool. Let's leave it at
Mark Mitchell firstname.lastname@example.org
CodeSourcery, LLC http://www.codesourcery.com