Usage of C++ features
mikael.gerdin at oracle.com
Thu Feb 6 03:56:00 PST 2014
On Thursday 06 February 2014 21.27.51 David Holmes wrote:
> Hi Goetz,
> On 6/02/2014 8:33 PM, Lindenmaier, Goetz wrote:
> > Hi,
> > wrt. our (SAPs) various ports which are running on old machines, built
> > with old compilers for compatibility, I would like to find out about
> > the OpenJDK policy regarding 'real' C++ features.
> I don't think there is such a thing as "OpenJDK policy" for this. Things
> need to be evaluated on their merits taking into account a range of
> factors, including compiler compatibility issues.
> > Recently, we found increasing usage of C++ features.
> > - 'throw()' in nmethod operator new
> > - usage of namespace std::
> AFAICS only std::nothrow is in use, which combines with the use of
> throw() in numerous (most?) operator new definitions to make it clear
> that these don't throw any exceptions.
> That said the compiler folk have expressed interest in using C++
> exceptions within the compiler.
> > - template template parameters in binaryTreeDictionary.hpp|cpp
> Can't comment on that.
I have this lingering feeling that we shouldn't need to use template template
parameters for the binaryTreeDictionary code but I haven't experimented with
I'd prefer to simplify that just for the sake of sanity.
> > We would like to know whether you are planning to increase the
> > usage of C++ or even use C++11 features. Or, whether you are planning
> > to keep the policy to avoid C++ features that caused problems to
> > compilers in the past.
> I can envisage usage of C++11 atomics at some point. But it depends on
> it being supported across sufficient compilers. What else is coming in
> I think everything has to be considered on a case-by-case basis. You
> presumably have some things in mind ?
> Just my 2c. I'm not a policy maker. :)
> > Best regards,
> > Goetz.
More information about the hotspot-dev