On 10/19/14 19:08, Alex Xu wrote:
On 19/10/14 06:53 PM, Anthony G. Basile wrote:
the default is still gnu++98
what does this mean, how does it differ from c++98?
Its a gnu dialect. I'm not sure of the details of how it deviates from
the strict standard. I'm more familiar with how c++11 differs from
c++98. Google around and let me know what you find.
in the older ABI, can lead to a crippled system.
what do you mean, will other packages break too? maybe "may lead to
non-functioning or possibly broken packages". adjust as necessary; I am
not familiar with what may break if incompatible libraries are linked
together.
If you build a library in the "other" abi, then executables which link
against it may fail. I say "may" because you might get lucky and just
miss one of the changes. See
https://gcc.gnu.org/wiki/Cxx11AbiCompatibility. That's only for gcc-4.7
though. I got a feeling that list is not complete.
However, as c++11 gains in popularity and the number of packages using it
increase, it is important that users understand these precautions.
what precautions? what am I supposed to do? is there a option to warn me
if I try to do something stupid? should I check some packages on my system?
Do nothing. A careful reading implies that you should not just add
-std=c++11 or gnu++11 to your compiler flags without knowing that things
can break. I can emphasis that at this point.
remember that gcc-4.7 is literally all (standard) gentoo users, so a
news item needs to be clear about who exactly needs to care about the
issue, which here appears to be a small subset of "all (standard) gentoo
users"; namely, those who specifically opt in to using C++11 (or are
compiling such packages manually).
User fool around with stuff all the time which I like. This is a
cautionary note which increases awareness especially when we get bug
reports. The real question to my colleagues is whether they think this
is news worthy or not. I don't want to turn it into a c++11 gentoo howto.
also, strictly speaking, last I checked, the name of the standard is
C++11; c++11 is just what gcc takes.
and maybe some links about what could break if I link incompatible
libraries together would be helpful, since the links don't seem to go
over that (at least apparently; I did not read the entire contents).
Basically what happens is you get unresolved symbols. You will know them
because of the charactarist c++ mangled names which you can demangle
with c++filt.
--
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail : bluen...@gentoo.org
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
GnuPG ID : F52D4BBA