Using C++ in GCC is OK
Richard Earnshaw
rearnsha@arm.com
Wed Jun 2 17:47:00 GMT 2010
On Mon, 2010-05-31 at 10:02 -0700, Mark Mitchell wrote:
> I think virtual functions are on the edge; quite useful, but do result
> in the compiler adding a pointer to data objects and in uninlinable
> indirect calls at run-time. Therefore, I would avoid them in the
> initial subset of C++ used in GCC.
We do, of course, have one very big 'virtual function' table in gcc --
namely the target hooks. It would be a shame if that couldn't be made
into a proper class with virtual functions by some arbitrary rule --
it's a perfect example of when they should be considered.
R.
More information about the Gcc
mailing list