update MAINTAINERS file
Same wife/person. Different name, email. -benjamin 2013-08-19 Benjamin De Kosnik b...@gnu.org * MAINTAINERS: Update name, email. diff --git a/MAINTAINERS b/MAINTAINERS index ef6ab87..c0ffb68 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -194,7 +194,7 @@ dwarf debugging code Cary Coutant ccout...@google.com c++ runtime libs Paolo Carlini paolo.carl...@oracle.com c++ runtime libs Gabriel Dos Reis g...@integrable-solutions.net c++ runtime libs Ulrich Drepper drep...@gmail.com -c++ runtime libs Benjamin Kosnik b...@redhat.com +c++ runtime libs Benjamin De Kosnik b...@gnu.org c++ runtime libs Loren J. Rittle ljrit...@acm.org c++ runtime libs Jonathan Wakely r...@gcc.gnu.org *synthetic multiply Torbjorn Granlund t...@swox.com
Re: [vtv] fix default configure
More patches to fix disable issus on non-linux. Here's a patch for the build failure on darwin. Will check in when testing completes. tested x86/linux tested x86_64/darwin12 -benjamin2013-08-08 Benjamin Kosnik b...@rehat.com Michael Meissner meiss...@linux.vnet.ibm.com * configure.tgt : Simplify, just use VTV_SUPPORTED. diff --git a/libvtv/configure.tgt b/libvtv/configure.tgt index a84ed27..801d2f0 100644 --- a/libvtv/configure.tgt +++ b/libvtv/configure.tgt @@ -19,6 +19,7 @@ # lets us skip running autoconf when modifying target specific information. # Filter out unsupported systems. +VTV_SUPPORTED=no case ${target} in x86_64-*-linux* | i?86-*-linux*) VTV_SUPPORTED=yes @@ -30,9 +31,7 @@ case ${target} in arm*-*-linux*) ;; x86_64-*-darwin[1]* | i?86-*-darwin[1]*) - VTV_SUPPORTED=no ;; *) - UNSUPPORTED=1 ;; esac 2013-08-02 Benjamin Kosnik b...@redhat.com * configure.ac: Adjust to check VTV_SUPPORTED. * configure: Regenerated. diff --git a/configure.ac b/configure.ac index bcbc95c..6f3d801 100644 --- a/configure.ac +++ b/configure.ac @@ -561,7 +561,7 @@ if test -d ${srcdir}/libvtv; then AC_MSG_CHECKING([for libvtv support]) if (srcdir=${srcdir}/libvtv; \ . ${srcdir}/configure.tgt; \ - test -n $UNSUPPORTED) + test $VTV_SUPPORTED != yes) then AC_MSG_RESULT([no]) noconfigdirs=$noconfigdirs target-libvtv
[vtv] fix default configure
Here's a patch for the build failure on darwin. tested x86/linux -benjamindiff --git a/libvtv/Makefile.am b/libvtv/Makefile.am index ab3233f..73acfb4 100644 --- a/libvtv/Makefile.am +++ b/libvtv/Makefile.am @@ -19,7 +19,11 @@ ## along with this library; see the file COPYING3. If not see ## http://www.gnu.org/licenses/. +if ENABLE_VTABLE_VERIFY SUBDIRS = testsuite +else +SUBDIRS = +endif ACLOCAL_AMFLAGS = -I .. -I ../config diff --git a/libvtv/acinclude.m4 b/libvtv/acinclude.m4 index 6faca98..53e62d2 100644 --- a/libvtv/acinclude.m4 +++ b/libvtv/acinclude.m4 @@ -30,17 +30,6 @@ dnl - lots of tools, like CC and CXX dnl AC_DEFUN([LIBVTV_CONFIGURE], [ - # Use same top-level configure hooks in libgcc/libstdc++/libvtv. - AC_ARG_ENABLE(vtable-verify, - [ --enable-vtable-verifyEnable vtable verification feature ], - [case $enableval in - yes) enable_vtable_verify=yes ;; - no) enable_vtable_verify=no ;; - *) enable_vtable_verify=no;; - esac], - [enable_vtable_verify=no]) - AM_CONDITIONAL(ENABLE_VTABLE_VERIFY, test $enable_vtable_verify = yes) - # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. diff --git a/libvtv/configure.ac b/libvtv/configure.ac index cc8e280..4724312 100644 --- a/libvtv/configure.ac +++ b/libvtv/configure.ac @@ -20,6 +20,34 @@ AC_ARG_ENABLE(version-specific-runtime-libs, [version_specific_libs=no]) AC_MSG_RESULT($version_specific_libs) +# Use same top-level configure hooks in libgcc/libstdc++/libvtv. +AC_MSG_CHECKING([for --enable-vtable-verify]) +AC_ARG_ENABLE(vtable-verify, +[ --enable-vtable-verifyEnable vtable verification feature ], +[case $enableval in + yes) enable_vtable_verify=yes ;; + no) enable_vtable_verify=no ;; + *) enable_vtable_verify=no;; + esac], +[enable_vtable_verify=no]) +AC_MSG_RESULT($enable_vtable_verify) + +# See if supported. +unset VTV_SUPPORTED +AC_MSG_CHECKING([for host support for vtable verification]) +. ${srcdir}/configure.tgt +AC_MSG_RESULT($VTV_SUPPORTED) + +# Decide if it's usable. +use_vtable_verify=no +if test x$VTV_SUPPORTED = xyes; then + if test x$enable_vtable_verify = xyes; then +use_vtable_verify=yes +AC_MSG_NOTICE(using vtable verification) + fi +fi +AM_CONDITIONAL(ENABLE_VTABLE_VERIFY, test $use_vtable_verify = yes) + # Do not delete or change the following two lines. For why, see # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html AC_CANONICAL_SYSTEM @@ -31,6 +59,8 @@ AM_INIT_AUTOMAKE(foreign no-dist) AM_ENABLE_MULTILIB(, ..) AM_MAINTAINER_MODE +LIBVTV_CONFIGURE + # Calculate toolexeclibdir # Also toolexecdir, though it's only used in toolexeclibdir case ${version_specific_libs} in @@ -102,13 +132,6 @@ else multilib_arg= fi -LIBVTV_CONFIGURE - -# Get target configury. -unset VTV_SUPPORTED -. ${srcdir}/configure.tgt -AM_CONDITIONAL(VTV_SUPPORTED, [test x$VTV_SUPPORTED = xyes]) - AC_CONFIG_FILES([Makefile]) if test x$VTV_SUPPORTED = xyes; then
Re: [PATCH/Merge Request] Vtable Verification feature.
+# Filter out unsupported systems. +case ${target} in + x86_64-*-linux* | i?86-*-linux*) + VTV_SUPPORTED=yes + ;; + powerpc*-*-linux*) + ;; + sparc*-*-linux*) + ;; + arm*-*-linux*) + ;; What about powerpc, sparc and arm? Why are they mentioned here if no actual decision is made about support? This is more a practical consideration: it's the middle of summer break. Let's error on the side of caution for the moment, and get this in causing minimal disruption on a convenient platform that I can verify myself easily. On a practical note, the libsanitizer acceptance criteria was/is as above, seems sensible to do the same thing with libvtv. Once this is in trunk, let a million flowers bloom! There is no reason specific platform/target maintainers can't enable it at their leisure on a per-setup manner and when they can verify testresults easily. -benjamin
Re: [PATCH/Merge Request] Vtable Verification feature.
Nice to see! I have created (with some help) a git branch on gcc.gnu.org to contain the vtable verification feature work. This work is now well integrated with GCC trunk, and the sources are in a good state for future work. I believe all previous review comments have been addressed. The runtime bits are OK to me. Thanks for all your work on this. The feature is disabled by default, and disabled on non-linux OSes. Regression testing on linux is showing great results (no regressions). I can confirm these results on x86_64/linux. There is a wiki page at http://gcc.gnu.org/wiki/vtv that contains information about how to use the feature, as well as links to the Feature Proposal, User's Guide, and the presentation on this feature at last year's GNU Tools Cauldron. This work has been ongoing since GCC 4.7 and is now ready to merge into trunk for the GCC 4.9.0 release. I would like permission to merge this in (and or information on the best way to proceed from here). Thanks. You'll need a GWP to do the merge (Maybe Diego, Jason, Richard Henderson?) and then add yourself to MAINTAINERS for libvtv. -benjamin You'll need a GWP to do the merge, and then add yourself to MAINTAINERS for libvtv.
[v3] more abi_tagging for DR130
Some of the DR130-mandated signature changes for C++11 require the use of abi_tag to properly distinguish from C++98 calls of the same function, but with a different return type. I've audited libstdc++ for C++98/C++11 API differences that are signature changes that mangle the same. C++11 to C++14 changes of this type will be mangled with abi_tag(cxx14), but I didn't notice any. I put in reproducers for the fail, but these are only active on ia32 at the moment. I've found testing a specific multilib in libstdc++ (ie -m32 on x76_64) more difficult than imagined, so am just simplifying to one psABI that demonstrates the issue. No doubt there are others. I'm not quite sure how to abstract this Similar to the complex::real/imag use, there are separate test cases to confirm the newly mangled versions. I've noticed that these newly mangled names using abi_tag cannot be presently demangled: see PR57581. Since this is impacting C++98/C++11 compat, I intend to put this on 4.8 branch after a couple of days mellowing on trunk. tested x86_64/linux tested i686/linux -benjamin2013-06-10 Benjamin Kosnik b...@redhat.com * include/bits/c++config (_GLIBCXX_ABI_TAG_CXX11): Add. * include/bits/stl_map.h (erase): Use abi_tag when C++11. * include/bits/stl_multimap.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_tree.h: Same. * include/std/complex (real, imag): Use macro for abi_tag. * testsuite/lib/libstdc++.exp: Disable inlinling with -fno-inline. * testsuite/util/testsuite_containers.h (erase_external): New declarations. (erase_external_iterators): Same. (linkage_check_cxx98_cxx11_erase): Same. (linkage_check_cxx98_cxx11_erase_iterators): Same. * testsuite/util/testsuite_shared.cc: Define. * testsuite/23_containers/map/modifiers/erase/abi_tag.cc: New. * testsuite/23_containers/map/modifiers/erase/ dr130-linkage-check.cc: New. * testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc: New. * testsuite/23_containers/multimap/modifiers/erase/ dr130-linkage-check.cc: New. * testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc: New. * testsuite/23_containers/multiset/modifiers/erase/ dr130-linkage-check.cc: New. * testsuite/23_containers/set/modifiers/erase/abi_tag.cc: New. * testsuite/23_containers/set/modifiers/erase/dr130-linkage-check.cc: New. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line number. * testsuite/23_containers/map/dr130.cc: Move... * testsuite/23_containers/map/modifiers/dr130.cc: ...here. * testsuite/23_containers/multimap/dr130.cc: Move ... * testsuite/23_containers/multimap/modifiers/dr130.cc: ...here. * testsuite/23_containers/multiset/dr130.cc: Move... * testsuite/23_containers/multiset/modifiers/dr130.cc: ...here. * testsuite/23_containers/set/dr130.cc: Move... * testsuite/23_containers/set/modifiers/dr130.cc: ...here. diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 04ae4cb..aca8484 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -84,6 +84,12 @@ # define _GLIBCXX_DEPRECATED #endif +// Macros for ABI tag attributes. +#ifndef _GLIBCXX_ABI_TAG_CXX11 +# define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ (cxx11))) +#endif + + #if __cplusplus // Macro for constexpr, to support in mixed 03/0x mode. diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index 1f6763c..d05e4b9 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -690,7 +690,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER erase(const_iterator __position) { return _M_t.erase(__position); } - // LWG 2059. + // LWG 2059 + _GLIBCXX_ABI_TAG_CXX11 iterator erase(iterator __position) { return _M_t.erase(__position); } diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index 696e298..809ea54 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -596,6 +596,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { return _M_t.erase(__position); } // LWG 2059. + _GLIBCXX_ABI_TAG_CXX11 iterator erase(iterator __position) { return _M_t.erase(__position); } diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h index ea22f4c..8ceb02a 100644 --- a/libstdc++-v3/include/bits/stl_multiset.h +++ b/libstdc++-v3/include/bits/stl_multiset.h @@ -532,6 +532,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * not touched in any way. Managing the pointer is the user's * responsibility. */ + _GLIBCXX_ABI_TAG_CXX11 iterator erase(const_iterator __position) { return _M_t.erase(__position); } @@ -583,6 +584,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * touched in any way. Managing the pointer is the user's *
[wwwdocs] correct GFDL spelling
Noticed this typo when doing the 4.8.1 docs. I'd removed this in the top-level file before, and that's fine, but these release-versioned files were wrong. -benjamin2013-05-31 Benjamin Kosnik b...@redhat.com * htdocs/onlinedocs/4.8.0/index.html: Correct to GFDL. * htdocs/onlinedocs/4.8.1/index.html: Same. Index: htdocs/onlinedocs/4.8.0/index.html === RCS file: /cvs/gcc/wwwdocs/htdocs/onlinedocs/4.8.0/index.html,v retrieving revision 1.2 diff -c -p -r1.2 index.html *** htdocs/onlinedocs/4.8.0/index.html 22 Mar 2013 20:21:26 - 1.2 --- htdocs/onlinedocs/4.8.0/index.html 31 May 2013 23:50:48 - *** *** 63,69 in PDF/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api.xml.gz;XML GPL/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-gdl.xml.gz;XML GDL/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-html.tar.gz;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo/;GCCGO 4.8.0 Manual/a (a --- 63,69 in PDF/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api.xml.gz;XML GPL/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-gfdl.xml.gz;XML GFDL/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-html.tar.gz;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo/;GCCGO 4.8.0 Manual/a (a Index: htdocs/onlinedocs/4.8.1/index.html === RCS file: /cvs/gcc/wwwdocs/htdocs/onlinedocs/4.8.1/index.html,v retrieving revision 1.1 diff -c -p -r1.1 index.html *** htdocs/onlinedocs/4.8.1/index.html 31 May 2013 11:04:35 - 1.1 --- htdocs/onlinedocs/4.8.1/index.html 31 May 2013 23:50:57 - *** *** 63,69 in PDF/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.1/libstdc++-api.xml.gz;XML GPL/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.1/libstdc++-api-gdl.xml.gz;XML GDL/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.1/libstdc++-api-html.tar.gz;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gccgo/;GCCGO 4.8.1 Manual/a (a --- 63,69 in PDF/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.1/libstdc++-api.xml.gz;XML GPL/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.1/libstdc++-api-gfdl.xml.gz;XML GFDL/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.1/libstdc++-api-html.tar.gz;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gccgo/;GCCGO 4.8.1 Manual/a (a
Re: [patch] Default to --enable-libstdcxx-time=auto
It scraps the renaming/aliasing approach, and just creates a compatibility-chrono.cc that mimics the default configuration in 4.8.0. Yeah, I think that is reasonable, with one nit, see below. Cool, incorporated. Users who specially-configured a build with --enable-libstdcxx-time configure options in 4.8.0 are breaking an experimental C++ ABI anyway, so I'm not going to solve for anything but the default case. For chrono.cc, there is an inline namespace that mangles system_clock and steady_clock in a new way to prevent ambiguous uses. In addition, I make a controversial decision and just forward-declare clocks that libstdc++ cannot do correctly, instead of using typedefs that clearly are only going to get us into trouble as we change things down the road. That's probably only appropriate for trunk. +// To support the (forward) evolving definition of the library's +// defined clocks, wrap inside inline namespace so that these +// types are uniquely mangled. This way, new code can use the +// current clocks, while the library can contain old definitions. +// At some point, when these clocks settle down, the inlined +// namespaces can be removed. +// XXX GLIBCXX_ABI Deprecated +inline namespace _V2 { + /// system_clock struct system_clock { In this _V2 inline namespace, I think we should change that: struct system_clock { #ifdef _GLIBCXX_USE_CLOCK_REALTIME typedef chrono::nanoseconds duration; #elif defined(_GLIBCXX_USE_GETTIMEOFDAY) typedef chrono::microseconds duration; #else typedef chrono::seconds duration; #endif into: struct system_clock { typedef chrono::nanoseconds duration; Won't the templates then DTRT in: return time_point(duration(chrono::seconds(tv.tv_sec) + chrono::microseconds(tv.tv_usec))); (multiply microseconds by 1000 and seconds by 10) return system_clock::from_time_t(__sec); (multiply seconds by 10)? Yes. While this change isn't really necessary for Linux, where usually _GLIBCXX_USE_CLOCK_REALTIME will be in 4.8.1+ defined and thus the nanoseconds resolution will be used anyway, on other OSes it might be already a problem, say on Solaris or FreeBSD GCC 4.8.1 will have by default likely microseconds resolution, while on the trunk nanoseconds. By making it always count in nanoseconds, even if on some OSes the low 3 or 9 decimal digits will be always zero, we'd prepared to change the system_clock::now() implementation any time to provide better resolution, as a libstdc++ internal implementation detail. Or is this undesirable for users for some reason? I think your rationale is sound here. I've added some of these comments to the code. @@ -742,10 +751,18 @@ _GLIBCXX_END_NAMESPACE_VERSION now() noexcept; }; #else -typedef system_clock steady_clock; +// Forward declare only. +struct steady_clock; #endif +#ifdef _GLIBCXX_USE_CLOCK_REALTIME typedef system_clock high_resolution_clock; +#else +// Forward declare only. +struct high_resolution_clock; +#endif + + } // end inline namespace _V2 Yeah, I bet this hunk should be left out from 4.8.1 version of the patch. I did something different, anyway. Un-guardedly declare the clocks, and then just use the definitions in the .cc file to define QoI. That way there is a symbol exported in all configs, but one that can be improve in the future w/o pain. Perhaps we also want some testcase that will roughly test it, like grab time(NULL), std::chrono::system_clock::now() and std::chrono::steady_clock::now(), then sleep(3), grab both clocks again and time(NULL) last, then if the difference between time() is at least 2 seconds and less than say 10, verify the difference between the clocks is say in a 1 to 20 seconds interval (yeah, it could fail badly if one changes system time in between once or several times)? But maybe it would be too flakey. Agreed, certainly room for improvement. Let's separate out this part though. I'm tempted to check this patch into trunk. Jakub? tested x86_64/linux -benjamin 2013-05-24 Benjamin Kosnik b...@redhat.com * include/std/chrono: Wrap clocks in inline namespace _V2. * src/c++11/chrono.cc: Same. * src/c++11/compatibility-chrono.cc: Revert to previous chrono.cc file, with default configure macros selected. * config/abi/pre/gnu.ver (GLIBCXX_3.4.19): Use symbols from inline namespace. * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Fix up. * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Regenerated. *
Re: [patch] Default to --enable-libstdcxx-time=auto
Looks good to me. Great, trunk patch in. Will you prepare corresponding patch for the 4.8 branch too (I guess it should be pretty much the same, not sure if it should keep using typedef system_clock steady_clock as before for the non-MONOTONIC configuration, or if it should just do the same thing as trunk)? Same thing, I think. Testing now, ok when it completes? -benjamin
Re: [patch] Default to --enable-libstdcxx-time=auto
I get the following testsuite regressions on Solaris 10/x86: FAIL: 30_threads/async/54297.cc (test for excess errors) WARNING: 30_threads/async/54297.cc compilation failed to produce executable FAIL: 30_threads/condition_variable_any/53830.cc (test for excess errors) WARNING: 30_threads/condition_variable_any/53830.cc compilation failed to produ e executable FAIL: 30_threads/this_thread/3.cc (test for excess errors) WARNING: 30_threads/this_thread/3.cc compilation failed to produce executable FAIL: 30_threads/this_thread/4.cc (test for excess errors) WARNING: 30_threads/this_thread/4.cc compilation failed to produce executable FAIL: 30_threads/thread/native_handle/cancel.cc (test for excess errors) WARNING: 30_threads/thread/native_handle/cancel.cc compilation failed to produc e executable All of them have the same root cause: Excess errors: Undefined first referenced symbol in file nanosleep /var/tmp//ccQhmiwd.o (symbol belongs to implicit dependency /lib/librt.so.1) ld: fatal: symbol referencing errors. No output written to ./54297.exe collect2: error: ld returned 1 exit status It seems that now every single C++ program needs to be linked with -lrt, not only libstdc++.so. This will also happen on Solaris 9 (bootstrap still running), while on Solaris 11 nanosleep and the others were integrated into libc.so.1. So you'll need conditional LDFLAGS for solaris 9 and 10 only? Speaking of Solaris 9, there's another caveat: unlike Solaris 10 and up, CLOCK_MONOTONIC isn't defined, while the equivalent non-standard CLOCK_HIGHRES is. Instead of handling this in libstdc++-v3/src/c++11/chrono.cc directly, I've chosen the following route which allows libstdc++ to build on Solaris 9: 2013-05-22 Rainer Orth r...@cebitec.uni-bielefeld.de * config/os/solaris/solaris2.9/os_defines.h [!CLOCK_MONOTONIC] (CLOCK_MONOTONIC): Define. The Solaris 9 (i386-pc-solaris2.9) bootstrap has now completed successfully, so the patch above seems to be sound. Ok for mainline? This is ok.Thanks! -benjamin
Re: [patch] Default to --enable-libstdcxx-time=auto
So, there is a minor issue that what is std::chrono::steady_clock has changed, if you say use it as a function parameter, it will mangle differently before/after. Guess not that big a deal, after all, C++11 support is still experimental, right? Right, ditto, yes. But the more important issue is that std::chrono::system_clock broke, code compiled against the old headers will assume std::chrono::system_clock::duration is microseconds resolution on Linux, while code compiled against the new headers will assume it is in nanoseconds resolution. That is because of: #ifdef _GLIBCXX_USE_CLOCK_REALTIME typedef chrono::nanoseconds duration; #elif defined(_GLIBCXX_USE_GETTIMEOFDAY) typedef chrono::microseconds duration; #else typedef chrono::seconds duration; #endif Thus, I'm afraid we can't ABI compatibly change either of these macros, unless we e.g. keep old std::chrono::system_clock as is and introduce std::chrono::__whatever::system_clock or whatever, that will be typedefed as std::chrono::system_clock. If we want to care about C++11 ABI compat on release branches (?), here's another solution. It scraps the renaming/aliasing approach, and just creates a compatibility-chrono.cc that mimics the default configuration in 4.8.0. Users who specially-configured a build with --enable-libstdcxx-time configure options in 4.8.0 are breaking an experimental C++ ABI anyway, so I'm not going to solve for anything but the default case. For chrono.cc, there is an inline namespace that mangles system_clock and steady_clock in a new way to prevent ambiguous uses. In addition, I make a controversial decision and just forward-declare clocks that libstdc++ cannot do correctly, instead of using typedefs that clearly are only going to get us into trouble as we change things down the road. That's probably only appropriate for trunk. Flame on, cowboys, flame on. This still doesn't solve the solaris 9/10 librt issue. tested x86_64/linux -benjamin 2013-05-24 Benjamin Kosnik b...@redhat.com * include/std/chrono: Wrap clocks in inline namespace _V2. * src/c++11/chrono.cc: Same. * src/c++11/compatibility-chrono.cc: Revert to previous chrono.cc file, with default configure macros selected. * config/abi/pre/gnu.ver (GLIBCXX_3.4.19): Use symbols from inline namespace. * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Fix up. diff --git a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt index 165638b..0217375 100644 --- a/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt +++ b/libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt @@ -1937,9 +1937,9 @@ FUNC:_ZNSt6__norm15_List_node_base7_M_hookEPS0_@@GLIBCXX_3.4.14 FUNC:_ZNSt6__norm15_List_node_base7reverseEv@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base8transferEPS0_S1_@@GLIBCXX_3.4.9 FUNC:_ZNSt6__norm15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14 -FUNC:_ZNSt6chrono12steady_clock3nowEv@@GLIBCXX_3.4.19 -FUNC:_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17 FUNC:_ZNSt6chrono12system_clock3nowEv@@GLIBCXX_3.4.11 +FUNC:_ZNSt6chrono3_V212steady_clock3nowEv@@GLIBCXX_3.4.19 +FUNC:_ZNSt6chrono3_V212system_clock3nowEv@@GLIBCXX_3.4.19 FUNC:_ZNSt6gslice8_IndexerC1EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6gslice8_IndexerC2EmRKSt8valarrayImES4_@@GLIBCXX_3.4 FUNC:_ZNSt6locale11_M_coalesceERKS_S1_i@@GLIBCXX_3.4 @@ -2953,6 +2953,8 @@ OBJECT:1:_ZNSt21__numeric_limits_base9is_iec559E@@GLIBCXX_3.4 OBJECT:1:_ZNSt21__numeric_limits_base9is_moduloE@@GLIBCXX_3.4 OBJECT:1:_ZNSt21__numeric_limits_base9is_signedE@@GLIBCXX_3.4 OBJECT:1:_ZNSt6chrono12system_clock12is_monotonicE@@GLIBCXX_3.4.11 +OBJECT:1:_ZNSt6chrono3_V212steady_clock9is_steadyE@@GLIBCXX_3.4.19 +OBJECT:1:_ZNSt6chrono3_V212system_clock9is_steadyE@@GLIBCXX_3.4.19 OBJECT:1:_ZSt10adopt_lock@@GLIBCXX_3.4.11 OBJECT:1:_ZSt10defer_lock@@GLIBCXX_3.4.11 OBJECT:1:_ZSt11try_to_lock@@GLIBCXX_3.4.11 diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 9c64a0d..9e1f4da 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -1320,11 +1320,8 @@ GLIBCXX_3.4.17 { _ZNSt13__future_base19_Async_state_commonD1Ev; _ZNSt13__future_base19_Async_state_commonD2Ev; -#ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT - # GLIBCXX_ABI compatibility only. # std::chrono::steady_clock::now() _ZNSt6chrono12steady_clock3nowEv; -#endif } GLIBCXX_3.4.16; @@ -1349,8 +1346,11 @@ GLIBCXX_3.4.18 { GLIBCXX_3.4.19 { -# std::chrono::steady_clock::now() -_ZNSt6chrono12steady_clock3nowEv; +# chrono second generation +_ZNSt6chrono3_V212steady_clock3nowEv; +_ZNSt6chrono3_V212steady_clock9is_steadyE; +_ZNSt6chrono3_V212system_clock3nowEv; +_ZNSt6chrono3_V212system_clock9is_steadyE; } GLIBCXX_3.4.18; diff --git a/libstdc++-v3/include/std/chrono
[wwwdocs] correct email address for assignments
Fix typo in assignment email address, to make gcc match GNU site: https://www.gnu.org/prep/maintain/maintain.html#Legal-Matters It would be awesome if now GCC assigments were magically less work. -benjamin2013-05-22 Benjamin Kosnik b...@redhat.com * htdocs/contribute.html: Use ass...@gnu.org, match main GNU docs. Index: htdocs/contribute.html === RCS file: /cvs/gcc/wwwdocs/htdocs/contribute.html,v retrieving revision 1.79 diff -c -p -r1.79 contribute.html *** htdocs/contribute.html 22 Oct 2011 13:46:22 - 1.79 --- htdocs/contribute.html 22 May 2013 19:05:44 - *** the relevant forms. The most common for *** 44,50 specific change, an assignment for all future changes, and an employer disclaimer, if an employer or school owns work created by the developer. It's a good idea to send ! a href=mailto:assignme...@gnu.orgassignme...@gnu.org/a a copy of your request./p pIf a contributor is reluctant to sign a copyright assignment for a --- 44,50 specific change, an assignment for all future changes, and an employer disclaimer, if an employer or school owns work created by the developer. It's a good idea to send ! a href=mailto:ass...@gnu.orgass...@gnu.org/a a copy of your request./p pIf a contributor is reluctant to sign a copyright assignment for a
Re: [PATCH, updated] Vtable pointer verification, runtime library changes (patch 3 of 3)
I'd like to know if someone with better automake skills than I have can do anything about that warning, but otherwise that looks OK to me, thanks. Hey dude. Caroline and I are working off-line on this. -benjamin
[v3] libsupc++ bad_array_* build fixes
Some cleanup, no Makefile.am was checked in on the bad_array_* additions. The exports make the intent very clear, so this just fills in the blanks. tested x86/linux -benjamin2013-05-13 Benjamin Kosnik b...@redhat.com * libsupc++/Makefile.am (sources): Add bad_array_length.cc, bad_array_new.cc. * libsupc++/Makefile.in: Regenerate. * libsupc++/bad_array_length.cc: Tweak. * libsupc++/bad_array_new.cc: Tweak. diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am index 25c58fb..b4e86f5 100644 --- a/libstdc++-v3/libsupc++/Makefile.am +++ b/libstdc++-v3/libsupc++/Makefile.am @@ -48,6 +48,8 @@ sources = \ atexit_arm.cc \ atexit_thread.cc \ bad_alloc.cc \ + bad_array_length.cc \ + bad_array_new.cc \ bad_cast.cc \ bad_typeid.cc \ class_type_info.cc \ @@ -107,6 +109,21 @@ cp-demangle.o: cp-demangle.c # Use special rules for the C++11 sources so that the proper flags are passed. +bad_array_length.lo: bad_array_length.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $ +bad_array_length.o: bad_array_length.cc + $(CXXCOMPILE) -std=gnu++11 -c $ + +bad_array_new.lo: bad_array_new.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $ +bad_array_new.o: bad_array_new.cc + $(CXXCOMPILE) -std=gnu++11 -c $ + +eh_aux_runtime.lo: eh_aux_runtime.cc + $(LTCXXCOMPILE) -std=gnu++11 -c $ +eh_aux_runtime.o: eh_aux_runtime.cc + $(CXXCOMPILE) -std=gnu++11 -c $ + eh_ptr.lo: eh_ptr.cc $(LTCXXCOMPILE) -std=gnu++11 -c $ eh_ptr.o: eh_ptr.cc diff --git a/libstdc++-v3/libsupc++/bad_array_length.cc b/libstdc++-v3/libsupc++/bad_array_length.cc index a63d660..76afd30 100644 --- a/libstdc++-v3/libsupc++/bad_array_length.cc +++ b/libstdc++-v3/libsupc++/bad_array_length.cc @@ -23,14 +23,13 @@ #include new -namespace std { +namespace std +{ bad_array_length::~bad_array_length() _GLIBCXX_USE_NOEXCEPT { } const char* bad_array_length::what() const _GLIBCXX_USE_NOEXCEPT -{ - return std::bad_array_length; -} +{ return std::bad_array_length; } } // namespace std diff --git a/libstdc++-v3/libsupc++/bad_array_new.cc b/libstdc++-v3/libsupc++/bad_array_new.cc index 5282f52..224e4f7 100644 --- a/libstdc++-v3/libsupc++/bad_array_new.cc +++ b/libstdc++-v3/libsupc++/bad_array_new.cc @@ -23,14 +23,13 @@ #include new -namespace std { +namespace std +{ bad_array_new_length::~bad_array_new_length() _GLIBCXX_USE_NOEXCEPT { } const char* bad_array_new_length::what() const _GLIBCXX_USE_NOEXCEPT -{ - return std::bad_array_new_length; -} +{ return std::bad_array_new_length; } } // namespace std
[wwwdocs] update libstdc++ doc links
This updates the links for the 4.7.3 and 4.6.4 libstdc++ documentation. Now 4.6-4.8 links are all consistent. best, -benjamin 2013-04-22 Benjamin Kosnik b...@redhat.com * htdocs/onlinedocs/index.html: Adjust GDL to GFDL. Change 4.7.3 and 4.6.4 to use gz instead of bz2 compression, like others. * htdocs/onlinedocs/4.6.4/index.html: Adjust links. * htdocs/onlinedocs/4.7.3/index.html: Same. Index: htdocs/onlinedocs/index.html === RCS file: /cvs/gcc/wwwdocs/htdocs/onlinedocs/index.html,v retrieving revision 1.134 diff -c -p -r1.134 index.html *** htdocs/onlinedocs/index.html 12 Apr 2013 16:45:11 - 1.134 --- htdocs/onlinedocs/index.html 22 Apr 2013 23:28:31 - *** *** 73,79 in PDF/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api.xml.gz;XML GPL/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-gdl.xml.gz;XML GDL/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-html.tar.gz;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo/;GCCGO 4.8.0 Manual/a (a --- 73,79 in PDF/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api.xml.gz;XML GPL/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-gfdl.xml.gz;XML GFDL/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-html.tar.gz;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo/;GCCGO 4.8.0 Manual/a (a *** *** 147,163 HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/manual/;GCC 4.7.3 Standard C++ Library Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-manual.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-manual.xml.bz2;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-manual-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/api/;GCC 4.7.3 Standard C++ Library Reference Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-api.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-api.xml.bz2;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-api-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/gccgo/;GCCGO 4.7.3 Manual/a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/gccgo.pdf;also in --- 147,163 HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/manual/;GCC 4.7.3 Standard C++ Library Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-manual.pdf.gz;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-manual.xml.gz;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-manual-html.tar.gz;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/api/;GCC 4.7.3 Standard C++ Library Reference Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-api.pdf.gz;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-api.xml.gz;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/libstdc++-api-html.tar.gz;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/gccgo/;GCCGO 4.7.3 Manual/a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.3/gccgo.pdf;also in *** *** 230,246 HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/manual/spine.html;GCC 4.6.4 Standard C++ Library Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/libstdc++-manual.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/libstdc++-manual.xml.bz2;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/libstdc++-manual-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/api/;GCC 4.6.4 Standard C++ Library Reference Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/libstdc++-api.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.6.4/libstdc++/libstdc++-api.xml.bz2;XML/a or a !
[wwwdocs] 4.8.0 libstdc++ links
Slight update to links, reflecting more attempts by libstdc++ to blend in with the native layout and compression choices for gcc releases. Links check so seems fine. While at this, I figured I might as well do the GDL/GPL dupe for the libstdc++-api XML file, as discussed at Cauldron last year. -benjamin2013-03-22 Benjamin Kosnik b...@redhat.com * htdocs/onlinedocs/index.html: More update locations for 4.8.0. Index: htdocs/onlinedocs/4.8.0/index.html === RCS file: /cvs/gcc/wwwdocs/htdocs/onlinedocs/4.8.0/index.html,v retrieving revision 1.1 diff -c -3 -p -r1.1 index.html *** htdocs/onlinedocs/4.8.0/index.html 22 Mar 2013 14:54:01 - 1.1 --- htdocs/onlinedocs/4.8.0/index.html 22 Mar 2013 20:20:18 - *** *** 52,70 HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/manual/;GCC 4.8.0 Standard C++ Library Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-manual.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-manual.xml.bz2;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-manual-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/api/;GCC 4.8.0 Standard C++ Library Reference Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-api.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-api.xml.bz2;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-api-html.tar.bz2;an HTML tarball/a)/li ! lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo/;GCCGO 4.8.0 Manual/a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo.pdf;also in PDF/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo.ps.gz;PostScript/a or a --- 52,72 HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/manual/;GCC 4.8.0 Standard C++ Library Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-manual.pdf.gz;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-manual.xml.gz;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-manual-html.tar.gz;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/api/;GCC 4.8.0 Standard C++ Library Reference Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api.pdf.gz;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api.xml.gz;XML GPL/a or ! a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-gdl.xml.gz;XML GDL/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++-api-html.tar.gz;an HTML tarball/a)/li !lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo/;GCCGO 4.8.0 Manual/a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo.pdf;also in PDF/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo.ps.gz;PostScript/a or a 2013-03-22 Benjamin Kosnik b...@redhat.com * htdocs/onlinedocs/index.html: Update locations for 4.8.0. Index: htdocs/onlinedocs/index.html === RCS file: /cvs/gcc/wwwdocs/htdocs/onlinedocs/index.html,v retrieving revision 1.131 diff -c -3 -p -r1.131 index.html *** htdocs/onlinedocs/index.html 22 Mar 2013 14:54:01 - 1.131 --- htdocs/onlinedocs/index.html 22 Mar 2013 20:07:30 - *** *** 62,78 HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/manual/;GCC 4.8.0 Standard C++ Library Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-manual.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-manual.xml.bz2;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-manual-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/api/;GCC 4.8.0 Standard C++ Library Reference Manual /a (a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-api.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-api.xml.bz2;XML/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/libstdc++-api-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gccgo/;GCCGO 4.8.0 Manual/a (a
[wwwdocs] gcc-4.8/porting_to.html
Hey! Here is the first pass at the 4.8 porting documentation. This seems to reflect the current trunk reality. I'm not quite sure to about the best way to talk about the more aggressive loop optimizations WRT undefined sematincs, but this seems reasonable. Of course, if anybody has better ideas, I'm all ears. best, Benjamin2013-03-13 Benjamin Kosnik b...@redhat.com * htdocs/gcc-4.8/porting_to.html: Add. Index: htdocs/gcc-4.8/porting_to.html === RCS file: htdocs/gcc-4.8/porting_to.html diff -N htdocs/gcc-4.8/porting_to.html *** /dev/null 1 Jan 1970 00:00:00 - --- htdocs/gcc-4.8/porting_to.html 13 Mar 2013 09:23:12 - *** *** 0 --- 1,233 + html + + head + titlePorting to GCC 4.8/title + /head + + body + h1Porting to GCC 4.8/h1 + + p + The GCC 4.8 release series differs from previous GCC releases in more + than the usual list of + a href=http://gcc.gnu.org/gcc-4.8/changes.html;changes/a. Some of + these are a result of bug fixing, and some old behaviors have been + intentionally changed in order to support new standards, or relaxed + in standards-conforming ways to facilitate compilation or runtime + performance. Some of these changes are not visible to the naked eye + and will not cause problems when updating from older versions. + /p + + p + However, some of these changes are visible, and can cause grief to + users porting to GCC 4.8. This document is an effort to identify major + issues and provide clear solutions in a quick and easily searched + manner. Additions and suggestions for improvement are welcome. + /p + + h2General issues/h2 + + h3New warnings/h3 + + pImprovements to the GCC infrastructure allow improvements in + the ability of several existing warnings to spot problematic code. As + such, new warnings may exist for previously warning-free code that + uses + code-Wmaybe-uninitialized/code. Note + that code-Wall/code subsumes this warning flag. + /p + + p Although these warnings will + not result in compilation failure, often code-Wall/code is used in + conjunction with code-Werror/code and as a result, new warnings + are turned into new errors. + /p + + pAs a workaround, remove code-Werror/code until the new warnings + are fixed, or add code-Wno-maybe-uninitialized/code. + /p + + h3More aggressive loop optimizations/h3 + + pImprovements to the GCC infrastructure allow improvements in + the ability of the optimizers to transform loops. Some loops that previously + invoked undefined behavior may now be turned into endless loops. + /p + + pFor example,/p + + pre + unsigned int foo() + { + unsigned int data_data[128]; + + for (int fd = 0; fd 128; ++fd) + data_data[fd] = fd * (0x0201); // error + + return data_data[0]; + } + /pre + + p + When fd is 64 or above, fd * 0x0201 overflows, which is invalid in C/C++ for signed ints. + /p + + p + To fix, use the appropriate casts when converting between signed and + unsigned types to avoid overflows. Like so: + /p + + pre + data_data[fd] = (uint32_t) fd * (0x0201U); // ok + /pre + + h2C language issues/h2 + + h3New warnings for pointer access/h3 + + p + The behavior of code-Wall/code has changed and now includes the + new warning flags code-Wsizeof-pointer-memaccess/code. This may + result in new warnings in code that compiled cleanly with previous + versions of GCC. + /p + + pFor example,/p + + pre + #include lt;string.hgt; + + struct A { }; + + int main(void) + { + A obj; + A* p1 = obj; + A p2[10]; + + memset(p1, 0, sizeof(p1)); // error, use memcopy + memset(p1, 0, sizeof(*p1)); // ok, dereferenced + memset(p2, 0, sizeof(p2)); // ok, array + + return 0; + } + /pre + + pGives the following diagnostic:/p + pre + warning: argument to âsizeofâ in âvoid* memset(void*, int, size_t)â call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] + memset(p1, 0, sizeof(p1)); // error, use memcopy +^ + /pre + + pAlthough these warnings will not result in compilation failure, + often code-Wall/code is used in conjunction with + code-Werror/code and as a result, new warnings are turned into + new errors./p + + pTo fix, either use memcopy or dereference the last argument in the + offending memset call./p + + pAs a workaround, use + code-Wno-sizeof-pointer-memaccess/code. + + h3Pre-processor pre-includes/h3 + + p + The GCC pre-processor may now pre-includes a file that defines certain + macros for the entirety of the translation unit. This allows + fully conformant implementations of C99/C11 and other standards that + require compiler or compiler + runtime macros that describe + implementation availability. + /p + + p + On linux, lt;stdc-predef.hgt; is pre-included. + /p + + p + This subtle change means that some more creative uses of the + pre-processor may now fail, with the following diagnostic:
Re: [wwwdocs] gcc-4.8/porting_to.html
It doesn't make sense. memcpy from NULL src pointer? Indeed, that doesn't make sense. Thanks. -benjamin
Re: [wwwdocs] gcc-4.8/porting_to.html
Here is round two, as checked-in. -benjamin 2013-03-13 Benjamin Kosnik b...@redhat.com * htdocs/gcc-4.8/porting_to.html: Add. * htdocs/gcc-4.8/changes.html: Add link. Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v retrieving revision 1.106 diff -c -p -r1.106 changes.html *** changes.html 13 Mar 2013 15:20:56 - 1.106 --- changes.html 14 Mar 2013 00:20:47 - *** by this change./p *** 54,59 --- 54,66 code--with-avrlibc=no/code. If the compiler is configured for RTEMS, the option is always turned off./p + p + More information on porting to GCC 4.8 from previous versions + of GCC can be found in + the a href=http://gcc.gnu.org/gcc-4.8/porting_to.html;porting + guide/a for this release. + p + h2General Optimizer Improvements (and Changes)/h2 ul Index: porting_to.html === RCS file: porting_to.html diff -N porting_to.html *** /dev/null 1 Jan 1970 00:00:00 - --- porting_to.html 14 Mar 2013 00:20:47 - *** *** 0 --- 1,232 + html + + head + titlePorting to GCC 4.8/title + /head + + body + h1Porting to GCC 4.8/h1 + + p + The GCC 4.8 release series differs from previous GCC releases in more + than the usual list of + a href=http://gcc.gnu.org/gcc-4.8/changes.html;changes/a. Some of + these are a result of bug fixing, and some old behaviors have been + intentionally changed in order to support new standards, or relaxed + in standards-conforming ways to facilitate compilation or runtime + performance. Some of these changes are not visible to the naked eye + and will not cause problems when updating from older versions. + /p + + p + However, some of these changes are visible, and can cause grief to + users porting to GCC 4.8. This document is an effort to identify major + issues and provide clear solutions in a quick and easily searched + manner. Additions and suggestions for improvement are welcome. + /p + + h2General issues/h2 + + h3New warnings/h3 + + pImprovements to the GCC infrastructure allow improvements in + the ability of several existing warnings to spot problematic code. As + such, new warnings may exist for previously warning-free code that + uses + code-Wmaybe-uninitialized/code. + /p + + p Although these warnings will + not result in compilation failure, often code-Wall/code is used in + conjunction with code-Werror/code and as a result, new warnings + are turned into new errors. + /p + + pAs a workaround, remove code-Werror/code until the new warnings + are fixed, or add code-Wno-maybe-uninitialized/code. + /p + + h3More aggressive loop optimizations/h3 + + pImprovements to the GCC infrastructure allow improvements in + the ability of the optimizers to transform loops. Some loops that previously + invoked undefined behavior may now be turned into endless loops. + /p + + pFor example,/p + + pre + unsigned int foo() + { + unsigned int data_data[128]; + + for (int fd = 0; fd 128; ++fd) + data_data[fd] = fd * (0x0201); // error + + return data_data[0]; + } + /pre + + p + When fd is 64 or above, fd * 0x0201 overflows, which is invalid in C/C++ for signed ints. + /p + + p + To fix, use the appropriate casts when converting between signed and + unsigned types to avoid overflows. Like so: + /p + + pre + data_data[fd] = (uint32_t) fd * (0x0201U); // ok + /pre + + h2C language issues/h2 + + h3New warnings for pointer access/h3 + + p + The behavior of code-Wall/code has changed and now includes the + new warning flag code-Wsizeof-pointer-memaccess/code. This may + result in new warnings in code that compiled cleanly with previous + versions of GCC. + /p + + pFor example,/p + + pre + #include lt;string.hgt; + + struct A { }; + + int main(void) + { + A obj; + A* p1 = obj; + A p2[10]; + + memset(p1, 0, sizeof(p1)); // error + memset(p1, 0, sizeof(*p1)); // ok, dereferenced + memset(p2, 0, sizeof(p2)); // ok, array + + return 0; + } + /pre + + pGives the following diagnostic:/p + pre + warning: argument to âsizeofâ in âvoid* memset(void*, int, size_t)â call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] + memset(p1, 0, sizeof(p1)); // error +^ + /pre + + pAlthough these warnings will not result in compilation failure, + often code-Wall/code is used in conjunction with + code-Werror/code and as a result, new warnings are turned into + new errors./p + + pTo fix, either re-write to use memcpy or dereference the last argument in the + offending memset call./p + + pAs a workaround, use + code-Wno-sizeof-pointer-memaccess/code. + + h3Pre-processor pre-includes/h3 + + p + The GCC pre-processor may now pre-includes a file that defines certain + macros for the entirety of the translation
Re: [wwwdocs] gcc-4.8/porting_to.html
Here is round two, as checked-in. ... and here are the validation patches. -benjamin2013-03-13 Benjamin Kosnik b...@redhat.com * htdocs/gcc-4.8/porting_to.html: Fix markup. * htdocs/gcc-4.8/changes.html: Same. Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v retrieving revision 1.107 diff -c -p -r1.107 changes.html *** changes.html 14 Mar 2013 00:25:06 - 1.107 --- changes.html 14 Mar 2013 01:09:43 - *** by this change./p *** 59,65 of GCC can be found in the a href=http://gcc.gnu.org/gcc-4.8/porting_to.html;porting guide/a for this release. ! p h2General Optimizer Improvements (and Changes)/h2 --- 59,65 of GCC can be found in the a href=http://gcc.gnu.org/gcc-4.8/porting_to.html;porting guide/a for this release. ! /p h2General Optimizer Improvements (and Changes)/h2 Index: porting_to.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/porting_to.html,v retrieving revision 1.1 diff -c -p -r1.1 porting_to.html *** porting_to.html 14 Mar 2013 00:25:06 - 1.1 --- porting_to.html 14 Mar 2013 01:09:43 - *** unsigned int foo() *** 60,66 { unsigned int data_data[128]; ! for (int fd = 0; fd 128; ++fd) data_data[fd] = fd * (0x0201); // error return data_data[0]; --- 60,66 { unsigned int data_data[128]; ! for (int fd = 0; fd lt; 128; ++fd) data_data[fd] = fd * (0x0201); // error return data_data[0]; *** struct A { }; *** 101,107 int main(void) { A obj; ! A* p1 = obj; A p2[10]; memset(p1, 0, sizeof(p1)); // error --- 101,107 int main(void) { A obj; ! A* p1 = amp;obj; A p2[10]; memset(p1, 0, sizeof(p1)); // error *** offending memset call./p *** 129,134 --- 129,135 pAs a workaround, use code-Wno-sizeof-pointer-memaccess/code. + /p h3Pre-processor pre-includes/h3 *** pre-processor may now fail, with the fol *** 155,161 pAs a workaround, the stdc-predef.h preinclude can be disabled with the use of code-ffreestanding/code. For non C/C++ code, use the pre-processor flag code-P/code. ! h2C++ language issues/h2 --- 156,162 pAs a workaround, the stdc-predef.h preinclude can be disabled with the use of code-ffreestanding/code. For non C/C++ code, use the pre-processor flag code-P/code. ! /p h2C++ language issues/h2 *** versions of GCC. *** 170,176 pFor example,/p pre ! templatetypename _Tp int foo(_Tp __a) { --- 171,177 pFor example,/p pre ! templatelt;typename _Tpgt; int foo(_Tp __a) { *** new errors./p *** 197,202 --- 198,204 pAs a workaround, use code-Wno-unused-local-typedefs/code. + /p h3Stray comma at the end of declaration now rejected/h3 2013-03-13 Benjamin Kosnik b...@redhat.com * htdocs/gcc-4.8/porting_to.html: Fix markup. Index: porting_to.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/porting_to.html,v retrieving revision 1.2 diff -c -p -r1.2 porting_to.html *** porting_to.html 14 Mar 2013 01:13:56 - 1.2 --- porting_to.html 14 Mar 2013 01:17:37 - *** error: stray â,â at end of member de *** 227,233 p Jakub Jelinek, ! a href=https://lists.fedoraproject.org/pipermail/devel/2013-January/175876.html;Results of a test mass rebuild of rawhide/x86_64 with gcc-4.8.0-0.1.fc19/p /body --- 227,233 p Jakub Jelinek, ! a href=https://lists.fedoraproject.org/pipermail/devel/2013-January/175876.html;Results of a test mass rebuild of rawhide/x86_64 with gcc-4.8.0-0.1.fc19/a /body
[v3] doc/html regen
Sync html in sources with generated output. -benjamin 20130313-7-docs.patch.bz2 Description: application/bzip
[v3] bits/memoryfwd.h
Hey y'all. I noticed the repeated, repeated, repeated use of std::allocator forward decls as I was trying to debug some doxygen output. Clearly, it's past time for a memory forward header, like bits/stringfwd.h. The following patch implements this. Perhaps some of the other headers can now be optimized because of this, but that was not my primary focus. Instead, I was just trying to come up with the smallest patch that was semantically equivalent to existing trunk. tested x86/linux -benjamin 2013-03-08 Benjamin Kosnik b...@redhat.com * include/bits/memoryfwd.h: New. Centralize forward declarations. * include/bits/algorithmfwd.h: Consistent comments. * include/bits/localefwd.h: Same. * include/ext/vstring_fwd.h: Same. * include/parallel/algorithmfwd.h: Same. * include/parallel/numericfwd.h: Same. * include/std/iosfwd: Same. * include/bits/alloc_traits.h: Include memoryfwd.h, remove allocator forward decl. * include/ext/alloc_traits.h: Remove allocator forward decl. * include/bits/stl_construct.h: Same. * include/bits/stringfwd.h: Include memoryfwd.h, remove allocator forward decl. Consistent comments. * doc/doxygen/user.cfg.in (TEMPLATE_RELATIONS): To NO. * include/Makefile.am (bits_headers): Add memoryfwd.h. * include/Makefile.in: Regenerate. * configure: Same. * include/bits/vector.tcc (vectoroperator=(const vector): diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index 4a3afc4..45efb63 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -1957,7 +1957,7 @@ UML_LIMIT_NUM_FIELDS = 10 # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. -TEMPLATE_RELATIONS = YES +TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 5342217..6bd3b43 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -113,6 +113,7 @@ bits_headers = \ ${bits_srcdir}/locale_facets_nonio.tcc \ ${bits_srcdir}/localefwd.h \ ${bits_srcdir}/mask_array.h \ + ${bits_srcdir}/memoryfwd.h \ ${bits_srcdir}/move.h \ ${bits_srcdir}/ostream.tcc \ ${bits_srcdir}/ostream_insert.h \ diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h index 7b8448c..e6321b2 100644 --- a/libstdc++-v3/include/bits/algorithmfwd.h +++ b/libstdc++-v3/include/bits/algorithmfwd.h @@ -1,4 +1,4 @@ -// algorithm declarations -*- C++ -*- +// algorithm Forward declarations -*- C++ -*- // Copyright (C) 2007-2013 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/include/bits/alloc_traits.h b/libstdc++-v3/include/bits/alloc_traits.h index 26c64f2..33ea145 100644 --- a/libstdc++-v3/include/bits/alloc_traits.h +++ b/libstdc++-v3/include/bits/alloc_traits.h @@ -32,6 +32,7 @@ #if __cplusplus = 201103L +#include bits/memoryfwd.h #include bits/ptr_traits.h #include ext/numeric_traits.h @@ -39,9 +40,6 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION - templatetypename _Tp -class allocator; - templatetypename _Alloc, typename _Tp class __alloctr_rebind_helper { diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h index 97477fb..28df242 100644 --- a/libstdc++-v3/include/bits/allocator.h +++ b/libstdc++-v3/include/bits/allocator.h @@ -43,8 +43,8 @@ #ifndef _ALLOCATOR_H #define _ALLOCATOR_H 1 -// Define the base class to std::allocator. -#include bits/c++allocator.h +#include bits/c++allocator.h // Define the base class to std::allocator. +#include bits/memoryfwd.h #if __cplusplus = 201103L #include type_traits #endif @@ -54,17 +54,10 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION /** - * @defgroup allocators Allocators - * @ingroup memory - * - * Classes encapsulating memory operations. - * - * @{ + * @addtogroup allocators + * @{ */ - templatetypename _Tp -class allocator; - /// allocatorvoid specialization. template class allocatorvoid @@ -150,13 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator!=(const allocator_Tp, const allocator_Tp) { return false; } - /// Declare uses_allocator so it can be specialized in \queue\ etc. - templatetypename, typename -struct uses_allocator; - - /** - * @} - */ + /// @} group allocator // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. diff --git a/libstdc++-v3/include/bits/localefwd.h b/libstdc++-v3/include/bits/localefwd.h index e0a233b..ca06dc1 100644 --- a/libstdc++-v3/include/bits/localefwd.h +++ b/libstdc++-v3/include/bits/localefwd.h @@ -1,4 +1,4 @@ -//
Re: [PATCH] C++ math constants
How about the attached file as a start for ext/math. I used the constexpr approach (instead of function calls) and replicated the constants that are available in math.h in Unix. then this should really be ext/cmath 1) In this case I miss the corresponding variable definitions, because you violate the ODR, when you have something like the following: #include iostream templateclass T void print(const T t) { std::cout t; } int main() { print(__math_constantsdouble::__pi); } Not seeing it. Say for: #include iostream // A class for math constants. templatetypename _RealType struct __math_constants { // Constant @f$ \pi @f$. static constexpr _RealType __pie = 3.1415926535897932384626433832795029L; }; templateclass T void print(const T t) { std::cout t; } int main() { print(__math_constantsdouble::__pie); return 0; } I'm not getting any definition, even at -O0. Any chance you could expand on your thinking here Daniel? 2) You need to use either braced initializers *or* using initializers with equal, a parenthesized initializer isn't supported (/brace-or-equal-initializer/). Yeah. This works: // Constant @f$ \pi @f$. static constexpr _RealType __pie = 3.1415926535897932384626433832795029L; -benjamin
[v3] correct doxygen parse
Fixups for doxygen. Since 2012-11-20, most of C++11 has been ignored by doxygen, resulting in some missing modules documentation even in HTML output. Jakub, this fixes the libstdc++.tag validation errors. I've regenerated the gcc.gnu.org docs for 4.8.0. They look equivalent or better than 4.7.2 to me now. tested x86/linux -benjamin2013-02-19 Benjamin Kosnik b...@redhat.com * doc/doxygen/user.cfg.in: Set __cplusplus to 201103L. Change to _GLIBCXX_INCLUDE_AS_CXX11. DIRECTORY_GRAPH, MARKDOWN_SUPPORT, AUTOLINK_SUPPORT to NO. Update to doxygen 1.8.3.1. * include/bits/stl_pair.h: Add to utilities group. * include/std/tuple: Same. * include/std/typeindex: Same. * include/bits/stringfwd.h: Fix markup. * include/std/limits: Same. * include/std/type_traits: Same. * include/tr1/memory: Same. * include/tr1/regex: Same. * scripts/run_doxygen: Comment. * testsuite/20_util/uses_allocator/cons_neg.cc: Fixup line numbers. diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index 5af636b..4a3afc4 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -1,4 +1,4 @@ -# Doxyfile 1.8.2 +# Doxyfile 1.8.3.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -252,14 +252,15 @@ EXTENSION_MAPPING = # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. -MARKDOWN_SUPPORT = YES +MARKDOWN_SUPPORT = NO -# When enabled doxygen tries to link words that correspond to documented classes, -# or namespaces to their corresponding documentation. Such a link can be -# prevented in individual cases by by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. +# When enabled doxygen tries to link words that correspond to +# documented classes, or namespaces to their corresponding +# documentation. Such a link can be prevented in individual cases by +# by putting a % sign in front of the word or globally by setting +# AUTOLINK_SUPPORT to NO. -AUTOLINK_SUPPORT = YES +AUTOLINK_SUPPORT = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should @@ -281,7 +282,12 @@ CPP_CLI_SUPPORT= NO SIP_SUPPORT= NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter and setter methods for a property. Setting this option to YES (the default) will make doxygen replace the get and set methods by a property in the documentation. This will only work if the methods are indeed getting or setting a simple type. If this is not the case, or you want to show the methods anyway, you should set this option to NO. +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES (the +# default) will make doxygen replace the get and set methods by a property in +# the documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = NO @@ -305,8 +311,7 @@ SUBGROUPING= YES # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). -#INLINE_GROUPED_CLASSES = NO -INLINE_GROUPED_CLASSES = YES +INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields will be shown inline in the documentation @@ -314,7 +319,7 @@ INLINE_GROUPED_CLASSES = YES # documentation), provided this scope is documented. If set to NO (the default), # structs, classes, and unions are shown on a separate page (for HTML and Man # pages) or section (for LaTeX and RTF). - + INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum @@ -542,7 +547,8 @@ GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. +# documentation sections, marked by \if section-label ... \endif +# and \cond section-label ... \endcond blocks. ENABLED_SECTIONS = @enabled_sections@ @@ -600,7 +606,8 @@ LAYOUT_FILE= # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this -# feature you need bibtex and perl available in the search path. +# feature you need bibtex and perl available in the search path. Do not use +# file names with spaces, bibtex cannot handle them. CITE_BIB_FILES = @@ -952,6 +959,13 @@ FILTER_SOURCE_FILES= NO
Re: RFA: v3 PATCH to add on_quick_exit/quick_exit to std
Does this configury/feature macro handling look right? yes. Is this enough testcase? yes. Is this small/safe enough to go in for 4.8? yes. commit 884a2a7815a95bade9d23f01b4c64a16808c7f05 Author: Jason Merrill ja...@redhat.com Date: Mon Feb 11 11:23:30 2013 -0500 * linkage.m4 (GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE): New. (GLIBCXX_CHECK_STDLIB_SUPPORT): Check for atexit and at_quick_exit. * include/c_std/cstdlib: Add atexit and at_quick_exit. * include/c_global/cstdlib: Add atexit and at_quick_exit. * testsuite/18_support/quick_exit/quick_exit.cc: New. thanks Jason -benjamin
Re: RFA: v3 PATCH to add on_quick_exit/quick_exit to std
.. also, I think we should have #if __cplusplus = 201103L protecting these functions too, exactly like all the other C++11 bits. Eg, I don't think we should unconditionally, ie in C++03 mode too, declare at_quick_exit and quick_exit in namespace std. Yeah. I can tweak things for the two issues I noticed. Thanks. It seems like this is still 4.8 material to me. -benjamin
Re: [PATCH] Add missing explicit instantiation for std::lower_bound template
Since commit r195676[1], it looks like libstdc++-v3/src/c++11/hashtable_c++0x.cc is missing an explicit instantiation for std::lower_bound. it's missing an implicit instantiation of std::lower_bound. This leads to libstdc++.so having the symbol for that (missing) instantiation be undefined, thus preventing executables from being linked with libstdc++. Note that I can confirm this only if I build with less optimization than the default -O2, say -O. That may explain why nobody noticed earlier. Yes, indeed. Certainly, the explicit instantiation is ok for this non-usual -O compile. The full instantiation set depends on specific flag and perhaps platform. Let's not special case all of these, and instead just allow implicit template instantiations via -fimplicit-templates. Thus, what is really needed (and also in cases like PR52887) is to just allow implicit template instantiations. Done as attached. -benjamin tested x86/linux tested x86/linux -O0 tested x86/linux -O2013-02-11 Benjamin Kosnik b...@redhat.com * src/c++11/Makefile.am (hashtable_c++0x.lo, hashtable_c++0x.o): Use -fimplicit-templates. * src/c++11/Makefile.in: Regenerate. * src/c++11/hashtable_c++0x.cc: Remove instantiation for std::lower_bound template. diff --git a/libstdc++-v3/src/c++11/Makefile.am b/libstdc++-v3/src/c++11/Makefile.am index 89ee335..e7b48ac 100644 --- a/libstdc++-v3/src/c++11/Makefile.am +++ b/libstdc++-v3/src/c++11/Makefile.am @@ -60,6 +60,13 @@ vpath % $(top_srcdir)/src/c++11 libc__11convenience_la_SOURCES = $(sources) $(inst_sources) +# Use special rules for the hashtable.cc file so that all +# the generated template functions are also instantiated. +hashtable_c++0x.lo: hashtable_c++0x.cc + $(LTCXXCOMPILE) -fimplicit-templates -c $ +hashtable_c++0x.o: hashtable_c++0x.cc + $(CXXCOMPILE) -fimplicit-templates -c $ + # AM_CXXFLAGS needs to be in each subdirectory so that it can be # modified in a per-library or per-sub-library way. Need to manually # set this option because CONFIG_CXXFLAGS has to be after diff --git a/libstdc++-v3/src/c++11/hashtable_c++0x.cc b/libstdc++-v3/src/c++11/hashtable_c++0x.cc index b6a56bc..7617c58 100644 --- a/libstdc++-v3/src/c++11/hashtable_c++0x.cc +++ b/libstdc++-v3/src/c++11/hashtable_c++0x.cc @@ -94,11 +94,4 @@ namespace __detail _GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail - - // Instantiations. - template - const unsigned long* - lower_boundconst unsigned long*, size_t(const unsigned long*, - const unsigned long*, - const size_t); } // namespace std
Re: [v3] docbook vs. texlive 2007
Fixup for a typo, on trunk and 4.7 -benjamin2012-12-12 Benjamin Kosnik b...@redhat.com * doc/xml/manual/documentation_hacking.xml: Fix validation issue. diff --git a/libstdc++-v3/doc/xml/manual/documentation_hacking.xml b/libstdc++-v3/doc/xml/manual/documentation_hacking.xml index 91d16dd..05c05a6 100644 --- a/libstdc++-v3/doc/xml/manual/documentation_hacking.xml +++ b/libstdc++-v3/doc/xml/manual/documentation_hacking.xml @@ -383,6 +383,8 @@ listitem para emphasisrefman.out/emphasis + /para + para A log of the compilation of the converted LaTeX form to pdf. This is a linear list, from the beginning of the @@ -394,10 +396,20 @@ incorrect, or will have clues at the end of the file with the dump of the memory usage of LaTeX. /para - /para /listitem /itemizedlist + para + If the error at hand is not obvious after examination, a + fall-back strategy is to start commenting out the doxygen + input sources, which can be found in + filenamedoc/doxygen/user.cfg.in/filename, look for the + literalINPUT/literal tag. Start by commenting out whole + directories of header files, until the offending header is + identified. Then, read the latex log files to try and find + surround text, and look for that in the offending header. + /para + /section section xml:id=doxygen.markupinfotitleMarkup/title/info @@ -872,7 +884,7 @@ make literalXSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/nwalsh/literal /itemizedlist para - If the issue is not obvious after examination, or if one + If the error at hand is not obvious after examination, or if one encounters the inscruitable quoteIncomplete \ifmmode/quote error, a fall-back strategy is to start commenting out parts of the XML document (regardless of what
Re: application/xml mime-type in recent libstdc++ doc changes
libstdc++-v3/doc/xsl/customization.xsl.in is marked as svn:mime-type = application/xml at least on the 4.7 branch, having some unexpected outcome for svn diff. If this was unintended, could you change the svn:mime-type back to text? This is unintentional, and frankly I don't know how the inital mime type was created or how to fix it. Any pointers? Can you do it and tell me how? best, benjamin
[v3] 55028
Missing exports for unordered_* containers in debug mode. The patches between mainline/4.7 are a slight bit different, but equivalent. tested x86/linux tested x86/linux --enable-symvers=gnu-versioned-namespace 2012-11-05 Benjamin Kosnik b...@redhat.com Oleg Smolsky o...@smolsky.net PR libstdc++/55028 * config/abi/pre/gnu-versioned-namespace.ver: Add symbols. * testsuite/23_containers/unordered_multimap/insert/55028-debug.cc: New. diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver index 84210e4..d13c059 100644 --- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver +++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver @@ -64,6 +64,7 @@ GLIBCXX_7.0 { # vtable _ZTVSt*; _ZTVNSt*; +_ZTVN9__gnu_cxx3__718stdio_sync_filebufI[cw]NSt3__711char_traitsI[cw]; # thunk _ZTv0_n24_NS*; @@ -145,6 +146,14 @@ GLIBCXX_7.0 { _ZNK11__gnu_debug16_Error_formatter8_M_error*; _ZNK11__gnu_debug16_Error_formatter17_M_get_max_lengthEv; +# __gnu_debug::_Safe_unordered_container_base +# __gnu_debug::_Safe_local_iterator_base +_ZN11__gnu_debug30_Safe_unordered_container_base7_M_swapERS0_; +_ZN11__gnu_debug30_Safe_unordered_container_base13_M_detach_allEv; +_ZN11__gnu_debug25_Safe_local_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb; +_ZN11__gnu_debug25_Safe_local_iterator_base9_M_detachEv; + + # parallel mode _ZN14__gnu_parallel9_Settings3getEv; _ZN14__gnu_parallel9_Settings3setERS0_; diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/55028-debug.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/55028-debug.cc new file mode 100644 index 000..fc17256 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/55028-debug.cc @@ -0,0 +1,40 @@ +// { dg-options -std=gnu++0x -D_GLIBCXX_DEBUG } +// +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// http://www.gnu.org/licenses/. + +// libstdc++/55028 +#include string +#include unordered_map +#include testsuite_hooks.h + +struct MyType +{ }; + +void test() +{ + // using MyMap = std::multimapstd::string, MyType *; // works + using MyMap = std::unordered_multimapstd::string, MyType*; // fails to link + MyMap m; + m.insert(std::make_pair(std::string(blah), new MyType)); +} + +int main() +{ + test(); + return 0; +}
[v3] more constexpr hacking
as per LWG comments on N330[2-5]. Couple of notes: new fail has been temporarily worked around pending the resolution of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54968 For tuple, the big fun remaining is piecewise_construct_t, which should allow tie and forward_as_tuple to be constexpr. I'm too tired to get into this with -fconstexpr-depth=2 tonight. Of course, if Daniel or Jonathan want to hack on this while I'm asleep, well then tested x86/linux -benjamin2012-10-09 Benjamin Kosnik b...@redhat.com * include/bits/move.h (move_if_noexcept): Mark constexpr. * include/std/array (front, back): Same. * include/std/chrono: Add comment. * include/std/tuple (__tuple_compare): Mark __eq, __less constexpr. (operator ==, , , !=, =, =): Same. * testsuite/20_util/forward/c_neg.cc: Adjust line numbers. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/move_if_noexcept/constexpr.cc: New. * testsuite/20_util/tuple/comparison_operators/constexpr.cc: New. * testsuite/20_util/tuple/creation_functions/constexpr.cc: Add. * testsuite/23_containers/array/element_access/ constexpr_element_access.cc: Same. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust line numbers. * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc: Same. * testsuite/20_util/tuple/comparison_operators/35480_neg.cc: Temporarily add dg-excess-errors. diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h index 353c466..236f0de 100644 --- a/libstdc++-v3/include/bits/move.h +++ b/libstdc++-v3/include/bits/move.h @@ -1,6 +1,6 @@ // Move, forward and identity for C++0x + swap -*- C++ -*- -// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +// Copyright (C) 2007-2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -65,7 +65,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @{ */ - // forward (as per N3143) /** * @brief Forward an lvalue. * @return The parameter cast to the specified type. @@ -117,7 +116,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * type is copyable, in which case an lvalue-reference is returned instead. */ templatetypename _Tp -inline typename +inline constexpr typename conditional__move_if_noexcept_cond_Tp::value, const _Tp, _Tp::type move_if_noexcept(_Tp __x) noexcept { return std::move(__x); } diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array index c7c0a5a..15dd6c1 100644 --- a/libstdc++-v3/include/std/array +++ b/libstdc++-v3/include/std/array @@ -198,17 +198,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION front() { return *begin(); } - const_reference + constexpr const_reference front() const - { return *begin(); } + { return _AT_Type::_S_ref(_M_elems, 0); } reference back() { return _Nm ? *(end() - 1) : *end(); } - const_reference + constexpr const_reference back() const - { return _Nm ? *(end() - 1) : *end(); } + { + return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) + : _AT_Type::_S_ref(_M_elems, _Nm); + } pointer data() noexcept diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono index 209f395..d920a7d 100644 --- a/libstdc++-v3/include/std/chrono +++ b/libstdc++-v3/include/std/chrono @@ -250,7 +250,10 @@ _GLIBCXX_END_NAMESPACE_VERSION // 20.11.5.1 construction / copy / destroy constexpr duration() = default; - constexpr duration(const duration) = default; + // NB: Make constexpr implicit. This cannot be explicitly + // constexpr, as any UDT that is not a literal type with a + // constexpr copy constructor will be ill-formed. + duration(const duration) = default; templatetypename _Rep2, typename = typename enable_ifis_convertible_Rep2, rep::value diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index fb9e09f..b4985d2 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -775,14 +775,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION templatestd::size_t __i, std::size_t __j, typename _Tp, typename _Up struct __tuple_compare0, __i, __j, _Tp, _Up { - static bool + static constexpr bool __eq(const _Tp __t, const _Up __u) { return (get__i(__t) == get__i(__u) __tuple_compare0, __i + 1, __j, _Tp, _Up::__eq(__t, __u)); } - static bool + static constexpr bool __less(const _Tp __t, const _Up __u) { return ((get__i(__t) get__i(__u)) @@ -794,55 +794,55 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION templatestd::size_t __i, typename _Tp, typename _Up struct __tuple_compare0, __i, __i, _Tp, _Up { - static bool + static constexpr bool __eq(const _Tp, const _Up) { return true; } -
Re: [PATCH] revised fix for nanosleep check in GLIBCXX_ENABLE_LIBSTDCXX_TIME for darwin
I don't like the sched_yield macro being set there because it's detected correctly by configure anyway, but I'm not going to labour that point any more. Indeed. Then somebody will waste hours in the future wondering why configure says no but their TU says yes. At least a comment in the configure bits admitting defeat, people. -benjamin
[v3] testsuite patchlet
Small fix for 32 bit targets. -benjamin2012-10-09 Benjamin Kosnik b...@redhat.com * testsuite/20_util/specialized_algorithms/uninitialized_copy/808590.cc: Fix constant value. diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/808590.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/808590.cc index 7ccd8da..c86f430 100644 --- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/808590.cc +++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/808590.cc @@ -27,7 +27,7 @@ struct c c(const c r) : m(r.m) {} templateclass T -explicit c(T o) : m((void*)0xdeadfbeef) { } +explicit c(T o) : m((void*)0xdeadbeef) { } }; int main()
Re: [PATCH, libstdc++]: Avoid recent libstdc++-abi/abi_check failure
2012-10-09 Uros Bizjak ubiz...@gmail.com * testsuite/util/testsuite_abi.cc (check_version): Add CXXABI_1.3.7. Tested on x86_64-pc-linux-gnu. OK for mainline? Ok, thanks! -benjamin
Re: [PATCH, libstdc++] Fix missing gthr-default.h issue on libstdc++ configure
On Android NDK libstdc++ is configured, built and packaged separately. The problem is not dependency on libgcc sources but rather dependency on the symlink which is generated during libgcc build and cannot be found if libstdc++ is configured and built separately. It was working fine for 4.4 and 4.6. This issue has been introduced in 4.7. I can verify that building this way works for 4.6. This style of build, building separately, has not been known to work before. In fact, it was explicitly broken for years. I am quite surprised (but delighted) to see it working in 4.6. Separate builds not mentioned here: http://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html This patch is fine. Alone, it's not enough to get you were you want to go, as the build then dies in AC_OUTPUT, and libtool is not generated. -benjamin
[v3] testsuite renames
More testsuite changes, tracking GSOC work. tested x86/linux -benjamin2012-10-05 Benjamin Kosnik b...@redhat.com * testsuite/28_regex/algorithms/match: Rename to... * testsuite/28_regex/algorithms/regex_match: ...this. * testsuite/28_regex/basic_regex/regex.cc: Rename to... * testsuite/28_regex/basic_regex/ctors/basic/default.cc: ...this. * testsuite/util/testsuite_regex.h: New. * testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc: New. diff --git a/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc new file mode 100644 index 000..0ab42eb --- /dev/null +++ b/libstdc++-v3/testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc @@ -0,0 +1,52 @@ +// { dg-options -std=c++0x } +// { dg-do run { xfail *-*-* } } + +// 2012-08-20 Benjamin Kosnik b...@redhat.com +// +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// http://www.gnu.org/licenses/. + +// basic_regex constructors + raw string literals + +#include regex +#include testsuite_regex.h + +void +test01() +{ + using namespace __gnu_test; + + // raw string literals + + //string_type sre0(R(\d{3}-\d{3}-\d{4})); // expected fail + + string_type sre1(R( this\n and new : forms\n )); + + string_type sre2(R([:num:]{3}-[:num:]{3}-[:num:]{4})); + + // 1 + regex_type re(R( this\n and new : forms\n ), std::regex::basic); + + // 2 + regex_sanity_check(sre1); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/util/testsuite_regex.h b/libstdc++-v3/testsuite/util/testsuite_regex.h new file mode 100644 index 000..dbf4b34 --- /dev/null +++ b/libstdc++-v3/testsuite/util/testsuite_regex.h @@ -0,0 +1,130 @@ +// -*- C++ -*- +// regex utils for the C++ library testsuite. +// +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// http://www.gnu.org/licenses/. +// + +#include regex +#include stdexcept +#include iostream + +#ifndef _TESTSUITE_REGEX_H +#define _TESTSUITE_REGEX_H 1 + +namespace __gnu_test +{ + // Test on a compilation of simple expressions, throw regex_error on error. + typedef std::regexregex_type; + typedef regex_type::flag_type flag_type; + typedef std::regex_constants::error_type error_type; + typedef std::size_tsize_type; + typedef std::stringstring_type; + + // Utilities + struct regex_expected_fail { }; + + const error_type regex_error_internal(static_casterror_type(-1)); + + // Stringify error codes for text logging. + const char* regex_error_codes[] = +{ +error_collate, +error_ctype, +error_escape, +error_backref, +error_brack, +error_paren, +error_brace, +error_badbrace, +error_range, +error_space, +error_badrepeat, +error_complexity, +error_stack + }; + + void + show_regex_error_codes() + { +using namespace std; +using namespace std::regex_constants; +const char tab('\t'); +cout error_collate = tab error_collate endl; +cout error_ctype = tab error_ctype endl; +cout error_escape = tab error_escape endl; +cout error_backref = tab error_backref endl; +cout error_brack = tab error_brack endl; +cout error_paren = tab error_paren endl; +cout error_brace = tab error_brace endl; +cout error_badbrace =tab error_badbrace endl; +cout error_range = tab error_range endl; +cout error_space = tab error_space endl; +cout error_badrepeat = tab error_badrepeat endl; +cout error_complexity = tab error_complexity endl; +
[v3] update doxygen config
to 1.8.2, yay, fixes for template aliases in! tested x86/linux -benjamindiff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9302b71..33a46cc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2012-09-30 Benjamin Kosnik b...@redhat.com + + * doc/doxygen/user.cfg.in: Update to doxygen 1.8.2. + 2012-09-30 Jonathan Wakely jwakely@gmail.com * include/ext/ropeimpl.h (__uninitialized_fill_n_a): Fix using diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index b9fc4bf..3bf306f 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -1,4 +1,4 @@ -# Doxyfile 1.8.0 +# Doxyfile 1.8.2 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -126,7 +126,9 @@ FULL_PATH_NAMES= NO # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the -# path to strip. +# path to strip. Note that you specify absolute paths here, but also +# relative paths, which will be relative from the directory where doxygen is +# started. STRIP_FROM_PATH= @@ -231,14 +233,15 @@ OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, +# and language is one of the parsers supported by doxygen: IDL, Java, +# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, +# C++. For instance to make doxygen treat .inc files as Fortran files (default +# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note +# that for custom extensions you also need to set FILE_PATTERNS otherwise the +# files are not read by doxygen. EXTENSION_MAPPING = @@ -251,6 +254,13 @@ EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES +# When enabled doxygen tries to link words that correspond to documented classes, +# or namespaces to their corresponding documentation. Such a link can be +# prevented in individual cases by by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. + +AUTOLINK_SUPPORT = YES + # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and @@ -271,12 +281,7 @@ CPP_CLI_SUPPORT= NO SIP_SUPPORT= NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. +# For Microsoft's IDL there are propget and propput attributes to indicate getter and setter methods for a property. Setting this option to YES (the default) will make doxygen replace the get and set methods by a property in the documentation. This will only work if the methods are indeed getting or setting a simple type. If this is not the case, or you want to show the methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = NO @@ -300,7 +305,8 @@ SUBGROUPING= YES # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). -INLINE_GROUPED_CLASSES = NO +#INLINE_GROUPED_CLASSES = NO +INLINE_GROUPED_CLASSES = YES # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields will be shown inline in the documentation @@ -308,7 +314,7 @@ INLINE_GROUPED_CLASSES = NO # documentation), provided this scope is documented. If set to NO (the default), # structs, classes, and unions are shown on a
Re: [v3] libstdc++/54314
adds in exports for more vtable bits, as per bugzilla missed some, added here and tested with: tested x86/linux --enable-symvers=gnu-versioned-namespace -benjamin2012-10-01 Benjamin Kosnik b...@redhat.com * config/abi/pre/gnu-versioned-namespace.ver: Add more typeinfo/vtable exports. diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver index 5f25374..84210e4 100644 --- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver +++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver @@ -62,15 +62,18 @@ GLIBCXX_7.0 { _ZTTNSt*; # vtable +_ZTVSt*; _ZTVNSt*; # thunk _ZTv0_n24_NS*; # typeinfo structure +_ZTISt*; _ZTINSt*; # typeinfo name +_ZTSSt*; _ZTSNSt*; # locale
[v3] patch, configuring GCC --disable-libgomp causes libstdc++ abi check to fail.
Hey Iain. I looked at this, and easily reproduced your results. The following symbols are actually required by all namespace associated-modes, not just parallel, and do not require parallel capability: Symbols reported as missing by the abi.exp code: _ZNSt9__cxx199815_List_node_base8transferEPS0_S1_ std::__cxx1998::_List_node_base::transfer(std::__cxx1998::_List_node_base*, std::__cxx1998::_List_node_base*) _ZNSt9__cxx199815_List_node_base4swapERS0_S1_ std::__cxx1998::_List_node_base::swap(std::__cxx1998::_List_node_base, std::__cxx1998::_List_node_base) _ZNSt9__cxx199815_List_node_base9_M_unhookEv std::__cxx1998::_List_node_base::_M_unhook() _ZNSt9__cxx199815_List_node_base10_M_reverseEv std::__cxx1998::_List_node_base::_M_reverse() _ZNSt9__cxx199815_List_node_base11_M_transferEPS0_S1_ std::__cxx1998::_List_node_base::_M_transfer(std::__cxx1998::_List_node_base*, std::__cxx1998::_List_node_base*) _ZNSt9__cxx199815_List_node_base7reverseEv std::__cxx1998::_List_node_base::reverse() _ZNSt9__cxx199815_List_node_base4hookEPS0_ std::__cxx1998::_List_node_base::hook(std::__cxx1998::_List_node_base*) _ZNSt9__cxx199815_List_node_base6unhookEv std::__cxx1998::_List_node_base::unhook() _ZNSt9__cxx199815_List_node_base7_M_hookEPS0_ std::__cxx1998::_List_node_base::_M_hook(std::__cxx1998::_List_node_base*) I've adjusted the Makefiles accordingly, and renamed some of these files to accurately reflect what is necessary for compatibility and what is not. And the remaining: _ZN14__gnu_parallel9_Settings3setERS0_ __gnu_parallel::_Settings::set(__gnu_parallel::_Settings) _ZN14__gnu_parallel9_Settings3getEv __gnu_parallel::_Settings::get() are sufficiently generic such that they can safely be defined even without libgomp being built. So let's do so! (The only problem may be targets that had shared libraries with symbol versioning and disabled libgomp, as now new symbols (ie, get/set from _Settings, above) will be in the shared library but with an older version number. In practice this may not be an issue.) There's no reason for this unintentional ABI breakage with this configure flag. tested x86/linux tested x86/linux --disable-libgomp 2012-09-28 Benjamin Kosnik b...@redhat.com * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): Remove ENABLE_PARALLEL. * include/Makefile.am: Same. * src/c++98/Makefile.am: Same. * src/Makefile.am: Same. * Makefile.in: Regenerated. * aclocal.m4: Same. * configure: Same. * doc/Makefile.in: Same. * include/Makefile.in: Same. * libsupc++/Makefile.in: Same. * po/Makefile.in: Same. * python/Makefile.in: Same. * src/Makefile.in: Same. * testsuite/Makefile.in: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * src/c++98/compatibility-debug_list-2.cc: Update comments. * src/c++98/compatibility-debug_list.cc: Same. * src/c++98/compatibility-list-2.cc: Renamed to src/c++98/list-aux-2.cc * src/c++98/compatibility-list.cc: Renamed to src/c++98/list-aux.cc * src/c++98/compatibility-parallel_list-2.cc: Renamed to src/c++98/list_associated-2.cc. * src/c++98/compatibility-parallel_list.cc: Renamed to src/c++98/list_associated.cc. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index ab26660..b9aa5c7 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2173,7 +2173,6 @@ AC_DEFUN([GLIBCXX_ENABLE_PARALLEL], [ AC_MSG_CHECKING([for parallel mode support]) AC_MSG_RESULT([$enable_parallel]) - GLIBCXX_CONDITIONAL(ENABLE_PARALLEL, test $enable_parallel = yes) ]) diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 7b12ea2..09925d5 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -737,7 +737,6 @@ debug_headers = \ # Parallel mode headers parallel_srcdir = ${glibcxx_srcdir}/include/parallel parallel_builddir = ./parallel -if ENABLE_PARALLEL parallel_headers = \ ${parallel_srcdir}/algo.h \ ${parallel_srcdir}/algobase.h \ @@ -782,9 +781,6 @@ parallel_headers = \ ${parallel_srcdir}/types.h \ ${parallel_srcdir}/unique_copy.h \ ${parallel_srcdir}/workstealing.h -else -parallel_headers = -endif # Profile mode headers profile_srcdir = ${glibcxx_srcdir}/include/profile @@ -1283,10 +1279,8 @@ install-headers: $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${debug_builddir} for file in ${debug_headers}; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${debug_builddir}; done - parallel_headers_install='${parallel_headers}';\ - test -z $$parallel_headers_install || \ - $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${parallel_builddir};\ - for file in $$parallel_headers_install; do \ + $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${parallel_builddir} + for file in ${parallel_headers}; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${parallel_builddir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${profile_builddir} for file in
[v3] fixup --enable-cxx-flags
... found while working on arm-eabisim cross, using --enable-cxx-flags was not working as AM_CXXFLAGS was being over-ridden by CXXFLAGS. (Despite the comments warning about this.) Fixed. Also patchlet for the last commit, forgot to edit PARALELL_FLAGS, so --disable-thread compiles were failing. -benjamin tested x86/linux tested x86/linux --enable-cxx-flags=-g02012-09-28 Benjamin Kosnik b...@redhat.com * fragment.am (CONFIG_CXXFLAGS): Remove EXTRA_CXX_FLAGS. * libsupc++/Makefile.am (LTCXXCOMPILE): Add EXTRA_CXX_FLAGS here. * src/Makefile.am: Same. * src/c++98/Makefile.am: Same. * src/c++11/Makefile.am: Same. * Makefile.in: Regenerated. * src/Makefile.am: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * include/Makefile.in: Same. * po/Makefile.in: Same. * python/Makefile.in: Same. * testsuite/Makefile.in: Same. 2012-09-28 Benjamin Kosnik b...@redhat.com * src/c++98/Makefile.am: Fixup PARALLEL_FLAGS. diff --git a/libstdc++-v3/fragment.am b/libstdc++-v3/fragment.am index 64247af..5b1d503 100644 --- a/libstdc++-v3/fragment.am +++ b/libstdc++-v3/fragment.am @@ -22,7 +22,8 @@ endif # These bits are all figured out from configure. Look in acinclude.m4 # or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS. CONFIG_CXXFLAGS = \ - $(SECTION_FLAGS) $(HWCAP_FLAGS) $(EXTRA_CXX_FLAGS) -frandom-seed=$@ + $(SECTION_FLAGS) $(HWCAP_FLAGS) -frandom-seed=$@ + WARN_CXXFLAGS = \ $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am index 7c72f58..69cbf5c 100644 --- a/libstdc++-v3/libsupc++/Makefile.am +++ b/libstdc++-v3/libsupc++/Makefile.am @@ -179,14 +179,14 @@ LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=comp # placed after --tag CXX lest things CXX undo the affect of # disable-shared. -# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is +# 2) Need to explicitly set LTCXXCOMPILE so that EXTRA_CXX_FLAGS is # last. (That way, things like -O2 passed down from the toplevel can # be overridden by --enable-debug.) LTCXXCOMPILE = \ $(LIBTOOL) --tag CXX --tag disable-shared \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXX_FLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 0251289..d76318e 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -154,14 +154,14 @@ AM_CXXFLAGS = \ # placed after --tag CXX lest things CXX undo the affect of # disable-shared. -# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is +# 2) Need to explicitly set LTCXXCOMPILE so that EXTRA_CXX_FLAGS is # last. (That way, things like -O2 passed down from the toplevel can -# be overridden by --enable-debug.) +# be overridden by --enable-debug and --enable-cxx-flags.) LTCXXCOMPILE = \ $(LIBTOOL) --tag CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXX_FLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) diff --git a/libstdc++-v3/src/c++11/Makefile.am b/libstdc++-v3/src/c++11/Makefile.am index 1e3dd99..4922461 100644 --- a/libstdc++-v3/src/c++11/Makefile.am +++ b/libstdc++-v3/src/c++11/Makefile.am @@ -99,14 +99,14 @@ AM_MAKEFLAGS = \ # placed after --tag CXX lest things CXX undo the affect of # disable-shared. -# 2) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is +# 2) Need to explicitly set LTCXXCOMPILE so that EXTRA_CXX_FLAGS is # last. (That way, things like -O2 passed down from the toplevel can # be overridden by --enable-debug.) LTCXXCOMPILE = \ $(LIBTOOL) --tag CXX --tag disable-shared \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXX_FLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) diff --git a/libstdc++-v3/src/c++98/Makefile.am b/libstdc++-v3/src/c++98/Makefile.am index 5733f34..6d83416 100644 --- a/libstdc++-v3/src/c++98/Makefile.am +++ b/libstdc++-v3/src/c++98/Makefile.am @@ -161,7 +161,7 @@ concept-inst.o: concept-inst.cc $(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $ # Use special rules for parallel mode compilation. -PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp +PARALLEL_FLAGS = -D_GLIBCXX_PARALLEL parallel_settings.lo: parallel_settings.cc $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $ parallel_settings.o: parallel_settings.cc @@ -203,14 +203,14 @@ AM_MAKEFLAGS = \ #
[v3] 28811, 54482
Fixes for various shared/static/pic issues, see SUBJECT. tested x86_64/linux tested x86_64/linux --with-pic tested x86_64/linux --without-pic* tested x86_64/linux --disable-shared tested x86_64/linux --disable-static earlier versions tested on cross arm-eabisim Most of these do what you'd expect. The default is -prefer-pic. Even if the exact route is sideways and full of libtool mysteryConfiguring without pic, ie, --without-pic, fails earlier (in liblto-plugin), and is otherwise ignored in non-libtool libraries like libgcc, but can be simulated and ends up creating an incorrect shared library, as might be expected. Seems like --disable-shared a better option for that scenario. I added some notes on the src build machinery to the manual. There's a lot of fighting libtool here. There's a patch to allow a less tortured mechanism for setting libtool's compile (not link) output, for both shared and static compiles. See: http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00340.html This seems like a good idea. This patch can be considered (c). With the completion of (a), and (b), the libtool variable overrides in libstdc++/configure.ac can be removed. If this tortured example proves the case for either a or b to the libtool maintainers then I'll have accomplished something useful today. -benjamin2012-09-19 Benjamin Kosnik b...@redhat.com PR libstdc++/28811 PR libstdc++/54482 * configure.ac (glibcxx_lt_pic_flag, glibcxx_compiler_pic_flag, glibcxx_compiler_shared_flag): New. Use them. (lt_prog_compiler_pic_CXX): Set via glibcxx_*_flag(s) above. (pic_mode): Set to default. (PIC_CXXFLAGS): Remove. * Makefile.am (PICFLAG, PICFLAG_FOR_TARGET): Remove. Comment. * libsupc++/Makefile.am: Use glibcxx_ld_pic_flag and glibcxx_compiler_shared_flag. Comment. * src/c++11/Makefile.am: Same. * src/c++98/Makefile.am: Same. * src/Makefile.am: Use glibcxx_compiler_pic_flag. * Makefile.in: Regenerated. * aclocal.m4: Same. * configure: Same. * doc/Makefile.in: Same. * include/Makefile.in: Same. * libsupc++/Makefile.in: Same. * po/Makefile.in: Same. * python/Makefile.in: Same. * src/Makefile.in: Same. * src/c++11/Makefile.in: Same. * src/c++98/Makefile.in: Same. * testsuite/Makefile.in: Same. * src/c++11/compatibility-atomic-c++0x.cc: Use _GLIBCXX_SHARED instead of PIC to designate shared-only code blocks. * src/c++11/compatibility-c++0x.cc: Same. * src/c++11/compatibility-thread-c++0x.cc: Same. * src/c++98/compatibility-list-2.cc: Same. * src/c++98/compatibility.cc: : Same. * testsuite/17_intro/shared_with_static_deps.cc: New. * doc/xml/manual/build_hacking.xml: Separate configure from make/build issues, add build details. diff --git a/libstdc++-v3/Makefile.am b/libstdc++-v3/Makefile.am index 76ff043..8be4f6c 100644 --- a/libstdc++-v3/Makefile.am +++ b/libstdc++-v3/Makefile.am @@ -152,8 +152,6 @@ AM_MAKEFLAGS = \ LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET) \ MAKE=$(MAKE) \ MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS) \ - PICFLAG=$(PICFLAG) \ - PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET) \ SHELL=$(SHELL) \ RUNTESTFLAGS=$(RUNTESTFLAGS) \ exec_prefix=$(exec_prefix) \ diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index 3943669..aff19f58 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -88,6 +88,7 @@ CXXFLAGS=$save_CXXFLAGS # up critical shell variables. GLIBCXX_CONFIGURE +# Libtool setup. if test x${with_newlib} != xyes; then AC_LIBTOOL_DLOPEN fi @@ -96,6 +97,38 @@ ACX_LT_HOST_FLAGS AC_SUBST(enable_shared) AC_SUBST(enable_static) +# libtool variables for C++ shared and position-independent compiles. +# +# Use glibcxx_lt_pic_flag to designate the automake variable +# used to encapsulate the default libtool approach to creating objects +# with position-independent code. Default: -prefer-pic. +# +# Use glibcxx_compiler_shared_flag to designate a compile-time flags for +# creating shared objects. Default: -D_GLIBCXX_SHARED. +# +# Use glibcxx_compiler_pic_flag to designate a compile-time flags for +# creating position-independent objects. This varies with the target +# hardware and operating system, but is often: -DPIC -fPIC. +if test $enable_shared = yes; then + glibcxx_lt_pic_flag=-prefer-pic + glibcxx_compiler_pic_flag=$lt_prog_compiler_pic_CXX + glibcxx_compiler_shared_flag=-D_GLIBCXX_SHARED + +else + glibcxx_lt_pic_flag= + glibcxx_compiler_pic_flag= + glibcxx_compiler_shared_flag= +fi +AC_SUBST(glibcxx_lt_pic_flag) +AC_SUBST(glibcxx_compiler_pic_flag) +AC_SUBST(glibcxx_compiler_shared_flag) + +# Override the libtool's pic_flag and pic_mode. +# Do this step after AM_PROG_LIBTOOL, but before AC_OUTPUT. +# NB: this impacts --with-pic and --without-pic.
Re: [PATCH, libstdc++] Improve slightly __cxa_guard_acquire
On Thu, 30 Aug 2012 12:48:34 +0200 Thiago Macieira thiago.macie...@intel.com wrote: Hello The attached patch is a simple improvement to make a thread that failed to set the waiting bit to exit the function earlier, if it detects that another thread has successfully finished initialising. It matches the CAS code from a few lines above. The change from RELAXED to ACQUIRE is noted in the previous patch I've just sent. I like this, but want // make a thread that failed to set the waiting bit to exit the function // earlier, if it detects that another thread has successfully finished // initialising added as a comment in the if (expected == pending_bit) branch. I would like to put this in trunk + comment and give it 2-3 days at least before 4.7 branch. -benjamin
Re: faster random number engine
On Wed, 29 Aug 2012 14:34:40 -0400 Ulrich Drepper drep...@gmail.com wrote: On Wed, Aug 29, 2012 at 11:43 AM, Paolo Carlini paolo.carl...@oracle.com wro The substance isn't of course. But normally we don't have __gnu_cxx things in the same std header. Can't we have a new ext/random and put it in there? If we can separate the new code to it, I think people would not even object to the target dependency, etc. In ext/ we are quite free to do extension / experimental work. OK, I moved the definition to ext. Will check in the result. Nice! Thanks. Here's a small patchlet to set the abi version to .18. With this, check-abi will pass. tested x86/linux -benjamin2012-08-30 Benjamin Kosnik b...@redhat.com * testsuite/util/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.18. diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.cc b/libstdc++-v3/testsuite/util/testsuite_abi.cc index 4721ccd..a5066cc 100644 --- a/libstdc++-v3/testsuite/util/testsuite_abi.cc +++ b/libstdc++-v3/testsuite/util/testsuite_abi.cc @@ -195,6 +195,7 @@ check_version(symbol test, bool added) known_versions.push_back(GLIBCXX_3.4.15); known_versions.push_back(GLIBCXX_3.4.16); known_versions.push_back(GLIBCXX_3.4.17); + known_versions.push_back(GLIBCXX_3.4.18); known_versions.push_back(GLIBCXX_LDBL_3.4); known_versions.push_back(GLIBCXX_LDBL_3.4.7); known_versions.push_back(GLIBCXX_LDBL_3.4.10); @@ -222,7 +223,7 @@ check_version(symbol test, bool added) test.version_status = symbol::incompatible; // Check that added symbols are added in the latest pre-release version. - bool latestp = (test.version_name == GLIBCXX_3.4.17 + bool latestp = (test.version_name == GLIBCXX_3.4.18 || test.version_name == CXXABI_1.3.6 || test.version_name == CXXABI_TM_1); if (added !latestp)
Re: [v3] libstdc++/54005
Pretty minor change, as per PR. This version seems more appropriate for templatized types. .. this wasn't right, commentary as per bugzilla. tested x86/linux -benjamin 2012-08-07 Benjamin Kosnik b...@redhat.com PR libstdc++/54005 continued * include/std/atomic: Use __atomic_lock_free with * include/bits/atomic_base.h: Same. diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h index 598e1f1..de098a3 100644 --- a/libstdc++-v3/include/bits/atomic_base.h +++ b/libstdc++-v3/include/bits/atomic_base.h @@ -35,6 +35,7 @@ #include bits/c++config.h #include stdbool.h #include stdint.h +#include cstddef #include bits/atomic_lockfree_defines.h namespace std _GLIBCXX_VISIBILITY(default) @@ -422,11 +423,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_always_lock_free(sizeof(_M_i), _M_i); } + { return __atomic_is_lock_free(sizeof(_M_i), NULL); } bool is_lock_free() const volatile noexcept - { return __atomic_always_lock_free(sizeof(_M_i), _M_i); } + { return __atomic_is_lock_free(sizeof(_M_i), NULL); } void store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept @@ -716,11 +717,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_always_lock_free(_M_type_size(1), _M_p); } + { return __atomic_is_lock_free(_M_type_size(1), NULL); } bool is_lock_free() const volatile noexcept - { return __atomic_always_lock_free(_M_type_size(1), _M_p); } + { return __atomic_is_lock_free(_M_type_size(1), NULL); } void store(__pointer_type __p, diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic index b5ca606..535a90f 100644 --- a/libstdc++-v3/include/std/atomic +++ b/libstdc++-v3/include/std/atomic @@ -184,11 +184,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_always_lock_free(sizeof(_M_i), _M_i); } + { return __atomic_is_lock_free(sizeof(_M_i), NULL); } bool is_lock_free() const volatile noexcept - { return __atomic_always_lock_free(sizeof(_M_i), _M_i); } + { return __atomic_is_lock_free(sizeof(_M_i), NULL); } void store(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept
[v3] libstdc++/54102
... finally got around to fixing up the generated HTML, so that charset is set to UTF-8. Sorry this took so long. tested x86/linux -benjamindiff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index 3853472..5c86bb9 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -432,6 +432,7 @@ dnl AC_OUTPUT macro. This one lists the files to be created: AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES([scripts/testsuite_flags],[chmod +x scripts/testsuite_flags]) AC_CONFIG_FILES([scripts/extract_symvers],[chmod +x scripts/extract_symvers]) +AC_CONFIG_FILES([doc/xsl/customization.xsl]) # Multilibs need MULTISUBDIR defined correctly in certain makefiles so # that multilib installs will end up installed in the correct place. diff --git a/libstdc++-v3/doc/Makefile.am b/libstdc++-v3/doc/Makefile.am index 95d8513..b787200 100644 --- a/libstdc++-v3/doc/Makefile.am +++ b/libstdc++-v3/doc/Makefile.am @@ -465,9 +465,10 @@ XSLT_PARAM = --param toc.section.depth 4 #XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns #XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl -XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml-1_1/chunk.xsl -XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml-1_1/docbook.xsl +XSL_HTML_STYLE = $(XSL_STYLE_DIR)/html/chunk.xsl +XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/html/docbook.xsl XSL_EPUB_STYLE = $(XSL_STYLE_DIR)/epub3/chunk.xsl +XSL_LOCAL_STYLE = ${glibcxx_builddir}/doc/xsl/customization.xsl ${docbook_outdir}/epub: mkdir -p ${docbook_outdir}/epub @@ -529,21 +530,25 @@ stamp-html-docbook-lwg: stamp-html-docbook $(xml_extra) stamp-html-docbook-data: stamp-html-docbook-images stamp-html-docbook-lwg $(STAMP) stamp-html-docbook-data -# HTML, index plus chapters +# HTML, chunked into index plus chapters as separate pages stamp-html-docbook: $(xml_sources) ${docbook_outdir}/html @echo Generating html files... $(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${docbook_outdir}/html/ \ - $(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml + --stringparam chunker.output.encoding UTF-8 \ + $(XSL_HTML_STYLE) \ + ${top_srcdir}/doc/xml/spine.xml $(STAMP) stamp-html-docbook doc-html-docbook: stamp-html-docbook-data # HTML, all one page +# NB: Have to generate customization XSL for UTF-8 output. manual_html = ${docbook_outdir}/html/libstdc++-manual-single.html stamp-html-single-docbook: $(xml_sources) ${docbook_outdir}/html @echo Generating html single file... $(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${manual_html} \ - $(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml + ${XSL_LOCAL_STYLE} \ + ${top_srcdir}/doc/xml/spine.xml $(STAMP) stamp-html-single-docbook doc-html-single-docbook: stamp-html-single-docbook diff --git a/libstdc++-v3/doc/xsl/customization.xsl.in b/libstdc++-v3/doc/xsl/customization.xsl.in new file mode 100644 index 000..9db621c --- /dev/null +++ b/libstdc++-v3/doc/xsl/customization.xsl.in @@ -0,0 +1,16 @@ +?xml version='1.0'? + +!-- + Specialization/customization layer for libstdc++. + To output both chunked/single page HTML in UTF-8 charset + + XSL_STYLE_DIR is set in acinclude.m4 + +xsl:import html=@XSL_STYLE_DIR@/html/docbook.xsl/ +-- + +xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; + version=1.0 +xsl:import href=@XSL_STYLE_DIR@/html/docbook.xsl/ +xsl:output method=html encoding=UTF-8 indent=no/ +/xsl:stylesheet
[v3] libstdc++/54005
Pretty minor change, as per PR. This version seems more appropriate for templatized types. I'll wait a bit before putting this on 4.7_branch -benjamin tested x86/linux 2012-08-07 Benjamin Kosnik b...@redhat.com PR libstdc++/54005 * include/std/atomic: Use __atomic_always_lock_free. * include/bits/atomic_base.h: Same. diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h index 9d5f4eb..598e1f1 100644 --- a/libstdc++-v3/include/bits/atomic_base.h +++ b/libstdc++-v3/include/bits/atomic_base.h @@ -422,11 +422,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_is_lock_free (sizeof (_M_i), _M_i); } + { return __atomic_always_lock_free(sizeof(_M_i), _M_i); } bool is_lock_free() const volatile noexcept - { return __atomic_is_lock_free (sizeof (_M_i), _M_i); } + { return __atomic_always_lock_free(sizeof(_M_i), _M_i); } void store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept @@ -716,11 +716,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_is_lock_free(_M_type_size(1), _M_p); } + { return __atomic_always_lock_free(_M_type_size(1), _M_p); } bool is_lock_free() const volatile noexcept - { return __atomic_is_lock_free(_M_type_size(1), _M_p); } + { return __atomic_always_lock_free(_M_type_size(1), _M_p); } void store(__pointer_type __p, diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic index 6a08b28..b5ca606 100644 --- a/libstdc++-v3/include/std/atomic +++ b/libstdc++-v3/include/std/atomic @@ -184,11 +184,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_is_lock_free(sizeof(_M_i), _M_i); } + { return __atomic_always_lock_free(sizeof(_M_i), _M_i); } bool is_lock_free() const volatile noexcept - { return __atomic_is_lock_free(sizeof(_M_i), _M_i); } + { return __atomic_always_lock_free(sizeof(_M_i), _M_i); } void store(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept
[v3] regex testsuite cleanups
Removes duplicate tests file, makes sub-directory naming consistent tested x86/linux -benjamin2012-06-24 Benjamin Kosnik b...@redhat.com * testsuite/28_regex/algorithms/02_match: To... * testsuite/28_regex/algorithms/match: ...this. * testsuite/28_regex/headers/04_header/regex/std_c++0x_neg.cc: Remove duplicate. diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/basic/string_01.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/basic/string_01.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/basic/string_01.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/basic/string_01.cc diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/basic/string_range_00_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/basic/string_range_00_03.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/basic/string_range_00_03.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/basic/string_range_00_03.cc diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/basic/string_range_01_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/basic/string_range_01_03.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/basic/string_range_01_03.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/basic/string_range_01_03.cc diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/basic/string_range_02_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/basic/string_range_02_03.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/basic/string_range_02_03.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/basic/string_range_02_03.cc diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/cstring_plus.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/extended/cstring_plus.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/cstring_plus.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/extended/cstring_plus.cc diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/cstring_questionmark.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/extended/cstring_questionmark.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/cstring_questionmark.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/extended/cstring_questionmark.cc diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/string_any.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/extended/string_any.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/string_any.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/extended/string_any.cc diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/string_range_00_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/extended/string_range_00_03.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/string_range_00_03.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/extended/string_range_00_03.cc diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/string_range_01_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/extended/string_range_01_03.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/string_range_01_03.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/extended/string_range_01_03.cc diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/string_range_02_03.cc b/libstdc++-v3/testsuite/28_regex/algorithms/match/extended/string_range_02_03.cc similarity index 100% rename from libstdc++-v3/testsuite/28_regex/algorithms/02_match/extended/string_range_02_03.cc rename to libstdc++-v3/testsuite/28_regex/algorithms/match/extended/string_range_02_03.cc diff --git a/libstdc++-v3/testsuite/28_regex/headers/04_header/regex/std_c++0x_neg.cc b/libstdc++-v3/testsuite/28_regex/headers/04_header/regex/std_c++0x_neg.cc deleted file mode 100644 index e8ddb77..000 --- a/libstdc++-v3/testsuite/28_regex/headers/04_header/regex/std_c++0x_neg.cc +++ /dev/null @@ -1,23 +0,0 @@ -// { dg-do compile } -// { dg-options -std=gnu++98 } - -// Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[v3] doxygen vs. pdflatex, kill COMPACT_LATEX
Here's a deceptively small patchlet that allows make doc-pdf-doxygen build the api PDF file when the prerequisites are met. (And the texmf.cnf file is edited to increase the underlying TeX subsystem's memory.) I'm currently using doxygen 1.8.1.1 and a variety of latex subsystems, depending on the machine I use to generate docs. Up to this point, fedora 17 would fail to complete generation of the pdf file. This fixes it, allowing the generation on both f16 and f17. Hopefully others. tested x86/linux, f16 tested x86/linux, f17 -benjamin2012-06-25 Benjamin Kosnik b...@redhat.com * doc/doxygen/user.cfg.in: Change COMPACT_LATEX to NO. diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index 3defd8d..b9fc4bf 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -1422,7 +1422,7 @@ MAKEINDEX_CMD_NAME = makeindex # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. -COMPACT_LATEX = YES +COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and
[v3] libstdc++/53543
Renames to avoid builtins on clang. (This patch of code is actually the punchline to the joke, how many template aliases are really required if you are going for no line breaks and using 80 columns while using policy based designs.) tested x86/linux -benjamin2012-05-31 Benjamin Kosnik b...@redhat.com PR libstdc++/53543 * include/bits/hashtable_policy.h (_Insert::__is_convertible): Rename to __is_conv to avoid clash with clang built-in. diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index 708ef98..27badbc 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -831,10 +831,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __base_type::insert; templatetypename _Pair - using __is_convertible = std::is_convertible_Pair, value_type; + using __is_conv = std::is_convertible_Pair, value_type; templatetypename _Pair - using _IFconv = std::enable_if__is_convertible_Pair::value; + using _IFconv = std::enable_if__is_conv_Pair::value; templatetypename _Pair using _IFconvp = typename _IFconv_Pair::type;
[gfortran/ssp/quadmath] symvers config tweaks
As per libstdc++/52700, this fixes the configure bits for libgfortran/libssp/libquadmath. With these fixes, I believe all the libs are safe for --enable-symvers=gnu* variants. Super simple patches... I intend to put this on the 4.7 branch as well. tested x86/linux -benjamin 2012-05-29 Benjamin Kosnik b...@redhat.com PR libstdc++/51007 * configure.ac: Allow gnu, gnu* variants for --enable-symvers argument. * configure: Regenerated. diff --git a/libquadmath/configure b/libquadmath/configure index e5c3de6..8beb1a6 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -12355,7 +12355,7 @@ else quadmath_use_symver=yes fi -if test x$quadmath_use_symver = xyes; then +if test x$quadmath_use_symver != xno; then if test x$gcc_no_link = xyes; then # If we cannot link, we cannot build shared libraries, so do not use # symbol versioning. diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac index 512b9f8..d3bfb04 100644 --- a/libquadmath/configure.ac +++ b/libquadmath/configure.ac @@ -169,7 +169,7 @@ AS_HELP_STRING([--disable-symvers], [disable symbol versioning for libquadmath]), quadmath_use_symver=$enableval, quadmath_use_symver=yes) -if test x$quadmath_use_symver = xyes; then +if test x$quadmath_use_symver != xno; then if test x$gcc_no_link = xyes; then # If we cannot link, we cannot build shared libraries, so do not use # symbol versioning. 2012-05-29 Benjamin Kosnik b...@redhat.com PR libstdc++/51007 * configure.ac: Allow gnu, gnu* variants for --enable-symvers argument. * configure: Regenerated. diff --git a/libssp/configure.ac b/libssp/configure.ac index 0eee36c..93dfa8d 100644 --- a/libssp/configure.ac +++ b/libssp/configure.ac @@ -77,7 +77,7 @@ AS_HELP_STRING([--disable-symvers], [disable symbol versioning for libssp]), ssp_use_symver=$enableval, ssp_use_symver=yes) -if test x$ssp_use_symver = xyes; then +if test x$ssp_use_symver != xno; then if test x$gcc_no_link = xyes; then # If we cannot link, we cannot build shared libraries, so do not use # symbol versioning. 2012-05-29 Benjamin Kosnik b...@redhat.com PR libstdc++/51007 * configure.ac: Allow gnu, gnu* variants for --enable-symvers argument. * configure: Regenerated. diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac index fc58a5c..97b337e 100644 --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -157,7 +157,7 @@ AS_HELP_STRING([--disable-symvers], [disable symbol versioning for libgfortran]), gfortran_use_symver=$enableval, gfortran_use_symver=yes) -if test x$gfortran_use_symver = xyes; then +if test x$gfortran_use_symver != xno; then save_LDFLAGS=$LDFLAGS LDFLAGS=$LDFLAGS -fPIC -shared -Wl,--version-script,./conftest.map cat conftest.map EOF
[libjava] --enable-symvers tweak for 52700
Allows use of --enable-symvers=gnu-versioned-namespace while configuring in libjava. The rest of the target libs that use --enable-symvers already handle this. As per libstdc++/52700. Pretty simple, but will wait for OK for trunk/branch tested x86/linux trunk 4_7-branch -benjamin2012-05-16 Benjamin Kosnik b...@redhat.com PR libstdc++/52700 * configure.ac: Allow gnu, gnu-versioned-namespace for --enable-symvers arguments. * configure: Regenerate. diff --git a/libjava/configure.ac b/libjava/configure.ac index 351b2bd..62c5000 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -1805,7 +1805,7 @@ AC_CACHE_CHECK([whether ld supports anonymous version scripts], AS_HELP_STRING([--disable-symvers], [disable symbol versioning for libjava]), [case $enableval in - yes) libjava_cv_anon_version_script=yes ;; + yes|gnu*) libjava_cv_anon_version_script=yes ;; no) libjava_cv_anon_version_script=no ;; *) AC_MSG_ERROR([Unknown argument to enable/disable symvers]);; esac],
[v3] doxygen markup for template parameters
In libstdc++/44015, there is a request for doxygen markup on template parameters, including default arguments. This is a kind of markup that libstdc++ has mostly not done, or done inconsistently. So, here's how I think it should be done, at least for io and containers. See generated files here: http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html tested x86/linux -benjamin2012-05-02 Benjamin Kosnik b...@redhat.com PR libstdc++/44015 * include/bits/basic_ios.h: Add tparam markup for * doxygen. include/bits/basic_string.h: Same. * include/bits/forward_list.h: Same. * include/bits/stl_bvector.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_list.h: Same. include/bits/stl_map.h: * Same. include/bits/stl_multimap.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/stl_pair.h: Same. * include/bits/stl_queue.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_vector.h: Same. * include/bits/unordered_map.h: Same. * include/bits/unordered_set.h: Same. include/std/array: * Same. include/std/atomic: Same. include/std/fstream: * Same. include/std/istream: Same. include/std/ostream: * Same. include/std/sstream: Same. * include/std/streambuf: Same. * testsuite/23_containers/deque/requirements/dr438/*: Adjust line numbers. * testsuite/23_containers/list/requirements/dr438/*: Same. * testsuite/23_containers/vector/requirements/dr438/*: Same. diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h index 24c3ca4..384bb4f 100644 --- a/libstdc++-v3/include/bits/basic_ios.h +++ b/libstdc++-v3/include/bits/basic_ios.h @@ -1,7 +1,7 @@ // Iostreams base classes -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008, 2009, 2010, 2011 +// 2006, 2007, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -52,11 +52,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *__f; } - // 27.4.5 Template class basic_ios /** - * @brief Virtual base class for all stream classes. + * @brief Template class basic_ios, virtual base class for all + * stream classes. * @ingroup io * + * @tparam _CharT Type of character stream. + * @tparam _Traits Traits for character type, defaults to + * char_traits_CharT. + * * Most of the member functions called dispatched on stream objects * (e.g., @c std::cout.foo(bar);) are consolidated in this class. */ diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 169daf5..24562c4 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -55,6 +55,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @ingroup strings * @ingroup sequences * + * @tparam _CharT Type of character + * @tparam _Traits Traits for character type, defaults to + * char_traits_CharT. + * @tparam _Alloc Allocator type, defaults to allocator_CharT. + * * Meets the requirements of a a href=tables.html#65container/a, a * a href=tables.html#66reversible container/a, and a * a href=tables.html#67sequence/a. Of the diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index 76c3e33..ce35504 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -376,6 +376,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * * @ingroup sequences * + * @tparam _Tp Type of element. + * @tparam _Alloc Allocator type, defaults to allocator_Tp. + * * Meets the requirements of a a href=tables.html#65container/a, a * a href=tables.html#67sequence/a, including the * a href=tables.html#68optional sequence requirements/a with the diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h index dfa0b32..3adbfa1 100644 --- a/libstdc++-v3/include/bits/stl_bvector.h +++ b/libstdc++-v3/include/bits/stl_bvector.h @@ -500,13 +500,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * @brief A specialization of vector for booleans which offers fixed time * access to individual elements in any order. * + * @ingroup sequences + * + * @tparam _Alloc Allocator type. + * * Note that vectorbool does not actually meet the requirements for being * a container. This is because the reference and pointer types are not * really references and pointers to bool. See DR96 for details. @see * vector for function documentation. * - * @ingroup sequences - * * In some terminology a %vector can be described as a dynamic * C-style array, it offers fast and efficient access to individual * elements in any order and saves the user from worrying about diff --git
[v3] testsuite_flags vs. -ftrack-macro-expansion
Enables -ftrack-macro-expansion when running libstdc++ testsuite. tested x86/linux -benjamin2012-05-03 Benjamin Kosnik b...@redhat.com * scripts/testsuite_flags.in (cxxflags): Remove -ftrack-macro-expansion=0. diff --git a/libstdc++-v3/scripts/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in index 7b16bb1..f77784b 100755 --- a/libstdc++-v3/scripts/testsuite_flags.in +++ b/libstdc++-v3/scripts/testsuite_flags.in @@ -54,7 +54,7 @@ case ${query} in echo ${CC} ;; --cxxflags) - CXXFLAGS_default=-D_GLIBCXX_ASSERT -fmessage-length=0 -ftrack-macro-expansion=0 + CXXFLAGS_default=-D_GLIBCXX_ASSERT -fmessage-length=0 CXXFLAGS_config=@SECTION_FLAGS@ @CXXFLAGS@ @EXTRA_CXX_FLAGS@ echo ${CXXFLAGS_default} ${CXXFLAGS_config} ;;
Re: [patch] skip tpf configure tests
* crossconfig.m4: Since we know that all TPF builds are cross- builds and cannot run configuration-time link tests, do not allow it; just go with known supported linker options. * configure: Regenerate (called as GLIBCXX_CROSSCONFIG). OK -benjamin
[v3] hashtable fw decl fix
This patchlette needed for versioned builds, just makes declaration/foward declaration consistent. -benjamin tested x86/linux tested x86/linux versioned namespacesdiff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index 3b43510..a42d3d3 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -33,12 +33,16 @@ namespace std _GLIBCXX_VISIBILITY(default) { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + templatetypename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits class _Hashtable; +_GLIBCXX_END_NAMESPACE_VERSION + namespace __detail { _GLIBCXX_BEGIN_NAMESPACE_VERSION
[v3] hashtable doc tweaks
... putting in line breaks for doxygen, so that each base class is on a separate line. -benjamin2012-04-25 Benjamin Kosnik b...@redhat.com * include/bits/hashtable.h: Adjust doxygen markup for base classes. * include/bits/hashtable_policy.h: Same. diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h index 8c17035..5adc7ca 100644 --- a/libstdc++-v3/include/bits/hashtable.h +++ b/libstdc++-v3/include/bits/hashtable.h @@ -157,11 +157,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * explicitly passed, template pattern. * * Base class templates are: - *__detail::_Hashtable_base - *__detail::_Map_base - *__detail::_Insert - *__detail::_Rehash_base - *__detail::_Equality + *- __detail::_Hashtable_base + *- __detail::_Map_base + *- __detail::_Insert + *- __detail::_Rehash_base + *- __detail::_Equality */ templatetypename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index 160a6ce..3b43510 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -121,10 +121,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * struct _Hash_node_base * - * Nodes, used to wrap elements stored in the hash table. A policy - * template parameter of class template _Hashtable controls whether - * nodes also store a hash code. In some cases (e.g. strings) this - * may be a performance win. + * Nodes, used to wrap elements stored in the hash table. A policy + * template parameter of class template _Hashtable controls whether + * nodes also store a hash code. In some cases (e.g. strings) this + * may be a performance win. */ struct _Hash_node_base { @@ -141,7 +141,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION templatetypename _Value, bool _Cache_hash_code struct _Hash_node; - /// Specialization. + /** + * Specialization for nodes with caches, struct _Hash_node. + * + * Base class is __detail::_Hash_node_base. + */ templatetypename _Value struct _Hash_node_Value, true : _Hash_node_base { @@ -156,7 +160,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_next() const { return static_cast_Hash_node*(_M_nxt); } }; - /// Specialization. + /** + * Specialization for nodes without caches, struct _Hash_node. + * + * Base class is __detail::_Hash_node_base. + */ templatetypename _Value struct _Hash_node_Value, false : _Hash_node_base { @@ -1421,8 +1429,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * Primary class template _Hashtable_base. * - * Base class for _Hashtable. Helper class adding management of - * _Equal functor to _Hash_code_base type. + * Helper class adding management of _Equal functor to + * _Hash_code_base type. + * + * Base class templates are: + *- __detail::_Hash_code_base + *- __detail::_Hashtable_ebo_helper */ templatetypename _Key, typename _Value, typename _ExtractKey, typename _Equal,
[v3] libstdc++/52689 testcase
Noticed that this testcase wasn't put in as part of the patch. Fixed as follows. tested x86/linux -benjamin2012-04-24 Benjamin Kosnik b...@redhat.com PR libstdc++/52689 * testsuite/17_intro/static.cc: New. diff --git a/libstdc++-v3/testsuite/17_intro/static.cc b/libstdc++-v3/testsuite/17_intro/static.cc new file mode 100644 index 000..99362f5 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/static.cc @@ -0,0 +1,31 @@ +// { dg-do link } +// { dg-require-effective-target static } +// { dg-options -static -std=gnu++11 } + +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// http://www.gnu.org/licenses/ + +// libstdc++/52689 static linking fails +#include iostream +#include locale + +int main() +{ + std::locale c = std::locale::global(); + std::cout i am old-skool\n; + return 0; +}
[v3] std::uninitialized_copy test
Found this bug in 4.4 branches, fixed with the following in later branches: http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01616.html But the test case is useful anyway. tested x86/linux -benjamin2012-04-16 Benjamin Kosnik b...@redhat.com * testsuite/20_util/specialized_algorithms/uninitialized_copy/ 808590.cc: New. diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/808590.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/808590.cc new file mode 100644 index 000..7ccd8da --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_copy/808590.cc @@ -0,0 +1,48 @@ +// Copyright (C) 2012 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without Pred the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// http://www.gnu.org/licenses/. + +#include vector +#include stdexcept + +// 4.4.x only +struct c +{ + void *m; + + c(void* o = 0) : m(o) {} + c(const c r) : m(r.m) {} + + templateclass T +explicit c(T o) : m((void*)0xdeadfbeef) { } +}; + +int main() +{ + std::vectorc cbs; + const c cb((void*)0xcafebabe); + + for (int fd = 62; fd 67; ++fd) +{ + cbs.resize(fd + 1); + cbs[fd] = cb; +} + + for (int fd = 62; fd 67; ++fd) +if (cb.m != cbs[fd].m) + throw std::runtime_error(wrong); + return 0; +}
[v3] hashtable aliases
This patch restructures the std::unordered_* containers, as per the tempting comment in unordered_set: // NB: When we get typedef templates these class definitions // will be unnecessary. This required some changes in _Hashtable, forced the consolidation of insert() logic in a base class, and necessitated the restructuring of type definitions in the _Hashtable. I think the current form allows some nice advantages in terms of nested types and expressiveness. tested x86/linux tested x86/linux -debug -benjamin 20120412-334.patch.bz2 Description: application/bzip
[v3] libstdc++/52689
Seems like libstdc++.a has suffered a bit in the transition to a more modular convenience-library build system. Here's a patch to clean up the compatibility symbols throughout libstdc++, to insure that necessary symbols for versioning purposes are only in shared binaries, ie libstdc++.so. Most of these are completely un-necessary for a static library, and are now duly noted as such. I'm checking this in on trunk and hope to move it to 4_7-branch for 4.7.1 after it's been fire-tested. tested various ways x86/linux -benjamin2012-03-28 Benjamin Kosnik b...@redhat.com PR libstdc++/52689 * libsupc++/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. * libsupc++/Makefile.in: Regenerated. * src/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. (libstdc___la_SOURCES): Add in compatiblity files, with content that varies with -DPIC. * src/Makefile.in: Regenerated. * src/c++11/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. * src/c++11/Makefile.in: Regenerated. * src/c++11/compatibility-atomic-c++0x.cc: Guard with PIC. * src/c++11/compatibility-c++0x.cc: Same. * src/c++11/future.cc: Consolidate compatibility bits into.. * src/c++11/mutex.cc: Consolidate compatibility bits into.. * src/c++11/compatibility-thread-cxx0x.cc: ...here. New. * src/c++98/Makefile.am (LTCXXCOMPILE, CXXLINK): Tweak. * src/c++98/Makefile.in: Regenerated. * src/c++98/compatibility-ldbl.cc: Guard with PIC * src/c++98/compatibility-list-2.cc: Same. * src/c++98/compatibility-list.cc: Same. * src/c++98/compatibility.cc: Tweak comments. diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am index bee4353..eaf109e 100644 --- a/libstdc++-v3/libsupc++/Makefile.am +++ b/libstdc++-v3/libsupc++/Makefile.am @@ -32,17 +32,17 @@ toolexeclib_LTLIBRARIES = libsupc++.la noinst_LTLIBRARIES = libsupc++convenience.la std_HEADERS = \ - cxxabi.h exception initializer_list new typeinfo + cxxabi.h exception initializer_list new typeinfo bits_HEADERS = \ atomic_lockfree_defines.h cxxabi_forced.h \ - exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h + exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h headers = $(std_HEADERS) $(bits_HEADERS) if GLIBCXX_HOSTED c_sources = \ - cp-demangle.c + cp-demangle.c endif sources = \ @@ -95,7 +95,7 @@ sources = \ vmi_class_type_info.cc \ vterminate.cc -libsupc___la_SOURCES = $(sources) $(c_sources) +libsupc___la_SOURCES = $(sources) $(c_sources) libsupc__convenience_la_SOURCES = $(sources) $(c_sources) # AM_CXXFLAGS needs to be in each subdirectory so that it can be @@ -106,9 +106,7 @@ libsupc__convenience_la_SOURCES = $(sources) $(c_sources) AM_CXXFLAGS = \ $(PIC_CXXFLAGS) \ $(XTEMPLATE_FLAGS) \ - $(WARN_CXXFLAGS) \ - $(OPTIMIZE_CXXFLAGS) \ - $(CONFIG_CXXFLAGS) + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_MAKEFLAGS = \ gxx_include_dir=$(gxx_include_dir) @@ -125,7 +123,7 @@ C_COMPILE = \ # LTCOMPILE is copied from LTCXXCOMPILE below. LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \ $(CC) $(DEFS) $(C_INCLUDES) $(PIC_CXXFLAGS) \ -$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) cp-demangle.c: rm -f $@ @@ -178,9 +176,11 @@ nested_exception.o: nested_exception.cc # # We have to put --tag disable-shared after --tag CXX lest things # CXX undo the affect of disable-shared. -LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) @@ -190,10 +190,11 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared $(LIBTOOLFLAGS) \ - --mode=link $(CXX) \ - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ - +CXXLINK = \ + $(LIBTOOL) --tag CXX --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXX) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ # Install notes # We have to have rules modified from the default to counteract SUN make diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index eb80bfe..28430cf 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -29,10 +29,37 @@ SUBDIRS = c++98 c++11 # Cross compiler support. toolexeclib_LTLIBRARIES = libstdc++.la -vpath % $(top_srcdir)/src -vpath % $(top_srcdir) +vpath %
[v3] remove duplicate cxxflags
Removes duplicates on command line when running test suite. CXXFLAG info was being quoted twice. tested x86/linux -benjamin
Re: [v3] remove duplicate cxxflags
... here's the patch.2012-03-22 Benjamin Kosnik b...@redhat.com * scripts/testsuite_flags.in (--cxxflags): Let CXXFLAGS set -g -O2. * testsuite/lib/libstdc++.exp: Same. diff --git a/libstdc++-v3/scripts/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in index 457adaf..f77784b 100755 --- a/libstdc++-v3/scripts/testsuite_flags.in +++ b/libstdc++-v3/scripts/testsuite_flags.in @@ -54,7 +54,7 @@ case ${query} in echo ${CC} ;; --cxxflags) - CXXFLAGS_default=-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 + CXXFLAGS_default=-D_GLIBCXX_ASSERT -fmessage-length=0 CXXFLAGS_config=@SECTION_FLAGS@ @CXXFLAGS@ @EXTRA_CXX_FLAGS@ echo ${CXXFLAGS_default} ${CXXFLAGS_config} ;; diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index f24d877..c1ccfa5 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -212,7 +212,7 @@ proc libstdc++_init { testfile } { # Default settings. set cxx [transform g++] -set cxxflags -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 +set cxxflags -D_GLIBCXX_ASSERT -fmessage-length=0 set cxxpchflags set cxxldflags set cc [transform gcc]
[pph] preliminary build support for stdc++.h.pph
Seems like -fpph doesn't work on the pph branch anymore, and instead -fpph-gen/-fpph-map/-fpph-hdr are used. The thing is, how are these flags used? unhelpful wiki page: http://gcc.gnu.org/wiki/pph Based on invoke.texi, I'm expecting something like this: 1. generate g++ -fpph-gen all.h; // generates all.pph 2. use g++ -fpph-hdr=all.h foo.cc // like -include=all.h, but works with pph files Is this right? -benjamin 2012-03-22 Benjamin Kosnik b...@redhat.com * include/Makefile.am (allcreated): Add pph build rule. (pch1_source): ... to pre_1_source. (pch2_source): ... to pre_2_source. (pch3_source): ... to pre_3_source. (pph_output): New. (PPH_GEN_FLAGS): New. * include/Makefile.in: Regenerate. Index: include/Makefile.am === --- include/Makefile.am (revision 185703) +++ include/Makefile.am (working copy) @@ -858,7 +858,7 @@ ${host_builddir}/gthr-default.h -pch1_source = ${glibcxx_srcdir}/include/precompiled/stdc++.h +pre_1_source = ${glibcxx_srcdir}/include/precompiled/stdc++.h pch1_output_builddir = ${host_builddir}/stdc++.h.gch pch1_output_anchor = ${host_builddir}/stdc++.h pch1_output_installdir = ${host_installdir}/stdc++.h.gch @@ -866,19 +866,18 @@ pch1b_output = ${pch1_output_builddir}/O2g.gch pch1_output = ${pch1a_output} ${pch1b_output} -pch2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h +pre_2_source = ${glibcxx_srcdir}/include/precompiled/stdtr1c++.h pch2_output_builddir = ${host_builddir}/stdtr1c++.h.gch pch2_output_anchor = ${host_builddir}/stdtr1c++.h pch2_output_installdir = ${host_installdir}/stdtr1c++.h.gch pch2_output = ${pch2_output_builddir}/O2g.gch -pch3_source = ${glibcxx_srcdir}/include/precompiled/extc++.h +pre_3_source = ${glibcxx_srcdir}/include/precompiled/extc++.h pch3_output_builddir = ${host_builddir}/extc++.h.gch pch3_output_anchor = ${host_builddir}/extc++.h pch3_output_installdir = ${host_installdir}/extc++.h.gch pch3_output = ${pch3_output_builddir}/O2g.gch - pch_output = ${pch1_output} ${pch2_output} ${pch3_output} pch_output_dirs = \ ${pch1_output_builddir} ${pch2_output_builddir} ${pch3_output_builddir} @@ -891,6 +890,9 @@ pch_build = endif +pph_output = ${host_builddir}/stdc++.h.pph +PPH_GEN_FLAGS = -x c++-header -nostdinc++ -fpph-gen + # List of all timestamp files. By keeping only one copy of this list, both # CLEANFILES and all-local are kept up-to-date. allstamped = \ @@ -904,7 +906,8 @@ allcreated = \ ${host_builddir}/c++config.h \ ${thread_host_headers} \ - ${pch_build} + ${pch_build} \ + ${pph_output} # Here are the rules for building the headers all-local: ${allstamped} ${allcreated} @@ -1153,25 +1156,30 @@ $ $@ # Build two precompiled C++ includes, stdc++.h.gch/*.gch -${pch1a_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source} +${pch1a_output}: ${allstamped} ${host_builddir}/c++config.h ${pre_1_source} -mkdir -p ${pch1_output_builddir} - $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g -std=gnu++0x ${pch1_source} \ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g -std=gnu++0x ${pre_1_source} \ -o $@ -${pch1b_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source} +${pch1b_output}: ${allstamped} ${host_builddir}/c++config.h ${pre_1_source} -mkdir -p ${pch1_output_builddir} - $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch1_source} -o $@ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pre_1_source} -o $@ # Build a precompiled TR1 include, stdtr1c++.h.gch/O2.gch -${pch2_output}: ${pch2_source} ${pch1_output} +${pch2_output}: ${pre_2_source} ${pch1_output} -mkdir -p ${pch2_output_builddir} - $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch2_source} -o $@ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pre_2_source} -o $@ # Build a precompiled extension include, extc++.h.gch/O2.gch -${pch3_output}: ${pch3_source} ${pch2_output} +${pch3_output}: ${pre_3_source} ${pch2_output} -mkdir -p ${pch3_output_builddir} - $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch3_source} -o $@ + $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pre_3_source} -o $@ +# Build a preprocessed C++ include stdc++.h.pph +pph: ${pph_output} +${pph_output}: ${allstamped} ${host_builddir}/c++config.h ${pre_1_source} + $(CXX) $(PPH_GEN_FLAGS) $(AM_CPPFLAGS) -O2 -g ${pre_1_source} -o $@ + # For robustness sake (in light of junk files or in-source # configuration), copy from the build or source tree to the install # tree using only the human-maintained file lists and directory @@ -1291,7 +1299,7 @@ $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done # By adding these files here, automake will remove them for 'make clean' -CLEANFILES = ${pch_output} ${pch_output_anchors} stamp-host +CLEANFILES = ${pch_output}
[wwdocs] update libstdc++ docs, links
Small filename tweaks to gcc's docs page for the generated 4.7.0 libstdc++ docs. -benjamin2012-03-22 Benjamin Kosnik b...@redhat.com * htdocs/onlinedocs/index.html: Adjust libstdc++ xml file names. Index: htdocs/onlinedocs/index.html === RCS file: /cvs/gcc/wwwdocs/htdocs/onlinedocs/index.html,v retrieving revision 1.124 diff -c -p -3 -r1.124 index.html *** htdocs/onlinedocs/index.html 22 Mar 2012 09:34:50 - 1.124 --- htdocs/onlinedocs/index.html 22 Mar 2012 23:26:43 - *** *** 64,77 4.7.0 Standard C++ Library Manual /a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-manual.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-manual-single.xml.bz2;XML/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-manual-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/api/;GCC 4.7.0 Standard C++ Library Reference Manual /a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-api.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-api-single.xml.bz2;XML/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-api-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gccgo/;GCCGO 4.7.0 Manual/a (a --- 64,77 4.7.0 Standard C++ Library Manual /a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-manual.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-manual.xml.bz2;XML/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-manual-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/api/;GCC 4.7.0 Standard C++ Library Reference Manual /a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-api.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-api.xml.bz2;XML/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/libstdc++/libstdc++-api-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gccgo/;GCCGO 4.7.0 Manual/a (a *** *** 147,160 4.6.3 Standard C++ Library Manual /a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-manual.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-manual-single.xml.bz2;XML/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-manual-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/;GCC 4.6.3 Standard C++ Library Reference Manual /a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-api.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-api-single.xml.bz2;XML/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-api-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gccgo/;GCCGO 4.6.3 Manual/a (a --- 147,160 4.6.3 Standard C++ Library Manual /a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-manual.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-manual.xml.bz2;XML/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-manual-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/;GCC 4.6.3 Standard C++ Library Reference Manual /a (a href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-api.pdf.bz2;also in PDF/a or a ! href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-api.xml.bz2;XML/a or a href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/libstdc++-api-html.tar.bz2;an HTML tarball/a)/li lia href=http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gccgo/;GCCGO 4.6.3 Manual/a (a 2012-03-22 Benjamin Kosnik b...@redhat.com * htdocs/onlinedocs/index.html: Adjust libstdc++ html index. Index: htdocs/onlinedocs/index.html === RCS file: /cvs/gcc/wwwdocs/htdocs/onlinedocs/index.html,v retrieving revision 1.125 diff -c -p -3 -r1.125 index.html *** htdocs/onlinedocs/index.html 22 Mar 2012 23:30:02 - 1.125 --- htdocs/onlinedocs/index.html 22
[v3] doc xml output names
Simple rename for XML filenames. The -single can be omitted. tested x86/linux -benjamin2012-03-22 Benjamin Kosnik b...@redhat.com * doc/Makefile.am: XML output names have only .xml suffix. * doc/Makefile.in: Regenerate. diff --git a/libstdc++-v3/doc/Makefile.am b/libstdc++-v3/doc/Makefile.am index 0f7b285..95d8513 100644 --- a/libstdc++-v3/doc/Makefile.am +++ b/libstdc++-v3/doc/Makefile.am @@ -1,6 +1,6 @@ ## Makefile for the doc subdirectory of the GNU C++ Standard library. ## -## Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +## Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. ## ## This file is part of the libstdc++ version 3 distribution. ## Process this file with automake to produce Makefile.in. @@ -206,7 +206,7 @@ doc-install-epub: doc-epub # Assumes doxygen, graphviz (with dot), pdflatex installed doxygen_script=${top_srcdir}/scripts/run_doxygen doxygen_outdir = ${glibcxx_builddir}/doc/doxygen -api_xml = ${doxygen_outdir}/xml/libstdc++-api-single.xml +api_xml = ${doxygen_outdir}/xml/libstdc++-api.xml doxygen_pdf = ${doxygen_outdir}/latex/refman.pdf api_pdf = ${doxygen_outdir}/pdf/libstdc++-api.pdf @@ -505,8 +505,8 @@ doc-xml-validate-docbook: $(xml_sources) $(xml_images) # XML, all one page # Some info on canonicalization # http://www.mail-archive.com/help-texinfo@gnu.org/msg00864.html -manual_xml = ${docbook_outdir}/xml/libstdc++-manual-single.xml -set_xml = ${docbook_outdir}/xml/libstdc++-set-single.xml +manual_xml = ${docbook_outdir}/xml/libstdc++-manual.xml +set_xml = ${docbook_outdir}/xml/libstdc++-set.xml stamp-xml-single-docbook: $(xml_sources) ${docbook_outdir}/xml @echo Generating XML single... $(XMLLINT) $(XMLLINT_FLAGS) \
Re: [v3] fix libstdc++/52476
this removes the pb_ds fails exposed by this patch. -benjamin2012-03-19 Benjamin Kosnik b...@redhat.com * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Increment after recursion. * include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Convert node_type markup from brief. diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp index 8370a2e..c5748ec 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -188,7 +188,11 @@ recursive_copy_node(node_const_pointer p_ncp) __try { while (child_it != p_icp-end()) - a_p_children[child_i++] = recursive_copy_node(*(child_it++)); + { + a_p_children[child_i] = recursive_copy_node(*(child_it)); + child_i++; + child_it++; + } p_ret = s_inode_allocator.allocate(1); } __catch(...) diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp index b7eb024..0a763b5 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009, 2011 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2009, 2011, 2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -50,7 +50,11 @@ namespace __gnu_pbds /// Base type for PATRICIA trees. struct pat_trie_base { - /// Three types of nodes. + /** + * @brief Three types of nodes. + * + * i_node is used by _Inode, leaf_node by _Leaf, and head_node by _Head. + */ enum node_type { i_node,
Re: Ping: Re: [patch middle-end]: Fix PR/48814 - [4.4/4.5/4.6/4.7 Regression] Incorrect scalar increment result
On Fri, 16 Mar 2012 11:10:48 +0100 Richard Guenther richard.guent...@gmail.com wrote: On Fri, Mar 16, 2012 at 1:29 AM, Jonathan Wakely jwakely@gmail.com wrote: On 15 March 2012 15:40, Richard Guenther wrote: On Thu, Mar 15, 2012 at 4:22 PM, Kai Tietz ktiet...@googlemail.com wrote: Richard, ping. I think now could be a good time for applying the patch you have for this issue as we are in stage 1. It will still regress the two libstdc++ testcases (well, I guess so at least). Jonathan - you didn't answer my reply to your question? Would it be ok to apply this patch with leaving the regressions in-place, to be investigated by libstdc++ folks? Sorry, I've either forgotten or missed the reply - but if you think the problem is in libstdc++ then certainly go ahead and apply it, I'll investigate the libstdc++ problems (and ask for help if they defeat me!) Ok. I'll do so after re-testing the patch. FYI, here is the patch for the new libstdc++ fails. -benjamin 2012-03-19 Benjamin Kosnik b...@redhat.com * include/ext/pb_ds/detail/pat_trie_/ constructors_destructor_fn_imps.hpp: Increment after recursion. * include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Convert node_type markup from brief. diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp index 8370a2e..c5748ec 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -188,7 +188,11 @@ recursive_copy_node(node_const_pointer p_ncp) __try { while (child_it != p_icp-end()) - a_p_children[child_i++] = recursive_copy_node(*(child_it++)); + { + a_p_children[child_i] = recursive_copy_node(*(child_it)); + child_i++; + child_it++; + } p_ret = s_inode_allocator.allocate(1); } __catch(...) diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp index b7eb024..0a763b5 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009, 2011 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2009, 2011, 2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -50,7 +50,11 @@ namespace __gnu_pbds /// Base type for PATRICIA trees. struct pat_trie_base { - /// Three types of nodes. + /** + * @brief Three types of nodes. + * + * i_node is used by _Inode, leaf_node by _Leaf, and head_node by _Head. + */ enum node_type { i_node,
Re: [v3] libstdc++/51785
... removes extra extern. -benjamin2012-03-02 Benjamin Kosnik b...@redhat.com * include/c_global/cstdio: Remove extraneous extern. * include/c_std/cstdio: Same. diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio index d11743a..e648475 100644 --- a/libstdc++-v3/include/c_global/cstdio +++ b/libstdc++-v3/include/c_global/cstdio @@ -47,7 +47,7 @@ #define _GLIBCXX_CSTDIO 1 #ifndef _GLIBCXX_HAVE_GETS -extern C extern char* gets (char* __s) __attribute__((deprecated)); +extern C char* gets (char* __s) __attribute__((deprecated)); #endif // Get rid of those macros defined in stdio.h in lieu of real functions. diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio index 1588fc9..d4f4732 100644 --- a/libstdc++-v3/include/c_std/cstdio +++ b/libstdc++-v3/include/c_std/cstdio @@ -46,7 +46,7 @@ #include stdio.h #ifndef _GLIBCXX_HAVE_GETS -extern C extern char* gets (char* __s) __attribute__((deprecated)); +extern C char* gets (char* __s) __attribute__((deprecated)); #endif // Get rid of those macros defined in stdio.h in lieu of real functions.
Re: [v3] Update Solaris baselines for GCC 4.7, take 2
I was surprised to see GLIBCXX_3.4.15 symbols added, but then realized you added the complete set so this seems fine. I meant to say: surprised to see GLIBCXX_3.4.16 symbols added, but then you the complete set so this seems fine. So the only added symbols are the complete set of GLIBCXX_3.4.16 and then the usual GLIBCXX_3.4.17 ones. Looks good. -benjamin
[v3] tweak cleanfiles
noticed these bits hanging out after a make clean in testsuite. Fixed. tested x86/linux -benjamin2012-03-01 Benjamin Kosnik b...@redhat.com * testsuite/Makefile.am (CLEANFILES): Add *.gdb. * testsuite/Makefile.in: Regenerate. diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am index e977451..166bd16 100644 --- a/libstdc++-v3/testsuite/Makefile.am +++ b/libstdc++-v3/testsuite/Makefile.am @@ -1,7 +1,7 @@ ## Makefile for the testsuite subdirectory of the GNU C++ Standard library. ## ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -## 2011 Free Software Foundation, Inc. +## 2011, 2012 Free Software Foundation, Inc. ## ## This file is part of the libstdc++ version 3 distribution. ## Process this file with automake to produce Makefile.in. @@ -255,8 +255,8 @@ check-profile: site.exp # By adding these files here, automake will remove them for 'make clean' CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ testsuite_* site.exp abi_check baseline_symbols *TEST* *.dat \ - *.ii *.s *.o *.cc *.x *.a *.so *.xml *.raw *.out + *.ii *.s *.o *.cc *.x *.a *.so *.xml *.raw *.out *.gdb # To remove directories. clean-local: - rm -rf de fr debug parallel profile binaries normal* + rm -rf de fr debug parallel profile binaries normal*
[v3] tweak traits for base classes
After discussions in Kona, some suggestions to refine this trait were proposed, as attached. In addition, there is some documentation which will be checked in later. tested x86/linux -benjamin2012-03-01 Michael Spertus mike_sper...@symantec.com * include/tr2/type_traits (typelist): To __reflection_typelist. (first, rest, empty): Remove. diff --git a/libstdc++-v3/include/tr2/type_traits b/libstdc++-v3/include/tr2/type_traits index 9c301b3..eb8c012 100644 --- a/libstdc++-v3/include/tr2/type_traits +++ b/libstdc++-v3/include/tr2/type_traits @@ -1,6 +1,6 @@ // TR2 type_traits -*- C++ -*- -// Copyright (C) 2011 Free Software Foundation, Inc. +// Copyright (C) 2011, 2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,60 +53,48 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Simple typelist. Compile-time list of types. */ templatetypename... _Elements -struct typelist; +struct __reflection_typelist; /// Specialization for an empty typelist. template -struct typelist +struct __reflection_typelist { - typedef std::true_type empty; + typedef std::true_type empty; }; /// Partial specialization. templatetypename _First, typename... _Rest -struct typelist_First, _Rest... +struct __reflection_typelist_First, _Rest... { - typedef std::false_type empty; + typedef std::false_type empty; struct first { - typedef _First type; + typedef _First type; }; struct rest { - typedef typelist_Rest... type; + typedef __reflection_typelist_Rest... type; }; }; /// Sequence abstraction metafunctions for manipulating a typelist. - /// Return the first type in a typelist. - templatetypename _Tp -struct first : public _Tp::first { }; - - /// Return the typelist minus the first type. - templatetypename _Tp -struct rest : public _Tp::rest { }; - - /// Query to see if a typelist is empty. - templatetypename _Tp -struct empty : public _Tp::empty { }; - /// Enumerate all the base classes of a class. Form of a typelist. templatetypename _Tp struct bases { - typedef typelist__bases(_Tp)... type; + typedef __reflection_typelist__bases(_Tp)... type; }; /// Enumerate all the direct base classes of a class. Form of a typelist. templatetypename _Tp struct direct_bases { - typedef typelist__direct_bases(_Tp)... type; + typedef __reflection_typelist__direct_bases(_Tp)... type; }; /// @} group metaprogramming
[v3] libstdc++/51785
as per the bugzilla log tested x86/linux -benjamin2012-03-01 Benjamin Kosnik b...@redhat.com Ramana Radhakrishnan ram...@gcc.gnu.org PR libstdc++/51785 * acinclude.m4 (GLIBCXX_CHECK_STDIO_PROTO): New. * configure.ac: Call it. * configure: Regenerate. * config.h.in: Same. * config/os/gnu-linux/os_defines.h: Conditionally undefine _GLIBCXX_HAVE_GETS. * include/c_global/cstdio: Conditionally declare deprecated gets. * include/c_std/cstdio: Same. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index fe37a91..56711c0 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1809,6 +1809,35 @@ AC_DEFUN([GLIBCXX_CHECK_STDLIB_PROTO], [ ]) dnl +dnl Check whether required C++ overloads are present in stdio.h. +dnl +AC_DEFUN([GLIBCXX_CHECK_STDIO_PROTO], [ + + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + AC_MSG_CHECKING([for gets declaration]) + AC_CACHE_VAL(glibcxx_cv_gets, [ + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [#include stdio.h + namespace test + { + using ::gets; + } + ])], + [glibcxx_cv_gets=yes], + [glibcxx_cv_gets=no] + )]) + + if test $glibcxx_cv_gets = yes; then +AC_DEFINE(HAVE_GETS, 1, [Define if gets is available in stdio.h.]) + fi + AC_MSG_RESULT($glibcxx_cv_gets) + + AC_LANG_RESTORE +]) + +dnl dnl Check whether macros, etc are present for system_error dnl AC_DEFUN([GLIBCXX_CHECK_SYSTEM_ERROR], [ diff --git a/libstdc++-v3/config/os/gnu-linux/os_defines.h b/libstdc++-v3/config/os/gnu-linux/os_defines.h index c788cb0..c4aa305 100644 --- a/libstdc++-v3/config/os/gnu-linux/os_defines.h +++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h @@ -1,6 +1,6 @@ // Specific definitions for GNU/Linux -*- C++ -*- -// Copyright (C) 2000, 2001, 2002, 2003, 2009, 2010 +// Copyright (C) 2000, 2001, 2002, 2003, 2009, 2010, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -39,4 +39,11 @@ #include features.h +// Provide a declaration for the possibly deprecated gets function, as +// glibc 2.15 and later does not declare gets for ISO C11 when +// __GNU_SOURCE is defined. +#if __GLIBC_PREREQ(2,15) defined(_GNU_SOURCE) +# undef _GLIBCXX_HAVE_GETS +#endif + #endif diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index 49de141..f04563e 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -136,6 +136,7 @@ GLIBCXX_ENABLE_WERROR([yes]) # Checks for operating systems support that doesn't require linking. GLIBCXX_CHECK_MATH_PROTO GLIBCXX_CHECK_STDLIB_PROTO +GLIBCXX_CHECK_STDIO_PROTO GLIBCXX_CHECK_SYSTEM_ERROR # For the streamoff typedef. diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio index 049704d..d11743a 100644 --- a/libstdc++-v3/include/c_global/cstdio +++ b/libstdc++-v3/include/c_global/cstdio @@ -1,7 +1,7 @@ // -*- C++ -*- forwarding header. // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008, 2009, 2010 +// 2006, 2007, 2008, 2009, 2010, 2012 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -46,6 +46,10 @@ #ifndef _GLIBCXX_CSTDIO #define _GLIBCXX_CSTDIO 1 +#ifndef _GLIBCXX_HAVE_GETS +extern C extern char* gets (char* __s) __attribute__((deprecated)); +#endif + // Get rid of those macros defined in stdio.h in lieu of real functions. #undef clearerr #undef fclose @@ -67,7 +71,6 @@ #undef ftell #undef fwrite #undef getc -#undef getchar #undef gets #undef perror #undef printf diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio index 510f599..1588fc9 100644 --- a/libstdc++-v3/include/c_std/cstdio +++ b/libstdc++-v3/include/c_std/cstdio @@ -1,7 +1,7 @@ // -*- C++ -*- forwarding header. // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2009, 2010 Free Software Foundation, Inc. +// 2009, 2010, 2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -45,6 +45,10 @@ #include bits/c++config.h #include stdio.h +#ifndef _GLIBCXX_HAVE_GETS +extern C extern char* gets (char* __s) __attribute__((deprecated)); +#endif + // Get rid of those macros defined in stdio.h in lieu of real functions. #undef clearerr #undef fclose
[v3] libstdc++/52191
as requested. all new symbols should be in new symbol versoning names. With this in, check-abi will now fail if new symbols are inadvertently added to previously-released versions. I'm expecting this to make solaris symbol versioning, as reported by check-abi, fail at first. Then we can conditionalize the failing symbols and add them in the newest version name on solaris, while keeping them in the older places for systems like linux that supported the functionality that added the symbols in earlier gcc releases. That's the plan, at least. tested x86/linux -benjamin2012-02-21 Benjamin Kosnik b...@redhat.com PR libstdc++/52191 * testsuite/util/testsuite_abi.cc (compare_symbols): Check new symbols added into the latest version. Mark tls entities as undesignated. diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.cc b/libstdc++-v3/testsuite/util/testsuite_abi.cc index 8c3b37f..a0294c6 100644 --- a/libstdc++-v3/testsuite/util/testsuite_abi.cc +++ b/libstdc++-v3/testsuite/util/testsuite_abi.cc @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 // Free Software Foundation, Inc. // This library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ using namespace std; -void +void symbol::init(string data) { const char delim = ':'; @@ -119,9 +119,9 @@ symbol::print() const } cout version status: vers endl; - if (version_name.size() + if (version_name.size() (version_status == compatible || version_status == incompatible)) -cout version_name endl; +cout version_name endl; string type_string; switch (type) @@ -142,7 +142,7 @@ symbol::print() const type_string = default; } cout type: type_string endl; - + if (type == object || type == tls) cout type size: size endl; @@ -181,7 +181,7 @@ check_version(symbol test, bool added) known_versions.push_back(GLIBCXX_3.4.1); known_versions.push_back(GLIBCXX_3.4.2); known_versions.push_back(GLIBCXX_3.4.3); - known_versions.push_back(GLIBCXX_3.4.4); + known_versions.push_back(GLIBCXX_3.4.4); known_versions.push_back(GLIBCXX_3.4.5); known_versions.push_back(GLIBCXX_3.4.6); known_versions.push_back(GLIBCXX_3.4.7); @@ -203,10 +203,10 @@ check_version(symbol test, bool added) known_versions.push_back(CXXABI_1.3.2); known_versions.push_back(CXXABI_1.3.3); known_versions.push_back(CXXABI_1.3.4); - known_versions.push_back(CXXABI_TM_1); known_versions.push_back(CXXABI_1.3.5); known_versions.push_back(CXXABI_1.3.6); known_versions.push_back(CXXABI_LDBL_1.3); + known_versions.push_back(CXXABI_TM_1); } compat_list::iterator begin = known_versions.begin(); compat_list::iterator end = known_versions.end(); @@ -220,13 +220,12 @@ check_version(symbol test, bool added) test.version_status = symbol::compatible; else test.version_status = symbol::incompatible; - - // Check that added symbols aren't added in the base versions. - if (added - (test.version_name == known_versions[0] - || test.version_name == CXXABI_1.3 - || test.version_name == GLIBCXX_LDBL_3.4 - || test.version_name == CXXABI_LDBL_1.3)) + + // Check that added symbols are added in the latest pre-release version. + bool latestp = (test.version_name == GLIBCXX_3.4.17 + || test.version_name == CXXABI_1.3.6 + || test.version_name == CXXABI_TM_1); + if (added !latestp) test.version_status = symbol::incompatible; // Check that long double compatibility symbols demangled as @@ -241,8 +240,8 @@ check_version(symbol test, bool added) // Check for weak label. if (it1 == end it2 == end) test.version_status = symbol::incompatible; - - // Check that + + // Check that // GLIBCXX_3.4 // GLIBCXX_3.4.5 // version as compatible @@ -263,7 +262,7 @@ check_version(symbol test, bool added) return test.version_status == symbol::compatible; } -bool +bool check_compatible(symbol lhs, symbol rhs, bool verbose) { bool ret = true; @@ -276,7 +275,7 @@ check_compatible(symbol lhs, symbol rhs, bool verbose) if (verbose) cout tab incompatible types endl; } - + if (lhs.name != rhs.name) { ret = false; @@ -295,7 +294,7 @@ check_compatible(symbol lhs, symbol rhs, bool verbose) } } - if (lhs.version_name != rhs.version_name + if (lhs.version_name != rhs.version_name !check_version(lhs) !check_version(rhs)) { ret = false; @@ -334,7 +333,7 @@ get_symbol(const string name, const symbols s) } } -void +void examine_symbol(const char* name, const char* file) { try @@ -348,7 +347,7 @@ examine_symbol(const char* name, const char* file) } int -compare_symbols(const char* baseline_file,
[v3] doxgen version update
Debugging pdf output on current linux indicates that the long-standing PDF_HYPERLINKS issue turns out to just be a pool_size limitation in TeX, which can be worked around by increasing pool size. Document. tested x86_64/linux -benjamin 2012-02-07 Benjamin Kosnik b...@redhat.com * doc/doxygen/user.cfg.in: Update to doxygen 1.7.6.1. * doc/xml/manual/documentation_hacking.xml: Update. diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index adb8c7f..af667b5 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -1,4 +1,4 @@ -# Doxyfile 1.7.4 +# Doxyfile 1.7.6.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -22,8 +22,9 @@ DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. PROJECT_NAME = libstdc++ @@ -196,6 +197,13 @@ ALIASES= doctodo=@todo\nNeeds documentation! See http://gcc.gnu headername{1}=Instead, include \1. \ headername{2}=Instead, include \1 or \2. +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form name=value. For example adding +# class=itcl::class will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list @@ -285,6 +293,15 @@ SUBGROUPING= YES INLINE_GROUPED_CLASSES = NO +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct @@ -307,10 +324,21 @@ TYPEDEF_HIDES_STRUCT = NO # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols +# corresponding to a cache size of 2^16 = 65536 symbols. SYMBOL_CACHE_SIZE = 0 +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 0 + #--- # Build related configuration options #--- @@ -552,6 +580,16 @@ FILE_VERSION_FILTER= LAYOUT_FILE= +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + #--- # configuration options related to warning and progress messages #--- @@ -805,13 +843,15 @@ FILE_PATTERNS = *.h \ RECURSIVE = NO -# The EXCLUDE tag can be used to specify files and/or directories that should +# The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from