This is the mail archive of the
mailing list for the GCC project.
Re: Using C++ in GCC is OK
On Mon, May 31, 2010 at 10:29 AM, David Fang <email@example.com> wrote:
>> For example, I think it goes without question that at this point we are
>> limiting ourselves to C++98 (plus "long long" so that we have a 64-bit
>> integer type); C++0x features should not be used. ?Using multiple
>> inheritance, templates (other than when using the C++ standard library,
>> e.g. std::list<X>), or exceptions also seems overly aggressive to me.
>> We should use features that are relatively easy for C programmers to
>> understand and relatively hard for new C++ programmers to misuse. ?(For
>> example, I think constructors and destructors are pretty easy and hard
>> to misuse.)
> This sort of leads to questions about C++ libraries used by gcc:
> 1) is there interest in using libstdc++ (gcc's version) in whole or a
> subset? ?(which subset?) ?For example, I think it would be reasonable to use
> most standard containers. ?<algorithm> could be useful, but itself relies on
> function overloading for optimization in some places. Overloading in any
> form could be debatable, if you're being conservative about feature
> 2) should there be a double standard w.r.t. std library use? ?Allowing a
> greater set of language features for the sake of using libstdc++, but a
> restricted set of C++ for non-libstdc++ libraries and data structures?
> iostreams, for example, uses multiple inheritance (even multiple virtual
> inheritance), should that be sufficient grounds for forbidding use of
Currently GCC uses the C standard implementation, without using itself all
the horrors you can find in standard header files.
The subset being discussed in the one that reviewers will accept, not the one
the C++ compiler will accept.