tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: discussion seeked for c++ variants in USE_LANGUAGES



On Wed, Nov 11, 2015 at 09:04:08AM +0100, Richard PALO wrote:
> This article discusses a bit the abi issues: 
> http://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/

Short versions: libstdc++ before 5.1 does not correctly implement
invalidation rules for std::string iterations due to using
copy-on-write. With GCC 5.1, they decided to implement their own
proprietary version mechanism .

> BTW, as I mentioned earlier, I believe too that we should consider explicitly 
> set the defaults for 'c' and 'c++' to -std=gnu89 and -std=gnu++98 respectfully 
> as the compiler defaults changed recently, at least they have for gcc5.
> This, naturally, to avoid surprises to the pkgsrc community having a wide variety of compilers in use.

Please don't, it breaks more things than it helps. It is technically
even incorrect, as the default used to be c++03 more orless.

> >> Having both c++11 and c++14 means that they are simply available to packages that
> >> need them, not necessarily to enforce using them. That said, I have no 
> >> personal need requiring it now, it was mainly for completeness.
> > 
> > I really don't understand what that means in practice in terms of
> > compiler selection.
> > 
> This means simply I haven't seen any packages requiring the pkgsrc Makefile
> to specify -std=c++14 (or gnu++14)... although there are a number of packages
> setting -std=c++11 (or gnu++11) so as far as pkgsrc is concerned, I believe it 
> to be a moot issue and finally probably best not to add it at the moment.

C++14 is a refinement of C++11 and there are few reasons so far to force
it, especially given that Microsoft is just catching up with C++11 in VS.

Joerg


Home | Main Index | Thread Index | Old Index