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"


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

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

It would certainly seem so.  After all, we'd be talking about an extension
supported only by GNU C, and anyone who can get GNU C can get GNU C++ for
the same platform.  Not only that, but by targeting C++, *any* C++
compiler could be used, not just GNU.  Given this, I can't conceive of why
as a tool-maker I'd want to take advantage of such a feature (and writing
tools that generate C or C++ code is what I do for a living).

In the old days, my approach tended to be to generate C, but found that I
wasted a lot of my time duplicating features that C++ provides for free
(reliable constructors and destructors, for example), so it's better to
generate C++.


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