summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.MELT3
-rw-r--r--MAINTAINERS1
-rw-r--r--config/ChangeLog10
-rw-r--r--config/largefile.m429
-rw-r--r--gcc/ChangeLog174
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/gcc-interface/decl.c70
-rw-r--r--gcc/builtins.c22
-rw-r--r--gcc/calls.c3
-rw-r--r--gcc/cfgrtl.c2
-rw-r--r--gcc/cgraphbuild.c6
-rw-r--r--gcc/collect2.c16
-rw-r--r--gcc/config.gcc2
-rw-r--r--gcc/config.in6
-rw-r--r--gcc/config/arm/arm.c147
-rw-r--r--gcc/config/arm/arm.h11
-rw-r--r--gcc/config/arm/arm.md28
-rw-r--r--gcc/config/arm/constraints.md11
-rw-r--r--gcc/config/arm/vfp.md172
-rw-r--r--gcc/config/i386/cygwin.h2
-rw-r--r--gcc/config/i386/i386.c22
-rw-r--r--gcc/config/i386/sse.md170
-rw-r--r--gcc/config/openbsd-stdint.h12
-rwxr-xr-xgcc/configure61
-rw-r--r--gcc/configure.ac11
-rw-r--r--gcc/cp/ChangeLog57
-rw-r--r--gcc/cp/call.c5
-rw-r--r--gcc/cp/class.c3
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/cp/cxx-pretty-print.c6
-rw-r--r--gcc/cp/decl.c20
-rw-r--r--gcc/cp/decl2.c16
-rw-r--r--gcc/cp/error.c14
-rw-r--r--gcc/cp/parser.c65
-rw-r--r--gcc/cp/pt.c29
-rw-r--r--gcc/cp/tree.c9
-rw-r--r--gcc/dce.c8
-rw-r--r--gcc/df-core.c2
-rw-r--r--gcc/df-problems.c52
-rw-r--r--gcc/df.h1
-rw-r--r--gcc/doc/extend.texi5
-rw-r--r--gcc/doc/invoke.texi10
-rw-r--r--gcc/doc/passes.texi9
-rw-r--r--gcc/except.c2
-rw-r--r--gcc/exec-tool.in9
-rw-r--r--gcc/fortran/ChangeLog10
-rw-r--r--gcc/fortran/resolve.c7
-rw-r--r--gcc/function.c4
-rw-r--r--gcc/gcse.c2
-rw-r--r--gcc/gdbinit.in9
-rw-r--r--gcc/genautomata.c3
-rw-r--r--gcc/loop-invariant.c2
-rw-r--r--gcc/passes.c22
-rw-r--r--gcc/predict.c2
-rw-r--r--gcc/reg-stack.c2
-rw-r--r--gcc/stack-ptr-mod.c2
-rw-r--r--gcc/testsuite/ChangeLog88
-rw-r--r--gcc/testsuite/g++.dg/abi/regparm1.C51
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/typedef-init.C8
-rw-r--r--gcc/testsuite/g++.dg/ext/typeof11.C18
-rw-r--r--gcc/testsuite/g++.dg/lookup/hidden-class1.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/hidden-class10.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/hidden-class5.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/hidden-class7.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/hidden-temp-class1.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/hidden-temp-class4.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/hidden-temp-class7.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/strong-using-2.C2
-rw-r--r--gcc/testsuite/g++.dg/other/typedef1.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/access10.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/constructor1.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/crash38.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/error3.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/error36.C33
-rw-r--r--gcc/testsuite/g++.dg/parse/typespec1.C2
-rw-r--r--gcc/testsuite/g++.dg/template/conv10.C9
-rw-r--r--gcc/testsuite/g++.dg/template/error26.C2
-rw-r--r--gcc/testsuite/g++.dg/template/ref4.C12
-rw-r--r--gcc/testsuite/g++.dg/template/typedef5.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/typename1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typename3.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typename4.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/typename6.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb94.C2
-rw-r--r--gcc/testsuite/gcc.dg/pr40946.c33
-rw-r--r--gcc/testsuite/gcc.dg/pr41643.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-escape-1.c34
-rw-r--r--gcc/testsuite/gcc.target/i386/pr41985.c11
-rw-r--r--gcc/testsuite/gfortran.dg/pr41928.f90263
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_check_15.f9012
-rw-r--r--gcc/testsuite/gnat.dg/rep_clause4.adb34
-rw-r--r--gcc/tree-cfg.c4
-rw-r--r--gcc/tree-dfa.c2
-rw-r--r--gcc/tree-optimize.c8
-rw-r--r--gcc/tree-ssa-loop.c2
-rw-r--r--gcc/tree-ssa-structalias.c40
-rw-r--r--gcc/tree-ssa.c4
-rw-r--r--gcc/tree.c5
-rw-r--r--libstdc++-v3/ChangeLog108
-rwxr-xr-xlibstdc++-v3/configure24
-rw-r--r--libstdc++-v3/doc/doxygen/doxygroups.cc7
-rw-r--r--libstdc++-v3/doc/doxygen/user.cfg.in1431
-rw-r--r--libstdc++-v3/include/Makefile.am1
-rw-r--r--libstdc++-v3/include/Makefile.in1
-rw-r--r--libstdc++-v3/include/bits/shared_ptr.h1366
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_base.h1114
-rw-r--r--libstdc++-v3/include/bits/stl_algobase.h6
-rw-r--r--libstdc++-v3/include/bits/stl_iterator.h63
-rw-r--r--libstdc++-v3/include/bits/stl_iterator_base_types.h12
-rw-r--r--libstdc++-v3/include/bits/stl_tempbuf.h4
-rw-r--r--libstdc++-v3/include/bits/stream_iterator.h7
-rw-r--r--libstdc++-v3/include/bits/streambuf_iterator.h7
-rw-r--r--libstdc++-v3/include/c_global/cassert2
-rw-r--r--libstdc++-v3/include/c_global/cctype2
-rw-r--r--libstdc++-v3/include/c_global/cerrno2
-rw-r--r--libstdc++-v3/include/c_global/cfloat2
-rw-r--r--libstdc++-v3/include/c_global/ciso6462
-rw-r--r--libstdc++-v3/include/c_global/climits2
-rw-r--r--libstdc++-v3/include/c_global/clocale2
-rw-r--r--libstdc++-v3/include/c_global/cmath2
-rw-r--r--libstdc++-v3/include/c_global/csetjmp2
-rw-r--r--libstdc++-v3/include/c_global/csignal2
-rw-r--r--libstdc++-v3/include/c_global/cstdarg2
-rw-r--r--libstdc++-v3/include/c_global/cstdatomic2
-rw-r--r--libstdc++-v3/include/c_global/cstddef2
-rw-r--r--libstdc++-v3/include/c_global/cstdio2
-rw-r--r--libstdc++-v3/include/c_global/cstdlib2
-rw-r--r--libstdc++-v3/include/c_global/cstring2
-rw-r--r--libstdc++-v3/include/c_global/ctime2
-rw-r--r--libstdc++-v3/include/c_global/cwchar2
-rw-r--r--libstdc++-v3/include/c_global/cwctype2
-rw-r--r--libstdc++-v3/include/ext/sso_string_base.h2
-rw-r--r--libstdc++-v3/include/parallel/balanced_quicksort.h11
-rw-r--r--libstdc++-v3/include/parallel/base.h18
-rw-r--r--libstdc++-v3/include/parallel/checkers.h6
-rw-r--r--libstdc++-v3/include/parallel/compatibility.h12
-rw-r--r--libstdc++-v3/include/parallel/equally_split.h2
-rw-r--r--libstdc++-v3/include/parallel/for_each.h2
-rw-r--r--libstdc++-v3/include/parallel/list_partition.h13
-rw-r--r--libstdc++-v3/include/parallel/merge.h24
-rw-r--r--libstdc++-v3/include/parallel/multiseq_selection.h108
-rw-r--r--libstdc++-v3/include/parallel/multiway_merge.h71
-rw-r--r--libstdc++-v3/include/parallel/multiway_mergesort.h12
-rw-r--r--libstdc++-v3/include/parallel/partial_sum.h2
-rw-r--r--libstdc++-v3/include/parallel/partition.h10
-rw-r--r--libstdc++-v3/include/parallel/queue.h2
-rw-r--r--libstdc++-v3/include/parallel/random_number.h4
-rw-r--r--libstdc++-v3/include/parallel/random_shuffle.h2
-rw-r--r--libstdc++-v3/include/parallel/set_operations.h4
-rw-r--r--libstdc++-v3/include/parallel/unique_copy.h6
-rw-r--r--libstdc++-v3/include/parallel/workstealing.h2
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_hashtable_size.h2
-rw-r--r--libstdc++-v3/include/profile/impl/profiler_state.h2
-rw-r--r--libstdc++-v3/include/std/iosfwd59
-rw-r--r--libstdc++-v3/include/std/limits16
-rw-r--r--libstdc++-v3/include/std/memory28
-rw-r--r--libstdc++-v3/include/std/sstream4
-rw-r--r--libstdc++-v3/include/std/streambuf28
-rw-r--r--libstdc++-v3/include/std/type_traits5
-rw-r--r--libstdc++-v3/include/std/utility16
-rw-r--r--libstdc++-v3/include/tr1/shared_ptr.h82
-rw-r--r--libstdc++-v3/include/tr1_impl/boost_sp_counted_base.h4
-rw-r--r--libstdc++-v3/include/tr1_impl/regex18
-rw-r--r--libstdc++-v3/include/tr1_impl/type_traits1
-rw-r--r--libstdc++-v3/libsupc++/cxxabi.h29
-rw-r--r--libstdc++-v3/libsupc++/eh_ptr.cc61
-rw-r--r--libstdc++-v3/libsupc++/exception9
-rw-r--r--libstdc++-v3/libsupc++/exception_ptr.h38
-rw-r--r--libstdc++-v3/libsupc++/guard.cc14
-rw-r--r--libstdc++-v3/libsupc++/nested_exception.h39
-rw-r--r--libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc4
-rw-r--r--libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc4
175 files changed, 4200 insertions, 2910 deletions
diff --git a/ChangeLog b/ChangeLog
index 600e9149f73..7b1a8be2929 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-09 Jon Beniston <jon@beniston.com>
+
+ * MAINTAINERS (Write After Approval): Add myself.
+
2009-11-06 Ozkan Sezer <sezeroz@gmail.com>
* configure.ac (FLAGS_FOR_TARGET): Add -L and -isystem
diff --git a/ChangeLog.MELT b/ChangeLog.MELT
index 72fb1bc4b7f..7d0b1f74c83 100644
--- a/ChangeLog.MELT
+++ b/ChangeLog.MELT
@@ -1,3 +1,6 @@
+2009-11-10 Basile Starynkevitch <basile@starynkevitch.net>
+ MELT branch merged with trunk rev 154058
+
2009-11-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 153975
diff --git a/MAINTAINERS b/MAINTAINERS
index 033eb896c23..dccf387c8ff 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -290,6 +290,7 @@ Simon Baldwin simonb@google.com
Scott Bambrough scottb@netwinder.org
Wolfgang Bangerth bangerth@dealii.org
Andrey Belevantsev abel@ispras.ru
+Jon Beniston jon@beniston.com
Peter Bergner bergner@vnet.ibm.com
Jan Beulich jbeulich@novell.com
David Billinghurst David.Billinghurst@riotinto.com
diff --git a/config/ChangeLog b/config/ChangeLog
index 4d50df66bbe..7b6ded03d52 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,13 @@
+2009-11-09 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * largefile.m4 (ACX_LARGEFILE): Call AC_PLUGINS.
+
+2009-11-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Joel Brobecker <brobecker@adacore.com>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ * largefile.m4: New file.
+
2009-10-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* acx.m4 (ACX_CHECK_CYGWIN_CAT_WORKS): Use = with test.
diff --git a/config/largefile.m4 b/config/largefile.m4
new file mode 100644
index 00000000000..9449b12dca4
--- /dev/null
+++ b/config/largefile.m4
@@ -0,0 +1,29 @@
+# This macro wraps AC_SYS_LARGEFILE with one exception for Solaris.
+# PR 9992/binutils: We have to replicate everywhere the behaviour of
+# bfd's configure script so that all the directories agree on the size
+# of structures used to describe files.
+
+AC_DEFUN([ACX_LARGEFILE],[dnl
+
+# As the $enable_largefile decision depends on --enable-plugins we must set it
+# even in directories otherwise not depending on the $plugins option.
+
+AC_PLUGINS
+
+case "${host}" in
+changequote(,)dnl
+ sparc-*-solaris*|i[3-7]86-*-solaris*)
+changequote([,])dnl
+ # On native 32bit sparc and ia32 solaris, large-file and procfs support
+ # are mutually exclusive; and without procfs support, the bfd/ elf module
+ # cannot provide certain routines such as elfcore_write_prpsinfo
+ # or elfcore_write_prstatus. So unless the user explicitly requested
+ # large-file support through the --enable-largefile switch, disable
+ # large-file support in favor of procfs support.
+ test "${target}" = "${host}" -a "x$plugins" = xno \
+ && : ${enable_largefile="no"}
+ ;;
+esac
+
+AC_SYS_LARGEFILE
+])
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d0df7de35ed..f21b99288c7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,170 @@
+2009-11-09 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ * config/i386/cygwin.h (LINK_SPEC): Add -tsaware flag if !mno-cygwin.
+
+2009-11-09 Jason Merrill <jason@redhat.com>
+
+ * gdbinit.in (pgq): New function for printing gimple sequence.
+
+2009-11-09 Paul Brook <paul@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ * doc/extend.texi (Half-Precision): Update wording to reflect
+ that there are now multiple -mfpu options that enable fp16
+ hardware support.
+ * doc/invoke.texi: Update list of ARM -mfpu= options.
+ * config.gcc: Update ARM --with-fpu option list.
+ * config/arm/arm.c (all_fpus): Add vfpv3-fp16, vfpv3-d16-fp16,
+ vfpv3xd and vfpv3xd-fp16.
+ (use_vfp_abi): New function.
+ (aapcs_vfp_is_call_or_return_candidate): Avoid double precision regs
+ when undesirable.
+ (aapcs_vfp_is_return_candidate, aapcs_vfp_is_call_candidate,
+ aapcs_vfp_allocate_return_reg): Use use_vfp_abi.
+ (arm_rtx_costs_1, arm_size_rtx_costs, arm_fastmul_rtx_costs,
+ arm_9e_rtx_costs): Only expect double-precision operations if the FPU
+ provides them.
+ (coproc_secondary_reload_class): Reload HFmode via GENERAL_REGS if no
+ NEON.
+ (arm_print_operand): Handle 'p' modifier.
+ (arm_hard_regno_mode_ok): : Allow HFmode in VFP registers if
+ TARGET_FP16.
+ * config/arm/arm.h (TARGET_VFP_SINGLE, TARGET_VFP_DOUBLE): Define.
+ (TARGET_FP16): Define.
+ * config/arm/vfp.md: Disable double-precision patterns if the FPU
+ does not provide them.
+ (arm_movdi_vfp, thumb2_movdi_vfp): Use fcpys to move
+ double-precision values on a single-precision FPU.
+ (movdf_vfp, thumb2_movdf_vfp): Likewise. Use "Dy" for
+ double-precision constants.
+ (movhf_vfp_neon): New pattern (was movhf_vfp).
+ (movhf_vfp): Remove NEON instructions.
+ * config/arm/constraints.md: Add new "Dy" constraint for
+ double-precision constants. Update description of "Dv".
+ * config/arm/arm.md: Disable double-precision patterns if the FPU
+ does not provide them
+
+2009-11-09 Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/i386.c (print_operand) <case 'D'>: Fix formatting.
+ (print_operand) <case 'Y'>: Likewise. Fix a pasto in operand lossage
+ diagnostics.
+
+2009-11-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * collect2.c (main): Search PLUGIN_LD for plugin linker.
+
+ * configure.ac (--with-plugin-ld): New. Default to ld.
+ * configure: Regenerated.
+ * config.in: Likewise.
+
+ * exec-tool.in (ORIGINAL_PLUGIN_LD_FOR_TARGET): New.
+ (collect-ld): Use ORIGINAL_PLUGIN_LD_FOR_TARGET for -plugin.
+
+2009-11-08 Jonathan Gray <jsg@openbsd.org>
+
+ * config/openbsd-stdint.h: Change to reflect what
+ c_common_nodes_and_builtins expects.
+
+2009-11-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * builtins.c (apply_args_reg_offset): Remove commented out delaration.
+
+2009-11-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/41985
+ * config/i386/i386.c (get_some_local_dynamic_name): Don't assert
+ function contains at least one local dynamic name.
+ (print_operand) <case '&'>: Instead output operand lossage diagnostics
+ here if that happens.
+
+2009-11-08 Zbigniew Chamski <zbigniew.chamski@gmail.com>
+ Joern Rennecke <amylaar@spamcop.net>
+
+ * cfgrtl.c (pass_free_cfg): Add pass name.
+ * cgraphbuild.c (pass_build_cgraph_edges): Likewise.
+ (pass_rebuild_cgraph_edges, pass_remove_cgraph_callee_edges): Likewise.
+ * dce.c (pass_ud_rtl_dce, pass_fast_rtl_dce): Change pass name.
+ * df-core.c (pass_df_initialize_no_opt): Likewise.
+ * except.c (pass_rtl_eh): Likewise.
+ * function.c (pass_init_function, pass_leaf_regs): Likewise.
+ * gcse.c (pass_rtl_pre): Change pass name.
+ * passes.c (pass_postreload): Add pass name.
+ (make_pass_instance): Don't use duplicate-tracking logic for
+ names starting with '*'.
+ (next_pass_1): Assert that pass has a name.
+ (register_one_dump_file): If there is an space in the name,
+ skip past it.
+ * predict.c (pass_strip_predict_hints): Add pass name.
+ * reg-stack.c (pass_stack_regs): Likewise.
+ * stack-ptr-mod.c (pass_stack_ptr_mod): Likewise.
+ * tree-cfg.c (pass_warn_function_return,
+ pass_warn_function_noreturn): Add pass name.
+ * tree-dfa.c (pass_referenced_vars): Likewise.
+ * tree-optimize.c (pass_cleanup_cfg_post_optimizing):
+ Fix whitespace before comment.
+ (pass_fixup_cfg): Add pass name, fix whitespace before comment.
+ (pass_init_datastructures): Add pass name.
+ * tree-ssa-loop.c (pass_record_bounds): Likewise.
+ * tree-ssa.c (pass_early_warn_uninitialized,
+ pass_late_warn_uninitialized): Likewise.
+ * tree.c (pass_ipa_free_lang_data): Likewise.
+ * doc/passes.texi (pass manager): Document how to disambiguate
+ pass names.
+
+2009-11-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * df-problems.c: Fix documentation for forward simulation of LR.
+ (df_simulate_one_insn_forwards): Use df_simulate_find_defs.
+ (df_simulate_finalize_forwards): Remove.
+ * df.h (df_simulate_finalize_forwards): Remove.
+
+2009-11-08 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-structalias.c (build_succ_graph): Properly make
+ variables escape if they are stored to anything.
+
+2009-11-08 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/41928
+ * loop-invariant.c (free_loop_data): If we didn't allocate
+ loop data do not try to free it.
+
+2009-11-07 Jason Merrill <jason@redhat.com>
+
+ * tree.c (reconstruct_complex_type): Preserve attributes.
+
+2009-11-07 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-structalias.c (build_succ_graph): Feed stores
+ to anything only to variables that can take pointers.
+ (get_constraint_for_ssa_var): Properly exclude full
+ variables from expanding.
+ (first_vi_for_offset): Avoid overflow in arithmetic.
+ (first_or_preceding_vi_for_offset): Likewise.
+ (count_num_arguments): Fix implementation.
+ (gate_ipa_pta): Do not run when not optimizing.
+
+2009-11-07 David Binderman <dcb314@hotmail.com>
+
+ * builtins.c (apply_args_size, expand_builtin_mathfn, expand_powi,
+ expand_builtin_expect, maybe_emit_sprintf_chk_warning): Remove some
+ set but not used variables.
+ (apply_args_reg_offset): Comment out as unused.
+ * calls.c (flags_from_decl_or_type): Likewise.
+ * genautomata.c (check_regexp_units_distribution): Likewise.
+
+2009-11-07 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/sse.md (xop_pmacsww, xop_pmacssww, xop_pmacsdd,
+ xop_pmacssdd, xop_pmacssdql, xop_pmacssdqh, xop_pmacsdql,
+ *xop_pmacsdql_mem, xop_pmacsdqh, *xop_pmacsdqh_mem, xop_pmacsswd,
+ xop_pmacswd, xop_pmadcsswd, xop_pmadcswd, xop_pcmov_<mode>,
+ xop_pcmov_<mode>256, xop_pperm, xop_pperm_pack_v2di_v4si,
+ xop_pperm_pack_v4si_v8hi, xop_pperm_pack_v8hi_v16qi): Compress
+ operand alternatives.
+
2009-11-06 Michael Matz <matz@suse.de>
PR middle-end/41963
@@ -166,8 +333,7 @@
(xop_pcmov_<mode>): Add XOP conditional mov instructions.
* config/i386/i386.c (OPTION_MASK_ISA_XOP_SET): New.
(OPTION_MASK_ISA_XOP_UNSET): New.
- (OPTION_MASK_ISA_XOP_UNSET): Change definition to
- depend on XOP.
+ (OPTION_MASK_ISA_XOP_UNSET): Change definition to depend on XOP.
(ix86_handle_option): Handle -mxop.
(isa_opts): Handle -mxop.
(enum pta_flags): Add PTA_XOP.
@@ -584,8 +750,8 @@
2009-11-03 Dodji Seketeli <dodji@redhat.com>
PR c++/38699
- * c-common.c (fold_offsetof_1): Issue errors when the member designator
- of the offsetof expression is not legitimate.
+ * c-common.c (fold_offsetof_1): Issue errors when the member
+ designator of the offsetof expression is not legitimate.
2009-11-03 Uros Bizjak <ubizjak@gmail.com>
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 459615d7a95..f9a2f77cfa0 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20091106
+20091110
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 8c98429a2f3..41a0d07c3c1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2009-11-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (make_packable_type): Fix oversight.
+ (gnat_to_gnu_field): Do not attempt to change the form of the type
+ if the field requires strict alignment. Always change the form of
+ the type if the specified size is smaller than its size.
+
2009-11-05 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (gnat_type_for_mode): Handle vector modes.
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index c4d5e26582a..9e643a3108b 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -6052,6 +6052,7 @@ make_packable_type (tree type, bool in_record)
{
TYPE_SIZE (new_type) = TYPE_SIZE (type);
TYPE_SIZE_UNIT (new_type) = TYPE_SIZE_UNIT (type);
+ new_size = size;
}
else
{
@@ -6449,67 +6450,44 @@ gnat_to_gnu_field (Entity_Id gnat_field, tree gnu_record_type, int packed,
else
gnu_size = NULL_TREE;
- /* If we have a specified size that's smaller than that of the field type,
- or a position is specified, and the field type is a record, see if we can
- get either an integral mode form of the type or a smaller form. If we
- can, show a size was specified for the field if there wasn't one already,
- so we know to make this a bitfield and avoid making things wider.
+ /* If we have a specified size that is smaller than that of the field's type,
+ or a position is specified, and the field's type is a record that doesn't
+ require strict alignment, see if we can get either an integral mode form
+ of the type or a smaller form. If we can, show a size was specified for
+ the field if there wasn't one already, so we know to make this a bitfield
+ and avoid making things wider.
- Doing this is first useful if the record is packed because we may then
- place the field at a non-byte-aligned position and so achieve tighter
- packing.
+ Changing to an integral mode form is useful when the record is packed as
+ we can then place the field at a non-byte-aligned position and so achieve
+ tighter packing. This is in addition required if the field shares a byte
+ with another field and the front-end lets the back-end handle the access
+ to the field, because GCC cannot handle non-byte-aligned BLKmode fields.
- This is in addition *required* if the field shares a byte with another
- field and the front-end lets the back-end handle the references, because
- GCC does not handle BLKmode bitfields properly.
+ Changing to a smaller form is required if the specified size is smaller
+ than that of the field's type and the type contains sub-fields that are
+ padded, in order to avoid generating accesses to these sub-fields that
+ are wider than the field.
We avoid the transformation if it is not required or potentially useful,
as it might entail an increase of the field's alignment and have ripple
effects on the outer record type. A typical case is a field known to be
- byte aligned and not to share a byte with another field.
-
- Besides, we don't even look the possibility of a transformation in cases
- known to be in error already, for instance when an invalid size results
- from a component clause. */
-
- if (TREE_CODE (gnu_field_type) == RECORD_TYPE
+ byte-aligned and not to share a byte with another field. */
+ if (!needs_strict_alignment
+ && TREE_CODE (gnu_field_type) == RECORD_TYPE
&& !TYPE_FAT_POINTER_P (gnu_field_type)
&& host_integerp (TYPE_SIZE (gnu_field_type), 1)
&& (packed == 1
|| (gnu_size
&& (tree_int_cst_lt (gnu_size, TYPE_SIZE (gnu_field_type))
- || Present (Component_Clause (gnat_field))))))
+ || (Present (Component_Clause (gnat_field))
+ && !(UI_To_Int (Component_Bit_Offset (gnat_field))
+ % BITS_PER_UNIT == 0
+ && value_factor_p (gnu_size, BITS_PER_UNIT)))))))
{
- /* See what the alternate type and size would be. */
tree gnu_packable_type = make_packable_type (gnu_field_type, true);
-
- bool has_byte_aligned_clause
- = Present (Component_Clause (gnat_field))
- && (UI_To_Int (Component_Bit_Offset (gnat_field))
- % BITS_PER_UNIT == 0);
-
- /* Compute whether we should avoid the substitution. */
- bool reject
- /* There is no point substituting if there is no change... */
- = (gnu_packable_type == gnu_field_type)
- /* ... nor when the field is known to be byte aligned and not to
- share a byte with another field. */
- || (has_byte_aligned_clause
- && value_factor_p (gnu_size, BITS_PER_UNIT))
- /* The size of an aliased field must be an exact multiple of the
- type's alignment, which the substitution might increase. Reject
- substitutions that would so invalidate a component clause when the
- specified position is byte aligned, as the change would have no
- real benefit from the packing standpoint anyway. */
- || (Is_Aliased (gnat_field)
- && has_byte_aligned_clause
- && !value_factor_p (gnu_size, TYPE_ALIGN (gnu_packable_type)));
-
- /* Substitute unless told otherwise. */
- if (!reject)
+ if (gnu_packable_type != gnu_field_type)
{
gnu_field_type = gnu_packable_type;
-
if (!gnu_size)
gnu_size = rm_size (gnu_field_type);
}
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 0cb2bd7fb4e..62a39a6ae86 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1259,12 +1259,6 @@ static enum machine_mode apply_args_mode[FIRST_PSEUDO_REGISTER];
INCOMING_REGNO gives the corresponding inbound register. */
static enum machine_mode apply_result_mode[FIRST_PSEUDO_REGISTER];
-/* For each register that may be used for calling a function, this
- gives the offset of that register into the block returned by
- __builtin_apply_args. 0 indicates that the register is not
- used for calling a function. */
-static int apply_args_reg_offset[FIRST_PSEUDO_REGISTER];
-
/* Return the size required for the block returned by __builtin_apply_args,
and initialize apply_args_mode. */
@@ -1297,14 +1291,12 @@ apply_args_size (void)
align = GET_MODE_ALIGNMENT (mode) / BITS_PER_UNIT;
if (size % align != 0)
size = CEIL (size, align) * align;
- apply_args_reg_offset[regno] = size;
size += GET_MODE_SIZE (mode);
apply_args_mode[regno] = mode;
}
else
{
apply_args_mode[regno] = VOIDmode;
- apply_args_reg_offset[regno] = 0;
}
}
return size;
@@ -1924,7 +1916,7 @@ static rtx
expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
{
optab builtin_optab;
- rtx op0, insns, before_call;
+ rtx op0, insns;
tree fndecl = get_callee_fndecl (exp);
enum machine_mode mode;
bool errno_set = false;
@@ -2031,8 +2023,6 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
end_sequence ();
}
- before_call = get_last_insn ();
-
return expand_call (exp, target, target == const0_rtx);
}
@@ -2903,15 +2893,12 @@ expand_powi_1 (enum machine_mode mode, unsigned HOST_WIDE_INT n, rtx *cache)
static rtx
expand_powi (rtx x, enum machine_mode mode, HOST_WIDE_INT n)
{
- unsigned HOST_WIDE_INT val;
rtx cache[POWI_TABLE_SIZE];
rtx result;
if (n == 0)
return CONST1_RTX (mode);
- val = (n < 0) ? -n : n;
-
memset (cache, 0, sizeof (cache));
cache[1] = x;
@@ -4893,12 +4880,11 @@ expand_builtin_unop (enum machine_mode target_mode, tree exp, rtx target,
static rtx
expand_builtin_expect (tree exp, rtx target)
{
- tree arg, c;
+ tree arg;
if (call_expr_nargs (exp) < 2)
return const0_rtx;
arg = CALL_EXPR_ARG (exp, 0);
- c = CALL_EXPR_ARG (exp, 1);
target = expand_expr (arg, target, VOIDmode, EXPAND_NORMAL);
/* When guessing was done, the hints should be already stripped away. */
@@ -12140,7 +12126,7 @@ maybe_emit_chk_warning (tree exp, enum built_in_function fcode)
static void
maybe_emit_sprintf_chk_warning (tree exp, enum built_in_function fcode)
{
- tree dest, size, len, fmt, flag;
+ tree size, len, fmt;
const char *fmt_str;
int nargs = call_expr_nargs (exp);
@@ -12148,8 +12134,6 @@ maybe_emit_sprintf_chk_warning (tree exp, enum built_in_function fcode)
if (nargs < 4)
return;
- dest = CALL_EXPR_ARG (exp, 0);
- flag = CALL_EXPR_ARG (exp, 1);
size = CALL_EXPR_ARG (exp, 2);
fmt = CALL_EXPR_ARG (exp, 3);
diff --git a/gcc/calls.c b/gcc/calls.c
index 13167a620a4..5528ab9fbeb 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -589,12 +589,9 @@ int
flags_from_decl_or_type (const_tree exp)
{
int flags = 0;
- const_tree type = exp;
if (DECL_P (exp))
{
- type = TREE_TYPE (exp);
-
/* The function exp may have the `malloc' attribute. */
if (DECL_IS_MALLOC (exp))
flags |= ECF_MALLOC;
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 4146b146977..73aebf07844 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -433,7 +433,7 @@ struct rtl_opt_pass pass_free_cfg =
{
{
RTL_PASS,
- NULL, /* name */
+ "*free_cfg", /* name */
NULL, /* gate */
rest_of_pass_free_cfg, /* execute */
NULL, /* sub */
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index 65e3d67e14c..8423c36b880 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -205,7 +205,7 @@ struct gimple_opt_pass pass_build_cgraph_edges =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*build_cgraph_edges", /* name */
NULL, /* gate */
build_cgraph_edges, /* execute */
NULL, /* sub */
@@ -270,7 +270,7 @@ struct gimple_opt_pass pass_rebuild_cgraph_edges =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*rebuild_cgraph_edges", /* name */
NULL, /* gate */
rebuild_cgraph_edges, /* execute */
NULL, /* sub */
@@ -297,7 +297,7 @@ struct gimple_opt_pass pass_remove_cgraph_callee_edges =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*remove_cgraph_callee_edges", /* name */
NULL, /* gate */
remove_cgraph_callee_edges, /* execute */
NULL, /* sub */
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 03300f3c79b..b259f09333f 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -1100,6 +1100,7 @@ int
main (int argc, char **argv)
{
static const char *const ld_suffix = "ld";
+ static const char *const plugin_ld_suffix = PLUGIN_LD;
static const char *const real_ld_suffix = "real-ld";
static const char *const collect_ld_suffix = "collect-ld";
static const char *const nm_suffix = "nm";
@@ -1118,6 +1119,8 @@ main (int argc, char **argv)
const char *const full_ld_suffix =
concat(target_machine, "-", ld_suffix, NULL);
+ const char *const full_plugin_ld_suffix =
+ concat(target_machine, "-", plugin_ld_suffix, NULL);
const char *const full_nm_suffix =
concat (target_machine, "-", nm_suffix, NULL);
const char *const full_gnm_suffix =
@@ -1132,6 +1135,7 @@ main (int argc, char **argv)
concat (target_machine, "-", gstrip_suffix, NULL);
#else
const char *const full_ld_suffix = ld_suffix;
+ const char *const full_plugin_ld_suffix = plugin_ld_suffix;
const char *const full_nm_suffix = nm_suffix;
const char *const full_gnm_suffix = gnm_suffix;
#ifdef LDD_SUFFIX
@@ -1152,6 +1156,7 @@ main (int argc, char **argv)
const char **c_ptr;
char **ld1_argv;
const char **ld1;
+ bool use_plugin = false;
/* The kinds of symbols we will have to consider when scanning the
outcome of a first pass link. This is ALL to start with, then might
@@ -1217,7 +1222,6 @@ main (int argc, char **argv)
what LTO mode we are in. */
{
int i;
- bool use_plugin = false;
for (i = 1; argv[i] != NULL; i ++)
{
@@ -1329,11 +1333,17 @@ main (int argc, char **argv)
/* Search the compiler directories for `ld'. We have protection against
recursive calls in find_a_file. */
if (ld_file_name == 0)
- ld_file_name = find_a_file (&cpath, ld_suffix);
+ ld_file_name = find_a_file (&cpath,
+ use_plugin
+ ? plugin_ld_suffix
+ : ld_suffix);
/* Search the ordinary system bin directories
for `ld' (if native linking) or `TARGET-ld' (if cross). */
if (ld_file_name == 0)
- ld_file_name = find_a_file (&path, full_ld_suffix);
+ ld_file_name = find_a_file (&path,
+ use_plugin
+ ? full_plugin_ld_suffix
+ : full_ld_suffix);
#ifdef REAL_NM_FILE_NAME
nm_file_name = find_a_file (&path, REAL_NM_FILE_NAME);
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 1d3c3fc84f8..999ba218016 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2817,7 +2817,7 @@ case "${target}" in
case "$with_fpu" in
"" \
- | fpa | fpe2 | fpe3 | maverick | vfp | vfp3 | neon )
+ | fpa | fpe2 | fpe3 | maverick | vfp | vfp3 | vfpv3 | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd | vfpv3xd-fp16 | neon | neon-fp16 )
# OK
;;
*)
diff --git a/gcc/config.in b/gcc/config.in
index a3e9069e129..fbc9fbb9288 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -1550,6 +1550,12 @@
#endif
+/* Specify plugin linker */
+#ifndef USED_FOR_TARGET
+#undef PLUGIN_LD
+#endif
+
+
/* Define to PREFIX/include if cpp should also search that directory. */
#ifndef USED_FOR_TARGET
#undef PREFIX_INCLUDE_DIR
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 4c7fcb65854..205bff22008 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -816,7 +816,11 @@ static const struct arm_fpu_desc all_fpus[] =
{"maverick", ARM_FP_MODEL_MAVERICK, 0, 0, false, false},
{"vfp", ARM_FP_MODEL_VFP, 2, VFP_REG_D16, false, false},
{"vfpv3", ARM_FP_MODEL_VFP, 3, VFP_REG_D32, false, false},
+ {"vfpv3-fp16", ARM_FP_MODEL_VFP, 3, VFP_REG_D32, false, true},
{"vfpv3-d16", ARM_FP_MODEL_VFP, 3, VFP_REG_D16, false, false},
+ {"vfpv3-d16-fp16", ARM_FP_MODEL_VFP, 3, VFP_REG_D16, false, true},
+ {"vfpv3xd", ARM_FP_MODEL_VFP, 3, VFP_REG_SINGLE, false, false},
+ {"vfpv3xd-fp16", ARM_FP_MODEL_VFP, 3, VFP_REG_SINGLE, false, true},
{"neon", ARM_FP_MODEL_VFP, 3, VFP_REG_D32, true , false},
{"neon-fp16", ARM_FP_MODEL_VFP, 3, VFP_REG_D32, true , true },
/* Compatibility aliases. */
@@ -3817,38 +3821,57 @@ aapcs_vfp_sub_candidate (const_tree type, enum machine_mode *modep)
return -1;
}
+/* Return true if PCS_VARIANT should use VFP registers. */
static bool
-aapcs_vfp_is_call_or_return_candidate (enum machine_mode mode, const_tree type,
- enum machine_mode *base_mode,
- int *count)
+use_vfp_abi (enum arm_pcs pcs_variant, bool is_double)
{
+ if (pcs_variant == ARM_PCS_AAPCS_VFP)
+ return true;
+
+ if (pcs_variant != ARM_PCS_AAPCS_LOCAL)
+ return false;
+
+ return (TARGET_32BIT && TARGET_VFP && TARGET_HARD_FLOAT &&
+ (TARGET_VFP_DOUBLE || !is_double));
+}
+
+static bool
+aapcs_vfp_is_call_or_return_candidate (enum arm_pcs pcs_variant,
+ enum machine_mode mode, const_tree type,
+ int *base_mode, int *count)
+{
+ enum machine_mode new_mode = VOIDmode;
+
if (GET_MODE_CLASS (mode) == MODE_FLOAT
|| GET_MODE_CLASS (mode) == MODE_VECTOR_INT
|| GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
{
*count = 1;
- *base_mode = mode;
- return true;
+ new_mode = mode;
}
else if (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT)
{
*count = 2;
- *base_mode = (mode == DCmode ? DFmode : SFmode);
- return true;
+ new_mode = (mode == DCmode ? DFmode : SFmode);
}
else if (type && (mode == BLKmode || TREE_CODE (type) == VECTOR_TYPE))
{
- enum machine_mode aggregate_mode = VOIDmode;
- int ag_count = aapcs_vfp_sub_candidate (type, &aggregate_mode);
+ int ag_count = aapcs_vfp_sub_candidate (type, &new_mode);
if (ag_count > 0 && ag_count <= 4)
- {
- *count = ag_count;
- *base_mode = aggregate_mode;
- return true;
- }
+ *count = ag_count;
+ else
+ return false;
}
- return false;
+ else
+ return false;
+
+
+ if (!use_vfp_abi (pcs_variant, ARM_NUM_REGS (new_mode) > 1))
+ return false;
+
+ *base_mode = new_mode;
+ return true;
}
static bool
@@ -3858,22 +3881,20 @@ aapcs_vfp_is_return_candidate (enum arm_pcs pcs_variant,
int count ATTRIBUTE_UNUSED;
enum machine_mode ag_mode ATTRIBUTE_UNUSED;
- if (!(pcs_variant == ARM_PCS_AAPCS_VFP
- || (pcs_variant == ARM_PCS_AAPCS_LOCAL
- && TARGET_32BIT && TARGET_VFP && TARGET_HARD_FLOAT)))
+ if (!use_vfp_abi (pcs_variant, false))
return false;
- return aapcs_vfp_is_call_or_return_candidate (mode, type, &ag_mode, &count);
+ return aapcs_vfp_is_call_or_return_candidate (pcs_variant, mode, type,
+ &ag_mode, &count);
}
static bool
aapcs_vfp_is_call_candidate (CUMULATIVE_ARGS *pcum, enum machine_mode mode,
const_tree type)
{
- if (!(pcum->pcs_variant == ARM_PCS_AAPCS_VFP
- || (pcum->pcs_variant == ARM_PCS_AAPCS_LOCAL
- && TARGET_32BIT && TARGET_VFP && TARGET_HARD_FLOAT)))
+ if (!use_vfp_abi (pcum->pcs_variant, false))
return false;
- return aapcs_vfp_is_call_or_return_candidate (mode, type,
+
+ return aapcs_vfp_is_call_or_return_candidate (pcum->pcs_variant, mode, type,
&pcum->aapcs_vfp_rmode,
&pcum->aapcs_vfp_rcount);
}
@@ -3934,10 +3955,9 @@ aapcs_vfp_allocate_return_reg (enum arm_pcs pcs_variant ATTRIBUTE_UNUSED,
enum machine_mode mode,
const_tree type ATTRIBUTE_UNUSED)
{
- if (!(pcs_variant == ARM_PCS_AAPCS_VFP
- || (pcs_variant == ARM_PCS_AAPCS_LOCAL
- && TARGET_32BIT && TARGET_VFP && TARGET_HARD_FLOAT)))
+ if (!use_vfp_abi (pcs_variant, false))
return false;
+
if (mode == BLKmode || (mode == TImode && !TARGET_NEON))
{
int count;
@@ -3946,7 +3966,8 @@ aapcs_vfp_allocate_return_reg (enum arm_pcs pcs_variant ATTRIBUTE_UNUSED,
rtx par;
int shift;
- aapcs_vfp_is_call_or_return_candidate (mode, type, &ag_mode, &count);
+ aapcs_vfp_is_call_or_return_candidate (pcs_variant, mode, type,
+ &ag_mode, &count);
if (!TARGET_NEON)
{
@@ -6316,7 +6337,7 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed)
case UMOD:
if (TARGET_HARD_FLOAT && mode == SFmode)
*total = COSTS_N_INSNS (2);
- else if (TARGET_HARD_FLOAT && mode == DFmode)
+ else if (TARGET_HARD_FLOAT && mode == DFmode && !TARGET_VFP_SINGLE)
*total = COSTS_N_INSNS (4);
else
*total = COSTS_N_INSNS (20);
@@ -6394,7 +6415,9 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed)
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
{
- if (TARGET_HARD_FLOAT && (mode == SFmode || mode == DFmode))
+ if (TARGET_HARD_FLOAT
+ && (mode == SFmode
+ || (mode == DFmode && !TARGET_VFP_SINGLE)))
{
*total = COSTS_N_INSNS (1);
if (GET_CODE (XEXP (x, 0)) == CONST_DOUBLE
@@ -6489,7 +6512,9 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed)
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
{
- if (TARGET_HARD_FLOAT && (mode == SFmode || mode == DFmode))
+ if (TARGET_HARD_FLOAT
+ && (mode == SFmode
+ || (mode == DFmode && !TARGET_VFP_SINGLE)))
{
*total = COSTS_N_INSNS (1);
if (GET_CODE (XEXP (x, 1)) == CONST_DOUBLE
@@ -6602,7 +6627,9 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed)
case NEG:
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
{
- if (TARGET_HARD_FLOAT && (mode == SFmode || mode == DFmode))
+ if (TARGET_HARD_FLOAT
+ && (mode == SFmode
+ || (mode == DFmode && !TARGET_VFP_SINGLE)))
{
*total = COSTS_N_INSNS (1);
return false;
@@ -6751,7 +6778,9 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed)
case ABS:
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
{
- if (TARGET_HARD_FLOAT && (mode == SFmode || mode == DFmode))
+ if (TARGET_HARD_FLOAT
+ && (mode == SFmode
+ || (mode == DFmode && !TARGET_VFP_SINGLE)))
{
*total = COSTS_N_INSNS (1);
return false;
@@ -6854,7 +6883,8 @@ arm_rtx_costs_1 (rtx x, enum rtx_code outer, int* total, bool speed)
return true;
case CONST_DOUBLE:
- if (TARGET_HARD_FLOAT && vfp3_const_double_rtx (x))
+ if (TARGET_HARD_FLOAT && vfp3_const_double_rtx (x)
+ && (mode == SFmode || !TARGET_VFP_SINGLE))
*total = COSTS_N_INSNS (1);
else
*total = COSTS_N_INSNS (4);
@@ -6929,7 +6959,8 @@ arm_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
return false;
case MINUS:
- if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT)
+ if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT
+ && (mode == SFmode || !TARGET_VFP_SINGLE))
{
*total = COSTS_N_INSNS (1);
return false;
@@ -6959,7 +6990,8 @@ arm_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
return false;
case PLUS:
- if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT)
+ if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT
+ && (mode == SFmode || !TARGET_VFP_SINGLE))
{
*total = COSTS_N_INSNS (1);
return false;
@@ -6999,7 +7031,8 @@ arm_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
return false;
case NEG:
- if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT)
+ if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT
+ && (mode == SFmode || !TARGET_VFP_SINGLE))
{
*total = COSTS_N_INSNS (1);
return false;
@@ -7023,7 +7056,8 @@ arm_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
return false;
case ABS:
- if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT)
+ if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT
+ && (mode == SFmode || !TARGET_VFP_SINGLE))
*total = COSTS_N_INSNS (1);
else
*total = COSTS_N_INSNS (1 + ARM_NUM_REGS (mode));
@@ -7245,7 +7279,9 @@ arm_fastmul_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
{
- if (TARGET_HARD_FLOAT && (mode == SFmode || mode == DFmode))
+ if (TARGET_HARD_FLOAT
+ && (mode == SFmode
+ || (mode == DFmode && !TARGET_VFP_SINGLE)))
{
*total = COSTS_N_INSNS (1);
return false;
@@ -7402,7 +7438,9 @@ arm_9e_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
{
- if (TARGET_HARD_FLOAT && (mode == SFmode || mode == DFmode))
+ if (TARGET_HARD_FLOAT
+ && (mode == SFmode
+ || (mode == DFmode && !TARGET_VFP_SINGLE)))
{
*total = COSTS_N_INSNS (1);
return false;
@@ -8341,6 +8379,8 @@ coproc_secondary_reload_class (enum machine_mode mode, rtx x, bool wb)
{
if (mode == HFmode)
{
+ if (!TARGET_NEON_FP16)
+ return GENERAL_REGS;
if (s_register_operand (x, mode) || neon_vector_mem_operand (x, 2))
return NO_REGS;
return GENERAL_REGS;
@@ -15055,6 +15095,30 @@ arm_print_operand (FILE *stream, rtx x, int code)
}
return;
+ /* Print the high single-precision register of a VFP double-precision
+ register. */
+ case 'p':
+ {
+ int mode = GET_MODE (x);
+ int regno;
+
+ if (GET_MODE_SIZE (mode) != 8 || GET_CODE (x) != REG)
+ {
+ output_operand_lossage ("invalid operand for code '%c'", code);
+ return;
+ }
+
+ regno = REGNO (x);
+ if (!VFP_REGNO_OK_FOR_DOUBLE (regno))
+ {
+ output_operand_lossage ("invalid operand for code '%c'", code);
+ return;
+ }
+
+ fprintf (stream, "s%d", regno - FIRST_VFP_REGNUM + 1);
+ }
+ return;
+
/* Print a VFP/Neon double precision or quad precision register name. */
case 'P':
case 'q':
@@ -15973,10 +16037,9 @@ arm_hard_regno_mode_ok (unsigned int regno, enum machine_mode mode)
return VFP_REGNO_OK_FOR_DOUBLE (regno);
/* VFP registers can hold HFmode values, but there is no point in
- putting them there unless we have the NEON extensions for
- loading/storing them, too. */
+ putting them there unless we have hardware conversion insns. */
if (mode == HFmode)
- return TARGET_NEON_FP16 && VFP_REGNO_OK_FOR_SINGLE (regno);
+ return TARGET_FP16 && VFP_REGNO_OK_FOR_SINGLE (regno);
if (TARGET_NEON)
return (VALID_NEON_DREG_MODE (mode) && VFP_REGNO_OK_FOR_DOUBLE (regno))
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 2dfd22df45c..65d6708b04b 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -230,10 +230,19 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
/* FPU supports VFPv3 instructions. */
#define TARGET_VFP3 (TARGET_VFP && arm_fpu_desc->rev >= 3)
-/* FPU supports NEON/VFP half-precision floating-point. */
+/* FPU only supports VFP single-precision instructions. */
+#define TARGET_VFP_SINGLE (TARGET_VFP && arm_fpu_desc->regs == VFP_REG_SINGLE)
+
+/* FPU supports VFP double-precision instructions. */
+#define TARGET_VFP_DOUBLE (TARGET_VFP && arm_fpu_desc->regs != VFP_REG_SINGLE)
+
+/* FPU supports half-precision floating-point with NEON element load/store. */
#define TARGET_NEON_FP16 \
(TARGET_VFP && arm_fpu_desc->neon && arm_fpu_desc->fp16)
+/* FPU supports VFP half-precision floating-point. */
+#define TARGET_FP16 (TARGET_VFP && arm_fpu_desc->fp16)
+
/* FPU supports Neon instructions. The setting of this macro gets
revealed via __ARM_NEON__ so we add extra guards upon TARGET_32BIT
and TARGET_HARD_FLOAT to ensure that NEON instructions are
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 52edcbaa17b..691bd5568d7 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -958,7 +958,7 @@
[(set (match_operand:DF 0 "s_register_operand" "")
(plus:DF (match_operand:DF 1 "s_register_operand" "")
(match_operand:DF 2 "arm_float_add_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
"
if (TARGET_MAVERICK
&& !cirrus_fp_register (operands[2], DFmode))
@@ -1196,7 +1196,7 @@
[(set (match_operand:DF 0 "s_register_operand" "")
(minus:DF (match_operand:DF 1 "arm_float_rhs_operand" "")
(match_operand:DF 2 "arm_float_rhs_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
"
if (TARGET_MAVERICK)
{
@@ -1733,7 +1733,7 @@
[(set (match_operand:DF 0 "s_register_operand" "")
(mult:DF (match_operand:DF 1 "s_register_operand" "")
(match_operand:DF 2 "arm_float_rhs_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
"
if (TARGET_MAVERICK
&& !cirrus_fp_register (operands[2], DFmode))
@@ -1753,7 +1753,7 @@
[(set (match_operand:DF 0 "s_register_operand" "")
(div:DF (match_operand:DF 1 "arm_float_rhs_operand" "")
(match_operand:DF 2 "arm_float_rhs_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP_DOUBLE)"
"")
;; Modulo insns
@@ -3605,7 +3605,7 @@
(define_expand "negdf2"
[(set (match_operand:DF 0 "s_register_operand" "")
(neg:DF (match_operand:DF 1 "s_register_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP_DOUBLE)"
"")
;; abssi2 doesn't really clobber the condition codes if a different register
@@ -3691,7 +3691,7 @@
(define_expand "absdf2"
[(set (match_operand:DF 0 "s_register_operand" "")
(abs:DF (match_operand:DF 1 "s_register_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
"")
(define_expand "sqrtsf2"
@@ -3703,7 +3703,7 @@
(define_expand "sqrtdf2"
[(set (match_operand:DF 0 "s_register_operand" "")
(sqrt:DF (match_operand:DF 1 "s_register_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP_DOUBLE)"
"")
(define_insn_and_split "one_cmpldi2"
@@ -3814,7 +3814,7 @@
(define_expand "floatsidf2"
[(set (match_operand:DF 0 "s_register_operand" "")
(float:DF (match_operand:SI 1 "s_register_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
"
if (TARGET_MAVERICK)
{
@@ -3866,7 +3866,7 @@
(define_expand "fix_truncdfsi2"
[(set (match_operand:SI 0 "s_register_operand" "")
(fix:SI (fix:DF (match_operand:DF 1 "s_register_operand" ""))))]
- "TARGET_32BIT && TARGET_HARD_FLOAT"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
"
if (TARGET_MAVERICK)
{
@@ -3883,7 +3883,7 @@
[(set (match_operand:SF 0 "s_register_operand" "")
(float_truncate:SF
(match_operand:DF 1 "s_register_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
""
)
@@ -4784,7 +4784,7 @@
(define_expand "extendsfdf2"
[(set (match_operand:DF 0 "s_register_operand" "")
(float_extend:DF (match_operand:SF 1 "s_register_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
""
)
@@ -5971,7 +5971,7 @@
(define_insn "*arm32_movhf"
[(set (match_operand:HF 0 "nonimmediate_operand" "=r,m,r,r")
(match_operand:HF 1 "general_operand" " m,r,r,F"))]
- "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_NEON_FP16)
+ "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_FP16)
&& ( s_register_operand (operands[0], HFmode)
|| s_register_operand (operands[1], HFmode))"
"*
@@ -6682,7 +6682,7 @@
(match_operand:DF 2 "arm_float_compare_operand" "")])
(label_ref (match_operand 3 "" ""))
(pc)))]
- "TARGET_32BIT && TARGET_HARD_FLOAT"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && !TARGET_VFP_SINGLE"
"emit_jump_insn (gen_cbranch_cc (operands[0], operands[1], operands[2],
operands[3])); DONE;"
)
@@ -8296,7 +8296,7 @@
(if_then_else:DF (match_operand 1 "arm_comparison_operator" "")
(match_operand:DF 2 "s_register_operand" "")
(match_operand:DF 3 "arm_float_add_operand" "")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP_DOUBLE)"
"
{
enum rtx_code code = GET_CODE (operands[1]);
diff --git a/gcc/config/arm/constraints.md b/gcc/config/arm/constraints.md
index edb0215a90e..c40d695f0d8 100644
--- a/gcc/config/arm/constraints.md
+++ b/gcc/config/arm/constraints.md
@@ -29,7 +29,7 @@
;; in Thumb-1 state: I, J, K, L, M, N, O
;; The following multi-letter normal constraints have been used:
-;; in ARM/Thumb-2 state: Da, Db, Dc, Dn, Dl, DL, Dv
+;; in ARM/Thumb-2 state: Da, Db, Dc, Dn, Dl, DL, Dv, Dy
;; in Thumb-1 state: Pa, Pb
;; The following memory constraints have been used:
@@ -207,10 +207,17 @@
(define_constraint "Dv"
"@internal
In ARM/Thumb-2 state a const_double which can be used with a VFP fconsts
- or fconstd instruction."
+ instruction."
(and (match_code "const_double")
(match_test "TARGET_32BIT && vfp3_const_double_rtx (op)")))
+(define_constraint "Dy"
+ "@internal
+ In ARM/Thumb-2 state a const_double which can be used with a VFP fconstd
+ instruction."
+ (and (match_code "const_double")
+ (match_test "TARGET_32BIT && TARGET_VFP_DOUBLE && vfp3_const_double_rtx (op)")))
+
(define_memory_constraint "Ut"
"@internal
In ARM/Thumb-2 state an address valid for loading/storing opaque structure
diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md
index 77c99d241ef..57c2192d1e9 100644
--- a/gcc/config/arm/vfp.md
+++ b/gcc/config/arm/vfp.md
@@ -145,7 +145,10 @@
case 4:
return \"fmrrd%?\\t%Q0, %R0, %P1\\t%@ int\";
case 5:
- return \"fcpyd%?\\t%P0, %P1\\t%@ int\";
+ if (TARGET_VFP_SINGLE)
+ return \"fcpys%?\\t%0, %1\\t%@ int\;fcpys%?\\t%p0, %p1\\t%@ int\";
+ else
+ return \"fcpyd%?\\t%P0, %P1\\t%@ int\";
case 6: case 7:
return output_move_vfp (operands);
default:
@@ -153,7 +156,14 @@
}
"
[(set_attr "type" "*,load2,store2,r_2_f,f_2_r,ffarithd,f_loadd,f_stored")
- (set_attr "length" "8,8,8,4,4,4,4,4")
+ (set (attr "length") (cond [(eq_attr "alternative" "0,1,2") (const_int 8)
+ (eq_attr "alternative" "5")
+ (if_then_else
+ (eq (symbol_ref "TARGET_VFP_SINGLE")
+ (const_int 1))
+ (const_int 8)
+ (const_int 4))]
+ (const_int 4)))
(set_attr "predicable" "yes")
(set_attr "pool_range" "*,1020,*,*,*,*,1020,*")
(set_attr "neg_pool_range" "*,1008,*,*,*,*,1008,*")]
@@ -173,7 +183,10 @@
case 4:
return \"fmrrd%?\\t%Q0, %R0, %P1\\t%@ int\";
case 5:
- return \"fcpyd%?\\t%P0, %P1\\t%@ int\";
+ if (TARGET_VFP_SINGLE)
+ return \"fcpys%?\\t%0, %1\\t%@ int\;fcpys%?\\t%p0, %p1\\t%@ int\";
+ else
+ return \"fcpyd%?\\t%P0, %P1\\t%@ int\";
case 6: case 7:
return output_move_vfp (operands);
default:
@@ -181,13 +194,20 @@
}
"
[(set_attr "type" "*,load2,store2,r_2_f,f_2_r,ffarithd,f_load,f_store")
- (set_attr "length" "8,8,8,4,4,4,4,4")
+ (set (attr "length") (cond [(eq_attr "alternative" "0,1,2") (const_int 8)
+ (eq_attr "alternative" "5")
+ (if_then_else
+ (eq (symbol_ref "TARGET_VFP_SINGLE")
+ (const_int 1))
+ (const_int 8)
+ (const_int 4))]
+ (const_int 4)))
(set_attr "pool_range" "*,4096,*,*,*,*,1020,*")
(set_attr "neg_pool_range" "*, 0,*,*,*,*,1008,*")]
)
;; HFmode moves
-(define_insn "*movhf_vfp"
+(define_insn "*movhf_vfp_neon"
[(set (match_operand:HF 0 "nonimmediate_operand" "= t,Um,r,m,t,r,t,r,r")
(match_operand:HF 1 "general_operand" " Um, t,m,r,t,r,r,t,F"))]
"TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_NEON_FP16
@@ -241,6 +261,56 @@
(set_attr "length" "4,4,4,4,4,4,4,4,8")]
)
+;; FP16 without element load/store instructions.
+(define_insn "*movhf_vfp"
+ [(set (match_operand:HF 0 "nonimmediate_operand" "=r,m,t,r,t,r,r")
+ (match_operand:HF 1 "general_operand" " m,r,t,r,r,t,F"))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FP16 && !TARGET_NEON_FP16
+ && ( s_register_operand (operands[0], HFmode)
+ || s_register_operand (operands[1], HFmode))"
+ "*
+ switch (which_alternative)
+ {
+ case 0: /* ARM register from memory */
+ return \"ldrh\\t%0, %1\\t%@ __fp16\";
+ case 1: /* memory from ARM register */
+ return \"strh\\t%1, %0\\t%@ __fp16\";
+ case 2: /* S register from S register */
+ return \"fcpys\\t%0, %1\";
+ case 3: /* ARM register from ARM register */
+ return \"mov\\t%0, %1\\t%@ __fp16\";
+ case 4: /* S register from ARM register */
+ return \"fmsr\\t%0, %1\";
+ case 5: /* ARM register from S register */
+ return \"fmrs\\t%0, %1\";
+ case 6: /* ARM register from constant */
+ {
+ REAL_VALUE_TYPE r;
+ long bits;
+ rtx ops[4];
+
+ REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]);
+ bits = real_to_target (NULL, &r, HFmode);
+ ops[0] = operands[0];
+ ops[1] = GEN_INT (bits);
+ ops[2] = GEN_INT (bits & 0xff00);
+ ops[3] = GEN_INT (bits & 0x00ff);
+
+ if (arm_arch_thumb2)
+ output_asm_insn (\"movw\\t%0, %1\", ops);
+ else
+ output_asm_insn (\"mov\\t%0, %2\;orr\\t%0, %0, %3\", ops);
+ return \"\";
+ }
+ default:
+ gcc_unreachable ();
+ }
+ "
+ [(set_attr "conds" "unconditional")
+ (set_attr "type" "load1,store1,fcpys,*,r_2_f,f_2_r,*")
+ (set_attr "length" "4,4,4,4,4,4,8")]
+)
+
;; SFmode moves
;; Disparage the w<->r cases because reloading an invalid address is
@@ -323,7 +393,7 @@
(define_insn "*movdf_vfp"
[(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,r, m,w ,Uv,w,r")
- (match_operand:DF 1 "soft_df_operand" " ?r,w,Dv,mF,r,UvF,w, w,r"))]
+ (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,mF,r,UvF,w, w,r"))]
"TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP
&& ( register_operand (operands[0], DFmode)
|| register_operand (operands[1], DFmode))"
@@ -336,13 +406,17 @@
case 1:
return \"fmrrd%?\\t%Q0, %R0, %P1\";
case 2:
+ gcc_assert (TARGET_VFP_DOUBLE);
return \"fconstd%?\\t%P0, #%G1\";
case 3: case 4:
return output_move_double (operands);
case 5: case 6:
return output_move_vfp (operands);
case 7:
- return \"fcpyd%?\\t%P0, %P1\";
+ if (TARGET_VFP_SINGLE)
+ return \"fcpys%?\\t%0, %1\;fcpys%?\\t%p0, %p1\";
+ else
+ return \"fcpyd%?\\t%P0, %P1\";
case 8:
return \"#\";
default:
@@ -352,7 +426,14 @@
"
[(set_attr "type"
"r_2_f,f_2_r,fconstd,f_loadd,f_stored,load2,store2,ffarithd,*")
- (set_attr "length" "4,4,4,8,8,4,4,4,8")
+ (set (attr "length") (cond [(eq_attr "alternative" "3,4,8") (const_int 8)
+ (eq_attr "alternative" "7")
+ (if_then_else
+ (eq (symbol_ref "TARGET_VFP_SINGLE")
+ (const_int 1))
+ (const_int 8)
+ (const_int 4))]
+ (const_int 4)))
(set_attr "predicable" "yes")
(set_attr "pool_range" "*,*,*,1020,*,1020,*,*,*")
(set_attr "neg_pool_range" "*,*,*,1008,*,1008,*,*,*")]
@@ -360,7 +441,7 @@
(define_insn "*thumb2_movdf_vfp"
[(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,r, m,w ,Uv,w,r")
- (match_operand:DF 1 "soft_df_operand" " ?r,w,Dv,mF,r,UvF,w, w,r"))]
+ (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,mF,r,UvF,w, w,r"))]
"TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP"
"*
{
@@ -371,13 +452,17 @@
case 1:
return \"fmrrd%?\\t%Q0, %R0, %P1\";
case 2:
+ gcc_assert (TARGET_VFP_DOUBLE);
return \"fconstd%?\\t%P0, #%G1\";
case 3: case 4: case 8:
return output_move_double (operands);
case 5: case 6:
return output_move_vfp (operands);
case 7:
- return \"fcpyd%?\\t%P0, %P1\";
+ if (TARGET_VFP_SINGLE)
+ return \"fcpys%?\\t%0, %1\;fcpys%?\\t%p0, %p1\";
+ else
+ return \"fcpyd%?\\t%P0, %P1\";
default:
abort ();
}
@@ -385,7 +470,14 @@
"
[(set_attr "type"
"r_2_f,f_2_r,fconstd,load2,store2,f_load,f_store,ffarithd,*")
- (set_attr "length" "4,4,4,8,8,4,4,4,8")
+ (set (attr "length") (cond [(eq_attr "alternative" "3,4,8") (const_int 8)
+ (eq_attr "alternative" "7")
+ (if_then_else
+ (eq (symbol_ref "TARGET_VFP_SINGLE")
+ (const_int 1))
+ (const_int 8)
+ (const_int 4))]
+ (const_int 4)))
(set_attr "pool_range" "*,*,*,4096,*,1020,*,*,*")
(set_attr "neg_pool_range" "*,*,*,0,*,1008,*,*,*")]
)
@@ -446,7 +538,7 @@
[(match_operand 4 "cc_register" "") (const_int 0)])
(match_operand:DF 1 "s_register_operand" "0,w,w,0,?r,?r,0,w,w")
(match_operand:DF 2 "s_register_operand" "w,0,w,?r,0,?r,w,0,w")))]
- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"@
fcpyd%D3\\t%P0, %P2
fcpyd%d3\\t%P0, %P1
@@ -469,7 +561,7 @@
[(match_operand 4 "cc_register" "") (const_int 0)])
(match_operand:DF 1 "s_register_operand" "0,w,w,0,?r,?r,0,w,w")
(match_operand:DF 2 "s_register_operand" "w,0,w,?r,0,?r,w,0,w")))]
- "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"@
it\\t%D3\;fcpyd%D3\\t%P0, %P2
it\\t%d3\;fcpyd%d3\\t%P0, %P1
@@ -500,7 +592,7 @@
(define_insn "*absdf2_vfp"
[(set (match_operand:DF 0 "s_register_operand" "=w")
(abs:DF (match_operand:DF 1 "s_register_operand" "w")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fabsd%?\\t%P0, %P1"
[(set_attr "predicable" "yes")
(set_attr "type" "ffarithd")]
@@ -520,12 +612,12 @@
(define_insn_and_split "*negdf2_vfp"
[(set (match_operand:DF 0 "s_register_operand" "=w,?r,?r")
(neg:DF (match_operand:DF 1 "s_register_operand" "w,0,r")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"@
fnegd%?\\t%P0, %P1
#
#"
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP && reload_completed
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE && reload_completed
&& arm_general_register_operand (operands[0], DFmode)"
[(set (match_dup 0) (match_dup 1))]
"
@@ -580,7 +672,7 @@
[(set (match_operand:DF 0 "s_register_operand" "=w")
(plus:DF (match_operand:DF 1 "s_register_operand" "w")
(match_operand:DF 2 "s_register_operand" "w")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"faddd%?\\t%P0, %P1, %P2"
[(set_attr "predicable" "yes")
(set_attr "type" "faddd")]
@@ -601,7 +693,7 @@
[(set (match_operand:DF 0 "s_register_operand" "=w")
(minus:DF (match_operand:DF 1 "s_register_operand" "w")
(match_operand:DF 2 "s_register_operand" "w")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fsubd%?\\t%P0, %P1, %P2"
[(set_attr "predicable" "yes")
(set_attr "type" "faddd")]
@@ -624,7 +716,7 @@
[(set (match_operand:DF 0 "s_register_operand" "+w")
(div:DF (match_operand:DF 1 "s_register_operand" "w")
(match_operand:DF 2 "s_register_operand" "w")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fdivd%?\\t%P0, %P1, %P2"
[(set_attr "predicable" "yes")
(set_attr "type" "fdivd")]
@@ -647,7 +739,7 @@
[(set (match_operand:DF 0 "s_register_operand" "+w")
(mult:DF (match_operand:DF 1 "s_register_operand" "w")
(match_operand:DF 2 "s_register_operand" "w")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fmuld%?\\t%P0, %P1, %P2"
[(set_attr "predicable" "yes")
(set_attr "type" "fmuld")]
@@ -668,7 +760,7 @@
[(set (match_operand:DF 0 "s_register_operand" "+w")
(mult:DF (neg:DF (match_operand:DF 1 "s_register_operand" "w"))
(match_operand:DF 2 "s_register_operand" "w")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fnmuld%?\\t%P0, %P1, %P2"
[(set_attr "predicable" "yes")
(set_attr "type" "fmuld")]
@@ -694,7 +786,7 @@
(plus:DF (mult:DF (match_operand:DF 2 "s_register_operand" "w")
(match_operand:DF 3 "s_register_operand" "w"))
(match_operand:DF 1 "s_register_operand" "0")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fmacd%?\\t%P0, %P2, %P3"
[(set_attr "predicable" "yes")
(set_attr "type" "fmacd")]
@@ -717,7 +809,7 @@
(minus:DF (mult:DF (match_operand:DF 2 "s_register_operand" "w")
(match_operand:DF 3 "s_register_operand" "w"))
(match_operand:DF 1 "s_register_operand" "0")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fmscd%?\\t%P0, %P2, %P3"
[(set_attr "predicable" "yes")
(set_attr "type" "fmacd")]
@@ -740,7 +832,7 @@
(minus:DF (match_operand:DF 1 "s_register_operand" "0")
(mult:DF (match_operand:DF 2 "s_register_operand" "w")
(match_operand:DF 3 "s_register_operand" "w"))))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fnmacd%?\\t%P0, %P2, %P3"
[(set_attr "predicable" "yes")
(set_attr "type" "fmacd")]
@@ -766,7 +858,7 @@
(neg:DF (match_operand:DF 2 "s_register_operand" "w"))
(match_operand:DF 3 "s_register_operand" "w"))
(match_operand:DF 1 "s_register_operand" "0")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fnmscd%?\\t%P0, %P2, %P3"
[(set_attr "predicable" "yes")
(set_attr "type" "fmacd")]
@@ -778,7 +870,7 @@
(define_insn "*extendsfdf2_vfp"
[(set (match_operand:DF 0 "s_register_operand" "=w")
(float_extend:DF (match_operand:SF 1 "s_register_operand" "t")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fcvtds%?\\t%P0, %1"
[(set_attr "predicable" "yes")
(set_attr "type" "f_cvt")]
@@ -787,7 +879,7 @@
(define_insn "*truncdfsf2_vfp"
[(set (match_operand:SF 0 "s_register_operand" "=t")
(float_truncate:SF (match_operand:DF 1 "s_register_operand" "w")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fcvtsd%?\\t%0, %P1"
[(set_attr "predicable" "yes")
(set_attr "type" "f_cvt")]
@@ -796,7 +888,7 @@
(define_insn "extendhfsf2"
[(set (match_operand:SF 0 "s_register_operand" "=t")
(float_extend:SF (match_operand:HF 1 "s_register_operand" "t")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_NEON_FP16"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FP16"
"vcvtb%?.f32.f16\\t%0, %1"
[(set_attr "predicable" "yes")
(set_attr "type" "f_cvt")]
@@ -805,7 +897,7 @@
(define_insn "truncsfhf2"
[(set (match_operand:HF 0 "s_register_operand" "=t")
(float_truncate:HF (match_operand:SF 1 "s_register_operand" "t")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_NEON_FP16"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FP16"
"vcvtb%?.f16.f32\\t%0, %1"
[(set_attr "predicable" "yes")
(set_attr "type" "f_cvt")]
@@ -823,7 +915,7 @@
(define_insn "*truncsidf2_vfp"
[(set (match_operand:SI 0 "s_register_operand" "=t")
(fix:SI (fix:DF (match_operand:DF 1 "s_register_operand" "w"))))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"ftosizd%?\\t%0, %P1"
[(set_attr "predicable" "yes")
(set_attr "type" "f_cvt")]
@@ -842,7 +934,7 @@
(define_insn "fixuns_truncdfsi2"
[(set (match_operand:SI 0 "s_register_operand" "=t")
(unsigned_fix:SI (fix:DF (match_operand:DF 1 "s_register_operand" "t"))))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"ftouizd%?\\t%0, %P1"
[(set_attr "predicable" "yes")
(set_attr "type" "f_cvt")]
@@ -861,7 +953,7 @@
(define_insn "*floatsidf2_vfp"
[(set (match_operand:DF 0 "s_register_operand" "=w")
(float:DF (match_operand:SI 1 "s_register_operand" "t")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fsitod%?\\t%P0, %1"
[(set_attr "predicable" "yes")
(set_attr "type" "f_cvt")]
@@ -880,7 +972,7 @@
(define_insn "floatunssidf2"
[(set (match_operand:DF 0 "s_register_operand" "=w")
(unsigned_float:DF (match_operand:SI 1 "s_register_operand" "t")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fuitod%?\\t%P0, %1"
[(set_attr "predicable" "yes")
(set_attr "type" "f_cvt")]
@@ -901,7 +993,7 @@
(define_insn "*sqrtdf2_vfp"
[(set (match_operand:DF 0 "s_register_operand" "=w")
(sqrt:DF (match_operand:DF 1 "s_register_operand" "w")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"fsqrtd%?\\t%P0, %P1"
[(set_attr "predicable" "yes")
(set_attr "type" "fdivd")]
@@ -953,9 +1045,9 @@
[(set (reg:CCFP CC_REGNUM)
(compare:CCFP (match_operand:DF 0 "s_register_operand" "w")
(match_operand:DF 1 "vfp_compare_operand" "wG")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"#"
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
[(set (reg:CCFP VFPCC_REGNUM)
(compare:CCFP (match_dup 0)
(match_dup 1)))
@@ -968,9 +1060,9 @@
[(set (reg:CCFPE CC_REGNUM)
(compare:CCFPE (match_operand:DF 0 "s_register_operand" "w")
(match_operand:DF 1 "vfp_compare_operand" "wG")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"#"
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
[(set (reg:CCFPE VFPCC_REGNUM)
(compare:CCFPE (match_dup 0)
(match_dup 1)))
@@ -1010,7 +1102,7 @@
[(set (reg:CCFP VFPCC_REGNUM)
(compare:CCFP (match_operand:DF 0 "s_register_operand" "w,w")
(match_operand:DF 1 "vfp_compare_operand" "w,G")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"@
fcmpd%?\\t%P0, %P1
fcmpzd%?\\t%P0"
@@ -1022,7 +1114,7 @@
[(set (reg:CCFPE VFPCC_REGNUM)
(compare:CCFPE (match_operand:DF 0 "s_register_operand" "w,w")
(match_operand:DF 1 "vfp_compare_operand" "w,G")))]
- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP"
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_VFP_DOUBLE"
"@
fcmped%?\\t%P0, %P1
fcmpezd%?\\t%P0"
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
index 933263769f9..8eb21da4948 100644
--- a/gcc/config/i386/cygwin.h
+++ b/gcc/config/i386/cygwin.h
@@ -94,7 +94,7 @@ along with GCC; see the file COPYING3. If not see
%{shared|mdll: --enable-auto-image-base -e \
%{mno-cygwin:_DllMainCRTStartup@12} \
%{!mno-cygwin:__cygwin_dll_entry@12}}\
- %{!mno-cygwin:--dll-search-prefix=cyg}"
+ %{!mno-cygwin:--dll-search-prefix=cyg -tsaware}"
/* Allocate space for all of the machine-spec-specific stuff.
Allocate enough space for cygwin -> mingw32 munging plus
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 2031dfb6e98..8630640ef52 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11301,7 +11301,7 @@ get_some_local_dynamic_name (void)
&& for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0))
return cfun->machine->some_ld_name;
- gcc_unreachable ();
+ return NULL;
}
/* Meaning of CODE:
@@ -11353,8 +11353,15 @@ print_operand (FILE *file, rtx x, int code)
return;
case '&':
- assemble_name (file, get_some_local_dynamic_name ());
- return;
+ {
+ const char *name = get_some_local_dynamic_name ();
+ if (name == NULL)
+ output_operand_lossage ("'%%&' used without any "
+ "local dynamic TLS references");
+ else
+ assemble_name (file, name);
+ return;
+ }
case 'A':
switch (ASSEMBLER_DIALECT)
@@ -11590,7 +11597,8 @@ print_operand (FILE *file, rtx x, int code)
fputs ("ord", file);
break;
default:
- output_operand_lossage ("operand is not a condition code, invalid operand code 'D'");
+ output_operand_lossage ("operand is not a condition code, "
+ "invalid operand code 'D'");
return;
}
}
@@ -11629,7 +11637,8 @@ print_operand (FILE *file, rtx x, int code)
fputs ("ord", file);
break;
default:
- output_operand_lossage ("operand is not a condition code, invalid operand code 'D'");
+ output_operand_lossage ("operand is not a condition code, "
+ "invalid operand code 'D'");
return;
}
}
@@ -11803,7 +11812,8 @@ print_operand (FILE *file, rtx x, int code)
fputs ("une", file);
break;
default:
- output_operand_lossage ("operand is not a condition code, invalid operand code 'D'");
+ output_operand_lossage ("operand is not a condition code, "
+ "invalid operand code 'Y'");
return;
}
return;
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index bad39bb69c8..9a87cb1f4f9 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -10466,16 +10466,15 @@
;; that it does and splitting it later allows the following to be recognized:
;; a[i] = b[i] * c[i] + d[i];
(define_insn "xop_pmacsww"
- [(set (match_operand:V8HI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V8HI 0 "register_operand" "=x,x")
(plus:V8HI
(mult:V8HI
- (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,xm")
- (match_operand:V8HI 2 "nonimmediate_operand" "x,xm,x"))
- (match_operand:V8HI 3 "register_operand" "x,x,x")))]
+ (match_operand:V8HI 1 "nonimmediate_operand" "%x,m")
+ (match_operand:V8HI 2 "nonimmediate_operand" "xm,x"))
+ (match_operand:V8HI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 2, true)"
"@
vpmacsww\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacsww\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacsww\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
@@ -10502,15 +10501,14 @@
})
(define_insn "xop_pmacssww"
- [(set (match_operand:V8HI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V8HI 0 "register_operand" "=x,x")
(ss_plus:V8HI
- (mult:V8HI (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,m")
- (match_operand:V8HI 2 "nonimmediate_operand" "x,m,x"))
- (match_operand:V8HI 3 "register_operand" "x,x,x")))]
+ (mult:V8HI (match_operand:V8HI 1 "nonimmediate_operand" "%x,m")
+ (match_operand:V8HI 2 "nonimmediate_operand" "xm,x"))
+ (match_operand:V8HI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmacssww\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacssww\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacssww\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
@@ -10520,16 +10518,15 @@
;; that it does and splitting it later allows the following to be recognized:
;; a[i] = b[i] * c[i] + d[i];
(define_insn "xop_pmacsdd"
- [(set (match_operand:V4SI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V4SI 0 "register_operand" "=x,x")
(plus:V4SI
(mult:V4SI
- (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m")
- (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x"))
- (match_operand:V4SI 3 "register_operand" "x,x,x")))]
+ (match_operand:V4SI 1 "nonimmediate_operand" "%x,m")
+ (match_operand:V4SI 2 "nonimmediate_operand" "xm,x"))
+ (match_operand:V4SI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 2, true)"
"@
vpmacsdd\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacsdd\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacsdd\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
@@ -10556,102 +10553,98 @@
})
(define_insn "xop_pmacssdd"
- [(set (match_operand:V4SI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V4SI 0 "register_operand" "=x,x")
(ss_plus:V4SI
- (mult:V4SI (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m")
- (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x"))
- (match_operand:V4SI 3 "register_operand" "x,x,x")))]
+ (mult:V4SI (match_operand:V4SI 1 "nonimmediate_operand" "%x,m")
+ (match_operand:V4SI 2 "nonimmediate_operand" "xm,x"))
+ (match_operand:V4SI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmacssdd\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacssdd\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacssdd\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
(define_insn "xop_pmacssdql"
- [(set (match_operand:V2DI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V2DI 0 "register_operand" "=x,x")
(ss_plus:V2DI
(mult:V2DI
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V4SI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 1)
(const_int 3)])))
(vec_select:V2SI
- (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V4SI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 1)
(const_int 3)])))
- (match_operand:V2DI 3 "register_operand" "x,x,x")))]
+ (match_operand:V2DI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmacssdql\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacssdql\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacssdql\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
(define_insn "xop_pmacssdqh"
- [(set (match_operand:V2DI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V2DI 0 "register_operand" "=x,x")
(ss_plus:V2DI
(mult:V2DI
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V4SI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 0)
(const_int 2)])))
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V4SI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 0)
(const_int 2)]))))
- (match_operand:V2DI 3 "register_operand" "x,x,x")))]
+ (match_operand:V2DI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmacssdqh\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacssdqh\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacssdqh\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
(define_insn "xop_pmacsdql"
- [(set (match_operand:V2DI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V2DI 0 "register_operand" "=x,x")
(plus:V2DI
(mult:V2DI
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V4SI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 1)
(const_int 3)])))
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V4SI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 1)
(const_int 3)]))))
- (match_operand:V2DI 3 "register_operand" "x,x,x")))]
+ (match_operand:V2DI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmacsdql\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacsdql\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacsdql\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
(define_insn_and_split "*xop_pmacsdql_mem"
- [(set (match_operand:V2DI 0 "register_operand" "=&x,&x,&x")
+ [(set (match_operand:V2DI 0 "register_operand" "=&x,&x")
(plus:V2DI
(mult:V2DI
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V4SI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 1)
(const_int 3)])))
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V4SI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 1)
(const_int 3)]))))
- (match_operand:V2DI 3 "memory_operand" "m,m,m")))]
+ (match_operand:V2DI 3 "memory_operand" "m,m")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, -1, true)"
"#"
"&& (reload_completed
@@ -10719,43 +10712,42 @@
(set_attr "mode" "TI")])
(define_insn "xop_pmacsdqh"
- [(set (match_operand:V2DI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V2DI 0 "register_operand" "=x,x")
(plus:V2DI
(mult:V2DI
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V4SI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 0)
(const_int 2)])))
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V4SI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 0)
(const_int 2)]))))
- (match_operand:V2DI 3 "register_operand" "x,x,x")))]
+ (match_operand:V2DI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmacsdqh\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacsdqh\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacsdqh\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
(define_insn_and_split "*xop_pmacsdqh_mem"
- [(set (match_operand:V2DI 0 "register_operand" "=&x,&x,&x")
+ [(set (match_operand:V2DI 0 "register_operand" "=&x,&x")
(plus:V2DI
(mult:V2DI
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V4SI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 0)
(const_int 2)])))
(sign_extend:V2DI
(vec_select:V2SI
- (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V4SI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 0)
(const_int 2)]))))
- (match_operand:V2DI 3 "memory_operand" "m,m,m")))]
+ (match_operand:V2DI 3 "memory_operand" "m,m")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, -1, true)"
"#"
"&& (reload_completed
@@ -10824,74 +10816,72 @@
;; XOP parallel integer multiply/add instructions for the intrinisics
(define_insn "xop_pmacsswd"
- [(set (match_operand:V4SI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V4SI 0 "register_operand" "=x,x")
(ss_plus:V4SI
(mult:V4SI
(sign_extend:V4SI
(vec_select:V4HI
- (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V8HI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 1)
(const_int 3)
(const_int 5)
(const_int 7)])))
(sign_extend:V4SI
(vec_select:V4HI
- (match_operand:V8HI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V8HI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 1)
(const_int 3)
(const_int 5)
(const_int 7)]))))
- (match_operand:V4SI 3 "register_operand" "x,x,x")))]
+ (match_operand:V4SI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmacsswd\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacsswd\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacsswd\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
(define_insn "xop_pmacswd"
- [(set (match_operand:V4SI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V4SI 0 "register_operand" "=x,x")
(plus:V4SI
(mult:V4SI
(sign_extend:V4SI
(vec_select:V4HI
- (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V8HI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 1)
(const_int 3)
(const_int 5)
(const_int 7)])))
(sign_extend:V4SI
(vec_select:V4HI
- (match_operand:V8HI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V8HI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 1)
(const_int 3)
(const_int 5)
(const_int 7)]))))
- (match_operand:V4SI 3 "register_operand" "x,x,x")))]
+ (match_operand:V4SI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmacswd\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmacswd\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmacswd\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
(define_insn "xop_pmadcsswd"
- [(set (match_operand:V4SI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V4SI 0 "register_operand" "=x,x")
(ss_plus:V4SI
(plus:V4SI
(mult:V4SI
(sign_extend:V4SI
(vec_select:V4HI
- (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V8HI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 0)
(const_int 2)
(const_int 4)
(const_int 6)])))
(sign_extend:V4SI
(vec_select:V4HI
- (match_operand:V8HI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V8HI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 0)
(const_int 2)
(const_int 4)
@@ -10911,30 +10901,29 @@
(const_int 3)
(const_int 5)
(const_int 7)])))))
- (match_operand:V4SI 3 "register_operand" "x,x,x")))]
+ (match_operand:V4SI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmadcsswd\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmadcsswd\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmadcsswd\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
(define_insn "xop_pmadcswd"
- [(set (match_operand:V4SI 0 "register_operand" "=x,x,x")
+ [(set (match_operand:V4SI 0 "register_operand" "=x,x")
(plus:V4SI
(plus:V4SI
(mult:V4SI
(sign_extend:V4SI
(vec_select:V4HI
- (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,m")
+ (match_operand:V8HI 1 "nonimmediate_operand" "%x,m")
(parallel [(const_int 0)
(const_int 2)
(const_int 4)
(const_int 6)])))
(sign_extend:V4SI
(vec_select:V4HI
- (match_operand:V8HI 2 "nonimmediate_operand" "x,m,x")
+ (match_operand:V8HI 2 "nonimmediate_operand" "xm,x")
(parallel [(const_int 0)
(const_int 2)
(const_int 4)
@@ -10954,11 +10943,10 @@
(const_int 3)
(const_int 5)
(const_int 7)])))))
- (match_operand:V4SI 3 "register_operand" "x,x,x")))]
+ (match_operand:V4SI 3 "register_operand" "x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, false, 1, true)"
"@
vpmadcswd\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpmadcswd\t{%3, %2, %1, %0|%0, %1, %2, %3}
vpmadcswd\t{%3, %1, %2, %0|%0, %2, %1, %3}"
[(set_attr "type" "ssemuladd")
(set_attr "mode" "TI")])
@@ -10967,27 +10955,21 @@
(define_insn "xop_pcmov_<mode>"
[(set (match_operand:SSEMODE 0 "register_operand" "=x,x,x")
(if_then_else:SSEMODE
- (match_operand:SSEMODE 3 "nonimmediate_operand" "x,x,xm")
- (match_operand:SSEMODE 1 "vector_move_operand" "x,xm,x")
+ (match_operand:SSEMODE 3 "nonimmediate_operand" "x,x,m")
+ (match_operand:SSEMODE 1 "vector_move_operand" "x,m,x")
(match_operand:SSEMODE 2 "vector_move_operand" "xm,x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, true, 1, false)"
- "@
- vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}"
+ "vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}"
[(set_attr "type" "sse4arg")])
(define_insn "xop_pcmov_<mode>256"
[(set (match_operand:AVX256MODE 0 "register_operand" "=x,x,x")
(if_then_else:AVX256MODE
- (match_operand:AVX256MODE 3 "nonimmediate_operand" "x,x,xm")
- (match_operand:AVX256MODE 1 "vector_move_operand" "x,xm,x")
+ (match_operand:AVX256MODE 3 "nonimmediate_operand" "x,x,m")
+ (match_operand:AVX256MODE 1 "vector_move_operand" "x,m,x")
(match_operand:AVX256MODE 2 "vector_move_operand" "xm,x,x")))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, true, 1, false)"
- "@
- vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}
- vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}"
+ "vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}"
[(set_attr "type" "sse4arg")])
;; XOP horizontal add/subtract instructions
@@ -11434,8 +11416,8 @@
(define_insn "xop_pperm"
[(set (match_operand:V16QI 0 "register_operand" "=x,x,x")
(unspec:V16QI
- [(match_operand:V16QI 1 "nonimmediate_operand" "x,x,xm")
- (match_operand:V16QI 2 "nonimmediate_operand" "x,xm,x")
+ [(match_operand:V16QI 1 "nonimmediate_operand" "x,x,m")
+ (match_operand:V16QI 2 "nonimmediate_operand" "x,m,x")
(match_operand:V16QI 3 "nonimmediate_operand" "xm,x,x")]
UNSPEC_XOP_PERMUTE))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, true, 1, false)"
@@ -11448,9 +11430,9 @@
[(set (match_operand:V4SI 0 "register_operand" "=x,x,x")
(vec_concat:V4SI
(truncate:V2SI
- (match_operand:V2DI 1 "nonimmediate_operand" "x,x,xm"))
+ (match_operand:V2DI 1 "nonimmediate_operand" "x,x,m"))
(truncate:V2SI
- (match_operand:V2DI 2 "nonimmediate_operand" "x,xm,x"))))
+ (match_operand:V2DI 2 "nonimmediate_operand" "x,m,x"))))
(use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,x"))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, true, 1, false)"
"vpperm\t{%3, %2, %1, %0|%0, %1, %2, %3}"
@@ -11461,9 +11443,9 @@
[(set (match_operand:V8HI 0 "register_operand" "=x,x,x")
(vec_concat:V8HI
(truncate:V4HI
- (match_operand:V4SI 1 "nonimmediate_operand" "x,x,xm"))
+ (match_operand:V4SI 1 "nonimmediate_operand" "x,x,m"))
(truncate:V4HI
- (match_operand:V4SI 2 "nonimmediate_operand" "x,xm,x"))))
+ (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x"))))
(use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,x"))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, true, 1, false)"
"vpperm\t{%3, %2, %1, %0|%0, %1, %2, %3}"
@@ -11474,9 +11456,9 @@
[(set (match_operand:V16QI 0 "register_operand" "=x,x,x")
(vec_concat:V16QI
(truncate:V8QI
- (match_operand:V8HI 1 "nonimmediate_operand" "x,x,xm"))
+ (match_operand:V8HI 1 "nonimmediate_operand" "x,x,m"))
(truncate:V8QI
- (match_operand:V8HI 2 "nonimmediate_operand" "x,xm,x"))))
+ (match_operand:V8HI 2 "nonimmediate_operand" "x,m,x"))))
(use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,x"))]
"TARGET_XOP && ix86_fma4_valid_op_p (operands, insn, 4, true, 1, false)"
"vpperm\t{%3, %2, %1, %0|%0, %1, %2, %3}"
@@ -11599,10 +11581,10 @@
[(set (match_operand:SSEMODE1248 0 "register_operand" "=x,x")
(if_then_else:SSEMODE1248
(ge:SSEMODE1248
- (match_operand:SSEMODE1248 2 "nonimmediate_operand" "xm,x")
+ (match_operand:SSEMODE1248 2 "nonimmediate_operand" "x,m")
(const_int 0))
(rotate:SSEMODE1248
- (match_operand:SSEMODE1248 1 "nonimmediate_operand" "x,xm")
+ (match_operand:SSEMODE1248 1 "nonimmediate_operand" "xm,x")
(match_dup 2))
(rotatert:SSEMODE1248
(match_dup 1)
@@ -11654,10 +11636,10 @@
[(set (match_operand:SSEMODE1248 0 "register_operand" "=x,x")
(if_then_else:SSEMODE1248
(ge:SSEMODE1248
- (match_operand:SSEMODE1248 2 "nonimmediate_operand" "xm,x")
+ (match_operand:SSEMODE1248 2 "nonimmediate_operand" "x,m")
(const_int 0))
(ashift:SSEMODE1248
- (match_operand:SSEMODE1248 1 "nonimmediate_operand" "x,xm")
+ (match_operand:SSEMODE1248 1 "nonimmediate_operand" "xm,x")
(match_dup 2))
(ashiftrt:SSEMODE1248
(match_dup 1)
@@ -11673,10 +11655,10 @@
[(set (match_operand:SSEMODE1248 0 "register_operand" "=x,x")
(if_then_else:SSEMODE1248
(ge:SSEMODE1248
- (match_operand:SSEMODE1248 2 "nonimmediate_operand" "xm,x")
+ (match_operand:SSEMODE1248 2 "nonimmediate_operand" "x,m")
(const_int 0))
(ashift:SSEMODE1248
- (match_operand:SSEMODE1248 1 "nonimmediate_operand" "x,xm")
+ (match_operand:SSEMODE1248 1 "nonimmediate_operand" "xm,x")
(match_dup 2))
(lshiftrt:SSEMODE1248
(match_dup 1)
diff --git a/gcc/config/openbsd-stdint.h b/gcc/config/openbsd-stdint.h
index de36455393c..ab1f9cfffc6 100644
--- a/gcc/config/openbsd-stdint.h
+++ b/gcc/config/openbsd-stdint.h
@@ -5,18 +5,18 @@
#define INT32_TYPE "int"
#define INT64_TYPE "long long int"
#define UINT8_TYPE "unsigned char"
-#define UINT16_TYPE "unsigned short int"
+#define UINT16_TYPE "short unsigned int"
#define UINT32_TYPE "unsigned int"
-#define UINT64_TYPE "unsigned long long int"
+#define UINT64_TYPE "long long unsigned int"
#define INT_LEAST8_TYPE "signed char"
#define INT_LEAST16_TYPE "short int"
#define INT_LEAST32_TYPE "int"
#define INT_LEAST64_TYPE "long long int"
#define UINT_LEAST8_TYPE "unsigned char"
-#define UINT_LEAST16_TYPE "unsigned short int"
+#define UINT_LEAST16_TYPE "short unsigned int"
#define UINT_LEAST32_TYPE "unsigned int"
-#define UINT_LEAST64_TYPE "unsigned long long int"
+#define UINT_LEAST64_TYPE "long long unsigned int"
#define INT_FAST8_TYPE "int"
#define INT_FAST16_TYPE "int"
@@ -25,7 +25,7 @@
#define UINT_FAST8_TYPE "unsigned int"
#define UINT_FAST16_TYPE "unsigned int"
#define UINT_FAST32_TYPE "unsigned int"
-#define UINT_FAST64_TYPE "unsigned long long int"
+#define UINT_FAST64_TYPE "long long unsigned int"
#define INTPTR_TYPE "long int"
-#define UINTPTR_TYPE "unsigned long int"
+#define UINTPTR_TYPE "long unsigned int"
diff --git a/gcc/configure b/gcc/configure
index d9bd245dcea..1ea172a0d35 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -824,6 +824,7 @@ gcc_cv_objdump
ORIGINAL_NM_FOR_TARGET
gcc_cv_nm
ORIGINAL_LD_FOR_TARGET
+ORIGINAL_PLUGIN_LD_FOR_TARGET
gcc_cv_ld
ORIGINAL_AS_FOR_TARGET
gcc_cv_as
@@ -1038,6 +1039,7 @@ enable_static
with_pic
enable_fast_install
enable_libtool_lock
+with_plugin_ld
enable_gnu_unique_object
enable_linker_build_id
with_long_double_128
@@ -1784,6 +1786,7 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-plugin-ld=[ARG] specify the plugin linker
--with-long-double-128 Use 128-bit long double by default.
--with-gc={page,zone} choose the garbage collection mechanism to use
with the compiler
@@ -11578,13 +11581,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:11581: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:11584: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:11584: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:11587: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:11587: output\"" >&5)
+ (eval echo "\"\$as_me:11590: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -12789,7 +12792,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 12792 "configure"' > conftest.$ac_ext
+ echo '#line 12795 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -14449,11 +14452,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14452: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14455: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14456: \$? = $ac_status" >&5
+ echo "$as_me:14459: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14788,11 +14791,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14791: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14794: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14795: \$? = $ac_status" >&5
+ echo "$as_me:14798: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14893,11 +14896,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14896: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14899: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14900: \$? = $ac_status" >&5
+ echo "$as_me:14903: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14948,11 +14951,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14951: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14954: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14955: \$? = $ac_status" >&5
+ echo "$as_me:14958: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17330,7 +17333,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17333 "configure"
+#line 17336 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17426,7 +17429,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17429 "configure"
+#line 17432 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19382,11 +19385,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19385: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19388: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:19389: \$? = $ac_status" >&5
+ echo "$as_me:19392: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -19481,11 +19484,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19484: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19487: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:19488: \$? = $ac_status" >&5
+ echo "$as_me:19491: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -19533,11 +19536,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19536: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19539: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:19540: \$? = $ac_status" >&5
+ echo "$as_me:19543: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -20692,6 +20695,24 @@ fi
fi
fi
+ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
+PLUGIN_LD=`basename $gcc_cv_ld`
+
+# Check whether --with-plugin-ld was given.
+if test "${with_plugin_ld+set}" = set; then :
+ withval=$with_plugin_ld; if test x"$withval" != x; then
+ ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval"
+ PLUGIN_LD="$withval"
+ fi
+fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PLUGIN_LD "$PLUGIN_LD"
+_ACEOF
+
+
ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
case "$ORIGINAL_LD_FOR_TARGET" in
diff --git a/gcc/configure.ac b/gcc/configure.ac
index b509ad44652..17cfe835b8c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1915,6 +1915,17 @@ else
AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET)
fi])
+ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
+PLUGIN_LD=`basename $gcc_cv_ld`
+AC_ARG_WITH(plugin-ld,
+[ --with-plugin-ld=[[ARG]] specify the plugin linker],
+[if test x"$withval" != x; then
+ ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval"
+ PLUGIN_LD="$withval"
+ fi])
+AC_SUBST(ORIGINAL_PLUGIN_LD_FOR_TARGET)
+AC_DEFINE_UNQUOTED(PLUGIN_LD, "$PLUGIN_LD", [Specify plugin linker])
+
ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
AC_SUBST(ORIGINAL_LD_FOR_TARGET)
case "$ORIGINAL_LD_FOR_TARGET" in
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6d7fd34cb61..24da7cf5f3c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,60 @@
+2009-11-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/41972
+ * parser.c (cp_parser_template_argument): Accept SCOPE_REF around
+ VAR_DECL.
+
+ PR c++/41994
+ * pt.c (tsubst_baselink): tsubst the name.
+
+2009-11-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/37920
+ * pt.c (tsubst) [TYPEOF_TYPE]: Set cp_unevaluated_operand.
+
+ PR c++/18451
+ PR c++/40738
+ * cp-tree.h (cp_decl_specifier_seq): Add any_type_specifiers_p.
+ * parser.c (cp_parser_single_declaration): Call
+ cp_parser_parse_and_diagnose_invalid_type_name here, too.
+ (cp_parser_parameter_declaration): And here.
+ (cp_parser_parse_and_diagnose_invalid_type_name): Be
+ less picky about declarator form. Don't skip to
+ the end of the block if we're in a declarator.
+ (cp_parser_decl_specifier_seq): Set any_type_specifiers_p.
+ (cp_parser_simple_declaration): Check it.
+ (cp_parser_member_declaration): Likewise.
+ (cp_parser_diagnose_invalid_type_name): Tweak error message.
+ (cp_parser_expression_statement): Likewise.
+ * decl2.c (grokfield): Mention decltype instead of typeof.
+
+2009-11-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/15946
+ * parser.c (cp_parser_check_template_parameters): Don't talk about
+ specialization at function scope.
+ (cp_parser_diagnose_invalid_type_name): Handle dependent scope.
+ (cp_parser_parse_and_diagnose_invalid_type_name): Likewise.
+ (cp_parser_expression_statement): Suggest typename.
+ * error.c (dump_decl) [SCOPE_REF]: Print the type here.
+ (dump_expr) [SCOPE_REF]: Call it.
+ (dump_type) [UNBOUND_CLASS_TEMPLATE]: Check TFF_UNQUALIFIED_NAME.
+ * cxx-pretty-print.c (pp_cxx_unqualified_id): Print class template
+ args.
+
+ PR c++/9381
+ * decl2.c (build_memfn_type): Preserve attributes.
+ (cp_reconstruct_complex_type): Likewise.
+ (maybe_retrofit_in_chrg): Likewise.
+ * class.c (adjust_clone_args): Likewise.
+ * call.c (standard_conversion): Use build_memfn_type.
+ * pt.c (tsubst): Likewise.
+ * decl.c (build_ptrmem_type): Likewise
+ (check_function_type): Preserve attributes.
+ * tree.c (cp_build_type_attribute_variant): Propagate exception
+ specs on METHOD_TYPE, too.
+ (strip_typedefs): Preserve exception specs and attributes.
+
2009-11-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/41536
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 0979f3ab0ff..1aebaac8cd5 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -896,10 +896,7 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
|| cp_type_quals (fbase) != cp_type_quals (tbase))
return NULL;
- from = cp_build_qualified_type (tbase, cp_type_quals (fbase));
- from = build_method_type_directly (from,
- TREE_TYPE (fromfn),
- TREE_CHAIN (TYPE_ARG_TYPES (fromfn)));
+ from = build_memfn_type (fromfn, tbase, cp_type_quals (tbase));
from = build_ptrmemfunc_type (build_pointer_type (from));
conv = build_conv (ck_pmem, from, conv);
conv->base_p = true;
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 4020144e815..c798ba2833f 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -4104,6 +4104,7 @@ adjust_clone_args (tree decl)
/* A default parameter has been added. Adjust the
clone's parameters. */
tree exceptions = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (clone));
+ tree attrs = TYPE_ATTRIBUTES (TREE_TYPE (clone));
tree basetype = TYPE_METHOD_BASETYPE (TREE_TYPE (clone));
tree type;
@@ -4121,6 +4122,8 @@ adjust_clone_args (tree decl)
clone_parms);
if (exceptions)
type = build_exception_variant (type, exceptions);
+ if (attrs)
+ type = cp_build_type_attribute_variant (type, attrs);
TREE_TYPE (clone) = type;
clone_parms = NULL_TREE;
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index c4b088beb56..68be9345471 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4267,6 +4267,8 @@ typedef struct cp_decl_specifier_seq {
BOOL_BITFIELD conflicting_specifiers_p : 1;
/* True iff at least one decl-specifier was found. */
BOOL_BITFIELD any_specifiers_p : 1;
+ /* True iff at least one type-specifier was found. */
+ BOOL_BITFIELD any_type_specifiers_p : 1;
/* True iff "int" was explicitly provided. */
BOOL_BITFIELD explicit_int_p : 1;
/* True iff "char" was explicitly provided. */
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index 1d7f9cf2caf..4851af901f7 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -200,6 +200,12 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
case TYPENAME_TYPE:
case UNBOUND_CLASS_TEMPLATE:
pp_cxx_unqualified_id (pp, TYPE_NAME (t));
+ if (CLASS_TYPE_P (t) && CLASSTYPE_USE_TEMPLATE (t))
+ {
+ pp_cxx_begin_template_argument_list (pp);
+ pp_cxx_template_argument_list (pp, CLASSTYPE_TI_ARGS (t));
+ pp_cxx_end_template_argument_list (pp);
+ }
break;
case BIT_NOT_EXPR:
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 97f1ac1f4f3..5e2f85fd9d4 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -7170,16 +7170,9 @@ build_ptrmem_type (tree class_type, tree member_type)
{
if (TREE_CODE (member_type) == METHOD_TYPE)
{
- tree arg_types;
-
- arg_types = TYPE_ARG_TYPES (member_type);
- class_type = (cp_build_qualified_type
- (class_type,
- cp_type_quals (TREE_TYPE (TREE_VALUE (arg_types)))));
- member_type
- = build_method_type_directly (class_type,
- TREE_TYPE (member_type),
- TREE_CHAIN (arg_types));
+ tree arg_types = TYPE_ARG_TYPES (member_type);
+ cp_cv_quals quals = cp_type_quals (TREE_TYPE (TREE_VALUE (arg_types)));
+ member_type = build_memfn_type (member_type, class_type, quals);
return build_ptrmemfunc_type (build_pointer_type (member_type));
}
else
@@ -11551,7 +11544,7 @@ lookup_enumerator (tree enumtype, tree name)
}
-/* We're defining DECL. Make sure that it's type is OK. */
+/* We're defining DECL. Make sure that its type is OK. */
static void
check_function_type (tree decl, tree current_function_parms)
@@ -11585,9 +11578,12 @@ check_function_type (tree decl, tree current_function_parms)
TREE_CHAIN (args));
else
fntype = build_function_type (void_type_node, args);
- TREE_TYPE (decl)
+ fntype
= build_exception_variant (fntype,
TYPE_RAISES_EXCEPTIONS (TREE_TYPE (decl)));
+ fntype = (cp_build_type_attribute_variant
+ (fntype, TYPE_ATTRIBUTES (TREE_TYPE (decl))));
+ TREE_TYPE (decl) = fntype;
}
else
abstract_virtuals_error (decl, TREE_TYPE (fntype));
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index dbb9fb47a64..ba987f7888c 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -114,20 +114,27 @@ tree
build_memfn_type (tree fntype, tree ctype, cp_cv_quals quals)
{
tree raises;
+ tree attrs;
int type_quals;
if (fntype == error_mark_node || ctype == error_mark_node)
return error_mark_node;
+ gcc_assert (TREE_CODE (fntype) == FUNCTION_TYPE
+ || TREE_CODE (fntype) == METHOD_TYPE);
+
type_quals = quals & ~TYPE_QUAL_RESTRICT;
ctype = cp_build_qualified_type (ctype, type_quals);
+ raises = TYPE_RAISES_EXCEPTIONS (fntype);
+ attrs = TYPE_ATTRIBUTES (fntype);
fntype = build_method_type_directly (ctype, TREE_TYPE (fntype),
(TREE_CODE (fntype) == METHOD_TYPE
? TREE_CHAIN (TYPE_ARG_TYPES (fntype))
: TYPE_ARG_TYPES (fntype)));
- raises = TYPE_RAISES_EXCEPTIONS (fntype);
if (raises)
fntype = build_exception_variant (fntype, raises);
+ if (attrs)
+ fntype = cp_build_type_attribute_variant (fntype, attrs);
return fntype;
}
@@ -237,6 +244,9 @@ maybe_retrofit_in_chrg (tree fn)
if (TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn)))
fntype = build_exception_variant (fntype,
TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn)));
+ if (TYPE_ATTRIBUTES (TREE_TYPE (fn)))
+ fntype = (cp_build_type_attribute_variant
+ (fntype, TYPE_ATTRIBUTES (TREE_TYPE (fn))));
TREE_TYPE (fn) = fntype;
/* Now we've got the in-charge parameter. */
@@ -779,7 +789,7 @@ grokfield (const cp_declarator *declarator,
if (TREE_CODE (value) == TYPE_DECL && init)
{
- error ("typedef %qD is initialized (use __typeof__ instead)", value);
+ error ("typedef %qD is initialized (use decltype instead)", value);
init = NULL_TREE;
}
@@ -1219,6 +1229,8 @@ cp_reconstruct_complex_type (tree type, tree bottom)
else
return bottom;
+ if (TYPE_ATTRIBUTES (type))
+ outer = cp_build_type_attribute_variant (outer, TYPE_ATTRIBUTES (type));
return cp_build_qualified_type (outer, TYPE_QUALS (type));
}
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index ce5660f4a85..f4232075119 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -466,8 +466,11 @@ dump_type (tree t, int flags)
break;
case UNBOUND_CLASS_TEMPLATE:
- dump_type (TYPE_CONTEXT (t), flags);
- pp_cxx_colon_colon (cxx_pp);
+ if (! (flags & TFF_UNQUALIFIED_NAME))
+ {
+ dump_type (TYPE_CONTEXT (t), flags);
+ pp_cxx_colon_colon (cxx_pp);
+ }
pp_cxx_ws_string (cxx_pp, "template");
dump_type (DECL_NAME (TYPE_NAME (t)), flags);
break;
@@ -947,7 +950,9 @@ dump_decl (tree t, int flags)
break;
case SCOPE_REF:
- pp_expression (cxx_pp, t);
+ dump_type (TREE_OPERAND (t, 0), flags);
+ pp_string (cxx_pp, "::");
+ dump_decl (TREE_OPERAND (t, 1), flags|TFF_UNQUALIFIED_NAME);
break;
case ARRAY_REF:
@@ -2219,6 +2224,9 @@ dump_expr (tree t, int flags)
break;
case SCOPE_REF:
+ dump_decl (t, flags);
+ break;
+
case EXPR_PACK_EXPANSION:
case TYPEID_EXPR:
case MEMBER_REF:
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 1d677cb92eb..3475723f0be 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -2400,6 +2400,11 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser,
if (TREE_CODE (parser->scope) == NAMESPACE_DECL)
error_at (location, "%qE in namespace %qE does not name a type",
id, parser->scope);
+ else if (TYPE_P (parser->scope)
+ && dependent_scope_p (parser->scope))
+ error_at (location, "need %<typename%> before %<%T::%E%> because "
+ "%qT is a dependent scope",
+ parser->scope, id, parser->scope);
else if (TYPE_P (parser->scope))
error_at (location, "%qE in class %qT does not name a type",
id, parser->scope);
@@ -2432,12 +2437,9 @@ cp_parser_parse_and_diagnose_invalid_type_name (cp_parser *parser)
/*template_p=*/NULL,
/*declarator_p=*/true,
/*optional_p=*/false);
- /* After the id-expression, there should be a plain identifier,
- otherwise this is not a simple variable declaration. Also, if
- the scope is dependent, we cannot do much. */
- if (!cp_lexer_next_token_is (parser->lexer, CPP_NAME)
- || (parser->scope && TYPE_P (parser->scope)
- && dependent_type_p (parser->scope))
+ /* If the next token is a (, this is a function with no explicit return
+ type, i.e. constructor, destructor or conversion op. */
+ if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN)
|| TREE_CODE (id) == TYPE_DECL)
{
cp_parser_abort_tentative_parse (parser);
@@ -2449,9 +2451,11 @@ cp_parser_parse_and_diagnose_invalid_type_name (cp_parser *parser)
/* Emit a diagnostic for the invalid type. */
cp_parser_diagnose_invalid_type_name (parser, parser->scope,
id, token->location);
- /* Skip to the end of the declaration; there's no point in
- trying to process it. */
- cp_parser_skip_to_end_of_block_or_statement (parser);
+ /* If we aren't in the middle of a declarator (i.e. in a
+ parameter-declaration-clause), skip to the end of the declaration;
+ there's no point in trying to process it. */
+ if (!parser->in_declarator_p)
+ cp_parser_skip_to_end_of_block_or_statement (parser);
return true;
}
@@ -7760,12 +7764,21 @@ static tree
cp_parser_expression_statement (cp_parser* parser, tree in_statement_expr)
{
tree statement = NULL_TREE;
+ cp_token *token = cp_lexer_peek_token (parser->lexer);
/* If the next token is a ';', then there is no expression
statement. */
if (cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON))
statement = cp_parser_expression (parser, /*cast_p=*/false, NULL);
+ /* Give a helpful message for "A<T>::type t;" */
+ if (cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON)
+ && !cp_parser_uncommitted_to_tentative_parse_p (parser)
+ && TREE_CODE (statement) == SCOPE_REF)
+ error_at (token->location, "need %<typename%> before %qE because "
+ "%qT is a dependent scope",
+ statement, TREE_OPERAND (statement, 0));
+
/* Consume the final `;'. */
cp_parser_consume_semicolon_at_end_of_statement (parser);
@@ -8835,7 +8848,7 @@ cp_parser_simple_declaration (cp_parser* parser,
T t;
where "T" should name a type -- but does not. */
- if (!decl_specifiers.type
+ if (!decl_specifiers.any_type_specifiers_p
&& cp_parser_parse_and_diagnose_invalid_type_name (parser))
{
/* If parsing tentatively, we should commit; we really are
@@ -9200,6 +9213,8 @@ cp_parser_decl_specifier_seq (cp_parser* parser,
{
constructor_possible_p = false;
found_decl_spec = true;
+ if (!is_cv_qualifier)
+ decl_specs->any_type_specifiers_p = true;
}
}
@@ -11353,18 +11368,26 @@ cp_parser_template_argument (cp_parser* parser)
cp_parser_abort_tentative_parse (parser);
else
{
+ tree probe;
+
if (TREE_CODE (argument) == INDIRECT_REF)
{
gcc_assert (REFERENCE_REF_P (argument));
argument = TREE_OPERAND (argument, 0);
}
- if (TREE_CODE (argument) == VAR_DECL)
+ /* If we're in a template, we represent a qualified-id referring
+ to a static data member as a SCOPE_REF even if the scope isn't
+ dependent so that we can check access control later. */
+ probe = argument;
+ if (TREE_CODE (probe) == SCOPE_REF)
+ probe = TREE_OPERAND (probe, 1);
+ if (TREE_CODE (probe) == VAR_DECL)
{
/* A variable without external linkage might still be a
valid constant-expression, so no error is issued here
if the external-linkage check fails. */
- if (!address_p && !DECL_EXTERNAL_LINKAGE_P (argument))
+ if (!address_p && !DECL_EXTERNAL_LINKAGE_P (probe))
cp_parser_simulate_error (parser);
}
else if (is_overloaded_fn (argument))
@@ -14962,6 +14985,11 @@ cp_parser_parameter_declaration (cp_parser *parser,
CP_PARSER_FLAGS_NONE,
&decl_specifiers,
&declares_class_or_enum);
+
+ /* Complain about missing 'typename' or other invalid type names. */
+ if (!decl_specifiers.any_type_specifiers_p)
+ cp_parser_parse_and_diagnose_invalid_type_name (parser);
+
/* If an error occurred, there's no reason to attempt to parse the
rest of the declaration. */
if (cp_parser_error_occurred (parser))
@@ -16512,7 +16540,7 @@ cp_parser_member_declaration (cp_parser* parser)
prefix_attributes = decl_specifiers.attributes;
decl_specifiers.attributes = NULL_TREE;
/* Check for an invalid type-name. */
- if (!decl_specifiers.type
+ if (!decl_specifiers.any_type_specifiers_p
&& cp_parser_parse_and_diagnose_invalid_type_name (parser))
return;
/* If there is no declarator, then the decl-specifier-seq should
@@ -18197,11 +18225,15 @@ cp_parser_check_template_parameters (cp_parser* parser,
template <class T> void S<T>::R<T>::f (); */
if (parser->num_template_parameter_lists < num_templates)
{
- if (declarator)
+ if (declarator && !current_function_decl)
error_at (location, "specializing member %<%T::%E%> "
"requires %<template<>%> syntax",
declarator->u.id.qualifying_scope,
declarator->u.id.unqualified_name);
+ else if (declarator)
+ error_at (location, "invalid declaration of %<%T::%E%>",
+ declarator->u.id.qualifying_scope,
+ declarator->u.id.unqualified_name);
else
error_at (location, "too few template-parameter-lists");
return false;
@@ -18760,6 +18792,11 @@ cp_parser_single_declaration (cp_parser* parser,
cp_parser_perform_template_parameter_access_checks (checks);
}
}
+
+ /* Complain about missing 'typename' or other invalid type names. */
+ if (!decl_specifiers.any_type_specifiers_p)
+ cp_parser_parse_and_diagnose_invalid_type_name (parser);
+
/* If it's not a template class, try for a template function. If
the next token is a `;', then this declaration does not declare
anything. But, if there were errors in the decl-specifiers, then
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 75180eabbe8..3efeda80fe6 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -10015,13 +10015,8 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
{
/* The type of the implicit object parameter gets its
cv-qualifiers from the FUNCTION_TYPE. */
- tree method_type;
- tree this_type = cp_build_qualified_type (TYPE_MAIN_VARIANT (r),
- cp_type_quals (type));
tree memptr;
- method_type = build_method_type_directly (this_type,
- TREE_TYPE (type),
- TYPE_ARG_TYPES (type));
+ tree method_type = build_memfn_type (type, r, cp_type_quals (type));
memptr = build_ptrmemfunc_type (build_pointer_type (method_type));
return cp_build_qualified_type_real (memptr, cp_type_quals (t),
complain);
@@ -10225,10 +10220,17 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
{
tree type;
- type = finish_typeof (tsubst_expr
- (TYPEOF_TYPE_EXPR (t), args,
- complain, in_decl,
- /*integral_constant_expression_p=*/false));
+ ++cp_unevaluated_operand;
+ ++c_inhibit_evaluation_warnings;
+
+ type = tsubst_expr (TYPEOF_TYPE_EXPR (t), args,
+ complain, in_decl,
+ /*integral_constant_expression_p=*/false);
+
+ --cp_unevaluated_operand;
+ --c_inhibit_evaluation_warnings;
+
+ type = finish_typeof (type);
return cp_build_qualified_type_real (type,
cp_type_quals (t)
| cp_type_quals (type),
@@ -10316,7 +10318,7 @@ tsubst_baselink (tree baselink, tree object_type,
qualifying_scope = tsubst (qualifying_scope, args,
complain, in_decl);
fns = BASELINK_FUNCTIONS (baselink);
- optype = BASELINK_OPTYPE (baselink);
+ optype = tsubst (BASELINK_OPTYPE (baselink), args, complain, in_decl);
if (TREE_CODE (fns) == TEMPLATE_ID_EXPR)
{
template_id_p = true;
@@ -10327,6 +10329,8 @@ tsubst_baselink (tree baselink, tree object_type,
complain, in_decl);
}
name = DECL_NAME (get_first_fn (fns));
+ if (IDENTIFIER_TYPENAME_P (name))
+ name = mangle_conv_op_name_for_type (optype);
baselink = lookup_fnfields (qualifying_scope, name, /*protect=*/1);
/* If lookup found a single function, mark it as used at this
@@ -10345,8 +10349,7 @@ tsubst_baselink (tree baselink, tree object_type,
BASELINK_FUNCTIONS (baselink),
template_args);
/* Update the conversion operator type. */
- BASELINK_OPTYPE (baselink)
- = tsubst (optype, args, complain, in_decl);
+ BASELINK_OPTYPE (baselink) = optype;
if (!object_type)
object_type = current_class_type;
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index b79093a36d5..5aea55e792f 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1050,6 +1050,10 @@ strip_typedefs (tree t)
else
result = build_function_type (type,
arg_types);
+
+ if (TYPE_RAISES_EXCEPTIONS (t))
+ result = build_exception_variant (result,
+ TYPE_RAISES_EXCEPTIONS (t));
}
break;
default:
@@ -1058,6 +1062,8 @@ strip_typedefs (tree t)
if (!result)
result = TYPE_MAIN_VARIANT (t);
+ if (TYPE_ATTRIBUTES (t))
+ result = cp_build_type_attribute_variant (result, TYPE_ATTRIBUTES (t));
return cp_build_qualified_type (result, cp_type_quals (t));
}
@@ -2609,7 +2615,8 @@ cp_build_type_attribute_variant (tree type, tree attributes)
tree new_type;
new_type = build_type_attribute_variant (type, attributes);
- if (TREE_CODE (new_type) == FUNCTION_TYPE
+ if ((TREE_CODE (new_type) == FUNCTION_TYPE
+ || TREE_CODE (new_type) == METHOD_TYPE)
&& (TYPE_RAISES_EXCEPTIONS (new_type)
!= TYPE_RAISES_EXCEPTIONS (type)))
new_type = build_exception_variant (new_type,
diff --git a/gcc/dce.c b/gcc/dce.c
index b937dd44a19..a2c6973f53f 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -738,9 +738,9 @@ struct rtl_opt_pass pass_ud_rtl_dce =
{
{
RTL_PASS,
- "dce", /* name */
- gate_ud_dce, /* gate */
- rest_of_handle_ud_dce, /* execute */
+ "ud dce", /* name */
+ gate_ud_dce, /* gate */
+ rest_of_handle_ud_dce, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
@@ -1123,7 +1123,7 @@ struct rtl_opt_pass pass_fast_rtl_dce =
{
{
RTL_PASS,
- "dce", /* name */
+ "rtl dce", /* name */
gate_fast_dce, /* gate */
rest_of_handle_fast_dce, /* execute */
NULL, /* sub */
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 8057b54df10..a53e7091d95 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -780,7 +780,7 @@ struct rtl_opt_pass pass_df_initialize_no_opt =
{
{
RTL_PASS,
- "dfinit", /* name */
+ "no-opt dfinit", /* name */
gate_no_opt, /* gate */
rest_of_handle_df_initialize, /* execute */
NULL, /* sub */
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index e9896e311d1..5aad97afeaf 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -3722,9 +3722,11 @@ df_note_add_problem (void)
You can either simulate in the forwards direction, starting from
the top of a block or the backwards direction from the end of the
- block. The main difference is that if you go forwards, the uses
- are examined first then the defs, and if you go backwards, the defs
- are examined first then the uses.
+ block. If you go backwards, defs are examined first to clear bits,
+ then uses are examined to set bits. If you go forwards, defs are
+ examined first to set bits, then REG_DEAD and REG_UNUSED notes
+ are examined to clear bits. In either case, the result of examining
+ a def can be undone (respectively by a use or a REG_UNUSED note).
If you start at the top of the block, use one of DF_LIVE_IN or
DF_LR_IN. If you start at the bottom of the block use one of
@@ -3814,7 +3816,7 @@ df_simulate_fixup_sets (basic_block bb, bitmap live)
df_simulate_initialize_backwards should be called first with a
bitvector copyied from the DF_LIVE_OUT or DF_LR_OUT. Then
df_simulate_one_insn_backwards should be called for each insn in
- the block, starting with the last on. Finally,
+ the block, starting with the last one. Finally,
df_simulate_finalize_backwards can be called to get a new value
of the sets at the top of the block (this is rarely used).
----------------------------------------------------------------------------*/
@@ -3896,13 +3898,16 @@ df_simulate_finalize_backwards (basic_block bb, bitmap live)
df_simulate_initialize_forwards should be called first with a
bitvector copyied from the DF_LIVE_IN or DF_LR_IN. Then
df_simulate_one_insn_forwards should be called for each insn in
- the block, starting with the last on. Finally,
- df_simulate_finalize_forwards can be called to get a new value
- of the sets at the bottom of the block (this is rarely used).
+ the block, starting with the first one.
----------------------------------------------------------------------------*/
-/* Apply the artificial uses and defs at the top of BB in a backwards
- direction. */
+/* Apply the artificial uses and defs at the top of BB in a forwards
+ direction. ??? This is wrong; defs mark the point where a pseudo
+ becomes live when scanning forwards (unless a def is unused). Since
+ there are no REG_UNUSED notes for artificial defs, passes that
+ require artificial defs probably should not call this function
+ unless (as is the case for fwprop) they are correct when liveness
+ bitmaps are *under*estimated. */
void
df_simulate_initialize_forwards (basic_block bb, bitmap live)
@@ -3918,7 +3923,7 @@ df_simulate_initialize_forwards (basic_block bb, bitmap live)
}
}
-/* Simulate the backwards effects of INSN on the bitmap LIVE. */
+/* Simulate the forwards effects of INSN on the bitmap LIVE. */
void
df_simulate_one_insn_forwards (basic_block bb, rtx insn, bitmap live)
@@ -3927,10 +3932,15 @@ df_simulate_one_insn_forwards (basic_block bb, rtx insn, bitmap live)
if (! INSN_P (insn))
return;
- /* Make sure that the DF_NOTES really is an active df problem. */
+ /* Make sure that DF_NOTE really is an active df problem. */
gcc_assert (df_note);
- df_simulate_defs (insn, live);
+ /* Note that this is the opposite as how the problem is defined, because
+ in the LR problem defs _kill_ liveness. However, they do so backwards,
+ while here the scan is performed forwards! So, first assume that the
+ def is live, and if this is not true REG_UNUSED notes will rectify the
+ situation. */
+ df_simulate_find_defs (insn, live);
/* Clear all of the registers that go dead. */
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
@@ -3960,24 +3970,6 @@ df_simulate_one_insn_forwards (basic_block bb, rtx insn, bitmap live)
}
-/* Apply the artificial uses and defs at the end of BB in a backwards
- direction. */
-
-void
-df_simulate_finalize_forwards (basic_block bb, bitmap live)
-{
- df_ref *def_rec;
- int bb_index = bb->index;
-
- for (def_rec = df_get_artificial_defs (bb_index); *def_rec; def_rec++)
- {
- df_ref def = *def_rec;
- if ((DF_REF_FLAGS (def) & DF_REF_AT_TOP) == 0)
- bitmap_clear_bit (live, DF_REF_REGNO (def));
- }
-}
-
-
/*----------------------------------------------------------------------------
MULTIPLE DEFINITIONS
diff --git a/gcc/df.h b/gcc/df.h
index 633bf282d69..0614983bc7d 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -985,7 +985,6 @@ extern void df_simulate_one_insn_backwards (basic_block, rtx, bitmap);
extern void df_simulate_finalize_backwards (basic_block, bitmap);
extern void df_simulate_initialize_forwards (basic_block, bitmap);
extern void df_simulate_one_insn_forwards (basic_block, rtx, bitmap);
-extern void df_simulate_finalize_forwards (basic_block, bitmap);
/* Functions defined in df-scan.c. */
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e09c9ee6685..c9c759d5769 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -960,8 +960,9 @@ direct conversion.
ARM provides hardware support for conversions between
@code{__fp16} and @code{float} values
as an extension to VFP and NEON (Advanced SIMD). GCC generates
-code using the instructions provided by this extension if you compile
-with the options @option{-mfpu=neon-fp16 -mfloat-abi=softfp},
+code using these hardware instructions if you compile with
+options to select an FPU that provides them;
+for example, @option{-mfpu=neon-fp16 -mfloat-abi=softfp},
in addition to the @option{-mfp16-format} option to select
a half-precision format.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4b7f0fd58be..2869ade911e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -9793,10 +9793,12 @@ of the @option{-mcpu=} option. Permissible names are: @samp{armv2},
@opindex mfp
This specifies what floating point hardware (or hardware emulation) is
available on the target. Permissible names are: @samp{fpa}, @samp{fpe2},
-@samp{fpe3}, @samp{maverick}, @samp{vfp}, @samp{vfpv3}, @samp{vfpv3-d16},
-@samp{neon}, and @samp{neon-fp16}. @option{-mfp} and @option{-mfpe}
-are synonyms for @option{-mfpu}=@samp{fpe}@var{number}, for compatibility
-with older versions of GCC@.
+@samp{fpe3}, @samp{maverick}, @samp{vfp}, @samp{vfpv3}, @samp{vfpv3-fp16},
+@samp{vfpv3-d16}, @samp{vfpv3-d16-fp16}, @samp{vfpv3xd}, @samp{vfpv3xd-fp16},
+@samp{neon}, and @samp{neon-fp16}.
+@option{-mfp} and @option{-mfpe} are synonyms for
+@option{-mfpu}=@samp{fpe}@var{number}, for compatibility with older versions
+of GCC@.
If @option{-msoft-float} is specified this specifies the format of
floating point values.
diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi
index b28b87cb57a..2bbddeab520 100644
--- a/gcc/doc/passes.texi
+++ b/gcc/doc/passes.texi
@@ -166,9 +166,14 @@ not attempt to (re-)generate data structures or lower intermediate
language form based on the requirements of the next pass. Nevertheless,
what is present is useful, and a far sight better than nothing at all.
+Each pass should have a unique name.
Each pass may have its own dump file (for GCC debugging purposes).
-Passes without any names, or with a name starting with a star, do not
-dump anything.
+Passes with a name starting with a star do not dump anything.
+Sometimes passes are supposed to share a dump file / option name.
+To still give these unique names, you can use a prefix that is delimited
+by a space from the part that is used for the dump file / option name.
+E.g. When the pass name is "ud dce", the name used for dump file/options
+is "dce".
TODO: describe the global variables set up by the pass manager,
and a brief description of how a new pass should use it.
diff --git a/gcc/except.c b/gcc/except.c
index b25e48b6c9b..6c7618339e5 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1465,7 +1465,7 @@ struct rtl_opt_pass pass_rtl_eh =
{
{
RTL_PASS,
- "eh", /* name */
+ "rtl eh", /* name */
gate_handle_eh, /* gate */
rest_of_handle_eh, /* execute */
NULL, /* sub */
diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in
index f585163405d..a1468999b59 100644
--- a/gcc/exec-tool.in
+++ b/gcc/exec-tool.in
@@ -21,6 +21,7 @@
ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@"
ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@"
+ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@"
ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@"
exeext=@host_exeext@
fast_install=@enable_fast_install@
@@ -34,7 +35,13 @@ case "$invoked" in
dir=gas
;;
collect-ld)
- original=$ORIGINAL_LD_FOR_TARGET
+ # when using a linker plugin, gcc will always pass '-plugin' as the
+ # first option to the linker.
+ if test x"$1" = "x-plugin"; then
+ original=$ORIGINAL_PLUGIN_LD_FOR_TARGET
+ else
+ original=$ORIGINAL_LD_FOR_TARGET
+ fi
prog=ld-new$exeext
dir=ld
;;
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index eef8cf8d5a0..a759edb44aa 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,13 @@
+2009-11-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/41909
+ * resolve.c (is_illegal_recursion): Return false if sym is program.
+
+2009-11-06 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ * resolve.c (check_typebound_override): Remove duplicate "in" in error
+ message.
+
2009-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/41918
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index a721d944b33..d9a53e2fa95 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1117,6 +1117,9 @@ is_illegal_recursion (gfc_symbol* sym, gfc_namespace* context)
gfc_symbol* context_proc;
gfc_namespace* real_context;
+ if (sym->attr.flavor == FL_PROGRAM)
+ return false;
+
gcc_assert (sym->attr.flavor == FL_PROCEDURE);
/* If we've got an ENTRY, find real procedure. */
@@ -9480,8 +9483,8 @@ check_typebound_override (gfc_symtree* proc, gfc_symtree* old)
if (proc_pass_arg != argpos && old_pass_arg != argpos
&& !gfc_compare_types (&proc_formal->sym->ts, &old_formal->sym->ts))
{
- gfc_error ("Types mismatch for dummy argument '%s' of '%s' %L in"
- " in respect to the overridden procedure",
+ gfc_error ("Types mismatch for dummy argument '%s' of '%s' %L "
+ "in respect to the overridden procedure",
proc_formal->sym->name, proc->name, &where);
return FAILURE;
}
diff --git a/gcc/function.c b/gcc/function.c
index 35c0cfd609e..d5963430c73 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4228,7 +4228,7 @@ struct rtl_opt_pass pass_init_function =
{
{
RTL_PASS,
- NULL, /* name */
+ "*init_function", /* name */
NULL, /* gate */
init_function_for_compilation, /* execute */
NULL, /* sub */
@@ -5538,7 +5538,7 @@ struct rtl_opt_pass pass_leaf_regs =
{
{
RTL_PASS,
- NULL, /* name */
+ "*leaf_regs", /* name */
NULL, /* gate */
rest_of_handle_check_leaf_regs, /* execute */
NULL, /* sub */
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 7ccb05e1d85..e6514e7cce5 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -5147,7 +5147,7 @@ struct rtl_opt_pass pass_rtl_pre =
{
{
RTL_PASS,
- "pre", /* name */
+ "rtl pre", /* name */
gate_rtl_pre, /* gate */
execute_rtl_pre, /* execute */
NULL, /* sub */
diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index 9c859b24cf3..9365d8110f6 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -68,6 +68,15 @@ Print the Gimple statement that is $ in C syntax.
Works only when an inferior is executing.
end
+define pgq
+set debug_gimple_seq ($)
+end
+
+document pgq
+Print the Gimple sequence that is $ in C syntax.
+Works only when an inferior is executing.
+end
+
define pgs
set debug_generic_stmt ($)
end
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index e78eea2c258..77dea231ed5 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -5045,7 +5045,7 @@ static void
check_regexp_units_distribution (const char *insn_reserv_name,
regexp_t regexp)
{
- int i, j, k, cycle, cycle2, start, n_alts, alt, alt2;
+ int i, j, k, cycle, start, n_alts, alt, alt2;
bool annotation_reservation_message_reported_p;
regexp_t seq, allof, unit;
struct unit_usage *unit_usage_ptr;
@@ -5164,7 +5164,6 @@ check_regexp_units_distribution (const char *insn_reserv_name,
j < (int) VEC_length (unit_usage_t, cycle_alt_unit_usages);
j++)
{
- cycle2 = j / n_alts;
alt2 = j % n_alts;
if (! unit_present_on_list_p
(VEC_index (unit_usage_t, cycle_alt_unit_usages,
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index 37f88f2fcbd..baf249ba3a2 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -1564,6 +1564,8 @@ static void
free_loop_data (struct loop *loop)
{
struct loop_data *data = LOOP_DATA (loop);
+ if (!data)
+ return;
bitmap_clear (&LOOP_DATA (loop)->regs_ref);
bitmap_clear (&LOOP_DATA (loop)->regs_live);
diff --git a/gcc/passes.c b/gcc/passes.c
index 80225490cbd..1cef3499b78 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -314,7 +314,7 @@ struct rtl_opt_pass pass_postreload =
{
{
RTL_PASS,
- NULL, /* name */
+ "*all-postreload", /* name */
gate_postreload, /* gate */
NULL, /* execute */
NULL, /* sub */
@@ -374,7 +374,7 @@ void
register_one_dump_file (struct opt_pass *pass)
{
char *dot_name, *flag_name, *glob_name;
- const char *prefix;
+ const char *name, *prefix;
char num[10];
int flags, id;
@@ -384,7 +384,14 @@ register_one_dump_file (struct opt_pass *pass)
sprintf (num, "%d", ((int) pass->static_pass_number < 0
? 1 : pass->static_pass_number));
- dot_name = concat (".", pass->name, num, NULL);
+ /* The name is both used to identify the pass for the purposes of plugins,
+ and to specify dump file name and option.
+ The latter two might want something short which is not quite unique; for
+ that reason, we may have a disambiguating prefix, followed by a space
+ to mark the start of the following dump file name / option string. */
+ name = strchr (pass->name, ' ');
+ name = name ? name + 1 : pass->name;
+ dot_name = concat (".", name, num, NULL);
if (pass->type == SIMPLE_IPA_PASS || pass->type == IPA_PASS)
prefix = "ipa-", flags = TDF_IPA;
else if (pass->type == GIMPLE_PASS)
@@ -392,8 +399,8 @@ register_one_dump_file (struct opt_pass *pass)
else
prefix = "rtl-", flags = TDF_RTL;
- flag_name = concat (prefix, pass->name, num, NULL);
- glob_name = concat (prefix, pass->name, NULL);
+ flag_name = concat (prefix, name, num, NULL);
+ glob_name = concat (prefix, name, NULL);
id = dump_register (dot_name, flag_name, glob_name, flags);
set_pass_for_id (id, pass);
}
@@ -461,7 +468,7 @@ make_pass_instance (struct opt_pass *pass, bool track_duplicates)
and so it should rename the dump file. The first instance will
be -1, and be number of duplicates = -static_pass_number - 1.
Subsequent instances will be > 0 and just the duplicate number. */
- if (pass->name || track_duplicates)
+ if ((pass->name && pass->name[0] != '*') || track_duplicates)
{
pass->static_pass_number -= 1;
new_pass->static_pass_number = -pass->static_pass_number;
@@ -482,6 +489,9 @@ make_pass_instance (struct opt_pass *pass, bool track_duplicates)
static struct opt_pass **
next_pass_1 (struct opt_pass **list, struct opt_pass *pass)
{
+ /* Every pass should have a name so that plugins can refer to them. */
+ gcc_assert (pass->name != NULL);
+
*list = make_pass_instance (pass, false);
return &(*list)->next;
diff --git a/gcc/predict.c b/gcc/predict.c
index 6353fb96a56..becff10615b 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -2246,7 +2246,7 @@ struct gimple_opt_pass pass_strip_predict_hints =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*strip_predict_hints", /* name */
NULL, /* gate */
strip_predict_hints, /* execute */
NULL, /* sub */
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 7e4ba6cad20..f3f71e9c534 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -3275,7 +3275,7 @@ struct rtl_opt_pass pass_stack_regs =
{
{
RTL_PASS,
- NULL, /* name */
+ "*stack_regs", /* name */
gate_handle_stack_regs, /* gate */
NULL, /* execute */
NULL, /* sub */
diff --git a/gcc/stack-ptr-mod.c b/gcc/stack-ptr-mod.c
index 9800d9966ab..2d9ce82c98e 100644
--- a/gcc/stack-ptr-mod.c
+++ b/gcc/stack-ptr-mod.c
@@ -95,7 +95,7 @@ struct rtl_opt_pass pass_stack_ptr_mod =
{
{
RTL_PASS,
- NULL, /* name */
+ "*stack_ptr_mod", /* name */
NULL, /* gate */
rest_of_handle_stack_ptr_mod, /* execute */
NULL, /* sub */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bf743708f87..a37b0b18a24 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,87 @@
+2009-11-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/40946
+ * gcc.dg/pr40946.c: New test.
+
+2009-11-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/41972
+ * g++.dg/template/ref4.C: New.
+
+ PR c++/41994
+ * g++.dg/template/conv10.C: New.
+
+2009-11-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/37920
+ * g++.dg/ext/typeof11.C: New.
+
+2009-11-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/41985
+ * gcc.target/i386/pr41985.c: New test.
+
+2009-11-08 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/torture/pta-escape-1.c: New testcase.
+
+2009-11-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/rep_clause4.adb: New test.
+
+2009-11-08 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/41928
+ * gfortran.dg/pr41928.f90: New testcase.
+
+2009-11-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/18451
+ PR c++/40738
+ * g++.dg/parse/error36.C: Add parameter and template cases.
+ * g++.dg/cpp0x/variadic-ex1.C: Update expected errors.
+ * g++.dg/ext/typedef-init.C: Likewise.
+ * g++.dg/lookup/hidden-class1.C: Likewise.
+ * g++.dg/lookup/hidden-class10.C: Likewise.
+ * g++.dg/lookup/hidden-class5.C: Likewise.
+ * g++.dg/lookup/hidden-class7.C: Likewise.
+ * g++.dg/lookup/hidden-temp-class1.C: Likewise.
+ * g++.dg/lookup/hidden-temp-class4.C: Likewise.
+ * g++.dg/lookup/hidden-temp-class7.C: Likewise.
+ * g++.dg/lookup/strong-using-2.C: Likewise.
+ * g++.dg/other/typedef1.C: Likewise.
+ * g++.dg/parse/access10.C: Likewise.
+ * g++.dg/parse/constructor1.C: Likewise.
+ * g++.dg/parse/crash38.C: Likewise.
+ * g++.dg/parse/error3.C: Likewise.
+ * g++.dg/parse/typespec1.C: Likewise.
+ * g++.dg/template/typedef5.C: Likewise.
+ * g++.old-deja/g++.pt/typename3.C: Likewise.
+ * g++.old-deja/g++.pt/typename4.C: Likewise.
+ * g++.old-deja/g++.pt/typename6.C: Likewise.
+ * g++.old-deja/g++.robertl/eb94.C: Likewise.
+
+ * g++.dg/abi/regparm1.C: Fix execute test.
+
+2009-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/41643
+ * gcc.dg/pr41643.c: New test.
+
+2009-11-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/41909
+ * gfortran.dg/recursive_check_15.f90: New test.
+
+2009-11-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/15946
+ * g++.dg/parse/error36.C: New.
+ * g++.old-deja/g++.other/typename1.C: Adjust.
+
+ PR c++/9381
+ * g++.dg/abi/regparm1.C: New.
+
2009-11-06 Basile Starynkevitch <basile@starynkevitch.net>
* g++.dg/plugin/pragma_plugin-test-1.C: new testcase for
@@ -412,7 +496,7 @@
2009-10-29 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/41775
- * testsuite/g++.dg/torture/pr41775.C: New testcase.
+ * g++.dg/torture/pr41775.C: New testcase.
2009-10-28 Jason Merrill <jason@redhat.com>
@@ -585,7 +669,7 @@
2009-10-26 Dodji Seketeli <dodji@redhat.com>
PR c++/41785
- * gcc/testsuite/g++.dg/cpp0x/variadic96.C: New test.
+ * g++.dg/cpp0x/variadic96.C: New test.
2009-10-26 Nick Clifton <nickc@redhat.com>
diff --git a/gcc/testsuite/g++.dg/abi/regparm1.C b/gcc/testsuite/g++.dg/abi/regparm1.C
new file mode 100644
index 00000000000..42a54a0e02a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/regparm1.C
@@ -0,0 +1,51 @@
+// PR c++/29911 (9381)
+// { dg-options -std=c++0x }
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+
+extern "C" int printf(const char *, ...);
+
+void *save_this;
+int *save_addr1, *save_addr2;
+
+int fail;
+
+struct Base
+{
+ __attribute((regparm(3))) void
+ set(int *addr1, int *addr2)
+ {
+ if (this != save_this)
+ {
+ ++fail;
+ printf("error! this == %p, should be %p\n", this, save_this);
+ }
+ if (addr1 != save_addr1)
+ {
+ ++fail;
+ printf("error! addr1 == %p, should be %p\n", addr1, save_addr1);
+ }
+ if (addr2 != save_addr2)
+ {
+ ++fail;
+ printf("error! addr2 == %p, should be %p\n", addr2, save_addr1);
+ }
+ }
+};
+
+int main()
+{
+ void (__attribute((regparm(3))) Base::* pfm)(int *, int *) = &Base::set;
+ __typeof (&Base::set) pfm2 = &Base::set;
+ decltype (&Base::set) pfm3 = &Base::set;
+ auto pfm4 = &Base::set;
+
+ Base obj; save_this = &obj;
+ int x, y; save_addr1 = &x; save_addr2 = &y;
+
+ (obj.* pfm) (&x, &y);
+ (obj.* pfm2) (&x, &y);
+ (obj.* pfm3) (&x, &y);
+ (obj.* pfm4) (&x, &y);
+
+ return fail;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C
index d5ebf0def3c..485fffa476c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C
@@ -1,4 +1,4 @@
// { dg-options "-std=gnu++0x" }
template<typename ... Elements> class Tuple;
Tuple<>* t; // OK: Elements is empty
-Tuple* u; // { dg-error "expected" }
+Tuple* u; // { dg-error "template-name" }
diff --git a/gcc/testsuite/g++.dg/ext/typedef-init.C b/gcc/testsuite/g++.dg/ext/typedef-init.C
index 95a96d55162..153303d217b 100644
--- a/gcc/testsuite/g++.dg/ext/typedef-init.C
+++ b/gcc/testsuite/g++.dg/ext/typedef-init.C
@@ -11,8 +11,7 @@
/* Case A: just the bare name = initializer. */
-typedef A = 0; /* { dg-error "initialized" "A" } */
- /* { dg-warning "no type" "A warns" { target *-*-* } 14 } */
+typedef A = 0; /* { dg-error "does not name a type" "A" } */
A a; /* { dg-error "does not name a type" "A error cascade" } */
/* Case B: with a type also. */
@@ -24,9 +23,8 @@ B b; /* { dg-error "does not name a type" "B error cascade" } */
field declarations go by a different code path in C++ (ick). */
struct S {
- typedef C = 0; /* { dg-error "initialized" "C" } */
- /* { dg-warning "no type" "C warns" { target *-*-* } 27 } */
- C c; /* { dg-bogus "" "C error cascade" } */
+ typedef C = 0; /* { dg-error "does not name a type" "C" } */
+ C c; /* { dg-error "" "C error cascade" } */
typedef int D = 0; /* { dg-error "initialized" "D" } */
D d; /* { dg-bogus "" "D error cascade" } */
diff --git a/gcc/testsuite/g++.dg/ext/typeof11.C b/gcc/testsuite/g++.dg/ext/typeof11.C
new file mode 100644
index 00000000000..757bcdea494
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/typeof11.C
@@ -0,0 +1,18 @@
+// PR c++/37920
+
+template<typename T> T& ensure_obj(const T&);
+template <typename T>
+void func2(T& t)
+{
+ typedef __typeof__(ensure_obj(t)) ttt;
+ struct ttt1
+ {
+ ttt1( ttt arg0 ){}
+ } tttt ( t );
+}
+int main()
+{
+ double d = 5;
+ func2(d);
+}
+
diff --git a/gcc/testsuite/g++.dg/lookup/hidden-class1.C b/gcc/testsuite/g++.dg/lookup/hidden-class1.C
index fc71e96fb7f..b3be4e8e941 100644
--- a/gcc/testsuite/g++.dg/lookup/hidden-class1.C
+++ b/gcc/testsuite/g++.dg/lookup/hidden-class1.C
@@ -4,5 +4,5 @@
class A {
friend class B;
- B *b; // { dg-error "no type|expected" }
+ B *b; // { dg-error "type|expected" }
};
diff --git a/gcc/testsuite/g++.dg/lookup/hidden-class10.C b/gcc/testsuite/g++.dg/lookup/hidden-class10.C
index f68196ff8a1..c9b5ca9f663 100644
--- a/gcc/testsuite/g++.dg/lookup/hidden-class10.C
+++ b/gcc/testsuite/g++.dg/lookup/hidden-class10.C
@@ -7,5 +7,5 @@
class A {
friend class abort;
- abort *b; // { dg-error "no type|expected" }
+ abort *b; // { dg-error "type|expected" }
};
diff --git a/gcc/testsuite/g++.dg/lookup/hidden-class5.C b/gcc/testsuite/g++.dg/lookup/hidden-class5.C
index 1cf06bcc395..c2413546bd7 100644
--- a/gcc/testsuite/g++.dg/lookup/hidden-class5.C
+++ b/gcc/testsuite/g++.dg/lookup/hidden-class5.C
@@ -6,4 +6,4 @@ class A {
friend class B;
};
-B* b; // { dg-error "expected" }
+B* b; // { dg-error "type|expected" }
diff --git a/gcc/testsuite/g++.dg/lookup/hidden-class7.C b/gcc/testsuite/g++.dg/lookup/hidden-class7.C
index f681cd649f1..a46ae711d20 100644
--- a/gcc/testsuite/g++.dg/lookup/hidden-class7.C
+++ b/gcc/testsuite/g++.dg/lookup/hidden-class7.C
@@ -10,4 +10,4 @@ class C {
friend class B;
};
-B *b; // { dg-error "expected" }
+B *b; // { dg-error "type|expected" }
diff --git a/gcc/testsuite/g++.dg/lookup/hidden-temp-class1.C b/gcc/testsuite/g++.dg/lookup/hidden-temp-class1.C
index c92b7f66a1a..8cdb235e8fc 100644
--- a/gcc/testsuite/g++.dg/lookup/hidden-temp-class1.C
+++ b/gcc/testsuite/g++.dg/lookup/hidden-temp-class1.C
@@ -4,5 +4,5 @@
class A {
template <class T> friend class B;
- B<int> *b; // { dg-error "no type|expected" }
+ B<int> *b; // { dg-error "type|expected" }
};
diff --git a/gcc/testsuite/g++.dg/lookup/hidden-temp-class4.C b/gcc/testsuite/g++.dg/lookup/hidden-temp-class4.C
index 02dc9c3e50f..3d085e2249a 100644
--- a/gcc/testsuite/g++.dg/lookup/hidden-temp-class4.C
+++ b/gcc/testsuite/g++.dg/lookup/hidden-temp-class4.C
@@ -6,4 +6,4 @@ class A {
template <class T> friend class B;
};
-B<int> *b; // { dg-error "expected" }
+B<int> *b; // { dg-error "type|expected" }
diff --git a/gcc/testsuite/g++.dg/lookup/hidden-temp-class7.C b/gcc/testsuite/g++.dg/lookup/hidden-temp-class7.C
index 22804d782a0..19dd9524895 100644
--- a/gcc/testsuite/g++.dg/lookup/hidden-temp-class7.C
+++ b/gcc/testsuite/g++.dg/lookup/hidden-temp-class7.C
@@ -10,4 +10,4 @@ class C {
template <class T> friend class B;
};
-B<int> *b; // { dg-error "expected" }
+B<int> *b; // { dg-error "type|expected" }
diff --git a/gcc/testsuite/g++.dg/lookup/strong-using-2.C b/gcc/testsuite/g++.dg/lookup/strong-using-2.C
index 5c4b425fa8a..314aa52388a 100644
--- a/gcc/testsuite/g++.dg/lookup/strong-using-2.C
+++ b/gcc/testsuite/g++.dg/lookup/strong-using-2.C
@@ -20,4 +20,4 @@ namespace baz {
foo::T *t1;
bar::T *t2;
-baz::T *t3; // { dg-error "(ambiguous|expected|extra)" "" }
+baz::T *t3; // { dg-error "(ambiguous|does not name a type)" "" }
diff --git a/gcc/testsuite/g++.dg/other/typedef1.C b/gcc/testsuite/g++.dg/other/typedef1.C
index 55d62bb7cb2..ef1684d7aef 100644
--- a/gcc/testsuite/g++.dg/other/typedef1.C
+++ b/gcc/testsuite/g++.dg/other/typedef1.C
@@ -2,6 +2,6 @@
// { dg-do compile }
void f1(typedef) {} // { dg-error "no type|typedef declaration" }
-void f2(typedef x) {} // { dg-error "no type|typedef declaration" }
-void f3(typedef x[]) {} // { dg-error "no type|typedef declaration" }
+void f2(typedef x) {} // { dg-error "type|typedef declaration" }
+void f3(typedef x[]) {} // { dg-error "type|typedef declaration" }
void f4(typedef int x) {} // { dg-error "typedef declaration" }
diff --git a/gcc/testsuite/g++.dg/parse/access10.C b/gcc/testsuite/g++.dg/parse/access10.C
index ebfeea9f451..62adc1b16f9 100644
--- a/gcc/testsuite/g++.dg/parse/access10.C
+++ b/gcc/testsuite/g++.dg/parse/access10.C
@@ -7,7 +7,5 @@ template<int> struct A
::A~(); // { dg-bogus "using-declaration" }
};
-// Instead of the bogus error we get 3 separate errors.
-// { dg-error "no type" "" { target *-*-* } 7 }
-// { dg-error "::" "" { target *-*-* } 7 }
-// { dg-error "~" "" { target *-*-* } 7 }
+// Instead of the bogus error we get a different error.
+// { dg-error "template-name" "" { target *-*-* } 7 }
diff --git a/gcc/testsuite/g++.dg/parse/constructor1.C b/gcc/testsuite/g++.dg/parse/constructor1.C
index 1796531487c..1bb9ee0a105 100644
--- a/gcc/testsuite/g++.dg/parse/constructor1.C
+++ b/gcc/testsuite/g++.dg/parse/constructor1.C
@@ -1,8 +1,8 @@
// { dg-do compile }
// { dg-options "-fshow-column" }
-ACE_Process_Descriptor::ACE_Process_Descriptor () : // { dg-error "declared" "declared" }
- // { dg-error "no type" "no type" { target *-*-* } 4 }
- process_ (0) // { dg-error "3: only constructors take base initializers" }
+ACE_Process_Descriptor::ACE_Process_Descriptor () :
+ // { dg-error "does not name a type" "no type" { target *-*-* } 4 }
+ process_ (0)
{
}
diff --git a/gcc/testsuite/g++.dg/parse/crash38.C b/gcc/testsuite/g++.dg/parse/crash38.C
index c050b93cc42..724f9b80a12 100644
--- a/gcc/testsuite/g++.dg/parse/crash38.C
+++ b/gcc/testsuite/g++.dg/parse/crash38.C
@@ -3,7 +3,7 @@
/* This would not ICE. */
namespace M { } /* { dg-error "previous declaration" } */
struct M; /* { dg-error "redeclared as different kind of symbol" } */
-M *p; /* { dg-error "expected constructor" } */
+M *p; /* { dg-error "does not name a type" } */
/* This would ICE when processing 'p'. */
namespace N { } /* { dg-error "previous declaration" } */
diff --git a/gcc/testsuite/g++.dg/parse/error3.C b/gcc/testsuite/g++.dg/parse/error3.C
index 55ae024d412..7e8cf8de000 100644
--- a/gcc/testsuite/g++.dg/parse/error3.C
+++ b/gcc/testsuite/g++.dg/parse/error3.C
@@ -5,5 +5,5 @@ static void InstantiateConstraint(const float&, unsigned,
void(*AddFunction)(const TYPE&,bool&,
char*, char*,
unsigned*));
-// { dg-error "64:expected ',' or '...' before '&' token" "" { target *-*-* } { 5 } }
-// { dg-error "60:ISO C\\+\\+ forbids declaration of 'TYPE' with no type" "" { target *-*-* } { 5 } }
+// { dg-error "64: ISO C\\+\\+ forbids declaration of 'parameter' with no type" "" { target *-*-* } { 5 } }
+// { dg-error "60: 'TYPE' does not name a type" "" { target *-*-* } { 5 } }
diff --git a/gcc/testsuite/g++.dg/parse/error36.C b/gcc/testsuite/g++.dg/parse/error36.C
new file mode 100644
index 00000000000..0d7f8cfc4c3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error36.C
@@ -0,0 +1,33 @@
+// PR c++/15946
+// Test for helpful error message about missing typename.
+
+template <class T> struct A
+{
+ struct B { };
+ static B b;
+};
+
+template <class T>
+void f(T t)
+{
+ typedef A<T>::foo type; // { dg-error "typename" }
+ A<T>::bar b; // { dg-error "typename" }
+} // { dg-error "expected ';'" "" { target *-*-* } 14 }
+
+// PR c++/36353
+template <class T> struct B
+{
+ void f()
+ {
+ A<T>::baz z; // { dg-error "typename" }
+ } // { dg-error "expected ';'" "" { target *-*-* } 22 }
+};
+
+// PR c++/40738
+template <class T>
+void g(const A<T>::type &t); // { dg-error "typename" }
+// { dg-error "no type" "" { target *-*-* } 28 }
+
+// PR c++/18451
+template <class T> A<T>::B A<T>::b; // { dg-error "typename" }
+// { dg-error "expected" "" { target *-*-* } 32 }
diff --git a/gcc/testsuite/g++.dg/parse/typespec1.C b/gcc/testsuite/g++.dg/parse/typespec1.C
index a371f8b9836..44ee116f636 100644
--- a/gcc/testsuite/g++.dg/parse/typespec1.C
+++ b/gcc/testsuite/g++.dg/parse/typespec1.C
@@ -1,4 +1,4 @@
// PR c++/26571
struct A {};
-unsigned A a; // { dg-error "multiple" }
+unsigned A a; // { dg-error "expected initializer" }
diff --git a/gcc/testsuite/g++.dg/template/conv10.C b/gcc/testsuite/g++.dg/template/conv10.C
new file mode 100644
index 00000000000..0a001be14e1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/conv10.C
@@ -0,0 +1,9 @@
+// PR c++/41994
+
+template<typename T> struct A
+{
+ operator T();
+ A() { T (A::*f)() = &A::operator T; }
+};
+
+A<int> a;
diff --git a/gcc/testsuite/g++.dg/template/error26.C b/gcc/testsuite/g++.dg/template/error26.C
index 7545762bf34..cd8d46d1e4f 100644
--- a/gcc/testsuite/g++.dg/template/error26.C
+++ b/gcc/testsuite/g++.dg/template/error26.C
@@ -2,4 +2,4 @@
template<typename> struct A;
-template<typename T> void foo (A<&T::template i>); // { dg-error "T::template i|mismatch|& T::i" }
+template<typename T> void foo (A<&T::template i>); // { dg-error "T:: ?template i|mismatch|& T::i" }
diff --git a/gcc/testsuite/g++.dg/template/ref4.C b/gcc/testsuite/g++.dg/template/ref4.C
new file mode 100644
index 00000000000..6d89fa80a84
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ref4.C
@@ -0,0 +1,12 @@
+// PR c++/41972
+
+struct X {
+ static const double x;
+};
+template <const double& _test_>
+ class Foo { };
+template <typename _ignore_>
+struct Y {
+ typedef Foo<X::x> type;
+};
+
diff --git a/gcc/testsuite/g++.dg/template/typedef5.C b/gcc/testsuite/g++.dg/template/typedef5.C
index abd9ebb57cf..04b8eac3bcc 100644
--- a/gcc/testsuite/g++.dg/template/typedef5.C
+++ b/gcc/testsuite/g++.dg/template/typedef5.C
@@ -2,6 +2,6 @@
// { dg-do compile }
template<typedef,int> struct A1; // { dg-error "no type|typedef declaration|default argument" }
-template<typedef x,int> struct A2; // { dg-error "no type|typedef declaration|default argument" }
-template<typedef x[],int> struct A3; // { dg-error "no type|typedef declaration|default argument" }
+template<typedef x,int> struct A2; // { dg-error "type|typedef declaration|default argument" }
+template<typedef x[],int> struct A3; // { dg-error "no type|typedef declaration|expected" }
template<typedef int x, int> struct A4; // { dg-error "typedef declaration|default argument" }
diff --git a/gcc/testsuite/g++.old-deja/g++.other/typename1.C b/gcc/testsuite/g++.old-deja/g++.other/typename1.C
index 43d13522fe7..4bf3de39f84 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/typename1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/typename1.C
@@ -13,5 +13,5 @@ public:
template<class T>
void f()
{
- Vector<T>::iterator i = 0; // { dg-error "expected" } missing typename
-}
+ Vector<T>::iterator i = 0; // { dg-error "typename" } missing typename
+} // { dg-error "expected" "" { target *-*-* } 16 }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename3.C b/gcc/testsuite/g++.old-deja/g++.pt/typename3.C
index 9b412756b42..0708f1f2495 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/typename3.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typename3.C
@@ -17,5 +17,5 @@ struct B : public A<U>
template <class U>
-B<U>::A_Type B<U>::Func() { // { dg-error "expected" } implicit typename
-}
+B<U>::A_Type B<U>::Func() { // { dg-error "typename" } implicit typename
+} // { dg-error "expected" }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename4.C b/gcc/testsuite/g++.old-deja/g++.pt/typename4.C
index 286795cb643..7238470e4ce 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/typename4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typename4.C
@@ -22,5 +22,5 @@ struct C : public B<U>
template <class U>
-C<U>::A_Type C<U>::Func() { // { dg-error "expected" } implicit typename
-}
+C<U>::A_Type C<U>::Func() { // { dg-error "typename" } implicit typename
+} // { dg-error "expected" }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename6.C b/gcc/testsuite/g++.old-deja/g++.pt/typename6.C
index 27944795ae2..0a5f0184bd4 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/typename6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/typename6.C
@@ -15,6 +15,6 @@ struct B : public A<U>
};
template <class U>
-A<U>::A_Type B<U>::Func() // { dg-error "expected" } function
+A<U>::A_Type B<U>::Func() // { dg-error "typename" } function
{
-}
+} // { dg-error "expected" }
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb94.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb94.C
index b3d2da1cbeb..535023606a7 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb94.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb94.C
@@ -10,7 +10,7 @@ static int variable;
class myClass : public baseClass
{
private:
-static int variable; // this is intentionally duplicated
+static int variable; // { dg-error "private" }
};
myClass::variable = 0; //{ dg-error "" } no type
diff --git a/gcc/testsuite/gcc.dg/pr40946.c b/gcc/testsuite/gcc.dg/pr40946.c
new file mode 100644
index 00000000000..3fd804e5632
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr40946.c
@@ -0,0 +1,33 @@
+/* PR middle-end/40946 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wall" } */
+
+struct A
+{
+ unsigned char a1[8];
+ unsigned short a2, a3, a4, a5, a6, a7;
+};
+
+int bar (void *, const char *, int);
+char *foo (void *, int);
+
+char *
+baz (const char *x, const char *y)
+{
+ int a = sizeof (struct A) + 2 * (__builtin_strlen (y)
+ + __builtin_strlen (x) + 24) + 16;
+ struct A *b = __builtin_malloc (a);
+ char *c;
+ int d;
+
+ b->a4 = sizeof (struct A);
+ c = ((char *) b) + b->a4;
+ d = ((char *) b) + a - c;
+ b->a2 = b->a3 = (unsigned short) bar (c, y, d); /* { dg-bogus "array subscript is above array bounds" } */
+ c += b->a2;
+ d = ((char *) b) + a - c;
+ b->a7 = b->a4 + b->a2;
+ b->a5 = b->a6 = (unsigned short) bar (c, x, d);
+ c = foo (b, a);
+ return c;
+}
diff --git a/gcc/testsuite/gcc.dg/pr41643.c b/gcc/testsuite/gcc.dg/pr41643.c
new file mode 100644
index 00000000000..7c0743da41a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr41643.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/41643 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-tree-dce" } */
+
+struct S { int a; };
+
+int
+f (struct S *x)
+{
+ int a = x->a;
+ if (a)
+ return f (x) + a;
+ else
+ return f (x);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pta-escape-1.c b/gcc/testsuite/gcc.dg/torture/pta-escape-1.c
new file mode 100644
index 00000000000..39aefb54310
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pta-escape-1.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-options "-fdump-tree-alias" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
+
+int *p;
+void __attribute__((noinline,noclone))
+bar (void)
+{
+ *p = 1;
+}
+int __attribute__((noinline,noclone))
+foo (__SIZE_TYPE__ addr)
+{
+ int i;
+ /* q points to ANYTHING */
+ int **q = (int **)addr;
+ /* this store needs to cause i to escape */
+ *q = &i;
+ i = 0;
+ /* and thus be clobbered by this function call */
+ bar ();
+ return i;
+}
+extern void abort (void);
+int
+main()
+{
+ if (foo ((__SIZE_TYPE__)&p) != 1)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "ESCAPED = { i }" "alias" } } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr41985.c b/gcc/testsuite/gcc.target/i386/pr41985.c
new file mode 100644
index 00000000000..b38b6dc42e1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr41985.c
@@ -0,0 +1,11 @@
+/* PR target/41985 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+int
+main ()
+{
+ int i;
+ asm volatile ("# %&": : "g" (i)); /* { dg-error "used without any local dynamic TLS references" } */
+ return 0;
+}
diff --git a/gcc/testsuite/gfortran.dg/pr41928.f90 b/gcc/testsuite/gfortran.dg/pr41928.f90
new file mode 100644
index 00000000000..1438b0c122d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr41928.f90
@@ -0,0 +1,263 @@
+! { dg-do compile }
+! { dg-options "-O -fbounds-check -w" }
+MODULE kinds
+ INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND ( 14, 200 )
+ INTEGER, DIMENSION(:), ALLOCATABLE :: nco,ncoset,nso,nsoset
+ INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: co,coset
+END MODULE kinds
+MODULE ai_moments
+ USE kinds
+CONTAINS
+ SUBROUTINE cossin(la_max,npgfa,zeta,rpgfa,la_min,&
+ lb_max,npgfb,zetb,rpgfb,lb_min,&
+ rac,rbc,kvec,cosab,sinab)
+ REAL(KIND=dp), DIMENSION(ncoset(la_max),&
+ ncoset(lb_max)) :: sc, ss
+ DO ipgf=1,npgfa
+ DO jpgf=1,npgfb
+ IF (la_max > 0) THEN
+ DO la=2,la_max
+ DO ax=2,la
+ DO ay=0,la-ax
+ sc(coset(ax,ay,az),1) = rap(1)*sc(coset(ax-1,ay,az),1) +&
+ f2 * kvec(1)*ss(coset(ax-1,ay,az),1)
+ ss(coset(ax,ay,az),1) = rap(1)*ss(coset(ax-1,ay,az),1) +&
+ f2 * kvec(1)*sc(coset(ax-1,ay,az),1)
+ END DO
+ END DO
+ END DO
+ IF (lb_max > 0) THEN
+ DO lb=2,lb_max
+ ss(1,coset(0,0,lb)) = rbp(3)*ss(1,coset(0,0,lb-1)) +&
+ f2 * kvec(3)*sc(1,coset(0,0,lb-1))
+ DO bx=2,lb
+ DO by=0,lb-bx
+ ss(1,coset(bx,by,bz)) = rbp(1)*ss(1,coset(bx-1,by,bz)) +&
+ f2 * kvec(1)*sc(1,coset(bx-1,by,bz))
+ END DO
+ END DO
+ END DO
+ END IF
+ END IF
+ DO j=ncoset(lb_min-1)+1,ncoset(lb_max)
+ END DO
+ END DO
+ END DO
+ END SUBROUTINE cossin
+ SUBROUTINE moment(la_max,npgfa,zeta,rpgfa,la_min,&
+ lb_max,npgfb,zetb,rpgfb,&
+ lc_max,rac,rbc,mab)
+ REAL(KIND=dp), DIMENSION(:), INTENT(IN) :: zeta, rpgfa
+ REAL(KIND=dp), DIMENSION(:), INTENT(IN) :: zetb, rpgfb
+ REAL(KIND=dp), DIMENSION(:, :, :), &
+ INTENT(INOUT) :: mab
+ REAL(KIND=dp), DIMENSION(3) :: rab, rap, rbp, rpc
+ REAL(KIND=dp), DIMENSION(ncoset(la_max),&
+ ncoset(lb_max), ncoset(lc_max)) :: s
+ DO ipgf=1,npgfa
+ DO jpgf=1,npgfb
+ IF (rpgfa(ipgf) + rpgfb(jpgf) < dab) THEN
+ DO k=1, ncoset(lc_max)-1
+ DO j=nb+1,nb+ncoset(lb_max)
+ DO i=na+1,na+ncoset(la_max)
+ mab(i,j,k) = 0.0_dp
+ END DO
+ END DO
+ END DO
+ END IF
+ rpc = zetp*(zeta(ipgf)*rac+zetb(jpgf)*rbc)
+ DO l=2, ncoset(lc_max)
+ lx = indco(1,l)
+ l2 = 0
+ IF ( lz > 0 ) THEN
+ IF ( lz > 1 ) l2 = coset(lx,ly,lz-2)
+ ELSE IF ( ly > 0 ) THEN
+ IF ( ly > 1 ) l2 = coset(lx,ly-2,lz)
+ IF ( lx > 1 ) l2 = coset(lx-2,ly,lz)
+ END IF
+ s(1,1,l) = rpc(i)*s(1,1,l1)
+ IF ( l2 > 0 ) s(1,1,l) = s(1,1,l) + f2*REAL(ni,dp)*s(1,1,l2)
+ END DO
+ DO l = 1, ncoset(lc_max)
+ IF ( lx > 0 ) THEN
+ lx1 = coset(lx-1,ly,lz)
+ END IF
+ IF ( ly > 0 ) THEN
+ ly1 = coset(lx,ly-1,lz)
+ END IF
+ IF (la_max > 0) THEN
+ DO la=2,la_max
+ IF ( lz1 > 0 ) s(coset(0,0,la),1,l) = s(coset(0,0,la),1,l) + &
+ f2z*s(coset(0,0,la-1),1,lz1)
+ IF ( ly1 > 0 ) s(coset(0,1,az),1,l) = s(coset(0,1,az),1,l) + &
+ f2y*s(coset(0,0,az),1,ly1)
+ DO ay=2,la
+ s(coset(0,ay,az),1,l) = rap(2)*s(coset(0,ay-1,az),1,l) +&
+ f2*REAL(ay-1,dp)*s(coset(0,ay-2,az),1,l)
+ IF ( ly1 > 0 ) s(coset(0,ay,az),1,l) = s(coset(0,ay,az),1,l) + &
+ f2y*s(coset(0,ay-1,az),1,ly1)
+ END DO
+ DO ay=0,la-1
+ IF ( lx1 > 0 ) s(coset(1,ay,az),1,l) = s(coset(1,ay,az),1,l) + &
+ f2x*s(coset(0,ay,az),1,lx1)
+ END DO
+ DO ax=2,la
+ DO ay=0,la-ax
+ s(coset(ax,ay,az),1,l) = rap(1)*s(coset(ax-1,ay,az),1,l) +&
+ f3*s(coset(ax-2,ay,az),1,l)
+ IF ( lx1 > 0 ) s(coset(ax,ay,az),1,l) = s(coset(ax,ay,az),1,l) + &
+ f2x*s(coset(ax-1,ay,az),1,lx1)
+ END DO
+ END DO
+ END DO
+ IF (lb_max > 0) THEN
+ DO j=2,ncoset(lb_max)
+ DO i=1,ncoset(la_max)
+ s(i,j,l) = 0.0_dp
+ END DO
+ END DO
+ DO la=la_start,la_max-1
+ DO ax=0,la
+ DO ay=0,la-ax
+ s(coset(ax,ay,az),2,l) = s(coset(ax+1,ay,az),1,l) -&
+ rab(1)*s(coset(ax,ay,az),1,l)
+ s(coset(ax,ay,az),4,l) = s(coset(ax,ay,az+1),1,l) -&
+ rab(3)*s(coset(ax,ay,az),1,l)
+ END DO
+ END DO
+ END DO
+ DO ax=0,la_max
+ DO ay=0,la_max-ax
+ IF (ax == 0) THEN
+ s(coset(ax,ay,az),2,l) = rbp(1)*s(coset(ax,ay,az),1,l)
+ ELSE
+ s(coset(ax,ay,az),2,l) = rbp(1)*s(coset(ax,ay,az),1,l) +&
+ fx*s(coset(ax-1,ay,az),1,l)
+ END IF
+ IF (lx1 > 0) s(coset(ax,ay,az),2,l) = s(coset(ax,ay,az),2,l) +&
+ f2x*s(coset(ax,ay,az),1,lx1)
+ IF (ay == 0) THEN
+ s(coset(ax,ay,az),3,l) = rbp(2)*s(coset(ax,ay,az),1,l)
+ ELSE
+ s(coset(ax,ay,az),3,l) = rbp(2)*s(coset(ax,ay,az),1,l) +&
+ fy*s(coset(ax,ay-1,az),1,l)
+ END IF
+ IF (ly1 > 0) s(coset(ax,ay,az),3,l) = s(coset(ax,ay,az),3,l) +&
+ f2y*s(coset(ax,ay,az),1,ly1)
+ IF (az == 0) THEN
+ s(coset(ax,ay,az),4,l) = rbp(3)*s(coset(ax,ay,az),1,l)
+ ELSE
+ s(coset(ax,ay,az),4,l) = rbp(3)*s(coset(ax,ay,az),1,l) +&
+ fz*s(coset(ax,ay,az-1),1,l)
+ END IF
+ IF (lz1 > 0) s(coset(ax,ay,az),4,l) = s(coset(ax,ay,az),4,l) +&
+ f2z*s(coset(ax,ay,az),1,lz1)
+ END DO
+ END DO
+ DO lb=2,lb_max
+ DO la=la_start,la_max-1
+ DO ax=0,la
+ DO ay=0,la-ax
+ s(coset(ax,ay,az),coset(0,0,lb),l) =&
+ rab(3)*s(coset(ax,ay,az),coset(0,0,lb-1),l)
+ DO bx=1,lb
+ DO by=0,lb-bx
+ s(coset(ax,ay,az),coset(bx,by,bz),l) =&
+ rab(1)*s(coset(ax,ay,az),coset(bx-1,by,bz),l)
+ END DO
+ END DO
+ END DO
+ END DO
+ END DO
+ DO ax=0,la_max
+ DO ay=0,la_max-ax
+ IF (az == 0) THEN
+ s(coset(ax,ay,az),coset(0,0,lb),l) =&
+ rbp(3)*s(coset(ax,ay,az),coset(0,0,lb-1),l) +&
+ f3*s(coset(ax,ay,az),coset(0,0,lb-2),l)
+ END IF
+ IF (lz1 > 0) s(coset(ax,ay,az),coset(0,0,lb),l) =&
+ f2z*s(coset(ax,ay,az),coset(0,0,lb-1),lz1)
+ IF (ay == 0) THEN
+ IF (ly1 > 0) s(coset(ax,ay,az),coset(0,1,bz),l) =&
+ f2y*s(coset(ax,ay,az),coset(0,0,bz),ly1)
+ DO by=2,lb
+ s(coset(ax,ay,az),coset(0,by,bz),l) =&
+ f3*s(coset(ax,ay,az),coset(0,by-2,bz),l)
+ IF (ly1 > 0) s(coset(ax,ay,az),coset(0,by,bz),l) =&
+ f2y*s(coset(ax,ay,az),coset(0,by-1,bz),ly1)
+ END DO
+ s(coset(ax,ay,az),coset(0,1,bz),l) =&
+ fy*s(coset(ax,ay-1,az),coset(0,0,bz),l)
+ END IF
+ IF (ax == 0) THEN
+ DO by=0,lb-1
+ IF (lx1 > 0) s(coset(ax,ay,az),coset(1,by,bz),l) =&
+ f2x*s(coset(ax,ay,az),coset(0,by,bz),lx1)
+ END DO
+ DO bx=2,lb
+ DO by=0,lb-bx
+ s(coset(ax,ay,az),coset(bx,by,bz),l) =&
+ f3*s(coset(ax,ay,az),coset(bx-2,by,bz),l)
+ IF (lx1 > 0) s(coset(ax,ay,az),coset(bx,by,bz),l) =&
+ f2x*s(coset(ax,ay,az),coset(bx-1,by,bz),lx1)
+ END DO
+ END DO
+ DO by=0,lb-1
+ IF (lx1 > 0) s(coset(ax,ay,az),coset(1,by,bz),l) =&
+ f2x*s(coset(ax,ay,az),coset(0,by,bz),lx1)
+ END DO
+ DO bx=2,lb
+ DO by=0,lb-bx
+ s(coset(ax,ay,az),coset(bx,by,bz),l) =&
+ f3*s(coset(ax,ay,az),coset(bx-2,by,bz),l)
+ IF (lx1 > 0) s(coset(ax,ay,az),coset(bx,by,bz),l) =&
+ f2x*s(coset(ax,ay,az),coset(bx-1,by,bz),lx1)
+ END DO
+ END DO
+ END IF
+ END DO
+ END DO
+ END DO
+ END IF
+ IF (lb_max > 0) THEN
+ DO lb=2,lb_max
+ IF (lz1 > 0) s(1,coset(0,0,lb),l) = s(1,coset(0,0,lb),l) +&
+ f2z*s(1,coset(0,0,lb-1),lz1)
+ IF (ly1 > 0) s(1,coset(0,1,bz),l) = s(1,coset(0,1,bz),l) +&
+ f2y*s(1,coset(0,0,bz),ly1)
+ DO by=2,lb
+ s(1,coset(0,by,bz),l) = rbp(2)*s(1,coset(0,by-1,bz),l) +&
+ f2*REAL(by-1,dp)*s(1,coset(0,by-2,bz),l)
+ IF (lx1 > 0) s(1,coset(1,by,bz),l) = s(1,coset(1,by,bz),l) +&
+ f2x*s(1,coset(0,by,bz),lx1)
+ END DO
+ DO bx=2,lb
+ DO by=0,lb-bx
+ IF (lx1 > 0) s(1,coset(bx,by,bz),l) = s(1,coset(bx,by,bz),l) +&
+ f2x*s(1,coset(bx-1,by,bz),lx1)
+ END DO
+ END DO
+ END DO
+ END IF
+ END IF
+ END DO
+ DO k=2,ncoset(lc_max)
+ DO j=1,ncoset(lb_max)
+ END DO
+ END DO
+ END DO
+ END DO
+ END SUBROUTINE moment
+ SUBROUTINE diff_momop(la_max,npgfa,zeta,rpgfa,la_min,&
+ order,rac,rbc,difmab,mab_ext)
+ REAL(KIND=dp), DIMENSION(:, :, :), &
+ OPTIONAL, POINTER :: mab_ext
+ REAL(KIND=dp), ALLOCATABLE, &
+ DIMENSION(:, :, :) :: difmab_tmp
+ DO imom = 1,ncoset(order)-1
+ CALL adbdr(la_max,npgfa,rpgfa,la_min,&
+ difmab_tmp(:,:,2), difmab_tmp(:,:,3))
+ END DO
+ END SUBROUTINE diff_momop
+END MODULE ai_moments
diff --git a/gcc/testsuite/gfortran.dg/recursive_check_15.f90 b/gcc/testsuite/gfortran.dg/recursive_check_15.f90
new file mode 100644
index 00000000000..4e381804ef2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/recursive_check_15.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+! PR41909 ICE with "call foo" in "program foo"
+program test ! { dg-error "Global name" }
+ implicit none
+ call test() ! { dg-error "" }
+contains
+ subroutine one(a)
+ real, dimension(:,:), intent(inout), optional :: a
+ call two(a)
+ end subroutine one
+end program test
+
diff --git a/gcc/testsuite/gnat.dg/rep_clause4.adb b/gcc/testsuite/gnat.dg/rep_clause4.adb
new file mode 100644
index 00000000000..76bb15284a5
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/rep_clause4.adb
@@ -0,0 +1,34 @@
+-- { dg-do run }
+
+procedure Rep_Clause4 is
+
+ type U32 is mod 2 ** 32;
+
+ type Key is record
+ Value : U32;
+ Valid : Boolean;
+ end record;
+
+ type Key_Buffer is record
+ Current, Latch : Key;
+ end record;
+
+ type Block is record
+ Keys : Key_Buffer;
+ Stamp : U32;
+ end record;
+ for Block use record
+ Keys at 0 range 0 .. 103;
+ Stamp at 13 range 0 .. 31;
+ end record;
+
+ My_Block : Block;
+ My_Stamp : constant := 16#01234567#;
+
+begin
+ My_Block.Stamp := My_Stamp;
+ My_Block.Keys.Latch := My_Block.Keys.Current;
+ if My_Block.Stamp /= My_Stamp then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 97b08924ff7..4de3dea4ea4 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -7191,7 +7191,7 @@ struct gimple_opt_pass pass_warn_function_return =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*warn_function_return", /* name */
NULL, /* gate */
execute_warn_function_return, /* execute */
NULL, /* sub */
@@ -7225,7 +7225,7 @@ struct gimple_opt_pass pass_warn_function_noreturn =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*warn_function_noreturn", /* name */
NULL, /* gate */
execute_warn_function_noreturn, /* execute */
NULL, /* sub */
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index 847a6818b1b..d1f84a2ebaa 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -106,7 +106,7 @@ struct gimple_opt_pass pass_referenced_vars =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*referenced_vars", /* name */
NULL, /* gate */
find_referenced_vars, /* execute */
NULL, /* sub */
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index abd56fcc484..7affd1627c5 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -201,7 +201,7 @@ struct gimple_opt_pass pass_cleanup_cfg_post_optimizing =
{
{
GIMPLE_PASS,
- "optimized", /* name */
+ "optimized", /* name */
NULL, /* gate */
execute_cleanup_cfg_post_optimizing, /* execute */
NULL, /* sub */
@@ -287,9 +287,9 @@ struct gimple_opt_pass pass_fixup_cfg =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*free_cfg_annotations", /* name */
NULL, /* gate */
- execute_fixup_cfg, /* execute */
+ execute_fixup_cfg, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
@@ -317,7 +317,7 @@ struct gimple_opt_pass pass_init_datastructures =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*init_datastructures", /* name */
NULL, /* gate */
execute_init_datastructures, /* execute */
NULL, /* sub */
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 8f7047f8309..c52b787f407 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -455,7 +455,7 @@ struct gimple_opt_pass pass_record_bounds =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*record_bounds", /* name */
NULL, /* gate */
tree_ssa_loop_bounds, /* execute */
NULL, /* sub */
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 74dc6d2c1ba..e0a681db2f2 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -1269,13 +1269,18 @@ build_succ_graph (void)
}
}
- /* Add edges from STOREDANYTHING to all non-direct nodes. */
+ /* Add edges from STOREDANYTHING to all non-direct nodes that can
+ receive pointers. */
t = find (storedanything_id);
for (i = integer_id + 1; i < FIRST_REF_NODE; ++i)
{
- if (!TEST_BIT (graph->direct_nodes, i))
+ if (!TEST_BIT (graph->direct_nodes, i)
+ && get_varinfo (i)->may_have_pointers)
add_graph_edge (graph, find (i), t);
}
+
+ /* Everything stored to ANYTHING also potentially escapes. */
+ add_graph_edge (graph, find (escaped_id), t);
}
@@ -2720,7 +2725,8 @@ get_constraint_for_ssa_var (tree t, VEC(ce_s, heap) **results, bool address_p)
/* If we are not taking the address of the constraint expr, add all
sub-fiels of the variable as well. */
- if (!address_p)
+ if (!address_p
+ && !vi->is_full_var)
{
for (; vi; vi = vi->next)
{
@@ -4032,7 +4038,7 @@ first_vi_for_offset (varinfo_t start, unsigned HOST_WIDE_INT offset)
In that case, however, offset should still be within the size
of the variable. */
if (offset >= start->offset
- && offset < (start->offset + start->size))
+ && (offset - start->offset) < start->size)
return start;
start= start->next;
@@ -4062,7 +4068,7 @@ first_or_preceding_vi_for_offset (varinfo_t start,
directly preceding offset which may be the last field. */
while (start->next
&& offset >= start->offset
- && !(offset < (start->offset + start->size)))
+ && !((offset - start->offset) < start->size))
start = start->next;
return start;
@@ -4286,21 +4292,22 @@ push_fields_onto_fieldstack (tree type, VEC(fieldoff_s,heap) **fieldstack,
static unsigned int
count_num_arguments (tree decl, bool *is_varargs)
{
- unsigned int i = 0;
+ unsigned int num = 0;
tree t;
- for (t = TYPE_ARG_TYPES (TREE_TYPE (decl));
- t;
- t = TREE_CHAIN (t))
- {
- if (TREE_VALUE (t) == void_type_node)
- break;
- i++;
- }
+ /* Capture named arguments for K&R functions. They do not
+ have a prototype and thus no TYPE_ARG_TYPES. */
+ for (t = DECL_ARGUMENTS (decl); t; t = TREE_CHAIN (t))
+ ++num;
+ /* Check if the function has variadic arguments. */
+ for (t = TYPE_ARG_TYPES (TREE_TYPE (decl)); t; t = TREE_CHAIN (t))
+ if (TREE_VALUE (t) == void_type_node)
+ break;
if (!t)
*is_varargs = true;
- return i;
+
+ return num;
}
/* Creation function node for DECL, using NAME, and return the index
@@ -5654,7 +5661,8 @@ struct gimple_opt_pass pass_build_ealias =
static bool
gate_ipa_pta (void)
{
- return (flag_ipa_pta
+ return (optimize
+ && flag_ipa_pta
/* Don't bother doing anything if the program has errors. */
&& !(errorcount || sorrycount));
}
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 8e88c2f73b0..e6a9a07a5d8 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1856,7 +1856,7 @@ struct gimple_opt_pass pass_early_warn_uninitialized =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*early_warn_uninitialized", /* name */
gate_warn_uninitialized, /* gate */
execute_early_warn_uninitialized, /* execute */
NULL, /* sub */
@@ -1875,7 +1875,7 @@ struct gimple_opt_pass pass_late_warn_uninitialized =
{
{
GIMPLE_PASS,
- NULL, /* name */
+ "*late_warn_uninitialized", /* name */
gate_warn_uninitialized, /* gate */
execute_late_warn_uninitialized, /* execute */
NULL, /* sub */
diff --git a/gcc/tree.c b/gcc/tree.c
index f3970dd3a55..3bfb527590e 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4988,7 +4988,7 @@ struct simple_ipa_opt_pass pass_ipa_free_lang_data =
{
{
SIMPLE_IPA_PASS,
- NULL, /* name */
+ "*free_lang_data", /* name */
NULL, /* gate */
free_lang_data, /* execute */
NULL, /* sub */
@@ -9214,7 +9214,8 @@ reconstruct_complex_type (tree type, tree bottom)
else
return bottom;
- return build_qualified_type (outer, TYPE_QUALS (type));
+ return build_type_attribute_qual_variant (outer, TYPE_ATTRIBUTES (type),
+ TYPE_QUALS (type));
}
/* Returns a vector tree node given a mode (integer, vector, or BLKmode) and
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index ec39612f8f5..154d4d5030d 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,111 @@
+2009-11-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/doxygen/user.cfg.in: Regenerate, add files.
+ * libsupc++/eh_ptr.cc: Format.
+ * libsupc++/exception_ptr.h: Same.
+ * libsupc++/cxxabi.h(recursive_init_error): Move declaration here.
+ * libsupc++/guard.cc: From here.
+ * libsupc++/nested_exception.h: Add markup.
+
+2009-11-09 Johannes Singler <singler@kit.edu>
+
+ * include/parallel/multiway_merge.h (multiway_merge_*,
+ __sequential_multiway_merge, parallel_multiway_merge): Replace
+ int by appropriate difference_type (typedef to _SeqNumber) or
+ _ThreadIndex.
+ * include/parallel/multiseq_selection.h (multiseq_partition,
+ multiseq_selection): Replace int by appropriate difference_type
+ (typedef to _SeqNumber)
+ * include/parallel/base.h (__get_max_threads): Replace int by
+ _ThreadIndex.
+ * include/parallel/balanced_quicksort.h
+ (__qsb_local_sort_with_helping, __parallel_sort_qsb): Likewise.
+ * include/parallel/set_operations.h (__parallel_set_operation):
+ Likewise.
+ * include/parallel/unique_copy.h (__parallel_unique_copy): Likewise.
+ * include/parallel/multiway_mergesort.h (_SplitConsistently,
+ parallel_sort_mwms_pu, parallel_sort_mwms): Likewise.
+ * include/parallel/partial_sum.h (__parallel_partial_sum_linear):
+ Likewise.
+ * include/parallel/partition.h (__parallel_partition): Replace int
+ by appropriate difference_type or _ThreadIndex.
+
+2009-11-08 Jason Merrill <jason@redhat.com>
+
+ * include/ext/sso_string_base.h (_M_mutate): Remove extra 'const'.
+
+2009-11-06 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/doxygen/user.cfg.in: Adjust includes.
+
+ * doc/doxygen/doxygroups.cc: Move group markup.
+ * include/tr1_impl/regex: Change " to '. Add group markup.
+ * include/std/utility: Same.
+ * include/std/type_traits: Same.
+ * include/std/streambuf: Same.
+ * include/std/iosfwd: Same.
+ * include/std/limits: Same.
+ * include/std/sstream: Same.
+ * include/profile/impl/profiler_state.h: Same.
+ * include/profile/impl/profiler_hashtable_size.h: Same.
+ * include/bits/stl_algobase.h: Same.
+ * include/bits/stl_iterator_base_types.h: Same.
+ * include/bits/stream_iterator.h: Same.
+ * include/bits/stl_iterator.h: Same.
+ * include/bits/stl_tempbuf.h: Same.
+ * include/bits/streambuf_iterator.h: Same.
+ * libsupc++/exception: Same.
+ * libsupc++/cxxabi.h: Same.
+ * include/tr1_impl/type_traits: Same.
+
+ * include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f.
+ * include/parallel/list_partition.h: Same.
+ * include/parallel/for_each.h: Same.
+ * include/parallel/workstealing.h: Same.
+ * include/parallel/base.h: Same.
+ * include/parallel/equally_split.h: Same.
+ * include/parallel/random_shuffle.h: Same.
+ * include/parallel/balanced_quicksort.h: Same.
+ * include/parallel/merge.h: Same.
+ * include/parallel/multiway_mergesort.h: Same.
+ * include/parallel/compatibility.h: Same.
+ * include/parallel/queue.h: Same.
+ * include/parallel/checkers.h: Same.
+ * include/parallel/random_number.h: Same.
+
+
+ * include/c_global/csignal: Change # to \#.
+ * include/c_global/cstdlib: Same.
+ * include/c_global/cstdio: Same.
+ * include/c_global/cstdarg: Same.
+ * include/c_global/cctype: Same.
+ * include/c_global/cerrno: Same.
+ * include/c_global/cstdatomic: Same.
+ * include/c_global/cmath: Same.
+ * include/c_global/ciso646: Same.
+ * include/c_global/ctime: Same.
+ * include/c_global/clocale: Same.
+ * include/c_global/climits: Same.
+ * include/c_global/cassert: Same.
+ * include/c_global/csetjmp: Same.
+ * include/c_global/cwchar: Same.
+ * include/c_global/cfloat: Same.
+ * include/c_global/cstring: Same.
+ * include/c_global/cstddef: Same.
+ * include/c_global/cwctype: Same.
+
+ * include/std/memory: Only dance around boost_sp_counted_base.h.
+ * include/tr1_impl/boost_sp_counted_base.h: Add markup.
+ * include/tr1/shared_ptr.h: Strip markup.
+ * include/bits/shared_ptr.h: Move base types...
+ * include/bits/shared_ptr_base.h: ...here.
+ * include/Makefile.am: Add.
+ * include/Makefile.in: Regenerate.
+ * configure: Same.
+ * testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
+ Adjust line numbers.
+ * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
+
2009-11-06 Paolo Carlini <paolo.carlini@oracle.com>
* include/parallel/multiway_merge.h: Simple formatting and
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index e34b0c4bee8..75adc589e12 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -19542,7 +19542,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -26444,7 +26444,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -32259,7 +32259,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -43904,7 +43904,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -44118,7 +44118,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -44593,7 +44593,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -50762,7 +50762,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -56562,7 +56562,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -56729,7 +56729,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -56878,7 +56878,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -57045,7 +57045,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
@@ -57217,7 +57217,7 @@ $as_echo_n "checking for ld version... " >&6; }
glibcxx_ld_is_gold=yes
fi
ldver=`$LD --version 2>/dev/null |
- sed -e 's/GNU gold /GNU ld/;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
+ sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
glibcxx_gnu_ld_version=`echo $ldver | \
$AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
diff --git a/libstdc++-v3/doc/doxygen/doxygroups.cc b/libstdc++-v3/doc/doxygen/doxygroups.cc
index d11fb3bd2d1..e7c664a92fb 100644
--- a/libstdc++-v3/doc/doxygen/doxygroups.cc
+++ b/libstdc++-v3/doc/doxygen/doxygroups.cc
@@ -149,10 +149,3 @@ summarized in <a href="tables.html">tables</a>. */
* Components for concurrent operations, including threads, mutexes,
* and condition variables.
*/
-
-/**
- * @defgroup pointer_abstractions Pointer Abstractions
- * @ingroup memory
- *
- * Components for memory allocation, deallocation, and management.
- */
diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in
index a26c5450e79..be32ecbb321 100644
--- a/libstdc++-v3/doc/doxygen/user.cfg.in
+++ b/libstdc++-v3/doc/doxygen/user.cfg.in
@@ -1,4 +1,4 @@
-# Doxyfile 1.5.8
+# Doxyfile 1.6.1
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
@@ -14,282 +14,276 @@
# Project related configuration options
#---------------------------------------------------------------------------
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
# http://www.gnu.org/software/libiconv for the list of possible encodings.
DOXYFILE_ENCODING = UTF-8
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
PROJECT_NAME = libstdc++
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER =
+PROJECT_NUMBER =
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = @outdir@
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
# otherwise cause performance problems for the file system.
CREATE_SUBDIRS = NO
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek,
-# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish,
-# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene,
-# Spanish, Swedish, and Ukrainian.
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
OUTPUT_LANGUAGE = English
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
# Set to NO to disable this.
BRIEF_MEMBER_DESC = NO
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will
-# prepend the brief description of a member or function before the
-# detailed description. Note: if both HIDE_UNDOC_MEMBERS and
-# BRIEF_MEMBER_DESC are set to NO, the brief descriptions will be
-# completely suppressed.
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
REPEAT_BRIEF = YES
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
# "represents" "a" "an" "the"
-ABBREVIATE_BRIEF =
+ABBREVIATE_BRIEF =
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
# description.
ALWAYS_DETAILED_SEC = YES
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
INLINE_INHERITED_MEMB = YES
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
# to NO the shortest path that makes the file name unique will be used.
FULL_PATH_NAMES = NO
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# 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
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# 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.
-STRIP_FROM_PATH =
+STRIP_FROM_PATH =
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
# are normally passed to the compiler using the -I flag.
-STRIP_FROM_INC_PATH =
+STRIP_FROM_INC_PATH =
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
# doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = YES
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
# (thus requiring an explicit @brief command for a brief description.)
JAVADOC_AUTOBRIEF = NO
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
# an explicit \brief command for a brief description.)
QT_AUTOBRIEF = NO
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
# description. Set this tag to YES if you prefer the old behaviour instead.
MULTILINE_CPP_IS_BRIEF = YES
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
# re-implements.
INHERIT_DOCS = YES
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
# be part of the file/class/namespace that contains it.
SEPARATE_MEMBER_PAGES = NO
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
TAB_SIZE = 4
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
ALIASES = "doctodo=@todo\nDoc me! See doc/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more. " \
"isiosfwd=One of the @link ios I/O @endlink "
-# 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 of all members will be omitted, etc.
+# 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
+# of all members will be omitted, etc.
OPTIMIZE_OUTPUT_FOR_C = NO
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
# scopes will look different, etc.
OPTIMIZE_OUTPUT_JAVA = NO
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
# Fortran.
OPTIMIZE_FOR_FORTRAN = NO
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
# VHDL.
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, C#, 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
-
-EXTENSION_MAPPING =
-
-# 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
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
+# 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, C#, 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 =
+
+# 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
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
BUILTIN_STL_SUPPORT = NO
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
CPP_CLI_SUPPORT = NO
-# Set the SIP_SUPPORT tag to YES if your project consists of sip
-# sources only. Doxygen will parse them like normal C++ but will
-# assume all classes use public instead of private inheritance when no
-# explicit protection keyword is present.
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
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 to 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 to 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 = YES
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
DISTRIBUTE_GROUP_DOC = YES
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
# the \nosubgrouping command.
SUBGROUPING = YES
-# 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 with name TypeT. When disabled the typedef
-# will appear as a member of a file, namespace, or class. And the
-# struct will be named TypeS. This can typically be useful for C code
-# in case the coding convention dictates that all compound types are
-# typedef'ed and only the typedef is referenced, never the tag name.
+# 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
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
TYPEDEF_HIDES_STRUCT = NO
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use
-# to determine which symbols to keep in memory and which to flush to
-# disk. When the cache is full, less often used symbols will be
-# written to disk. For small to medium size projects (<1000 input
-# files) the default value is probably good enough. For larger
-# projects a too small cache size can cause doxygen to be busy
-# swapping symbols to and from disk most of the time causing a
-# significant performance penality. If the system has enough physical
-# memory increasing the cache will improve the performance by keeping
-# more symbols in memory. Note that the value works on a logarithmic
-# scale so increasing the size by one will rougly double the memory
-# usage. The cache size is given by this formula:
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly 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
@@ -299,286 +293,289 @@ SYMBOL_CACHE_SIZE = 0
# Build related configuration options
#---------------------------------------------------------------------------
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
EXTRACT_ALL = NO
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation.
EXTRACT_PRIVATE = NO
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
EXTRACT_STATIC = YES
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
# If set to NO only classes defined in header files are included.
EXTRACT_LOCAL_CLASSES = YES
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
# If set to NO (the default) only methods in the interface are included.
EXTRACT_LOCAL_METHODS = YES
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
# anonymous namespace are hidden.
EXTRACT_ANON_NSPACES = NO
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
# This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_MEMBERS = NO
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_CLASSES = YES
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
# documentation.
HIDE_FRIEND_COMPOUNDS = NO
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
# function's detailed documentation block.
HIDE_IN_BODY_DOCS = NO
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.
INTERNAL_DOCS = NO
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
CASE_SENSE_NAMES = NO
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
# documentation. If set to YES the scope will be hidden.
HIDE_SCOPE_NAMES = NO
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
# of that file.
SHOW_INCLUDE_FILES = NO
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
INLINE_INFO = YES
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
# declaration order.
SORT_MEMBER_DOCS = YES
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
# declaration order.
SORT_BRIEF_DOCS = YES
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = YES
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
# the group names will appear in their defined order.
SORT_GROUP_NAMES = YES
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
# alphabetical list.
SORT_BY_SCOPE_NAME = YES
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
GENERATE_TODOLIST = YES
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
# commands in the documentation.
GENERATE_TESTLIST = NO
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
# commands in the documentation.
GENERATE_BUGLIST = YES
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
# \deprecated commands in the documentation.
GENERATE_DEPRECATEDLIST= YES
-# The ENABLED_SECTIONS tag can be used to enable conditional
+# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
ENABLED_SECTIONS = @enabled_sections@
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
# command in the documentation regardless of this setting.
MAX_INITIALIZER_LINES = 0
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
# list will mention the files that were used to generate the documentation.
SHOW_USED_FILES = YES
-# If the sources in your project are distributed over multiple
-# directories then setting the SHOW_DIRECTORIES tag to YES will show
-# the directory hierarchy in the documentation. The default is NO.
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
SHOW_DIRECTORIES = YES
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
# Folder Tree View (if specified). The default is YES.
SHOW_FILES = YES
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
# and from the Folder Tree View (if specified). The default is YES.
SHOW_NAMESPACES = YES
-# The FILE_VERSION_FILTER tag can be used to specify a program or
-# script that doxygen should invoke to get the current version for
-# each file (typically from the version control system). Doxygen will
-# invoke the program by executing (via popen()) the command <command>
-# <input-file>, where <command> is the value of the
-# FILE_VERSION_FILTER tag, and <input-file> is the name of an input
-# file provided by doxygen. Whatever the program writes to standard
-# output is used as the file version. See the manual for examples.
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
-FILE_VERSION_FILTER =
+FILE_VERSION_FILTER =
-# The LAYOUT_FILE tag can be used to specify a layout file which will
-# be parsed by doxygen. The layout file controls the global structure
-# of the generated output files in an output format independent
-# way. The create the layout file that represents doxygen's defaults,
-# run doxygen with the -l option. You can optionally specify a file
-# name after the option, if omitted DoxygenLayout.xml will be used as
-# the name of the layout file.
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
-LAYOUT_FILE =
+LAYOUT_FILE =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-# The QUIET tag can be used to turn on/off the messages that are generated
+# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
QUIET = NO
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
# NO is used.
WARNINGS = YES
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
# automatically be disabled.
WARN_IF_UNDOCUMENTED = NO
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
# don't exist or using markup commands wrongly.
WARN_IF_DOC_ERROR = YES
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
# documentation.
WARN_NO_PARAMDOC = NO
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
# be obtained via FILE_VERSION_FILTER)
WARN_FORMAT = "$file:$line: $text "
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
# to stderr.
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
-# The INPUT tag can be used to specify the files and/or directories
-# that contain documented source files. You may enter file names like
-# "myfile.cpp" or directories like "/usr/src/myproject". Separate the
-# files or directories with spaces.
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
- @srcdir@/libsupc++/cxxabi.h \
+ @srcdir@/libsupc++/cxxabi.h \
@srcdir@/libsupc++/cxxabi-forced.h \
@srcdir@/libsupc++/exception \
- @srcdir@/libsupc++/exception_ptr.h \
+ @srcdir@/libsupc++/exception_ptr.h \
@srcdir@/libsupc++/initializer_list \
+ @srcdir@/libsupc++/nested_exception.h \
@srcdir@/libsupc++/new \
@srcdir@/libsupc++/typeinfo \
include/algorithm \
@@ -669,17 +666,6 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
include/profile/unordered_map \
include/profile/unordered_set \
include/profile/vector \
- include/profile/base.h \
- include/profile/impl/profiler.h \
- include/profile/impl/profiler_container_size.h \
- include/profile/impl/profiler_hash_func.h \
- include/profile/impl/profiler_hashtable_size.h \
- include/profile/impl/profiler_map_to_unordered_map.h \
- include/profile/impl/profiler_node.h \
- include/profile/impl/profiler_state.h \
- include/profile/impl/profiler_trace.h \
- include/profile/impl/profiler_vector_size.h \
- include/profile/impl/profiler_vector_to_list.h \
include/ext/algorithm \
include/ext/functional \
include/ext/iterator \
@@ -720,7 +706,6 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
include/tr1_impl/cwctype \
include/tr1_impl/functional \
include/tr1_impl/hashtable \
- include/tr1_impl/random \
include/tr1_impl/regex \
include/tr1_impl/type_traits \
include/tr1_impl/unordered_map \
@@ -732,55 +717,55 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
include/@host_alias@/bits \
include/backward \
include/bits \
- include/bits/shared_ptr.h \
include/debug \
include/parallel \
include/profile \
+ include/profile/impl \
include/ext \
include/ext/pb_ds \
- include/ext/pb_ds/detail
+ include/ext/pb_ds/detail
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
# the list of possible encodings.
INPUT_ENCODING = UTF-8
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
FILE_PATTERNS = *.h \
*.hpp \
*.tcc
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
RECURSIVE = NO
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = Makefile
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
# from the input.
EXCLUDE_SYMLINKS = NO
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/*
EXCLUDE_PATTERNS = stamp-* \
@@ -789,64 +774,64 @@ EXCLUDE_PATTERNS = stamp-* \
*extc++.h* \
*/.svn/*
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test
-EXCLUDE_SYMBOLS =
+EXCLUDE_SYMBOLS =
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
# the \include command).
-EXAMPLE_PATH =
+EXAMPLE_PATH =
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
-EXAMPLE_PATTERNS =
+EXAMPLE_PATTERNS =
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
# Possible values are YES and NO. If left blank NO is used.
EXAMPLE_RECURSIVE = NO
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
# the \image command).
-IMAGE_PATH =
+IMAGE_PATH =
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
# ignored.
-INPUT_FILTER =
+INPUT_FILTER =
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
# is applied to all files.
-FILTER_PATTERNS =
+FILTER_PATTERNS =
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
# files to browse (i.e. when SOURCE_BROWSER is set to YES).
FILTER_SOURCE_FILES = NO
@@ -855,54 +840,54 @@ FILTER_SOURCE_FILES = NO
# configuration options related to source browsing
#---------------------------------------------------------------------------
-# If the SOURCE_BROWSER tag is set to YES then a list of source files
-# will be generated. Documented entities will be cross-referenced with
-# these sources. Note: To get rid of all source code in the generated
-# output, make sure also VERBATIM_HEADERS is set to NO.
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
SOURCE_BROWSER = YES
-# Setting the INLINE_SOURCES tag to YES will include the body
+# Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation.
INLINE_SOURCES = NO
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
STRIP_CODE_COMMENTS = NO
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
# functions referencing it will be listed.
REFERENCED_BY_RELATION = YES
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
# called/used by that function will be listed.
REFERENCES_RELATION = YES
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
# Otherwise they will link to the documentation.
REFERENCES_LINK_SOURCE = YES
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
# will need version 4.8.6 or higher.
USE_HTAGS = NO
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = NO
@@ -911,389 +896,398 @@ VERBATIM_HEADERS = NO
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
# contains a lot of classes, structs, unions or interfaces.
ALPHABETICAL_INDEX = YES
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20])
COLS_IN_ALPHA_INDEX = 2
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
# should be ignored while generating the index headers.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
# generate HTML output.
GENERATE_HTML = @do_html@
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
HTML_OUTPUT = html
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
# doxygen will generate files with .html extension.
HTML_FILE_EXTENSION = .html
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
# standard header.
-HTML_HEADER =
+HTML_HEADER =
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
# standard footer.
-HTML_FOOTER =
+HTML_FOOTER =
+
+# If the HTML_TIMESTAMP tag is set to YES then the generated HTML
+# documentation will contain the timesstamp.
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
+HTML_TIMESTAMP = NO
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
# stylesheet in the HTML output directory as well, or it will be erased!
-HTML_STYLESHEET =
+HTML_STYLESHEET =
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
HTML_ALIGN_MEMBERS = NO
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
HTML_DYNAMIC_SECTIONS = NO
# If the GENERATE_DOCSET tag is set to YES, additional index files
# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5
-# (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the
-# docset in that directory and running "make install" will install the
-# docset in ~/Library/Developer/Shared/Documentation/DocSets so that
-# Xcode will find it at startup. See
-# http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for
-# more information.
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
GENERATE_DOCSET = NO
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name
-# of the feed. A documentation feed provides an umbrella under which
-# multiple documentation sets from a single provider (such as a
-# company or product suite) can be grouped.
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
DOCSET_FEEDNAME = "Doxygen generated docs"
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
# will append .docset to the name.
DOCSET_BUNDLE_ID = org.doxygen.Project
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
# of the generated HTML documentation.
GENERATE_HTMLHELP = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
# written to the html output directory.
-CHM_FILE =
+CHM_FILE =
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
# the HTML help compiler on the generated index.hhp.
-HHC_LOCATION =
+HHC_LOCATION =
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
# it should be included in the master .chm file (NO).
GENERATE_CHI = NO
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
# content.
-CHM_INDEX_ENCODING =
+CHM_INDEX_ENCODING =
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
# normal table of contents (NO) in the .chm file.
BINARY_TOC = NO
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
# to the contents of the HTML help documentation and to the tree view.
TOC_EXPAND = NO
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be
-# generated that can be used as input for Qt's qhelpgenerator to
-# generate a Qt Compressed Help (.qch) of the generated HTML
-# documentation.
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
GENERATE_QHP = NO
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
# The path specified is relative to the HTML output folder.
-QCH_FILE =
+QCH_FILE =
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
# http://doc.trolltech.com/qthelpproject.html#namespace
QHP_NAMESPACE = org.doxygen.Project
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
# http://doc.trolltech.com/qthelpproject.html#virtual-folders
QHP_VIRTUAL_FOLDER = doc
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom
-# filter to add. For more information please see
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
# http://doc.trolltech.com/qthelpproject.html#custom-filters
-QHP_CUST_FILTER_NAME =
+QHP_CUST_FILTER_NAME =
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of
-# the custom filter to add.For more information please see <a
-# href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt
-# Help Project / Custom Filters</a>.
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
-QHP_CUST_FILTER_ATTRS =
+QHP_CUST_FILTER_ATTRS =
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes
-# this project's filter section matches. <a
-# href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt
-# Help Project / Filter Attributes</a>.
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
# .qhp file.
-QHG_LOCATION =
+QHG_LOCATION =
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
DISABLE_INDEX = YES
-# This tag can be used to set the number of enum values (range [1..20])
+# This tag can be used to set the number of enum values (range [1..20])
# that doxygen will group on one line in the generated HTML documentation.
ENUM_VALUES_PER_LINE = 4
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to FRAME, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature. Other possible values
-# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list;
-# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
-# disables this behavior completely. For backwards compatibility with previous
-# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
-# respectively.
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
GENERATE_TREEVIEW = YES
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
# is shown.
TREEVIEW_WIDTH = 250
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
# to force them to be regenerated.
FORMULA_FONTSIZE = 10
+# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP)
+# there is already a search function so this one should typically
+# be disabled.
+
+SEARCHENGINE = NO
+
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
GENERATE_LATEX = NO
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `latex' will be used as the default path.
LATEX_OUTPUT = latex
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked. If left blank `latex' will be used as the default command name.
LATEX_CMD_NAME = latex
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
# default command name.
MAKEINDEX_CMD_NAME = makeindex
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
# save some trees in general.
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, a4wide, letter, legal and
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
# executive. If left blank a4wide will be used.
PAPER_TYPE = letter
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
# packages that should be included in the LaTeX output.
EXTRA_PACKAGES = amsmath
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
# standard header. Notice: only use this tag if you know what you are doing!
-LATEX_HEADER =
+LATEX_HEADER =
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
PDF_HYPERLINKS = NO
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation.
USE_PDFLATEX = NO
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
# This option is also used when generating formulas in HTML.
LATEX_BATCHMODE = NO
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
# in the output.
LATEX_HIDE_INDICES = NO
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
# other RTF readers or editors.
GENERATE_RTF = NO
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `rtf' will be used as the default path.
RTF_OUTPUT = rtf
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_RTF = NO
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
# Note: wordpad (write) and others do not support links.
RTF_HYPERLINKS = NO
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
-# Set optional variables used in the generation of an rtf document.
+# Set optional variables used in the generation of an rtf document.
# Syntax is similar to doxygen's config file.
-RTF_EXTENSIONS_FILE =
+RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
GENERATE_MAN = @do_man@
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `man' will be used as the default path.
MAN_OUTPUT = man
-# The MAN_EXTENSION tag determines the extension that is added to
+# The MAN_EXTENSION tag determines the extension that is added to
# the generated man pages (default is the subroutine's section .3)
MAN_EXTENSION = .3
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
# would be unable to find the correct page. The default is NO.
MAN_LINKS = NO
@@ -1302,33 +1296,33 @@ MAN_LINKS = NO
# configuration options related to the XML output
#---------------------------------------------------------------------------
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
# the code including all documentation.
GENERATE_XML = @do_xml@
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `xml' will be used as the default path.
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
# syntax of the XML files.
-XML_SCHEMA =
+XML_SCHEMA =
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
# syntax of the XML files.
-XML_DTD =
+XML_DTD =
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
# enabling this will significantly increase the size of the XML output.
XML_PROGRAMLISTING = YES
@@ -1337,10 +1331,10 @@ XML_PROGRAMLISTING = YES
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
# and incomplete at the moment.
GENERATE_AUTOGEN_DEF = NO
@@ -1349,84 +1343,84 @@ GENERATE_AUTOGEN_DEF = NO
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
# moment.
GENERATE_PERLMOD = NO
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
# to generate PDF and DVI output from the Perl module output.
PERLMOD_LATEX = NO
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
# and Perl will parse it just the same.
PERLMOD_PRETTY = YES
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
# Makefile don't overwrite each other's variables.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
+# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
# files.
ENABLE_PREPROCESSING = YES
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES.
MACRO_EXPANSION = YES
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
# PREDEFINED and EXPAND_AS_DEFINED tags.
EXPAND_ONLY_PREDEF = NO
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
SEARCH_INCLUDES = YES
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
# the preprocessor.
-INCLUDE_PATH =
+INCLUDE_PATH =
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
# be used.
-INCLUDE_FILE_PATTERNS =
+INCLUDE_FILE_PATTERNS =
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
PREDEFINED = __cplusplus \
@@ -1449,279 +1443,268 @@ PREDEFINED = __cplusplus \
_GLIBCXX_USE_WCHAR_T \
_GLIBCXX_USE_LONG_LONG \
_GLIBCXX_USE_C99_STDINT_TR1 \
- _GLIBCXX_ATOMIC_BUILTINS_1 \
- _GLIBCXX_ATOMIC_BUILTINS_2 \
- _GLIBCXX_ATOMIC_BUILTINS_4 \
- _GLIBCXX_ATOMIC_BUILTINS_8 \
- _GLIBCXX_USE_SCHED_YIELD \
- _GLIBCXX_USE_NANOSLEEP \
+ _GLIBCXX_ATOMIC_BUILTINS_1 \
+ _GLIBCXX_ATOMIC_BUILTINS_2 \
+ _GLIBCXX_ATOMIC_BUILTINS_4 \
+ _GLIBCXX_ATOMIC_BUILTINS_8 \
+ _GLIBCXX_USE_SCHED_YIELD \
+ _GLIBCXX_USE_NANOSLEEP \
__glibcxx_function_requires=// \
__glibcxx_class_requires=// \
__glibcxx_class_requires2=// \
__glibcxx_class_requires3=// \
__glibcxx_class_requires4=//
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES
-# then this tag can be used to specify a list of macro names that
-# should be expanded. The macro definition that is found in the
-# sources will be used. Use the PREDEFINED tag if you want to use a
-# different macro definition.
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
-EXPAND_AS_DEFINED =
+EXPAND_AS_DEFINED =
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
# the parser if not removed.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration::additions related to external references
#---------------------------------------------------------------------------
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
-TAGFILES =
+TAGFILES =
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.
GENERATE_TAGFILE = @generate_tagfile@
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
# will be listed.
ALLEXTERNALS = YES
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
# be listed.
EXTERNAL_GROUPS = YES
-# The PERL_PATH should be the absolute path and name of the perl script
+# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration options related to the dot tool
#---------------------------------------------------------------------------
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
# powerful graphs.
CLASS_DIAGRAMS = YES
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
# or is not a class.
HIDE_UNDOC_RELATIONS = NO
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)
HAVE_DOT = YES
-# By default doxygen will write a font called FreeSans.ttf to the
-# output directory and reference it in all dot files that doxygen
-# generates. This font does not include all possible unicode
-# characters however, so when you need these (or just want a
-# differently looking font) you can specify the font name using
-# DOT_FONTNAME. You need need to make sure dot is able to find the
-# font, which can be done by putting it in a standard location or by
-# setting the DOTFONTPATH environment variable or by setting
-# DOT_FONTPATH to the directory containing the font.
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
DOT_FONTNAME = FreeSans
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
# The default size is 10pt.
DOT_FONTSIZE = 10
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
# can find it using this tag.
-DOT_FONTPATH =
+DOT_FONTPATH =
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
# the CLASS_DIAGRAMS tag to NO.
CLASS_GRAPH = YES
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
# class references variables) of the class with other documented classes.
COLLABORATION_GRAPH = NO
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for groups, showing the direct groups dependencies
GROUP_GRAPHS = YES
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
UML_LOOK = NO
-# If set to YES, the inheritance and collaboration graphs will show the
+# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.
TEMPLATE_RELATIONS = YES
-# 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
-# file showing the direct and indirect include dependencies of the file with
+# 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
+# file showing the direct and indirect include dependencies of the file with
# other documented files.
INCLUDE_GRAPH = NO
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
# indirectly include this file.
INCLUDED_BY_GRAPH = NO
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
# for selected functions only using the \callgraph command.
CALL_GRAPH = NO
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
# graphs for selected functions only using the \callergraph command.
CALLER_GRAPH = NO
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
# will graphical hierarchy of all classes instead of a textual one.
GRAPHICAL_HIERARCHY = YES
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
# relations between the files in the directories.
DIRECTORY_GRAPH = YES
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
# If left blank png will be used.
DOT_IMAGE_FORMAT = png
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
-DOT_PATH =
+DOT_PATH =
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
# \dotfile command).
-DOTFILE_DIRS =
+DOTFILE_DIRS =
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
DOT_GRAPH_MAX_NODES = 50
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
MAX_DOT_GRAPH_DEPTH = 0
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
# a graph (i.e. they become hard to read).
DOT_TRANSPARENT = NO
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
# support this, this feature is disabled by default.
DOT_MULTI_TARGETS = YES
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
# arrows in the dot generated graphs.
-GENERATE_LEGEND = NO
+GENERATE_LEGEND = YES
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
# the various graphs.
DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Options related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = NO
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 196ccb9911f..1cea8a24e94 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -121,6 +121,7 @@ bits_headers = \
${bits_srcdir}/stream_iterator.h \
${bits_srcdir}/streambuf_iterator.h \
${bits_srcdir}/shared_ptr.h \
+ ${bits_srcdir}/shared_ptr_base.h \
${bits_srcdir}/slice_array.h \
${bits_srcdir}/sstream.tcc \
${bits_srcdir}/stl_algo.h \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index b1c457e2ea6..a1fab9adfbe 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -364,6 +364,7 @@ bits_headers = \
${bits_srcdir}/stream_iterator.h \
${bits_srcdir}/streambuf_iterator.h \
${bits_srcdir}/shared_ptr.h \
+ ${bits_srcdir}/shared_ptr_base.h \
${bits_srcdir}/slice_array.h \
${bits_srcdir}/sstream.tcc \
${bits_srcdir}/stl_algo.h \
diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h
index 81bef585940..796df14c2c4 100644
--- a/libstdc++-v3/include/bits/shared_ptr.h
+++ b/libstdc++-v3/include/bits/shared_ptr.h
@@ -22,6 +22,8 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
+// GCC Note: Based on files from version 1.32.0 of the Boost library.
+
// shared_count.hpp
// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
@@ -39,8 +41,6 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-// GCC Note: based on version 1.32.0 of the Boost library.
-
/** @file bits/shared_ptr.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
@@ -53,9 +53,7 @@
# include <c++0x_warning.h>
#endif
-#if defined(_GLIBCXX_INCLUDE_AS_TR1)
-# error C++0x header cannot be included from TR1 header
-#endif
+#include <bits/shared_ptr_base.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
@@ -64,563 +62,89 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @{
*/
- // counted ptr with no deleter or allocator support
- template<typename _Ptr, _Lock_policy _Lp>
- class _Sp_counted_ptr
- : public _Sp_counted_base<_Lp>
- {
- public:
- _Sp_counted_ptr(_Ptr __p)
- : _M_ptr(__p) { }
-
- virtual void
- _M_dispose() // nothrow
- { delete _M_ptr; }
-
- virtual void
- _M_destroy() // nothrow
- { delete this; }
-
- virtual void*
- _M_get_deleter(const std::type_info& __ti)
- { return 0; }
-
- _Sp_counted_ptr(const _Sp_counted_ptr&) = delete;
- _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete;
-
- protected:
- _Ptr _M_ptr; // copy constructor must not throw
- };
-
- // support for custom deleter and/or allocator
- template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp>
- class _Sp_counted_deleter
- : public _Sp_counted_ptr<_Ptr, _Lp>
- {
- typedef typename _Alloc::template
- rebind<_Sp_counted_deleter>::other _My_alloc_type;
-
- // Helper class that stores the Deleter and also acts as an allocator.
- // Used to dispose of the owned pointer and the internal refcount
- // Requires that copies of _Alloc can free each other's memory.
- struct _My_Deleter
- : public _My_alloc_type // copy constructor must not throw
- {
- _Deleter _M_del; // copy constructor must not throw
- _My_Deleter(_Deleter __d, const _Alloc& __a)
- : _My_alloc_type(__a), _M_del(__d) { }
- };
-
- protected:
- typedef _Sp_counted_ptr<_Ptr, _Lp> _Base_type;
-
- public:
- /**
- * @brief
- * @pre __d(__p) must not throw.
- */
- _Sp_counted_deleter(_Ptr __p, _Deleter __d)
- : _Base_type(__p), _M_del(__d, _Alloc()) { }
-
- /**
- * @brief
- * @pre __d(__p) must not throw.
- */
- _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a)
- : _Base_type(__p), _M_del(__d, __a) { }
-
- virtual void
- _M_dispose() // nothrow
- { _M_del._M_del(_Base_type::_M_ptr); }
-
- virtual void
- _M_destroy() // nothrow
- {
- _My_alloc_type __a(_M_del);
- this->~_Sp_counted_deleter();
- __a.deallocate(this, 1);
- }
-
- virtual void*
- _M_get_deleter(const std::type_info& __ti)
- { return __ti == typeid(_Deleter) ? &_M_del._M_del : 0; }
-
- protected:
- _My_Deleter _M_del; // copy constructor must not throw
- };
-
- // helpers for make_shared / allocate_shared
-
- template<typename _Tp>
- struct _Sp_destroy_inplace
- {
- void operator()(_Tp* __p) const { if (__p) __p->~_Tp(); }
- };
-
- struct _Sp_make_shared_tag { };
-
- template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
- class _Sp_counted_ptr_inplace
- : public _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
- {
- typedef _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
- _Base_type;
-
- public:
- _Sp_counted_ptr_inplace(_Alloc __a)
- : _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
- , _M_storage()
- {
- void* __p = &_M_storage;
- ::new (__p) _Tp(); // might throw
- _Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
- }
-
- template<typename... _Args>
- _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
- : _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
- , _M_storage()
- {
- void* __p = &_M_storage;
- ::new (__p) _Tp(std::forward<_Args>(__args)...); // might throw
- _Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
- }
-
- // override because the allocator needs to know the dynamic type
- virtual void
- _M_destroy() // nothrow
- {
- typedef typename _Alloc::template
- rebind<_Sp_counted_ptr_inplace>::other _My_alloc_type;
- _My_alloc_type __a(_Base_type::_M_del);
- this->~_Sp_counted_ptr_inplace();
- __a.deallocate(this, 1);
- }
-
- // sneaky trick so __shared_ptr can get the managed pointer
- virtual void*
- _M_get_deleter(const std::type_info& __ti)
- {
- return __ti == typeid(_Sp_make_shared_tag)
- ? static_cast<void*>(&_M_storage)
- : _Base_type::_M_get_deleter(__ti);
- }
-
- private:
- typename aligned_storage<sizeof(_Tp), alignment_of<_Tp>::value>::type
- _M_storage;
- };
-
- template<_Lock_policy _Lp = __default_lock_policy>
- class __weak_count;
-
- template<_Lock_policy _Lp = __default_lock_policy>
- class __shared_count
- {
- public:
- __shared_count()
- : _M_pi(0) // nothrow
- { }
-
- template<typename _Ptr>
- __shared_count(_Ptr __p) : _M_pi(0)
- {
- __try
- {
- _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
- }
- __catch(...)
- {
- delete __p;
- __throw_exception_again;
- }
- }
-
- template<typename _Ptr, typename _Deleter>
- __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
- {
- // allocator's value_type doesn't matter, will rebind it anyway
- typedef std::allocator<int> _Alloc;
- typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
- typedef std::allocator<_Sp_cd_type> _Alloc2;
- _Alloc2 __a2;
- __try
- {
- _M_pi = __a2.allocate(1);
- ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d);
- }
- __catch(...)
- {
- __d(__p); // Call _Deleter on __p.
- if (_M_pi)
- __a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
- __throw_exception_again;
- }
- }
-
- template<typename _Ptr, typename _Deleter, typename _Alloc>
- __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
- {
- typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
- typedef typename _Alloc::template rebind<_Sp_cd_type>::other _Alloc2;
- _Alloc2 __a2(__a);
- __try
- {
- _M_pi = __a2.allocate(1);
- ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d, __a);
- }
- __catch(...)
- {
- __d(__p); // Call _Deleter on __p.
- if (_M_pi)
- __a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
- __throw_exception_again;
- }
- }
-
- template<typename _Tp, typename _Alloc, typename... _Args>
- __shared_count(_Sp_make_shared_tag, _Tp*, _Alloc __a, _Args&&... __args)
- : _M_pi(0)
- {
- typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
- typedef typename _Alloc::template rebind<_Sp_cp_type>::other _Alloc2;
- _Alloc2 __a2(__a);
- __try
- {
- _M_pi = __a2.allocate(1);
- ::new(static_cast<void*>(_M_pi)) _Sp_cp_type(__a,
- std::forward<_Args>(__args)...);
- }
- __catch(...)
- {
- if (_M_pi)
- __a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1);
- __throw_exception_again;
- }
- }
-
-#if _GLIBCXX_DEPRECATED
- // Special case for auto_ptr<_Tp> to provide the strong guarantee.
- template<typename _Tp>
- explicit
- __shared_count(std::auto_ptr<_Tp>&& __r)
- : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get()))
- { __r.release(); }
-#endif
-
- // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
- template<typename _Tp, typename _Del>
- explicit
- __shared_count(std::unique_ptr<_Tp, _Del>&& __r)
- : _M_pi(_S_create_from_up(std::move(__r)))
- { __r.release(); }
-
- // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
- explicit
- __shared_count(const __weak_count<_Lp>& __r);
-
- ~__shared_count() // nothrow
- {
- if (_M_pi != 0)
- _M_pi->_M_release();
- }
-
- __shared_count(const __shared_count& __r)
- : _M_pi(__r._M_pi) // nothrow
- {
- if (_M_pi != 0)
- _M_pi->_M_add_ref_copy();
- }
-
- __shared_count&
- operator=(const __shared_count& __r) // nothrow
- {
- _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
- if (__tmp != _M_pi)
- {
- if (__tmp != 0)
- __tmp->_M_add_ref_copy();
- if (_M_pi != 0)
- _M_pi->_M_release();
- _M_pi = __tmp;
- }
- return *this;
- }
-
- void
- _M_swap(__shared_count& __r) // nothrow
- {
- _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
- __r._M_pi = _M_pi;
- _M_pi = __tmp;
- }
-
- long
- _M_get_use_count() const // nothrow
- { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
-
- bool
- _M_unique() const // nothrow
- { return this->_M_get_use_count() == 1; }
-
- void*
- _M_get_deleter(const std::type_info& __ti) const
- { return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
-
- bool
- _M_less(const __shared_count& __rhs) const
- { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
-
- bool
- _M_less(const __weak_count<_Lp>& __rhs) const
- { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
-
- // friend function injected into enclosing namespace and found by ADL
- friend inline bool
- operator==(const __shared_count& __a, const __shared_count& __b)
- { return __a._M_pi == __b._M_pi; }
-
- private:
- friend class __weak_count<_Lp>;
-
- template<typename _Tp, typename _Del>
- static _Sp_counted_base<_Lp>*
- _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
- typename std::enable_if<!std::is_reference<_Del>::value>::type* = 0)
- {
- return new _Sp_counted_deleter<_Tp*, _Del, std::allocator<_Tp>,
- _Lp>(__r.get(), __r.get_deleter());
- }
-
- template<typename _Tp, typename _Del>
- static _Sp_counted_base<_Lp>*
- _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
- typename std::enable_if<std::is_reference<_Del>::value>::type* = 0)
- {
- typedef typename std::remove_reference<_Del>::type _Del1;
- typedef std::reference_wrapper<_Del1> _Del2;
- return new _Sp_counted_deleter<_Tp*, _Del2, std::allocator<_Tp>,
- _Lp>(__r.get(), std::ref(__r.get_deleter()));
- }
-
- _Sp_counted_base<_Lp>* _M_pi;
- };
-
-
- template<_Lock_policy _Lp>
- class __weak_count
- {
- public:
- __weak_count()
- : _M_pi(0) // nothrow
- { }
-
- __weak_count(const __shared_count<_Lp>& __r)
- : _M_pi(__r._M_pi) // nothrow
- {
- if (_M_pi != 0)
- _M_pi->_M_weak_add_ref();
- }
-
- __weak_count(const __weak_count<_Lp>& __r)
- : _M_pi(__r._M_pi) // nothrow
- {
- if (_M_pi != 0)
- _M_pi->_M_weak_add_ref();
- }
-
- ~__weak_count() // nothrow
- {
- if (_M_pi != 0)
- _M_pi->_M_weak_release();
- }
-
- __weak_count<_Lp>&
- operator=(const __shared_count<_Lp>& __r) // nothrow
- {
- _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
- if (__tmp != 0)
- __tmp->_M_weak_add_ref();
- if (_M_pi != 0)
- _M_pi->_M_weak_release();
- _M_pi = __tmp;
- return *this;
- }
-
- __weak_count<_Lp>&
- operator=(const __weak_count<_Lp>& __r) // nothrow
- {
- _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
- if (__tmp != 0)
- __tmp->_M_weak_add_ref();
- if (_M_pi != 0)
- _M_pi->_M_weak_release();
- _M_pi = __tmp;
- return *this;
- }
-
- void
- _M_swap(__weak_count<_Lp>& __r) // nothrow
- {
- _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
- __r._M_pi = _M_pi;
- _M_pi = __tmp;
- }
-
- long
- _M_get_use_count() const // nothrow
- { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
-
- bool
- _M_less(const __weak_count& __rhs) const
- { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
-
- bool
- _M_less(const __shared_count<_Lp>& __rhs) const
- { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
-
- // friend function injected into enclosing namespace and found by ADL
- friend inline bool
- operator==(const __weak_count& __a, const __weak_count& __b)
- { return __a._M_pi == __b._M_pi; }
-
- private:
- friend class __shared_count<_Lp>;
-
- _Sp_counted_base<_Lp>* _M_pi;
- };
-
- // now that __weak_count is defined we can define this constructor:
- template<_Lock_policy _Lp>
- inline
- __shared_count<_Lp>::
- __shared_count(const __weak_count<_Lp>& __r)
- : _M_pi(__r._M_pi)
+ /// 2.2.3.7 shared_ptr I/O
+ template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
+ std::basic_ostream<_Ch, _Tr>&
+ operator<<(std::basic_ostream<_Ch, _Tr>& __os,
+ const __shared_ptr<_Tp, _Lp>& __p)
{
- if (_M_pi != 0)
- _M_pi->_M_add_ref_lock();
- else
- __throw_bad_weak_ptr();
+ __os << __p.get();
+ return __os;
}
- // Forward declarations.
- template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
- class __shared_ptr;
-
- template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
- class __weak_ptr;
-
- template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
- class __enable_shared_from_this;
+ /// 2.2.3.10 shared_ptr get_deleter (experimental)
+ template<typename _Del, typename _Tp, _Lock_policy _Lp>
+ inline _Del*
+ get_deleter(const __shared_ptr<_Tp, _Lp>& __p)
+ { return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); }
- template<typename _Tp>
- class shared_ptr;
-
- template<typename _Tp>
- class weak_ptr;
+ /**
+ * @brief A smart pointer with reference-counted copy semantics.
+ *
+ * The object pointed to is deleted when the last shared_ptr pointing to
+ * it is destroyed or reset.
+ */
template<typename _Tp>
- class enable_shared_from_this;
-
- // Support for enable_shared_from_this.
-
- // Friend of __enable_shared_from_this.
- template<_Lock_policy _Lp, typename _Tp1, typename _Tp2>
- void
- __enable_shared_from_this_helper(const __shared_count<_Lp>&,
- const __enable_shared_from_this<_Tp1,
- _Lp>*, const _Tp2*);
-
- // Friend of enable_shared_from_this.
- template<typename _Tp1, typename _Tp2>
- void
- __enable_shared_from_this_helper(const __shared_count<>&,
- const enable_shared_from_this<_Tp1>*,
- const _Tp2*);
-
- template<_Lock_policy _Lp>
- inline void
- __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...)
- { }
-
-
- template<typename _Tp, _Lock_policy _Lp>
- class __shared_ptr
+ class shared_ptr : public __shared_ptr<_Tp>
{
public:
- typedef _Tp element_type;
-
- /** @brief Construct an empty %__shared_ptr.
+ /**
+ * @brief Construct an empty %shared_ptr.
* @post use_count()==0 && get()==0
*/
- __shared_ptr()
- : _M_ptr(0), _M_refcount() // never throws
- { }
+ shared_ptr() : __shared_ptr<_Tp>() { }
- /** @brief Construct a %__shared_ptr that owns the pointer @a __p.
+ /**
+ * @brief Construct a %shared_ptr that owns the pointer @a __p.
* @param __p A pointer that is convertible to element_type*.
* @post use_count() == 1 && get() == __p
* @throw std::bad_alloc, in which case @c delete @a __p is called.
*/
template<typename _Tp1>
- explicit
- __shared_ptr(_Tp1* __p)
- : _M_ptr(__p), _M_refcount(__p)
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // __glibcxx_function_requires(_CompleteConcept<_Tp1*>)
- __enable_shared_from_this_helper(_M_refcount, __p, __p);
- }
+ explicit shared_ptr(_Tp1* __p) : __shared_ptr<_Tp>(__p) { }
- //
- // Requirements: _Deleter's copy constructor and destructor must
- // not throw
- //
- // __shared_ptr will release __p by calling __d(__p)
- //
- /** @brief Construct a %__shared_ptr that owns the pointer @a __p
+ /**
+ * @brief Construct a %shared_ptr that owns the pointer @a __p
* and the deleter @a __d.
* @param __p A pointer.
* @param __d A deleter.
* @post use_count() == 1 && get() == __p
* @throw std::bad_alloc, in which case @a __d(__p) is called.
+ *
+ * Requirements: _Deleter's copy constructor and destructor must
+ * not throw
+ *
+ * __shared_ptr will release __p by calling __d(__p)
*/
- template<typename _Tp1, typename _Deleter>
- __shared_ptr(_Tp1* __p, _Deleter __d)
- : _M_ptr(__p), _M_refcount(__p, __d)
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
- __enable_shared_from_this_helper(_M_refcount, __p, __p);
- }
-
- //
- // Requirements: _Deleter's copy constructor and destructor must
- // not throw _Alloc's copy constructor and destructor must not
- // throw.
- //
- // __shared_ptr will release __p by calling __d(__p)
- //
- /** @brief Construct a %__shared_ptr that owns the pointer @a __p
+ template<typename _Tp1, typename _Deleter>
+ shared_ptr(_Tp1* __p, _Deleter __d) : __shared_ptr<_Tp>(__p, __d) { }
+
+ /**
+ * @brief Construct a %shared_ptr that owns the pointer @a __p
* and the deleter @a __d.
* @param __p A pointer.
* @param __d A deleter.
* @param __a An allocator.
* @post use_count() == 1 && get() == __p
* @throw std::bad_alloc, in which case @a __d(__p) is called.
+ *
+ * Requirements: _Deleter's copy constructor and destructor must
+ * not throw _Alloc's copy constructor and destructor must not
+ * throw.
+ *
+ * __shared_ptr will release __p by calling __d(__p)
*/
template<typename _Tp1, typename _Deleter, typename _Alloc>
- __shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
- : _M_ptr(__p), _M_refcount(__p, __d, __a)
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
- __enable_shared_from_this_helper(_M_refcount, __p, __p);
- }
+ shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+ : __shared_ptr<_Tp>(__p, __d, __a) { }
+
+ // Aliasing constructor
- /** @brief Constructs a %__shared_ptr instance that stores @a __p
+ /**
+ * @brief Constructs a %shared_ptr instance that stores @a __p
* and shares ownership with @a __r.
- * @param __r A %__shared_ptr.
+ * @param __r A %shared_ptr.
* @param __p A pointer that will remain valid while @a *__r is valid.
* @post get() == __p && use_count() == __r.use_count()
*
@@ -634,48 +158,38 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @endcode
*/
template<typename _Tp1>
- __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __p)
- : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
- { }
-
- // generated copy constructor, assignment, destructor are fine.
-
- /** @brief If @a __r is empty, constructs an empty %__shared_ptr;
- * otherwise construct a %__shared_ptr that shares ownership
+ shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p)
+ : __shared_ptr<_Tp>(__r, __p) { }
+
+ /**
+ * @brief If @a __r is empty, constructs an empty %shared_ptr;
+ * otherwise construct a %shared_ptr that shares ownership
* with @a __r.
- * @param __r A %__shared_ptr.
+ * @param __r A %shared_ptr.
* @post get() == __r.get() && use_count() == __r.use_count()
*/
template<typename _Tp1>
- __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
- : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
- { __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+ shared_ptr(const shared_ptr<_Tp1>& __r) : __shared_ptr<_Tp>(__r) { }
- /** @brief Move-constructs a %__shared_ptr instance from @a __r.
- * @param __r A %__shared_ptr rvalue.
+ /**
+ * @brief Move-constructs a %shared_ptr instance from @a __r.
+ * @param __r A %shared_ptr rvalue.
* @post *this contains the old value of @a __r, @a __r is empty.
*/
- __shared_ptr(__shared_ptr&& __r)
- : _M_ptr(__r._M_ptr), _M_refcount() // never throws
- {
- _M_refcount._M_swap(__r._M_refcount);
- __r._M_ptr = 0;
- }
+ shared_ptr(shared_ptr&& __r)
+ : __shared_ptr<_Tp>(std::move(__r)) { }
- /** @brief Move-constructs a %__shared_ptr instance from @a __r.
- * @param __r A %__shared_ptr rvalue.
+ /**
+ * @brief Move-constructs a %shared_ptr instance from @a __r.
+ * @param __r A %shared_ptr rvalue.
* @post *this contains the old value of @a __r, @a __r is empty.
*/
template<typename _Tp1>
- __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r)
- : _M_ptr(__r._M_ptr), _M_refcount() // never throws
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- _M_refcount._M_swap(__r._M_refcount);
- __r._M_ptr = 0;
- }
-
- /** @brief Constructs a %__shared_ptr that shares ownership with @a __r
+ shared_ptr(shared_ptr<_Tp1>&& __r)
+ : __shared_ptr<_Tp>(std::move(__r)) { }
+
+ /**
+ * @brief Constructs a %shared_ptr that shares ownership with @a __r
* and stores a copy of the pointer stored in @a __r.
* @param __r A weak_ptr.
* @post use_count() == __r.use_count()
@@ -683,609 +197,36 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* in which case the constructor has no effect.
*/
template<typename _Tp1>
- explicit
- __shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
- : _M_refcount(__r._M_refcount) // may throw
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // It is now safe to copy __r._M_ptr, as _M_refcount(__r._M_refcount)
- // did not throw.
- _M_ptr = __r._M_ptr;
- }
-
- template<typename _Tp1, typename _Del>
- explicit
- __shared_ptr(const std::unique_ptr<_Tp1, _Del>&) = delete;
-
- /**
- * If an exception is thrown this constructor has no effect.
- */
- template<typename _Tp1, typename _Del>
- explicit
- __shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
- : _M_ptr(__r.get()), _M_refcount()
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- _Tp1* __tmp = __r.get();
- _M_refcount = __shared_count<_Lp>(std::move(__r));
- __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
- }
-
-#if _GLIBCXX_DEPRECATED
- /**
- * @post use_count() == 1 and __r.get() == 0
- */
- template<typename _Tp1>
- explicit
- __shared_ptr(std::auto_ptr<_Tp1>&& __r)
- : _M_ptr(__r.get()), _M_refcount()
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // TODO requires _Tp1 is complete, delete __r.release() well-formed
- _Tp1* __tmp = __r.get();
- _M_refcount = __shared_count<_Lp>(std::move(__r));
- __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
- }
-#endif
-
- template<typename _Tp1>
- __shared_ptr&
- operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
- {
- _M_ptr = __r._M_ptr;
- _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw
- return *this;
- }
-
-#if _GLIBCXX_DEPRECATED
- template<typename _Tp1>
- __shared_ptr&
- operator=(std::auto_ptr<_Tp1>&& __r)
- {
- __shared_ptr(std::move(__r)).swap(*this);
- return *this;
- }
-#endif
-
- __shared_ptr&
- operator=(__shared_ptr&& __r)
- {
- __shared_ptr(std::move(__r)).swap(*this);
- return *this;
- }
-
- template<class _Tp1>
- __shared_ptr&
- operator=(__shared_ptr<_Tp1, _Lp>&& __r)
- {
- __shared_ptr(std::move(__r)).swap(*this);
- return *this;
- }
-
- template<typename _Tp1, typename _Del>
- __shared_ptr&
- operator=(const std::unique_ptr<_Tp1, _Del>& __r) = delete;
-
- template<typename _Tp1, typename _Del>
- __shared_ptr&
- operator=(std::unique_ptr<_Tp1, _Del>&& __r)
- {
- __shared_ptr(std::move(__r)).swap(*this);
- return *this;
- }
-
- void
- reset() // never throws
- { __shared_ptr().swap(*this); }
-
- template<typename _Tp1>
- void
- reset(_Tp1* __p) // _Tp1 must be complete.
- {
- // Catch self-reset errors.
- _GLIBCXX_DEBUG_ASSERT(__p == 0 || __p != _M_ptr);
- __shared_ptr(__p).swap(*this);
- }
-
- template<typename _Tp1, typename _Deleter>
- void
- reset(_Tp1* __p, _Deleter __d)
- { __shared_ptr(__p, __d).swap(*this); }
-
- template<typename _Tp1, typename _Deleter, typename _Alloc>
- void
- reset(_Tp1* __p, _Deleter __d, const _Alloc& __a)
- { __shared_ptr(__p, __d, __a).swap(*this); }
-
- // Allow class instantiation when _Tp is [cv-qual] void.
- typename std::add_lvalue_reference<_Tp>::type
- operator*() const // never throws
- {
- _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
- return *_M_ptr;
- }
-
- _Tp*
- operator->() const // never throws
- {
- _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
- return _M_ptr;
- }
-
- _Tp*
- get() const // never throws
- { return _M_ptr; }
-
- explicit operator bool() const // never throws
- { return _M_ptr == 0 ? false : true; }
-
- bool
- unique() const // never throws
- { return _M_refcount._M_unique(); }
-
- long
- use_count() const // never throws
- { return _M_refcount._M_get_use_count(); }
-
- void
- swap(__shared_ptr<_Tp, _Lp>& __other) // never throws
- {
- std::swap(_M_ptr, __other._M_ptr);
- _M_refcount._M_swap(__other._M_refcount);
- }
-
- template<typename _Tp1>
- bool
- owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const
- { return _M_refcount._M_less(__rhs._M_refcount); }
-
- template<typename _Tp1>
- bool
- owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const
- { return _M_refcount._M_less(__rhs._M_refcount); }
-
- protected:
- // This constructor is non-standard, it is used by allocate_shared.
- template<typename _Alloc, typename... _Args>
- __shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
- : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a,
- std::forward<_Args>(__args)...)
- {
- // _M_ptr needs to point to the newly constructed object.
- // This relies on _Sp_counted_ptr_inplace::_M_get_deleter.
- void* __p = _M_refcount._M_get_deleter(typeid(__tag));
- _M_ptr = static_cast<_Tp*>(__p);
- __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr);
- }
-
- template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc,
- typename... _Args>
- friend __shared_ptr<_Tp1, _Lp1>
- __allocate_shared(_Alloc __a, _Args&&... __args);
-
- private:
- void*
- _M_get_deleter(const std::type_info& __ti) const
- { return _M_refcount._M_get_deleter(__ti); }
-
- template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
- template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
-
- template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
- friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&);
-
- _Tp* _M_ptr; // Contained pointer.
- __shared_count<_Lp> _M_refcount; // Reference counter.
- };
-
- // 20.8.13.2.7 shared_ptr comparisons
- template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
- inline bool
- operator==(const __shared_ptr<_Tp1, _Lp>& __a,
- const __shared_ptr<_Tp2, _Lp>& __b)
- { return __a.get() == __b.get(); }
-
- template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
- inline bool
- operator!=(const __shared_ptr<_Tp1, _Lp>& __a,
- const __shared_ptr<_Tp2, _Lp>& __b)
- { return __a.get() != __b.get(); }
-
- template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
- inline bool
- operator<(const __shared_ptr<_Tp1, _Lp>& __a,
- const __shared_ptr<_Tp2, _Lp>& __b)
- { return __a.get() < __b.get(); }
-
- template<typename _Sp>
- struct _Sp_less : public binary_function<_Sp, _Sp, bool>
- {
- bool
- operator()(const _Sp& __lhs, const _Sp& __rhs) const
- {
- return std::less<typename _Sp::element_type*>()(__lhs.get(),
- __rhs.get());
- }
- };
-
- template<typename _Tp, _Lock_policy _Lp>
- struct less<__shared_ptr<_Tp, _Lp>>
- : public _Sp_less<__shared_ptr<_Tp, _Lp>>
- { };
-
- // XXX LessThanComparable<_Tp> concept should provide >, >= and <=
- template<typename _Tp, _Lock_policy _Lp>
- inline bool
- operator>(const __shared_ptr<_Tp, _Lp>& __a,
- const __shared_ptr<_Tp, _Lp>& __b)
- { return __a.get() > __b.get(); }
-
- template<typename _Tp, _Lock_policy _Lp>
- inline bool
- operator>=(const __shared_ptr<_Tp, _Lp>& __a,
- const __shared_ptr<_Tp, _Lp>& __b)
- { return __a.get() >= __b.get(); }
-
- template<typename _Tp, _Lock_policy _Lp>
- inline bool
- operator<=(const __shared_ptr<_Tp, _Lp>& __a,
- const __shared_ptr<_Tp, _Lp>& __b)
- { return __a.get() <= __b.get(); }
-
- // 2.2.3.8 shared_ptr specialized algorithms.
- template<typename _Tp, _Lock_policy _Lp>
- inline void
- swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b)
- { __a.swap(__b); }
-
- // 2.2.3.9 shared_ptr casts
- /** @warning The seemingly equivalent
- * <code>shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))</code>
- * will eventually result in undefined behaviour,
- * attempting to delete the same object twice.
- */
- template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
- inline __shared_ptr<_Tp, _Lp>
- static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
- { return __shared_ptr<_Tp, _Lp>(__r, static_cast<_Tp*>(__r.get())); }
-
- /** @warning The seemingly equivalent
- * <code>shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))</code>
- * will eventually result in undefined behaviour,
- * attempting to delete the same object twice.
- */
- template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
- inline __shared_ptr<_Tp, _Lp>
- const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
- { return __shared_ptr<_Tp, _Lp>(__r, const_cast<_Tp*>(__r.get())); }
-
- /** @warning The seemingly equivalent
- * <code>shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))</code>
- * will eventually result in undefined behaviour,
- * attempting to delete the same object twice.
- */
- template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
- inline __shared_ptr<_Tp, _Lp>
- dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
- {
- if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
- return __shared_ptr<_Tp, _Lp>(__r, __p);
- return __shared_ptr<_Tp, _Lp>();
- }
-
- // 2.2.3.7 shared_ptr I/O
- template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
- std::basic_ostream<_Ch, _Tr>&
- operator<<(std::basic_ostream<_Ch, _Tr>& __os,
- const __shared_ptr<_Tp, _Lp>& __p)
- {
- __os << __p.get();
- return __os;
- }
-
- // 2.2.3.10 shared_ptr get_deleter (experimental)
- template<typename _Del, typename _Tp, _Lock_policy _Lp>
- inline _Del*
- get_deleter(const __shared_ptr<_Tp, _Lp>& __p)
- { return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); }
-
-
- template<typename _Tp, _Lock_policy _Lp>
- class __weak_ptr
- {
- public:
- typedef _Tp element_type;
-
- __weak_ptr()
- : _M_ptr(0), _M_refcount() // never throws
- { }
-
- // Generated copy constructor, assignment, destructor are fine.
-
- // The "obvious" converting constructor implementation:
- //
- // template<typename _Tp1>
- // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
- // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
- // { }
- //
- // has a serious problem.
- //
- // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr)
- // conversion may require access to *__r._M_ptr (virtual inheritance).
- //
- // It is not possible to avoid spurious access violations since
- // in multithreaded programs __r._M_ptr may be invalidated at any point.
- template<typename _Tp1>
- __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
- : _M_refcount(__r._M_refcount) // never throws
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- _M_ptr = __r.lock().get();
- }
-
- template<typename _Tp1>
- __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
- : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
- { __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
-
- template<typename _Tp1>
- __weak_ptr&
- operator=(const __weak_ptr<_Tp1, _Lp>& __r) // never throws
- {
- _M_ptr = __r.lock().get();
- _M_refcount = __r._M_refcount;
- return *this;
- }
-
- template<typename _Tp1>
- __weak_ptr&
- operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
- {
- _M_ptr = __r._M_ptr;
- _M_refcount = __r._M_refcount;
- return *this;
- }
-
- __shared_ptr<_Tp, _Lp>
- lock() const // never throws
- {
-#ifdef __GTHREADS
- // Optimization: avoid throw overhead.
- if (expired())
- return __shared_ptr<element_type, _Lp>();
-
- __try
- {
- return __shared_ptr<element_type, _Lp>(*this);
- }
- __catch(const bad_weak_ptr&)
- {
- // Q: How can we get here?
- // A: Another thread may have invalidated r after the
- // use_count test above.
- return __shared_ptr<element_type, _Lp>();
- }
-
-#else
- // Optimization: avoid try/catch overhead when single threaded.
- return expired() ? __shared_ptr<element_type, _Lp>()
- : __shared_ptr<element_type, _Lp>(*this);
-
-#endif
- } // XXX MT
-
- long
- use_count() const // never throws
- { return _M_refcount._M_get_use_count(); }
-
- bool
- expired() const // never throws
- { return _M_refcount._M_get_use_count() == 0; }
-
- template<typename _Tp1>
- bool
- owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const
- { return _M_refcount._M_less(__rhs._M_refcount); }
-
- template<typename _Tp1>
- bool
- owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const
- { return _M_refcount._M_less(__rhs._M_refcount); }
-
- void
- reset() // never throws
- { __weak_ptr().swap(*this); }
-
- void
- swap(__weak_ptr& __s) // never throws
- {
- std::swap(_M_ptr, __s._M_ptr);
- _M_refcount._M_swap(__s._M_refcount);
- }
-
- // comparisons
- template<typename _Tp1>
- bool operator<(const __weak_ptr<_Tp1, _Lp>&) const = delete;
- template<typename _Tp1>
- bool operator<=(const __weak_ptr<_Tp1, _Lp>&) const = delete;
- template<typename _Tp1>
- bool operator>(const __weak_ptr<_Tp1, _Lp>&) const = delete;
- template<typename _Tp1>
- bool operator>=(const __weak_ptr<_Tp1, _Lp>&) const = delete;
-
- private:
- // Used by __enable_shared_from_this.
- void
- _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount)
- {
- _M_ptr = __ptr;
- _M_refcount = __refcount;
- }
-
- template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
- template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
- friend class __enable_shared_from_this<_Tp, _Lp>;
- friend class enable_shared_from_this<_Tp>;
-
- _Tp* _M_ptr; // Contained pointer.
- __weak_count<_Lp> _M_refcount; // Reference counter.
- };
-
- // 20.8.13.3.7 weak_ptr specialized algorithms.
- template<typename _Tp, _Lock_policy _Lp>
- inline void
- swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b)
- { __a.swap(__b); }
-
- /// owner_less
- template<typename _Tp> struct owner_less;
-
- template<typename _Tp, typename _Tp1>
- struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool>
- {
- bool
- operator()(const _Tp& __lhs, const _Tp& __rhs) const
- { return __lhs.owner_before(__rhs); }
- bool
- operator()(const _Tp& __lhs, const _Tp1& __rhs) const
- { return __lhs.owner_before(__rhs); }
- bool
- operator()(const _Tp1& __lhs, const _Tp& __rhs) const
- { return __lhs.owner_before(__rhs); }
- };
-
- template<typename _Tp, _Lock_policy _Lp>
- struct owner_less<__shared_ptr<_Tp, _Lp>>
- : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>>
- { };
-
- template<typename _Tp, _Lock_policy _Lp>
- struct owner_less<__weak_ptr<_Tp, _Lp>>
- : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>>
- {
- };
-
-
- template<typename _Tp, _Lock_policy _Lp>
- class __enable_shared_from_this
- {
- protected:
- __enable_shared_from_this() { }
-
- __enable_shared_from_this(const __enable_shared_from_this&) { }
-
- __enable_shared_from_this&
- operator=(const __enable_shared_from_this&)
- { return *this; }
-
- ~__enable_shared_from_this() { }
-
- public:
- __shared_ptr<_Tp, _Lp>
- shared_from_this()
- { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); }
-
- __shared_ptr<const _Tp, _Lp>
- shared_from_this() const
- { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); }
-
- private:
- template<typename _Tp1>
- void
- _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const
- { _M_weak_this._M_assign(__p, __n); }
-
- template<typename _Tp1>
- friend void
- __enable_shared_from_this_helper(const __shared_count<_Lp>& __pn,
- const __enable_shared_from_this* __pe,
- const _Tp1* __px)
- {
- if (__pe != 0)
- __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
- }
-
- mutable __weak_ptr<_Tp, _Lp> _M_weak_this;
- };
-
- /**
- * @brief A smart pointer with reference-counted copy semantics.
- *
- * The object pointed to is deleted when the last shared_ptr pointing to
- * it is destroyed or reset.
- */
- template<typename _Tp>
- class shared_ptr
- : public __shared_ptr<_Tp>
- {
- public:
- shared_ptr()
- : __shared_ptr<_Tp>() { }
-
- template<typename _Tp1>
- explicit
- shared_ptr(_Tp1* __p)
- : __shared_ptr<_Tp>(__p) { }
-
- template<typename _Tp1, typename _Deleter>
- shared_ptr(_Tp1* __p, _Deleter __d)
- : __shared_ptr<_Tp>(__p, __d) { }
-
- template<typename _Tp1, typename _Deleter, typename _Alloc>
- shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
- : __shared_ptr<_Tp>(__p, __d, __a) { }
-
- // Aliasing constructor
- template<typename _Tp1>
- shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p)
- : __shared_ptr<_Tp>(__r, __p) { }
-
- template<typename _Tp1>
- shared_ptr(const shared_ptr<_Tp1>& __r)
- : __shared_ptr<_Tp>(__r) { }
-
- shared_ptr(shared_ptr&& __r)
- : __shared_ptr<_Tp>(std::move(__r)) { }
-
- template<typename _Tp1>
- shared_ptr(shared_ptr<_Tp1>&& __r)
- : __shared_ptr<_Tp>(std::move(__r)) { }
-
- template<typename _Tp1>
- explicit
- shared_ptr(const weak_ptr<_Tp1>& __r)
+ explicit shared_ptr(const weak_ptr<_Tp1>& __r)
: __shared_ptr<_Tp>(__r) { }
#if _GLIBCXX_DEPRECATED
template<typename _Tp1>
- explicit
- shared_ptr(std::auto_ptr<_Tp1>&& __r)
+ explicit
+ shared_ptr(std::auto_ptr<_Tp1>&& __r)
: __shared_ptr<_Tp>(std::move(__r)) { }
#endif
template<typename _Tp1, typename _Del>
- explicit
- shared_ptr(const std::unique_ptr<_Tp1, _Del>&) = delete;
+ explicit shared_ptr(const std::unique_ptr<_Tp1, _Del>&) = delete;
template<typename _Tp1, typename _Del>
- explicit
- shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
+ explicit shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
: __shared_ptr<_Tp>(std::move(__r)) { }
template<typename _Tp1>
- shared_ptr&
- operator=(const shared_ptr<_Tp1>& __r) // never throws
- {
+ shared_ptr&
+ operator=(const shared_ptr<_Tp1>& __r) // never throws
+ {
this->__shared_ptr<_Tp>::operator=(__r);
return *this;
}
#if _GLIBCXX_DEPRECATED
template<typename _Tp1>
- shared_ptr&
- operator=(std::auto_ptr<_Tp1>&& __r)
- {
+ shared_ptr&
+ operator=(std::auto_ptr<_Tp1>&& __r)
+ {
this->__shared_ptr<_Tp>::operator=(std::move(__r));
return *this;
}
@@ -1294,26 +235,26 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
shared_ptr&
operator=(shared_ptr&& __r)
{
- this->__shared_ptr<_Tp>::operator=(std::move(__r));
- return *this;
+ this->__shared_ptr<_Tp>::operator=(std::move(__r));
+ return *this;
}
-
+
template<class _Tp1>
- shared_ptr&
- operator=(shared_ptr<_Tp1>&& __r)
- {
- this->__shared_ptr<_Tp>::operator=(std::move(__r));
- return *this;
- }
+ shared_ptr&
+ operator=(shared_ptr<_Tp1>&& __r)
+ {
+ this->__shared_ptr<_Tp>::operator=(std::move(__r));
+ return *this;
+ }
template<typename _Tp1, typename _Del>
- shared_ptr&
- operator=(const std::unique_ptr<_Tp1, _Del>& __r) = delete;
+ shared_ptr&
+ operator=(const std::unique_ptr<_Tp1, _Del>& __r) = delete;
template<typename _Tp1, typename _Del>
- shared_ptr&
- operator=(std::unique_ptr<_Tp1, _Del>&& __r)
- {
+ shared_ptr&
+ operator=(std::unique_ptr<_Tp1, _Del>&& __r)
+ {
this->__shared_ptr<_Tp>::operator=(std::move(__r));
return *this;
}
@@ -1321,13 +262,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
private:
// This constructor is non-standard, it is used by allocate_shared.
template<typename _Alloc, typename... _Args>
- shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
- : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
- { }
+ shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
+ : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
+ { }
template<typename _Tp1, typename _Alloc, typename... _Args>
- friend shared_ptr<_Tp1>
- allocate_shared(_Alloc __a, _Args&&... __args);
+ friend shared_ptr<_Tp1>
+ allocate_shared(_Alloc __a, _Args&&... __args);
};
// 20.8.13.2.7 shared_ptr comparisons
@@ -1347,8 +288,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return __a.get() < __b.get(); }
template<typename _Tp>
- struct less<shared_ptr<_Tp>>
- : public _Sp_less<shared_ptr<_Tp>>
+ struct less<shared_ptr<_Tp>> : public _Sp_less<shared_ptr<_Tp>>
{ };
// 20.8.13.2.9 shared_ptr specialized algorithms.
@@ -1373,44 +313,42 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
dynamic_pointer_cast(const shared_ptr<_Tp1>& __r)
{
if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
- return shared_ptr<_Tp>(__r, __p);
+ return shared_ptr<_Tp>(__r, __p);
return shared_ptr<_Tp>();
}
- /**
- * @brief A smart pointer with weak semantics.
- *
+ /**
+ * @brief A smart pointer with weak semantics.
+ *
* With forwarding constructors and assignment operators.
*/
template<typename _Tp>
- class weak_ptr
- : public __weak_ptr<_Tp>
+ class weak_ptr : public __weak_ptr<_Tp>
{
public:
- weak_ptr()
- : __weak_ptr<_Tp>() { }
-
+ weak_ptr() : __weak_ptr<_Tp>() { }
+
template<typename _Tp1>
- weak_ptr(const weak_ptr<_Tp1>& __r)
+ weak_ptr(const weak_ptr<_Tp1>& __r)
: __weak_ptr<_Tp>(__r) { }
template<typename _Tp1>
- weak_ptr(const shared_ptr<_Tp1>& __r)
+ weak_ptr(const shared_ptr<_Tp1>& __r)
: __weak_ptr<_Tp>(__r) { }
template<typename _Tp1>
- weak_ptr&
- operator=(const weak_ptr<_Tp1>& __r) // never throws
- {
+ weak_ptr&
+ operator=(const weak_ptr<_Tp1>& __r) // never throws
+ {
this->__weak_ptr<_Tp>::operator=(__r);
return *this;
}
template<typename _Tp1>
- weak_ptr&
- operator=(const shared_ptr<_Tp1>& __r) // never throws
- {
+ weak_ptr&
+ operator=(const shared_ptr<_Tp1>& __r) // never throws
+ {
this->__weak_ptr<_Tp>::operator=(__r);
return *this;
}
@@ -1431,20 +369,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return shared_ptr<_Tp>();
}
#else
- return this->expired() ? shared_ptr<_Tp>()
- : shared_ptr<_Tp>(*this);
+ return this->expired() ? shared_ptr<_Tp>() : shared_ptr<_Tp>(*this);
#endif
}
- // comparisons
+ // Comparisons
template<typename _Tp1>
- bool operator<(const weak_ptr<_Tp1>&) const = delete;
+ bool operator<(const weak_ptr<_Tp1>&) const = delete;
template<typename _Tp1>
- bool operator<=(const weak_ptr<_Tp1>&) const = delete;
+ bool operator<=(const weak_ptr<_Tp1>&) const = delete;
template<typename _Tp1>
- bool operator>(const weak_ptr<_Tp1>&) const = delete;
+ bool operator>(const weak_ptr<_Tp1>&) const = delete;
template<typename _Tp1>
- bool operator>=(const weak_ptr<_Tp1>&) const = delete;
+ bool operator>=(const weak_ptr<_Tp1>&) const = delete;
};
// 20.8.13.3.7 weak_ptr specialized algorithms.
@@ -1453,18 +390,24 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b)
{ __a.swap(__b); }
- /// owner_less
+
+ /// Primary template owner_less
+ template<typename _Tp>
+ struct owner_less;
+
+ /// Partial specialization of owner_less for shared_ptr.
template<typename _Tp>
struct owner_less<shared_ptr<_Tp>>
: public _Sp_owner_less<shared_ptr<_Tp>, weak_ptr<_Tp>>
{ };
+ /// Partial specialization of owner_less for weak_ptr.
template<typename _Tp>
struct owner_less<weak_ptr<_Tp>>
: public _Sp_owner_less<weak_ptr<_Tp>, shared_ptr<_Tp>>
{ };
- /**
+ /**
* @brief Base class allowing use of member function shared_from_this.
*/
template<typename _Tp>
@@ -1472,7 +415,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
protected:
enable_shared_from_this() { }
-
+
enable_shared_from_this(const enable_shared_from_this&) { }
enable_shared_from_this&
@@ -1492,16 +435,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
private:
template<typename _Tp1>
- void
- _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const
- { _M_weak_this._M_assign(__p, __n); }
+ void
+ _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const
+ { _M_weak_this._M_assign(__p, __n); }
template<typename _Tp1>
- friend void
- __enable_shared_from_this_helper(const __shared_count<>& __pn,
+ friend void
+ __enable_shared_from_this_helper(const __shared_count<>& __pn,
const enable_shared_from_this* __pe,
const _Tp1* __px)
- {
+ {
if (__pe != 0)
__pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
}
@@ -1509,24 +452,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
mutable weak_ptr<_Tp> _M_weak_this;
};
- template<typename _Tp, _Lock_policy _Lp, typename _Alloc, typename... _Args>
- inline __shared_ptr<_Tp, _Lp>
- __allocate_shared(_Alloc __a, _Args&&... __args)
- {
- return __shared_ptr<_Tp, _Lp>(_Sp_make_shared_tag(),
- std::forward<_Alloc>(__a), std::forward<_Args>(__args)...);
- }
-
- template<typename _Tp, _Lock_policy _Lp, typename... _Args>
- inline __shared_ptr<_Tp, _Lp>
- __make_shared(_Args&&... __args)
- {
- typedef typename std::remove_const<_Tp>::type _Tp_nc;
- return __allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(),
- std::forward<_Args>(__args)...);
- }
-
- /** @brief Create an object that is owned by a shared_ptr.
+ /**
+ * @brief Create an object that is owned by a shared_ptr.
* @param __a An allocator.
* @param __args Arguments for the @a _Tp object's constructor.
* @return A shared_ptr that owns the newly created object.
@@ -1541,10 +468,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
allocate_shared(_Alloc __a, _Args&&... __args)
{
return shared_ptr<_Tp>(_Sp_make_shared_tag(), std::forward<_Alloc>(__a),
- std::forward<_Args>(__args)...);
+ std::forward<_Args>(__args)...);
}
- /** @brief Create an object that is owned by a shared_ptr.
+ /**
+ * @brief Create an object that is owned by a shared_ptr.
* @param __args Arguments for the @a _Tp object's constructor.
* @return A shared_ptr that owns the newly created object.
* @throw std::bad_alloc, or an exception thrown from the
@@ -1556,7 +484,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
typedef typename std::remove_const<_Tp>::type _Tp_nc;
return allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
- std::forward<_Args>(__args)...);
+ std::forward<_Args>(__args)...);
}
// @} group pointer_abstractions
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
new file mode 100644
index 00000000000..b8083e405c8
--- /dev/null
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -0,0 +1,1114 @@
+// shared_ptr and weak_ptr implementation details -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// GCC Note: Based on files from version 1.32.0 of the Boost library.
+
+// shared_count.hpp
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+
+// shared_ptr.hpp
+// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// weak_ptr.hpp
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// enable_shared_from_this.hpp
+// Copyright (C) 2002 Peter Dimov
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+/** @file bits/shared_ptr_base.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _SHARED_PTR_BASE_H
+#define _SHARED_PTR_BASE_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Forward declarations.
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __shared_ptr;
+
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __weak_ptr;
+
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __enable_shared_from_this;
+
+ template<typename _Tp>
+ class shared_ptr;
+
+ template<typename _Tp>
+ class weak_ptr;
+
+ template<typename _Tp>
+ struct owner_less;
+
+ template<typename _Tp>
+ class enable_shared_from_this;
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __weak_count;
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __shared_count;
+
+
+ // Counted ptr with no deleter or allocator support
+ template<typename _Ptr, _Lock_policy _Lp>
+ class _Sp_counted_ptr : public _Sp_counted_base<_Lp>
+ {
+ public:
+ _Sp_counted_ptr(_Ptr __p)
+ : _M_ptr(__p) { }
+
+ virtual void
+ _M_dispose() // nothrow
+ { delete _M_ptr; }
+
+ virtual void
+ _M_destroy() // nothrow
+ { delete this; }
+
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ { return 0; }
+
+ _Sp_counted_ptr(const _Sp_counted_ptr&) = delete;
+ _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete;
+
+ protected:
+ _Ptr _M_ptr; // copy constructor must not throw
+ };
+
+ // Support for custom deleter and/or allocator
+ template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp>
+ class _Sp_counted_deleter : public _Sp_counted_ptr<_Ptr, _Lp>
+ {
+ typedef typename _Alloc::template
+ rebind<_Sp_counted_deleter>::other _My_alloc_type;
+
+ // Helper class that stores the Deleter and also acts as an allocator.
+ // Used to dispose of the owned pointer and the internal refcount
+ // Requires that copies of _Alloc can free each other's memory.
+ struct _My_Deleter
+ : public _My_alloc_type // copy constructor must not throw
+ {
+ _Deleter _M_del; // copy constructor must not throw
+ _My_Deleter(_Deleter __d, const _Alloc& __a)
+ : _My_alloc_type(__a), _M_del(__d) { }
+ };
+
+ protected:
+ typedef _Sp_counted_ptr<_Ptr, _Lp> _Base_type;
+
+ public:
+ // __d(__p) must not throw.
+ _Sp_counted_deleter(_Ptr __p, _Deleter __d)
+ : _Base_type(__p), _M_del(__d, _Alloc()) { }
+
+ // __d(__p) must not throw.
+ _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a)
+ : _Base_type(__p), _M_del(__d, __a) { }
+
+ virtual void
+ _M_dispose() // nothrow
+ { _M_del._M_del(_Base_type::_M_ptr); }
+
+ virtual void
+ _M_destroy() // nothrow
+ {
+ _My_alloc_type __a(_M_del);
+ this->~_Sp_counted_deleter();
+ __a.deallocate(this, 1);
+ }
+
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ { return __ti == typeid(_Deleter) ? &_M_del._M_del : 0; }
+
+ protected:
+ _My_Deleter _M_del; // copy constructor must not throw
+ };
+
+ // helpers for make_shared / allocate_shared
+
+ template<typename _Tp>
+ struct _Sp_destroy_inplace
+ {
+ void operator()(_Tp* __p) const { if (__p) __p->~_Tp(); }
+ };
+
+ struct _Sp_make_shared_tag { };
+
+ template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
+ class _Sp_counted_ptr_inplace
+ : public _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
+ {
+ typedef _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
+ _Base_type;
+
+ public:
+ _Sp_counted_ptr_inplace(_Alloc __a)
+ : _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
+ , _M_storage()
+ {
+ void* __p = &_M_storage;
+ ::new (__p) _Tp(); // might throw
+ _Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
+ }
+
+ template<typename... _Args>
+ _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
+ : _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
+ , _M_storage()
+ {
+ void* __p = &_M_storage;
+ ::new (__p) _Tp(std::forward<_Args>(__args)...); // might throw
+ _Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
+ }
+
+ // Override because the allocator needs to know the dynamic type
+ virtual void
+ _M_destroy() // nothrow
+ {
+ typedef typename _Alloc::template
+ rebind<_Sp_counted_ptr_inplace>::other _My_alloc_type;
+ _My_alloc_type __a(_Base_type::_M_del);
+ this->~_Sp_counted_ptr_inplace();
+ __a.deallocate(this, 1);
+ }
+
+ // Sneaky trick so __shared_ptr can get the managed pointer
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ {
+ return __ti == typeid(_Sp_make_shared_tag)
+ ? static_cast<void*>(&_M_storage)
+ : _Base_type::_M_get_deleter(__ti);
+ }
+
+ private:
+ typename aligned_storage<sizeof(_Tp), alignment_of<_Tp>::value>::type
+ _M_storage;
+ };
+
+ template<_Lock_policy _Lp>
+ class __shared_count
+ {
+ public:
+ __shared_count() : _M_pi(0) // nothrow
+ { }
+
+ template<typename _Ptr>
+ __shared_count(_Ptr __p) : _M_pi(0)
+ {
+ __try
+ {
+ _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
+ }
+ __catch(...)
+ {
+ delete __p;
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Ptr, typename _Deleter>
+ __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
+ {
+ // The allocator's value_type doesn't matter, will rebind it anyway.
+ typedef std::allocator<int> _Alloc;
+ typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
+ typedef std::allocator<_Sp_cd_type> _Alloc2;
+ _Alloc2 __a2;
+ __try
+ {
+ _M_pi = __a2.allocate(1);
+ ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d);
+ }
+ __catch(...)
+ {
+ __d(__p); // Call _Deleter on __p.
+ if (_M_pi)
+ __a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Ptr, typename _Deleter, typename _Alloc>
+ __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
+ {
+ typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
+ typedef typename _Alloc::template rebind<_Sp_cd_type>::other _Alloc2;
+ _Alloc2 __a2(__a);
+ __try
+ {
+ _M_pi = __a2.allocate(1);
+ ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d, __a);
+ }
+ __catch(...)
+ {
+ __d(__p); // Call _Deleter on __p.
+ if (_M_pi)
+ __a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc, typename... _Args>
+ __shared_count(_Sp_make_shared_tag, _Tp*, _Alloc __a, _Args&&... __args)
+ : _M_pi(0)
+ {
+ typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
+ typedef typename _Alloc::template rebind<_Sp_cp_type>::other _Alloc2;
+ _Alloc2 __a2(__a);
+ __try
+ {
+ _M_pi = __a2.allocate(1);
+ ::new(static_cast<void*>(_M_pi)) _Sp_cp_type(__a,
+ std::forward<_Args>(__args)...);
+ }
+ __catch(...)
+ {
+ if (_M_pi)
+ __a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1);
+ __throw_exception_again;
+ }
+ }
+
+#if _GLIBCXX_DEPRECATED
+ // Special case for auto_ptr<_Tp> to provide the strong guarantee.
+ template<typename _Tp>
+ explicit __shared_count(std::auto_ptr<_Tp>&& __r)
+ : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get()))
+ { __r.release(); }
+#endif
+
+ // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
+ template<typename _Tp, typename _Del>
+ explicit __shared_count(std::unique_ptr<_Tp, _Del>&& __r)
+ : _M_pi(_S_create_from_up(std::move(__r)))
+ { __r.release(); }
+
+ // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
+ explicit __shared_count(const __weak_count<_Lp>& __r);
+
+ ~__shared_count() // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ }
+
+ __shared_count(const __shared_count& __r)
+ : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_add_ref_copy();
+ }
+
+ __shared_count&
+ operator=(const __shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != _M_pi)
+ {
+ if (__tmp != 0)
+ __tmp->_M_add_ref_copy();
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ _M_pi = __tmp;
+ }
+ return *this;
+ }
+
+ void
+ _M_swap(__shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ __r._M_pi = _M_pi;
+ _M_pi = __tmp;
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+ bool
+ _M_unique() const // nothrow
+ { return this->_M_get_use_count() == 1; }
+
+ void*
+ _M_get_deleter(const std::type_info& __ti) const
+ { return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
+
+ bool
+ _M_less(const __shared_count& __rhs) const
+ { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+ bool
+ _M_less(const __weak_count<_Lp>& __rhs) const
+ { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+ // Friend function injected into enclosing namespace and found by ADL
+ friend inline bool
+ operator==(const __shared_count& __a, const __shared_count& __b)
+ { return __a._M_pi == __b._M_pi; }
+
+ private:
+ friend class __weak_count<_Lp>;
+
+ template<typename _Tp, typename _Del>
+ static _Sp_counted_base<_Lp>*
+ _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
+ typename std::enable_if<!std::is_reference<_Del>::value>::type* = 0)
+ {
+ return new _Sp_counted_deleter<_Tp*, _Del, std::allocator<_Tp>,
+ _Lp>(__r.get(), __r.get_deleter());
+ }
+
+ template<typename _Tp, typename _Del>
+ static _Sp_counted_base<_Lp>*
+ _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
+ typename std::enable_if<std::is_reference<_Del>::value>::type* = 0)
+ {
+ typedef typename std::remove_reference<_Del>::type _Del1;
+ typedef std::reference_wrapper<_Del1> _Del2;
+ return new _Sp_counted_deleter<_Tp*, _Del2, std::allocator<_Tp>,
+ _Lp>(__r.get(), std::ref(__r.get_deleter()));
+ }
+
+ _Sp_counted_base<_Lp>* _M_pi;
+ };
+
+
+ template<_Lock_policy _Lp>
+ class __weak_count
+ {
+ public:
+ __weak_count() : _M_pi(0) // nothrow
+ { }
+
+ __weak_count(const __shared_count<_Lp>& __r) : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_weak_add_ref();
+ }
+
+ __weak_count(const __weak_count<_Lp>& __r) : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_weak_add_ref();
+ }
+
+ ~__weak_count() // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_weak_release();
+ }
+
+ __weak_count<_Lp>&
+ operator=(const __shared_count<_Lp>& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != 0)
+ __tmp->_M_weak_add_ref();
+ if (_M_pi != 0)
+ _M_pi->_M_weak_release();
+ _M_pi = __tmp;
+ return *this;
+ }
+
+ __weak_count<_Lp>&
+ operator=(const __weak_count<_Lp>& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != 0)
+ __tmp->_M_weak_add_ref();
+ if (_M_pi != 0)
+ _M_pi->_M_weak_release();
+ _M_pi = __tmp;
+ return *this;
+ }
+
+ void
+ _M_swap(__weak_count<_Lp>& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ __r._M_pi = _M_pi;
+ _M_pi = __tmp;
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+ bool
+ _M_less(const __weak_count& __rhs) const
+ { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+ bool
+ _M_less(const __shared_count<_Lp>& __rhs) const
+ { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+ // Friend function injected into enclosing namespace and found by ADL
+ friend inline bool
+ operator==(const __weak_count& __a, const __weak_count& __b)
+ { return __a._M_pi == __b._M_pi; }
+
+ private:
+ friend class __shared_count<_Lp>;
+
+ _Sp_counted_base<_Lp>* _M_pi;
+ };
+
+ // Now that __weak_count is defined we can define this constructor:
+ template<_Lock_policy _Lp>
+ inline __shared_count<_Lp>:: __shared_count(const __weak_count<_Lp>& __r)
+ : _M_pi(__r._M_pi)
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_add_ref_lock();
+ else
+ __throw_bad_weak_ptr();
+ }
+
+
+ // Support for enable_shared_from_this.
+
+ // Friend of __enable_shared_from_this.
+ template<_Lock_policy _Lp, typename _Tp1, typename _Tp2>
+ void
+ __enable_shared_from_this_helper(const __shared_count<_Lp>&,
+ const __enable_shared_from_this<_Tp1,
+ _Lp>*, const _Tp2*);
+
+ // Friend of enable_shared_from_this.
+ template<typename _Tp1, typename _Tp2>
+ void
+ __enable_shared_from_this_helper(const __shared_count<>&,
+ const enable_shared_from_this<_Tp1>*,
+ const _Tp2*);
+
+ template<_Lock_policy _Lp>
+ inline void
+ __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...)
+ { }
+
+
+ template<typename _Tp, _Lock_policy _Lp>
+ class __shared_ptr
+ {
+ public:
+ typedef _Tp element_type;
+
+ __shared_ptr() : _M_ptr(0), _M_refcount() // never throws
+ { }
+
+ template<typename _Tp1>
+ explicit __shared_ptr(_Tp1* __p) : _M_ptr(__p), _M_refcount(__p)
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // __glibcxx_function_requires(_CompleteConcept<_Tp1*>)
+ __enable_shared_from_this_helper(_M_refcount, __p, __p);
+ }
+
+ template<typename _Tp1, typename _Deleter>
+ __shared_ptr(_Tp1* __p, _Deleter __d)
+ : _M_ptr(__p), _M_refcount(__p, __d)
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
+ __enable_shared_from_this_helper(_M_refcount, __p, __p);
+ }
+
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ __shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+ : _M_ptr(__p), _M_refcount(__p, __d, __a)
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
+ __enable_shared_from_this_helper(_M_refcount, __p, __p);
+ }
+
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __p)
+ : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
+ { }
+
+ // generated copy constructor, assignment, destructor are fine.
+
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ { __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+
+ __shared_ptr(__shared_ptr&& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount() // never throws
+ {
+ _M_refcount._M_swap(__r._M_refcount);
+ __r._M_ptr = 0;
+ }
+
+ template<typename _Tp1>
+ __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount() // never throws
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ _M_refcount._M_swap(__r._M_refcount);
+ __r._M_ptr = 0;
+ }
+
+ template<typename _Tp1>
+ explicit __shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+ : _M_refcount(__r._M_refcount) // may throw
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+
+ // It is now safe to copy __r._M_ptr, as
+ // _M_refcount(__r._M_refcount) did not throw.
+ _M_ptr = __r._M_ptr;
+ }
+
+ template<typename _Tp1, typename _Del>
+ explicit __shared_ptr(const std::unique_ptr<_Tp1, _Del>&) = delete;
+
+ // If an exception is thrown this constructor has no effect.
+ template<typename _Tp1, typename _Del>
+ explicit __shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
+ : _M_ptr(__r.get()), _M_refcount()
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ _Tp1* __tmp = __r.get();
+ _M_refcount = __shared_count<_Lp>(std::move(__r));
+ __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
+ }
+
+#if _GLIBCXX_DEPRECATED
+ // Postcondition: use_count() == 1 and __r.get() == 0
+ template<typename _Tp1>
+ explicit __shared_ptr(std::auto_ptr<_Tp1>&& __r)
+ : _M_ptr(__r.get()), _M_refcount()
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Tp1 is complete, delete __r.release() well-formed
+ _Tp1* __tmp = __r.get();
+ _M_refcount = __shared_count<_Lp>(std::move(__r));
+ __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
+ }
+#endif
+
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+ {
+ _M_ptr = __r._M_ptr;
+ _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw
+ return *this;
+ }
+
+#if _GLIBCXX_DEPRECATED
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(std::auto_ptr<_Tp1>&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+#endif
+
+ __shared_ptr&
+ operator=(__shared_ptr&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+
+ template<class _Tp1>
+ __shared_ptr&
+ operator=(__shared_ptr<_Tp1, _Lp>&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+
+ template<typename _Tp1, typename _Del>
+ __shared_ptr&
+ operator=(const std::unique_ptr<_Tp1, _Del>& __r) = delete;
+
+ template<typename _Tp1, typename _Del>
+ __shared_ptr&
+ operator=(std::unique_ptr<_Tp1, _Del>&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+
+ void
+ reset() // never throws
+ { __shared_ptr().swap(*this); }
+
+ template<typename _Tp1>
+ void
+ reset(_Tp1* __p) // _Tp1 must be complete.
+ {
+ // Catch self-reset errors.
+ _GLIBCXX_DEBUG_ASSERT(__p == 0 || __p != _M_ptr);
+ __shared_ptr(__p).swap(*this);
+ }
+
+ template<typename _Tp1, typename _Deleter>
+ void
+ reset(_Tp1* __p, _Deleter __d)
+ { __shared_ptr(__p, __d).swap(*this); }
+
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ void
+ reset(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+ { __shared_ptr(__p, __d, __a).swap(*this); }
+
+ // Allow class instantiation when _Tp is [cv-qual] void.
+ typename std::add_lvalue_reference<_Tp>::type
+ operator*() const // never throws
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return *_M_ptr;
+ }
+
+ _Tp*
+ operator->() const // never throws
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return _M_ptr;
+ }
+
+ _Tp*
+ get() const // never throws
+ { return _M_ptr; }
+
+ explicit operator bool() const // never throws
+ { return _M_ptr == 0 ? false : true; }
+
+ bool
+ unique() const // never throws
+ { return _M_refcount._M_unique(); }
+
+ long
+ use_count() const // never throws
+ { return _M_refcount._M_get_use_count(); }
+
+ void
+ swap(__shared_ptr<_Tp, _Lp>& __other) // never throws
+ {
+ std::swap(_M_ptr, __other._M_ptr);
+ _M_refcount._M_swap(__other._M_refcount);
+ }
+
+ template<typename _Tp1>
+ bool
+ owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const
+ { return _M_refcount._M_less(__rhs._M_refcount); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const
+ { return _M_refcount._M_less(__rhs._M_refcount); }
+
+ protected:
+ // This constructor is non-standard, it is used by allocate_shared.
+ template<typename _Alloc, typename... _Args>
+ __shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
+ : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a,
+ std::forward<_Args>(__args)...)
+ {
+ // _M_ptr needs to point to the newly constructed object.
+ // This relies on _Sp_counted_ptr_inplace::_M_get_deleter.
+ void* __p = _M_refcount._M_get_deleter(typeid(__tag));
+ _M_ptr = static_cast<_Tp*>(__p);
+ __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr);
+ }
+
+ template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc,
+ typename... _Args>
+ friend __shared_ptr<_Tp1, _Lp1>
+ __allocate_shared(_Alloc __a, _Args&&... __args);
+
+ private:
+ void*
+ _M_get_deleter(const std::type_info& __ti) const
+ { return _M_refcount._M_get_deleter(__ti); }
+
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+
+ template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
+ friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&);
+
+ _Tp* _M_ptr; // Contained pointer.
+ __shared_count<_Lp> _M_refcount; // Reference counter.
+ };
+
+
+ // 20.8.13.2.7 shared_ptr comparisons
+ template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
+ inline bool
+ operator==(const __shared_ptr<_Tp1, _Lp>& __a,
+ const __shared_ptr<_Tp2, _Lp>& __b)
+ { return __a.get() == __b.get(); }
+
+ template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
+ inline bool
+ operator!=(const __shared_ptr<_Tp1, _Lp>& __a,
+ const __shared_ptr<_Tp2, _Lp>& __b)
+ { return __a.get() != __b.get(); }
+
+ template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
+ inline bool
+ operator<(const __shared_ptr<_Tp1, _Lp>& __a,
+ const __shared_ptr<_Tp2, _Lp>& __b)
+ { return __a.get() < __b.get(); }
+
+ template<typename _Sp>
+ struct _Sp_less : public binary_function<_Sp, _Sp, bool>
+ {
+ bool
+ operator()(const _Sp& __lhs, const _Sp& __rhs) const
+ {
+ typedef typename _Sp::element_type element_type;
+ return std::less<element_type*>()(__lhs.get(), __rhs.get());
+ }
+ };
+
+ template<typename _Tp, _Lock_policy _Lp>
+ struct less<__shared_ptr<_Tp, _Lp>>
+ : public _Sp_less<__shared_ptr<_Tp, _Lp>>
+ { };
+
+ // XXX LessThanComparable<_Tp> concept should provide >, >= and <=
+ template<typename _Tp, _Lock_policy _Lp>
+ inline bool
+ operator>(const __shared_ptr<_Tp, _Lp>& __a,
+ const __shared_ptr<_Tp, _Lp>& __b)
+ { return __a.get() > __b.get(); }
+
+ template<typename _Tp, _Lock_policy _Lp>
+ inline bool
+ operator>=(const __shared_ptr<_Tp, _Lp>& __a,
+ const __shared_ptr<_Tp, _Lp>& __b)
+ { return __a.get() >= __b.get(); }
+
+ template<typename _Tp, _Lock_policy _Lp>
+ inline bool
+ operator<=(const __shared_ptr<_Tp, _Lp>& __a,
+ const __shared_ptr<_Tp, _Lp>& __b)
+ { return __a.get() <= __b.get(); }
+
+ // 2.2.3.8 shared_ptr specialized algorithms.
+ template<typename _Tp, _Lock_policy _Lp>
+ inline void
+ swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b)
+ { __a.swap(__b); }
+
+ // 2.2.3.9 shared_ptr casts
+
+ // The seemingly equivalent code:
+ // shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))
+ // will eventually result in undefined behaviour, attempting to
+ // delete the same object twice.
+ /// static_pointer_cast
+ template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+ inline __shared_ptr<_Tp, _Lp>
+ static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ { return __shared_ptr<_Tp, _Lp>(__r, static_cast<_Tp*>(__r.get())); }
+
+ // The seemingly equivalent code:
+ // shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))
+ // will eventually result in undefined behaviour, attempting to
+ // delete the same object twice.
+ /// const_pointer_cast
+ template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+ inline __shared_ptr<_Tp, _Lp>
+ const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ { return __shared_ptr<_Tp, _Lp>(__r, const_cast<_Tp*>(__r.get())); }
+
+ // The seemingly equivalent code:
+ // shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))
+ // will eventually result in undefined behaviour, attempting to
+ // delete the same object twice.
+ /// dynamic_pointer_cast
+ template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+ inline __shared_ptr<_Tp, _Lp>
+ dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ {
+ if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
+ return __shared_ptr<_Tp, _Lp>(__r, __p);
+ return __shared_ptr<_Tp, _Lp>();
+ }
+
+
+ template<typename _Tp, _Lock_policy _Lp>
+ class __weak_ptr
+ {
+ public:
+ typedef _Tp element_type;
+
+ __weak_ptr() : _M_ptr(0), _M_refcount() // never throws
+ { }
+
+ // Generated copy constructor, assignment, destructor are fine.
+
+ // The "obvious" converting constructor implementation:
+ //
+ // template<typename _Tp1>
+ // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+ // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ // { }
+ //
+ // has a serious problem.
+ //
+ // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr)
+ // conversion may require access to *__r._M_ptr (virtual inheritance).
+ //
+ // It is not possible to avoid spurious access violations since
+ // in multithreaded programs __r._M_ptr may be invalidated at any point.
+ template<typename _Tp1>
+ __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+ : _M_refcount(__r._M_refcount) // never throws
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ _M_ptr = __r.lock().get();
+ }
+
+ template<typename _Tp1>
+ __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ { __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+
+ template<typename _Tp1>
+ __weak_ptr&
+ operator=(const __weak_ptr<_Tp1, _Lp>& __r) // never throws
+ {
+ _M_ptr = __r.lock().get();
+ _M_refcount = __r._M_refcount;
+ return *this;
+ }
+
+ template<typename _Tp1>
+ __weak_ptr&
+ operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+ {
+ _M_ptr = __r._M_ptr;
+ _M_refcount = __r._M_refcount;
+ return *this;
+ }
+
+ __shared_ptr<_Tp, _Lp>
+ lock() const // never throws
+ {
+#ifdef __GTHREADS
+ // Optimization: avoid throw overhead.
+ if (expired())
+ return __shared_ptr<element_type, _Lp>();
+
+ __try
+ {
+ return __shared_ptr<element_type, _Lp>(*this);
+ }
+ __catch(const bad_weak_ptr&)
+ {
+ // Q: How can we get here?
+ // A: Another thread may have invalidated r after the
+ // use_count test above.
+ return __shared_ptr<element_type, _Lp>();
+ }
+
+#else
+ // Optimization: avoid try/catch overhead when single threaded.
+ return expired() ? __shared_ptr<element_type, _Lp>()
+ : __shared_ptr<element_type, _Lp>(*this);
+
+#endif
+ } // XXX MT
+
+ long
+ use_count() const // never throws
+ { return _M_refcount._M_get_use_count(); }
+
+ bool
+ expired() const // never throws
+ { return _M_refcount._M_get_use_count() == 0; }
+
+ template<typename _Tp1>
+ bool
+ owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const
+ { return _M_refcount._M_less(__rhs._M_refcount); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const
+ { return _M_refcount._M_less(__rhs._M_refcount); }
+
+ void
+ reset() // never throws
+ { __weak_ptr().swap(*this); }
+
+ void
+ swap(__weak_ptr& __s) // never throws
+ {
+ std::swap(_M_ptr, __s._M_ptr);
+ _M_refcount._M_swap(__s._M_refcount);
+ }
+
+ // Comparisons
+ template<typename _Tp1>
+ bool operator<(const __weak_ptr<_Tp1, _Lp>&) const = delete;
+
+ template<typename _Tp1>
+ bool operator<=(const __weak_ptr<_Tp1, _Lp>&) const = delete;
+
+ template<typename _Tp1>
+ bool operator>(const __weak_ptr<_Tp1, _Lp>&) const = delete;
+
+ template<typename _Tp1>
+ bool operator>=(const __weak_ptr<_Tp1, _Lp>&) const = delete;
+
+ private:
+ // Used by __enable_shared_from_this.
+ void
+ _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount)
+ {
+ _M_ptr = __ptr;
+ _M_refcount = __refcount;
+ }
+
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+ friend class __enable_shared_from_this<_Tp, _Lp>;
+ friend class enable_shared_from_this<_Tp>;
+
+ _Tp* _M_ptr; // Contained pointer.
+ __weak_count<_Lp> _M_refcount; // Reference counter.
+ };
+
+ // 20.8.13.3.7 weak_ptr specialized algorithms.
+ template<typename _Tp, _Lock_policy _Lp>
+ inline void
+ swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b)
+ { __a.swap(__b); }
+
+ template<typename _Tp, typename _Tp1>
+ struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __lhs, const _Tp& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+
+ bool
+ operator()(const _Tp& __lhs, const _Tp1& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+
+ bool
+ operator()(const _Tp1& __lhs, const _Tp& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+ };
+
+ template<typename _Tp, _Lock_policy _Lp>
+ struct owner_less<__shared_ptr<_Tp, _Lp>>
+ : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>>
+ { };
+
+ template<typename _Tp, _Lock_policy _Lp>
+ struct owner_less<__weak_ptr<_Tp, _Lp>>
+ : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>>
+ { };
+
+
+ template<typename _Tp, _Lock_policy _Lp>
+ class __enable_shared_from_this
+ {
+ protected:
+ __enable_shared_from_this() { }
+
+ __enable_shared_from_this(const __enable_shared_from_this&) { }
+
+ __enable_shared_from_this&
+ operator=(const __enable_shared_from_this&)
+ { return *this; }
+
+ ~__enable_shared_from_this() { }
+
+ public:
+ __shared_ptr<_Tp, _Lp>
+ shared_from_this()
+ { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); }
+
+ __shared_ptr<const _Tp, _Lp>
+ shared_from_this() const
+ { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); }
+
+ private:
+ template<typename _Tp1>
+ void
+ _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const
+ { _M_weak_this._M_assign(__p, __n); }
+
+ template<typename _Tp1>
+ friend void
+ __enable_shared_from_this_helper(const __shared_count<_Lp>& __pn,
+ const __enable_shared_from_this* __pe,
+ const _Tp1* __px)
+ {
+ if (__pe != 0)
+ __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
+ }
+
+ mutable __weak_ptr<_Tp, _Lp> _M_weak_this;
+ };
+
+
+ template<typename _Tp, _Lock_policy _Lp, typename _Alloc, typename... _Args>
+ inline __shared_ptr<_Tp, _Lp>
+ __allocate_shared(_Alloc __a, _Args&&... __args)
+ {
+ return __shared_ptr<_Tp, _Lp>(_Sp_make_shared_tag(),
+ std::forward<_Alloc>(__a), std::forward<_Args>(__args)...);
+ }
+
+ template<typename _Tp, _Lock_policy _Lp, typename... _Args>
+ inline __shared_ptr<_Tp, _Lp>
+ __make_shared(_Args&&... __args)
+ {
+ typedef typename std::remove_const<_Tp>::type _Tp_nc;
+ return __allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(),
+ std::forward<_Args>(__args)...);
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _SHARED_PTR_BASE_H
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index c638c547887..f9c3ab2b428 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -998,7 +998,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
}
/**
- * @brief Performs "dictionary" comparison on ranges.
+ * @brief Performs 'dictionary' comparison on ranges.
* @ingroup sorting_algorithms
* @param first1 An input iterator.
* @param last1 An input iterator.
@@ -1006,9 +1006,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
* @param last2 An input iterator.
* @return A boolean true or false.
*
- * "Returns true if the sequence of elements defined by the range
+ * 'Returns true if the sequence of elements defined by the range
* [first1,last1) is lexicographically less than the sequence of elements
- * defined by the range [first2,last2). Returns false otherwise."
+ * defined by the range [first2,last2). Returns false otherwise.'
* (Quoted from [25.3.8]/1.) If the iterators are all character pointers,
* then this is an inline call to @c memcmp.
*/
diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h
index eb7290053ed..a60fea60a6b 100644
--- a/libstdc++-v3/include/bits/stl_iterator.h
+++ b/libstdc++-v3/include/bits/stl_iterator.h
@@ -67,9 +67,14 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
+ /**
+ * @addtogroup iterators
+ * @{
+ */
+
// 24.4.1 Reverse iterators
/**
- * "Bidirectional and random access iterators have corresponding reverse
+ * 'Bidirectional and random access iterators have corresponding reverse
* %iterator adaptors that iterate through the data structure in the
* opposite direction. They have the same signatures as the corresponding
* iterators. The fundamental relation between a reverse %iterator and its
@@ -80,7 +85,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* This mapping is dictated by the fact that while there is always a
* pointer past the end of an array, there might not be a valid pointer
- * before the beginning of an array." [24.4.1]/1,2
+ * before the beginning of an array.' [24.4.1]/1,2
*
* Reverse iterators can be tricky and surprising at first. Their
* semantics make sense, however, and the trickiness is a side effect of
@@ -97,14 +102,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
protected:
_Iterator current;
- public:
- typedef _Iterator iterator_type;
- typedef typename iterator_traits<_Iterator>::difference_type
- difference_type;
- typedef typename iterator_traits<_Iterator>::reference reference;
- typedef typename iterator_traits<_Iterator>::pointer pointer;
+ typedef iterator_traits<_Iterator> __traits_type;
public:
+ typedef _Iterator iterator_type;
+ typedef typename __traits_type::difference_type difference_type;
+ typedef typename __traits_type::pointer pointer;
+ typedef typename __traits_type::reference reference;
+
/**
* The default constructor default-initializes member @p current.
* If it is a pointer, that means it is zero-initialized.
@@ -651,6 +656,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename _Container::iterator(__i));
}
+ // @} group iterators
+
_GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -670,15 +677,15 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
protected:
_Iterator _M_current;
+ typedef iterator_traits<_Iterator> __traits_type;
+
public:
- typedef _Iterator iterator_type;
- typedef typename iterator_traits<_Iterator>::iterator_category
- iterator_category;
- typedef typename iterator_traits<_Iterator>::value_type value_type;
- typedef typename iterator_traits<_Iterator>::difference_type
- difference_type;
- typedef typename iterator_traits<_Iterator>::reference reference;
- typedef typename iterator_traits<_Iterator>::pointer pointer;
+ typedef _Iterator iterator_type;
+ typedef typename __traits_type::iterator_category iterator_category;
+ typedef typename __traits_type::value_type value_type;
+ typedef typename __traits_type::difference_type difference_type;
+ typedef typename __traits_type::reference reference;
+ typedef typename __traits_type::pointer pointer;
__normal_iterator() : _M_current(_Iterator()) { }
@@ -869,6 +876,11 @@ _GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(std)
+ /**
+ * @addtogroup iterators
+ * @{
+ */
+
// 24.4.3 Move iterators
/**
* Class template move_iterator is an iterator adapter with the same
@@ -884,18 +896,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
protected:
_Iterator _M_current;
+ typedef iterator_traits<_Iterator> __traits_type;
+
public:
- typedef _Iterator iterator_type;
- typedef typename iterator_traits<_Iterator>::difference_type
- difference_type;
+ typedef _Iterator iterator_type;
+ typedef typename __traits_type::iterator_category iterator_category;
+ typedef typename __traits_type::value_type value_type;
+ typedef typename __traits_type::difference_type difference_type;
// NB: DR 680.
- typedef _Iterator pointer;
- typedef typename iterator_traits<_Iterator>::value_type value_type;
- typedef typename iterator_traits<_Iterator>::iterator_category
- iterator_category;
- typedef value_type&& reference;
+ typedef _Iterator pointer;
+ typedef value_type&& reference;
- public:
move_iterator()
: _M_current() { }
@@ -1031,6 +1042,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
make_move_iterator(const _Iterator& __i)
{ return move_iterator<_Iterator>(__i); }
+ // @} group iterators
+
_GLIBCXX_END_NAMESPACE
#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) std::make_move_iterator(_Iter)
diff --git a/libstdc++-v3/include/bits/stl_iterator_base_types.h b/libstdc++-v3/include/bits/stl_iterator_base_types.h
index 6dc0d7838d3..d2bf647f058 100644
--- a/libstdc++-v3/include/bits/stl_iterator_base_types.h
+++ b/libstdc++-v3/include/bits/stl_iterator_base_types.h
@@ -77,15 +77,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
//@{
/// Marking input iterators.
struct input_iterator_tag { };
+
/// Marking output iterators.
struct output_iterator_tag { };
+
/// Forward iterators support a superset of input iterator operations.
struct forward_iterator_tag : public input_iterator_tag { };
+
/// Bidirectional iterators support a superset of forward iterator
/// operations.
struct bidirectional_iterator_tag : public forward_iterator_tag { };
- /// Random-access iterators support a superset of bidirectional iterator
- /// operations.
+
+ /// Random-access iterators support a superset of bidirectional
+ /// iterator operations.
struct random_access_iterator_tag : public bidirectional_iterator_tag { };
@@ -116,6 +120,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
};
/**
+ * @brief Traits class for iterators.
+ *
* This class does nothing but define nested typedefs. The general
* version simply "forwards" the nested typedefs from the Iterator
* argument. Specialized versions for pointers and pointers-to-const
@@ -131,6 +137,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typedef typename _Iterator::reference reference;
};
+ /// Partial specialization for pointer types.
template<typename _Tp>
struct iterator_traits<_Tp*>
{
@@ -141,6 +148,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typedef _Tp& reference;
};
+ /// Partial specialization for const pointer types.
template<typename _Tp>
struct iterator_traits<const _Tp*>
{
diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h
index 2b887912a10..27b58bf5f81 100644
--- a/libstdc++-v3/include/bits/stl_tempbuf.h
+++ b/libstdc++-v3/include/bits/stl_tempbuf.h
@@ -72,9 +72,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* This function tries to obtain storage for @c len adjacent Tp
* objects. The objects themselves are not constructed, of course.
- * A pair<> is returned containing "the buffer s address and
+ * A pair<> is returned containing 'the buffer s address and
* capacity (in the units of sizeof(Tp)), or a pair of 0 values if
- * no storage can be obtained." Note that the capacity obtained
+ * no storage can be obtained.' Note that the capacity obtained
* may be less than that requested if the memory is unavailable;
* you should compare len with the .second return value.
*
diff --git a/libstdc++-v3/include/bits/stream_iterator.h b/libstdc++-v3/include/bits/stream_iterator.h
index fce6c26d1a5..90f1b552b60 100644
--- a/libstdc++-v3/include/bits/stream_iterator.h
+++ b/libstdc++-v3/include/bits/stream_iterator.h
@@ -36,6 +36,11 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
+ /**
+ * @addtogroup iterators
+ * @{
+ */
+
/// Provides input iterator semantics for streams.
template<typename _Tp, typename _CharT = char,
typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
@@ -206,6 +211,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return *this; }
};
+ // @} group iterators
+
_GLIBCXX_END_NAMESPACE
#endif
diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/include/bits/streambuf_iterator.h
index d02b555343a..71c323035a2 100644
--- a/libstdc++-v3/include/bits/streambuf_iterator.h
+++ b/libstdc++-v3/include/bits/streambuf_iterator.h
@@ -39,6 +39,11 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
+ /**
+ * @addtogroup iterators
+ * @{
+ */
+
// 24.5.3 Template class istreambuf_iterator
/// Provides input iterator semantics for streambufs.
template<typename _CharT, typename _Traits>
@@ -387,6 +392,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __first;
}
+// @} group iterators
+
_GLIBCXX_END_NAMESPACE
#endif
diff --git a/libstdc++-v3/include/c_global/cassert b/libstdc++-v3/include/c_global/cassert
index 186de0fbcd1..231e419efb5 100644
--- a/libstdc++-v3/include/c_global/cassert
+++ b/libstdc++-v3/include/c_global/cassert
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file cassert
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c assert.h,
diff --git a/libstdc++-v3/include/c_global/cctype b/libstdc++-v3/include/c_global/cctype
index 44ef4d4a0f2..bfe45929e3c 100644
--- a/libstdc++-v3/include/c_global/cctype
+++ b/libstdc++-v3/include/c_global/cctype
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/cctype
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c ctype.h,
diff --git a/libstdc++-v3/include/c_global/cerrno b/libstdc++-v3/include/c_global/cerrno
index 371642936cf..f02d732079c 100644
--- a/libstdc++-v3/include/c_global/cerrno
+++ b/libstdc++-v3/include/c_global/cerrno
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file cerrno
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c errno.h,
diff --git a/libstdc++-v3/include/c_global/cfloat b/libstdc++-v3/include/c_global/cfloat
index 54eb7788746..7f551446cb3 100644
--- a/libstdc++-v3/include/c_global/cfloat
+++ b/libstdc++-v3/include/c_global/cfloat
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/cfloat
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c float.h,
diff --git a/libstdc++-v3/include/c_global/ciso646 b/libstdc++-v3/include/c_global/ciso646
index a3c3f9b7794..bb7e6294fd8 100644
--- a/libstdc++-v3/include/c_global/ciso646
+++ b/libstdc++-v3/include/c_global/ciso646
@@ -23,7 +23,7 @@
// <http://www.gnu.org/licenses/>.
/** @file ciso646
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c iso646.h,
diff --git a/libstdc++-v3/include/c_global/climits b/libstdc++-v3/include/c_global/climits
index 943d69e522f..1bbe6cf27a5 100644
--- a/libstdc++-v3/include/c_global/climits
+++ b/libstdc++-v3/include/c_global/climits
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/climits
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c limits.h,
diff --git a/libstdc++-v3/include/c_global/clocale b/libstdc++-v3/include/c_global/clocale
index eb955c9b181..52d2b9d2148 100644
--- a/libstdc++-v3/include/c_global/clocale
+++ b/libstdc++-v3/include/c_global/clocale
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file clocale
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c locale.h,
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath
index a5c31c436d7..2568d6b3bf6 100644
--- a/libstdc++-v3/include/c_global/cmath
+++ b/libstdc++-v3/include/c_global/cmath
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/cmath
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c math.h,
diff --git a/libstdc++-v3/include/c_global/csetjmp b/libstdc++-v3/include/c_global/csetjmp
index 6d7ecab47b6..c643d1b437a 100644
--- a/libstdc++-v3/include/c_global/csetjmp
+++ b/libstdc++-v3/include/c_global/csetjmp
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file csetjmp
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c setjmp.h,
diff --git a/libstdc++-v3/include/c_global/csignal b/libstdc++-v3/include/c_global/csignal
index 41af5e694a4..147b5b61859 100644
--- a/libstdc++-v3/include/c_global/csignal
+++ b/libstdc++-v3/include/c_global/csignal
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file csignal
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c signal.h,
diff --git a/libstdc++-v3/include/c_global/cstdarg b/libstdc++-v3/include/c_global/cstdarg
index 73327b1a353..c61a866bfe7 100644
--- a/libstdc++-v3/include/c_global/cstdarg
+++ b/libstdc++-v3/include/c_global/cstdarg
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/cstdarg
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c stdarg.h,
diff --git a/libstdc++-v3/include/c_global/cstdatomic b/libstdc++-v3/include/c_global/cstdatomic
index 7489d97c07d..c2aea8f02c2 100644
--- a/libstdc++-v3/include/c_global/cstdatomic
+++ b/libstdc++-v3/include/c_global/cstdatomic
@@ -24,7 +24,7 @@
// <http://www.gnu.org/licenses/>.
/** @file cstdatomic
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c stdatomic.h,
diff --git a/libstdc++-v3/include/c_global/cstddef b/libstdc++-v3/include/c_global/cstddef
index bb16e75e0ac..6beb52588bc 100644
--- a/libstdc++-v3/include/c_global/cstddef
+++ b/libstdc++-v3/include/c_global/cstddef
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file cstddef
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c stddef.h,
diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio
index ff5a635a152..b17f5ccf864 100644
--- a/libstdc++-v3/include/c_global/cstdio
+++ b/libstdc++-v3/include/c_global/cstdio
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/cstdio
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c stdio.h,
diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib
index e252d089e75..0e0d7d5c18c 100644
--- a/libstdc++-v3/include/c_global/cstdlib
+++ b/libstdc++-v3/include/c_global/cstdlib
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/cstdlib
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c stdlib.h,
diff --git a/libstdc++-v3/include/c_global/cstring b/libstdc++-v3/include/c_global/cstring
index de0ce2425e3..acd6166b15f 100644
--- a/libstdc++-v3/include/c_global/cstring
+++ b/libstdc++-v3/include/c_global/cstring
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file cstring
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c string.h,
diff --git a/libstdc++-v3/include/c_global/ctime b/libstdc++-v3/include/c_global/ctime
index e236cf48367..8430dc84234 100644
--- a/libstdc++-v3/include/c_global/ctime
+++ b/libstdc++-v3/include/c_global/ctime
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/ctime
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c time.h,
diff --git a/libstdc++-v3/include/c_global/cwchar b/libstdc++-v3/include/c_global/cwchar
index f7f07c3caf5..f2f36cfc75c 100644
--- a/libstdc++-v3/include/c_global/cwchar
+++ b/libstdc++-v3/include/c_global/cwchar
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/cwchar
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c wchar.h,
diff --git a/libstdc++-v3/include/c_global/cwctype b/libstdc++-v3/include/c_global/cwctype
index 4e94fec3426..ffc75c82ba5 100644
--- a/libstdc++-v3/include/c_global/cwctype
+++ b/libstdc++-v3/include/c_global/cwctype
@@ -25,7 +25,7 @@
// <http://www.gnu.org/licenses/>.
/** @file include/cwctype
- * This is a Standard C++ Library file. You should @c #include this file
+ * This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c wctype.h,
diff --git a/libstdc++-v3/include/ext/sso_string_base.h b/libstdc++-v3/include/ext/sso_string_base.h
index 6d2af7c46dd..d88297fc36e 100644
--- a/libstdc++-v3/include/ext/sso_string_base.h
+++ b/libstdc++-v3/include/ext/sso_string_base.h
@@ -529,7 +529,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
void
__sso_string_base<_CharT, _Traits, _Alloc>::
_M_mutate(size_type __pos, size_type __len1, const _CharT* __s,
- const size_type __len2)
+ size_type __len2)
{
const size_type __how_much = _M_length() - __pos - __len1;
diff --git a/libstdc++-v3/include/parallel/balanced_quicksort.h b/libstdc++-v3/include/parallel/balanced_quicksort.h
index 3107d97a45b..4619415a810 100644
--- a/libstdc++-v3/include/parallel/balanced_quicksort.h
+++ b/libstdc++-v3/include/parallel/balanced_quicksort.h
@@ -94,7 +94,7 @@ namespace __gnu_parallel
* @param __comp Comparator.
* @param __num_threads Number of threads that are allowed to work on
* this part.
- * @pre @__c (__end-__begin)>=1 */
+ * @pre @c (__end-__begin)>=1 */
template<typename _RAIter, typename _Compare>
typename std::iterator_traits<_RAIter>::difference_type
__qsb_divide(_RAIter __begin, _RAIter __end,
@@ -245,7 +245,8 @@ namespace __gnu_parallel
template<typename _RAIter, typename _Compare>
void
__qsb_local_sort_with_helping(_QSBThreadLocal<_RAIter>** __tls,
- _Compare& __comp, int __iam, bool __wait)
+ _Compare& __comp, _ThreadIndex __iam,
+ bool __wait)
{
typedef std::iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
@@ -460,7 +461,7 @@ namespace __gnu_parallel
// 2. The largest range has at most length __n
// 3. Each range is larger than half of the range remaining
volatile _DifferenceType __elements_leftover = __n;
- for (int __i = 0; __i < __num_threads; ++__i)
+ for (_ThreadIndex __i = 0; __i < __num_threads; ++__i)
{
__tls[__i]->_M_elements_leftover = &__elements_leftover;
__tls[__i]->_M_num_threads = __num_threads;
@@ -477,12 +478,12 @@ namespace __gnu_parallel
#if _GLIBCXX_ASSERTIONS
// All stack must be empty.
_Piece __dummy;
- for (int __i = 1; __i < __num_threads; ++__i)
+ for (_ThreadIndex __i = 1; __i < __num_threads; ++__i)
_GLIBCXX_PARALLEL_ASSERT(
!__tls[__i]->_M_leftover_parts.pop_back(__dummy));
#endif
- for (int __i = 0; __i < __num_threads; ++__i)
+ for (_ThreadIndex __i = 0; __i < __num_threads; ++__i)
delete __tls[__i];
delete[] __tls;
}
diff --git a/libstdc++-v3/include/parallel/base.h b/libstdc++-v3/include/parallel/base.h
index eee88bd2ce1..e67134c6534 100644
--- a/libstdc++-v3/include/parallel/base.h
+++ b/libstdc++-v3/include/parallel/base.h
@@ -81,10 +81,10 @@ namespace __gnu_parallel
// the OpenMP runtime unless the parallel mode is actually invoked
// and active, which imples that the OpenMP runtime is actually
// going to be linked in.
- inline int
+ inline _ThreadIndex
__get_max_threads()
{
- int __i = omp_get_max_threads();
+ _ThreadIndex __i = omp_get_max_threads();
return __i > 1 ? __i : 1;
}
@@ -93,7 +93,7 @@ namespace __gnu_parallel
__is_parallel(const _Parallelism __p) { return __p != sequential; }
- /** @brief Calculates the rounded-down logarithm of @__c __n for base 2.
+ /** @brief Calculates the rounded-down logarithm of @c __n for base 2.
* @param __n Argument.
* @return Returns 0 for any argument <1.
*/
@@ -108,11 +108,11 @@ namespace __gnu_parallel
}
/** @brief Encode two integers into one gnu_parallel::_CASable.
- * @param __a First integer, to be encoded in the most-significant @__c
+ * @param __a First integer, to be encoded in the most-significant @c
* _CASable_bits/2 bits.
* @param __b Second integer, to be encoded in the least-significant
- * @__c _CASable_bits/2 bits.
- * @return value encoding @__c __a and @__c __b.
+ * @c _CASable_bits/2 bits.
+ * @return value encoding @c __a and @c __b.
* @see decode2
*/
inline _CASable
@@ -124,9 +124,9 @@ namespace __gnu_parallel
/** @brief Decode two integers from one gnu_parallel::_CASable.
* @param __x __gnu_parallel::_CASable to decode integers from.
* @param __a First integer, to be decoded from the most-significant
- * @__c _CASable_bits/2 bits of @__c __x.
+ * @c _CASable_bits/2 bits of @c __x.
* @param __b Second integer, to be encoded in the least-significant
- * @__c _CASable_bits/2 bits of @__c __x.
+ * @c _CASable_bits/2 bits of @c __x.
* @see __encode2
*/
inline void
@@ -422,7 +422,7 @@ namespace __gnu_parallel
};
/** @brief Compute the median of three referenced elements,
- according to @__c __comp.
+ according to @c __comp.
* @param __a First iterator.
* @param __b Second iterator.
* @param __c Third iterator.
diff --git a/libstdc++-v3/include/parallel/checkers.h b/libstdc++-v3/include/parallel/checkers.h
index 8abfc991e67..2a977acedf4 100644
--- a/libstdc++-v3/include/parallel/checkers.h
+++ b/libstdc++-v3/include/parallel/checkers.h
@@ -39,12 +39,12 @@
namespace __gnu_parallel
{
/**
- * @brief Check whether @__c [__begin, @__c __end) is sorted according
- * to @__c __comp.
+ * @brief Check whether @c [__begin, @c __end) is sorted according
+ * to @c __comp.
* @param __begin Begin iterator of sequence.
* @param __end End iterator of sequence.
* @param __comp Comparator.
- * @return @__c true if sorted, @__c false otherwise.
+ * @return @c true if sorted, @c false otherwise.
*/
template<typename _IIter, typename _Compare>
bool
diff --git a/libstdc++-v3/include/parallel/compatibility.h b/libstdc++-v3/include/parallel/compatibility.h
index c4f691e5b77..688a7cf348f 100644
--- a/libstdc++-v3/include/parallel/compatibility.h
+++ b/libstdc++-v3/include/parallel/compatibility.h
@@ -227,8 +227,8 @@ namespace __gnu_parallel
#endif
- /** @brief Compare @__c *__ptr and @__c __comparand. If equal, let @__c
- * *__ptr=__replacement and return @__c true, return @__c false otherwise.
+ /** @brief Compare @c *__ptr and @c __comparand. If equal, let @c
+ * *__ptr=__replacement and return @c true, return @c false otherwise.
*
* Implementation is heavily platform-dependent.
* @param __ptr Pointer to 32-bit signed integer.
@@ -270,8 +270,8 @@ namespace __gnu_parallel
#endif
}
- /** @brief Compare @__c *__ptr and @__c __comparand. If equal, let @__c
- * *__ptr=__replacement and return @__c true, return @__c false otherwise.
+ /** @brief Compare @c *__ptr and @c __comparand. If equal, let @c
+ * *__ptr=__replacement and return @c true, return @c false otherwise.
*
* Implementation is heavily platform-dependent.
* @param __ptr Pointer to 64-bit signed integer.
@@ -323,8 +323,8 @@ namespace __gnu_parallel
#endif
}
- /** @brief Compare @__c *__ptr and @__c __comparand. If equal, let @__c
- * *__ptr=__replacement and return @__c true, return @__c false otherwise.
+ /** @brief Compare @c *__ptr and @c __comparand. If equal, let @c
+ * *__ptr=__replacement and return @c true, return @c false otherwise.
*
* Implementation is heavily platform-dependent.
* @param __ptr Pointer to signed integer.
diff --git a/libstdc++-v3/include/parallel/equally_split.h b/libstdc++-v3/include/parallel/equally_split.h
index 307be0b52f0..481c9886840 100644
--- a/libstdc++-v3/include/parallel/equally_split.h
+++ b/libstdc++-v3/include/parallel/equally_split.h
@@ -42,7 +42,7 @@ namespace __gnu_parallel
* @param __n Number of elements
* @param __num_threads Number of parts
* @param __s Splitters
- * @returns End of __splitter sequence, i.e. @__c __s+__num_threads+1 */
+ * @returns End of __splitter sequence, i.e. @c __s+__num_threads+1 */
template<typename _DifferenceType, typename _OutputIterator>
_OutputIterator
equally_split(_DifferenceType __n, _ThreadIndex __num_threads,
diff --git a/libstdc++-v3/include/parallel/for_each.h b/libstdc++-v3/include/parallel/for_each.h
index f758b7ab78a..e6e573ddbbf 100644
--- a/libstdc++-v3/include/parallel/for_each.h
+++ b/libstdc++-v3/include/parallel/for_each.h
@@ -42,7 +42,7 @@
namespace __gnu_parallel
{
- /** @brief Chose the desired algorithm by evaluating @__c __parallelism_tag.
+ /** @brief Chose the desired algorithm by evaluating @c __parallelism_tag.
* @param __begin Begin iterator of input sequence.
* @param __end End iterator of input sequence.
* @param __user_op A user-specified functor (comparator, predicate,
diff --git a/libstdc++-v3/include/parallel/list_partition.h b/libstdc++-v3/include/parallel/list_partition.h
index 573085aa872..1f1bfa22e44 100644
--- a/libstdc++-v3/include/parallel/list_partition.h
+++ b/libstdc++-v3/include/parallel/list_partition.h
@@ -42,7 +42,7 @@ namespace __gnu_parallel
* @param __os_starts Start positions worked on (oversampled).
* @param __count_to_two Counts up to 2.
* @param __range_length Current length of a chunk.
- * @param __make_twice Whether the @__c __os_starts is allowed to be
+ * @param __make_twice Whether the @c __os_starts is allowed to be
* grown or not
*/
template<typename _IIter>
@@ -83,16 +83,17 @@ namespace __gnu_parallel
* @param __begin Begin iterator of input sequence.
* @param __end End iterator of input sequence.
* @param __starts Start iterators for the resulting parts, dimension
- * @__c __num_parts+1. For convenience, @__c __starts @__c [__num_parts]
+ * @c __num_parts+1. For convenience, @c __starts @c [__num_parts]
* contains the end iterator of the sequence.
* @param __lengths Length of the resulting parts.
* @param __num_parts Number of parts to split the sequence into.
* @param __f Functor to be applied to each element by traversing __it
* @param __oversampling Oversampling factor. If 0, then the
- * partitions will differ in at most @__f$ \sqrt{\mathrm{__end} -
- * \mathrm{__begin}} @__f$ __elements. Otherwise, the ratio between the
- * longest and the shortest part is bounded by @__f$
- * 1/(\mathrm{__oversampling} \cdot \mathrm{num\_parts}) @__f$.
+ * partitions will differ in at most
+ * \sqrt{\mathrm{__end} - \mathrm{__begin}}
+ * __elements. Otherwise, the ratio between the
+ * longest and the shortest part is bounded by
+ * 1/(\mathrm{__oversampling} \cdot \mathrm{num\_parts})
* @return Length of the whole sequence.
*/
template<typename _IIter, typename _FunctorType>
diff --git a/libstdc++-v3/include/parallel/merge.h b/libstdc++-v3/include/parallel/merge.h
index 2343d7326e8..a19e996a055 100644
--- a/libstdc++-v3/include/parallel/merge.h
+++ b/libstdc++-v3/include/parallel/merge.h
@@ -37,11 +37,11 @@
namespace __gnu_parallel
{
- /** @brief Merge routine being able to merge only the @__c __max_length
+ /** @brief Merge routine being able to merge only the @c __max_length
* smallest elements.
*
- * The @__c __begin iterators are advanced accordingly, they might not
- * reach @__c __end, in contrast to the usual variant.
+ * The @c __begin iterators are advanced accordingly, they might not
+ * reach @c __end, in contrast to the usual variant.
* @param __begin1 Begin iterator of first sequence.
* @param __end1 End iterator of first sequence.
* @param __begin2 Begin iterator of second sequence.
@@ -83,11 +83,11 @@ namespace __gnu_parallel
return __target;
}
- /** @brief Merge routine being able to merge only the @__c __max_length
+ /** @brief Merge routine being able to merge only the @c __max_length
* smallest elements.
*
- * The @__c __begin iterators are advanced accordingly, they might not
- * reach @__c __end, in contrast to the usual variant.
+ * The @c __begin iterators are advanced accordingly, they might not
+ * reach @c __end, in contrast to the usual variant.
* Specially designed code should allow the compiler to generate
* conditional moves instead of branches.
* @param __begin1 Begin iterator of first sequence.
@@ -150,11 +150,11 @@ namespace __gnu_parallel
return __target;
}
- /** @brief Merge routine being able to merge only the @__c __max_length
+ /** @brief Merge routine being able to merge only the @c __max_length
* smallest elements.
*
- * The @__c __begin iterators are advanced accordingly, they might not
- * reach @__c __end, in contrast to the usual variant.
+ * The @c __begin iterators are advanced accordingly, they might not
+ * reach @c __end, in contrast to the usual variant.
* Static switch on whether to use the conditional-move variant.
* @param __begin1 Begin iterator of first sequence.
* @param __end1 End iterator of first sequence.
@@ -202,11 +202,11 @@ namespace __gnu_parallel
{ return __merge_advance(__begin1, __end1, __begin2, __end2, __target,
__max_length, __comp); }
- /** @brief Parallel merge routine being able to merge only the @__c
+ /** @brief Parallel merge routine being able to merge only the @c
* __max_length smallest elements.
*
- * The @__c __begin iterators are advanced accordingly, they might not
- * reach @__c __end, in contrast to the usual variant.
+ * The @c __begin iterators are advanced accordingly, they might not
+ * reach @c __end, in contrast to the usual variant.
* The functionality is projected onto parallel_multiway_merge.
* @param __begin1 Begin iterator of first sequence.
* @param __end1 End iterator of first sequence.
diff --git a/libstdc++-v3/include/parallel/multiseq_selection.h b/libstdc++-v3/include/parallel/multiseq_selection.h
index e434eee624c..1fab257ccdd 100644
--- a/libstdc++-v3/include/parallel/multiseq_selection.h
+++ b/libstdc++-v3/include/parallel/multiseq_selection.h
@@ -133,19 +133,21 @@ namespace __gnu_parallel
typedef typename std::iterator_traits<_RanSeqs>::value_type::first_type
_It;
+ typedef typename std::iterator_traits<_RanSeqs>::difference_type
+ _SeqNumber;
typedef typename std::iterator_traits<_It>::difference_type
_DifferenceType;
typedef typename std::iterator_traits<_It>::value_type _ValueType;
- _Lexicographic<_ValueType, int, _Compare> __lcomp(__comp);
- _LexicographicReverse<_ValueType, int, _Compare> __lrcomp(__comp);
+ _Lexicographic<_ValueType, _SeqNumber, _Compare> __lcomp(__comp);
+ _LexicographicReverse<_ValueType, _SeqNumber, _Compare> __lrcomp(__comp);
// Number of sequences, number of elements in total (possibly
// including padding).
_DifferenceType __m = std::distance(__begin_seqs, __end_seqs), __nn = 0,
__nmax, __n, __r;
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
{
__nn += std::distance(__begin_seqs[__i].first,
__begin_seqs[__i].second);
@@ -156,7 +158,7 @@ namespace __gnu_parallel
if (__rank == __nn)
{
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
__begin_offsets[__i] = __begin_seqs[__i].second; // Very end.
// Return __m - 1;
return;
@@ -174,7 +176,7 @@ namespace __gnu_parallel
__ns[0] = std::distance(__begin_seqs[0].first, __begin_seqs[0].second);
__nmax = __ns[0];
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
{
__ns[__i] = std::distance(__begin_seqs[__i].first,
__begin_seqs[__i].second);
@@ -187,7 +189,7 @@ namespace __gnu_parallel
// equality iff __nmax = 2^__k - 1.
__l = (1ULL << __r) - 1;
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
{
__a[__i] = 0;
__b[__i] = __l;
@@ -200,21 +202,21 @@ namespace __gnu_parallel
#define __S(__i) (__begin_seqs[__i].first)
// Initial partition.
- std::vector<std::pair<_ValueType, int> > __sample;
+ std::vector<std::pair<_ValueType, _SeqNumber> > __sample;
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
if (__n < __ns[__i]) //__sequence long enough
__sample.push_back(std::make_pair(__S(__i)[__n], __i));
__gnu_sequential::sort(__sample.begin(), __sample.end(), __lcomp);
- for (int __i = 0; __i < __m; __i++) //conceptual infinity
+ for (_SeqNumber __i = 0; __i < __m; __i++) //conceptual infinity
if (__n >= __ns[__i]) //__sequence too short, conceptual infinity
__sample.push_back(
std::make_pair(__S(__i)[0] /*__dummy element*/, __i));
_DifferenceType __localrank = __rank / __l;
- int __j;
+ _SeqNumber __j;
for (__j = 0;
__j < __localrank && ((__n + 1) <= __ns[__sample[__j].second]);
++__j)
@@ -227,9 +229,9 @@ namespace __gnu_parallel
{
__n /= 2;
- int __lmax_seq = -1; // to avoid warning
+ _SeqNumber __lmax_seq = -1; // to avoid warning
const _ValueType* __lmax = NULL; // impossible to avoid the warning?
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
{
if (__a[__i] > 0)
{
@@ -250,7 +252,7 @@ namespace __gnu_parallel
}
}
- int __i;
+ _SeqNumber __i;
for (__i = 0; __i < __m; __i++)
{
_DifferenceType __middle = (__b[__i] + __a[__i]) / 2;
@@ -263,7 +265,7 @@ namespace __gnu_parallel
}
_DifferenceType __leftsize = 0;
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
__leftsize += __a[__i] / (__n + 1);
_DifferenceType __skew = __rank / (__n + 1) - __leftsize;
@@ -271,18 +273,18 @@ namespace __gnu_parallel
if (__skew > 0)
{
// Move to the left, find smallest.
- std::priority_queue<std::pair<_ValueType, int>,
- std::vector<std::pair<_ValueType, int> >,
- _LexicographicReverse<_ValueType, int, _Compare> >
+ std::priority_queue<std::pair<_ValueType, _SeqNumber>,
+ std::vector<std::pair<_ValueType, _SeqNumber> >,
+ _LexicographicReverse<_ValueType, _SeqNumber, _Compare> >
__pq(__lrcomp);
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
if (__b[__i] < __ns[__i])
__pq.push(std::make_pair(__S(__i)[__b[__i]], __i));
for (; __skew != 0 && !__pq.empty(); --__skew)
{
- int __source = __pq.top().second;
+ _SeqNumber __source = __pq.top().second;
__pq.pop();
__a[__source]
@@ -297,17 +299,18 @@ namespace __gnu_parallel
else if (__skew < 0)
{
// Move to the right, find greatest.
- std::priority_queue<std::pair<_ValueType, int>,
- std::vector<std::pair<_ValueType, int> >,
- _Lexicographic<_ValueType, int, _Compare> > __pq(__lcomp);
+ std::priority_queue<std::pair<_ValueType, _SeqNumber>,
+ std::vector<std::pair<_ValueType, _SeqNumber> >,
+ _Lexicographic<_ValueType, _SeqNumber, _Compare> >
+ __pq(__lcomp);
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
if (__a[__i] > 0)
__pq.push(std::make_pair(__S(__i)[__a[__i] - 1], __i));
for (; __skew != 0; ++__skew)
{
- int __source = __pq.top().second;
+ _SeqNumber __source = __pq.top().second;
__pq.pop();
__a[__source] -= __n + 1;
@@ -331,7 +334,7 @@ namespace __gnu_parallel
// Maximum of left edge, minimum of right edge.
_ValueType* __maxleft = NULL;
_ValueType* __minright = NULL;
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
{
if (__a[__i] > 0)
{
@@ -357,8 +360,8 @@ namespace __gnu_parallel
}
}
- int __seq = 0;
- for (int __i = 0; __i < __m; __i++)
+ _SeqNumber __seq = 0;
+ for (_SeqNumber __i = 0; __i < __m; __i++)
__begin_offsets[__i] = __S(__i) + __a[__i];
delete[] __ns;
@@ -392,11 +395,13 @@ namespace __gnu_parallel
typedef typename std::iterator_traits<_RanSeqs>::value_type::first_type
_It;
+ typedef typename std::iterator_traits<_RanSeqs>::difference_type
+ _SeqNumber;
typedef typename std::iterator_traits<_It>::difference_type
_DifferenceType;
- _Lexicographic<_Tp, int, _Compare> __lcomp(__comp);
- _LexicographicReverse<_Tp, int, _Compare> __lrcomp(__comp);
+ _Lexicographic<_Tp, _SeqNumber, _Compare> __lcomp(__comp);
+ _LexicographicReverse<_Tp, _SeqNumber, _Compare> __lrcomp(__comp);
// Number of sequences, number of elements in total (possibly
// including padding).
@@ -404,7 +409,7 @@ namespace __gnu_parallel
_DifferenceType __nn = 0;
_DifferenceType __nmax, __n, __r;
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
__nn += std::distance(__begin_seqs[__i].first,
__begin_seqs[__i].second);
@@ -422,7 +427,7 @@ namespace __gnu_parallel
__ns[0] = std::distance(__begin_seqs[0].first, __begin_seqs[0].second);
__nmax = __ns[0];
- for (int __i = 0; __i < __m; ++__i)
+ for (_SeqNumber __i = 0; __i < __m; ++__i)
{
__ns[__i] = std::distance(__begin_seqs[__i].first,
__begin_seqs[__i].second);
@@ -435,7 +440,7 @@ namespace __gnu_parallel
// equality iff __nmax = 2^__k - 1
__l = __round_up_to_pow2(__r) - 1;
- for (int __i = 0; __i < __m; ++__i)
+ for (_SeqNumber __i = 0; __i < __m; ++__i)
{
__a[__i] = 0;
__b[__i] = __l;
@@ -448,23 +453,23 @@ namespace __gnu_parallel
#define __S(__i) (__begin_seqs[__i].first)
// Initial partition.
- std::vector<std::pair<_Tp, int> > __sample;
+ std::vector<std::pair<_Tp, _SeqNumber> > __sample;
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
if (__n < __ns[__i])
__sample.push_back(std::make_pair(__S(__i)[__n], __i));
__gnu_sequential::sort(__sample.begin(), __sample.end(),
__lcomp, sequential_tag());
// Conceptual infinity.
- for (int __i = 0; __i < __m; __i++)
+ for (_SeqNumber __i = 0; __i < __m; __i++)
if (__n >= __ns[__i])
__sample.push_back(
std::make_pair(__S(__i)[0] /*__dummy element*/, __i));
_DifferenceType __localrank = __rank / __l;
- int __j;
+ _SeqNumber __j;
for (__j = 0;
__j < __localrank && ((__n + 1) <= __ns[__sample[__j].second]);
++__j)
@@ -478,7 +483,7 @@ namespace __gnu_parallel
__n /= 2;
const _Tp* __lmax = NULL;
- for (int __i = 0; __i < __m; ++__i)
+ for (_SeqNumber __i = 0; __i < __m; ++__i)
{
if (__a[__i] > 0)
{
@@ -492,7 +497,7 @@ namespace __gnu_parallel
}
}
- int __i;
+ _SeqNumber __i;
for (__i = 0; __i < __m; __i++)
{
_DifferenceType __middle = (__b[__i] + __a[__i]) / 2;
@@ -504,7 +509,7 @@ namespace __gnu_parallel
}
_DifferenceType __leftsize = 0;
- for (int __i = 0; __i < __m; ++__i)
+ for (_SeqNumber __i = 0; __i < __m; ++__i)
__leftsize += __a[__i] / (__n + 1);
_DifferenceType __skew = __rank / (__n + 1) - __leftsize;
@@ -512,17 +517,18 @@ namespace __gnu_parallel
if (__skew > 0)
{
// Move to the left, find smallest.
- std::priority_queue<std::pair<_Tp, int>,
- std::vector<std::pair<_Tp, int> >,
- _LexicographicReverse<_Tp, int, _Compare> > __pq(__lrcomp);
+ std::priority_queue<std::pair<_Tp, _SeqNumber>,
+ std::vector<std::pair<_Tp, _SeqNumber> >,
+ _LexicographicReverse<_Tp, _SeqNumber, _Compare> >
+ __pq(__lrcomp);
- for (int __i = 0; __i < __m; ++__i)
+ for (_SeqNumber __i = 0; __i < __m; ++__i)
if (__b[__i] < __ns[__i])
__pq.push(std::make_pair(__S(__i)[__b[__i]], __i));
for (; __skew != 0 && !__pq.empty(); --__skew)
{
- int __source = __pq.top().second;
+ _SeqNumber __source = __pq.top().second;
__pq.pop();
__a[__source]
@@ -537,17 +543,17 @@ namespace __gnu_parallel
else if (__skew < 0)
{
// Move to the right, find greatest.
- std::priority_queue<std::pair<_Tp, int>,
- std::vector<std::pair<_Tp, int> >,
- _Lexicographic<_Tp, int, _Compare> > __pq(__lcomp);
+ std::priority_queue<std::pair<_Tp, _SeqNumber>,
+ std::vector<std::pair<_Tp, _SeqNumber> >,
+ _Lexicographic<_Tp, _SeqNumber, _Compare> > __pq(__lcomp);
- for (int __i = 0; __i < __m; ++__i)
+ for (_SeqNumber __i = 0; __i < __m; ++__i)
if (__a[__i] > 0)
__pq.push(std::make_pair(__S(__i)[__a[__i] - 1], __i));
for (; __skew != 0; ++__skew)
{
- int __source = __pq.top().second;
+ _SeqNumber __source = __pq.top().second;
__pq.pop();
__a[__source] -= __n + 1;
@@ -573,7 +579,7 @@ namespace __gnu_parallel
// Impossible to avoid the warning?
_Tp __maxleft, __minright;
- for (int __i = 0; __i < __m; ++__i)
+ for (_SeqNumber __i = 0; __i < __m; ++__i)
{
if (__a[__i] > 0)
{
@@ -617,7 +623,7 @@ namespace __gnu_parallel
// We have to calculate an offset.
__offset = 0;
- for (int __i = 0; __i < __m; ++__i)
+ for (_SeqNumber __i = 0; __i < __m; ++__i)
{
_DifferenceType lb
= std::lower_bound(__S(__i), __S(__i) + __ns[__i],
diff --git a/libstdc++-v3/include/parallel/multiway_merge.h b/libstdc++-v3/include/parallel/multiway_merge.h
index 4238a1c6923..f66a3e96683 100644
--- a/libstdc++-v3/include/parallel/multiway_merge.h
+++ b/libstdc++-v3/include/parallel/multiway_merge.h
@@ -108,7 +108,7 @@ namespace __gnu_parallel
/** @brief Compare two elements referenced by guarded iterators.
* @param __bi1 First iterator.
* @param __bi2 Second iterator.
- * @return @__c true if less. */
+ * @return @c true if less. */
friend bool
operator<(_GuardedIterator<_RAIter, _Compare>& __bi1,
_GuardedIterator<_RAIter, _Compare>& __bi2)
@@ -123,7 +123,7 @@ namespace __gnu_parallel
/** @brief Compare two elements referenced by guarded iterators.
* @param __bi1 First iterator.
* @param __bi2 Second iterator.
- * @return @__c True if less equal. */
+ * @return @c True if less equal. */
friend bool
operator<=(_GuardedIterator<_RAIter, _Compare>& __bi1,
_GuardedIterator<_RAIter, _Compare>& __bi2)
@@ -178,7 +178,7 @@ namespace __gnu_parallel
/** @brief Compare two elements referenced by unguarded iterators.
* @param __bi1 First iterator.
* @param __bi2 Second iterator.
- * @return @__c true if less. */
+ * @return @c true if less. */
friend bool
operator<(_UnguardedIterator<_RAIter, _Compare>& __bi1,
_UnguardedIterator<_RAIter, _Compare>& __bi2)
@@ -190,7 +190,7 @@ namespace __gnu_parallel
/** @brief Compare two elements referenced by unguarded iterators.
* @param __bi1 First iterator.
* @param __bi2 Second iterator.
- * @return @__c True if less equal. */
+ * @return @c True if less equal. */
friend bool
operator<=(_UnguardedIterator<_RAIter, _Compare>& __bi1,
_UnguardedIterator<_RAIter, _Compare>& __bi2)
@@ -490,26 +490,28 @@ namespace __gnu_parallel
typedef _DifferenceTp _DifferenceType;
typedef typename std::iterator_traits<_RAIterIterator>
+ ::difference_type _SeqNumber;
+ typedef typename std::iterator_traits<_RAIterIterator>
::value_type::first_type
_RAIter1;
typedef typename std::iterator_traits<_RAIter1>::value_type
_ValueType;
- int __k = static_cast<int>(__seqs_end - __seqs_begin);
+ _SeqNumber __k = static_cast<_SeqNumber>(__seqs_end - __seqs_begin);
_LT __lt(__k, __comp);
// Default value for potentially non-default-constructible types.
_ValueType* __arbitrary_element = NULL;
- for (int __t = 0; __t < __k; ++__t)
+ for (_SeqNumber __t = 0; __t < __k; ++__t)
{
if(__arbitrary_element == NULL
&& _GLIBCXX_PARALLEL_LENGTH(__seqs_begin[__t]) > 0)
__arbitrary_element = &(*__seqs_begin[__t].first);
}
- for (int __t = 0; __t < __k; ++__t)
+ for (_SeqNumber __t = 0; __t < __k; ++__t)
{
if (__seqs_begin[__t].first == __seqs_begin[__t].second)
__lt.__insert_start(*__arbitrary_element, __t, true);
@@ -519,7 +521,7 @@ namespace __gnu_parallel
__lt.__init();
- int __source;
+ _SeqNumber __source;
for (_DifferenceType __i = 0; __i < __length; ++__i)
{
@@ -575,16 +577,18 @@ namespace __gnu_parallel
typedef _DifferenceTp _DifferenceType;
typedef typename std::iterator_traits<_RAIterIterator>
+ ::difference_type _SeqNumber;
+ typedef typename std::iterator_traits<_RAIterIterator>
::value_type::first_type
_RAIter1;
typedef typename std::iterator_traits<_RAIter1>::value_type
_ValueType;
- int __k = __seqs_end - __seqs_begin;
+ _SeqNumber __k = __seqs_end - __seqs_begin;
_LT __lt(__k, __sentinel, __comp);
- for (int __t = 0; __t < __k; ++__t)
+ for (_SeqNumber __t = 0; __t < __k; ++__t)
{
#if _GLIBCXX_ASSERTIONS
_GLIBCXX_PARALLEL_ASSERT(__seqs_begin[__t].first
@@ -595,7 +599,7 @@ namespace __gnu_parallel
__lt.__init();
- int __source;
+ _SeqNumber __source;
#if _GLIBCXX_ASSERTIONS
_DifferenceType __i = 0;
@@ -862,8 +866,9 @@ namespace __gnu_parallel
typename _DifferenceTp,
typename _Compare>
struct __multiway_merge_k_variant_sentinel_switch<false, __stable,
- _RAIterIterator, _RAIter3,
- _DifferenceTp, _Compare>
+ _RAIterIterator,
+ _RAIter3, _DifferenceTp,
+ _Compare>
{
_RAIter3
operator()(_RAIterIterator __seqs_begin,
@@ -921,6 +926,8 @@ namespace __gnu_parallel
typedef _DifferenceTp _DifferenceType;
typedef typename std::iterator_traits<_RAIterIterator>
+ ::difference_type _SeqNumber;
+ typedef typename std::iterator_traits<_RAIterIterator>
::value_type::first_type
_RAIter1;
typedef typename std::iterator_traits<_RAIter1>::value_type
@@ -944,7 +951,7 @@ namespace __gnu_parallel
return __target;
_RAIter3 __return_target = __target;
- int __k = static_cast<int>(__seqs_end - __seqs_begin);
+ _SeqNumber __k = static_cast<_SeqNumber>(__seqs_end - __seqs_begin);
switch (__k)
{
@@ -1030,15 +1037,17 @@ namespace __gnu_parallel
std::vector<std::pair<_DifferenceType, _DifferenceType> > *__pieces)
{
typedef typename std::iterator_traits<_RAIterIterator>
+ ::difference_type _SeqNumber;
+ typedef typename std::iterator_traits<_RAIterIterator>
::value_type::first_type
_RAIter1;
typedef typename std::iterator_traits<_RAIter1>::value_type
_ValueType;
// __k sequences.
- int __k = static_cast<int>(__seqs_end - __seqs_begin);
+ _SeqNumber __k = static_cast<_SeqNumber>(__seqs_end - __seqs_begin);
- int __num_threads = omp_get_num_threads();
+ _ThreadIndex __num_threads = omp_get_num_threads();
_DifferenceType __num_samples =
__gnu_parallel::_Settings::get().merge_oversampling * __num_threads;
@@ -1046,7 +1055,7 @@ namespace __gnu_parallel
_ValueType* __samples = static_cast<_ValueType*>
(::operator new(sizeof(_ValueType) * __k * __num_samples));
// Sample.
- for (int __s = 0; __s < __k; ++__s)
+ for (_SeqNumber __s = 0; __s < __k; ++__s)
for (_DifferenceType __i = 0; __i < __num_samples; ++__i)
{
_DifferenceType sample_index = static_cast<_DifferenceType>
@@ -1062,9 +1071,9 @@ namespace __gnu_parallel
_SamplingSorter<__stable, _ValueType*, _Compare>()
(__samples, __samples + (__num_samples * __k), __comp);
- for (int __slab = 0; __slab < __num_threads; ++__slab)
+ for (_ThreadIndex __slab = 0; __slab < __num_threads; ++__slab)
// For each slab / processor.
- for (int __seq = 0; __seq < __k; ++__seq)
+ for (_SeqNumber __seq = 0; __seq < __k; ++__seq)
{
// For each sequence.
if (__slab > 0)
@@ -1108,15 +1117,17 @@ namespace __gnu_parallel
std::vector<std::pair<_DifferenceType, _DifferenceType> > *__pieces)
{
typedef typename std::iterator_traits<_RAIterIterator>
+ ::difference_type _SeqNumber;
+ typedef typename std::iterator_traits<_RAIterIterator>
::value_type::first_type
_RAIter1;
const bool __tight = (__total_length == __length);
// __k sequences.
- const int __k = static_cast<int>(__seqs_end - __seqs_begin);
+ const _SeqNumber __k = __seqs_end - __seqs_begin;
- const int __num_threads = omp_get_num_threads();
+ const _ThreadIndex __num_threads = omp_get_num_threads();
// (Settings::multiway_merge_splitting
// == __gnu_parallel::_Settings::EXACT).
@@ -1130,7 +1141,7 @@ namespace __gnu_parallel
new _DifferenceType[__num_threads + 1];
equally_split(__length, __num_threads, __borders);
- for (int __s = 0; __s < (__num_threads - 1); ++__s)
+ for (_ThreadIndex __s = 0; __s < (__num_threads - 1); ++__s)
{
__offsets[__s].resize(__k);
multiseq_partition(__se.begin(), __se.end(), __borders[__s + 1],
@@ -1148,10 +1159,10 @@ namespace __gnu_parallel
}
delete[] __borders;
- for (int __slab = 0; __slab < __num_threads; ++__slab)
+ for (_ThreadIndex __slab = 0; __slab < __num_threads; ++__slab)
{
// For each slab / processor.
- for (int __seq = 0; __seq < __k; ++__seq)
+ for (_SeqNumber __seq = 0; __seq < __k; ++__seq)
{
// For each sequence.
if (__slab == 0)
@@ -1218,6 +1229,8 @@ namespace __gnu_parallel
_GLIBCXX_CALL(__length)
typedef _DifferenceTp _DifferenceType;
+ typedef typename std::iterator_traits<_RAIterIterator>
+ ::difference_type _SeqNumber;
typedef typename std::iterator_traits<_RAIterIterator>
::value_type::first_type
_RAIter1;
@@ -1227,7 +1240,7 @@ namespace __gnu_parallel
// Leave only non-empty sequences.
typedef std::pair<_RAIter1, _RAIter1> seq_type;
seq_type* __ne_seqs = new seq_type[__seqs_end - __seqs_begin];
- int __k = 0;
+ _SeqNumber __k = 0;
_DifferenceType __total_length = 0;
for (_RAIterIterator __raii = __seqs_begin;
__raii != __seqs_end; ++__raii)
@@ -1263,7 +1276,7 @@ namespace __gnu_parallel
// Thread __t will have to merge pieces[__iam][0..__k - 1]
__pieces = new std::vector<
std::pair<_DifferenceType, _DifferenceType> >[__num_threads];
- for (int __s = 0; __s < __num_threads; ++__s)
+ for (_ThreadIndex __s = 0; __s < __num_threads; ++__s)
__pieces[__s].resize(__k);
_DifferenceType __num_samples =
@@ -1278,12 +1291,12 @@ namespace __gnu_parallel
_DifferenceType __target_position = 0;
- for (int __c = 0; __c < __k; ++__c)
+ for (_SeqNumber __c = 0; __c < __k; ++__c)
__target_position += __pieces[__iam][__c].first;
seq_type* __chunks = new seq_type[__k];
- for (int __s = 0; __s < __k; ++__s)
+ for (_SeqNumber __s = 0; __s < __k; ++__s)
__chunks[__s] = std::make_pair(__ne_seqs[__s].first
+ __pieces[__iam][__s].first,
__ne_seqs[__s].first
@@ -1724,7 +1737,7 @@ namespace __gnu_parallel
* @pre All input sequences must be sorted.
* @pre Target must provide enough space to merge out length elements or
* the number of elements in all sequences, whichever is smaller.
- * @pre For each @__c __i, @__c __seqs_begin[__i].second must be the end
+ * @pre For each @c __i, @c __seqs_begin[__i].second must be the end
* marker of the sequence, but also reference the one more __sentinel
* element.
*
diff --git a/libstdc++-v3/include/parallel/multiway_mergesort.h b/libstdc++-v3/include/parallel/multiway_mergesort.h
index 1f2c43db61f..85894719dc0 100644
--- a/libstdc++-v3/include/parallel/multiway_mergesort.h
+++ b/libstdc++-v3/include/parallel/multiway_mergesort.h
@@ -82,14 +82,14 @@ namespace __gnu_parallel
/** @brief Offsets to add to the found positions. */
_DifferenceType* _M_offsets;
- /** @brief Pieces of data to merge @__c [thread][__sequence] */
+ /** @brief Pieces of data to merge @c [thread][__sequence] */
std::vector<_Piece<_DifferenceType> >* _M_pieces;
};
/**
* @brief Select _M_samples from a sequence.
* @param __sd Pointer to algorithm data. _Result will be placed in
- * @__c __sd->_M_samples.
+ * @c __sd->_M_samples.
* @param __num_samples Number of _M_samples to select.
*/
template<typename _RAIter, typename _DifferenceTp>
@@ -154,7 +154,7 @@ namespace __gnu_parallel
__sd->_M_starts[__iam + 1], __offsets.begin(),
__comp);
- for (int __seq = 0; __seq < __sd->_M_num_threads; __seq++)
+ for (_ThreadIndex __seq = 0; __seq < __sd->_M_num_threads; __seq++)
{
// for each sequence
if (__iam < (__sd->_M_num_threads - 1))
@@ -361,7 +361,7 @@ namespace __gnu_parallel
_SeqVector;
_SeqVector __seqs(__sd->_M_num_threads);
- for (int __s = 0; __s < __sd->_M_num_threads; ++__s)
+ for (_ThreadIndex __s = 0; __s < __sd->_M_num_threads; ++__s)
{
__seqs[__s] =
std::make_pair(__sd->_M_temporary[__s]
@@ -439,14 +439,14 @@ namespace __gnu_parallel
__sd._M_offsets = new _DifferenceType[__num_threads - 1];
__sd._M_pieces
= new std::vector<_Piece<_DifferenceType> >[__num_threads];
- for (int __s = 0; __s < __num_threads; ++__s)
+ for (_ThreadIndex __s = 0; __s < __num_threads; ++__s)
__sd._M_pieces[__s].resize(__num_threads);
__starts = __sd._M_starts = new _DifferenceType[__num_threads + 1];
_DifferenceType __chunk_length = __n / __num_threads;
_DifferenceType __split = __n % __num_threads;
_DifferenceType __pos = 0;
- for (int __i = 0; __i < __num_threads; ++__i)
+ for (_ThreadIndex __i = 0; __i < __num_threads; ++__i)
{
__starts[__i] = __pos;
__pos += ((__i < __split)
diff --git a/libstdc++-v3/include/parallel/partial_sum.h b/libstdc++-v3/include/parallel/partial_sum.h
index 02404203f4e..487fd6dd666 100644
--- a/libstdc++-v3/include/parallel/partial_sum.h
+++ b/libstdc++-v3/include/parallel/partial_sum.h
@@ -132,7 +132,7 @@ namespace __gnu_parallel
/ ((double)__num_threads + __s.partial_sum_dilation)),
__borderstart = __n - __num_threads * __chunk_length;
__borders[0] = 0;
- for (int __i = 1; __i < (__num_threads + 1); ++__i)
+ for (_ThreadIndex __i = 1; __i < (__num_threads + 1); ++__i)
{
__borders[__i] = __borderstart;
__borderstart += __chunk_length;
diff --git a/libstdc++-v3/include/parallel/partition.h b/libstdc++-v3/include/parallel/partition.h
index 86723c51270..cfc2fd3737e 100644
--- a/libstdc++-v3/include/parallel/partition.h
+++ b/libstdc++-v3/include/parallel/partition.h
@@ -103,7 +103,7 @@ namespace __gnu_parallel
_DifferenceType __num_chunks = ((__right - __left + 1)
/ __chunk_size);
- for (int __r = 0; __r < __num_threads; ++__r)
+ for (_ThreadIndex __r = 0; __r < __num_threads; ++__r)
{
__reserved_left[__r] = false;
__reserved_right[__r] = false;
@@ -222,7 +222,7 @@ namespace __gnu_parallel
// Find spot and swap.
_DifferenceType __swapstart = -1;
omp_set_lock(&__result_lock);
- for (int __r = 0; __r < __leftover_left; ++__r)
+ for (_DifferenceType __r = 0; __r < __leftover_left; ++__r)
if (!__reserved_left[__r])
{
__reserved_left[__r] = true;
@@ -247,7 +247,7 @@ namespace __gnu_parallel
// Find spot and swap
_DifferenceType __swapstart = -1;
omp_set_lock(&__result_lock);
- for (int __r = 0; __r < __leftover_right; ++__r)
+ for (_DifferenceType __r = 0; __r < __leftover_right; ++__r)
if (!__reserved_right[__r])
{
__reserved_right[__r] = true;
@@ -269,9 +269,9 @@ namespace __gnu_parallel
# pragma omp single
{
- for (int __r = 0; __r < __leftover_left; ++__r)
+ for (_DifferenceType __r = 0; __r < __leftover_left; ++__r)
_GLIBCXX_PARALLEL_ASSERT(__reserved_left[__r]);
- for (int __r = 0; __r < __leftover_right; ++__r)
+ for (_DifferenceType __r = 0; __r < __leftover_right; ++__r)
_GLIBCXX_PARALLEL_ASSERT(__reserved_right[__r]);
}
diff --git a/libstdc++-v3/include/parallel/queue.h b/libstdc++-v3/include/parallel/queue.h
index ff5deb09383..28c78600860 100644
--- a/libstdc++-v3/include/parallel/queue.h
+++ b/libstdc++-v3/include/parallel/queue.h
@@ -45,7 +45,7 @@ namespace __gnu_parallel
* atomic access. push_front() and pop_front() must not be called
* concurrently to each other, while pop_back() can be called
* concurrently at all times.
- * @__c empty(), @__c size(), and @__c top() are intentionally not provided.
+ * @c empty(), @c size(), and @c top() are intentionally not provided.
* Calling them would not make sense in a concurrent setting.
* @param _Tp Contained element type. */
template<typename _Tp>
diff --git a/libstdc++-v3/include/parallel/random_number.h b/libstdc++-v3/include/parallel/random_number.h
index 4df91df0583..c39f15e1298 100644
--- a/libstdc++-v3/include/parallel/random_number.h
+++ b/libstdc++-v3/include/parallel/random_number.h
@@ -81,7 +81,7 @@ namespace __gnu_parallel
/** @brief Constructor.
* @param __seed Random __seed.
* @param _M_supremum Generate integer random numbers in the
- * interval @__c [0,_M_supremum). */
+ * interval @c [0,_M_supremum). */
_RandomNumber(uint32_t __seed, uint64_t _M_supremum = 0x100000000ULL)
: _M_mt(__seed), _M_supremum(_M_supremum),
_M_rand_sup(1ULL << std::numeric_limits<uint32_t>::digits),
@@ -95,7 +95,7 @@ namespace __gnu_parallel
{ return __scale_down(_M_mt(), _M_supremum, _M_supremum_reciprocal); }
/** @brief Generate unsigned random 32-bit integer in the
- interval @__c [0,local_supremum). */
+ interval @c [0,local_supremum). */
uint32_t
operator()(uint64_t local_supremum)
{
diff --git a/libstdc++-v3/include/parallel/random_shuffle.h b/libstdc++-v3/include/parallel/random_shuffle.h
index 137414f20f9..3082ea8dbc0 100644
--- a/libstdc++-v3/include/parallel/random_shuffle.h
+++ b/libstdc++-v3/include/parallel/random_shuffle.h
@@ -106,7 +106,7 @@ namespace __gnu_parallel
_DRandomShufflingGlobalData<_RAIter>* _M_sd;
};
- /** @brief Generate a random number in @__c [0,2^__logp).
+ /** @brief Generate a random number in @c [0,2^__logp).
* @param __logp Logarithm (basis 2) of the upper range __bound.
* @param __rng Random number generator to use.
*/
diff --git a/libstdc++-v3/include/parallel/set_operations.h b/libstdc++-v3/include/parallel/set_operations.h
index 6dd63c9b128..346fb97775d 100644
--- a/libstdc++-v3/include/parallel/set_operations.h
+++ b/libstdc++-v3/include/parallel/set_operations.h
@@ -444,7 +444,7 @@ namespace __gnu_parallel
if (__iam == 0)
{
// Do the last block.
- for (int __i = 0; __i < __num_threads; ++__i)
+ for (_ThreadIndex __i = 0; __i < __num_threads; ++__i)
__r += __lengths[__i];
__block_begin = __block_begins[__num_threads];
@@ -457,7 +457,7 @@ namespace __gnu_parallel
}
else
{
- for (int __i = 0; __i < __iam; ++__i)
+ for (_ThreadIndex __i = 0; __i < __iam; ++__i)
__r += __lengths[ __i ];
// Reset begins for copy pass.
diff --git a/libstdc++-v3/include/parallel/unique_copy.h b/libstdc++-v3/include/parallel/unique_copy.h
index 1ae5a12316d..72c84a9ccf2 100644
--- a/libstdc++-v3/include/parallel/unique_copy.h
+++ b/libstdc++-v3/include/parallel/unique_copy.h
@@ -129,7 +129,7 @@ namespace __gnu_parallel
if (__iam == 0)
{
- for (int __t = 0; __t < __num_threads; ++__t)
+ for (_ThreadIndex __t = 0; __t < __num_threads; ++__t)
__begin_output += __counter[__t];
__i = 0;
@@ -154,7 +154,7 @@ namespace __gnu_parallel
}
else
{
- for (int __t = 0; __t < __iam; __t++)
+ for (_ThreadIndex __t = 0; __t < __iam; __t++)
__begin_output += __counter[__t];
_OutputIterator __iter_out = __result + __begin_output;
@@ -168,7 +168,7 @@ namespace __gnu_parallel
}
_DifferenceType __end_output = 0;
- for (int __t = 0; __t < __num_threads + 1; __t++)
+ for (_ThreadIndex __t = 0; __t < __num_threads + 1; __t++)
__end_output += __counter[__t];
delete[] __borders;
diff --git a/libstdc++-v3/include/parallel/workstealing.h b/libstdc++-v3/include/parallel/workstealing.h
index 4ac155d923f..9e0db3a9584 100644
--- a/libstdc++-v3/include/parallel/workstealing.h
+++ b/libstdc++-v3/include/parallel/workstealing.h
@@ -66,7 +66,7 @@ namespace __gnu_parallel
* Changed by owning thread only. */
_GLIBCXX_JOB_VOLATILE _DifferenceType _M_last;
- /** @brief Number of elements, i.e. @__c _M_last-_M_first+1.
+ /** @brief Number of elements, i.e. @c _M_last-_M_first+1.
*
* Changed by owning thread only. */
_GLIBCXX_JOB_VOLATILE _DifferenceType _M_load;
diff --git a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
index 2192879325e..bfbafc14f90 100644
--- a/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
+++ b/libstdc++-v3/include/profile/impl/profiler_hashtable_size.h
@@ -28,7 +28,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/** @file profile/impl/profiler_hashtable_size.cc
+/** @file profile/impl/profiler_hashtable_size.h
* @brief Collection of hashtable size traces.
*/
diff --git a/libstdc++-v3/include/profile/impl/profiler_state.h b/libstdc++-v3/include/profile/impl/profiler_state.h
index 64c10db616c..03065715463 100644
--- a/libstdc++-v3/include/profile/impl/profiler_state.h
+++ b/libstdc++-v3/include/profile/impl/profiler_state.h
@@ -28,7 +28,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/** @file profile/impl/profiler_state.cc
+/** @file profile/impl/profiler_state.h
* @brief Global profiler state.
*/
diff --git a/libstdc++-v3/include/std/iosfwd b/libstdc++-v3/include/std/iosfwd
index 9bba0ab6bfc..b3405d7f1d5 100644
--- a/libstdc++-v3/include/std/iosfwd
+++ b/libstdc++-v3/include/std/iosfwd
@@ -43,6 +43,36 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
+ /**
+ * @defgroup io I/O
+ *
+ * Nearly all of the I/O classes are parameterized on the type of
+ * characters they read and write. (The major exception is ios_base at
+ * the top of the hierarchy.) This is a change from pre-Standard
+ * streams, which were not templates.
+ *
+ * For ease of use and compatibility, all of the basic_* I/O-related
+ * classes are given typedef names for both of the builtin character
+ * widths (wide and narrow). The typedefs are the same as the
+ * pre-Standard names, for example:
+ *
+ * @code
+ * typedef basic_ifstream<char> ifstream;
+ * @endcode
+ *
+ * Because properly forward-declaring these classes can be difficult, you
+ * should not do it yourself. Instead, include the &lt;iosfwd&gt;
+ * header, which contains only declarations of all the I/O classes as
+ * well as the typedefs. Trying to forward-declare the typedefs
+ * themselves (e.g., "class ostream;") is not valid ISO C++.
+ *
+ * For more specific declarations, see
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
+ *
+ * @{
+ */
+ class ios_base;
+
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ios;
@@ -94,36 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// Not included. (??? Apparently no LWG number?)
- class ios_base;
- /**
- * @defgroup io I/O
- *
- * Nearly all of the I/O classes are parameterized on the type of
- * characters they read and write. (The major exception is ios_base at
- * the top of the hierarchy.) This is a change from pre-Standard
- * streams, which were not templates.
- *
- * For ease of use and compatibility, all of the basic_* I/O-related
- * classes are given typedef names for both of the builtin character
- * widths (wide and narrow). The typedefs are the same as the
- * pre-Standard names, for example:
- *
- * @code
- * typedef basic_ifstream<char> ifstream;
- * @endcode
- *
- * Because properly forward-declaring these classes can be difficult, you
- * should not do it yourself. Instead, include the &lt;iosfwd&gt;
- * header, which contains only declarations of all the I/O classes as
- * well as the typedefs. Trying to forward-declare the typedefs
- * themselves (e.g., "class ostream;") is not valid ISO C++.
- *
- * For more specific declarations, see
- * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
- *
- * @{
- */
typedef basic_ios<char> ios; ///< @isiosfwd
typedef basic_streambuf<char> streambuf; ///< @isiosfwd
typedef basic_istream<char> istream; ///< @isiosfwd
diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits
index 41bf806d5eb..1f3f078d0f0 100644
--- a/libstdc++-v3/include/std/limits
+++ b/libstdc++-v3/include/std/limits
@@ -203,9 +203,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Is this supposed to be "if the type is integral"?
*/
static const bool is_integer = false;
- /** True if the type uses an exact representation. "All integer types are
+ /** True if the type uses an exact representation. 'All integer types are
exact, but not all exact types are integer. For example, rational and
- fixed-exponent representations are exact but not integer."
+ fixed-exponent representations are exact but not integer.'
[18.2.1.2]/15 */
static const bool is_exact = false;
/** For integer types, specifies the base of the representation. For
@@ -229,23 +229,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/** True if the type has a representation for positive infinity. */
static const bool has_infinity = false;
/** True if the type has a representation for a quiet (non-signaling)
- "Not a Number." */
+ 'Not a Number.' */
static const bool has_quiet_NaN = false;
/** True if the type has a representation for a signaling
- "Not a Number." */
+ 'Not a Number.' */
static const bool has_signaling_NaN = false;
/** See std::float_denorm_style for more information. */
static const float_denorm_style has_denorm = denorm_absent;
- /** "True if loss of accuracy is detected as a denormalization loss,
- rather than as an inexact result." [18.2.1.2]/42 */
+ /** 'True if loss of accuracy is detected as a denormalization loss,
+ rather than as an inexact result.' [18.2.1.2]/42 */
static const bool has_denorm_loss = false;
/** True if-and-only-if the type adheres to the IEC 559 standard, also
known as IEEE 754. (Only makes sense for floating point types.) */
static const bool is_iec559 = false;
- /** "True if the set of values representable by the type is finite. All
+ /** 'True if the set of values representable by the type is finite. All
built-in types are bounded, this member would be false for arbitrary
- precision types." [18.2.1.2]/54 */
+ precision types.' [18.2.1.2]/54 */
static const bool is_bounded = false;
/** True if the type is @e modulo, that is, if it is possible to add two
positive numbers and have a result that wraps around to a third number
diff --git a/libstdc++-v3/include/std/memory b/libstdc++-v3/include/std/memory
index 9defd487c60..3e7d4e8466b 100644
--- a/libstdc++-v3/include/std/memory
+++ b/libstdc++-v3/include/std/memory
@@ -46,6 +46,20 @@
#pragma GCC system_header
+/**
+ * @defgroup memory Memory
+ * @ingroup utilities
+ *
+ * Components for memory allocation, deallocation, and management.
+ */
+
+/**
+ * @defgroup pointer_abstractions Pointer Abstractions
+ * @ingroup memory
+ *
+ * Smart pointers, etc.
+ */
+
#include <bits/stl_algobase.h>
#include <bits/allocator.h>
#include <bits/stl_construct.h>
@@ -64,37 +78,29 @@
# include <ext/concurrence.h>
# include <bits/functexcept.h>
# include <bits/stl_function.h> // std::less
-# include <bits/unique_ptr.h>
-# include <debug/debug.h>
# include <type_traits>
# include <functional>
+# include <debug/debug.h>
+# include <bits/unique_ptr.h>
# if _GLIBCXX_DEPRECATED
# include <backward/auto_ptr.h>
# endif
# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
# include <tr1_impl/boost_sp_counted_base.h>
-# include <bits/shared_ptr.h>
# else
# define _GLIBCXX_INCLUDE_AS_CXX0X
# define _GLIBCXX_BEGIN_NAMESPACE_TR1
# define _GLIBCXX_END_NAMESPACE_TR1
# define _GLIBCXX_TR1
# include <tr1_impl/boost_sp_counted_base.h>
-# include <bits/shared_ptr.h>
# undef _GLIBCXX_TR1
# undef _GLIBCXX_END_NAMESPACE_TR1
# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
# undef _GLIBCXX_INCLUDE_AS_CXX0X
# endif
+# include <bits/shared_ptr.h>
#else
# include <backward/auto_ptr.h>
#endif
-/**
- * @defgroup memory Memory
- * @ingroup utilities
- *
- * Components for memory allocation, deallocation, and management.
- */
-
#endif /* _GLIBCXX_MEMORY */
diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream
index f5e3191c4cd..0ebf506d0c7 100644
--- a/libstdc++-v3/include/std/sstream
+++ b/libstdc++-v3/include/std/sstream
@@ -112,9 +112,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief Copying out the string buffer.
* @return A copy of one of the underlying sequences.
*
- * "If the buffer is only created in input mode, the underlying
+ * 'If the buffer is only created in input mode, the underlying
* character sequence is equal to the input sequence; otherwise, it
- * is equal to the output sequence." [27.7.1.2]/1
+ * is equal to the output sequence.' [27.7.1.2]/1
*/
__string_type
str() const
diff --git a/libstdc++-v3/include/std/streambuf b/libstdc++-v3/include/std/streambuf
index 790be0ec4d4..7d6b8c789cb 100644
--- a/libstdc++-v3/include/std/streambuf
+++ b/libstdc++-v3/include/std/streambuf
@@ -341,7 +341,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return The previous character, if possible.
*
* Similar to sungetc(), but @a c is pushed onto the stream instead
- * of "the previous character". If successful, the next character
+ * of 'the previous character.' If successful, the next character
* fetched from the input stream will be @a c.
*/
int_type
@@ -366,8 +366,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* If a putback position is available, this function decrements the
* input pointer and returns that character. Otherwise, calls and
- * returns pbackfail(). The effect is to "unget" the last character
- * "gotten".
+ * returns pbackfail(). The effect is to 'unget' the last character
+ * 'gotten.'
*/
int_type
sungetc()
@@ -541,10 +541,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param loc A new locale.
*
* Translations done during I/O which depend on the current locale
- * are changed by this call. The standard adds, "Between invocations
+ * are changed by this call. The standard adds, 'Between invocations
* of this function a class derived from streambuf can safely cache
* results of calls to locale functions and to members of facets
- * so obtained."
+ * so obtained.'
*
* @note Base class version does nothing.
*/
@@ -608,18 +608,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return An estimate of the number of characters available in the
* input sequence, or -1.
*
- * "If it returns a positive value, then successive calls to
+ * 'If it returns a positive value, then successive calls to
* @c underflow() will not return @c traits::eof() until at least that
* number of characters have been supplied. If @c showmanyc()
- * returns -1, then calls to @c underflow() or @c uflow() will fail."
+ * returns -1, then calls to @c underflow() or @c uflow() will fail.'
* [27.5.2.4.3]/1
*
* @note Base class version does nothing, returns zero.
- * @note The standard adds that "the intention is not only that the
+ * @note The standard adds that 'the intention is not only that the
* calls [to underflow or uflow] will not return @c eof() but
- * that they will return "immediately".
- * @note The standard adds that "the morphemes of @c showmanyc are
- * "es-how-many-see", not "show-manic".
+ * that they will return immediately.'
+ * @note The standard adds that 'the morphemes of @c showmanyc are
+ * 'es-how-many-see', not 'show-manic'.'
*/
virtual streamsize
showmanyc() { return 0; }
@@ -646,7 +646,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* Informally, this function is called when the input buffer is
* exhausted (or does not exist, as buffering need not actually be
- * done). If a buffer exists, it is "refilled". In either case, the
+ * done). If a buffer exists, it is 'refilled'. In either case, the
* next available character is returned, or @c traits::eof() to
* indicate a null pending sequence.
*
@@ -690,7 +690,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Tries to back up the input sequence.
* @param c The character to be inserted back into the sequence.
- * @return eof() on failure, "some other value" on success
+ * @return eof() on failure, 'some other value' on success
* @post The constraints of @c gptr(), @c eback(), and @c pptr()
* are the same as for @c underflow().
*
@@ -726,7 +726,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* Informally, this function is called when the output buffer is full
* (or does not exist, as buffering need not actually be done). If a
- * buffer exists, it is "consumed", with "some effect" on the
+ * buffer exists, it is 'consumed', with 'some effect' on the
* controlled sequence. (Typically, the buffer is written out to the
* sequence verbatim.) In either case, the character @a c is also
* written out, if @a c is not @c eof().
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 2824638354a..788edf66cff 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -57,7 +57,8 @@
namespace std
{
- /** @addtogroup metaprogramming
+ /**
+ * @addtogroup metaprogramming
* @{
*/
@@ -154,7 +155,7 @@ namespace std
template<typename _Tp>
struct __is_signed_helper<_Tp, true, false>
- : public integral_constant<bool, _Tp(-1) < _Tp(0)>
+ : public integral_constant<bool, static_cast<bool>(_Tp(-1) < _Tp(0))>
{ };
/// is_signed
diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility
index 1a6d0b1b6b5..c3826eaca6b 100644
--- a/libstdc++-v3/include/std/utility
+++ b/libstdc++-v3/include/std/utility
@@ -58,6 +58,14 @@
#pragma GCC system_header
+/**
+ * @defgroup utilities Utilities
+ *
+ * Components deemed generally useful. Includes pair, tuple,
+ * forward/move helpers, ratio, function object, metaprogramming and
+ * type traits, time, date, and memory functions.
+ */
+
#include <bits/c++config.h>
#include <bits/stl_relops.h>
#include <bits/stl_pair.h>
@@ -83,12 +91,4 @@
# include <initializer_list>
#endif
-/**
- * @defgroup utilities Utilities
- *
- * Components deemed generally useful. Includes pair, tuple,
- * forward/move helpers, ratio, function object, metaprogramming and
- * type traits, time, date, and memory functions.
- */
-
#endif /* _GLIBCXX_UTILITY */
diff --git a/libstdc++-v3/include/tr1/shared_ptr.h b/libstdc++-v3/include/tr1/shared_ptr.h
index 0afce01557b..ba2cacae4ed 100644
--- a/libstdc++-v3/include/tr1/shared_ptr.h
+++ b/libstdc++-v3/include/tr1/shared_ptr.h
@@ -57,16 +57,12 @@ namespace std
{
namespace tr1
{
-
template<typename _Ptr, typename _Deleter, _Lock_policy _Lp>
class _Sp_counted_base_impl
: public _Sp_counted_base<_Lp>
{
public:
- /**
- * @brief
- * @pre __d(__p) must not throw.
- */
+ // Precondition: __d(__p) must not throw.
_Sp_counted_base_impl(_Ptr __p, _Deleter __d)
: _M_ptr(__p), _M_del(__d) { }
@@ -346,31 +342,19 @@ namespace tr1
struct __const_cast_tag { };
struct __dynamic_cast_tag { };
- /**
- * @class __shared_ptr
- *
- * A smart pointer with reference-counted copy semantics.
- * The object pointed to is deleted when the last shared_ptr pointing to
- * it is destroyed or reset.
- */
+ // A smart pointer with reference-counted copy semantics. The
+ // object pointed to is deleted when the last shared_ptr pointing to
+ // it is destroyed or reset.
template<typename _Tp, _Lock_policy _Lp>
class __shared_ptr
{
public:
typedef _Tp element_type;
- /** @brief Construct an empty %__shared_ptr.
- * @post use_count()==0 && get()==0
- */
__shared_ptr()
: _M_ptr(0), _M_refcount() // never throws
{ }
- /** @brief Construct a %__shared_ptr that owns the pointer @a __p.
- * @param __p A pointer that is convertible to element_type*.
- * @post use_count() == 1 && get() == __p
- * @throw std::bad_alloc, in which case @c delete @a __p is called.
- */
template<typename _Tp1>
explicit
__shared_ptr(_Tp1* __p)
@@ -381,19 +365,6 @@ namespace tr1
__enable_shared_from_this_helper(_M_refcount, __p, __p);
}
- //
- // Requirements: _Deleter's copy constructor and destructor must
- // not throw
- //
- // __shared_ptr will release __p by calling __d(__p)
- //
- /** @brief Construct a %__shared_ptr that owns the pointer @a __p
- * and the deleter @a __d.
- * @param __p A pointer.
- * @param __d A deleter.
- * @post use_count() == 1 && get() == __p
- * @throw std::bad_alloc, in which case @a __d(__p) is called.
- */
template<typename _Tp1, typename _Deleter>
__shared_ptr(_Tp1* __p, _Deleter __d)
: _M_ptr(__p), _M_refcount(__p, __d)
@@ -405,24 +376,11 @@ namespace tr1
// generated copy constructor, assignment, destructor are fine.
- /** @brief If @a __r is empty, constructs an empty %__shared_ptr;
- * otherwise construct a %__shared_ptr that shares ownership
- * with @a __r.
- * @param __r A %__shared_ptr.
- * @post get() == __r.get() && use_count() == __r.use_count()
- */
template<typename _Tp1>
__shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
: _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
{ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
- /** @brief Constructs a %__shared_ptr that shares ownership with @a __r
- * and stores a copy of the pointer stored in @a __r.
- * @param __r A weak_ptr.
- * @post use_count() == __r.use_count()
- * @throw bad_weak_ptr when __r.expired(),
- * in which case the constructor has no effect.
- */
template<typename _Tp1>
explicit
__shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
@@ -435,9 +393,7 @@ namespace tr1
}
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
- /**
- * @post use_count() == 1 and __r.get() == 0
- */
+ // Postcondition: use_count() == 1 and __r.get() == 0
template<typename _Tp1>
explicit
__shared_ptr(std::auto_ptr<_Tp1>& __r)
@@ -595,30 +551,30 @@ namespace tr1
{ __a.swap(__b); }
// 2.2.3.9 shared_ptr casts
- /** @warning The seemingly equivalent
- * <code>shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))</code>
- * will eventually result in undefined behaviour,
- * attempting to delete the same object twice.
+ /* The seemingly equivalent
+ * shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))
+ * will eventually result in undefined behaviour,
+ * attempting to delete the same object twice.
*/
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
inline __shared_ptr<_Tp, _Lp>
static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
{ return __shared_ptr<_Tp, _Lp>(__r, __static_cast_tag()); }
- /** @warning The seemingly equivalent
- * <code>shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))</code>
- * will eventually result in undefined behaviour,
- * attempting to delete the same object twice.
+ /* The seemingly equivalent
+ * shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))
+ * will eventually result in undefined behaviour,
+ * attempting to delete the same object twice.
*/
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
inline __shared_ptr<_Tp, _Lp>
const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
{ return __shared_ptr<_Tp, _Lp>(__r, __const_cast_tag()); }
- /** @warning The seemingly equivalent
- * <code>shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))</code>
- * will eventually result in undefined behaviour,
- * attempting to delete the same object twice.
+ /* The seemingly equivalent
+ * shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))
+ * will eventually result in undefined behaviour,
+ * attempting to delete the same object twice.
*/
template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
inline __shared_ptr<_Tp, _Lp>
@@ -825,7 +781,6 @@ namespace tr1
};
- /// shared_ptr
// The actual shared_ptr, with forwarding constructors and
// assignment operators.
template<typename _Tp>
@@ -914,7 +869,6 @@ namespace tr1
{ return shared_ptr<_Tp>(__r, __dynamic_cast_tag()); }
- /// weak_ptr
// The actual weak_ptr, with forwarding constructors and
// assignment operators.
template<typename _Tp>
@@ -971,7 +925,6 @@ namespace tr1
}
};
- /// enable_shared_from_this
template<typename _Tp>
class enable_shared_from_this
{
@@ -1013,7 +966,6 @@ namespace tr1
mutable weak_ptr<_Tp> _M_weak_this;
};
-
}
}
diff --git a/libstdc++-v3/include/tr1_impl/boost_sp_counted_base.h b/libstdc++-v3/include/tr1_impl/boost_sp_counted_base.h
index 48e601f2171..56030856dca 100644
--- a/libstdc++-v3/include/tr1_impl/boost_sp_counted_base.h
+++ b/libstdc++-v3/include/tr1_impl/boost_sp_counted_base.h
@@ -51,6 +51,10 @@ namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_TR1
+ /**
+ * @brief Exception possibly thrown by @c shared_ptr.
+ * @ingroup exceptions
+ */
class bad_weak_ptr : public std::exception
{
public:
diff --git a/libstdc++-v3/include/tr1_impl/regex b/libstdc++-v3/include/tr1_impl/regex
index 6f76a981419..8df62c212cc 100644
--- a/libstdc++-v3/include/tr1_impl/regex
+++ b/libstdc++-v3/include/tr1_impl/regex
@@ -135,9 +135,9 @@ namespace regex_constants
* Specifies that the grammar recognized by the regular expression engine is
* that used by POSIX utility awk in IEEE Std 1003.1-2001. This option is
* identical to syntax_option_type extended, except that C-style escape
- * sequences are supported. These sequences are, explicitly, "\\", "\a",
- * "\b", "\f", "\n", "\r", "\t" , "\v", "\"", "'",
- * and "\ddd" (where ddd is one, two, or three octal digits).
+ * sequences are supported. These sequences are, explicitly, '\\', '\a',
+ * '\b', '\f', '\n', '\r', '\t' , '\v', '\'', ''',
+ * and '\ddd' (where ddd is one, two, or three octal digits).
*/
static const syntax_option_type awk = 1 << _S_awk;
@@ -202,26 +202,26 @@ namespace regex_constants
/**
* The first character in the sequence [first, last) is treated as though it
- * is not at the beginning of a line, so the character "^" in the regular
+ * is not at the beginning of a line, so the character '^' in the regular
* expression shall not match [first, first).
*/
static const match_flag_type match_not_bol = 1 << _S_not_bol;
/**
* The last character in the sequence [first, last) is treated as though it
- * is not at the end of a line, so the character "$" in the regular
+ * is not at the end of a line, so the character '$' in the regular
* expression shall not match [last, last).
*/
static const match_flag_type match_not_eol = 1 << _S_not_eol;
/**
- * The expression "\b" is not matched against the sub-sequence
+ * The expression '\b' is not matched against the sub-sequence
* [first,first).
*/
static const match_flag_type match_not_bow = 1 << _S_not_bow;
/**
- * The expression "\b" should not be matched against the sub-sequence
+ * The expression '\b' should not be matched against the sub-sequence
* [last,last).
*/
static const match_flag_type match_not_eow = 1 << _S_not_eow;
@@ -363,7 +363,7 @@ namespace regex_constants
static const error_type error_space(_S_error_space);
/**
- * One of "*?+{" was not preceded by a valid regular expression.
+ * One of '*?+{' was not preceded by a valid regular expression.
*/
static const error_type error_badrepeat(_S_error_badrepeat);
@@ -2532,7 +2532,7 @@ namespace regex_constants
// [7.12.2] Class template regex_token_iterator
/**
- * Iterates over submatches in a range (or "splits" a text string).
+ * Iterates over submatches in a range (or 'splits' a text string).
*
* The purpose of this iterator is to enumerate all, or all specified,
* matches of a regular expression within a text range. The dereferenced
diff --git a/libstdc++-v3/include/tr1_impl/type_traits b/libstdc++-v3/include/tr1_impl/type_traits
index 75b85ea2f82..47f5e8f7e60 100644
--- a/libstdc++-v3/include/tr1_impl/type_traits
+++ b/libstdc++-v3/include/tr1_impl/type_traits
@@ -497,5 +497,6 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
#undef _DEFINE_SPEC
// @} group metaprogramming
+
_GLIBCXX_END_NAMESPACE_TR1
}
diff --git a/libstdc++-v3/libsupc++/cxxabi.h b/libstdc++-v3/libsupc++/cxxabi.h
index 834e434e1e1..e49b0f4e6db 100644
--- a/libstdc++-v3/libsupc++/cxxabi.h
+++ b/libstdc++-v3/libsupc++/cxxabi.h
@@ -100,7 +100,7 @@ namespace __cxxabiv1
void
__cxa_vec_cleanup(void* __array_address, size_t __element_count,
- size_t __element_size, __cxa_cdtor_type destructor) _GLIBCXX_NOTHROW;
+ size_t __s, __cxa_cdtor_type destructor) _GLIBCXX_NOTHROW;
// Destruct and release array.
void
@@ -582,7 +582,7 @@ namespace __cxxabiv1
/** @namespace abi
* @brief The cross-vendor C++ Application Binary Interface. A
* namespace alias to __cxxabiv1, but user programs should use the
- * alias `abi'.
+ * alias 'abi'.
*
* A brief overview of an ABI is given in the libstdc++ FAQ, question
* 5.8 (you may have a copy of the FAQ locally, or you can view the online
@@ -594,13 +594,34 @@ namespace __cxxabiv1
* along with the current specification.
*
* For users of GCC greater than or equal to 3.x, entry points are
- * available in <cxxabi.h>, which notes, <em>"It is not normally
+ * available in <cxxabi.h>, which notes, <em>'It is not normally
* necessary for user programs to include this header, or use the
* entry points directly. However, this header is available should
- * that be needed."</em>
+ * that be needed.'</em>
*/
namespace abi = __cxxabiv1;
+namespace __gnu_cxx
+{
+ /**
+ * @brief Exception thrown by __cxa_guard_acquire.
+ * @ingroup exceptions
+ *
+ * 6.7[stmt.dcl]/4: If control re-enters the declaration (recursively)
+ * while the object is being initialized, the behavior is undefined.
+ *
+ * Since we already have a library function to handle locking, we might
+ * as well check for this situation and throw an exception.
+ * We use the second byte of the guard variable to remember that we're
+ * in the middle of an initialization.
+ */
+ class recursive_init_error: public std::exception
+ {
+ public:
+ recursive_init_error() throw() { }
+ virtual ~recursive_init_error() throw ();
+ };
+}
#endif // __cplusplus
#pragma GCC visibility pop
diff --git a/libstdc++-v3/libsupc++/eh_ptr.cc b/libstdc++-v3/libsupc++/eh_ptr.cc
index 8d5a1b9b295..8a0167d7510 100644
--- a/libstdc++-v3/libsupc++/eh_ptr.cc
+++ b/libstdc++-v3/libsupc++/eh_ptr.cc
@@ -35,41 +35,30 @@
using namespace __cxxabiv1;
std::__exception_ptr::exception_ptr::exception_ptr() throw()
- : _M_exception_object(0)
-{
-}
+: _M_exception_object(0) { }
std::__exception_ptr::exception_ptr::exception_ptr(void* obj) throw()
- : _M_exception_object(obj)
-{
- _M_addref();
-}
+: _M_exception_object(obj) { _M_addref(); }
std::__exception_ptr::exception_ptr::exception_ptr(__safe_bool) throw()
- : _M_exception_object(0)
-{
-}
+: _M_exception_object(0) { }
-std::__exception_ptr::exception_ptr::exception_ptr(
- const exception_ptr& other) throw()
- : _M_exception_object(other._M_exception_object)
-{
- _M_addref();
-}
+std::__exception_ptr::
+exception_ptr::exception_ptr(const exception_ptr& other) throw()
+: _M_exception_object(other._M_exception_object)
+{ _M_addref(); }
std::__exception_ptr::exception_ptr::~exception_ptr() throw()
-{
- _M_release();
-}
+{ _M_release(); }
std::__exception_ptr::exception_ptr&
-std::__exception_ptr::exception_ptr::operator=(
- const exception_ptr& other) throw()
+std::__exception_ptr::
+exception_ptr::operator=(const exception_ptr& other) throw()
{
exception_ptr(other).swap(*this);
return *this;
@@ -109,15 +98,11 @@ std::__exception_ptr::exception_ptr::_M_release() throw()
void*
std::__exception_ptr::exception_ptr::_M_get() const throw()
-{
- return _M_exception_object;
-}
+{ return _M_exception_object; }
void
-std::__exception_ptr::exception_ptr::_M_safe_bool_dummy() throw ()
-{
-}
+std::__exception_ptr::exception_ptr::_M_safe_bool_dummy() throw () { }
void
@@ -132,9 +117,7 @@ std::__exception_ptr::exception_ptr::swap(exception_ptr &other) throw()
// Retained for compatibility with CXXABI_1.3.
bool
std::__exception_ptr::exception_ptr::operator!() const throw()
-{
- return _M_exception_object == 0;
-}
+{ return _M_exception_object == 0; }
// Retained for compatibility with CXXABI_1.3.
@@ -153,17 +136,13 @@ std::__exception_ptr::exception_ptr::__cxa_exception_type() const throw()
bool std::__exception_ptr::operator==(const exception_ptr& lhs,
- const exception_ptr& rhs) throw()
-{
- return lhs._M_exception_object == rhs._M_exception_object;
-}
+ const exception_ptr& rhs) throw()
+{ return lhs._M_exception_object == rhs._M_exception_object; }
bool std::__exception_ptr::operator!=(const exception_ptr& lhs,
- const exception_ptr& rhs) throw()
-{
- return !(lhs == rhs);
-}
+ const exception_ptr& rhs) throw()
+{ return !(lhs == rhs);}
std::exception_ptr
@@ -185,8 +164,8 @@ std::current_exception() throw()
static void
-__gxx_dependent_exception_cleanup (_Unwind_Reason_Code code,
- _Unwind_Exception *exc)
+__gxx_dependent_exception_cleanup(_Unwind_Reason_Code code,
+ _Unwind_Exception *exc)
{
// This cleanup is set only for dependents.
__cxa_dependent_exception *dep = __get_dependent_exception_from_ue (exc);
@@ -236,7 +215,7 @@ std::rethrow_exception(std::exception_ptr ep)
// Some sort of unwinding error. Note that terminate is a handler.
__cxa_begin_catch (&dep->unwindHeader);
- std::terminate ();
+ std::terminate();
}
#undef _GLIBCXX_EH_PTR_COMPAT
diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception
index 26dbf0da1ec..989a9ff6f74 100644
--- a/libstdc++-v3/libsupc++/exception
+++ b/libstdc++-v3/libsupc++/exception
@@ -102,15 +102,16 @@ namespace std
* violates the function's %exception specification. */
void unexpected() __attribute__ ((__noreturn__));
- /** [18.6.4]/1: "Returns true after completing evaluation of a
+ /** [18.6.4]/1: 'Returns true after completing evaluation of a
* throw-expression until either completing initialization of the
* exception-declaration in the matching handler or entering @c unexpected()
* due to the throw; or after entering @c terminate() for any reason
* other than an explicit call to @c terminate(). [Note: This includes
- * stack unwinding [15.2]. end note]"
+ * stack unwinding [15.2]. end note]'
*
- * 2: "When @c uncaught_exception() is true, throwing an %exception can
- * result in a call of @c terminate() (15.5.1)."
+ * 2: 'When @c uncaught_exception() is true, throwing an
+ * %exception can result in a call of @c terminate()
+ * (15.5.1).'
*/
bool uncaught_exception() throw() __attribute__ ((__pure__));
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index 9192a2244e7..3ee4d8d327d 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -48,42 +48,28 @@ namespace std
* @addtogroup exceptions
* @{
*/
-
- // Hide the free operators from other types
namespace __exception_ptr
{
- /**
- * @brief An opaque pointer to an arbitrary exception.
- */
class exception_ptr;
}
using __exception_ptr::exception_ptr;
- /** Obtain an %exception_ptr to the currently handled exception. If there
+ /** Obtain an exception_ptr to the currently handled exception. If there
* is none, or the currently handled exception is foreign, return the null
* value.
*/
exception_ptr current_exception() throw();
- /// Throw the object pointed to by the %exception_ptr.
+ /// Throw the object pointed to by the exception_ptr.
void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__));
- /// Obtain an %exception_ptr pointing to a copy of the supplied object.
- template<typename _Ex>
- exception_ptr
- copy_exception(_Ex __ex) throw();
-
namespace __exception_ptr
{
- bool
- operator==(const exception_ptr&, const exception_ptr&)
- throw() __attribute__ ((__pure__));
-
- bool
- operator!=(const exception_ptr&, const exception_ptr&)
- throw() __attribute__ ((__pure__));
-
+ /**
+ * @brief An opaque pointer to an arbitrary exception.
+ * @ingroup exceptions
+ */
class exception_ptr
{
void* _M_exception_object;
@@ -140,16 +126,24 @@ namespace std
#endif
friend bool
- operator==(const exception_ptr&, const exception_ptr&)
- throw() __attribute__ ((__pure__));
+ operator==(const exception_ptr&, const exception_ptr&) throw()
+ __attribute__ ((__pure__));
const type_info*
__cxa_exception_type() const throw() __attribute__ ((__pure__));
};
+ bool
+ operator==(const exception_ptr&, const exception_ptr&) throw()
+ __attribute__ ((__pure__));
+
+ bool
+ operator!=(const exception_ptr&, const exception_ptr&) throw()
+ __attribute__ ((__pure__));
} // namespace __exception_ptr
+ /// Obtain an exception_ptr pointing to a copy of the supplied object.
template<typename _Ex>
exception_ptr
copy_exception(_Ex __ex) throw()
diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
index dace046e544..222e5ec4227 100644
--- a/libstdc++-v3/libsupc++/guard.cc
+++ b/libstdc++-v3/libsupc++/guard.cc
@@ -136,20 +136,6 @@ __set_and_release (__cxxabiv1::__guard *g)
namespace __gnu_cxx
{
- // 6.7[stmt.dcl]/4: If control re-enters the declaration (recursively)
- // while the object is being initialized, the behavior is undefined.
-
- // Since we already have a library function to handle locking, we might
- // as well check for this situation and throw an exception.
- // We use the second byte of the guard variable to remember that we're
- // in the middle of an initialization.
- class recursive_init_error: public std::exception
- {
- public:
- recursive_init_error() throw() { }
- virtual ~recursive_init_error() throw ();
- };
-
recursive_init_error::~recursive_init_error() throw() { }
}
diff --git a/libstdc++-v3/libsupc++/nested_exception.h b/libstdc++-v3/libsupc++/nested_exception.h
index d4e1347114b..9b054840eff 100644
--- a/libstdc++-v3/libsupc++/nested_exception.h
+++ b/libstdc++-v3/libsupc++/nested_exception.h
@@ -51,9 +51,11 @@ namespace std
* @{
*/
- /// nested_exception
+ /// Exception class with exception_ptr data member.
class nested_exception
{
+ exception_ptr _M_ptr;
+
public:
nested_exception() throw() : _M_ptr(current_exception()) { }
@@ -70,16 +72,12 @@ namespace std
exception_ptr
nested_ptr() const
{ return _M_ptr; }
-
- private:
- exception_ptr _M_ptr;
};
template<typename _Except>
struct _Nested_exception : public _Except, public nested_exception
{
- explicit
- _Nested_exception(_Except&& __ex)
+ explicit _Nested_exception(_Except&& __ex)
: _Except(static_cast<_Except&&>(__ex))
{ }
};
@@ -89,9 +87,7 @@ namespace std
{
static const nested_exception*
_S_get(const _Ex& __ex)
- {
- return dynamic_cast<const nested_exception*>(&__ex);
- }
+ { return dynamic_cast<const nested_exception*>(&__ex); }
};
template<typename _Ex>
@@ -99,17 +95,13 @@ namespace std
{
static const nested_exception*
_S_get(const _Ex* __ex)
- {
- return dynamic_cast<const nested_exception*>(__ex);
- }
+ { return dynamic_cast<const nested_exception*>(__ex); }
};
template<typename _Ex>
inline const nested_exception*
__get_nested_exception(const _Ex& __ex)
- {
- return __get_nested_helper<_Ex>::_S_get(__ex);
- }
+ { return __get_nested_helper<_Ex>::_S_get(__ex); }
template<typename _Ex>
void
@@ -126,21 +118,19 @@ namespace std
template<typename _Ex>
inline void
__throw_with_nested(_Ex&& __ex, const nested_exception* = 0)
- {
- throw __ex;
- }
+ { throw __ex; }
template<typename _Ex>
inline void
__throw_with_nested(_Ex&& __ex, ...)
- {
- throw _Nested_exception<_Ex>(static_cast<_Ex&&>(__ex));
- }
+ { throw _Nested_exception<_Ex>(static_cast<_Ex&&>(__ex)); }
template<typename _Ex>
void
throw_with_nested(_Ex __ex) __attribute__ ((__noreturn__));
+ /// If @p __ex is derived from nested_exception, @p __ex.
+ /// Else, an implementation-defined object derived from both.
template<typename _Ex>
inline void
throw_with_nested(_Ex __ex)
@@ -150,6 +140,7 @@ namespace std
__throw_with_nested(static_cast<_Ex&&>(__ex), &__ex);
}
+ /// If @p __ex is derived from nested_exception, @p __ex.rethrow_nested().
template<typename _Ex>
inline void
rethrow_if_nested(const _Ex& __ex)
@@ -158,12 +149,10 @@ namespace std
__nested->rethrow_nested();
}
- // see n2619
+ /// Overload, See N2619
inline void
rethrow_if_nested(const nested_exception& __ex)
- {
- __ex.rethrow_nested();
- }
+ { __ex.rethrow_nested(); }
// @} group exceptions
} // namespace std
diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
index 9319a481146..2ae375454e0 100644
--- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
@@ -48,8 +48,8 @@ void test01()
// { dg-error "instantiated from here" "" { target *-*-* } 40 }
// { dg-error "instantiated from here" "" { target *-*-* } 42 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 546 }
-// { dg-error "declaration of" "" { target *-*-* } 508 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 547 }
+// { dg-error "declaration of" "" { target *-*-* } 509 }
// { dg-excess-errors "At global scope" }
// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
index 7497767b165..5bf030cabcb 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
@@ -48,8 +48,8 @@ void test01()
// { dg-error "instantiated from here" "" { target *-*-* } 40 }
// { dg-error "instantiated from here" "" { target *-*-* } 42 }
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 467 }
-// { dg-error "declaration of" "" { target *-*-* } 429 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 468 }
+// { dg-error "declaration of" "" { target *-*-* } 430 }
// { dg-excess-errors "At global scope" }
// { dg-excess-errors "In instantiation of" }