diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-15 08:52:53 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-15 08:52:53 +0000 |
commit | e05ef402a2ebebf3461227723eca43cf692f9feb (patch) | |
tree | cc579327961d3afb754162e12de142a15a075e67 | |
parent | d33dc667ca63584d1369f1dd80ba2a112218b2c0 (diff) | |
download | gcc-e05ef402a2ebebf3461227723eca43cf692f9feb.tar.gz |
2008-07-15 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r137813
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@137817 138bc75d-0d04-0410-961f-82ee72b054a4
255 files changed, 7554 insertions, 4321 deletions
diff --git a/ChangeLog b/ChangeLog index 67913947421..69d15720422 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-07-11 Dodji Seketeli <dseketel@redhat.com> + + * MAINTAINERS (Write after Approval): Add myself. + 2008-07-02 Xuepeng Guo <xuepeng.guo@intel.com> * MAINTAINERS (Write After Approval): Add myself. diff --git a/ChangeLog.melt b/ChangeLog.melt index 72c68b3c0b1..cc90e1310df 100644 --- a/ChangeLog.melt +++ b/ChangeLog.melt @@ -1,3 +1,6 @@ +2008-07-15 Basile Starynkevitch <basile@starynkevitch.net> + MELT branch merged with trunk r137813 + 2008-07-08 Basile Starynkevitch <basile@starynkevitch.net> MELT branch merged with trunk r137620 diff --git a/MAINTAINERS b/MAINTAINERS index b578e25accc..ba77126fee1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -418,6 +418,7 @@ Maciej W. Rozycki macro@linux-mips.org Douglas Rupp rupp@gnat.com Silvius Rus rus@google.com Matthew Sachs msachs@apple.com +Dodji Seketeli dseketel@redhat.com Svein Seldal svein@dev.seldal.com Thiemo Seufer ths@networkno.de Mark Shinwell shinwell@codesourcery.com diff --git a/config/ChangeLog b/config/ChangeLog index ff2d7b0c39c..e64c1cab72e 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2008-07-11 Joseph Myers <joseph@codesourcery.com> + + * mh-mingw (LDFLAGS): Append to rather than replacing previous + value. + 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * override.m4: Use m4_version_prereq throughout. diff --git a/config/mh-mingw b/config/mh-mingw index e31bfd323b4..4c49d5d5917 100644 --- a/config/mh-mingw +++ b/config/mh-mingw @@ -3,4 +3,4 @@ BOOT_CFLAGS += -D__USE_MINGW_ACCESS CFLAGS += -D__USE_MINGW_ACCESS # Increase stack limit to same as Linux default. -LDFLAGS = -Wl,--stack,8388608 +LDFLAGS += -Wl,--stack,8388608 diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 5669ce28801..119e0779db9 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * check_makefile_deps.sh: New file. + 2008-05-08 Sebastian Pop <sebastian.pop@amd.com> * patch_tester.sh (report): Do not print "Checker: ". diff --git a/contrib/check_makefile_deps.sh b/contrib/check_makefile_deps.sh new file mode 100644 index 00000000000..60b9c1757fd --- /dev/null +++ b/contrib/check_makefile_deps.sh @@ -0,0 +1,94 @@ +#! /bin/sh +# +# Check for accurate dependencies in gcc/Makefile.in. +# +# Copyright (C) 2008 Free Software Foundation, Inc. +# Written by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>. +# +# This script is Free Software, and it can be copied, distributed and +# modified as defined in the GNU General Public License. A copy of +# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html +# +# Start this script in an up to date build-tree/gcc directory. +# Using it in stage1 only works if the host compiler is GCC. + +# To continue an interrupted check, make sure there are no *.o.backup +# files lying around (i.e., move them back to their original name), +# and set $start_after to the name of the last object that should be skipped. +start_after= + +# Skip some objects unconditionally; make sure each name in this list is +# surrounded by spaces. +skip=" crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtfastmath.o crtprec64.o crtprec80.o crtprec32.o " + +# Files which show up as dependencies other than through unconditional #include. +# This is an egrep pattern. +hidden_dep_files='(BASE-VER|DATESTAMP|DEV-PHASE|Makefile|xcoffout\.h|basic-block\.h|bconfig\.h)$' + +: ${MAKE=make} +: ${EGREP="grep -E"} + +# ------------------------------------------------------------------------- +# There should be no need for changes beyond this point. + +set -e +st=0 + +if test -f c-common.o; then :; else + echo "$0: rerun in an up to date build-tree/gcc directory" >&2 + exit 1 +fi + +for obj in *.o +do + if test -n "$start_after"; then + if test $obj = $start_after; then + start_after= + fi + continue + fi + case $skip in *\ $obj\ *) continue ;; esac + + mv -f $obj $obj.backup + ${MAKE} $obj CFLAGS='-MM -MF depfile' + mv -f $obj.backup $obj + ${MAKE} -t + LC_ALL=C ${MAKE} -d $obj >make-d-log + hdrs=`cat depfile` + for hdr in $hdrs; do + case $hdr in + *: | *.o | \\ | /* ) ;; + *) + echo $hdr ;; + esac + done < depfile | + LC_ALL=C sort -u > hdrs + + + sed -n '/.*Prerequisite..\([^ ]*\). is newer than target .'"$obj"'.*/s//\1/p' \ + < make-d-log | + LC_ALL=C sort -u > not-up-to-date + if test -s not-up-to-date; then + st=1 + echo "$0: error: prerequisites for $obj are not up to date:" >&2 + cat not-up-to-date >&2 + fi + sed -n '/.*Prerequisite..\([^ ]*\). is older than target .'"$obj"'.*/s//\1/p' \ + < make-d-log | + LC_ALL=C sort -u > deps + missing_deps=`LC_ALL=C join -v 1 hdrs deps` + unneeded_deps=`LC_ALL=C join -v 2 hdrs deps | $EGREP -v "$hidden_dep_files" || :` + if test -n "$missing_deps"; then + st=1 + echo "missing deps for $obj:" + echo "$missing_deps" | sed 's/^/ /' + fi + if test -n "$unneeded_deps"; then + # unneeded dependencies are not a big problem, so they cause no failure. + echo "unneeded deps for $obj:" + echo "$unneeded_deps" | sed 's/^/ /' + fi +done +exit $st + +# vi:sw=2: diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a126ecef43..32438121f14 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,528 @@ +2008-07-15 Ben Elliston <bje@au.ibm.com> + + * emit-rtl.c (set_mem_attributes_minus_bitpos): Improve comment. + +2007-07-14 Rafael Avila de Espindola <espindola@google.com> + + * c-decl.c (diagnose_mismatched_decls): Don't warn if TREE_NO_WARNING + is set. + +2008-07-14 Jan Hubicka <jh@suse.cz> + + * i386.md (sse5 cmov pattern): Update call of ix86_sse5_valid_op_p + * sse.md (sse5 patterns): Update call of ix86_sse5_valid_op_p; + fix predicates and constraints. + * i386.c (ix86_sse5_valid_op_p): Add commutative parameter. + * i386-protos.h (ix86_sse5_valid_op_p): Update declaration. + +2008-07-14 Doug Kwan <dougkwan@google.com> + + * config.gcc (arm*-*-eabi*): Include arm/eabi.h and use + additional option file arm/eabi.opt. + * config/arm/eabi.h (File): New configuration file for EABI targets. + * config/arm/elf.h (SUBTARGET_EXTRA_SPECS): Add + SUBSUBTARGET_EXTRA_SPECS. + (SUBSUBTARGET_EXTRA_SPECS): Provide empty default. + * config/arm/unknown-elf.h (UNKNOWN_ELF_STARTFILE_SPEC): Renamed + from STARTFILE_SPEC so that it can be referenced in an override. + (STARTFILE_SPEC): Use UNKNOWN_ELF_STARTFILE_SPEC. + (UNKNOWN_ELF_ENDFILE_SPEC): Renamed from ENDFILE_SPEC so that it + can be referenced in an override. + (ENDFILE_SPEC): Use UNKNOWN_ELF_ENDFILE_SPEC. + * config/arm/bpabi.h (BPABI_LINK_SPEC): Renamed from LINK_SPEC + so that it can be referenced in an override. + (LINK_SPEC): Use BPABI_LINK_SPEC. + * config/arm/eabi.opt (File): New. + +2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * Makefile.in (TARGET_DEF_H): Add targhooks.h. + (FIXED_VALUE_H): New variable. + (RTL_BASE_H): Use $(INPUT_H) and $(FIXED_VALUE_H) instead of + input.h, fixed-value.h. + (TREE_H): Use $(INPUT_H), add $(SYMTAB_H). + (BASIC_BLOCK_H): Use $(BITMAP_H). + (FUNCTION_H): Add varray.h. + (IPA_REFERENCE_H): Use $(BITMAP_H). + (CGRAPH_H): Add $(BASIC_BLOCK_H). + (DF_H): Use $(BITMAP_H). + (GGC_H): Add statistics.h. + (INSN_ADDR_H): New. + (INSN_ATTR_H): Use it. + (SYSTEM_H): Add safe-ctype.h, filenames.h. + (INPUT_H): New. + (SYMTAB_H): Add $(OBSTACK_H). + (CPP_INTERNAL_H): New. + (TREE_DUMP_H): Add tree-pass.h. + (TREE_FLOW_H): Use $(BITMAP_H) + (PRETTY_PRINT_H): Use $(INPUT_H). + (EBITMAP_H): Rename from typo-ed EBIMAP_H. + (GSTAB_H): New. + (BITMAP_H): New. + (many object files): Fix lots of header dependencies throughout. + +2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * Makefile.in (write_entries_to_file, write_entries_to_file_split): + New macros. + (s-gtyp-input): Use them to write tmp-gi.list. + (echo_to_gi.list): Remove. + +2008-07-14 Richard Guenther <rguenther@suse.de> + + * tree-ssa-sccvn.c (pre_info): Remove. + (switch_to_PRE_table): Likewise. + (free_scc_vn): Do not clear SSA_NAME_VALUE. + Do not free pre_info. + (set_hashtable_value_ids): Do not create value-ids for the + optimistic tables. + (run_scc_vn): Remove double test. Remove bogus special-case + in value-number printing. + * tree-ssa-sccvn.h (switch_to_PRE_table): Remove. + * tree-ssa-ccp.c (get_symbol_constant_value): Do not look at + SSA_NAME_VALUE. + * tree-flow-inline.h (get_value_handle): Remove. + * tree-flow.h (get_value_handle): Remove. + +2008-07-14 Martin Jambor <mjambor@suse.cz> + + * tree-switch-conversion.c (gen_inbound_check): Make sure the type + in which we generate arithmetics is not a subrange. + +2008-07-14 Martin Jambor <mjambor@suse.cz> + + * Makefile.in (IPA_PROP_H): Added ipa-prop.h to IPA_PROP_H variable. + +2008-07-14 Richard Guenther <rguenther@suse.de> + + * tree-ssa-pre.c (insert_into_preds_of_block): Do not call + convert. + +2008-07-14 Andreas Krebbel <krebbel1@de.ibm.com> + + PR target/36745 + * config/s390/s390.c: (s390_secondary_reload): Add a secondary + reload for symbol refs moved to r0 with -fPIC. + (legitimize_pic_address): Use the target register as temporary + reg if possible. + (emit_symbolic_move): Adjust comment. + * config/s390/s390.md (reloadsi_PIC_addr, reloaddi_PIC_addr): + New expanders. + +2008-07-14 Ben Elliston <bje@au.ibm.com> + + * c-common.h (C_CPP_HASHNODE): New macro. + * coretypes.h (struct cpp_token): Forward declare. + * doc/extend.texi (PowerPC AltiVec Built-in Functions): Document + the context-sensitive keyword method. + * config/rs6000/rs6000-c.c (__vector_keyword, vector_keyword, + __pixel_keyword, pixel_keyword, __bool_keyword, bool_keyword, + expand_bool_pixel): New. + (altivec_categorize_keyword): New function. + (init_vector_keywords): New function. + (rs6000_macro_to_expand): Likewise. + (rs6000_cpu_cpp_builtins): Enable context-sensitive macros if not + compiling an ISO C dialect. + +2008-07-13 Daniel Berlin <dberlin@dberlin.org> + + * tree-ssa-pre.c (fully_constant_expression): Add fold_convert + calls. + (create_expression_by_pieces): Fix typo. + (do_regular_insertion): Use debug counter here too. + +2008-07-14 Hans-Peter Nilsson <hp@axis.com> + + PR target/35492. + * config/cris/cris.h (CRIS_CONST_OK_FOR_LETTER_P): Renamed from + CONST_OK_FOR_LETTER_P. All port-local users changed. + (CONST_OK_FOR_CONSTRAINT_P): Define; implement Kc as old K, + implement Kp matching power-of-two. + (CONSTRAINT_LEN): Define to match. + * config/cris/cris.md: Replace all use of constraint K with Kc. + ("*btst*): Use Kp for operand 0 of last alternative. + +2008-07-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR testsuite/36440 + * tree-call-cdce.c (check_target_format): Accept MIPS single, double + and quad formats. + +2008-07-13 Jan Hubicka <jh@suse.cz> + + * tree.c (decl_assembler_name_equal): Expect assembler name of decl + to be mangled too. + +2008-07-13 Richard Guenther <rguenther@suse.de> + + PR middle-end/36811 + * langhooks.c (lhd_print_error_function): Deal with recursive + BLOCK trees. + +2008-07-12 Jan Hubicka <jh@suse.cz> + + * cgraph.c (assembler_name_hash): New static var. + (hash_node_by_assembler_name, eq_assembler_name): New. + (cgraph_node_for_asm): Use hashtable. + (cgraph_remove_node): Maintain hashtable. + (change_decl_assembler_name): Sanity check that names are not changing + after aliasing was processed. + * cgraph.h (varpoon_node): Add next GGC marker. + * tree.c (decl_assembler_name_equal): Constify. + (decl_assembler_name_hash): New. + * tree.h (decl_assembler_name_equal): Constify. + (decl_assembler_name_hash): Update. + +2008-07-12 David Daney <ddaney@avtrex.com> + + * config/mips/driver-native.c (host_detect_local_cpu): Handle + sb1 and r5000 cpus. + +2008-07-12 Richard Sandiford <rdsandiford@googlemail.com> + + * doc/md.texi: Document the MIPS "v" constraint. + * config/mips/mips.h (reg_class): Revert last change. + (REG_CLASS_NAMES): Likewise. + (REG_CLASS_CONTENTS): Likewise. + * config/mips/mips.c (mips_regno_to_class): Likewise. + * config/mips/constraints.md (v): Likewise, but add documentation. + Add a comment to say that this constraint should not be used in + gcc code. + +2008-07-11 DJ Delorie <dj@redhat.com> + + * config/h8300/h8300.md (length): Fix branch offset limit. + +2008-07-11 Anatoly Sokolov <aesok@post.ru> + + * config/avr/avr-protos.h (avr_peep2_scratch_safe): Remove prototype. + * config/avr/avr.c (avr_peep2_scratch_safe): Remove. + (avr_hard_regno_scratch_ok): New function. + (TARGET_HARD_REGNO_SCRATCH_OK): Define. + * config/avr/avr.md (all peepholes that request a scratch register): + Remove avr_peep2_scratch_safe use. + +2008-07-11 Tom Tromey <tromey@redhat.com> + Ian Lance Taylor <iant@google.com> + + * c-common.h (enum rid): Add RID_CXX_COMPAT_WARN. + (struct c_common_resword): Define. + (D_CONLY, D_CXXONLY, D_C99, D_CXX0X, D_EXT, D_EXT89): Define. + (D_ASM, D_OBJC, D_CXX_OBJC, D_CXXWARN): Define. + (c_common_reswords, num_c_common_reswords): Declare. + * c-common.c (c_common_reswords): New global const array. + (num_c_common_reswords): New const int. + * c-parser.c (struct resword, reswords): Don't define. + (D_C89, D_EXT, D_EXT89, D_OBJC): Don't define. + (c_parse_init): Clarify mask code. Use c_common_reswords rather + than reswords. If warning about C++ keywords, give them a special + RID code. + (c_lex_one_token): Warn about C++ keywords. Call + objc_is_reserved_word rather than OBJC_IS_AT_KEYWORD. + (c_parser_external_declaration): Look for RID_xxx rather than + RID_AT_xxx, for ObjC++ keywords which are also C++ keywords. + (c_parser_statement_after_labels): Likewise. + (c_parser_objc_class_instance_variables): Likewise. + (c_parser_objc_class_declaration): Likewise. + (c_parser_objc_try_catch_statement): Likewise. + * c-decl.c (c_print_identifier): Ignore RID_CXX_COMPAT_WARN. + (declspecs_add_type): Likewise. + +2008-07-11 Angelo Graziosi <angelo.graziosi@alice.it> + + * ggc-page.c (alloc_page): + Substituting xmalloc, xcalloc with + XNEWVEC and XCNEWVAR macros which add the + needed casts. + +2008-07-11 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/36765 + * tree-ssa-alias.c (compute_flow_insensitive_aliasing): Add + aliases from HEAP vars to SMTs. + +2008-07-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * Makefile.in (LOOSE_WARN, STRICT_WARN): Update comments. + * configure.ac (loose_warn): Move -Wc++-compat from here... + (strict_warn): ...to here. + * configure: Regenerate. + +2008-07-10 Joseph Myers <joseph@codesourcery.com> + + * config.gcc (arm-*-coff*, armel-*-coff*, h8300-*-*, + i[34567]86-*-aout*, i[34567]86-*-coff*, m68k-*-aout*, + m68k-*-coff*, sh-*-*, mips-sgi-irix[56]*, pdp11-*-bsd, + rs6000-ibm-aix4.[12]*, powerpc-ibm-aix4.[12]*): Deprecate targets, + excluding more specific h8300-*-* and sh-*-* targets. + +2008-07-10 Daniel Berlin <dberlin@dberlin.org> + + * tree-ssa-pre.c (create_expression_by_pieces): Add fold_convert + calls. + (eliminate): Ditto. + (execute_pre): Call loop_optimizer_finalize in early exit. + +2008-07-10 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/36790 + * omp-low.c (lower_omp_2): If task_shared_vars, test all DECL_P + uids in the bitmap, not just VAR_DECL uids. + + PR rtl-optimization/36419 + * combine-stack-adj.c (adjust_frame_related_expr): New function. + (combine_stack_adjustments_for_block): Call it if needed. Delete + correct insn. + * dwarf2out.c (dwarf2out_frame_debug_expr): Adjust + DW_CFA_GNU_args_size if CSA pass merged some adjustments into + prologue sp adjustment. + +2008-07-10 Peter Maydell <pmaydell@chiark.greenend.org.uk> + + PR other/28322 + * opts.c (print_ignored_options): Report postponed diagnostics for + unknown -Wno-* options as warnings, not errors. + (postpone_unknown_option_error): Renamed to... + (postpone_unknown_option_warning): ... this. + +2008-07-09 Doug Kwan <dougkwan@google.com> + + Revert: + 2008-07-08 Doug Kwan <dougkwan@google.com> + + * config/arm/arm.opt (mandroid): New option. + * config/arm/bpabi.h (ANDROID_LINK_SPEC): New macro. + (LINK_SPEC): Enable Android specific behaviour when -mandroid is used. + (CC1_SPEC): Same. + (CC1PLUS_SPEC): Same. + (LIB_SPEC): Same. + (STARTFILE_SPEC): Same. + (ENDFILE_SPEC): Same. + (TARGET_BPABI_CPP_BUILTINS): Define __ANDROID__ when -mandroid is + used. + +2008-07-09 Richard Sandiford <rdsandiford@googlemail.com> + + PR target/35802 + * config/mips/mips.h (reg_class): Remove V1_REG. + (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly. + * config/mips/mips.c (mips_regno_to_class): Map $3 to M16_NA_REGS + instead of V1_REGS. + (mips_get_tp): New function. + (mips_legitimize_tls_address): Use it. + * config/mips/constraints.md (v): Delete. + * config/mips/mips.md (TLS_GET_TP_REGNUM): New constant. + (tls_get_tp_<mode>): Allow any GPR destination and clobber $3. + After reload, split into a move and ... + (*tls_get_tp_<mode>_split): ...this new instruction. + +2008-07-09 David Daney <ddaney@avtrex.com> + + * config/mips/driver-native.c: Include coretypes.h and tm.h. + +2008-07-09 Jakub Jelinek <jakub@redhat.com> + + * gimplify.c (struct gimplify_ctx): Move to tree-gimple.h. + (push_gimplify_context): Don't allocate temp_htab nor c itself here. + Add c argument. + (pop_gimplify_context): Check c->temp_htab instead of optimize whether + htab_delete should be called. Don't free c. + (lookup_tmp_var): Create temp_htab lazily. + (gimplify_scan_omp_clauses, gimplify_omp_parallel, gimplify_omp_task, + gimplify_body, force_gimple_operand): Adjust push_gimplify_context + callers. + * omp-low.c (lower_omp_sections, lower_omp_single, lower_omp_master, + lower_omp_ordered, lower_omp_critical, lower_omp_for, + create_task_copyfn, lower_omp_taskreg, execute_lower_omp): + * tree-ssa-ccp.c (convert_to_gimple_builtin): Likewise. + * tree-sra.c (generate_element_init): Likewise. + * tree-mudflap.c (execute_mudflap_function_ops, + execute_mudflap_function_decls): Likewise. + * tree-inline.c (setup_one_parameter, optimize_inline_calls): Likewise. + * tree-gimple.h (struct gimplify_ctx): New type. + (push_gimplify_context): Adjust prototype. + +2008-07-09 Daniel Berlin <dberlin@dberlin.org> + + * tree-ssa-pre.c (phi_translate_1): Update placement of + add_to_value calls. + +2008-07-09 Anatoly Sokolov <aesok@post.ru> + + * target.h (struct gcc_target): Add hard_regno_scratch_ok field. + * target-def.h (TARGET_HARD_REGNO_SCRATCH_OK): New. + (TARGET_INITIALIZER): Use TARGET_HARD_REGNO_SCRATCH_OK. + * targhooks.c (default_hard_regno_scratch_ok): New function. + * targhooks.h (default_hard_regno_scratch_ok): Declare function. + * doc/tm.texi: Document TARGET_HARD_REGNO_SCRATCH_OK hook. + * recog.c: Include "target.h". + (peep2_find_free_register): Add check for global regs. Add target + specific check. + * Makefile.in (recog.o): Depend on target.h. + +2008-07-09 Kaz Kojima <kkojima@gcc.gnu.org> + + * config/sh/sh.c (sh_canonical_va_list_type): New. + (TARGET_CANONICAL_VA_LIST_TYPE): Define. + +2008-07-09 Raksit Ashok <raksit@google.com> + + * doc/invoke.texi (Option Summary): Mention new option + -Wdisallowed-function-list=... + (Warning Options): Document -Wdisallowed-function-list=... + * common.opt (Wdisallowed-function-list=): New flag. + * flags.h (warn_disallowed_functions): External definition of new + boolean warning flag. + (warn_if_disallowed_function_p): Declare new function. + * opts.c (warning_disallowed_functions): New static variable. + (warn_disallowed_functions): New boolean warning flag. + (warn_if_disallowed_function_p): New function. + (add_comma_separated_to_vector): Rename + add_instrument_functions_exclude_list to this. + (common_handle_option): Handle new option. Rename calls to + add_instrument_functions_exclude_list into calls to + add_comma_separated_to_vector. + * c-parser.c (c_parser_postfix_expression_after_primary): New warning + based on flag warn_disallowed_functions. + +2008-07-09 Christian Bruel <christian.bruel@st.com> + + * final.c (get_attr_length_1): Call get_attr_length_1 with fallback_fn + instead of get_attr_length. + +2008-07-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * genattrtab.c (insert_right_side, evaluate_eq_attr): Avoid C++ + keywords. + * genemit.c (gen_insn): Likewise. + * gengtype.c (note_def_vec): Likewise. + * gengtype.h (note_def_vec): Likewise. + * genoutput.c (struct data, output_insn_data, process_template, + gen_expand, gen_split, note_constraint): Likewise. + * genrecog.c (new_decision, add_to_sequence, factor_tests, + make_insn_sequence): Likewise. + * gensupport.c (record_insn_name): Likewise. + +2008-07-08 Doug Kwan <dougkwan@google.com> + + * config/arm/arm.opt (mandroid): New option. + * config/arm/bpabi.h (ANDROID_LINK_SPEC): New macro. + (LINK_SPEC): Enable Android specific behaviour when -mandroid is used. + (CC1_SPEC): Same. + (CC1PLUS_SPEC): Same. + (LIB_SPEC): Same. + (STARTFILE_SPEC): Same. + (ENDFILE_SPEC): Same. + (TARGET_BPABI_CPP_BUILTINS): Define __ANDROID__ when -mandroid is + used. + +2008-07-08 Raksit Ashok <raksit@google.com> + + * expr.c (emit_block_move_via_movmem): Fix expected_align parameter. + (set_storage_via_setmem): Fix expected_align parameter. + * doc/invoke.texi (i386 and x86-64 Options): Add a couple of options + missing from the list. + * doc/md.texi (movmem): Explicitly state that expected alignment is + to be expressed in bytes. + (setmem): Explicitly state that expected alignment is to be expressed + in bytes. + +2008-07-08 Joseph Myers <joseph@codesourcery.com> + + * reload.c (find_reloads_subreg_address): Do not require validity + of address in original mode before reloading address. + +2008-07-07 Tianwei Sheng <tianweis@google.com> + + * df-core.c (df_remove_problem): Adjust the access to avoid out of + bounds array access. + +2008-07-08 Jakub Jelinek <jakub@redhat.com> + + * tree-sra.c (sra_build_assignment): Handle CONVERT_EXPR_P + dst. + +2008-07-05 Daniel Berlin <dberlin@dberlin.org> + + Fix PR tree-optimization/23455 + Fix PR tree-optimization/35286 + Fix PR tree-optimization/35287 + * Makefile.in (OBJS-common): Remove tree-vn.o. + tree-vn.o: Remove. + * dbgcnt.def: Add treepre_insert debug counter. + * gcc/tree-flow.h (add_to_value): Updated for other changes. + (debug_value_expressions): Ditto. + (print_value_expressions): Ditto. + * tree-pretty-print.c (dump_generic_node): Updated for + VALUE_HANDLE removal. + * tree-ssa-dom.c (record_equality): Ditto. + (cprop_operand): Ditto. + (lookup_avail_expr): Ditto. + * tree-ssa-threadedge.c + (record_temporary_equivalences_from_stmts_at_dest): Ditto. + (simplify_control_stmt_condition): Ditto. + * tree.c (tree_code_size): Ditto. + (tree_node_structure): Ditto. + (iterative_hash_expr): Ditto. + * tree.def: Ditto. + * tree.h (VALUE_HANDLE_ID): Ditto. + (VALUE_HANDLE_EXPR_SET): Ditto. + (struct tree_value_handle): Ditto. + (union tree_node): Ditto. + * treestruct.def: Ditto. + * tree-vn.c: Removed. + * tree-ssa-pre.c: Rewritten entirely. + * tree-ssa-sccvn.c (constant_to_value_id): New hashtable. + (constant_value_ids): Ditto. + (vn_nary_op_t): Moved to header. + (vn_phi_t): Ditto. + (vn_reference_op_t): Ditto + (vn_reference_t): Ditto. + (next_value_id): New variable. + (VN_INFO): Add an assert. + (vn_constant_eq): New function. + (vn_constant_hash): Ditto. + (get_or_alloc_constant_value_id): Ditto. + (value_id_constant_p): Ditto. + (vn_reference_compute_hash): De-staticify. + (copy_reference_ops_from_ref): Don't use get_callee_fndecl. + Disable some code with a FIXME. + Remove VALUE_HANDLE use. + (valueize_refs): Update opcode if it changes from ssa name to + constant. + (vn_reference_lookup_1): Add new argument. + (vn_reference_lookup): Ditto. + (vn_reference_lookup_pieces): New function. + (vn_reference_insert): Add return type. Modify to deal with value + ids. + (vn_reference_insert_pieces): New function. + (vn_nary_op_compute_hash): De-staticify. + (vn_nary_op_eq): Ditto. + (vn_nary_op_lookup_pieces): New function. + (vn_nary_op_lookup): Add new argument. + (vn_nary_op_insert_pieces): New function. + (vn_nary_op_insert): Add return type. Modify to deal with value + ids. + (vn_phi_insert): Ditto. + (visit_unary_op): Update for callee changes. + (visit_binary_op): Ditto. + (visit_reference_op_load): Ditto. + (visit_reference_op_store): Ditto. + (init_scc_vn): Init next_value_id, constant_to_value_id and + constant_value_ids. + (free_scc_vn): Free them. + (set_hashtable_value_ids): New function. + (run_scc_vn): Use it. + (get_max_value_id): New function. + (get_next_value_id): Ditto. + (expressions_equal_p): Moved from tree-vn.c + (sort_vuses): Ditto. + (sort_vuses_heap): Ditto. + * tree-ssa-sccvn.h: Structures moved from tree-ssa-sccvn.c (noted + above). + * tree.c (iterative_hash_hashval_t): Made non-static + * tree.h (iterative_hash_hashval_t): Declare it. + 2008-07-08 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_cloned_node): Call ipa_check_create_node_params diff --git a/gcc/ChangeLog.melt b/gcc/ChangeLog.melt index ede37192926..867735ff43f 100644 --- a/gcc/ChangeLog.melt +++ b/gcc/ChangeLog.melt @@ -1,3 +1,5 @@ +2008-07-15 Basile Starynkevitch <basile@starynkevitch.net> + MELT branch merged with trunk r137813 2008-07-09 Basile Starynkevitch <basile@starynkevitch.net> * melt/warmelt-macro.bysl: C expansion not macroexpanded inside diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 9c0637d2a77..153ee5ea3fa 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20080708 +20080715 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 4dff4b7b074..0890260f92b 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -155,10 +155,9 @@ coverageexts = .{gcda,gcno} # flags from configure. The user is free to explicitly turn these flags # off if they wish. # LOOSE_WARN are the warning flags to use when compiling something -# which is only compiled with gcc, such as libgcc and the frontends -# other than C. +# which is only compiled with gcc, such as libgcc. # STRICT_WARN are the additional warning flags to -# apply to the back end and the C front end, which may be compiled +# apply to the back end and some front ends, which may be compiled # with other compilers. LOOSE_WARN = @loose_warn@ STRICT_WARN = @strict_warn@ @@ -261,6 +260,22 @@ build_file_translate = @build_file_translate@ # Locate mkinstalldirs. mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs +# write_entries_to_file - writes each entry in a list +# to the specified file. Entries are written in chunks of +# $(write_entries_to_file_split) to accomodate systems with +# severe command-line-length limitations. +# Parameters: +# $(1): variable containing entries to iterate over +# $(2): output file +write_entries_to_file_split = 50 +write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \ + $(foreach range, \ + $(shell i=1; while test $$i -le $(words $(1)); do \ + echo $$i; i=`expr $$i + $(write_entries_to_file_split)`; done), \ + $(shell echo $(wordlist $(range), \ + $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1)) \ + | tr ' ' '\n' >> $(2))) + # -------- # UNSORTED # -------- @@ -791,17 +806,18 @@ MACHMODE_H = machmode.h mode-classes.def insn-modes.h HOOKS_H = hooks.h $(MACHMODE_H) HOSTHOOKS_DEF_H = hosthooks-def.h $(HOOKS_H) LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H) -TARGET_DEF_H = target-def.h $(HOOKS_H) +TARGET_DEF_H = target-def.h $(HOOKS_H) targhooks.h RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) reg-notes.def insn-notes.def \ - input.h $(REAL_H) statistics.h vec.h fixed-value.h alias.h + $(INPUT_H) $(REAL_H) statistics.h vec.h $(FIXED_VALUE_H) alias.h +FIXED_VALUE_H = fixed-value.h $(MACHMODE_H) double-int.h RTL_H = $(RTL_BASE_H) genrtl.h PARAMS_H = params.h params.def BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def TREE_H = tree.h all-tree.def tree.def c-common.def $(lang_tree_files) \ $(MACHMODE_H) tree-check.h $(BUILTINS_DEF) \ - input.h statistics.h vec.h treestruct.def $(HASHTAB_H) \ - double-int.h alias.h -BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \ + $(INPUT_H) statistics.h vec.h treestruct.def $(HASHTAB_H) \ + double-int.h alias.h $(SYMTAB_H) +BASIC_BLOCK_H = basic-block.h $(BITMAP_H) sbitmap.h varray.h $(PARTITION_H) \ hard-reg-set.h $(PREDICT_H) vec.h $(FUNCTION_H) \ cfghooks.h $(OBSTACK_H) GCOV_IO_H = gcov-io.h gcov-iov.h auto-host.h @@ -811,7 +827,7 @@ RECOG_H = recog.h ALIAS_H = alias.h coretypes.h EMIT_RTL_H = emit-rtl.h FLAGS_H = flags.h options.h -FUNCTION_H = function.h $(TREE_H) $(HASHTAB_H) +FUNCTION_H = function.h $(TREE_H) $(HASHTAB_H) varray.h EXPR_H = expr.h insn-config.h $(FUNCTION_H) $(RTL_H) $(FLAGS_H) $(TREE_H) $(MACHMODE_H) $(EMIT_RTL_H) OPTABS_H = optabs.h insn-codes.h REGS_H = regs.h varray.h $(MACHMODE_H) $(OBSTACK_H) $(BASIC_BLOCK_H) $(FUNCTION_H) @@ -822,36 +838,40 @@ INTEGRATE_H = integrate.h $(VARRAY_H) CFGLAYOUT_H = cfglayout.h $(BASIC_BLOCK_H) CFGLOOP_H = cfgloop.h $(BASIC_BLOCK_H) $(RTL_H) vecprim.h double-int.h IPA_UTILS_H = ipa-utils.h $(TREE_H) $(CGRAPH_H) -IPA_REFERENCE_H = ipa-reference.h bitmap.h $(TREE_H) +IPA_REFERENCE_H = ipa-reference.h $(BITMAP_H) $(TREE_H) IPA_TYPE_ESCAPE_H = ipa-type-escape.h $(TREE_H) -CGRAPH_H = cgraph.h $(TREE_H) -DF_H = df.h bitmap.h $(BASIC_BLOCK_H) alloc-pool.h +CGRAPH_H = cgraph.h $(TREE_H) $(BASIC_BLOCK_H) +DF_H = df.h $(BITMAP_H) $(BASIC_BLOCK_H) alloc-pool.h RESOURCE_H = resource.h hard-reg-set.h $(DF_H) DDG_H = ddg.h sbitmap.h $(DF_H) GCC_H = gcc.h version.h -GGC_H = ggc.h gtype-desc.h +GGC_H = ggc.h gtype-desc.h statistics.h TIMEVAR_H = timevar.h timevar.def -INSN_ATTR_H = insn-attr.h $(srcdir)/insn-addr.h $(srcdir)/varray.h +INSN_ATTR_H = insn-attr.h $(INSN_ADDR_H) $(srcdir)/varray.h +INSN_ADDR_H = $(srcdir)/insn-addr.h vecprim.h C_COMMON_H = c-common.h $(SPLAY_TREE_H) $(CPPLIB_H) $(GGC_H) C_PRAGMA_H = c-pragma.h $(CPPLIB_H) C_TREE_H = c-tree.h $(C_COMMON_H) toplev.h $(DIAGNOSTIC_H) -SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h +SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h \ + $(srcdir)/../include/safe-ctype.h $(srcdir)/../include/filenames.h PREDICT_H = predict.h predict.def CPPLIB_H = $(srcdir)/../libcpp/include/line-map.h \ $(srcdir)/../libcpp/include/cpplib.h +INPUT_H = $(srcdir)/../libcpp/include/line-map.h input.h DECNUM_H = $(DECNUM)/decContext.h $(DECNUM)/decDPD.h $(DECNUM)/decNumber.h \ $(DECNUMFMT)/decimal32.h $(DECNUMFMT)/decimal64.h \ $(DECNUMFMT)/decimal128.h $(DECNUMFMT)/decimal128Local.h MKDEPS_H = $(srcdir)/../libcpp/include/mkdeps.h -SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h +SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h $(OBSTACK_H) CPP_ID_DATA_H = $(CPPLIB_H) $(srcdir)/../libcpp/include/cpp-id-data.h -TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) +CPP_INTERNAL_H = $(srcdir)/../libcpp/internal.h $(CPP_ID_DATA_H) +TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) tree-pass.h TREE_GIMPLE_H = tree-gimple.h tree-iterator.h TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \ - bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h $(TREE_GIMPLE_H) \ + $(BITMAP_H) $(BASIC_BLOCK_H) hard-reg-set.h $(TREE_GIMPLE_H) \ $(HASHTAB_H) $(CGRAPH_H) $(IPA_REFERENCE_H) TREE_SSA_LIVE_H = tree-ssa-live.h $(PARTITION_H) vecprim.h -PRETTY_PRINT_H = pretty-print.h input.h $(OBSTACK_H) +PRETTY_PRINT_H = pretty-print.h $(INPUT_H) $(OBSTACK_H) DIAGNOSTIC_H = diagnostic.h diagnostic.def $(PRETTY_PRINT_H) options.h C_PRETTY_PRINT_H = c-pretty-print.h $(PRETTY_PRINT_H) $(C_COMMON_H) $(TREE_H) SCEV_H = tree-scalar-evolution.h $(GGC_H) tree-chrec.h $(PARAMS_H) @@ -862,7 +882,9 @@ TREE_INLINE_H = tree-inline.h $(VARRAY_H) pointer-set.h REAL_H = real.h $(MACHMODE_H) DBGCNT_H = dbgcnt.h dbgcnt.def EBIMAP_H = ebitmap.h sbitmap.h -IPA_PROP_H = $(TREE_H) vec.h +IPA_PROP_H = ipa-prop.h $(TREE_H) vec.h +GSTAB_H = gstab.h stab.def +BITMAP_H = bitmap.h $(HASHTAB_H) statistics.h # # Now figure out from those variables how to compile and link. @@ -1249,7 +1271,6 @@ OBJS-common = \ tree-vect-patterns.o \ tree-vect-transform.o \ tree-vectorizer.o \ - tree-vn.o \ tree-vrp.o \ tree.o \ value-prof.o \ @@ -1794,9 +1815,9 @@ s-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H) c-errors.o: c-errors.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(C_TREE_H) $(FLAGS_H) $(DIAGNOSTIC_H) $(TM_P_H) c-parser.o : c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - $(GGC_H) $(TIMEVAR_H) $(C_TREE_H) input.h $(FLAGS_H) toplev.h output.h \ - $(CPPLIB_H) gt-c-parser.h langhooks.h $(C_COMMON_H) $(C_PRAGMA_H) \ - vec.h $(TARGET_H) + $(GGC_H) $(TIMEVAR_H) $(C_TREE_H) $(INPUT_H) $(FLAGS_H) toplev.h output.h \ + $(CPPLIB_H) gt-c-parser.h $(RTL_H) langhooks.h $(C_COMMON_H) $(C_PRAGMA_H) \ + vec.h $(TARGET_H) $(CGRAPH_H) srcextra: gcc.srcextra lang.srcextra @@ -1812,8 +1833,8 @@ c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(EXPR_H) debug.h toplev.h intl.h $(TM_P_H) $(TREE_INLINE_H) $(TIMEVAR_H) \ opts.h $(C_PRAGMA_H) gt-c-decl.h $(CGRAPH_H) $(HASHTAB_H) libfuncs.h \ except.h $(LANGHOOKS_DEF_H) $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) \ - $(DIAGNOSTIC_H) input.h langhooks.h $(TREE_GIMPLE_H) tree-mudflap.h \ - pointer-set.h + $(DIAGNOSTIC_H) $(INPUT_H) langhooks.h $(TREE_GIMPLE_H) tree-mudflap.h \ + pointer-set.h $(BASIC_BLOCK_H) c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \ $(RTL_H) toplev.h $(TM_P_H) langhooks.h $(GGC_H) $(TREE_FLOW_H) \ @@ -1826,11 +1847,10 @@ stub-objc.o : stub-objc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \ $(C_COMMON_H) c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) debug.h $(C_TREE_H) $(C_COMMON_H) $(REAL_H) $(SPLAY_TREE_H) \ - $(C_PRAGMA_H) input.h intl.h $(FLAGS_H) toplev.h output.h \ + $(C_PRAGMA_H) $(INPUT_H) intl.h $(FLAGS_H) toplev.h output.h \ $(CPPLIB_H) $(TARGET_H) $(TIMEVAR_H) $(TM_P_H) c-ppoutput.o : c-ppoutput.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(C_COMMON_H) $(TREE_H) $(CPPLIB_H) $(srcdir)/../libcpp/internal.h \ - $(C_PRAGMA_H) + $(C_COMMON_H) $(TREE_H) $(CPPLIB_H) $(CPP_INTERNAL_H) $(C_PRAGMA_H) c-objc-common.o : c-objc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(TREE_H) $(C_TREE_H) $(RTL_H) insn-config.h $(INTEGRATE_H) \ $(FUNCTION_H) $(FLAGS_H) toplev.h $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(VARRAY_H) \ @@ -1843,14 +1863,16 @@ c-convert.o : c-convert.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ langhooks.h $(TARGET_H) c-pragma.o: c-pragma.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FUNCTION_H) $(C_PRAGMA_H) toplev.h output.h $(GGC_H) $(TM_P_H) \ - $(C_COMMON_H) $(TARGET_H) gt-c-pragma.h $(CPPLIB_H) $(FLAGS_H) + $(C_COMMON_H) $(TARGET_H) gt-c-pragma.h $(CPPLIB_H) $(FLAGS_H) $(DIAGNOSTIC_H) \ + opts.h graph.o: graph.c $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(FLAGS_H) output.h \ - $(RTL_H) $(FUNCTION_H) hard-reg-set.h $(BASIC_BLOCK_H) graph.h $(OBSTACK_H) + $(RTL_H) $(FUNCTION_H) hard-reg-set.h $(BASIC_BLOCK_H) graph.h $(OBSTACK_H) \ + $(CONFIG_H) sbitmap.o: sbitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) ebitmap.o: ebitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(EBITMAP_H) -sparseset.o: sparseset.c $(SYSTEM_H) sparseset.h + $(EBITMAP_H) $(RTL_H) $(FLAGS_H) $(OBSTACK_H) +sparseset.o: sparseset.c $(SYSTEM_H) sparseset.h $(CONFIG_H) COLLECT2_OBJS = collect2.o tlink.o intl.o version.o COLLECT2_LIBS = @COLLECT2_LIBS@ @@ -1877,7 +1899,7 @@ c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(DIAGNOSTIC_H) gt-c-common.h langhooks.h $(VARRAY_H) $(RTL_H) \ $(TARGET_H) $(C_TREE_H) tree-iterator.h langhooks.h tree-mudflap.h \ intl.h opts.h $(REAL_H) $(CPPLIB_H) $(TREE_INLINE_H) $(HASHTAB_H) \ - $(BUILTINS_DEF) + $(BUILTINS_DEF) $(CGRAPH_H) $(BASIC_BLOCK_H) $(TARGET_DEF_H) c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \ $(C_TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(REAL_H) \ @@ -1886,7 +1908,8 @@ c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \ c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(C_PRAGMA_H) $(FLAGS_H) toplev.h langhooks.h \ $(TREE_INLINE_H) $(DIAGNOSTIC_H) intl.h debug.h $(C_COMMON_H) \ - opts.h options.h $(MKDEPS_H) incpath.h cppdefault.h $(TM_P_H) + opts.h options.h $(MKDEPS_H) incpath.h cppdefault.h $(TARGET_H) \ + $(TM_P_H) $(VARRAY_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ $< $(OUTPUT_OPTION) @TARGET_SYSTEM_ROOT_DEFINE@ @@ -1917,13 +1940,14 @@ c-dump.o : c-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ c-pch.o : c-pch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(CPPLIB_H) $(TREE_H) \ $(C_COMMON_H) output.h toplev.h $(C_PRAGMA_H) $(GGC_H) debug.h \ - langhooks.h $(FLAGS_H) hosthooks.h version.h $(TARGET_H) + langhooks.h $(FLAGS_H) hosthooks.h version.h $(TARGET_H) opts.h $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ -DHOST_MACHINE=\"$(host)\" -DTARGET_MACHINE=\"$(target)\" \ $< $(OUTPUT_OPTION) c-omp.o : c-omp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - $(FUNCTION_H) $(C_COMMON_H) toplev.h $(TREE_GIMPLE_H) + $(FUNCTION_H) $(C_COMMON_H) toplev.h $(TREE_GIMPLE_H) $(BITMAP_H) \ + langhooks.h # Language-independent files. @@ -1999,10 +2023,12 @@ endif -DBUGURL=$(BUGURL_s) -c $(srcdir)/version.c $(OUTPUT_OPTION) gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) bitmap.h $(TREE_H) $(RTL_H) \ - $(FUNCTION_H) insn-config.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \ - cselib.h insn-addr.h $(OPTABS_H) libfuncs.h debug.h $(GGC_H) \ - $(CGRAPH_H) $(TREE_FLOW_H) reload.h $(CPP_ID_DATA_H) + $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) $(OBSTACK_H) $(BITMAP_H) \ + input.h $(TREE_H) $(RTL_H) $(FUNCTION_H) insn-config.h $(EXPR_H) \ + hard-reg-set.h $(BASIC_BLOCK_H) cselib.h $(INSN_ADDR_H) $(OPTABS_H) \ + libfuncs.h debug.h $(GGC_H) $(CGRAPH_H) $(TREE_FLOW_H) reload.h \ + $(CPP_ID_DATA_H) tree-chrec.h $(CFGLAYOUT_H) except.h output.h \ + $(CFGLOOP_H) ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H) \ $(HASHTAB_H) toplev.h $(PARAMS_H) hosthooks.h $(HOSTHOOKS_DEF_H) @@ -2012,7 +2038,7 @@ ggc-page.o: ggc-page.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TR ggc-zone.o: ggc-zone.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) toplev.h $(GGC_H) $(TIMEVAR_H) $(TM_P_H) \ - $(PARAMS_H) bitmap.h $(VARRAY_H) + $(PARAMS_H) $(BITMAP_H) $(VARRAY_H) ggc-none.o: ggc-none.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H) \ $(BCONFIG_H) @@ -2033,8 +2059,8 @@ double-int.o: double-int.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) toplev.h $(TREE_INLINE_H) $(RTL_H) insn-config.h $(INTEGRATE_H) \ - langhooks.h $(LANGHOOKS_DEF_H) $(FLAGS_H) $(GGC_H) $(DIAGNOSTIC_H) intl.h \ - $(TREE_GIMPLE_H) + langhooks.h $(TARGET_H) $(LANGHOOKS_DEF_H) $(FLAGS_H) $(GGC_H) $(DIAGNOSTIC_H) \ + intl.h $(TREE_GIMPLE_H) tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ all-tree.def $(FLAGS_H) $(FUNCTION_H) $(PARAMS_H) \ toplev.h $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h \ @@ -2044,42 +2070,45 @@ tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) langhooks.h toplev.h $(SPLAY_TREE_H) $(TREE_DUMP_H) \ tree-iterator.h tree-pass.h $(DIAGNOSTIC_H) $(REAL_H) fixed-value.h tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) $(RTL_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) input.h insn-config.h \ - $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h \ - langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) intl.h $(FUNCTION_H) $(TREE_GIMPLE_H) \ - debug.h $(DIAGNOSTIC_H) $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \ - $(IPA_PROP_H) value-prof.h $(TARGET_H) $(INTEGRATE_H) + $(TREE_H) $(RTL_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \ + $(VARRAY_H) $(HASHTAB_H) toplev.h langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \ + intl.h $(FUNCTION_H) $(GGC_H) $(TREE_GIMPLE_H) \ + debug.h $(DIAGNOSTIC_H) except.h $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \ + $(IPA_PROP_H) value-prof.h tree-pass.h $(TARGET_H) $(INTEGRATE_H) print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(GGC_H) langhooks.h $(REAL_H) tree-iterator.h fixed-value.h $(TREE_FLOW_H) stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) $(PARAMS_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(RTL_H) \ + $(TREE_H) $(PARAMS_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) output.h $(RTL_H) \ $(GGC_H) $(TM_P_H) $(TARGET_H) langhooks.h $(REGS_H) gt-stor-layout.h \ toplev.h tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \ - $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \ - $(TM_H) coretypes.h $(CGRAPH_H) tree-pass.h $(TIMEVAR_H) \ - gt-tree-ssa-structalias.h $(PARAMS_H) $(ALIAS_H) pointer-set.h $(FUNCTION_H) + $(SYSTEM_H) $(CONFIG_H) coretypes.h $(TM_H) $(GGC_H) $(OBSTACK_H) $(BITMAP_H) \ + $(FLAGS_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) output.h errors.h \ + $(DIAGNOSTIC_H) $(TREE_H) $(C_COMMON_H) $(TREE_FLOW_H) $(TREE_INLINE_H) varray.h \ + $(C_TREE_H) $(TREE_GIMPLE_H) $(HASHTAB_H) $(FUNCTION_H) $(CGRAPH_H) tree-pass.h \ + $(TIMEVAR_H) alloc-pool.h $(SPLAY_TREE_H) $(PARAMS_H) gt-tree-ssa-structalias.h \ + $(CGRAPH_H) $(ALIAS_H) pointer-set.h tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ - $(TREE_DUMP_H) langhooks.h tree-pass.h $(BASIC_BLOCK_H) bitmap.h \ + $(TREE_DUMP_H) langhooks.h tree-pass.h $(BASIC_BLOCK_H) $(BITMAP_H) \ $(FLAGS_H) $(GGC_H) hard-reg-set.h $(HASHTAB_H) pointer-set.h \ $(TREE_GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) tree-into-ssa.o : tree-into-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ langhooks.h domwalk.h tree-pass.h $(GGC_H) $(PARAMS_H) $(BASIC_BLOCK_H) \ - bitmap.h $(CFGLOOP_H) $(FLAGS_H) hard-reg-set.h $(HASHTAB_H) \ + $(BITMAP_H) $(CFGLOOP_H) $(FLAGS_H) hard-reg-set.h $(HASHTAB_H) \ $(TREE_GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) vecprim.h tree-ssa-ter.o : tree-ssa-ter.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ - $(TREE_SSA_LIVE_H) bitmap.h + $(TREE_SSA_LIVE_H) $(BITMAP_H) tree-ssa-coalesce.o : tree-ssa-coalesce.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ - $(TREE_SSA_LIVE_H) bitmap.h $(FLAGS_H) $(HASHTAB_H) toplev.h + $(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) toplev.h tree-outof-ssa.o : tree-outof-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ - tree-pass.h $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) bitmap.h $(GGC_H) toplev.h + tree-pass.h $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) $(BITMAP_H) $(GGC_H) toplev.h tree-ssa-dse.o : tree-ssa-dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \ $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) domwalk.h $(FLAGS_H) \ @@ -2098,7 +2127,7 @@ tree-ssa-ifcombine.o : tree-ssa-ifcombine.c $(CONFIG_H) $(SYSTEM_H) \ tree-ssa-phiopt.o : tree-ssa-phiopt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \ $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) langhooks.h $(FLAGS_H) \ - $(DIAGNOSTIC_H) $(TIMEVAR_H) + $(DIAGNOSTIC_H) $(TIMEVAR_H) pointer-set.h domwalk.h tree-nrv.o : tree-nrv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(TREE_H) $(RTL_H) $(FUNCTION_H) $(BASIC_BLOCK_H) $(EXPR_H) \ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TREE_DUMP_H) tree-pass.h \ @@ -2111,7 +2140,8 @@ tree-ssa-propagate.o : tree-ssa-propagate.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \ $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ $(TREE_DUMP_H) $(BASIC_BLOCK_H) tree-pass.h langhooks.h \ - tree-ssa-propagate.h vec.h gt-tree-ssa-propagate.h $(FLAGS_H) $(VARRAY_H) + tree-ssa-propagate.h vec.h value-prof.h gt-tree-ssa-propagate.h $(FLAGS_H) \ + $(VARRAY_H) tree-ssa-dom.o : tree-ssa-dom.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \ $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ @@ -2123,9 +2153,10 @@ tree-ssa-uncprop.o : tree-ssa-uncprop.c $(TREE_FLOW_H) $(CONFIG_H) \ $(TREE_DUMP_H) $(BASIC_BLOCK_H) domwalk.h tree-pass.h $(FLAGS_H) \ langhooks.h tree-ssa-propagate.h $(REAL_H) tree-ssa-threadedge.o : tree-ssa-threadedge.c $(TREE_FLOW_H) $(CONFIG_H) \ - $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \ - $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ - $(BASIC_BLOCK_H) $(FLAGS_H) tree-pass.h $(CFGLOOP_H) + $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(FLAGS_H) $(RTL_H) $(TM_P_H) $(GGC_H) \ + $(BASIC_BLOCK_H) $(CFGLOOP_H) output.h $(EXPR_H) \ + $(FUNCTION_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TREE_DUMP_H) $(TREE_FLOW_H) \ + domwalk.h $(REAL_H) tree-pass.h tree-ssa-propagate.h langhooks.h $(PARAMS_H) tree-ssa-threadupdate.o : tree-ssa-threadupdate.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \ $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ @@ -2139,54 +2170,52 @@ domwalk.o : domwalk.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) domwalk.h $(GGC_H) tree-ssa-live.o : tree-ssa-live.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ - $(TREE_SSA_LIVE_H) bitmap.h toplev.h + $(TREE_SSA_LIVE_H) $(BITMAP_H) toplev.h debug.h $(FLAGS_H) tree-ssa-copyrename.o : tree-ssa-copyrename.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) tree-pass.h \ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) \ - bitmap.h $(FLAGS_H) $(HASHTAB_H) langhooks.h $(TREE_GIMPLE_H) \ + $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) langhooks.h $(TREE_GIMPLE_H) \ $(TREE_INLINE_H) tree-ssa-pre.o : tree-ssa-pre.c $(TREE_FLOW_H) $(CONFIG_H) \ - $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ - $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(CFGLOOP_H) \ - alloc-pool.h $(BASIC_BLOCK_H) bitmap.h $(HASHTAB_H) $(TREE_GIMPLE_H) \ - $(TREE_INLINE_H) tree-iterator.h tree-ssa-sccvn.h $(PARAMS_H) + $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(FIBHEAP_H) \ + $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) langhooks.h $(CFGLOOP_H) \ + alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) $(HASHTAB_H) $(TREE_GIMPLE_H) \ + $(TREE_INLINE_H) tree-iterator.h tree-ssa-sccvn.h $(PARAMS_H) \ + $(DBGCNT_H) tree-ssa-sccvn.o : tree-ssa-sccvn.c $(TREE_FLOW_H) $(CONFIG_H) \ - $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ + $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(FIBHEAP_H) \ $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(CFGLOOP_H) \ - alloc-pool.h $(BASIC_BLOCK_H) bitmap.h $(HASHTAB_H) $(TREE_GIMPLE_H) \ + alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) langhooks.h $(HASHTAB_H) $(TREE_GIMPLE_H) \ $(TREE_INLINE_H) tree-iterator.h tree-ssa-propagate.h tree-ssa-sccvn.h \ $(PARAMS_H) -tree-vn.o : tree-vn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) \ - $(TREE_H) $(TREE_FLOW_H) $(HASHTAB_H) langhooks.h tree-pass.h \ - $(TREE_DUMP_H) $(DIAGNOSTIC_H) tree-ssa-sccvn.h tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(GGC_H) \ $(BASIC_BLOCK_H) tree-ssa-propagate.h $(FLAGS_H) $(TREE_DUMP_H) \ - $(CFGLOOP_H) $(SCEV_H) tree-chrec.h $(TIMEVAR_H) toplev.h intl.h + $(CFGLOOP_H) tree-chrec.h $(TIMEVAR_H) toplev.h intl.h tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \ $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) tree-pass.h \ $(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h toplev.h \ - tree-ssa-propagate.h $(TREE_INLINE_H) + value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H) tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \ $(DIAGNOSTIC_H) toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) tree-pass.h \ $(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(HASHTAB_H) toplev.h \ - tree-ssa-propagate.h + tree-ssa-propagate.h tree-scalar-evolution.h rtl-factoring.o : rtl-factoring.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ - coretypes.h $(TM_H) $(BASIC_BLOCK_H) $(GGC_H) $(REGS_H) $(PARAMS_H) $(EXPR_H) \ - addresses.h $(TM_P_H) tree-pass.h $(TREE_FLOW_H) $(TIMEVAR_H) output.h \ - $(DF_H) + coretypes.h $(TM_H) $(BASIC_BLOCK_H) $(RESOURCE_H) $(GGC_H) $(REGS_H) \ + $(PARAMS_H) $(EXPR_H) addresses.h $(TM_P_H) tree-pass.h $(TREE_FLOW_H) \ + $(TIMEVAR_H) output.h $(DF_H) tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(FUNCTION_H) $(TM_H) coretypes.h \ $(TREE_DUMP_H) $(DIAGNOSTIC_H) except.h tree-pass.h $(FLAGS_H) langhooks.h \ - $(BASIC_BLOCK_H) hard-reg-set.h + $(BASIC_BLOCK_H) hard-reg-set.h $(DBGCNT_H) tree-ssa-sink.o : tree-ssa-sink.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) alloc-pool.h \ - $(BASIC_BLOCK_H) bitmap.h $(CFGLOOP_H) $(FIBHEAP_H) $(HASHTAB_H) \ + $(BASIC_BLOCK_H) $(BITMAP_H) $(CFGLOOP_H) $(FIBHEAP_H) $(HASHTAB_H) \ langhooks.h $(REAL_H) $(TREE_GIMPLE_H) $(TREE_INLINE_H) tree-iterator.h tree-nested.o: tree-nested.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \ $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(TREE_DUMP_H) $(TREE_INLINE_H) \ @@ -2206,18 +2235,17 @@ tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ tree-pass.h $(PARAMS_H) $(CGRAPH_H) $(BASIC_BLOCK_H) hard-reg-set.h \ $(TREE_GIMPLE_H) tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \ - $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) errors.h $(TREE_INLINE_H) \ + $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \ $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) tree-pass.h toplev.h \ coretypes.h langhooks.h $(IPA_REFERENCE_H) tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) except.h langhooks.h \ $(GGC_H) tree-pass.h coretypes.h $(TIMEVAR_H) $(TM_P_H) pointer-set.h \ $(TREE_DUMP_H) $(TREE_INLINE_H) tree-iterator.h toplev.h -tree-ssa-loop.o : tree-ssa-loop.c $(TREE_FLOW_H) $(CONFIG_H) \ - $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) \ - output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ - tree-pass.h $(FLAGS_H) $(TREE_INLINE_H) $(SCEV_H) $(BASIC_BLOCK_H) \ - hard-reg-set.h +tree-ssa-loop.o : tree-ssa-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ + $(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) output.h \ + $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) tree-pass.h $(TIMEVAR_H) \ + $(CFGLOOP_H) $(FLAGS_H) $(TREE_INLINE_H) tree-scalar-evolution.h tree-ssa-loop-unswitch.o : tree-ssa-loop-unswitch.c $(TREE_FLOW_H) \ $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) \ domwalk.h $(PARAMS_H) output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \ @@ -2231,7 +2259,7 @@ tree-ssa-address.o : tree-ssa-address.c $(TREE_FLOW_H) $(CONFIG_H) \ tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \ $(TREE_INLINE_H) output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ - $(FLAGS_H) tree-pass.h $(SCEV_H) $(TREE_DATA_REF_H) $(BASIC_BLOCK_H) \ + toplev.h $(FLAGS_H) tree-pass.h $(SCEV_H) $(TREE_DATA_REF_H) $(BASIC_BLOCK_H) \ $(GGC_H) hard-reg-set.h tree-chrec.h intl.h tree-ssa-loop-ivcanon.o : tree-ssa-loop-ivcanon.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \ @@ -2252,7 +2280,7 @@ tree-ssa-loop-prefetch.o: tree-ssa-loop-prefetch.c $(TREE_FLOW_H) $(CONFIG_H) \ tree-predcom.o: tree-predcom.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) \ $(CFGLOOP_H) $(TREE_FLOW_H) $(GGC_H) $(TREE_DATA_REF_H) $(SCEV_H) \ $(PARAMS_H) $(DIAGNOSTIC_H) tree-pass.h $(TM_H) coretypes.h tree-affine.h \ - tree-inline.h + $(TREE_INLINE_H) tree-ssa-loop-ivopts.o : tree-ssa-loop-ivopts.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(EXPR_H) \ output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ @@ -2260,20 +2288,20 @@ tree-ssa-loop-ivopts.o : tree-ssa-loop-ivopts.c $(TREE_FLOW_H) $(CONFIG_H) \ $(CFGLOOP_H) $(PARAMS_H) langhooks.h $(BASIC_BLOCK_H) hard-reg-set.h \ tree-chrec.h $(VARRAY_H) tree-affine.h pointer-set.h $(TARGET_H) tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \ - $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(TREE_GIMPLE_H) \ + $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) hard-reg-set.h $(TREE_GIMPLE_H) \ output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(FLAGS_H) tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \ - $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) \ - output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ - tree-pass.h $(CFGLAYOUT_H) $(SCEV_H) $(BASIC_BLOCK_H) hard-reg-set.h \ + $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h \ + $(BASIC_BLOCK_H) output.h $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \ + $(TIMEVAR_H) $(CFGLOOP_H) tree-pass.h $(CFGLAYOUT_H) tree-scalar-evolution.h \ $(PARAMS_H) $(TREE_INLINE_H) tree-ssa-loop-im.o : tree-ssa-loop-im.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) domwalk.h \ $(PARAMS_H) output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(REAL_H) $(BASIC_BLOCK_H) \ - hard-reg-set.h tree-ssa-propagate.h -tree-ssa-math-opts.o : tree-ssa-math-opts.c $(TREE_FLOW_H) $(CONFIG_H) \ - $(SYSTEM_H) $(TREE_H) $(TIMEVAR_H) tree-pass.h $(TM_H) $(FLAGS_H) \ + hard-reg-set.h pointer-set.h tree-affine.h tree-ssa-propagate.h +tree-ssa-math-opts.o : tree-ssa-math-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ + $(TM_H) $(FLAGS_H) $(TREE_H) $(TREE_FLOW_H) $(REAL_H) $(TIMEVAR_H) tree-pass.h \ alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H) tree-ssa-alias-warnings.o : tree-ssa-alias-warnings.c \ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(TREE_DUMP_H) \ @@ -2289,14 +2317,15 @@ tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) errors.h $(TIMEVAR_H) \ $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) tree-iterator.h\ - $(BASIC_BLOCK_H) $(TREE_GIMPLE_H) $(TREE_INLINE_H) vec.h \ + $(BASIC_BLOCK_H) $(TREE_GIMPLE_H) $(TREE_INLINE_H) vec.h langhooks.h \ alloc-pool.h pointer-set.h $(CFGLOOP_H) tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ - $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \ - $(FLAGS_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) toplev.h \ - $(FUNCTION_H) langhooks.h $(FLAGS_H) $(CGRAPH_H) $(TREE_INLINE_H) \ - tree-mudflap.h $(GGC_H) $(CGRAPH_H) tree-pass.h $(CFGLOOP_H) \ - $(BASIC_BLOCK_H) graph.h hard-reg-set.h + $(RTL_H) $(TREE_H) $(TM_P_H) hard-reg-set.h $(EXPR_H) $(GGC_H) output.h \ + $(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ + $(TREE_DUMP_H) toplev.h $(FUNCTION_H) langhooks.h $(FLAGS_H) $(CGRAPH_H) \ + $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) tree-pass.h \ + $(CFGLOOP_H) except.h + c-gimplify.o : c-gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ $(C_TREE_H) $(C_COMMON_H) $(DIAGNOSTIC_H) $(TREE_GIMPLE_H) $(VARRAY_H) \ $(FLAGS_H) langhooks.h toplev.h $(RTL_H) $(TREE_FLOW_H) $(LANGHOOKS_DEF_H) \ @@ -2316,12 +2345,12 @@ gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(TREE_GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_H) \ $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) toplev.h tree-pass.h \ - $(GGC_H) $(SPLAY_TREE_H) $(OPTABS_H) $(CFGLOOP_H) + $(GGC_H) except.h $(SPLAY_TREE_H) $(OPTABS_H) $(CFGLOOP_H) tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) \ $(TM_H) coretypes.h omega.o : omega.c omega.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - errors.h $(GGC_H) $(TREE_H) $(DIAGNOSTIC_H) varray.h tree-pass.h + errors.h $(GGC_H) $(TREE_H) $(DIAGNOSTIC_H) varray.h tree-pass.h $(PARAMS_H) tree-chrec.o: tree-chrec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(GGC_H) $(TREE_H) $(REAL_H) $(SCEV_H) tree-pass.h $(PARAMS_H) \ $(DIAGNOSTIC_H) $(CFGLOOP_H) $(TREE_FLOW_H) @@ -2337,11 +2366,12 @@ tree-data-ref.o: tree-data-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ tree-vect-analyze.o: tree-vect-analyze.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RECOG_H) $(BASIC_BLOCK_H) \ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \ - tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) tree-chrec.h + tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) tree-chrec.h \ + toplev.h $(RECOG_H) tree-vect-patterns.o: tree-vect-patterns.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) errors.h $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \ - $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \ - tree-vectorizer.h $(TREE_DATA_REF_H) $(EXPR_H) $(TARGET_H) + $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \ + $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(EXPR_H) \ + $(OPTABS_H) $(PARAMS_H) $(TREE_DATA_REF_H) tree-vectorizer.h $(RECOG_H) toplev.h tree-vect-transform.o: tree-vect-transform.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(GGC_H) $(OPTABS_H) $(RECOG_H) $(TREE_H) $(RTL_H) \ $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \ @@ -2351,8 +2381,8 @@ tree-vect-transform.o: tree-vect-transform.c $(CONFIG_H) $(SYSTEM_H) \ tree-vectorizer.o: tree-vectorizer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \ - tree-pass.h $(EXPR_H) tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) \ - input.h $(TARGET_H) $(CFGLAYOUT_H) toplev.h tree-chrec.h + tree-pass.h $(EXPR_H) $(RECOG_H) tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) \ + $(INPUT_H) $(TARGET_H) $(CFGLAYOUT_H) toplev.h tree-chrec.h tree-loop-linear.o: tree-loop-linear.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \ @@ -2362,7 +2392,7 @@ tree-loop-distribution.o: tree-loop-distribution.c $(CONFIG_H) $(SYSTEM_H) coret $(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \ tree-pass.h $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) \ - $(TARGET_H) tree-chrec.h tree-vectorizer.h + $(TARGET_H) tree-chrec.h langhooks.h tree-vectorizer.h tree-parloops.o: tree-parloops.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_FLOW_H) $(TREE_H) $(RTL_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(GGC_H) \ $(DIAGNOSTIC_H) tree-pass.h $(SCEV_H) langhooks.h gt-tree-parloops.h \ @@ -2371,10 +2401,10 @@ tree-stdarg.o: tree-stdarg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(FUNCTION_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) tree-pass.h \ tree-stdarg.h $(TARGET_H) langhooks.h tree-object-size.o: tree-object-size.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) tree-pass.h \ + $(TM_H) $(TREE_H) toplev.h $(DIAGNOSTIC_H) $(TREE_FLOW_H) tree-pass.h \ tree-ssa-propagate.h tree-gimple.o : tree-gimple.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(EXPR_H) \ - $(RTL_H) $(TREE_GIMPLE_H) $(TM_H) coretypes.h bitmap.h $(GGC_H) \ + $(RTL_H) $(TREE_GIMPLE_H) $(TM_H) coretypes.h $(BITMAP_H) $(GGC_H) \ output.h $(TREE_FLOW_H) tree-mudflap.o : $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TREE_INLINE_H) \ $(TREE_GIMPLE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) langhooks.h tree-mudflap.h \ @@ -2391,20 +2421,20 @@ tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \ value-prof.h fixed-value.h output.h fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(FLAGS_H) $(REAL_H) toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) \ - $(GGC_H) $(TM_P_H) langhooks.h $(MD5_H) intl.h fixed-value.h + $(GGC_H) $(TM_P_H) langhooks.h $(MD5_H) intl.h fixed-value.h $(TARGET_H) diagnostic.o : diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) version.h $(TM_P_H) $(FLAGS_H) input.h toplev.h intl.h \ + $(TREE_H) version.h $(TM_P_H) $(FLAGS_H) $(INPUT_H) toplev.h intl.h \ $(DIAGNOSTIC_H) langhooks.h $(LANGHOOKS_DEF_H) diagnostic.def opts.h opts.o : opts.c opts.h options.h toplev.h $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TREE_H) $(TM_H) langhooks.h $(GGC_H) $(RTL_H) \ output.h $(DIAGNOSTIC_H) $(TM_P_H) $(INSN_ATTR_H) intl.h $(TARGET_H) \ - $(FLAGS_H) $(PARAMS_H) tree-pass.h $(DBGCNT_H) debug.h + $(FLAGS_H) $(PARAMS_H) tree-pass.h $(DBGCNT_H) debug.h varray.h opts-common.o : opts-common.c opts.h $(CONFIG_H) $(SYSTEM_H) \ coretypes.h intl.h targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \ $(EXPR_H) $(TM_H) $(RTL_H) $(TM_P_H) $(FUNCTION_H) output.h toplev.h \ $(MACHMODE_H) $(TARGET_DEF_H) $(TARGET_H) $(GGC_H) gt-targhooks.h \ - $(OPTABS_H) + $(OPTABS_H) $(RECOG_H) reload.h #### added for Basilys a.k.a. MELT http://gcc.gnu.org/wiki/MiddleEndLispTranslator ## we pass the MELT_PRIVATE_INCLUDE_DIR @@ -2431,20 +2461,20 @@ endif ### end of Basilys stuff toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - version.h $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h input.h \ + version.h $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) \ $(INSN_ATTR_H) output.h $(DIAGNOSTIC_H) debug.h insn-config.h intl.h \ $(RECOG_H) Makefile toplev.h dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \ hard-reg-set.h $(BASIC_BLOCK_H) graph.h except.h $(REGS_H) $(TIMEVAR_H) \ value-prof.h $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \ langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) hosthooks.h \ $(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) $(INTEGRATE_H) \ - $(CPPLIB_H) opts.h params.def tree-mudflap.h $(REAL_H) tree-pass.h + opts.h params.def tree-mudflap.h $(REAL_H) tree-pass.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ -DTARGET_NAME=\"$(target_noncanonical)\" \ -c $(srcdir)/toplev.c $(OUTPUT_OPTION) passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h input.h $(INSN_ATTR_H) output.h \ + $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) $(INSN_ATTR_H) output.h \ $(DIAGNOSTIC_H) debug.h insn-config.h intl.h $(RECOG_H) toplev.h \ dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \ graph.h except.h $(REGS_H) $(TIMEVAR_H) value-prof.h \ @@ -2460,8 +2490,8 @@ host-default.o : host-default.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ hosthooks.h $(HOSTHOOKS_DEF_H) rtl-error.o: rtl-error.c $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - $(INSN_ATTR_H) insn-config.h input.h toplev.h intl.h $(DIAGNOSTIC_H) \ - $(CONFIG_H) + $(INSN_ATTR_H) insn-config.h $(INPUT_H) toplev.h intl.h $(DIAGNOSTIC_H) \ + $(CONFIG_H) varray.h rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(GGC_H) $(BCONFIG_H) insn-notes.def reg-notes.def toplev.h $(REAL_H) @@ -2478,15 +2508,15 @@ varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) hard-reg-set.h $(REGS_H) \ output.h $(C_PRAGMA_H) toplev.h xcoffout.h debug.h $(GGC_H) $(TM_P_H) \ $(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h $(BASIC_BLOCK_H) \ - $(CFGLAYOUT_H) $(CGRAPH_H) tree-mudflap.h $(REAL_H) + $(CFGLAYOUT_H) $(CGRAPH_H) targhooks.h tree-mudflap.h $(REAL_H) tree-iterator.h function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(CFGLAYOUT_H) $(TREE_GIMPLE_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) \ $(OPTABS_H) libfuncs.h $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \ output.h toplev.h except.h $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \ gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(PREDICT_H) \ - tree-pass.h $(DF_H) timevar.h vecprim.h + tree-pass.h $(DF_H) $(TIMEVAR_H) vecprim.h statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(FLAGS_H) $(FUNCTION_H) $(HASHTAB_H) $(TREE_DUMP_H) tree-pass.h + tree-pass.h $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(TM_H) $(FUNCTION_H) stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) $(FUNCTION_H) insn-config.h hard-reg-set.h $(EXPR_H) \ libfuncs.h except.h $(RECOG_H) toplev.h output.h $(GGC_H) $(TM_P_H) \ @@ -2504,16 +2534,16 @@ expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ typeclass.h hard-reg-set.h toplev.h hard-reg-set.h except.h reload.h \ $(GGC_H) langhooks.h intl.h $(TM_P_H) $(REAL_H) $(TARGET_H) \ tree-iterator.h gt-expr.h $(MACHMODE_H) $(TIMEVAR_H) $(TREE_FLOW_H) \ - tree-pass.h $(DF_H) $(DIAGNOSTIC_H) + tree-pass.h $(DF_H) $(DIAGNOSTIC_H) vecprim.h dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \ - langhooks.h $(GGC_H) gt-dojump.h + langhooks.h $(GGC_H) gt-dojump.h vecprim.h builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(TREE_GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \ $(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \ hard-reg-set.h toplev.h hard-reg-set.h except.h $(TM_P_H) $(PREDICT_H) \ libfuncs.h $(REAL_H) langhooks.h $(BASIC_BLOCK_H) tree-mudflap.h \ - $(BUILTINS_DEF) $(MACHMODE_H) $(DIAGNOSTIC_H) + $(BUILTINS_DEF) $(MACHMODE_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) value-prof.h calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) langhooks.h $(TARGET_H) \ libfuncs.h $(REGS_H) toplev.h output.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_P_H) \ @@ -2531,7 +2561,7 @@ optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ gt-optabs.h $(BASIC_BLOCK_H) $(TARGET_H) $(FUNCTION_H) dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(FLAGS_H) $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) $(FUNCTION_H) \ - langhooks.h insn-config.h reload.h gstab.h xcoffout.h output.h dbxout.h \ + langhooks.h insn-config.h reload.h $(GSTAB_H) xcoffout.h output.h dbxout.h \ toplev.h $(GGC_H) $(OBSTACK_H) $(EXPR_H) gt-dbxout.h debug.o : debug.c debug.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) debug.h \ @@ -2543,22 +2573,22 @@ dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ output.h $(DIAGNOSTIC_H) $(REAL_H) hard-reg-set.h $(REGS_H) $(EXPR_H) \ libfuncs.h toplev.h dwarf2out.h reload.h $(GGC_H) except.h dwarf2asm.h \ $(TM_P_H) langhooks.h $(HASHTAB_H) gt-dwarf2out.h $(TARGET_H) $(CGRAPH_H) \ - $(MD5_H) input.h $(FUNCTION_H) $(VARRAY_H) + $(MD5_H) $(INPUT_H) $(FUNCTION_H) $(VARRAY_H) dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(FLAGS_H) $(RTL_H) $(TREE_H) output.h dwarf2asm.h $(TM_P_H) $(GGC_H) \ gt-dwarf2asm.h dwarf2.h $(SPLAY_TREE_H) $(TARGET_H) vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) version.h \ - $(RTL_H) $(FLAGS_H) output.h vmsdbg.h debug.h langhooks.h $(FUNCTION_H) $(TARGET_H) + $(FLAGS_H) $(RTL_H) output.h vmsdbg.h debug.h langhooks.h $(FUNCTION_H) $(TARGET_H) xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(RTL_H) xcoffout.h $(FLAGS_H) toplev.h output.h dbxout.h \ - $(GGC_H) $(TARGET_H) debug.h gstab.h xcoff.h + $(GGC_H) $(TARGET_H) debug.h $(GSTAB_H) xcoff.h emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) insn-config.h $(RECOG_H) \ - $(GGC_H) $(EXPR_H) hard-reg-set.h bitmap.h toplev.h $(BASIC_BLOCK_H) \ + $(GGC_H) $(EXPR_H) hard-reg-set.h $(BITMAP_H) toplev.h $(BASIC_BLOCK_H) \ $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h tree-pass.h gt-emit-rtl.h \ $(REAL_H) $(DF_H) real.o : real.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - toplev.h $(TM_P_H) $(REAL_H) + toplev.h $(TM_P_H) $(REAL_H) dfp.h dfp.o : dfp.c dfp.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ toplev.h $(TM_P_H) $(REAL_H) $(DECNUM_H) fixed-value.o: fixed-value.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ @@ -2591,53 +2621,60 @@ cgraphbuild.o : cgraphbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) langhooks.h $(CGRAPH_H) intl.h pointer-set.h $(TREE_GIMPLE_H) \ $(TREE_FLOW_H) tree-pass.h varpool.o : varpool.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) langhooks.h $(TREE_INLINE_H) toplev.h $(FLAGS_H) $(GGC_H) \ - $(TARGET_H) $(CGRAPH_H) intl.h pointer-set.h $(FUNCTION_H) $(TREE_GIMPLE_H) \ - $(TREE_FLOW_H) tree-pass.h $(C_COMMON_H) debug.h $(DIAGNOSTIC_H) \ - $(FIBHEAP_H) output.h $(PARAMS_H) $(RTL_H) $(TIMEVAR_H) $(IPA_PROP_H) \ - gt-varpool.h -ipa.o : ipa.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(CGRAPH_H) + $(TREE_H) $(CGRAPH_H) langhooks.h $(DIAGNOSTIC_H) $(HASHTAB_H) \ + $(GGC_H) $(TIMEVAR_H) debug.h $(TARGET_H) output.h $(TREE_GIMPLE_H) \ + $(TREE_FLOW_H) gt-varpool.h +ipa.o : ipa.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(CGRAPH_H) \ + tree-pass.h $(TIMEVAR_H) ipa-prop.o : ipa-prop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ langhooks.h $(GGC_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) \ - $(TREE_FLOW_H) $(TM_H) tree-pass.h $(FLAGS_H) $(TREE_H) tree-inline.h + $(TREE_FLOW_H) $(TM_H) tree-pass.h $(FLAGS_H) $(TREE_H) $(TREE_INLINE_H) \ + $(TIMEVAR_H) ipa-cp.o : ipa-cp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - langhooks.h $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) tree-inline.h tree-dump.h \ - $(TREE_FLOW_H) $(TM_H) tree-pass.h $(FLAGS_H) $(TREE_H) $(DIAGNOSTIC_H) + $(TREE_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) $(TREE_FLOW_H) tree-pass.h \ + $(FLAGS_H) $(TIMEVAR_H) $(DIAGNOSTIC_H) $(TREE_DUMP_H) $(TREE_INLINE_H) matrix-reorg.o : matrix-reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TARGET_H) $(CGRAPH_H) $(TREE_FLOW_H) $(TM_H) tree-pass.h \ - $(FLAGS_H) $(TREE_H) $(DIAGNOSTIC_H) + $(TM_H) $(TREE_H) $(RTL_H) $(C_TREE_H) $(TREE_INLINE_H) $(TREE_FLOW_H) \ + tree-flow-inline.h langhooks.h $(HASHTAB_H) toplev.h $(FLAGS_H) $(GGC_H) \ + debug.h $(TARGET_H) $(CGRAPH_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(PARAMS_H) \ + $(FIBHEAP_H) $(C_COMMON_H) intl.h $(FUNCTION_H) $(BASIC_BLOCK_H) $(CFGLOOP_H) \ + tree-iterator.h tree-pass.h opts.h $(TREE_DATA_REF_H) tree-chrec.h \ + tree-scalar-evolution.h ipa-inline.o : ipa-inline.c gt-ipa-inline.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) langhooks.h $(TREE_INLINE_H) $(FLAGS_H) $(CGRAPH_H) intl.h \ $(DIAGNOSTIC_H) $(FIBHEAP_H) $(PARAMS_H) $(TIMEVAR_H) tree-pass.h \ - $(COVERAGE_H) $(HASHTAB_H) $(RTL_H) + $(HASHTAB_H) $(COVERAGE_H) $(GGC_H) $(TREE_FLOW_H) $(RTL_H) ipa-utils.o : ipa-utils.c $(IPA_UTILS_H) $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \ pointer-set.h $(GGC_H) $(C_COMMON_H) $(TREE_GIMPLE_H) \ - $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H) + $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(TIMEVAR_H) $(DIAGNOSTIC_H) ipa-reference.o : ipa-reference.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \ pointer-set.h $(GGC_H) $(IPA_REFERENCE_H) $(IPA_UTILS_H) $(C_COMMON_H) \ $(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h \ - $(DIAGNOSTIC_H) $(FUNCTION_H) + $(TIMEVAR_H) $(DIAGNOSTIC_H) $(FUNCTION_H) ipa-pure-const.o : ipa-pure-const.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \ pointer-set.h $(GGC_H) $(IPA_UTILS_H) $(C_COMMON_H) $(TARGET_H) \ - $(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H) + $(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(TIMEVAR_H) \ + $(DIAGNOSTIC_H) ipa-type-escape.o : ipa-type-escape.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \ pointer-set.h $(GGC_H) $(IPA_TYPE_ESCAPE_H) $(IPA_UTILS_H) $(C_COMMON_H) \ $(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h \ - $(DIAGNOSTIC_H) $(FUNCTION_H) + $(TIMEVAR_H) $(DIAGNOSTIC_H) $(FUNCTION_H) ipa-struct-reorg.o: ipa-struct-reorg.c ipa-struct-reorg.h $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) \ - $(EXPR_H) $(FUNCTION_H) toplev.h $(GGC_H) $(TARGET_H) langhooks.h $(COVERAGE_H) \ - libfuncs.h gt-coverage.h $(HASHTAB_H) $(IPA_TYPE_ESCAPE_H) + coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TREE_GIMPLE_H) tree-inline.h \ + $(TREE_FLOW_H) langhooks.h pointer-set.h $(HASHTAB_H) $(C_TREE_H) toplev.h \ + $(FLAGS_H) debug.h $(TARGET_H) $(CGRAPH_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ + $(PARAMS_H) $(FIBHEAP_H) intl.h $(FUNCTION_H) $(BASIC_BLOCK_H) tree-iterator.h \ + tree-pass.h opts.h $(IPA_TYPE_ESCAPE_H) $(TREE_DUMP_H) $(C_COMMON_H) coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \ $(FUNCTION_H) toplev.h $(GGC_H) langhooks.h $(COVERAGE_H) gt-coverage.h \ - $(HASHTAB_H) $(CGRAPH_H) tree-iterator.h + $(HASHTAB_H) tree-iterator.h $(CGRAPH_H) tree-pass.h gcov-io.c cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(RECOG_H) \ $(EMIT_RTL_H) toplev.h output.h $(FUNCTION_H) cselib.h $(GGC_H) $(TM_P_H) \ @@ -2649,20 +2686,22 @@ cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ $(DF_H) $(DBGCNT_H) dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(DF_H) cselib.h \ - $(DBGCNT_H) dce.h timevar.h tree-pass.h $(DBGCNT_H) + $(DBGCNT_H) dce.h $(TIMEVAR_H) tree-pass.h $(DBGCNT_H) dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(TM_P_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ - $(RECOG_H) $(EXPR_H) $(DF_H) cselib.h $(DBGCNT_H) timevar.h tree-pass.h \ + $(RECOG_H) $(EXPR_H) $(DF_H) cselib.h $(DBGCNT_H) $(TIMEVAR_H) tree-pass.h \ alloc-pool.h $(ALIAS_H) dse.h $(OPTABS_H) fwprop.o : fwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ toplev.h insn-config.h $(RECOG_H) $(FLAGS_H) $(OBSTACK_H) $(BASIC_BLOCK_H) \ - output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) tree-pass.h + output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) tree-pass.h $(TARGET_H) $(TM_P_H) \ + $(CFGLOOP_H) $(EMIT_RTL_H) web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h toplev.h \ $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h see.o : see.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h toplev.h \ - $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h $(EXPR_H) dce.h + hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h \ + $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h $(RECOG_H) $(EXPR_H) $(SPLAY_TREE_H) \ + $(HASHTAB_H) $(REGS_H) dce.h gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(GGC_H) \ $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h toplev.h \ @@ -2682,7 +2721,7 @@ tree-ssa-dce.o : tree-ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ $(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \ coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(BASIC_BLOCK_H) \ $(GGC_H) hard-reg-set.h $(OBSTACK_H) $(TREE_GIMPLE_H) $(CFGLOOP_H) \ - $(SCEV_H) + tree-scalar-evolution.h tree-call-cdce.o : tree-call-cdce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ $(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \ coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(BASIC_BLOCK_H) \ @@ -2696,7 +2735,7 @@ tree-sra.o : tree-sra.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \ $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \ $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_GIMPLE_H) \ langhooks.h tree-pass.h $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) \ - bitmap.h $(GGC_H) hard-reg-set.h $(OBSTACK_H) $(PARAMS_H) $(TARGET_H) + $(BITMAP_H) $(GGC_H) hard-reg-set.h $(OBSTACK_H) $(PARAMS_H) $(TARGET_H) tree-switch-conversion.o : tree-switch-conversion.c $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \ $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_GIMPLE_H) \ @@ -2712,18 +2751,19 @@ tree-vect-generic.o : tree-vect-generic.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ coretypes.h insn-codes.h df-core.o : df-core.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \ - hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) bitmap.h sbitmap.h \ - $(TM_P_H) $(FLAGS_H) output.h tree-pass.h + hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \ + $(TM_P_H) $(FLAGS_H) output.h tree-pass.h $(PARAMS_H) df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \ - hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) bitmap.h sbitmap.h $(TM_P_H) \ - $(FLAGS_H) output.h except.h dce.h vecprim.h + hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \ + $(TM_P_H) $(FLAGS_H) output.h except.h dce.h vecprim.h df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \ - hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) bitmap.h sbitmap.h $(TM_P_H) \ - $(FLAGS_H) $(TARGET_H) $(TARGET_DEF_H) $(TREE_H) output.h tree-pass.h + hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \ + $(TM_P_H) $(FLAGS_H) $(TARGET_H) $(TARGET_DEF_H) $(TREE_H) output.h \ + tree-pass.h df-byte-scan.o : df-byte-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - $(DF_H) output.h $(DBGCNT_H) + tm_p.h $(DF_H) output.h $(DBGCNT_H) regstat.o : regstat.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TM_P_H) $(FLAGS_H) $(REGS_H) output.h except.h hard-reg-set.h \ $(BASIC_BLOCK_H) $(TIMEVAR_H) $(DF_H) @@ -2743,7 +2783,7 @@ value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(BASIC_BLOCK_H) hard-reg-set.h value-prof.h $(EXPR_H) output.h $(FLAGS_H) \ $(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) $(DIAGNOSTIC_H) \ $(TREE_H) $(COVERAGE_H) $(RTL_H) $(GCOV_IO_H) $(TREE_FLOW_H) \ - tree-flow-inline.h $(TIMEVAR_H) tree-pass.h + tree-flow-inline.h $(TIMEVAR_H) tree-pass.h toplev.h pointer-set.h loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \ toplev.h $(CFGLOOP_H) output.h $(PARAMS_H) $(TARGET_H) @@ -2755,19 +2795,19 @@ auto-inc-dec.o : auto-inc-dec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(FLAGS_H) \ $(REGS_H) hard-reg-set.h output.h toplev.h $(FUNCTION_H) except.h $(GGC_H) \ $(TM_P_H) $(TIMEVAR_H) $(OBSTACK_H) $(TREE_H) alloc-pool.h \ - $(HASHTAB_H) $(DF_H) $(CFGLOOP_H) $(TREE_FLOW_H) + $(HASHTAB_H) $(DF_H) $(CFGLOOP_H) $(TREE_FLOW_H) tree-pass.h cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) toplev.h $(CFGLOOP_H) cfgexpand.o : cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) \ coretypes.h $(TREE_DUMP_H) except.h langhooks.h tree-pass.h $(RTL_H) \ $(DIAGNOSTIC_H) toplev.h $(BASIC_BLOCK_H) $(FLAGS_H) debug.h $(PARAMS_H) \ - value-prof.h + value-prof.h $(TREE_INLINE_H) $(TARGET_H) cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \ output.h toplev.h $(FUNCTION_H) except.h $(TM_P_H) insn-config.h $(EXPR_H) \ $(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \ - tree-pass.h $(DF_H) + tree-pass.h $(DF_H) $(GGC_H) cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h insn-config.h $(RECOG_H) $(TM_P_H) \ $(TIMEVAR_H) $(OBSTACK_H) toplev.h vecprim.h @@ -2778,7 +2818,7 @@ cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TIMEVAR_H) hard-reg-set.h output.h $(FLAGS_H) $(RECOG_H) \ toplev.h insn-config.h cselib.h $(TARGET_H) $(TM_P_H) $(PARAMS_H) \ $(REGS_H) $(EMIT_RTL_H) $(CFGLAYOUT_H) tree-pass.h $(CFGLOOP_H) $(EXPR_H) \ - $(DF_H) $(DBGCNT_H) + $(DF_H) $(DBGCNT_H) dce.h cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h $(TM_H) \ $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(FLAGS_H) $(FUNCTION_H) \ $(OBSTACK_H) toplev.h $(TREE_FLOW_H) $(TREE_H) pointer-set.h output.h \ @@ -2786,13 +2826,13 @@ cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h $(TM_H) \ cfgloopanal.o : cfgloopanal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h $(TM_H) \ $(OBSTACK_H) output.h graphds.h -graphds.o : graphds.c graphds.h $(CONFIG_H) $(SYSTEM_H) bitmap.h $(OBSTACK_H) \ +graphds.o : graphds.c graphds.h $(CONFIG_H) $(SYSTEM_H) $(BITMAP_H) $(OBSTACK_H) \ coretypes.h vec.h vecprim.h loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \ hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h $(TM_H) $(OBSTACK_H) \ - output.h intl.h $(DF_H) $(HASHTAB_H) + output.h intl.h toplev.h $(DF_H) $(HASHTAB_H) loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ - $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h \ + $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) coretypes.h \ $(TM_H) $(TM_P_H) $(FUNCTION_H) $(FLAGS_H) $(DF_H) $(OBSTACK_H) output.h \ $(HASHTAB_H) except.h cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ @@ -2817,9 +2857,9 @@ combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) $(FUNCTION_H) insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \ rtlhooks-def.h $(BASIC_BLOCK_H) $(RECOG_H) $(REAL_H) hard-reg-set.h \ toplev.h $(TM_P_H) $(TREE_H) $(TARGET_H) output.h $(PARAMS_H) $(OPTABS_H) \ - insn-codes.h $(TIMEVAR_H) tree-pass.h $(DF_H) + insn-codes.h $(TIMEVAR_H) tree-pass.h $(DF_H) vecprim.h $(CGRAPH_H) regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(REGS_H) insn-config.h \ + hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) addresses.h $(REGS_H) insn-config.h \ $(RECOG_H) reload.h $(REAL_H) toplev.h $(FUNCTION_H) output.h $(GGC_H) \ $(TM_P_H) $(EXPR_H) $(TIMEVAR_H) gt-regclass.h $(HASHTAB_H) \ $(TARGET_H) tree-pass.h $(DF_H) @@ -2828,7 +2868,7 @@ local-alloc.o : local-alloc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ output.h $(FUNCTION_H) $(INSN_ATTR_H) toplev.h except.h reload.h $(TM_P_H) \ $(GGC_H) $(INTEGRATE_H) $(TIMEVAR_H) tree-pass.h $(DF_H) $(DBGCNT_H) bitmap.o : bitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - $(FLAGS_H) $(GGC_H) gt-bitmap.h bitmap.h $(OBSTACK_H) + $(FLAGS_H) $(GGC_H) gt-bitmap.h $(BITMAP_H) $(OBSTACK_H) $(HASHTAB_H) global.o : global.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) reload.h $(FUNCTION_H) $(RECOG_H) $(REGS_H) hard-reg-set.h \ insn-config.h output.h toplev.h $(TM_P_H) $(MACHMODE_H) tree-pass.h \ @@ -2836,7 +2876,7 @@ global.o : global.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ ra-conflict.o : ra-conflict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) reload.h $(FUNCTION_H) $(RECOG_H) $(REGS_H) hard-reg-set.h \ insn-config.h output.h toplev.h $(TM_P_H) $(MACHMODE_H) tree-pass.h \ - $(TIMEVAR_H) vecprim.h $(DF_H) $(RA_H) sbitmap.h + $(TIMEVAR_H) vecprim.h $(DF_H) $(RA_H) sbitmap.h sparseset.h varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) \ $(HASHTAB_H) $(BCONFIG_H) $(VARRAY_H) toplev.h vec.o : vec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h vec.h $(GGC_H) \ @@ -2856,7 +2896,7 @@ postreload.o : postreload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(REAL_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) \ hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) output.h \ $(FUNCTION_H) toplev.h cselib.h $(TM_P_H) except.h $(TREE_H) $(MACHMODE_H) \ - $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h $(DF_H) + $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h $(DF_H) $(DBGCNT_H) postreload-gcse.o : postreload-gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h toplev.h \ @@ -2865,11 +2905,11 @@ postreload-gcse.o : postreload-gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(FUNCTION_H) \ addresses.h $(RECOG_H) reload.h $(EXPR_H) toplev.h $(TM_P_H) $(DF_H) \ - gt-caller-save.h + gt-caller-save.h $(GGC_H) bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) except.h \ $(RTL_H) hard-reg-set.h $(REGS_H) $(TM_P_H) $(FIBHEAP_H) output.h $(EXPR_H) \ $(TARGET_H) $(FLAGS_H) $(INSN_ATTR_H) $(FUNCTION_H) tree-pass.h toplev.h \ - $(DF_H) $(GGC_H) + $(DF_H) vecprim.h $(RECOG_H) reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ conditions.h hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h \ $(INSN_ATTR_H) except.h $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \ @@ -2893,17 +2933,17 @@ regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ combine-stack-adj.o : combine-stack-adj.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) insn-config.h $(TIMEVAR_H) tree-pass.h \ $(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \ - $(EXPR_H) $(BASIC_BLOCK_H) toplev.h $(TM_P_H) except.h reload.h + $(EXPR_H) $(BASIC_BLOCK_H) toplev.h $(TM_P_H) $(DF_H) except.h reload.h ddg.o : ddg.c $(DDG_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) \ toplev.h $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) except.h $(RECOG_H) \ - $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) bitmap.h \ + $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(BITMAP_H) \ hard-reg-set.h sbitmap.h $(TM_H) modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TARGET_H) toplev.h $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) except.h $(RECOG_H) \ $(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \ - cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) timevar.h tree-pass.h \ + cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TIMEVAR_H) tree-pass.h \ $(DF_H) $(DBGCNT_H) haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \ @@ -2912,7 +2952,7 @@ haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h cselib.h \ - $(PARAMS_H) $(TM_P_H) + $(PARAMS_H) $(TM_P_H) sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(PARAMS_H) \ @@ -2920,10 +2960,10 @@ sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) \ - $(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h + $(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \ - $(TM_P_H) $(REAL_H) toplev.h tree-pass.h + $(REAL_H) tree-pass.h final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) intl.h $(REGS_H) $(RECOG_H) conditions.h \ insn-config.h $(INSN_ATTR_H) $(FUNCTION_H) output.h hard-reg-set.h \ @@ -2935,12 +2975,12 @@ recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) toplev.h output.h reload.h \ addresses.h $(TM_P_H) $(TIMEVAR_H) tree-pass.h hard-reg-set.h $(REAL_H) \ - $(DF_H) $(DBGCNT_H) + $(DF_H) $(DBGCNT_H) $(TARGET_H) reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TREE_H) $(RECOG_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \ insn-config.h toplev.h reload.h $(FUNCTION_H) $(TM_P_H) $(GGC_H) \ - $(BASIC_BLOCK_H) output.h $(VARRAY_H) $(TIMEVAR_H) tree-pass.h \ - $(TARGET_H) vecprim.h $(DF_H) + $(BASIC_BLOCK_H) $(CFGLAYOUT_H) output.h $(VARRAY_H) $(TIMEVAR_H) \ + tree-pass.h $(TARGET_H) vecprim.h $(DF_H) sreal.o: sreal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sreal.h predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) \ @@ -2953,11 +2993,11 @@ lists.o: lists.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h \ bb-reorder.o : bb-reorder.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(FLAGS_H) $(TIMEVAR_H) output.h $(CFGLAYOUT_H) $(FIBHEAP_H) \ $(TARGET_H) $(FUNCTION_H) $(TM_P_H) $(OBSTACK_H) $(EXPR_H) $(REGS_H) \ - $(PARAMS_H) toplev.h tree-pass.h + $(PARAMS_H) toplev.h tree-pass.h $(DF_H) tracer.o : tracer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(BASIC_BLOCK_H) hard-reg-set.h output.h $(CFGLAYOUT_H) \ $(FLAGS_H) $(TIMEVAR_H) $(PARAMS_H) $(COVERAGE_H) $(FIBHEAP_H) \ - tree-pass.h + tree-pass.h $(TREE_FLOW_H) $(TREE_INLINE_H) cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TREE_H) insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h \ $(FUNCTION_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(TARGET_H) gt-cfglayout.h \ @@ -2989,12 +3029,12 @@ hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H) pretty-print.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h intl.h $(PRETTY_PRINT_H) \ $(TREE_H) errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h $(BCONFIG_H) -dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DBGCNT_H) $(TM_H) \ - $(RTL_H) output.h +dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h errors.h $(DBGCNT_H) \ + $(TM_H) $(RTL_H) output.h lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(MACHMODE_H) $(TM_H) $(RTL_H) $(TM_P_H) $(TIMEVAR_H) $(FLAGS_H) \ - insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) $(OBSTACK_H) bitmap.h \ - $(EXPR_H) $(REGS_H) tree-pass.h $(DF_H) + insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) $(OBSTACK_H) $(BITMAP_H) \ + $(EXPR_H) except.h $(REGS_H) tree-pass.h $(DF_H) $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(REGS_H) hard-reg-set.h insn-config.h conditions.h \ @@ -3009,7 +3049,7 @@ mips-tfile: mips-tfile.o version.o $(LIBDEPS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS) mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) version.h $(srcdir)/../include/getopt.h gstab.h intl.h + $(TM_H) version.h $(srcdir)/../include/getopt.h $(GSTAB_H) intl.h mips-tdump: mips-tdump.o version.o $(LIBDEPS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS) @@ -3051,7 +3091,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext) # Header dependencies for generated source files. genrtl.o : genrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H)\ - $(GGC_H) + $(GGC_H) $(OBSTACK_H) insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \ insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) @@ -3059,24 +3099,25 @@ insn-automata.o : insn-automata.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \ insn-config.h toplev.h $(RECOG_H) $(TM_P_H) $(FLAGS_H) insn-emit.o : insn-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(RTL_H) $(EXPR_H) $(REAL_H) output.h insn-config.h $(OPTABS_H) \ - reload.h $(RECOG_H) toplev.h $(FUNCTION_H) $(FLAGS_H) hard-reg-set.h \ - $(RESOURCE_H) $(TM_P_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) tm-constrs.h + $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(REAL_H) \ + dfp.h $(FLAGS_H) output.h insn-config.h hard-reg-set.h $(RECOG_H) \ + $(RESOURCE_H) reload.h toplev.h $(REGS_H) tm-constrs.h $(GGC_H) \ + $(BASIC_BLOCK_H) $(INTEGRATE_H) insn-extract.o : insn-extract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) toplev.h insn-config.h $(RECOG_H) insn-modes.o : insn-modes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(MACHMODE_H) $(REAL_H) insn-opinit.o : insn-opinit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(RTL_H) insn-config.h $(FLAGS_H) $(RECOG_H) $(EXPR_H) \ - $(OPTABS_H) reload.h + $(TM_H) $(RTL_H) $(TM_P_H) insn-config.h $(FLAGS_H) $(RECOG_H) \ + $(EXPR_H) $(OPTABS_H) reload.h insn-output.o : insn-output.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(GGC_H) $(REGS_H) $(REAL_H) conditions.h \ hard-reg-set.h insn-config.h $(INSN_ATTR_H) $(EXPR_H) output.h \ $(RECOG_H) $(FUNCTION_H) toplev.h $(FLAGS_H) insn-codes.h $(TM_P_H) \ $(TARGET_H) tm-constrs.h insn-peep.o : insn-peep.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(RTL_H) $(REGS_H) output.h insn-config.h $(RECOG_H) except.h \ - $(FUNCTION_H) $(TM_P_H) $(REAL_H) tm-constrs.h + insn-config.h $(RTL_H) $(TM_P_H) $(REGS_H) output.h $(REAL_H) \ + $(RECOG_H) except.h $(FUNCTION_H) toplev.h $(FLAGS_H) tm-constrs.h insn-preds.o : insn-preds.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(TREE_H) insn-config.h $(RECOG_H) output.h \ $(FLAGS_H) $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) \ @@ -3084,7 +3125,7 @@ insn-preds.o : insn-preds.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ insn-recog.o : insn-recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) insn-config.h $(RECOG_H) output.h $(FLAGS_H) \ $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) toplev.h \ - reload.h $(REAL_H) tm-constrs.h + reload.h $(REAL_H) $(REGS_H) tm-constrs.h # For each of the files generated by running a generator program over # the machine description, the following pair of static pattern rules @@ -3267,20 +3308,12 @@ ALL_GTFILES_H := $(sort $(GTFILES_H) $(GTFILES_LANG_H)) # $(GTFILES) may be too long to put on a command line, so we have to # write it out to a file (taking care not to do that in a way that # overflows a command line!) and then have gengtype read the file in. -# The extra blank line in this definition is crucial: it makes the -# $(foreach ...) below expand to many lines instead of one. - -define echo_to_gi.list -echo '$(gtyp)' >> tmp-gi.list - -endef $(ALL_GTFILES_H) gtype-desc.c gtype-desc.h : s-gtype ; @true gtyp-input.list: s-gtyp-input ; @true s-gtyp-input: Makefile - rm -f tmp-gi.list - $(foreach gtyp, $(GTFILES), $(echo_to_gi.list)) + @: $(call write_entries_to_file,$(GTFILES),tmp-gi.list) $(SHELL) $(srcdir)/../move-if-change tmp-gi.list gtyp-input.list $(STAMP) s-gtyp-input @@ -3513,7 +3546,7 @@ s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE) gcov.o: gcov.c gcov-io.c $(GCOV_IO_H) intl.h $(SYSTEM_H) coretypes.h $(TM_H) \ $(CONFIG_H) version.h gcov-dump.o: gcov-dump.c gcov-io.c $(GCOV_IO_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(CONFIG_H) + $(TM_H) $(CONFIG_H) version.h GCOV_OBJS = gcov.o intl.o version.o errors.o gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index c2fb2dad0ae..92f6d7bb16d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + PR documentation/15479 + * gnat_ugn.texi (@ovar): New macro, from autoconf.texi. + Replace backets around optional parameters with @ovar + where possible, use @r{[}, @r{]} otherwise. + Replace some @r, @i, and @emph with @var where appropriate. + 2008-07-02 Eric Botcazou <ebotcazou@adacore.com> * decl.c (make_type_from_size) <INTEGER_TYPE>: Fix typo and tidy up. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 3256c1c7f32..99f3c8631d4 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -98,6 +98,14 @@ @set PLATFORM OpenVMS @end ifset +@c @ovar(ARG) +@c ---------- +@c The ARG is an optional argument. To be used for macro arguments in +@c their documentation (@defmac). +@macro ovar{varname} +@r{[}@var{\varname\}@r{]}@c +@end macro + @settitle @value{EDITION} User's Guide @value{PLATFORM} @dircategory GNU Ada tools @direntry @@ -1005,7 +1013,7 @@ variables}. @emph{Emphasis}. @item -[optional information or parameters] +@r{[}optional information or parameters@r{]} @item Examples are described by text @@ -2149,18 +2157,18 @@ alternative scheme for naming is specified by the use of @smallexample @c ada pragma Source_File_Name ( Spec_File_Name => FILE_NAME_PATTERN - [,Casing => CASING_SPEC] - [,Dot_Replacement => STRING_LITERAL]); + @r{[},Casing => CASING_SPEC@r{]} + @r{[},Dot_Replacement => STRING_LITERAL@r{]}); pragma Source_File_Name ( Body_File_Name => FILE_NAME_PATTERN - [,Casing => CASING_SPEC] - [,Dot_Replacement => STRING_LITERAL]); + @r{[},Casing => CASING_SPEC@r{]} + @r{[},Dot_Replacement => STRING_LITERAL@r{]}); pragma Source_File_Name ( Subunit_File_Name => FILE_NAME_PATTERN - [,Casing => CASING_SPEC] - [,Dot_Replacement => STRING_LITERAL]); + @r{[},Casing => CASING_SPEC@r{]} + @r{[},Dot_Replacement => STRING_LITERAL@r{]}); FILE_NAME_PATTERN ::= STRING_LITERAL CASING_SPEC ::= Lowercase | Uppercase | Mixedcase @@ -3669,7 +3677,7 @@ without generating code, then use the @option{-gnatc} switch. The basic command for compiling a file containing an Ada unit is @smallexample -$ gcc -c [@var{switches}] @file{file name} +$ gcc -c @ovar{switches} @file{file name} @end smallexample @noindent @@ -3823,7 +3831,7 @@ See @ref{Stack Overflow Checking} for details. Makes the compiler output stack usage information for the program, on a per-function basis. See @ref{Static Stack Usage Analysis} for details. -@item -fcallgraph-info[=su] +@item -fcallgraph-info@r{[}=su@r{]} @cindex @option{-fcallgraph-info} (@command{gcc}) Makes the compiler output callgraph information for the program, on a per-file basis. The information is generated in the VCG format. It can @@ -3894,9 +3902,9 @@ Specify a configuration pragma file @end ifclear (@pxref{The Configuration Pragmas Files}). -@item ^-gnateD^/DATA_PREPROCESSING=^symbol[=value] +@item ^-gnateD^/DATA_PREPROCESSING=^symbol@r{[}=@var{value}@r{]} @cindex @option{-gnateD} (@command{gcc}) -Defines a symbol, associated with value, for preprocessing. +Defines a symbol, associated with @var{value}, for preprocessing. (@pxref{Integrated Preprocessing}). @item -gnatef @@ -4043,7 +4051,7 @@ Don't quit; generate @file{ALI} and tree files even if illegalities. @cindex @option{-gnatr} (@command{gcc}) Treat pragma Restrictions as Restriction_Warnings. -@item ^-gnatR[0/1/2/3[s]]^/REPRESENTATION_INFO^ +@item ^-gnatR@r{[}0@r{/}1@r{/}2@r{/}3@r{[}s@r{]]}^/REPRESENTATION_INFO^ @cindex @option{-gnatR} (@command{gcc}) Output representation information for declared types and objects. @@ -4080,7 +4088,7 @@ Verbose mode. Full error output with source lines to @file{stdout}. Control level of validity checking. See separate section describing this feature. -@item ^-gnatw@var{xxx}^/WARNINGS=(@var{option}[,@dots{}])^ +@item ^-gnatw@var{xxx}^/WARNINGS=(@var{option}@r{[},@dots{}@r{]})^ @cindex @option{^-gnatw^/WARNINGS^} (@command{gcc}) Warning mode where ^@var{xxx} is a string of option letters that^the list of options^ denotes @@ -4160,7 +4168,7 @@ Inhibit the search of the default location for the GNAT Run Time Library (RTL) ALI files. @ifclear vms -@item -O[@var{n}] +@item -O@ovar{n} @cindex @option{-O} (@command{gcc}) @var{n} controls the optimization level. @@ -4196,7 +4204,7 @@ Equivalent to @option{/OPTIMIZE=NONE}. This is the default behavior in the absence of an @option{/OPTIMIZE} qualifier. -@item /OPTIMIZE[=(keyword[,@dots{}])] +@item /OPTIMIZE@r{[}=(keyword@r{[},@dots{}@r{]})@r{]} @cindex @option{/OPTIMIZE} (@code{GNAT COMPILE}) Selects the level of optimization for your program. The supported keywords are as follows: @@ -5505,8 +5513,8 @@ The pragmas have the form: @smallexample @cartouche - @b{pragma} Assert (@var{Boolean-expression} [, - @var{static-string-expression}]) + @b{pragma} Assert (@var{Boolean-expression} @r{[}, + @var{static-string-expression}@r{]}) @b{pragma} Debug (@var{procedure call}) @end cartouche @end smallexample @@ -5527,7 +5535,7 @@ The @code{Debug} pragma causes @var{procedure} to be called. Note that debugging procedures to be called between declarations. @ifset vms -@item /DEBUG[=debug-level] +@item /DEBUG@r{[}=debug-level@r{]} @itemx /NODEBUG Specifies how much debugging information is to be included in the resulting object file where 'debug-level' is one of the following: @@ -6752,7 +6760,7 @@ If the switch @option{-gnatL} is used in conjunction with in the expanded source (as comment lines with the original line number). @table @code -@item new @var{xxx} [storage_pool = @var{yyy}] +@item new @var{xxx} @r{[}storage_pool = @var{yyy}@r{]} Shows the storage pool being used for an allocator. @item at end @var{procedure-name}; @@ -6778,14 +6786,14 @@ Combines the above two cases. A division or multiplication of fixed-point values which are treated as integers without any kind of scaling. -@item free @var{expr} [storage_pool = @var{xxx}] +@item free @var{expr} @r{[}storage_pool = @var{xxx}@r{]} Shows the storage pool associated with a @code{free} statement. @item [subtype or type declaration] Used to list an equivalent declaration for an internally generated type that is referenced elsewhere in the listing. -@item freeze @var{type-name} [@var{actions}] +@item freeze @var{type-name} @ovar{actions} Shows the point at which @var{type-name} is frozen, with possible associated actions to be performed at the freeze point. @@ -6861,7 +6869,7 @@ Profile_Warnings, and pragma Restricted_Run_Time and pragma Ravenscar set restriction warnings rather than restrictions. @ifclear vms -@item -gnatR[0|1|2|3[s]] +@item -gnatR@r{[}0@r{|}1@r{|}2@r{|}3@r{[}s@r{]]} @cindex @option{-gnatR} (@command{gcc}) This switch controls output from the compiler of a listing showing representation information for declared types and objects. For @@ -7168,7 +7176,7 @@ Examples of valid lines in a preprocessor data file: -- list all symbols with their values. @end smallexample -@item ^-gnateD^/DATA_PREPROCESSING=^symbol[=value] +@item ^-gnateD^/DATA_PREPROCESSING=^symbol@r{[}=value@r{]} @cindex @option{-gnateD} (@command{gcc}) Define or redefine a preprocessing symbol, associated with value. If no value is given on the command line, then the value of the symbol is @code{True}. @@ -7475,14 +7483,14 @@ to be read by the @command{gnatlink} utility used to link the Ada application. The form of the @code{gnatbind} command is @smallexample -$ gnatbind [@i{switches}] @i{mainprog}[.ali] [@i{switches}] +$ gnatbind @ovar{switches} @var{mainprog}@r{[}.ali@r{]} @ovar{switches} @end smallexample @noindent -where @file{@i{mainprog}.adb} is the Ada file containing the main program +where @file{@var{mainprog}.adb} is the Ada file containing the main program unit body. If no switches are specified, @code{gnatbind} constructs an Ada package in two files whose names are -@file{b~@i{mainprog}.ads}, and @file{b~@i{mainprog}.adb}. +@file{b~@var{mainprog}.ads}, and @file{b~@var{mainprog}.adb}. For example, if given the parameter @file{hello.ali}, for a main program contained in file @file{hello.adb}, the binder output files would be @file{b~hello.ads} @@ -7618,20 +7626,20 @@ Check only, no generation of binder output file. @cindex @option{^-C^/BIND_FILE=C^} (@command{gnatbind}) Generate binder program in C -@item ^-d^/DEFAULT_STACK_SIZE=^@var{nn}[k|m] -@cindex @option{^-d^/DEFAULT_STACK_SIZE=^@var{nn}[k|m]} (@command{gnatbind}) +@item ^-d^/DEFAULT_STACK_SIZE=^@var{nn}@r{[}k@r{|}m@r{]} +@cindex @option{^-d^/DEFAULT_STACK_SIZE=^@var{nn}@r{[}k@r{|}m@r{]}} (@command{gnatbind}) This switch can be used to change the default task stack size value to a specified size @var{nn}, which is expressed in bytes by default, or in kilobytes when suffixed with @var{k} or in megabytes when suffixed with @var{m}. -In the absence of a [k|m] suffix, this switch is equivalent, in effect, -to completing all task specs with +In the absence of a @samp{@r{[}k@r{|}m@r{]}} suffix, this switch is equivalent, +in effect, to completing all task specs with @smallexample @c ada pragma Storage_Size (nn); @end smallexample When they do not already have such a pragma. -@item ^-D^/DEFAULT_SECONDARY_STACK_SIZE=^@var{nn}[k|m] +@item ^-D^/DEFAULT_SECONDARY_STACK_SIZE=^@var{nn}@r{[}k@r{|}m@r{]} @cindex @option{^-D^/DEFAULT_SECONDARY_STACK_SIZE=nnnnn^} (@command{gnatbind}) This switch can be used to change the default secondary stack size value to a specified size @var{nn}, which is expressed in bytes by default, or @@ -8448,8 +8456,8 @@ driver (see @ref{The GNAT Driver and Project Files}). The form of the @command{gnatlink} command is @smallexample -$ gnatlink [@var{switches}] @var{mainprog}[.ali] - [@var{non-Ada objects}] [@var{linker options}] +$ gnatlink @ovar{switches} @var{mainprog}@r{[}.ali@r{]} + @ovar{non-Ada objects} @ovar{linker options} @end smallexample @noindent @@ -8727,8 +8735,8 @@ dependencies, they will always be tracked exactly correctly by The usual form of the @command{gnatmake} command is @smallexample -$ gnatmake [@var{switches}] @var{file_name} - [@var{file_names}] [@var{mode_switches}] +$ gnatmake @ovar{switches} @var{file_name} + @ovar{file_names} @ovar{mode_switches} @end smallexample @noindent @@ -10266,7 +10274,7 @@ Note that @code{gnatelim} needs neither object nor ALI files. @code{gnatelim} has the following command-line interface: @smallexample -$ gnatelim [options] name +$ gnatelim @ovar{options} name @end smallexample @noindent @@ -10417,7 +10425,7 @@ Generate a list of @code{Eliminate} pragmas $ PIPE GNAT ELIM MAIN_PROG > GNAT.ADC @end ifset @ifclear vms -$ gnatelim main_prog >[>] gnat.adc +$ gnatelim main_prog >@r{[}>@r{]} gnat.adc @end ifclear @end smallexample @@ -10665,8 +10673,8 @@ in which GNAT processes the ACVC tests. The @code{gnatchop} command has the form: @smallexample -$ gnatchop switches @var{file name} [@var{file name} @var{file name} @dots{}] - [@var{directory}] +$ gnatchop switches @var{file name} @r{[}@var{file name} @dots{}@r{]} + @ovar{directory} @end smallexample @noindent @@ -11089,8 +11097,8 @@ set of files. The usual form of the @code{gnatname} command is @smallexample -$ gnatname [@var{switches}] @var{naming_pattern} [@var{naming_patterns}] \ - [--and @var{switches}] @var{naming_pattern} [@var{naming_patterns}]] +$ gnatname @ovar{switches} @var{naming_pattern} @ovar{naming_patterns} + @r{[}--and @ovar{switches} @var{naming_pattern} @ovar{naming_patterns}@r{]} @end smallexample @noindent @@ -14903,14 +14911,15 @@ use the @code{gnat} driver (see @ref{The GNAT Driver and Project Files}). @noindent The command invocation for @code{gnatxref} is: @smallexample -$ gnatxref [switches] sourcefile1 [sourcefile2 @dots{}] +$ gnatxref @ovar{switches} @var{sourcefile1} @r{[}@var{sourcefile2} @dots{}@r{]} @end smallexample @noindent where -@table @code -@item sourcefile1, sourcefile2 +@table @var +@item sourcefile1 +@itemx sourcefile2 identifies the source files for which a report is to be generated. The ``with''ed units will be processed too. You must provide at least one file. @@ -15034,17 +15043,17 @@ you can say @samp{gnatxref ^-ag^/ALL_FILES/IGNORE_LOCALS^} instead of The command line for @code{gnatfind} is: @smallexample -$ gnatfind [switches] pattern[:sourcefile[:line[:column]]] - [file1 file2 @dots{}] +$ gnatfind @ovar{switches} @var{pattern}@r{[}:@var{sourcefile}@r{[}:@var{line}@r{[}:@var{column}@r{]]]} + @r{[}@var{file1} @var{file2} @dots{}] @end smallexample @noindent where -@table @code +@table @var @item pattern An entity will be output only if it matches the regular expression found -in @samp{pattern}, see @ref{Regular Expressions in gnatfind and gnatxref}. +in @var{pattern}, see @ref{Regular Expressions in gnatfind and gnatxref}. Omitting the pattern is equivalent to specifying @samp{*}, which will match any entity. Note that if you do not provide a pattern, you @@ -15056,8 +15065,8 @@ for matching purposes. At the current time there is no support for @item sourcefile @code{gnatfind} will look for references, bodies or declarations -of symbols referenced in @file{sourcefile}, at line @samp{line} -and column @samp{column}. See @ref{Examples of gnatfind Usage} +of symbols referenced in @file{@var{sourcefile}}, at line @var{line} +and column @var{column}. See @ref{Examples of gnatfind Usage} for syntax examples. @item line @@ -15080,9 +15089,9 @@ directory whose name starts with @file{source} and whose extension is @file{adb}. The location of the spec of the entity will always be displayed, even if it -isn't in one of @file{file1}, @file{file2},@enddots{} The occurrences -of the entity in the separate units of the ones given on the command -line will also be displayed. +isn't in one of @file{@var{file1}}, @file{@var{file2}},@enddots{} The +occurrences of the entity in the separate units of the ones given on the +command line will also be displayed. Note that if you specify at least one file in this part, @code{gnatfind} may sometimes not be able to find the body of the subprograms. @@ -15503,8 +15512,8 @@ $ gnatxref -v gnatfind.adb > tags will generate the tags file for @code{gnatfind} itself (if the sources are in the search path!). -From @command{vi}, you can then use the command @samp{:tag @i{entity}} -(replacing @i{entity} by whatever you are looking for), and vi will +From @command{vi}, you can then use the command @samp{:tag @var{entity}} +(replacing @var{entity} by whatever you are looking for), and vi will display a new file with the corresponding declaration of entity. @end ifclear @@ -15614,7 +15623,7 @@ call @command{gnatpp} through the @command{gnat} driver The @command{gnatpp} command has the form @smallexample -$ gnatpp [@var{switches}] @var{filename} +$ gnatpp @ovar{switches} @var{filename} @end smallexample @noindent @@ -15938,18 +15947,18 @@ The @option{GNAT}, @option{COMPACT}, and @option{UNCOMPACT} options for the These switches allow control over line length and indentation. @table @option -@item ^-M@i{nnn}^/LINE_LENGTH_MAX=@i{nnn}^ +@item ^-M@var{nnn}^/LINE_LENGTH_MAX=@var{nnn}^ @cindex @option{^-M^/LINE_LENGTH^} (@command{gnatpp}) -Maximum line length, @i{nnn} from 32@dots{}256, the default value is 79 +Maximum line length, @var{nnn} from 32@dots{}256, the default value is 79 -@item ^-i@i{nnn}^/INDENTATION_LEVEL=@i{nnn}^ +@item ^-i@var{nnn}^/INDENTATION_LEVEL=@var{nnn}^ @cindex @option{^-i^/INDENTATION_LEVEL^} (@command{gnatpp}) -Indentation level, @i{nnn} from 1@dots{}9, the default value is 3 +Indentation level, @var{nnn} from 1@dots{}9, the default value is 3 -@item ^-cl@i{nnn}^/CONTINUATION_INDENT=@i{nnn}^ +@item ^-cl@var{nnn}^/CONTINUATION_INDENT=@var{nnn}^ @cindex @option{^-cl^/CONTINUATION_INDENT^} (@command{gnatpp}) Indentation level for continuation lines (relative to the line being -continued), @i{nnn} from 1@dots{}9. +continued), @var{nnn} from 1@dots{}9. The default value is one less then the (normal) indentation level, unless the indentation is set to 1 (in which case the default value for continuation @@ -15980,12 +15989,12 @@ insertion, so that the formatted source reflects the original. @cindex @option{^-ff^/FORM_FEED_AFTER_PRAGMA_PAGE^} (@command{gnatpp}) Insert a Form Feed character after a pragma Page. -@item ^-T@i{nnn}^/MAX_INDENT=@i{nnn}^ +@item ^-T@var{nnn}^/MAX_INDENT=@var{nnn}^ @cindex @option{^-T^/MAX_INDENT^} (@command{gnatpp}) Do not use an additional indentation level for @b{case} alternatives -and variants if there are @i{nnn} or more (the default +and variants if there are @var{nnn} or more (the default value is 10). -If @i{nnn} is 0, an additional indentation level is +If @var{nnn} is 0, an additional indentation level is used for @b{case} alternatives and variants regardless of their number. @end table @@ -16711,28 +16720,28 @@ through the @command{gnat} driver. The @command{gnatmetric} command has the form @smallexample -$ gnatmetric [@i{switches}] @{@i{filename}@} [@i{-cargs gcc_switches}] +$ gnatmetric @ovar{switches} @{@var{filename}@} @r{[}-cargs @var{gcc_switches}@r{]} @end smallexample @noindent where @itemize @bullet @item -@i{switches} specify the metrics to compute and define the destination for +@var{switches} specify the metrics to compute and define the destination for the output @item -Each @i{filename} is the name (including the extension) of a source +Each @var{filename} is the name (including the extension) of a source file to process. ``Wildcards'' are allowed, and the file name may contain path information. -If no @i{filename} is supplied, then the @i{switches} list must contain +If no @var{filename} is supplied, then the @var{switches} list must contain at least one @option{-files} switch (@pxref{Other gnatmetric Switches}). Including both a @option{-files} switch and one or more -@i{filename} arguments is permitted. +@var{filename} arguments is permitted. @item -@i{-cargs gcc_switches} is a list of switches for +@samp{-cargs @var{gcc_switches}} is a list of switches for @command{gcc}. They will be passed on to all compiler invocations made by @command{gnatmetric} to generate the ASIS trees. Here you can provide @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, @@ -17476,7 +17485,7 @@ The @code{gnatkr} command has the form @ifclear vms @smallexample -$ gnatkr @var{name} [@var{length}] +$ gnatkr @var{name} @ovar{length} @end smallexample @end ifclear @@ -17664,12 +17673,12 @@ all characters need to be in the ASCII set (no accented letters). To call @code{gnatprep} use @smallexample -$ gnatprep [switches] infile outfile [deffile] +$ gnatprep @ovar{switches} @var{infile} @var{outfile} @ovar{deffile} @end smallexample @noindent where -@table @code +@table @var @item switches is an optional sequence of switches as described in the next section. @@ -17810,11 +17819,11 @@ The preprocessor conditional inclusion commands have the form @smallexample @group @cartouche -#if @i{expression} [then] +#if @i{expression} @r{[}then@r{]} lines -#elsif @i{expression} [then] +#elsif @i{expression} @r{[}then@r{]} lines -#elsif @i{expression} [then] +#elsif @i{expression} @r{[}then@r{]} lines @dots{} #else @@ -17950,7 +17959,7 @@ supplied configuration pragmas. The @code{gnatlbr} command has the form @smallexample -$ GNAT LIBRARY /[CREATE | SET | DELETE]=directory [/CONFIG=file] +$ GNAT LIBRARY /@r{[}CREATE@r{|}SET@r{|}DELETE@r{]}=directory @r{[}/CONFIG=file@r{]} @end smallexample @node Switches for gnatlbr @@ -19637,7 +19646,7 @@ Solaris and Windows NT/2000/XP (x86). The @code{gnatmem} command has the form @smallexample - $ gnatmem [switches] user_program + $ gnatmem @ovar{switches} user_program @end smallexample @noindent @@ -20165,41 +20174,41 @@ driver (see @ref{The GNAT Driver and Project Files}). Invoking @command{gnatcheck} on the command line has the form: @smallexample -$ gnatcheck [@i{switches}] @{@i{filename}@} - [^-files^/FILES^=@{@i{arg_list_filename}@}] - [-cargs @i{gcc_switches}] [-rules @i{rule_options}] +$ gnatcheck @ovar{switches} @{@var{filename}@} + @r{[}^-files^/FILES^=@{@var{arg_list_filename}@}@r{]} + @r{[}-cargs @var{gcc_switches}@r{]} @r{[}-rules @var{rule_options}@r{]} @end smallexample @noindent where @itemize @bullet @item -@i{switches} specify the general tool options +@var{switches} specify the general tool options @item -Each @i{filename} is the name (including the extension) of a source +Each @var{filename} is the name (including the extension) of a source file to process. ``Wildcards'' are allowed, and the file name may contain path information. @item -Each @i{arg_list_filename} is the name (including the extension) of a text +Each @var{arg_list_filename} is the name (including the extension) of a text file containing the names of the source files to process, separated by spaces or line breaks. @item -@i{gcc_switches} is a list of switches for +@var{gcc_switches} is a list of switches for @command{gcc}. They will be passed on to all compiler invocations made by @command{gnatcheck} to generate the ASIS trees. Here you can provide @option{^-I^/INCLUDE_DIRS=^} switches to form the source search path, and use the @option{-gnatec} switch to set the configuration file. @item -@i{rule_options} is a list of options for controlling a set of +@var{rule_options} is a list of options for controlling a set of rules to be checked by @command{gnatcheck} (@pxref{gnatcheck Rule Options}). @end itemize @noindent -Either a @i{filename} or an @i{arg_list_filename} must be supplied. +Either a @file{@var{filename}} or an @file{@var{arg_list_filename}} must be supplied. @menu * Format of the Report File:: @@ -20322,22 +20331,22 @@ Turn all the rule checks ON. Turn all the rule checks OFF. @cindex @option{+R} (@command{gnatcheck}) -@item +R@i{rule_id[:param]} +@item +R@var{rule_id}@r{[}:@var{param}@r{]} Turn on the check for a specified rule with the specified parameter, if any. -@i{rule_id} must be the identifier of one of the currently implemented rules +@var{rule_id} must be the identifier of one of the currently implemented rules (use @option{^-h^/HELP^} for the list of implemented rules). Rule identifiers -are not case-sensitive. The @i{param} item must +are not case-sensitive. The @var{param} item must be a string representing a valid parameter(s) for the specified rule. If it contains any space characters then this string must be enclosed in quotation marks. @cindex @option{-R} (@command{gnatcheck}) -@item -R@i{rule_id[:param]} +@item -R@var{rule_id}@r{[}:@var{param}@r{]} Turn off the check for a specified rule with the specified parameter, if any. @cindex @option{-from} (@command{gnatcheck}) -@item -from=@i{rule_option_filename} -Read the rule options from the text file @i{rule_option_filename}, referred as +@item -from=@var{rule_option_filename} +Read the rule options from the text file @var{rule_option_filename}, referred as ``rule file'' below. @end table @@ -20356,13 +20365,14 @@ The file may contain empty lines and Ada-style comments (comment lines and end-of-line comments). The rule file has free format; that is, you do not have to start a new rule option on a new line. -A rule file may contain other @option{-from=@i{rule_option_filename}} +A rule file may contain other @option{-from=@var{rule_option_filename}} options, each such option being replaced with the content of the corresponding rule file during the rule files processing. In case a -cycle is detected (that is, @i{rule_file_1} reads rule options from -@i{rule_file_2}, and @i{rule_file_2} reads (directly or indirectly) -rule options from @i{rule_file_1}), the processing -of rule files is interrupted and a part of their content is ignored. +cycle is detected (that is, @file{@var{rule_file_1}} reads rule options +from @file{@var{rule_file_2}}, and @file{@var{rule_file_2}} reads +(directly or indirectly) rule options from @file{@var{rule_file_1}}), +the processing of rule files is interrupted and a part of their content +is ignored. @node Adding the Results of Compiler Checks to gnatcheck Output @@ -22010,12 +22020,12 @@ of @command{gnatstub} switches below. @command{gnatstub} has the command-line interface of the form @smallexample -$ gnatstub [switches] filename [directory] +$ gnatstub @ovar{switches} @var{filename} @ovar{directory} @end smallexample @noindent where -@table @emph +@table @var @item filename is the name of the source file that contains a library unit declaration for which a body must be created. The file name may contain the path @@ -22285,7 +22295,7 @@ be able to click on any identifier and go to its declaration. The command line is as follow: @smallexample -$ perl gnathtml.pl [^switches^options^] ada-files +$ perl gnathtml.pl @ovar{^switches^options^} @var{ada-files} @end smallexample @noindent @@ -22391,7 +22401,7 @@ is. The syntax of this line is: Alternatively, you may run the script using the following command line: @smallexample -$ perl gnathtml.pl [switches] files +$ perl gnathtml.pl @ovar{switches} @var{files} @end smallexample @ifset vms @@ -24920,11 +24930,11 @@ HP Ada provides the following qualifiers to pass options to the linker @item @option{/COMMAND} -@item @option{/[NO]MAP} +@item @option{/@r{[}NO@r{]}MAP} -@item @option{/OUTPUT=@i{file-spec}} +@item @option{/OUTPUT=@var{file-spec}} -@item @option{/[NO]DEBUG} and @option{/[NO]TRACEBACK} +@item @option{/@r{[}NO@r{]}DEBUG} and @option{/@r{[}NO@r{]}TRACEBACK} @end itemize @noindent @@ -24932,11 +24942,11 @@ To pass options to the linker, GNAT provides the following switches: @itemize @bullet -@item @option{/EXECUTABLE=@i{exec-name}} +@item @option{/EXECUTABLE=@var{exec-name}} @item @option{/VERBOSE} -@item @option{/[NO]DEBUG} and @option{/[NO]TRACEBACK} +@item @option{/@r{[}NO@r{]}DEBUG} and @option{/@r{[}NO@r{]}TRACEBACK} @end itemize @noindent @@ -30940,12 +30950,12 @@ on the stack by the caller from right to left. The callee (and not the caller) is in charge of cleaning the stack on routine exit. In addition, the name of a routine with @code{Stdcall} calling convention is mangled by adding a leading underscore (as for the @code{C} calling convention) and a -trailing @code{@@}@code{@i{nn}}, where @i{nn} is the overall size (in +trailing @code{@@}@code{@var{nn}}, where @var{nn} is the overall size (in bytes) of the parameters passed to the routine. The name to use on the Ada side when importing a C routine with a @code{Stdcall} calling convention is the name of the C routine. The leading -underscore and trailing @code{@@}@code{@i{nn}} are added automatically by +underscore and trailing @code{@@}@code{@var{nn}} are added automatically by the compiler. For instance the Win32 function: @smallexample @@ -30990,11 +31000,11 @@ pragma Import (Stdcall, Get_Val, Link_Name => "retrieve_val"); @noindent then the imported routine is @code{retrieve_val}, that is, there is no decoration at all. No leading underscore and no Stdcall suffix -@code{@@}@code{@i{nn}}. +@code{@@}@code{@var{nn}}. @noindent This is especially important as in some special cases a DLL's entry -point name lacks a trailing @code{@@}@code{@i{nn}} while the exported +point name lacks a trailing @code{@@}@code{@var{nn}} while the exported name generated for a call has it. @noindent @@ -31256,21 +31266,21 @@ suffix) has the following structure: @smallexample @group @cartouche -[LIBRARY @i{name}] -[DESCRIPTION @i{string}] +@r{[}LIBRARY @var{name}@r{]} +@r{[}DESCRIPTION @var{string}@r{]} EXPORTS - @i{symbol1} - @i{symbol2} + @var{symbol1} + @var{symbol2} @dots{} @end cartouche @end group @end smallexample @table @code -@item LIBRARY @i{name} +@item LIBRARY @var{name} This section, which is optional, gives the name of the DLL. -@item DESCRIPTION @i{string} +@item DESCRIPTION @var{string} This section, which is optional, gives a description string that will be embedded in the import library. @@ -31291,7 +31301,7 @@ EXPORTS @end table @noindent -Note that you must specify the correct suffix (@code{@@}@code{@i{nn}}) +Note that you must specify the correct suffix (@code{@@}@code{@var{nn}}) (@pxref{Windows Calling Conventions}) for a Stdcall calling convention function in the exported symbols list. @@ -31319,12 +31329,12 @@ $ dll2def API.dll > API.def @code{dll2def} is a very simple tool: it takes as input a DLL and prints to standard output the list of entry points in the DLL. Note that if some routines in the DLL have the @code{Stdcall} convention -(@pxref{Windows Calling Conventions}) with stripped @code{@@}@i{nn} +(@pxref{Windows Calling Conventions}) with stripped @code{@@}@var{nn} suffix then you'll have to edit @file{api.def} to add it, and specify @option{-k} to @command{gnatdll} when creating the import library. @noindent -Here are some hints to find the right @code{@@}@i{nn} suffix. +Here are some hints to find the right @code{@@}@var{nn} suffix. @enumerate @item @@ -31355,8 +31365,8 @@ $ gnatdll -e API.def -d API.dll name of the DLL containing the services listed in the definition file @file{API.dll}. The name of the static import library generated is computed from the name of the definition file as follows: if the -definition file name is @i{xyz}@code{.def}, the import library name will -be @code{lib}@i{xyz}@code{.a}. Note that in the previous example option +definition file name is @var{xyz}@code{.def}, the import library name will +be @code{lib}@var{xyz}@code{.a}. Note that in the previous example option @option{-e} could have been removed because the name of the definition file (before the ``@code{.def}'' suffix) is the same as the name of the DLL (@pxref{Using gnatdll} for more information about @code{gnatdll}). @@ -31833,23 +31843,23 @@ static import library for the DLL and the actual DLL. The form of the @smallexample @cartouche -$ gnatdll [@var{switches}] @var{list-of-files} [-largs @var{opts}] +$ gnatdll @ovar{switches} @var{list-of-files} @r{[}-largs @var{opts}@r{]} @end cartouche @end smallexample @noindent -where @i{list-of-files} is a list of ALI and object files. The object +where @var{list-of-files} is a list of ALI and object files. The object file list must be the exact list of objects corresponding to the non-Ada sources whose services are to be included in the DLL. The ALI file list must be the exact list of ALI files for the corresponding Ada sources -whose services are to be included in the DLL. If @i{list-of-files} is +whose services are to be included in the DLL. If @var{list-of-files} is missing, only the static import library is generated. @noindent You may specify any of the following switches to @code{gnatdll}: @table @code -@item -a[@var{address}] +@item -a@ovar{address} @cindex @option{-a} (@code{gnatdll}) Build a non-relocatable DLL at @var{address}. If @var{address} is not specified the default address @var{0x11000000} will be used. By default, @@ -31901,10 +31911,10 @@ object files needed to build the DLL. @item -k @cindex @option{-k} (@code{gnatdll}) -Removes the @code{@@}@i{nn} suffix from the import library's exported +Removes the @code{@@}@var{nn} suffix from the import library's exported names, but keeps them for the link names. You must specify this option if you want to use a @code{Stdcall} function in a DLL for which -the @code{@@}@i{nn} suffix has been removed. This is the case for most +the @code{@@}@var{nn} suffix has been removed. This is the case for most of the Windows NT DLL for example. This option has no effect when @option{-n} option is specified. @@ -32052,7 +32062,7 @@ common @code{dlltool} switches. The form of the @code{dlltool} command is @smallexample -$ dlltool [@var{switches}] +$ dlltool @ovar{switches} @end smallexample @noindent @@ -32076,7 +32086,7 @@ DLL in the static import library generated by @code{dlltool} with switch @item -k @cindex @option{-k} (@command{dlltool}) -Kill @code{@@}@i{nn} from exported names +Kill @code{@@}@var{nn} from exported names (@pxref{Windows Calling Conventions} for a discussion about @code{Stdcall}-style symbols. @@ -32089,7 +32099,7 @@ Prints the @code{dlltool} switches with a concise description. Generate an export file @var{exportfile}. The export file contains the export table (list of symbols in the DLL) and is used to create the DLL. -@item --output-lib @i{libfile} +@item --output-lib @var{libfile} @cindex @option{--output-lib} (@command{dlltool}) Generate a static import library @var{libfile}. @@ -32097,9 +32107,9 @@ Generate a static import library @var{libfile}. @cindex @option{-v} (@command{dlltool}) Verbose mode. -@item --as @i{assembler-name} +@item --as @var{assembler-name} @cindex @option{--as} (@command{dlltool}) -Use @i{assembler-name} as the assembler. The default is @code{as}. +Use @var{assembler-name} as the assembler. The default is @code{as}. @end table @node GNAT and Windows Resources diff --git a/gcc/c-common.c b/gcc/c-common.c index 9356b8e925e..f54b1cb0942 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -585,6 +585,179 @@ static bool nonnull_check_p (tree, unsigned HOST_WIDE_INT); static bool get_nonnull_operand (tree, unsigned HOST_WIDE_INT *); static int resort_field_decl_cmp (const void *, const void *); +/* Reserved words. The third field is a mask: keywords are disabled + if they match the mask. + + Masks for languages: + C --std=c89: D_C99 | D_CXXONLY | D_OBJC | D_CXX_OBJC + C --std=c99: D_CXXONLY | D_OBJC + ObjC is like C except that D_OBJC and D_CXX_OBJC are not set + C++ --std=c98: D_CONLY | D_CXXOX | D_OBJC + C++ --std=c0x: D_CONLY | D_OBJC + ObjC++ is like C++ except that D_OBJC is not set + + If -fno-asm is used, D_ASM is added to the mask. If + -fno-gnu-keywords is used, D_EXT is added. If -fno-asm and C in + C89 mode, D_EXT89 is added for both -fno-asm and -fno-gnu-keywords. + In C with -Wcxx-compat, we warn if D_CXXWARN is set. */ + +const struct c_common_resword c_common_reswords[] = +{ + { "_Bool", RID_BOOL, D_CONLY }, + { "_Complex", RID_COMPLEX, 0 }, + { "_Decimal32", RID_DFLOAT32, D_CONLY | D_EXT }, + { "_Decimal64", RID_DFLOAT64, D_CONLY | D_EXT }, + { "_Decimal128", RID_DFLOAT128, D_CONLY | D_EXT }, + { "_Fract", RID_FRACT, D_CONLY | D_EXT }, + { "_Accum", RID_ACCUM, D_CONLY | D_EXT }, + { "_Sat", RID_SAT, D_CONLY | D_EXT }, + { "__FUNCTION__", RID_FUNCTION_NAME, 0 }, + { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 }, + { "__alignof", RID_ALIGNOF, 0 }, + { "__alignof__", RID_ALIGNOF, 0 }, + { "__asm", RID_ASM, 0 }, + { "__asm__", RID_ASM, 0 }, + { "__attribute", RID_ATTRIBUTE, 0 }, + { "__attribute__", RID_ATTRIBUTE, 0 }, + { "__builtin_choose_expr", RID_CHOOSE_EXPR, D_CONLY }, + { "__builtin_offsetof", RID_OFFSETOF, 0 }, + { "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, D_CONLY }, + { "__builtin_va_arg", RID_VA_ARG, 0 }, + { "__complex", RID_COMPLEX, 0 }, + { "__complex__", RID_COMPLEX, 0 }, + { "__const", RID_CONST, 0 }, + { "__const__", RID_CONST, 0 }, + { "__decltype", RID_DECLTYPE, D_CXXONLY }, + { "__extension__", RID_EXTENSION, 0 }, + { "__func__", RID_C99_FUNCTION_NAME, 0 }, + { "__has_nothrow_assign", RID_HAS_NOTHROW_ASSIGN, D_CXXONLY }, + { "__has_nothrow_constructor", RID_HAS_NOTHROW_CONSTRUCTOR, D_CXXONLY }, + { "__has_nothrow_copy", RID_HAS_NOTHROW_COPY, D_CXXONLY }, + { "__has_trivial_assign", RID_HAS_TRIVIAL_ASSIGN, D_CXXONLY }, + { "__has_trivial_constructor", RID_HAS_TRIVIAL_CONSTRUCTOR, D_CXXONLY }, + { "__has_trivial_copy", RID_HAS_TRIVIAL_COPY, D_CXXONLY }, + { "__has_trivial_destructor", RID_HAS_TRIVIAL_DESTRUCTOR, D_CXXONLY }, + { "__has_virtual_destructor", RID_HAS_VIRTUAL_DESTRUCTOR, D_CXXONLY }, + { "__is_abstract", RID_IS_ABSTRACT, D_CXXONLY }, + { "__is_base_of", RID_IS_BASE_OF, D_CXXONLY }, + { "__is_class", RID_IS_CLASS, D_CXXONLY }, + { "__is_convertible_to", RID_IS_CONVERTIBLE_TO, D_CXXONLY }, + { "__is_empty", RID_IS_EMPTY, D_CXXONLY }, + { "__is_enum", RID_IS_ENUM, D_CXXONLY }, + { "__is_pod", RID_IS_POD, D_CXXONLY }, + { "__is_polymorphic", RID_IS_POLYMORPHIC, D_CXXONLY }, + { "__is_union", RID_IS_UNION, D_CXXONLY }, + { "__imag", RID_IMAGPART, 0 }, + { "__imag__", RID_IMAGPART, 0 }, + { "__inline", RID_INLINE, 0 }, + { "__inline__", RID_INLINE, 0 }, + { "__label__", RID_LABEL, 0 }, + { "__null", RID_NULL, 0 }, + { "__real", RID_REALPART, 0 }, + { "__real__", RID_REALPART, 0 }, + { "__restrict", RID_RESTRICT, 0 }, + { "__restrict__", RID_RESTRICT, 0 }, + { "__signed", RID_SIGNED, 0 }, + { "__signed__", RID_SIGNED, 0 }, + { "__thread", RID_THREAD, 0 }, + { "__typeof", RID_TYPEOF, 0 }, + { "__typeof__", RID_TYPEOF, 0 }, + { "__volatile", RID_VOLATILE, 0 }, + { "__volatile__", RID_VOLATILE, 0 }, + { "asm", RID_ASM, D_ASM }, + { "auto", RID_AUTO, 0 }, + { "bool", RID_BOOL, D_CXXONLY }, + { "break", RID_BREAK, 0 }, + { "case", RID_CASE, 0 }, + { "catch", RID_CATCH, D_CXX_OBJC }, + { "char", RID_CHAR, 0 }, + { "char16_t", RID_CHAR16, D_CXXONLY | D_CXX0X }, + { "char32_t", RID_CHAR32, D_CXXONLY | D_CXX0X }, + { "class", RID_CLASS, D_CXX_OBJC }, + { "const", RID_CONST, 0 }, + { "const_cast", RID_CONSTCAST, D_CXXONLY | D_CXXWARN }, + { "continue", RID_CONTINUE, 0 }, + { "decltype", RID_DECLTYPE, D_CXXONLY | D_CXX0X }, + { "default", RID_DEFAULT, 0 }, + { "delete", RID_DELETE, D_CXXONLY }, + { "do", RID_DO, 0 }, + { "double", RID_DOUBLE, 0 }, + { "dynamic_cast", RID_DYNCAST, D_CXXONLY | D_CXXWARN }, + { "else", RID_ELSE, 0 }, + { "enum", RID_ENUM, 0 }, + { "explicit", RID_EXPLICIT, D_CXXONLY }, + { "export", RID_EXPORT, D_CXXONLY }, + { "extern", RID_EXTERN, 0 }, + { "false", RID_FALSE, D_CXXONLY }, + { "float", RID_FLOAT, 0 }, + { "for", RID_FOR, 0 }, + { "friend", RID_FRIEND, D_CXXONLY }, + { "goto", RID_GOTO, 0 }, + { "if", RID_IF, 0 }, + { "inline", RID_INLINE, D_EXT89 }, + { "int", RID_INT, 0 }, + { "long", RID_LONG, 0 }, + { "mutable", RID_MUTABLE, D_CXXONLY | D_CXXWARN }, + { "namespace", RID_NAMESPACE, D_CXXONLY }, + { "new", RID_NEW, D_CXXONLY }, + { "operator", RID_OPERATOR, D_CXXONLY }, + { "private", RID_PRIVATE, D_CXX_OBJC }, + { "protected", RID_PROTECTED, D_CXX_OBJC }, + { "public", RID_PUBLIC, D_CXX_OBJC }, + { "register", RID_REGISTER, 0 }, + { "reinterpret_cast", RID_REINTCAST, D_CXXONLY | D_CXXWARN }, + { "restrict", RID_RESTRICT, D_CONLY | D_C99 }, + { "return", RID_RETURN, 0 }, + { "short", RID_SHORT, 0 }, + { "signed", RID_SIGNED, 0 }, + { "sizeof", RID_SIZEOF, 0 }, + { "static", RID_STATIC, 0 }, + { "static_assert", RID_STATIC_ASSERT, D_CXXONLY | D_CXX0X | D_CXXWARN }, + { "static_cast", RID_STATCAST, D_CXXONLY | D_CXXWARN }, + { "struct", RID_STRUCT, 0 }, + { "switch", RID_SWITCH, 0 }, + { "template", RID_TEMPLATE, D_CXXONLY }, + { "this", RID_THIS, D_CXXONLY }, + { "throw", RID_THROW, D_CXX_OBJC }, + { "true", RID_TRUE, D_CXXONLY }, + { "try", RID_TRY, D_CXX_OBJC }, + { "typedef", RID_TYPEDEF, 0 }, + { "typename", RID_TYPENAME, D_CXXONLY }, + { "typeid", RID_TYPEID, D_CXXONLY }, + { "typeof", RID_TYPEOF, D_ASM | D_EXT }, + { "union", RID_UNION, 0 }, + { "unsigned", RID_UNSIGNED, 0 }, + { "using", RID_USING, D_CXXONLY }, + { "virtual", RID_VIRTUAL, D_CXXONLY }, + { "void", RID_VOID, 0 }, + { "volatile", RID_VOLATILE, 0 }, + { "wchar_t", RID_WCHAR, D_CXXONLY }, + { "while", RID_WHILE, 0 }, + /* These Objective-C keywords are recognized only immediately after + an '@'. */ + { "compatibility_alias", RID_AT_ALIAS, D_OBJC }, + { "defs", RID_AT_DEFS, D_OBJC }, + { "encode", RID_AT_ENCODE, D_OBJC }, + { "end", RID_AT_END, D_OBJC }, + { "implementation", RID_AT_IMPLEMENTATION, D_OBJC }, + { "interface", RID_AT_INTERFACE, D_OBJC }, + { "protocol", RID_AT_PROTOCOL, D_OBJC }, + { "selector", RID_AT_SELECTOR, D_OBJC }, + { "finally", RID_AT_FINALLY, D_OBJC }, + { "synchronized", RID_AT_SYNCHRONIZED, D_OBJC }, + /* These are recognized only in protocol-qualifier context + (see above) */ + { "bycopy", RID_BYCOPY, D_OBJC }, + { "byref", RID_BYREF, D_OBJC }, + { "in", RID_IN, D_OBJC }, + { "inout", RID_INOUT, D_OBJC }, + { "oneway", RID_ONEWAY, D_OBJC }, + { "out", RID_OUT, D_OBJC }, +}; + +const unsigned int num_c_common_reswords = + sizeof c_common_reswords / sizeof (struct c_common_resword); + /* Table of machine-independent attributes common to all C-like languages. */ const struct attribute_spec c_common_attribute_table[] = { diff --git a/gcc/c-common.h b/gcc/c-common.h index 7fd2242c352..486fdeb8811 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -74,6 +74,10 @@ enum rid RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128, RID_FRACT, RID_ACCUM, + /* This means to warn that this is a C++ keyword, and then treat it + as a normal identifier. */ + RID_CXX_COMPAT_WARN, + /* Too many ways of getting the name of a function as a string */ RID_FUNCTION_NAME, RID_PRETTY_FUNCTION_NAME, RID_C99_FUNCTION_NAME, @@ -184,6 +188,8 @@ enum c_tree_index CTI_MAX }; +#define C_CPP_HASHNODE(id) \ + (&(((struct c_common_identifier *) (id))->node)) #define C_RID_CODE(id) \ ((enum rid) (((struct c_common_identifier *) (id))->node.rid_code)) #define C_SET_RID_CODE(id, code) \ @@ -197,6 +203,36 @@ struct c_common_identifier GTY(()) struct cpp_hashnode node; }; +/* An entry in the reserved keyword table. */ + +struct c_common_resword +{ + const char *const word; + ENUM_BITFIELD(rid) const rid : 16; + const unsigned int disable : 16; +}; + +/* Disable mask. Keywords are disabled if (reswords[i].disable & + mask) is _true_. Thus for keywords which are present in all + languages the disable field is zero. */ + +#define D_CONLY 0x001 /* C only (not in C++). */ +#define D_CXXONLY 0x002 /* C++ only (not in C). */ +#define D_C99 0x004 /* In C, C99 only. */ +#define D_CXX0X 0x008 /* In C++, C++0X only. */ +#define D_EXT 0x010 /* GCC extension. */ +#define D_EXT89 0x020 /* GCC extension incorporated in C99. */ +#define D_ASM 0x040 /* Disabled by -fno-asm. */ +#define D_OBJC 0x080 /* In Objective C and neither C nor C++. */ +#define D_CXX_OBJC 0x100 /* In Objective C, and C++, but not C. */ +#define D_CXXWARN 0x200 /* In C warn with -Wcxx-compat. */ + +/* The reserved keyword table. */ +extern const struct c_common_resword c_common_reswords[]; + +/* The number of items in the reserved keyword table. */ +extern const unsigned int num_c_common_reswords; + #define char16_type_node c_global_trees[CTI_CHAR16_TYPE] #define char32_type_node c_global_trees[CTI_CHAR32_TYPE] #define wchar_type_node c_global_trees[CTI_WCHAR_TYPE] diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 18ad11901f9..89430cbf3e1 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -445,7 +445,7 @@ c_print_identifier (FILE *file, tree node, int indent) print_node (file, "symbol", I_SYMBOL_DECL (node), indent + 4); print_node (file, "tag", I_TAG_DECL (node), indent + 4); print_node (file, "label", I_LABEL_DECL (node), indent + 4); - if (C_IS_RESERVED_WORD (node)) + if (C_IS_RESERVED_WORD (node) && C_RID_CODE (node) != RID_CXX_COMPAT_WARN) { tree rid = ridpointers[C_RID_CODE (node)]; indent_to (file, indent + 4); @@ -1258,7 +1258,10 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl, header. (Conflicting redeclarations were handled above.) */ if (TREE_CODE (newdecl) == TYPE_DECL) { - if (DECL_IN_SYSTEM_HEADER (newdecl) || DECL_IN_SYSTEM_HEADER (olddecl)) + if (DECL_IN_SYSTEM_HEADER (newdecl) + || DECL_IN_SYSTEM_HEADER (olddecl) + || TREE_NO_WARNING (newdecl) + || TREE_NO_WARNING (olddecl)) return true; /* Allow OLDDECL to continue in use. */ error ("redefinition of typedef %q+D", newdecl); @@ -7177,7 +7180,9 @@ declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec) specs->deprecated_p = true; /* Handle type specifier keywords. */ - if (TREE_CODE (type) == IDENTIFIER_NODE && C_IS_RESERVED_WORD (type)) + if (TREE_CODE (type) == IDENTIFIER_NODE + && C_IS_RESERVED_WORD (type) + && C_RID_CODE (type) != RID_CXX_COMPAT_WARN) { enum rid i = C_RID_CODE (type); if (specs->type) diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 45aff80d6c0..aba007c9bc2 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -59,131 +59,6 @@ along with GCC; see the file COPYING3. If not see #include "cgraph.h" -/* The reserved keyword table. */ -struct resword -{ - const char *word; - ENUM_BITFIELD(rid) rid : 16; - unsigned int disable : 16; -}; - -/* Disable mask. Keywords are disabled if (reswords[i].disable & - mask) is _true_. */ -#define D_C89 0x01 /* not in C89 */ -#define D_EXT 0x02 /* GCC extension */ -#define D_EXT89 0x04 /* GCC extension incorporated in C99 */ -#define D_OBJC 0x08 /* Objective C only */ - -static const struct resword reswords[] = -{ - { "_Bool", RID_BOOL, 0 }, - { "_Complex", RID_COMPLEX, 0 }, - { "_Decimal32", RID_DFLOAT32, D_EXT }, - { "_Decimal64", RID_DFLOAT64, D_EXT }, - { "_Decimal128", RID_DFLOAT128, D_EXT }, - { "_Fract", RID_FRACT, D_EXT }, - { "_Accum", RID_ACCUM, D_EXT }, - { "_Sat", RID_SAT, D_EXT }, - { "__FUNCTION__", RID_FUNCTION_NAME, 0 }, - { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 }, - { "__alignof", RID_ALIGNOF, 0 }, - { "__alignof__", RID_ALIGNOF, 0 }, - { "__asm", RID_ASM, 0 }, - { "__asm__", RID_ASM, 0 }, - { "__attribute", RID_ATTRIBUTE, 0 }, - { "__attribute__", RID_ATTRIBUTE, 0 }, - { "__builtin_choose_expr", RID_CHOOSE_EXPR, 0 }, - { "__builtin_offsetof", RID_OFFSETOF, 0 }, - { "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, 0 }, - { "__builtin_va_arg", RID_VA_ARG, 0 }, - { "__complex", RID_COMPLEX, 0 }, - { "__complex__", RID_COMPLEX, 0 }, - { "__const", RID_CONST, 0 }, - { "__const__", RID_CONST, 0 }, - { "__extension__", RID_EXTENSION, 0 }, - { "__func__", RID_C99_FUNCTION_NAME, 0 }, - { "__imag", RID_IMAGPART, 0 }, - { "__imag__", RID_IMAGPART, 0 }, - { "__inline", RID_INLINE, 0 }, - { "__inline__", RID_INLINE, 0 }, - { "__label__", RID_LABEL, 0 }, - { "__real", RID_REALPART, 0 }, - { "__real__", RID_REALPART, 0 }, - { "__restrict", RID_RESTRICT, 0 }, - { "__restrict__", RID_RESTRICT, 0 }, - { "__signed", RID_SIGNED, 0 }, - { "__signed__", RID_SIGNED, 0 }, - { "__thread", RID_THREAD, 0 }, - { "__typeof", RID_TYPEOF, 0 }, - { "__typeof__", RID_TYPEOF, 0 }, - { "__volatile", RID_VOLATILE, 0 }, - { "__volatile__", RID_VOLATILE, 0 }, - { "asm", RID_ASM, D_EXT }, - { "auto", RID_AUTO, 0 }, - { "break", RID_BREAK, 0 }, - { "case", RID_CASE, 0 }, - { "char", RID_CHAR, 0 }, - { "const", RID_CONST, 0 }, - { "continue", RID_CONTINUE, 0 }, - { "default", RID_DEFAULT, 0 }, - { "do", RID_DO, 0 }, - { "double", RID_DOUBLE, 0 }, - { "else", RID_ELSE, 0 }, - { "enum", RID_ENUM, 0 }, - { "extern", RID_EXTERN, 0 }, - { "float", RID_FLOAT, 0 }, - { "for", RID_FOR, 0 }, - { "goto", RID_GOTO, 0 }, - { "if", RID_IF, 0 }, - { "inline", RID_INLINE, D_EXT89 }, - { "int", RID_INT, 0 }, - { "long", RID_LONG, 0 }, - { "register", RID_REGISTER, 0 }, - { "restrict", RID_RESTRICT, D_C89 }, - { "return", RID_RETURN, 0 }, - { "short", RID_SHORT, 0 }, - { "signed", RID_SIGNED, 0 }, - { "sizeof", RID_SIZEOF, 0 }, - { "static", RID_STATIC, 0 }, - { "struct", RID_STRUCT, 0 }, - { "switch", RID_SWITCH, 0 }, - { "typedef", RID_TYPEDEF, 0 }, - { "typeof", RID_TYPEOF, D_EXT }, - { "union", RID_UNION, 0 }, - { "unsigned", RID_UNSIGNED, 0 }, - { "void", RID_VOID, 0 }, - { "volatile", RID_VOLATILE, 0 }, - { "while", RID_WHILE, 0 }, - /* These Objective-C keywords are recognized only immediately after - an '@'. */ - { "class", RID_AT_CLASS, D_OBJC }, - { "compatibility_alias", RID_AT_ALIAS, D_OBJC }, - { "defs", RID_AT_DEFS, D_OBJC }, - { "encode", RID_AT_ENCODE, D_OBJC }, - { "end", RID_AT_END, D_OBJC }, - { "implementation", RID_AT_IMPLEMENTATION, D_OBJC }, - { "interface", RID_AT_INTERFACE, D_OBJC }, - { "private", RID_AT_PRIVATE, D_OBJC }, - { "protected", RID_AT_PROTECTED, D_OBJC }, - { "protocol", RID_AT_PROTOCOL, D_OBJC }, - { "public", RID_AT_PUBLIC, D_OBJC }, - { "selector", RID_AT_SELECTOR, D_OBJC }, - { "throw", RID_AT_THROW, D_OBJC }, - { "try", RID_AT_TRY, D_OBJC }, - { "catch", RID_AT_CATCH, D_OBJC }, - { "finally", RID_AT_FINALLY, D_OBJC }, - { "synchronized", RID_AT_SYNCHRONIZED, D_OBJC }, - /* These are recognized only in protocol-qualifier context - (see above) */ - { "bycopy", RID_BYCOPY, D_OBJC }, - { "byref", RID_BYREF, D_OBJC }, - { "in", RID_IN, D_OBJC }, - { "inout", RID_INOUT, D_OBJC }, - { "oneway", RID_ONEWAY, D_OBJC }, - { "out", RID_OUT, D_OBJC }, -}; -#define N_reswords (sizeof reswords / sizeof (struct resword)) - /* Initialization routine for this file. */ void @@ -193,24 +68,41 @@ c_parse_init (void) identifiers. */ unsigned int i; tree id; - int mask = (flag_isoc99 ? 0 : D_C89) - | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); + int mask = 0; + mask |= D_CXXONLY; + if (!flag_isoc99) + mask |= D_C99; + if (flag_no_asm) + { + mask |= D_ASM | D_EXT; + if (!flag_isoc99) + mask |= D_EXT89; + } if (!c_dialect_objc ()) - mask |= D_OBJC; + mask |= D_OBJC | D_CXX_OBJC; ridpointers = GGC_CNEWVEC (tree, (int) RID_MAX); - for (i = 0; i < N_reswords; i++) + for (i = 0; i < num_c_common_reswords; i++) { /* If a keyword is disabled, do not enter it into the table and so create a canonical spelling that isn't a keyword. */ - if (reswords[i].disable & mask) - continue; + if (c_common_reswords[i].disable & mask) + { + if (warn_cxx_compat + && (c_common_reswords[i].disable & D_CXXWARN)) + { + id = get_identifier (c_common_reswords[i].word); + C_SET_RID_CODE (id, RID_CXX_COMPAT_WARN); + C_IS_RESERVED_WORD (id) = 1; + } + continue; + } - id = get_identifier (reswords[i].word); - C_SET_RID_CODE (id, reswords[i].rid); + id = get_identifier (c_common_reswords[i].word); + C_SET_RID_CODE (id, c_common_reswords[i].rid); C_IS_RESERVED_WORD (id) = 1; - ridpointers [(int) reswords[i].rid] = id; + ridpointers [(int) c_common_reswords[i].rid] = id; } } @@ -330,9 +222,16 @@ c_lex_one_token (c_parser *parser, c_token *token) { enum rid rid_code = C_RID_CODE (token->value); - if (c_dialect_objc ()) + if (rid_code == RID_CXX_COMPAT_WARN) + { + warning (OPT_Wc___compat, + "%Hidentifier %qs conflicts with C++ keyword", + &token->location, + IDENTIFIER_POINTER (token->value)); + } + else if (c_dialect_objc ()) { - if (!OBJC_IS_AT_KEYWORD (rid_code) + if (!objc_is_reserved_word (token->value) && (!OBJC_IS_PQ_KEYWORD (rid_code) || parser->objc_pq_context)) { @@ -1129,7 +1028,7 @@ c_parser_external_declaration (c_parser *parser) gcc_assert (c_dialect_objc ()); c_parser_objc_class_definition (parser); break; - case RID_AT_CLASS: + case RID_CLASS: gcc_assert (c_dialect_objc ()); c_parser_objc_class_declaration (parser); break; @@ -3830,7 +3729,7 @@ c_parser_statement_after_labels (c_parser *parser) case RID_ASM: stmt = c_parser_asm_statement (parser); break; - case RID_AT_THROW: + case RID_THROW: gcc_assert (c_dialect_objc ()); c_parser_consume_token (parser); if (c_parser_next_token_is (parser, CPP_SEMICOLON)) @@ -3845,7 +3744,7 @@ c_parser_statement_after_labels (c_parser *parser) goto expect_semicolon; } break; - case RID_AT_TRY: + case RID_TRY: gcc_assert (c_dialect_objc ()); c_parser_objc_try_catch_statement (parser); break; @@ -5630,6 +5529,8 @@ c_parser_postfix_expression_after_primary (c_parser *parser, "expected %<)%>"); expr.value = build_function_call (expr.value, exprlist); expr.original_code = ERROR_MARK; + if (warn_disallowed_functions) + warn_if_disallowed_function_p (expr.value); break; case CPP_DOT: /* Structure element reference. */ @@ -5904,19 +5805,19 @@ c_parser_objc_class_instance_variables (c_parser *parser) break; } /* Parse any objc-visibility-spec. */ - if (c_parser_next_token_is_keyword (parser, RID_AT_PRIVATE)) + if (c_parser_next_token_is_keyword (parser, RID_PRIVATE)) { c_parser_consume_token (parser); objc_set_visibility (2); continue; } - else if (c_parser_next_token_is_keyword (parser, RID_AT_PROTECTED)) + else if (c_parser_next_token_is_keyword (parser, RID_PROTECTED)) { c_parser_consume_token (parser); objc_set_visibility (0); continue; } - else if (c_parser_next_token_is_keyword (parser, RID_AT_PUBLIC)) + else if (c_parser_next_token_is_keyword (parser, RID_PUBLIC)) { c_parser_consume_token (parser); objc_set_visibility (1); @@ -5951,7 +5852,7 @@ static void c_parser_objc_class_declaration (c_parser *parser) { tree list = NULL_TREE; - gcc_assert (c_parser_next_token_is_keyword (parser, RID_AT_CLASS)); + gcc_assert (c_parser_next_token_is_keyword (parser, RID_CLASS)); c_parser_consume_token (parser); /* Any identifiers, including those declared as type names, are OK here. */ @@ -6388,12 +6289,12 @@ c_parser_objc_try_catch_statement (c_parser *parser) { location_t loc; tree stmt; - gcc_assert (c_parser_next_token_is_keyword (parser, RID_AT_TRY)); + gcc_assert (c_parser_next_token_is_keyword (parser, RID_TRY)); c_parser_consume_token (parser); loc = c_parser_peek_token (parser)->location; stmt = c_parser_compound_statement (parser); objc_begin_try_stmt (loc, stmt); - while (c_parser_next_token_is_keyword (parser, RID_AT_CATCH)) + while (c_parser_next_token_is_keyword (parser, RID_CATCH)) { struct c_parm *parm; c_parser_consume_token (parser); diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 6a80bbed095..881bc42dfe1 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -91,6 +91,8 @@ static inline void cgraph_edge_remove_callee (struct cgraph_edge *e); /* Hash table used to convert declarations into nodes. */ static GTY((param_is (struct cgraph_node))) htab_t cgraph_hash; +/* Hash table used to convert assembler names into nodes. */ +static GTY((param_is (struct cgraph_node))) htab_t assembler_name_hash; /* The linked list of cgraph nodes. */ struct cgraph_node *cgraph_nodes; @@ -409,6 +411,18 @@ cgraph_node (tree decl) node->origin->nested = node; node->master_clone = node; } + + /* This code can go away once flag_unit_at_a_mode is removed. */ + if (assembler_name_hash) + { + tree name = DECL_ASSEMBLER_NAME (node->decl); + slot = ((struct cgraph_node **) + htab_find_slot_with_hash (assembler_name_hash, name, + decl_assembler_name_hash (name), + INSERT)); + if (!*slot) + *slot = node; + } return node; } @@ -425,6 +439,24 @@ cgraph_insert_node_to_hashtable (struct cgraph_node *node) *slot = node; } +/* Returns a hash code for P. */ + +static hashval_t +hash_node_by_assembler_name (const void *p) +{ + const struct cgraph_node *n = (const struct cgraph_node *) p; + return (hashval_t) decl_assembler_name_hash (DECL_ASSEMBLER_NAME (n->decl)); +} + +/* Returns nonzero if P1 and P2 are equal. */ + +static int +eq_assembler_name (const void *p1, const void *p2) +{ + const struct cgraph_node *n1 = (const struct cgraph_node *) p1; + const_tree name = (const_tree)p2; + return (decl_assembler_name_equal (n1->decl, name)); +} /* Return the cgraph node that has ASMNAME for its DECL_ASSEMBLER_NAME. Return NULL if there's no such node. */ @@ -433,11 +465,36 @@ struct cgraph_node * cgraph_node_for_asm (tree asmname) { struct cgraph_node *node; + void **slot; - for (node = cgraph_nodes; node ; node = node->next) - if (decl_assembler_name_equal (node->decl, asmname)) - return node; + if (!assembler_name_hash) + { + assembler_name_hash = + htab_create_ggc (10, hash_node_by_assembler_name, eq_assembler_name, + NULL); + for (node = cgraph_nodes; node; node = node->next) + if (!node->global.inlined_to) + { + tree name = DECL_ASSEMBLER_NAME (node->decl); + slot = htab_find_slot_with_hash (assembler_name_hash, name, + decl_assembler_name_hash (name), + INSERT); + /* We can have multiple declarations with same assembler name. For C++ + it is __builtin_strlen and strlen, for instance. Do we need to + record them all? Original implementation marked just first one + so lets hope for the best. */ + if (*slot) + continue; + *slot = node; + } + } + + slot = htab_find_slot_with_hash (assembler_name_hash, asmname, + decl_assembler_name_hash (asmname), + NO_INSERT); + if (slot) + return (struct cgraph_node *) *slot; return NULL; } @@ -763,6 +820,7 @@ cgraph_remove_node (struct cgraph_node *node) cgraph_call_node_removal_hooks (node); cgraph_node_remove_callers (node); cgraph_node_remove_callees (node); + /* Incremental inlining access removed nodes stored in the postorder list. */ node->needed = node->reachable = false; @@ -824,6 +882,16 @@ cgraph_remove_node (struct cgraph_node *node) && (TREE_ASM_WRITTEN (n->decl) || DECL_EXTERNAL (n->decl)))) kill_body = true; } + if (assembler_name_hash) + { + tree name = DECL_ASSEMBLER_NAME (node->decl); + slot = htab_find_slot_with_hash (assembler_name_hash, name, + decl_assembler_name_hash (name), + NO_INSERT); + /* Inline clones are not hashed. */ + if (slot && *slot == node) + htab_clear_slot (assembler_name_hash, slot); + } if (kill_body && flag_unit_at_a_time) cgraph_release_function_body (node); @@ -1038,6 +1106,7 @@ debug_cgraph (void) void change_decl_assembler_name (tree decl, tree name) { + gcc_assert (!assembler_name_hash); if (!DECL_ASSEMBLER_NAME_SET_P (decl)) { SET_DECL_ASSEMBLER_NAME (decl, name); diff --git a/gcc/cgraph.h b/gcc/cgraph.h index ee79c9200f1..070bd77dcdc 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -224,7 +224,7 @@ DEF_VEC_ALLOC_P(cgraph_edge_p,heap); /* The varpool data structure. Each static variable decl has assigned varpool_node. */ -struct varpool_node GTY(()) +struct varpool_node GTY((chain_next ("%h.next"))) { tree decl; /* Pointer to the next function in varpool_nodes. */ diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c index bf7cccf2df7..afcb35b33ea 100644 --- a/gcc/combine-stack-adj.c +++ b/gcc/combine-stack-adj.c @@ -1,6 +1,6 @@ /* Combine stack adjustments. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of GCC. @@ -272,6 +272,72 @@ record_stack_memrefs (rtx *xp, void *data) return 0; } +/* Adjust or create REG_FRAME_RELATED_EXPR note when merging a stack + adjustment into a frame related insn. */ + +static void +adjust_frame_related_expr (rtx last_sp_set, rtx insn, + HOST_WIDE_INT this_adjust) +{ + rtx note = find_reg_note (last_sp_set, REG_FRAME_RELATED_EXPR, NULL_RTX); + rtx new_expr = NULL_RTX; + + if (note == NULL_RTX && RTX_FRAME_RELATED_P (insn)) + return; + + if (note + && GET_CODE (XEXP (note, 0)) == SEQUENCE + && XVECLEN (XEXP (note, 0), 0) >= 2) + { + rtx expr = XEXP (note, 0); + rtx last = XVECEXP (expr, 0, XVECLEN (expr, 0) - 1); + int i; + + if (GET_CODE (last) == SET + && RTX_FRAME_RELATED_P (last) == RTX_FRAME_RELATED_P (insn) + && SET_DEST (last) == stack_pointer_rtx + && GET_CODE (SET_SRC (last)) == PLUS + && XEXP (SET_SRC (last), 0) == stack_pointer_rtx + && GET_CODE (XEXP (SET_SRC (last), 1)) == CONST_INT) + { + XEXP (SET_SRC (last), 1) + = GEN_INT (INTVAL (XEXP (SET_SRC (last), 1)) + this_adjust); + return; + } + + new_expr = gen_rtx_SEQUENCE (VOIDmode, + rtvec_alloc (XVECLEN (expr, 0) + 1)); + for (i = 0; i < XVECLEN (expr, 0); i++) + XVECEXP (new_expr, 0, i) = XVECEXP (expr, 0, i); + } + else + { + new_expr = gen_rtx_SEQUENCE (VOIDmode, rtvec_alloc (2)); + if (note) + XVECEXP (new_expr, 0, 0) = XEXP (note, 0); + else + { + rtx expr = copy_rtx (single_set_for_csa (last_sp_set)); + + XEXP (SET_SRC (expr), 1) + = GEN_INT (INTVAL (XEXP (SET_SRC (expr), 1)) - this_adjust); + RTX_FRAME_RELATED_P (expr) = 1; + XVECEXP (new_expr, 0, 0) = expr; + } + } + + XVECEXP (new_expr, 0, XVECLEN (new_expr, 0) - 1) + = copy_rtx (single_set_for_csa (insn)); + RTX_FRAME_RELATED_P (XVECEXP (new_expr, 0, XVECLEN (new_expr, 0) - 1)) + = RTX_FRAME_RELATED_P (insn); + if (note) + XEXP (note, 0) = new_expr; + else + REG_NOTES (last_sp_set) + = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, new_expr, + REG_NOTES (last_sp_set)); +} + /* Subroutine of combine_stack_adjustments, called for each basic block. */ static void @@ -343,6 +409,9 @@ combine_stack_adjustments_for_block (basic_block bb) last_sp_adjust + this_adjust, this_adjust)) { + if (RTX_FRAME_RELATED_P (last_sp_set)) + adjust_frame_related_expr (last_sp_set, insn, + this_adjust); /* It worked! */ delete_insn (insn); last_sp_adjust += this_adjust; @@ -373,7 +442,7 @@ combine_stack_adjustments_for_block (basic_block bb) deallocation+allocation conspired to cancel, we can delete the old deallocation insn. */ if (last_sp_set && last_sp_adjust == 0) - delete_insn (insn); + delete_insn (last_sp_set); free_csa_memlist (memlist); memlist = NULL; last_sp_set = insn; diff --git a/gcc/common.opt b/gcc/common.opt index d9dfac58e76..43f853aed23 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -94,6 +94,10 @@ Wdisabled-optimization Common Var(warn_disabled_optimization) Warning Warn when an optimization pass is disabled +Wdisallowed-function-list= +Common RejectNegative Joined Warning +Warn on calls to these functions + Werror Common Var(warnings_are_errors) Treat all warnings as errors diff --git a/gcc/config.gcc b/gcc/config.gcc index e73223b9b32..5cd17073380 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -204,16 +204,32 @@ xm_file= md_file= # Obsolete configurations. -#case ${target} in -# ) -# if test "x$enable_obsolete" != xyes; then -# echo "*** Configuration ${target} is obsolete." >&2 -# echo "*** Specify --enable-obsolete to build it anyway." >&2 -# echo "*** Support will be REMOVED in the next major release of GCC," >&2 -# echo "*** unless a maintainer comes forward." >&2 -# exit 1 -# fi;; -#esac +case ${target} in +# Avoid generic cases below matching. + h8300-*-rtems* | h8300-*-elf* \ + | sh-*-elf* | sh-*-symbianelf* | sh-*-linux* | sh-*-netbsdelf* \ + | sh-*-rtems* | sh-wrs-vxworks) ;; + arm-*-coff* \ + | armel-*-coff* \ + | h8300-*-* \ + | i[34567]86-*-aout* \ + | i[34567]86-*-coff* \ + | m68k-*-aout* \ + | m68k-*-coff* \ + | sh-*-* \ + | mips-sgi-irix[56]* \ + | pdp11-*-bsd \ + | rs6000-ibm-aix4.[12]* \ + | powerpc-ibm-aix4.[12]* \ + ) + if test "x$enable_obsolete" != xyes; then + echo "*** Configuration ${target} is obsolete." >&2 + echo "*** Specify --enable-obsolete to build it anyway." >&2 + echo "*** Support will be REMOVED in the next major release of GCC," >&2 + echo "*** unless a maintainer comes forward." >&2 + exit 1 + fi;; +esac # Unsupported targets list. Do not put an entry in this list unless # it would otherwise be caught by a more permissive pattern. The list @@ -747,7 +763,9 @@ arm*-*-eabi* | arm*-*-symbianelf* ) tmake_file="arm/t-arm arm/t-arm-elf" case ${target} in arm*-*-eabi*) + tm_file="$tm_file arm/eabi.h" tmake_file="${tmake_file} arm/t-bpabi" + extra_options="${extra_options} arm/eabi.opt" ;; arm*-*-symbianelf*) tm_file="${tm_file} arm/symbian.h" diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h index 876e23404ab..e28d9ead45e 100644 --- a/gcc/config/arm/bpabi.h +++ b/gcc/config/arm/bpabi.h @@ -60,11 +60,14 @@ #endif /* The generic link spec in elf.h does not support shared libraries. */ -#undef LINK_SPEC -#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} " \ +#define BPABI_LINK_SPEC \ + "%{mbig-endian:-EB} %{mlittle-endian:-EL} " \ "%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \ "-X" SUBTARGET_EXTRA_LINK_SPEC +#undef LINK_SPEC +#define LINK_SPEC BPABI_LINK_SPEC + #if defined (__thumb__) #define RENAME_LIBRARY_SET ".thumb_set" #else diff --git a/gcc/config/arm/eabi.h b/gcc/config/arm/eabi.h new file mode 100644 index 00000000000..c7d1d3ed20c --- /dev/null +++ b/gcc/config/arm/eabi.h @@ -0,0 +1,125 @@ +/* Configuration file for ARM EABI targets. + Copyright (C) 2008 + Free Software Foundation, Inc. + Contributed by Doug Kwan (dougkwan@google.com) + + This file is part of GCC. + + GCC 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. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ + +/* This file contains macro overrides for EABI targets. */ + +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + TARGET_BPABI_CPP_BUILTINS (); \ + if (TARGET_ANDROID) \ + builtin_define ("__ANDROID__"); \ + } \ + while (false) + +#undef SUBSUBTARGET_EXTRA_SPECS +#define SUBSUBTARGET_EXTRA_SPECS \ + { "link_android", ANDROID_LINK_SPEC }, \ + { "link_default", BPABI_LINK_SPEC }, \ + { "cc1_android", ANDROID_CC1_SPEC }, \ + { "cc1_default", CC1_DEFAULT_SPEC }, \ + { "cc1plus_android", ANDROID_CC1PLUS_SPEC }, \ + { "cc1plus_default", CC1PLUS_DEFAULT_SPEC }, \ + { "lib_android", ANDROID_LIB_SPEC }, \ + { "lib_default", LIB_DEFAULT_SPEC }, \ + { "startfile_android", ANDROID_STARTFILE_SPEC }, \ + { "startfile_default", UNKNOWN_ELF_STARTFILE_SPEC }, \ + { "endfile_android", ANDROID_ENDFILE_SPEC }, \ + { "endfile_default", UNKNOWN_ELF_ENDFILE_SPEC }, \ + +#undef ANDROID_LINK_SPEC +#define ANDROID_LINK_SPEC \ +"%{mbig-endian:-EB} %{mlittle-endian:-EL} " \ +"%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \ +"%{!static:" \ + "%{shared: -Bsymbolic} " \ + "%{!shared:" \ + "%{rdynamic:-export-dynamic} " \ + "%{!dynamic-linker:-dynamic-linker /system/bin/linker}}} " \ +"-X" SUBTARGET_EXTRA_LINK_SPEC + +/* Override LINK_SPEC in bpabi.h. */ +#undef LINK_SPEC +#define LINK_SPEC \ +"%{mandroid: %(link_android) ;" \ +" : %(link_default)}" + +/* Android uses -fno-exceptions by default. */ +#undef ANDROID_CC1_SPEC +#define ANDROID_CC1_SPEC "%{!fexceptions:-fno-exceptions}" + +/* Default CC1_SPEC as in arm.h. */ +#undef CC1_DEFAULT_SPEC +#define CC1_DEFAULT_SPEC "" + +#undef CC1_SPEC +#define CC1_SPEC \ +"%{mandroid: %(cc1_android) ;" \ +" : %(cc1_default)}" + +/* Android uses -fno-rtti by default. */ +#undef ANDROID_CC1PLUS_SPEC +#define ANDROID_CC1PLUS_SPEC "%{!frtti:-fno-rtti}" + +/* Default CC1PLUS_SPEC as in gcc.c. */ +#undef CC1PLUS_DEFAULT_SPEC +#define CC1PLUS_DEFAULT_SPEC "" + +#undef CC1PLUS_SPEC +#define CC1PLUS_SPEC \ +"%{mandroid: %(cc1plus_android) ;" \ +" : %(cc1plus_default)}" + +#undef ANDROID_LIB_SPEC +#define ANDROID_LIB_SPEC "-lc %{!static:-ldl}" + +/* Default LIB_SPEC as in gcc.c. */ +#undef LIB_DEFAULT_SPEC +#define LIB_DEFAULT_SPEC \ +"%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}" + +#undef LIB_SPEC +#define LIB_SPEC \ +"%{mandroid: %(lib_android) ;" \ +" : %(lib_default)}" + +#undef ANDROID_STARTFILE_SPEC +#define ANDROID_STARTFILE_SPEC \ +"%{!shared:" \ + "%{static: crtbegin_static%O%s ;" \ + " : crtbegin_dynamic%O%s}}" + +/* Override STARTFILE_SPEC in unknown-elf.h. */ +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ +"%{mandroid: %(startfile_android) ;" \ +" : %(startfile_default)}" + +#undef ANDROID_ENDFILE_SPEC +#define ANDROID_ENDFILE_SPEC "%{!shared:crtend_android%O%s}" + +/* Override ENDFILE_SPEC in unknown-elf.h. */ +#undef ENDFILE_SPEC +#define ENDFILE_SPEC \ +"%{mandroid: %(endfile_android) ;" \ +" : %(endfile_default)}" + diff --git a/gcc/config/arm/eabi.opt b/gcc/config/arm/eabi.opt new file mode 100644 index 00000000000..2cda98d56d1 --- /dev/null +++ b/gcc/config/arm/eabi.opt @@ -0,0 +1,23 @@ +; EABI specific options for ARM port of the compiler. + +; Copyright (C) 2008 Free Software Foundation, Inc. +; +; This file is part of GCC. +; +; GCC 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. +; +; GCC is distributed in the hope that it will be useful, but WITHOUT ANY +; WARRANTY; without even the implied warranty of MERCHANTABILITY or +; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +; for more details. +; +; You should have received a copy of the GNU General Public License +; along with GCC; see the file COPYING3. If not see +; <http://www.gnu.org/licenses/>. + +mandroid +Target Report RejectNegative Mask(ANDROID) +Generate code for the Android operating system. diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h index 37c366d5ac8..7c3eddbe058 100644 --- a/gcc/config/arm/elf.h +++ b/gcc/config/arm/elf.h @@ -36,7 +36,8 @@ #ifndef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, \ - { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, + { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, \ + SUBSUBTARGET_EXTRA_SPECS #endif #ifndef SUBTARGET_EXTRA_ASM_SPEC @@ -48,6 +49,9 @@ %{mapcs-float:-mfloat}" #endif +#undef SUBSUBTARGET_EXTRA_SPECS +#define SUBSUBTARGET_EXTRA_SPECS + #ifndef ASM_SPEC #define ASM_SPEC "\ %{mbig-endian:-EB} \ diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h index 38b791d12b1..331e40a1ece 100644 --- a/gcc/config/arm/unknown-elf.h +++ b/gcc/config/arm/unknown-elf.h @@ -33,11 +33,15 @@ #endif /* Now we define the strings used to build the spec file. */ +#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s" + #undef STARTFILE_SPEC -#define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s" +#define STARTFILE_SPEC UNKNOWN_ELF_STARTFILE_SPEC + +#define UNKNOWN_ELF_ENDFILE_SPEC "crtend%O%s crtn%O%s" #undef ENDFILE_SPEC -#define ENDFILE_SPEC "crtend%O%s crtn%O%s" +#define ENDFILE_SPEC UNKNOWN_ELF_ENDFILE_SPEC /* The __USES_INITFINI__ define is tested in newlib/libc/sys/arm/crt0.S to see if it needs to invoked _init() and _fini(). */ diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h index b8493101fb9..7665555fd84 100644 --- a/gcc/config/avr/avr-protos.h +++ b/gcc/config/avr/avr-protos.h @@ -122,7 +122,6 @@ extern RTX_CODE avr_normalize_condition (RTX_CODE condition); extern int compare_eq_p (rtx insn); extern void out_shift_with_cnt (const char *template, rtx insn, rtx operands[], int *len, int t_len); -extern int avr_peep2_scratch_safe (rtx reg_rtx); #endif /* RTX_CODE */ #ifdef HAVE_MACHINE_MODES diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 0176a2aac8f..84625d81f8a 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -85,6 +85,7 @@ static int avr_address_cost (rtx); static bool avr_return_in_memory (const_tree, const_tree); static struct machine_function * avr_init_machine_status (void); static rtx avr_builtin_setjmp_frame_value (void); +static bool avr_hard_regno_scratch_ok (unsigned int); /* Allocate registers from r25 to r8 for parameters for function calls. */ #define FIRST_CUM_REG 26 @@ -335,6 +336,9 @@ int avr_case_values_threshold = 30000; #undef TARGET_BUILTIN_SETJMP_FRAME_VALUE #define TARGET_BUILTIN_SETJMP_FRAME_VALUE avr_builtin_setjmp_frame_value +#undef TARGET_HARD_REGNO_SCRATCH_OK +#define TARGET_HARD_REGNO_SCRATCH_OK avr_hard_regno_scratch_ok + struct gcc_target targetm = TARGET_INITIALIZER; void @@ -5902,27 +5906,20 @@ avr_output_addr_vec_elt (FILE *stream, int value) fprintf (stream, "\trjmp .L%d\n", value); } -/* Returns 1 if SCRATCH are safe to be allocated as a scratch +/* Returns true if SCRATCH are safe to be allocated as a scratch registers (for a define_peephole2) in the current function. */ -int -avr_peep2_scratch_safe (rtx scratch) +bool +avr_hard_regno_scratch_ok (unsigned int regno) { - if ((interrupt_function_p (current_function_decl) - || signal_function_p (current_function_decl)) - && leaf_function_p ()) - { - int first_reg = true_regnum (scratch); - int last_reg = first_reg + GET_MODE_SIZE (GET_MODE (scratch)) - 1; - int reg; + /* Interrupt functions can only use registers that have already been saved + by the prologue, even if they would normally be call-clobbered. */ - for (reg = first_reg; reg <= last_reg; reg++) - { - if (!df_regs_ever_live_p (reg)) - return 0; - } - } - return 1; + if ((cfun->machine->is_interrupt || cfun->machine->is_signal) + && !df_regs_ever_live_p (regno)) + return false; + + return true; } /* Return nonzero if register OLD_REG can be renamed to register NEW_REG. */ diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 0fd371282cc..a6e4c3e0237 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -261,8 +261,7 @@ && operands[1] != constm1_rtx)" [(parallel [(set (match_dup 0) (match_dup 1)) (clobber (match_dup 2))])] - "if (!avr_peep2_scratch_safe (operands[2])) - FAIL;") + "") ;;============================================================================ ;; move word (16 bit) @@ -320,8 +319,7 @@ && operands[1] != constm1_rtx)" [(parallel [(set (match_dup 0) (match_dup 1)) (clobber (match_dup 2))])] - "if (!avr_peep2_scratch_safe (operands[2])) - FAIL;") + "") ;; '*' because it is not used in rtl generation, only in above peephole (define_insn "*reload_inhi" @@ -397,8 +395,7 @@ && operands[1] != constm1_rtx)" [(parallel [(set (match_dup 0) (match_dup 1)) (clobber (match_dup 2))])] - "if (!avr_peep2_scratch_safe (operands[2])) - FAIL;") + "") ;; '*' because it is not used in rtl generation. (define_insn "*reload_insi" @@ -1432,8 +1429,7 @@ "" [(parallel [(set (match_dup 0) (ashift:HI (match_dup 1) (match_dup 2))) (clobber (match_dup 3))])] - "if (!avr_peep2_scratch_safe (operands[3])) - FAIL;") + "") (define_insn "*ashlhi3_const" [(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r") @@ -1453,8 +1449,7 @@ "" [(parallel [(set (match_dup 0) (ashift:SI (match_dup 1) (match_dup 2))) (clobber (match_dup 3))])] - "if (!avr_peep2_scratch_safe (operands[3])) - FAIL;") + "") (define_insn "*ashlsi3_const" [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") @@ -1506,8 +1501,7 @@ "" [(parallel [(set (match_dup 0) (ashiftrt:HI (match_dup 1) (match_dup 2))) (clobber (match_dup 3))])] - "if (!avr_peep2_scratch_safe (operands[3])) - FAIL;") + "") (define_insn "*ashrhi3_const" [(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r") @@ -1527,8 +1521,7 @@ "" [(parallel [(set (match_dup 0) (ashiftrt:SI (match_dup 1) (match_dup 2))) (clobber (match_dup 3))])] - "if (!avr_peep2_scratch_safe (operands[3])) - FAIL;") + "") (define_insn "*ashrsi3_const" [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") @@ -1580,8 +1573,7 @@ "" [(parallel [(set (match_dup 0) (lshiftrt:HI (match_dup 1) (match_dup 2))) (clobber (match_dup 3))])] - "if (!avr_peep2_scratch_safe (operands[3])) - FAIL;") + "") (define_insn "*lshrhi3_const" [(set (match_operand:HI 0 "register_operand" "=r,r,r,r,r") @@ -1601,8 +1593,7 @@ "" [(parallel [(set (match_dup 0) (lshiftrt:SI (match_dup 1) (match_dup 2))) (clobber (match_dup 3))])] - "if (!avr_peep2_scratch_safe (operands[3])) - FAIL;") + "") (define_insn "*lshrsi3_const" [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 3a0eb2de066..a77f200d7ca 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -684,7 +684,7 @@ cris_print_operand (FILE *file, rtx x, int code) /* Print the unsigned supplied integer as if it were signed and < 0, i.e print 255 or 65535 as -1, 254, 65534 as -2, etc. */ if (!CONST_INT_P (x) - || ! CONST_OK_FOR_LETTER_P (INTVAL (x), 'O')) + || !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (x), 'O')) LOSE_AND_RETURN ("invalid operand for 'b' modifier", x); fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)| (INTVAL (x) <= 255 ? ~255 : ~65535)); @@ -1503,8 +1503,8 @@ cris_normal_notice_update_cc (rtx exp, rtx insn) > CRIS_LAST_GENERAL_REGISTER)) || (TARGET_V32 && GET_CODE (SET_SRC (exp)) == CONST_INT - && CONST_OK_FOR_LETTER_P (INTVAL (SET_SRC (exp)), - 'I'))) + && CRIS_CONST_OK_FOR_LETTER_P (INTVAL (SET_SRC (exp)), + 'I'))) { /* There's no CC0 change for this case. Just check for overlap. */ @@ -1831,7 +1831,7 @@ cris_rtx_costs (rtx x, int code, int outer_code, int *total) if (CONST_INT_P (XEXP (x, 1)) /* Two constants may actually happen before optimization. */ && !CONST_INT_P (XEXP (x, 0)) - && !CONST_OK_FOR_LETTER_P (INTVAL (XEXP (x, 1)), 'I')) + && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (XEXP (x, 1)), 'I')) { *total = (rtx_cost (XEXP (x, 0), outer_code) + 2 + 2 * GET_MODE_NUNITS (GET_MODE (XEXP (x, 0)))); @@ -1905,7 +1905,8 @@ cris_address_cost (rtx x) /* A BDAP -32768 .. 32767 is like BDAP quick, but with 2 extra bytes. */ - if (CONST_INT_P (tem2) && CONST_OK_FOR_LETTER_P (INTVAL (tem2), 'L')) + if (CONST_INT_P (tem2) + && CRIS_CONST_OK_FOR_LETTER_P (INTVAL (tem2), 'L')) return (2 + 2) / 2; /* A BDAP with some other constant is 2 bytes extra. */ diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h index 915c3143ceb..b8a66e96a4b 100644 --- a/gcc/config/cris/cris.h +++ b/gcc/config/cris/cris.h @@ -668,7 +668,7 @@ enum reg_class /* We are now out of letters; we could use ten more. This forces us to use C-code in the 'md' file. FIXME: Use some EXTRA_CONSTRAINTS. */ -#define CONST_OK_FOR_LETTER_P(VALUE, C) \ +#define CRIS_CONST_OK_FOR_LETTER_P(VALUE, C) \ ( \ /* MOVEQ, CMPQ, ANDQ, ORQ. */ \ (C) == 'I' ? (VALUE) >= -32 && (VALUE) <= 31 : \ @@ -691,6 +691,16 @@ enum reg_class (C) == 'P' ? (VALUE) >= -32768 && (VALUE) <= 65535 : \ 0) +#define CONST_OK_FOR_CONSTRAINT_P(VALUE, C, S) \ + ( \ + ((C) != 'K' || (S)[1] == 'c') \ + ? CRIS_CONST_OK_FOR_LETTER_P (VALUE, C) : \ + ((C) == 'K' && (S)[1] == 'p') \ + ? exact_log2 (VALUE) >= 0 : \ + 0) + +#define CONSTRAINT_LEN(C, S) ((C) == 'K' ? 2 : DEFAULT_CONSTRAINT_LEN (C, S)) + /* It is really simple to make up a 0.0; it is the same as int-0 in IEEE754. */ #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md index 9e3ec027d38..12e443115cd 100644 --- a/gcc/config/cris/cris.md +++ b/gcc/config/cris/cris.md @@ -347,7 +347,7 @@ (define_insn "*cmpdi_non_v32" [(set (cc0) (compare (match_operand:DI 0 "nonimmediate_operand" "r,r,r,r,r,r,o") - (match_operand:DI 1 "general_operand" "K,I,P,n,r,o,r")))] + (match_operand:DI 1 "general_operand" "Kc,I,P,n,r,o,r")))] "!TARGET_V32" "@ cmpq %1,%M0\;ax\;cmpq 0,%H0 @@ -361,7 +361,7 @@ (define_insn "*cmpdi_v32" [(set (cc0) (compare (match_operand:DI 0 "register_operand" "r,r,r,r,r") - (match_operand:DI 1 "nonmemory_operand" "K,I,P,n,r")))] + (match_operand:DI 1 "nonmemory_operand" "Kc,I,P,n,r")))] "TARGET_V32" "@ cmpq %1,%M0\;ax\;cmpq 0,%H0 @@ -458,9 +458,9 @@ (define_insn "*btst" [(set (cc0) (zero_extract - (match_operand:SI 0 "nonmemory_operand" "r,r,r,r,r,r,n") - (match_operand:SI 1 "const_int_operand" "K,n,K,n,K,n,n") - (match_operand:SI 2 "nonmemory_operand" "M,M,K,n,r,r,r")))] + (match_operand:SI 0 "nonmemory_operand" "r, r,r, r,r, r,Kp") + (match_operand:SI 1 "const_int_operand" "Kc,n,Kc,n,Kc,n,n") + (match_operand:SI 2 "nonmemory_operand" "M, M,Kc,n,r, r,r")))] ;; Either it is a single bit, or consecutive ones starting at 0. ;; The btst ones depend on stuff in NOTICE_UPDATE_CC. "CONST_INT_P (operands[1]) @@ -690,8 +690,8 @@ && (!CONST_INT_P (operands[2]) || INTVAL (operands[2]) > 127 || INTVAL (operands[2]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))) return "#"; if (which_alternative == 4) return "move<m> [%3=%2%S1],%0"; @@ -717,8 +717,8 @@ && (!CONST_INT_P (operands[2]) || INTVAL (operands[2]) > 127 || INTVAL (operands[2]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))) return "#"; if (which_alternative < 3) return "move.%s0 [%3=%1%S2],%0"; @@ -836,8 +836,8 @@ && (!CONST_INT_P (operands[1]) || INTVAL (operands[1]) > 127 || INTVAL (operands[1]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J'))) return "#"; if (which_alternative == 1 || which_alternative == 5) return "#"; @@ -870,8 +870,8 @@ && (!CONST_INT_P (operands[1]) || INTVAL (operands[1]) > 127 || INTVAL (operands[1]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J'))) return "#"; if (which_alternative == 1 || which_alternative == 7 @@ -943,8 +943,8 @@ && (!CONST_INT_P (operands[1]) || INTVAL (operands[1]) > 127 || INTVAL (operands[1]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'J'))) return "#"; if (which_alternative == 4) return "clear<m> [%2=%1%S0]"; @@ -1286,8 +1286,8 @@ && (!CONST_INT_P (operands[2]) || INTVAL (operands[2]) > 127 || INTVAL (operands[2]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))) return "#"; if (which_alternative == 4) return "mov%e4.%m4 [%3=%2%S1],%0"; @@ -1310,8 +1310,8 @@ && (!CONST_INT_P (operands[2]) || INTVAL (operands[2]) > 127 || INTVAL (operands[2]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J'))) return "#"; if (which_alternative == 4) return "mov%e4<m> [%3=%2%S1],%0"; @@ -1647,8 +1647,8 @@ && (!CONST_INT_P (operands[3]) || INTVAL (operands[3]) > 127 || INTVAL (operands[3]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) return "%x5.%s0 [%4=%3%S2],%0"; @@ -1705,8 +1705,8 @@ && (!CONST_INT_P (operands[3]) || INTVAL (operands[3]) > 127 || INTVAL (operands[3]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) return "%x5<m> [%4=%3%S2],%0"; @@ -2137,8 +2137,8 @@ && (!CONST_INT_P (operands[3]) || INTVAL (operands[3]) > 127 || INTVAL (operands[3]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) return "%x5%E6.%m6 [%4=%3%S2],%0"; @@ -2166,8 +2166,8 @@ && (!CONST_INT_P (operands[3]) || INTVAL (operands[3]) > 127 || INTVAL (operands[3]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) return "%x5%E6<m> [%4=%3%S2],%0"; @@ -2246,8 +2246,8 @@ && (!CONST_INT_P (operands[3]) || INTVAL (operands[3]) > 127 || INTVAL (operands[3]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) return "add%e5.b [%4=%3%S2],%0"; @@ -2274,8 +2274,8 @@ && (!CONST_INT_P (operands[3]) || INTVAL (operands[3]) > 127 || INTVAL (operands[3]) < -128 - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') - || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'N') + || CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) return \"%x6%E5.%m5 [%4=%3%S2],%0\"; @@ -3238,7 +3238,7 @@ (define_insn "<shlr>si3" [(set (match_operand:SI 0 "register_operand" "=r") (shift:SI (match_operand:SI 1 "register_operand" "0") - (match_operand:SI 2 "nonmemory_operand" "Kr")))] + (match_operand:SI 2 "nonmemory_operand" "Kcr")))] "" { if (REG_S_P (operands[2])) @@ -3318,7 +3318,7 @@ (define_insn "ashl<mode>3" [(set (match_operand:BW 0 "register_operand" "=r,r") (ashift:BW (match_operand:BW 1 "register_operand" "0,0") - (match_operand:BW 2 "nonmemory_operand" "r,K")))] + (match_operand:BW 2 "nonmemory_operand" "r,Kc")))] "" { return @@ -4668,8 +4668,8 @@ "GET_MODE_SIZE (GET_MODE (operands[4])) <= UNITS_PER_WORD && REGNO (operands[3]) != REGNO (operands[0]) && (BASE_P (operands[1]) || BASE_P (operands[2])) - && ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J') - && ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') + && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J') + && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') && (INTVAL (operands[2]) >= -128 && INTVAL (operands[2]) < 128) && TARGET_SIDE_EFFECT_PREFIXES" [(parallel @@ -4704,8 +4704,8 @@ "GET_MODE_SIZE (GET_MODE (operands[4])) <= UNITS_PER_WORD && REGNO (operands[4]) != REGNO (operands[0]) && (BASE_P (operands[1]) || BASE_P (operands[2])) - && ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J') - && ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') + && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J') + && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') && (INTVAL (operands[2]) >= -128 && INTVAL (operands[2]) < 128) && TARGET_SIDE_EFFECT_PREFIXES" [(parallel @@ -4742,8 +4742,8 @@ ;; Change to GET_MODE_SIZE (GET_MODE (operands[3])) <= UNITS_PER_WORD? "GET_MODE (operands[3]) != DImode && REGNO (operands[0]) != REGNO (operands[3]) - && ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J') - && ! CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') + && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'J') + && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'N') && INTVAL (operands[2]) >= -128 && INTVAL (operands[2]) <= 127 && TARGET_SIDE_EFFECT_PREFIXES" @@ -4934,7 +4934,7 @@ ;; don't do this for a mem-volatile access. "REGNO (operands[2]) == REGNO (operands[0]) && INTVAL (operands[3]) <= 65535 && INTVAL (operands[3]) >= 0 - && !CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'I') + && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'I') && !side_effects_p (operands[1])" ;; FIXME: CC0 valid except for M (i.e. CC_NOT_NEGATIVE). [(set (match_dup 0) (match_dup 4)) @@ -4942,7 +4942,7 @@ { enum machine_mode zmode = INTVAL (operands[3]) <= 255 ? QImode : HImode; enum machine_mode amode - = CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'O') ? SImode : zmode; + = CRIS_CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'O') ? SImode : zmode; rtx op1 = (REG_S_P (operands[1]) ? gen_rtx_REG (zmode, REGNO (operands[1])) diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 9b6c0aa4e16..b48a9d6ef75 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -91,7 +91,7 @@ (const_int -126)) (le (plus (minus (match_dup 0) (pc)) (symbol_ref "DELAY_SLOT_LENGTH (insn)")) - (const_int 126))) + (const_int 125))) (const_int 2) (if_then_else (and (eq_attr "cpu" "h8300h") (and (ge (minus (pc) (match_dup 0)) diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index 9719ec2886f..634a4254f06 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -212,7 +212,7 @@ extern void ix86_expand_vector_set (bool, rtx, rtx, int); extern void ix86_expand_vector_extract (bool, rtx, rtx, int); extern void ix86_expand_reduc_v4sf (rtx (*)(rtx, rtx, rtx), rtx, rtx); -extern bool ix86_sse5_valid_op_p (rtx [], rtx, int, bool, int); +extern bool ix86_sse5_valid_op_p (rtx [], rtx, int, bool, int, bool); extern void ix86_expand_sse5_multiple_memory (rtx [], int, enum machine_mode); /* In winnt.c */ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 26999e71d5b..b63deb834bf 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -25853,11 +25853,12 @@ ix86_expand_round (rtx operand0, rtx operand1) OPERANDS is the array of operands. NUM is the number of operands. USES_OC0 is true if the instruction uses OC0 and provides 4 variants. - NUM_MEMORY is the maximum number of memory operands to accept. */ + NUM_MEMORY is the maximum number of memory operands to accept. + when COMMUTATIVE is set, operand 1 and 2 can be swapped. */ bool ix86_sse5_valid_op_p (rtx operands[], rtx insn ATTRIBUTE_UNUSED, int num, - bool uses_oc0, int num_memory) + bool uses_oc0, int num_memory, bool commutative) { int mem_mask; int mem_count; @@ -25941,6 +25942,8 @@ ix86_sse5_valid_op_p (rtx operands[], rtx insn ATTRIBUTE_UNUSED, int num, /* format, example pmacsdd: xmm1, xmm2, xmm3/mem, xmm1 */ + if (commutative) + return (mem_mask == (1 << 2) || mem_mask == (1 << 1)); else return (mem_mask == (1 << 2)); } @@ -25975,6 +25978,8 @@ ix86_sse5_valid_op_p (rtx operands[], rtx insn ATTRIBUTE_UNUSED, int num, For the integer multiply/add instructions be more restrictive and require operands[2] and operands[3] to be the memory operands. */ + if (commutative) + return (mem_mask == ((1 << 1) | (1 << 3)) || ((1 << 2) | (1 << 3))); else return (mem_mask == ((1 << 2) | (1 << 3))); } diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 6c06184f879..45e5595fab2 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -19508,7 +19508,7 @@ (match_operand:MODEF 1 "register_operand" "x,0") (match_operand:MODEF 2 "register_operand" "0,x") (match_operand:MODEF 3 "register_operand" "x,x")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "pcmov\t{%1, %3, %2, %0|%0, %2, %3, %1}" [(set_attr "type" "sse4arg")]) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 84fb001cd63..c1d306054ad 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -868,7 +868,7 @@ (match_operand:SSEMODEF4 2 "nonimmediate_operand" "x,xm,xm,x")) (match_operand:SSEMODEF4 3 "nonimmediate_operand" "xm,x,0,0")))] "TARGET_SSE5 && TARGET_FUSED_MADD - && ix86_sse5_valid_op_p (operands, insn, 4, true, 2)" + && ix86_sse5_valid_op_p (operands, insn, 4, true, 2, true)" "fmadd<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -882,8 +882,8 @@ (match_operand:SSEMODEF4 2 "nonimmediate_operand" "")) (match_operand:SSEMODEF4 3 "nonimmediate_operand" "")))] "TARGET_SSE5 - && !ix86_sse5_valid_op_p (operands, insn, 4, true, 1) - && ix86_sse5_valid_op_p (operands, insn, 4, true, 2) + && !ix86_sse5_valid_op_p (operands, insn, 4, true, 1, true) + && ix86_sse5_valid_op_p (operands, insn, 4, true, 2, true) && !reg_mentioned_p (operands[0], operands[1]) && !reg_mentioned_p (operands[0], operands[2]) && !reg_mentioned_p (operands[0], operands[3])" @@ -909,7 +909,7 @@ (match_dup 1) (const_int 1)))] "TARGET_SSE5 && TARGET_FUSED_MADD - && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, true)" "fmadd<ssemodesuffixf2s>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -924,7 +924,7 @@ (match_operand:SSEMODEF4 2 "nonimmediate_operand" "x,xm,xm,x")) (match_operand:SSEMODEF4 3 "nonimmediate_operand" "xm,x,0,0")))] "TARGET_SSE5 && TARGET_FUSED_MADD - && ix86_sse5_valid_op_p (operands, insn, 4, true, 2)" + && ix86_sse5_valid_op_p (operands, insn, 4, true, 2, true)" "fmsub<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -938,8 +938,8 @@ (match_operand:SSEMODEF4 2 "nonimmediate_operand" "")) (match_operand:SSEMODEF4 3 "nonimmediate_operand" "")))] "TARGET_SSE5 - && !ix86_sse5_valid_op_p (operands, insn, 4, true, 1) - && ix86_sse5_valid_op_p (operands, insn, 4, true, 2) + && !ix86_sse5_valid_op_p (operands, insn, 4, true, 1, true) + && ix86_sse5_valid_op_p (operands, insn, 4, true, 2, true) && !reg_mentioned_p (operands[0], operands[1]) && !reg_mentioned_p (operands[0], operands[2]) && !reg_mentioned_p (operands[0], operands[3])" @@ -965,7 +965,7 @@ (match_dup 1) (const_int 1)))] "TARGET_SSE5 && TARGET_FUSED_MADD - && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "fmsub<ssemodesuffixf2s>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -982,7 +982,7 @@ (match_operand:SSEMODEF4 1 "nonimmediate_operand" "%0,0,x,xm") (match_operand:SSEMODEF4 2 "nonimmediate_operand" "x,xm,xm,x"))))] "TARGET_SSE5 && TARGET_FUSED_MADD - && ix86_sse5_valid_op_p (operands, insn, 4, true, 2)" + && ix86_sse5_valid_op_p (operands, insn, 4, true, 2, true)" "fnmadd<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -996,8 +996,8 @@ (match_operand:SSEMODEF4 1 "nonimmediate_operand" "") (match_operand:SSEMODEF4 2 "nonimmediate_operand" ""))))] "TARGET_SSE5 - && !ix86_sse5_valid_op_p (operands, insn, 4, true, 1) - && ix86_sse5_valid_op_p (operands, insn, 4, true, 2) + && !ix86_sse5_valid_op_p (operands, insn, 4, true, 1, true) + && ix86_sse5_valid_op_p (operands, insn, 4, true, 2, true) && !reg_mentioned_p (operands[0], operands[1]) && !reg_mentioned_p (operands[0], operands[2]) && !reg_mentioned_p (operands[0], operands[3])" @@ -1023,7 +1023,7 @@ (match_dup 1) (const_int 1)))] "TARGET_SSE5 && TARGET_FUSED_MADD - && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, true)" "fnmadd<ssemodesuffixf2s>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -1040,7 +1040,7 @@ (match_operand:SSEMODEF4 2 "nonimmediate_operand" "x,xm")) (match_operand:SSEMODEF4 3 "nonimmediate_operand" "xm,x")))] "TARGET_SSE5 && TARGET_FUSED_MADD - && ix86_sse5_valid_op_p (operands, insn, 4, true, 2)" + && ix86_sse5_valid_op_p (operands, insn, 4, true, 2, false)" "fnmsub<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -1055,8 +1055,8 @@ (match_operand:SSEMODEF4 2 "nonimmediate_operand" "")) (match_operand:SSEMODEF4 3 "nonimmediate_operand" "")))] "TARGET_SSE5 - && !ix86_sse5_valid_op_p (operands, insn, 4, true, 1) - && ix86_sse5_valid_op_p (operands, insn, 4, true, 2) + && !ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false) + && ix86_sse5_valid_op_p (operands, insn, 4, true, 2, false) && !reg_mentioned_p (operands[0], operands[1]) && !reg_mentioned_p (operands[0], operands[2]) && !reg_mentioned_p (operands[0], operands[3])" @@ -1083,7 +1083,7 @@ (match_dup 1) (const_int 1)))] "TARGET_SSE5 && TARGET_FUSED_MADD - && ix86_sse5_valid_op_p (operands, insn, 4, true, 2)" + && ix86_sse5_valid_op_p (operands, insn, 4, true, 2, false)" "fnmsub<ssemodesuffixf2s>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -1121,7 +1121,7 @@ (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm,xm,x")) (match_operand:SSEMODEF2P 3 "nonimmediate_operand" "xm,x,0,0"))] UNSPEC_SSE5_INTRINSIC))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, true)" "fmadd<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -1151,11 +1151,11 @@ (unspec:SSEMODEF2P [(minus:SSEMODEF2P (mult:SSEMODEF2P - (match_operand:SSEMODEF2P 1 "register_operand" "%0,0,x,xm") + (match_operand:SSEMODEF2P 1 "nonimmediate_operand" "%0,0,x,xm") (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm,xm,x")) (match_operand:SSEMODEF2P 3 "nonimmediate_operand" "xm,x,0,0"))] UNSPEC_SSE5_INTRINSIC))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, true)" "fmsub<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -1191,7 +1191,7 @@ (match_operand:SSEMODEF2P 1 "nonimmediate_operand" "%0,0,x,xm") (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm,xm,x")))] UNSPEC_SSE5_INTRINSIC))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, true)" "fnmadd<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -1224,11 +1224,11 @@ [(minus:SSEMODEF2P (mult:SSEMODEF2P (neg:SSEMODEF2P - (match_operand:SSEMODEF2P 1 "nonimmediate_operand" "%0,0,x,xm")) + (match_operand:SSEMODEF2P 1 "nonimmediate_operand" "0,0,x,xm")) (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm,xm,x")) (match_operand:SSEMODEF2P 3 "nonimmediate_operand" "xm,x,0,0"))] UNSPEC_SSE5_INTRINSIC))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "fnmsub<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) @@ -1271,7 +1271,7 @@ (match_dup 0) (const_int 0))] UNSPEC_SSE5_INTRINSIC))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "fmadd<ssemodesuffixf2s>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<ssescalarmode>")]) @@ -1305,13 +1305,13 @@ [(vec_merge:SSEMODEF2P (minus:SSEMODEF2P (mult:SSEMODEF2P - (match_operand:SSEMODEF2P 1 "nonimmediate_operand" "0,0") + (match_operand:SSEMODEF2P 1 "register_operand" "0,0") (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm")) (match_operand:SSEMODEF2P 3 "nonimmediate_operand" "xm,x")) (match_dup 1) (const_int 1))] UNSPEC_SSE5_INTRINSIC))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "fmsub<ssemodesuffixf2s>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<ssescalarmode>")]) @@ -1347,12 +1347,12 @@ (minus:SSEMODEF2P (match_operand:SSEMODEF2P 3 "nonimmediate_operand" "xm,x") (mult:SSEMODEF2P - (match_operand:SSEMODEF2P 1 "nonimmediate_operand" "0,0") + (match_operand:SSEMODEF2P 1 "nonimmediate_operand" "%0,0") (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm"))) (match_dup 1) (const_int 1))] UNSPEC_SSE5_INTRINSIC))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, true)" "fnmadd<ssemodesuffixf2s>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<ssescalarmode>")]) @@ -1388,13 +1388,13 @@ (minus:SSEMODEF2P (mult:SSEMODEF2P (neg:SSEMODEF2P - (match_operand:SSEMODEF2P 1 "nonimmediate_operand" "0,0")) + (match_operand:SSEMODEF2P 1 "register_operand" "0,0")) (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm")) (match_operand:SSEMODEF2P 3 "nonimmediate_operand" "xm,x")) (match_dup 1) (const_int 1))] UNSPEC_SSE5_INTRINSIC))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "fnmsub<ssemodesuffixf2s>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "ssemuladd") (set_attr "mode" "<ssescalarmode>")]) @@ -6842,10 +6842,10 @@ [(set (match_operand:V8HI 0 "register_operand" "=x,x,x") (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 "nonimmediate_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 2)" + (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,xm") + (match_operand:V8HI 2 "nonimmediate_operand" "x,xm,x")) + (match_operand:V8HI 3 "register_operand" "0,0,0")))] + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 2, true)" "@ pmacsww\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacsww\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -6861,8 +6861,8 @@ (match_operand:V8HI 2 "nonimmediate_operand" "")) (match_operand:V8HI 3 "nonimmediate_operand" "")))] "TARGET_SSE5 - && !ix86_sse5_valid_op_p (operands, insn, 4, false, 1) - && ix86_sse5_valid_op_p (operands, insn, 4, false, 2) + && !ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true) + && ix86_sse5_valid_op_p (operands, insn, 4, false, 2, true) && !reg_mentioned_p (operands[0], operands[1]) && !reg_mentioned_p (operands[0], operands[2]) && !reg_mentioned_p (operands[0], operands[3])" @@ -6879,8 +6879,8 @@ (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 "nonimmediate_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + (match_operand:V8HI 3 "register_operand" "0,0,0")))] + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmacssww\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacssww\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -6898,8 +6898,8 @@ (mult:V4SI (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m") (match_operand:V4SI 2 "nonimmediate_operand" "x,m,x")) - (match_operand:V4SI 3 "nonimmediate_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 2)" + (match_operand:V4SI 3 "register_operand" "0,0,0")))] + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 2, true)" "@ pmacsdd\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacsdd\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -6915,8 +6915,8 @@ (match_operand:V4SI 2 "nonimmediate_operand" "")) (match_operand:V4SI 3 "nonimmediate_operand" "")))] "TARGET_SSE5 - && !ix86_sse5_valid_op_p (operands, insn, 4, false, 1) - && ix86_sse5_valid_op_p (operands, insn, 4, false, 2) + && !ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true) + && ix86_sse5_valid_op_p (operands, insn, 4, false, 2, true) && !reg_mentioned_p (operands[0], operands[1]) && !reg_mentioned_p (operands[0], operands[2]) && !reg_mentioned_p (operands[0], operands[3])" @@ -6933,8 +6933,8 @@ (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 "nonimmediate_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + (match_operand:V4SI 3 "register_operand" "0,0,0")))] + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmacssdd\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacssdd\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -6948,7 +6948,7 @@ (mult:V2DI (sign_extend:V2DI (vec_select:V2SI - (match_operand:V4SI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 1) (const_int 3)]))) (vec_select:V2SI @@ -6956,7 +6956,7 @@ (parallel [(const_int 1) (const_int 3)]))) (match_operand:V2DI 3 "register_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmacssdql\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacssdql\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -6970,7 +6970,7 @@ (mult:V2DI (sign_extend:V2DI (vec_select:V2SI - (match_operand:V4SI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 0) (const_int 2)]))) (sign_extend:V2DI @@ -6979,7 +6979,7 @@ (parallel [(const_int 0) (const_int 2)])))) (match_operand:V2DI 3 "register_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmacssdqh\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacssdqh\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -6993,7 +6993,7 @@ (mult:V2DI (sign_extend:V2DI (vec_select:V2SI - (match_operand:V4SI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 1) (const_int 3)]))) (sign_extend:V2DI @@ -7002,7 +7002,7 @@ (parallel [(const_int 1) (const_int 3)])))) (match_operand:V2DI 3 "register_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmacsdql\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacsdql\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -7016,7 +7016,7 @@ (mult:V2DI (sign_extend:V2DI (vec_select:V2SI - (match_operand:V4SI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 1) (const_int 3)]))) (sign_extend:V2DI @@ -7025,7 +7025,7 @@ (parallel [(const_int 1) (const_int 3)])))) (match_operand:V2DI 3 "memory_operand" "m,m,m")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, -1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, -1, true)" "#" "&& (reload_completed || (!reg_mentioned_p (operands[0], operands[1]) @@ -7097,7 +7097,7 @@ (mult:V2DI (sign_extend:V2DI (vec_select:V2SI - (match_operand:V4SI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 0) (const_int 2)]))) (sign_extend:V2DI @@ -7106,7 +7106,7 @@ (parallel [(const_int 0) (const_int 2)])))) (match_operand:V2DI 3 "register_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmacsdqh\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacsdqh\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -7120,7 +7120,7 @@ (mult:V2DI (sign_extend:V2DI (vec_select:V2SI - (match_operand:V4SI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V4SI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 0) (const_int 2)]))) (sign_extend:V2DI @@ -7129,7 +7129,7 @@ (parallel [(const_int 0) (const_int 2)])))) (match_operand:V2DI 3 "memory_operand" "m,m,m")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, -1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, -1, true)" "#" "&& (reload_completed || (!reg_mentioned_p (operands[0], operands[1]) @@ -7202,7 +7202,7 @@ (mult:V4SI (sign_extend:V4SI (vec_select:V4HI - (match_operand:V8HI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 1) (const_int 3) (const_int 5) @@ -7215,7 +7215,7 @@ (const_int 5) (const_int 7)])))) (match_operand:V4SI 3 "register_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmacsswd\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacsswd\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -7229,7 +7229,7 @@ (mult:V4SI (sign_extend:V4SI (vec_select:V4HI - (match_operand:V8HI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 1) (const_int 3) (const_int 5) @@ -7242,7 +7242,7 @@ (const_int 5) (const_int 7)])))) (match_operand:V4SI 3 "register_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmacswd\t{%3, %2, %1, %0|%0, %1, %2, %3} pmacswd\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -7257,7 +7257,7 @@ (mult:V4SI (sign_extend:V4SI (vec_select:V4HI - (match_operand:V8HI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 0) (const_int 2) (const_int 4) @@ -7285,7 +7285,7 @@ (const_int 5) (const_int 7)]))))) (match_operand:V4SI 3 "register_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmadcsswd\t{%3, %2, %1, %0|%0, %1, %2, %3} pmadcsswd\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -7300,7 +7300,7 @@ (mult:V4SI (sign_extend:V4SI (vec_select:V4HI - (match_operand:V8HI 1 "nonimmediate_operand" "x,x,m") + (match_operand:V8HI 1 "nonimmediate_operand" "%x,x,m") (parallel [(const_int 0) (const_int 2) (const_int 4) @@ -7328,7 +7328,7 @@ (const_int 5) (const_int 7)]))))) (match_operand:V4SI 3 "register_operand" "0,0,0")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, false, 1, true)" "@ pmadcswd\t{%3, %2, %1, %0|%0, %1, %2, %3} pmadcswd\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -7343,7 +7343,7 @@ (match_operand:SSEMODE 3 "nonimmediate_operand" "0,0,xm,x") (match_operand:SSEMODE 1 "vector_move_operand" "x,xm,0,0") (match_operand:SSEMODE 2 "vector_move_operand" "xm,x,x,xm")))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "@ pcmov\t{%3, %2, %1, %0|%0, %1, %2, %3} pcmov\t{%3, %2, %1, %0|%0, %1, %2, %3} @@ -7799,7 +7799,7 @@ (match_operand:V16QI 2 "nonimmediate_operand" "x,xm,xm,x") (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0")] UNSPEC_SSE5_PERMUTE))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "pperm\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "sse4arg") (set_attr "mode" "TI")]) @@ -7902,7 +7902,7 @@ (truncate:V2SI (match_operand:V2DI 2 "nonimmediate_operand" "x,xm,xm,x")))) (use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0"))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "pperm\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "sse4arg") (set_attr "mode" "TI")]) @@ -7915,7 +7915,7 @@ (truncate:V4HI (match_operand:V4SI 2 "nonimmediate_operand" "x,xm,xm,x")))) (use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0"))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "pperm\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "sse4arg") (set_attr "mode" "TI")]) @@ -7928,7 +7928,7 @@ (truncate:V8QI (match_operand:V8HI 2 "nonimmediate_operand" "x,xm,xm,x")))) (use (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0"))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "pperm\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "sse4arg") (set_attr "mode" "TI")]) @@ -7941,7 +7941,7 @@ (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "x,xm,xm,x") (match_operand:V16QI 3 "nonimmediate_operand" "xm,x,0,0")] UNSPEC_SSE5_PERMUTE))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 4, true, 1, false)" "perm<ssemodesuffixf4>\t{%3, %2, %1, %0|%0, %1, %2, %3}" [(set_attr "type" "sse4arg") (set_attr "mode" "<MODE>")]) @@ -8068,7 +8068,7 @@ (rotatert:SSEMODE1248 (match_dup 1) (neg:SSEMODE1248 (match_dup 2)))))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 3, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 3, true, 1, false)" "prot<ssevecsize>\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "sseishft") (set_attr "mode" "TI")]) @@ -8121,7 +8121,7 @@ (ashiftrt:SSEMODE1248 (match_dup 1) (neg:SSEMODE1248 (match_dup 2)))))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 3, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 3, true, 1, false)" "psha<ssevecsize>\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "sseishft") (set_attr "mode" "TI")]) @@ -8138,7 +8138,7 @@ (lshiftrt:SSEMODE1248 (match_dup 1) (neg:SSEMODE1248 (match_dup 2)))))] - "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 3, true, 1)" + "TARGET_SSE5 && ix86_sse5_valid_op_p (operands, insn, 3, true, 1, false)" "pshl<ssevecsize>\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "sseishft") (set_attr "mode" "TI")]) diff --git a/gcc/config/mips/constraints.md b/gcc/config/mips/constraints.md index a387489f204..88fcbf65ef6 100644 --- a/gcc/config/mips/constraints.md +++ b/gcc/config/mips/constraints.md @@ -55,8 +55,11 @@ (define_register_constraint "j" "PIC_FN_ADDR_REG" "@internal") +;; Don't use this constraint in gcc code! It runs the risk of +;; introducing a spill failure; see tls_get_tp_<mode>. (define_register_constraint "v" "V1_REG" - "@internal") + "Register @code{$3}. Do not use this constraint in new code; + it is retained only for compatibility with glibc.") (define_register_constraint "y" "GR_REGS" "Equivalent to @code{r}; retained for backwards compatibility.") diff --git a/gcc/config/mips/driver-native.c b/gcc/config/mips/driver-native.c index 22b08939e24..24831c654c8 100644 --- a/gcc/config/mips/driver-native.c +++ b/gcc/config/mips/driver-native.c @@ -19,6 +19,8 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" +#include "tm.h" /* This will be called by the spec parser in gcc.c when it sees a %:local_cpu_detect(args) construct. Currently it will be called @@ -61,6 +63,10 @@ host_detect_local_cpu (int argc, const char **argv) else if (strstr (buf, "Godson2 V0.3") != NULL || strstr (buf, "Loongson-2 V0.3") != NULL) cpu = "loongson2f"; + else if (strstr (buf, "SiByte SB1") != NULL) + cpu = "sb1"; + else if (strstr (buf, "R5000") != NULL) + cpu = "r5000"; break; } diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index e8d51bcd40e..d1def425576 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -2465,6 +2465,21 @@ mips_call_tls_get_addr (rtx sym, enum mips_symbol_type type, rtx v0) return insn; } +/* Return a pseudo register that contains the current thread pointer. */ + +static rtx +mips_get_tp (void) +{ + rtx tp; + + tp = gen_reg_rtx (Pmode); + if (Pmode == DImode) + emit_insn (gen_tls_get_tp_di (tp)); + else + emit_insn (gen_tls_get_tp_si (tp)); + return tp; +} + /* Generate the code to access LOC, a thread-local SYMBOL_REF, and return its address. The return value will be both a valid address and a valid SET_SRC (either a REG or a LO_SUM). */ @@ -2472,7 +2487,7 @@ mips_call_tls_get_addr (rtx sym, enum mips_symbol_type type, rtx v0) static rtx mips_legitimize_tls_address (rtx loc) { - rtx dest, insn, v0, v1, tmp1, tmp2, eqv; + rtx dest, insn, v0, tp, tmp1, tmp2, eqv; enum tls_model model; if (TARGET_MIPS16) @@ -2514,31 +2529,20 @@ mips_legitimize_tls_address (rtx loc) break; case TLS_MODEL_INITIAL_EXEC: - v1 = gen_rtx_REG (Pmode, GP_RETURN + 1); + tp = mips_get_tp (); tmp1 = gen_reg_rtx (Pmode); tmp2 = mips_unspec_address (loc, SYMBOL_GOTTPREL); if (Pmode == DImode) - { - emit_insn (gen_tls_get_tp_di (v1)); - emit_insn (gen_load_gotdi (tmp1, pic_offset_table_rtx, tmp2)); - } + emit_insn (gen_load_gotdi (tmp1, pic_offset_table_rtx, tmp2)); else - { - emit_insn (gen_tls_get_tp_si (v1)); - emit_insn (gen_load_gotsi (tmp1, pic_offset_table_rtx, tmp2)); - } + emit_insn (gen_load_gotsi (tmp1, pic_offset_table_rtx, tmp2)); dest = gen_reg_rtx (Pmode); - emit_insn (gen_add3_insn (dest, tmp1, v1)); + emit_insn (gen_add3_insn (dest, tmp1, tp)); break; case TLS_MODEL_LOCAL_EXEC: - v1 = gen_rtx_REG (Pmode, GP_RETURN + 1); - if (Pmode == DImode) - emit_insn (gen_tls_get_tp_di (v1)); - else - emit_insn (gen_tls_get_tp_si (v1)); - - tmp1 = mips_unspec_offset_high (NULL, v1, loc, SYMBOL_TPREL); + tp = mips_get_tp (); + tmp1 = mips_unspec_offset_high (NULL, tp, loc, SYMBOL_TPREL); dest = gen_rtx_LO_SUM (Pmode, tmp1, mips_unspec_address (loc, SYMBOL_TPREL)); break; diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 6b2f5fac64d..43c47e5883c 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -69,6 +69,7 @@ (UNSPEC_ADDRESS_FIRST 100) + (TLS_GET_TP_REGNUM 3) (GOT_VERSION_REGNUM 79) ;; For MIPS Paired-Singled Floating Point Instructions. @@ -6499,26 +6500,47 @@ [(set_attr "type" "arith") (set_attr "extended_mips16" "yes")]) -; Thread-Local Storage - -; The TLS base pointer is accessed via "rdhwr $v1, $29". No current -; MIPS architecture defines this register, and no current -; implementation provides it; instead, any OS which supports TLS is -; expected to trap and emulate this instruction. rdhwr is part of the -; MIPS 32r2 specification, but we use it on any architecture because -; we expect it to be emulated. Use .set to force the assembler to -; accept it. - -(define_insn "tls_get_tp_<mode>" - [(set (match_operand:P 0 "register_operand" "=v") - (unspec:P [(const_int 0)] - UNSPEC_TLS_GET_TP))] +;; Thread-Local Storage + +;; The TLS base pointer is accessed via "rdhwr $3, $29". No current +;; MIPS architecture defines this register, and no current +;; implementation provides it; instead, any OS which supports TLS is +;; expected to trap and emulate this instruction. rdhwr is part of the +;; MIPS 32r2 specification, but we use it on any architecture because +;; we expect it to be emulated. Use .set to force the assembler to +;; accept it. +;; +;; We do not use a constraint to force the destination to be $3 +;; because $3 can appear explicitly as a function return value. +;; If we leave the use of $3 implicit in the constraints until +;; reload, we may end up making a $3 return value live across +;; the instruction, leading to a spill failure when reloading it. +(define_insn_and_split "tls_get_tp_<mode>" + [(set (match_operand:P 0 "register_operand" "=d") + (unspec:P [(const_int 0)] UNSPEC_TLS_GET_TP)) + (clobber (reg:P TLS_GET_TP_REGNUM))] "HAVE_AS_TLS && !TARGET_MIPS16" - ".set\tpush\;.set\tmips32r2\t\;rdhwr\t%0,$29\;.set\tpop" + "#" + "&& reload_completed" + [(set (reg:P TLS_GET_TP_REGNUM) + (unspec:P [(const_int 0)] UNSPEC_TLS_GET_TP)) + (set (match_dup 0) (reg:P TLS_GET_TP_REGNUM))] + "" [(set_attr "type" "unknown") ; Since rdhwr always generates a trap for now, putting it in a delay ; slot would make the kernel's emulation of it much slower. (set_attr "can_delay" "no") + (set_attr "mode" "<MODE>") + (set_attr "length" "8")]) + +(define_insn "*tls_get_tp_<mode>_split" + [(set (reg:P TLS_GET_TP_REGNUM) + (unspec:P [(const_int 0)] UNSPEC_TLS_GET_TP))] + "HAVE_AS_TLS && !TARGET_MIPS16" + ".set\tpush\;.set\tmips32r2\t\;rdhwr\t$3,$29\;.set\tpop" + [(set_attr "type" "unknown") + ; See tls_get_tp_<mode> + (set_attr "can_delay" "no") (set_attr "mode" "<MODE>")]) ; The MIPS Paired-Single Floating Point and MIPS-3D Instructions. diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index d0830bba7e0..ce1ec4b9665 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -84,6 +84,149 @@ rs6000_pragma_longcall (cpp_reader *pfile ATTRIBUTE_UNUSED) #define builtin_define(TXT) cpp_define (pfile, TXT) #define builtin_assert(TXT) cpp_assert (pfile, TXT) +/* Keep the AltiVec keywords handy for fast comparisons. */ +static tree __vector_keyword; +static tree vector_keyword; +static tree __pixel_keyword; +static tree pixel_keyword; +static tree __bool_keyword; +static tree bool_keyword; + +/* Preserved across calls. */ +static tree expand_bool_pixel; + +static cpp_hashnode * +altivec_categorize_keyword (const cpp_token *tok) +{ + if (tok->type == CPP_NAME) + { + cpp_hashnode *ident = tok->val.node; + + if (ident == C_CPP_HASHNODE (vector_keyword) + || ident == C_CPP_HASHNODE (__vector_keyword)) + return C_CPP_HASHNODE (__vector_keyword); + + if (ident == C_CPP_HASHNODE (pixel_keyword) + || ident == C_CPP_HASHNODE (__pixel_keyword)) + return C_CPP_HASHNODE (__pixel_keyword); + + if (ident == C_CPP_HASHNODE (bool_keyword) + || ident == C_CPP_HASHNODE (__bool_keyword)) + return C_CPP_HASHNODE (__bool_keyword); + + return ident; + } + + return 0; +} + +static void +init_vector_keywords (void) +{ + /* Keywords without two leading underscores are context-sensitive, + and hence implemented as conditional macros, controlled by the + rs6000_macro_to_expand() function below. */ + + __vector_keyword = get_identifier ("__vector"); + C_CPP_HASHNODE (__vector_keyword)->flags |= NODE_CONDITIONAL; + + __pixel_keyword = get_identifier ("__pixel"); + C_CPP_HASHNODE (__pixel_keyword)->flags |= NODE_CONDITIONAL; + + __bool_keyword = get_identifier ("__bool"); + C_CPP_HASHNODE (__bool_keyword)->flags |= NODE_CONDITIONAL; + + vector_keyword = get_identifier ("vector"); + C_CPP_HASHNODE (vector_keyword)->flags |= NODE_CONDITIONAL; + + pixel_keyword = get_identifier ("pixel"); + C_CPP_HASHNODE (pixel_keyword)->flags |= NODE_CONDITIONAL; + + bool_keyword = get_identifier ("bool"); + C_CPP_HASHNODE (bool_keyword)->flags |= NODE_CONDITIONAL; +} + +/* Called to decide whether a conditional macro should be expanded. + Since we have exactly one such macro (i.e, 'vector'), we do not + need to examine the 'tok' parameter. */ + +static cpp_hashnode * +rs6000_macro_to_expand (cpp_reader *pfile, const cpp_token *tok) +{ + cpp_hashnode *expand_this = tok->val.node; + cpp_hashnode *ident; + + ident = altivec_categorize_keyword (tok); + + if (ident == C_CPP_HASHNODE (__vector_keyword)) + { + tok = cpp_peek_token (pfile, 0); + ident = altivec_categorize_keyword (tok); + + if (ident == C_CPP_HASHNODE (__pixel_keyword)) + { + expand_this = C_CPP_HASHNODE (__vector_keyword); + expand_bool_pixel = __pixel_keyword; + } + else if (ident == C_CPP_HASHNODE (__bool_keyword)) + { + expand_this = C_CPP_HASHNODE (__vector_keyword); + expand_bool_pixel = __bool_keyword; + } + else if (ident) + { + enum rid rid_code = (enum rid)(ident->rid_code); + if (ident->type == NT_MACRO) + { + (void)cpp_get_token (pfile); + tok = cpp_peek_token (pfile, 0); + ident = altivec_categorize_keyword (tok); + if (ident) + rid_code = (enum rid)(ident->rid_code); + } + + if (rid_code == RID_UNSIGNED || rid_code == RID_LONG + || rid_code == RID_SHORT || rid_code == RID_SIGNED + || rid_code == RID_INT || rid_code == RID_CHAR + || rid_code == RID_FLOAT) + { + expand_this = C_CPP_HASHNODE (__vector_keyword); + /* If the next keyword is bool or pixel, it + will need to be expanded as well. */ + tok = cpp_peek_token (pfile, 1); + ident = altivec_categorize_keyword (tok); + + if (ident == C_CPP_HASHNODE (__pixel_keyword)) + expand_bool_pixel = __pixel_keyword; + else if (ident == C_CPP_HASHNODE (__bool_keyword)) + expand_bool_pixel = __bool_keyword; + else + { + /* Try two tokens down, too. */ + tok = cpp_peek_token (pfile, 2); + ident = altivec_categorize_keyword (tok); + if (ident == C_CPP_HASHNODE (__pixel_keyword)) + expand_bool_pixel = __pixel_keyword; + else if (ident == C_CPP_HASHNODE (__bool_keyword)) + expand_bool_pixel = __bool_keyword; + } + } + } + } + else if (expand_bool_pixel && ident == C_CPP_HASHNODE (__pixel_keyword)) + { + expand_this = C_CPP_HASHNODE (__pixel_keyword); + expand_bool_pixel = 0; + } + else if (expand_bool_pixel && ident == C_CPP_HASHNODE (__bool_keyword)) + { + expand_this = C_CPP_HASHNODE (__bool_keyword); + expand_bool_pixel = 0; + } + + return expand_this; +} + void rs6000_cpu_cpp_builtins (cpp_reader *pfile) { @@ -120,6 +263,20 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfile) builtin_define ("__vector=__attribute__((altivec(vector__)))"); builtin_define ("__pixel=__attribute__((altivec(pixel__))) unsigned short"); builtin_define ("__bool=__attribute__((altivec(bool__))) unsigned"); + + if (!flag_iso) + { + /* Define this when supporting context-sensitive keywords. */ + builtin_define ("__APPLE_ALTIVEC__"); + + builtin_define ("vector=vector"); + builtin_define ("pixel=pixel"); + builtin_define ("bool=bool"); + init_vector_keywords (); + + /* Enable context-sensitive macros. */ + cpp_get_callbacks (pfile)->macro_to_expand = rs6000_macro_to_expand; + } } if (TARGET_SPE) builtin_define ("__SPE__"); diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index b9f231729a6..936e0a0ead2 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -3026,6 +3026,14 @@ s390_secondary_reload (bool in_p, rtx x, enum reg_class class, } } + /* A scratch address register is needed when a symbolic constant is + copied to r0 compiling with -fPIC. In other cases the target + register might be used as temporary (see legitimize_pic_address). */ + if (in_p && SYMBOLIC_CONST (x) && flag_pic == 2 && class != ADDR_REGS) + sri->icode = (TARGET_64BIT ? + CODE_FOR_reloaddi_PIC_addr : + CODE_FOR_reloadsi_PIC_addr); + /* Either scratch or no register needed. */ return NO_REGS; } @@ -3272,7 +3280,10 @@ legitimize_pic_address (rtx orig, rtx reg) /* If the GOT offset might be >= 4k, we determine the position of the GOT entry via a PC-relative LARL (@GOTENT). */ - rtx temp = gen_reg_rtx (Pmode); + rtx temp = reg ? reg : gen_reg_rtx (Pmode); + + gcc_assert (REGNO (temp) >= FIRST_PSEUDO_REGISTER + || REGNO_REG_CLASS (REGNO (temp)) == ADDR_REGS); new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTENT); new = gen_rtx_CONST (Pmode, new); @@ -3287,7 +3298,10 @@ legitimize_pic_address (rtx orig, rtx reg) /* If the GOT offset might be >= 4k, we have to load it from the literal pool (@GOT). */ - rtx temp = gen_reg_rtx (Pmode); + rtx temp = reg ? reg : gen_reg_rtx (Pmode); + + gcc_assert (REGNO (temp) >= FIRST_PSEUDO_REGISTER + || REGNO_REG_CLASS (REGNO (temp)) == ADDR_REGS); if (reload_in_progress || reload_completed) df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true); @@ -3707,7 +3721,10 @@ legitimize_tls_address (rtx addr, rtx reg) return new; } -/* Emit insns to move operands[1] into operands[0]. */ +/* Emit insns making the address in operands[1] valid for a standard + move to operands[0]. operands[1] is replaced by an address which + should be used instead of the former RTX to emit the move + pattern. */ void emit_symbolic_move (rtx *operands) diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index d33cc5c3267..ec5b7532977 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -1175,6 +1175,16 @@ DONE; }) +(define_expand "reload<mode>_PIC_addr" + [(parallel [(match_operand 0 "register_operand" "=d") + (match_operand 1 "larl_operand" "") + (match_operand:P 2 "register_operand" "=a")])] + "" +{ + rtx new = legitimize_pic_address (operands[1], operands[2]); + emit_move_insn (operands[0], new); +}) + ; ; movdi instruction pattern(s). ; diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 380705104ee..e311362de6c 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -260,6 +260,7 @@ static void sh_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tre static bool sh_strict_argument_naming (CUMULATIVE_ARGS *); static bool sh_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *); static tree sh_build_builtin_va_list (void); +static tree sh_canonical_va_list_type (tree); static void sh_va_start (tree, rtx); static tree sh_gimplify_va_arg_expr (tree, tree, tree *, tree *); static bool sh_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode, @@ -441,6 +442,8 @@ static int sh2a_function_vector_p (tree); #undef TARGET_BUILD_BUILTIN_VA_LIST #define TARGET_BUILD_BUILTIN_VA_LIST sh_build_builtin_va_list +#undef TARGET_CANONICAL_VA_LIST_TYPE +#define TARGET_CANONICAL_VA_LIST_TYPE sh_canonical_va_list_type #undef TARGET_EXPAND_BUILTIN_VA_START #define TARGET_EXPAND_BUILTIN_VA_START sh_va_start #undef TARGET_GIMPLIFY_VA_ARG_EXPR @@ -7145,6 +7148,14 @@ sh_build_builtin_va_list (void) return record; } +/* Return always va_list_type_node. */ + +static tree +sh_canonical_va_list_type (tree type ATTRIBUTE_UNUSED) +{ + return va_list_type_node; +} + /* Implement `va_start' for varargs and stdarg. */ static void diff --git a/gcc/configure b/gcc/configure index 4f9c86a0e53..c9cc79c4ffe 100755 --- a/gcc/configure +++ b/gcc/configure @@ -7662,7 +7662,7 @@ fi loose_warn= save_CFLAGS="$CFLAGS" for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \ - -Wmissing-prototypes -Wcast-qual -Wc++-compat; do + -Wmissing-prototypes -Wcast-qual; do as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 @@ -7729,7 +7729,7 @@ CFLAGS="$save_CFLAGS" strict_warn= save_CFLAGS="$CFLAGS" -for option in -Wold-style-definition \ +for option in -Wold-style-definition -Wc++-compat \ -Wmissing-format-attribute; do as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` diff --git a/gcc/configure.ac b/gcc/configure.ac index 9fc7d0b00f6..d369c465244 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -630,8 +630,8 @@ AC_SUBST(BASILYSMELT_OBJECT) # So, we only use -pedantic if we can disable those warnings. ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \ - -Wmissing-prototypes -Wcast-qual -Wc++-compat], [loose_warn]) -ACX_PROG_CC_WARNING_OPTS([-Wold-style-definition \ + -Wmissing-prototypes -Wcast-qual], [loose_warn]) +ACX_PROG_CC_WARNING_OPTS([-Wold-style-definition -Wc++-compat \ -Wmissing-format-attribute], [strict_warn]) ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long -Wno-variadic-macros \ -Wno-overlength-strings], [strict_warn]) diff --git a/gcc/coretypes.h b/gcc/coretypes.h index 4fe480f781f..f585eb411c6 100644 --- a/gcc/coretypes.h +++ b/gcc/coretypes.h @@ -60,9 +60,11 @@ enum ir_type { /* Provide forward struct declaration so that we don't have to include all of cpplib.h whenever a random prototype includes a pointer. - Note that the cpp_reader typedef remains part of cpplib.h. */ + Note that the cpp_reader and cpp_token typedefs remain part of + cpplib.h. */ struct cpp_reader; +struct cpp_token; /* The thread-local storage model associated with a given VAR_DECL or SYMBOL_REF. This isn't used much, but both trees and RTL refer diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5ef7e2e1005..62d2335dde1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,95 @@ +2008-07-14 Jason Merrill <jason@redhat.com> + + * lex.c (init_reswords): Always set D_OBJC. + +2008-07-11 Tom Tromey <tromey@redhat.com> + Ian Lance Taylor <iant@google.com> + + * lex.c (struct resword, reswords): Don't define. + (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define. + (init_reswords): Clarify mask code. Use c_common_reswords rather + than reswords. + +2008-07-11 Dodji Seketeli <dseketel@redhat.com> + + PR c++/13101 + * decl.c (grokdeclarator): Warn about initializing variables + of storage class 'extern' only after the type of the declarator + has been properly computed. + +2008-07-11 Dodji Seketeli <dseketel@redhat.com> + + PR c++/31754 + * cp-tree.h (struct cp_decl_specifier_seq): add a location field. It + carries the location of the primary type. + * parser.c (cp_parser_check_type_definition): update documentation. + (cp_parser_check_for_definition_in_return_type, + cp_parser_check_for_invalid_template_id, + cp_parser_set_decl_spec_type, + cp_parser_check_for_definition_in_return_type, + cp_parser_diagnose_invalid_type_name, + cp_parser_new_expression, cp_parser_explicit_instantiation, + cp_parser_type_specifier, cp_parser_simple_type_specifier, + cp_parser_omp_for_loop, cp_parser_pragma): use location in error messages. + + +2008-07-11 Dodji Seketeli <dseketel@redhat.com> + + PR c++/31754 + * pt.c, semantic.c: + * semantic.c (qualified_name_lookup_error, finish_id_expression): + add a location_t parameter so that + error message can have a more accurate location. + * cp-tree.h: updated prototype + * pt.c (tsubst_qualified_id): use location in error messages. + * parser.c (cp_parser_postfix_expression, + cp_parser_objc_statement, cp_parser_trait_expr, + cp_parser_token_is_class_key, + cp_parser_uncommitted_to_tentative_parse_p, + cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal, + cp_parser_error, cp_parser_name_lookup_error, + cp_parser_simulate_error, cp_parser_check_decl_spec, + cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression, + cp_parser_diagnose_invalid_type_name, + cp_parser_parse_and_diagnose_invalid_type_name, + cp_parser_require_pragma_eol, cp_parser_make_typename_type, + cp_parser_string_literal, cp_parser_primary_expression, + cp_parser_primary_expression, cp_parser_unqualified_id, + cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression, + cp_parser_postfix_dot_deref_expression, cp_parser_new_expression, + cp_parser_direct_new_declarator, cp_parser_builtin_offsetof, + cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt, + cp_parser_jump_statement, cp_parser_block_declaration, + cp_parser_simple_declaration, cp_parser_decl_specifier_seq, + cp_parser_function_specifier_opt, cp_parser_decltype, + cp_parser_mem_initializer_list, cp_parser_mem_initializer, + cp_parser_mem_initializer_id, cp_parser_template_parameter, + cp_parser_type_parameter, cp_parser_template_id, cp_parser_template_name, + cp_parser_template_argument): likewise. + +2008-07-09 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/36760 + * pt.c (tsubst_function_type): Remove warning for type qualifiers + on function return type. + +2008-07-09 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/36760 + * pt.c (tsubst_function_type): Don't warn for type qualifiers + on function return type in case of system header. + +2008-07-09 Raksit Ashok <raksit@google.com> + + * parser.c (cp_parser_postfix_expression): New warning based on flag + warn_disallowed_functions. + +2008-07-08 Simon Martin <simartin@users.sourceforge.net> + + PR c++/34963 + * decl.c (grokdeclarator): Reset storage_class and staticp for friend + functions declared with a storage class qualifier. + 2008-07-03 Richard Guenther <rguenther@suse.de> PR c++/36128 @@ -76,7 +168,7 @@ * pt.c: (tsubst_copy_and_build): Adjust. (unify): Handle { }. * name-lookup.c (arg_assoc_type): Handle init_list_type_node. - + 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com> * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index ed6ae0e810a..b07effead05 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3927,6 +3927,9 @@ typedef struct cp_decl_specifier_seq { reflected here. This field will be a TYPE, unless a typedef-name was used, in which case it will be a TYPE_DECL. */ tree type; + /* The location of the primary type. Mainly used for error + reporting. */ + location_t type_location; /* The attributes, if any, provided with the specifier sequence. */ tree attributes; /* If non-NULL, a built-in type that the user attempted to redefine @@ -4653,13 +4656,15 @@ extern void finish_template_decl (tree); extern tree finish_template_type (tree, tree, int); extern tree finish_base_specifier (tree, tree, bool); extern void finish_member_declaration (tree); -extern void qualified_name_lookup_error (tree, tree, tree); +extern void qualified_name_lookup_error (tree, tree, tree, + location_t); extern void check_template_keyword (tree); extern tree finish_id_expression (tree, tree, tree, cp_id_kind *, bool, bool, bool *, bool, bool, bool, bool, - const char **); + const char **, + location_t); extern tree finish_typeof (tree); extern tree finish_offsetof (tree); extern void finish_decl_cleanup (tree, tree); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a5a5574d7b4..83d2c4ea5a7 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8005,19 +8005,6 @@ grokdeclarator (const cp_declarator *declarator, storage_class = sc_none; } } - else if (storage_class == sc_extern && initialized - && !funcdef_flag) - { - if (toplevel_bindings_p ()) - { - /* It's common practice (and completely valid) to have a const - be initialized and declared extern. */ - if (!(type_quals & TYPE_QUAL_CONST)) - warning (0, "%qs initialized and declared %<extern%>", name); - } - else - error ("%qs has both %<extern%> and initializer", name); - } else if (storage_class == sc_extern && funcdef_flag && ! toplevel_bindings_p ()) error ("nested function %qs declared %<extern%>", name); @@ -8036,7 +8023,11 @@ grokdeclarator (const cp_declarator *declarator, } if (storage_class && friendp) - error ("storage class specifiers invalid in friend function declarations"); + { + error ("storage class specifiers invalid in friend function declarations"); + storage_class = sc_none; + staticp = 0; + } if (!id_declarator) unqualified_id = NULL_TREE; @@ -9232,6 +9223,19 @@ grokdeclarator (const cp_declarator *declarator, } } + if (storage_class == sc_extern && initialized && !funcdef_flag) + { + if (toplevel_bindings_p ()) + { + /* It's common practice (and completely valid) to have a const + be initialized and declared extern. */ + if (!(type_quals & TYPE_QUAL_CONST)) + warning (0, "%qs initialized and declared %<extern%>", name); + } + else + error ("%qs has both %<extern%> and initializer", name); + } + /* Record `register' declaration for warnings on & and in case doing stupid register allocation. */ diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 233011b85d9..ee2f2a80706 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -163,190 +163,33 @@ init_operators (void) = "(round %=)"; } -/* The reserved keyword table. */ -struct resword -{ - const char *const word; - ENUM_BITFIELD(rid) const rid : 16; - const unsigned int disable : 16; -}; - -/* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is - _true_. */ -#define D_EXT 0x01 /* GCC extension */ -#define D_ASM 0x02 /* in C99, but has a switch to turn it off */ -#define D_OBJC 0x04 /* Objective C++ only */ -#define D_CXX0X 0x08 /* C++0x only */ - -CONSTRAINT(ridbits_fit, RID_LAST_MODIFIER < sizeof(unsigned long) * CHAR_BIT); - -static const struct resword reswords[] = -{ - { "_Complex", RID_COMPLEX, 0 }, - { "__FUNCTION__", RID_FUNCTION_NAME, 0 }, - { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 }, - { "__alignof", RID_ALIGNOF, 0 }, - { "__alignof__", RID_ALIGNOF, 0 }, - { "__asm", RID_ASM, 0 }, - { "__asm__", RID_ASM, 0 }, - { "__attribute", RID_ATTRIBUTE, 0 }, - { "__attribute__", RID_ATTRIBUTE, 0 }, - { "__builtin_offsetof", RID_OFFSETOF, 0 }, - { "__builtin_va_arg", RID_VA_ARG, 0 }, - { "__complex", RID_COMPLEX, 0 }, - { "__complex__", RID_COMPLEX, 0 }, - { "__const", RID_CONST, 0 }, - { "__const__", RID_CONST, 0 }, - { "__decltype", RID_DECLTYPE, 0 }, - { "__extension__", RID_EXTENSION, 0 }, - { "__func__", RID_C99_FUNCTION_NAME, 0 }, - { "__has_nothrow_assign", RID_HAS_NOTHROW_ASSIGN, 0 }, - { "__has_nothrow_constructor", RID_HAS_NOTHROW_CONSTRUCTOR, 0 }, - { "__has_nothrow_copy", RID_HAS_NOTHROW_COPY, 0 }, - { "__has_trivial_assign", RID_HAS_TRIVIAL_ASSIGN, 0 }, - { "__has_trivial_constructor", RID_HAS_TRIVIAL_CONSTRUCTOR, 0 }, - { "__has_trivial_copy", RID_HAS_TRIVIAL_COPY, 0 }, - { "__has_trivial_destructor", RID_HAS_TRIVIAL_DESTRUCTOR, 0 }, - { "__has_virtual_destructor", RID_HAS_VIRTUAL_DESTRUCTOR, 0 }, - { "__is_abstract", RID_IS_ABSTRACT, 0 }, - { "__is_base_of", RID_IS_BASE_OF, 0 }, - { "__is_class", RID_IS_CLASS, 0 }, - { "__is_convertible_to", RID_IS_CONVERTIBLE_TO, 0 }, - { "__is_empty", RID_IS_EMPTY, 0 }, - { "__is_enum", RID_IS_ENUM, 0 }, - { "__is_pod", RID_IS_POD, 0 }, - { "__is_polymorphic", RID_IS_POLYMORPHIC, 0 }, - { "__is_union", RID_IS_UNION, 0 }, - { "__imag", RID_IMAGPART, 0 }, - { "__imag__", RID_IMAGPART, 0 }, - { "__inline", RID_INLINE, 0 }, - { "__inline__", RID_INLINE, 0 }, - { "__label__", RID_LABEL, 0 }, - { "__null", RID_NULL, 0 }, - { "__real", RID_REALPART, 0 }, - { "__real__", RID_REALPART, 0 }, - { "__restrict", RID_RESTRICT, 0 }, - { "__restrict__", RID_RESTRICT, 0 }, - { "__signed", RID_SIGNED, 0 }, - { "__signed__", RID_SIGNED, 0 }, - { "__thread", RID_THREAD, 0 }, - { "__typeof", RID_TYPEOF, 0 }, - { "__typeof__", RID_TYPEOF, 0 }, - { "__volatile", RID_VOLATILE, 0 }, - { "__volatile__", RID_VOLATILE, 0 }, - { "asm", RID_ASM, D_ASM }, - { "auto", RID_AUTO, 0 }, - { "bool", RID_BOOL, 0 }, - { "break", RID_BREAK, 0 }, - { "case", RID_CASE, 0 }, - { "catch", RID_CATCH, 0 }, - { "char", RID_CHAR, 0 }, - { "char16_t", RID_CHAR16, D_CXX0X }, - { "char32_t", RID_CHAR32, D_CXX0X }, - { "class", RID_CLASS, 0 }, - { "const", RID_CONST, 0 }, - { "const_cast", RID_CONSTCAST, 0 }, - { "continue", RID_CONTINUE, 0 }, - { "decltype", RID_DECLTYPE, D_CXX0X }, - { "default", RID_DEFAULT, 0 }, - { "delete", RID_DELETE, 0 }, - { "do", RID_DO, 0 }, - { "double", RID_DOUBLE, 0 }, - { "dynamic_cast", RID_DYNCAST, 0 }, - { "else", RID_ELSE, 0 }, - { "enum", RID_ENUM, 0 }, - { "explicit", RID_EXPLICIT, 0 }, - { "export", RID_EXPORT, 0 }, - { "extern", RID_EXTERN, 0 }, - { "false", RID_FALSE, 0 }, - { "float", RID_FLOAT, 0 }, - { "for", RID_FOR, 0 }, - { "friend", RID_FRIEND, 0 }, - { "goto", RID_GOTO, 0 }, - { "if", RID_IF, 0 }, - { "inline", RID_INLINE, 0 }, - { "int", RID_INT, 0 }, - { "long", RID_LONG, 0 }, - { "mutable", RID_MUTABLE, 0 }, - { "namespace", RID_NAMESPACE, 0 }, - { "new", RID_NEW, 0 }, - { "operator", RID_OPERATOR, 0 }, - { "private", RID_PRIVATE, 0 }, - { "protected", RID_PROTECTED, 0 }, - { "public", RID_PUBLIC, 0 }, - { "register", RID_REGISTER, 0 }, - { "reinterpret_cast", RID_REINTCAST, 0 }, - { "return", RID_RETURN, 0 }, - { "short", RID_SHORT, 0 }, - { "signed", RID_SIGNED, 0 }, - { "sizeof", RID_SIZEOF, 0 }, - { "static", RID_STATIC, 0 }, - { "static_assert", RID_STATIC_ASSERT, D_CXX0X }, - { "static_cast", RID_STATCAST, 0 }, - { "struct", RID_STRUCT, 0 }, - { "switch", RID_SWITCH, 0 }, - { "template", RID_TEMPLATE, 0 }, - { "this", RID_THIS, 0 }, - { "throw", RID_THROW, 0 }, - { "true", RID_TRUE, 0 }, - { "try", RID_TRY, 0 }, - { "typedef", RID_TYPEDEF, 0 }, - { "typename", RID_TYPENAME, 0 }, - { "typeid", RID_TYPEID, 0 }, - { "typeof", RID_TYPEOF, D_ASM|D_EXT }, - { "union", RID_UNION, 0 }, - { "unsigned", RID_UNSIGNED, 0 }, - { "using", RID_USING, 0 }, - { "virtual", RID_VIRTUAL, 0 }, - { "void", RID_VOID, 0 }, - { "volatile", RID_VOLATILE, 0 }, - { "wchar_t", RID_WCHAR, 0 }, - { "while", RID_WHILE, 0 }, - - /* The remaining keywords are specific to Objective-C++. NB: - All of them will remain _disabled_, since they are context- - sensitive. */ - - /* These ObjC keywords are recognized only immediately after - an '@'. NB: The following C++ keywords double as - ObjC keywords in this context: RID_CLASS, RID_PRIVATE, - RID_PROTECTED, RID_PUBLIC, RID_THROW, RID_TRY and RID_CATCH. */ - { "compatibility_alias", RID_AT_ALIAS, D_OBJC }, - { "defs", RID_AT_DEFS, D_OBJC }, - { "encode", RID_AT_ENCODE, D_OBJC }, - { "end", RID_AT_END, D_OBJC }, - { "implementation", RID_AT_IMPLEMENTATION, D_OBJC }, - { "interface", RID_AT_INTERFACE, D_OBJC }, - { "protocol", RID_AT_PROTOCOL, D_OBJC }, - { "selector", RID_AT_SELECTOR, D_OBJC }, - { "finally", RID_AT_FINALLY, D_OBJC }, - { "synchronized", RID_AT_SYNCHRONIZED, D_OBJC }, - /* These are recognized only in protocol-qualifier context. */ - { "bycopy", RID_BYCOPY, D_OBJC }, - { "byref", RID_BYREF, D_OBJC }, - { "in", RID_IN, D_OBJC }, - { "inout", RID_INOUT, D_OBJC }, - { "oneway", RID_ONEWAY, D_OBJC }, - { "out", RID_OUT, D_OBJC }, -}; +/* Initialize the reserved words. */ void init_reswords (void) { unsigned int i; tree id; - int mask = ((flag_no_asm ? D_ASM : 0) - | D_OBJC - | (flag_no_gnu_keywords ? D_EXT : 0) - | ((cxx_dialect == cxx0x) ? 0 : D_CXX0X)); + int mask = 0; + + mask |= D_CONLY; + if (cxx_dialect != cxx0x) + mask |= D_CXX0X; + if (flag_no_asm) + mask |= D_ASM | D_EXT; + if (flag_no_gnu_keywords) + mask |= D_EXT; + + /* The Objective-C keywords are all context-dependent. */ + mask |= D_OBJC; ridpointers = GGC_CNEWVEC (tree, (int) RID_MAX); - for (i = 0; i < ARRAY_SIZE (reswords); i++) + for (i = 0; i < num_c_common_reswords; i++) { - id = get_identifier (reswords[i].word); - C_SET_RID_CODE (id, reswords[i].rid); - ridpointers [(int) reswords[i].rid] = id; - if (! (reswords[i].disable & mask)) + id = get_identifier (c_common_reswords[i].word); + C_SET_RID_CODE (id, c_common_reswords[i].rid); + ridpointers [(int) c_common_reswords[i].rid] = id; + if (! (c_common_reswords[i].disable & mask)) C_IS_RESERVED_WORD (id) = 1; } } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 2323c672166..567f04eea96 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -1593,7 +1593,7 @@ static tree cp_parser_postfix_expression static tree cp_parser_postfix_open_square_expression (cp_parser *, tree, bool); static tree cp_parser_postfix_dot_deref_expression - (cp_parser *, enum cpp_ttype, tree, bool, cp_id_kind *); + (cp_parser *, enum cpp_ttype, tree, bool, cp_id_kind *, location_t); static tree cp_parser_parenthesized_expression_list (cp_parser *, bool, bool, bool, bool *); static void cp_parser_pseudo_destructor_name @@ -1904,15 +1904,15 @@ static tree cp_parser_objc_statement /* Utility Routines */ static tree cp_parser_lookup_name - (cp_parser *, tree, enum tag_types, bool, bool, bool, tree *); + (cp_parser *, tree, enum tag_types, bool, bool, bool, tree *, location_t); static tree cp_parser_lookup_name_simple - (cp_parser *, tree); + (cp_parser *, tree, location_t); static tree cp_parser_maybe_treat_template_as_class (tree, bool); static bool cp_parser_check_declarator_template_parameters - (cp_parser *, cp_declarator *); + (cp_parser *, cp_declarator *, location_t); static bool cp_parser_check_template_parameters - (cp_parser *, unsigned); + (cp_parser *, unsigned, location_t); static tree cp_parser_simple_cast_expression (cp_parser *); static tree cp_parser_global_scope_opt @@ -1948,9 +1948,9 @@ static tree cp_parser_trait_expr static bool cp_parser_declares_only_class_p (cp_parser *); static void cp_parser_set_storage_class - (cp_parser *, cp_decl_specifier_seq *, enum rid); + (cp_parser *, cp_decl_specifier_seq *, enum rid, location_t); static void cp_parser_set_decl_spec_type - (cp_decl_specifier_seq *, tree, bool); + (cp_decl_specifier_seq *, tree, location_t, bool); static bool cp_parser_friend_p (const cp_decl_specifier_seq *); static cp_token *cp_parser_require @@ -1970,7 +1970,7 @@ static enum tag_types cp_parser_token_is_class_key static void cp_parser_check_class_key (enum tag_types, tree type); static void cp_parser_check_access_in_redeclaration - (tree type); + (tree type, location_t location); static bool cp_parser_optional_template_keyword (cp_parser *); static void cp_parser_pre_parsed_nested_name_specifier @@ -1992,19 +1992,19 @@ static bool cp_parser_uncommitted_to_tentative_parse_p static void cp_parser_error (cp_parser *, const char *); static void cp_parser_name_lookup_error - (cp_parser *, tree, tree, const char *); + (cp_parser *, tree, tree, const char *, location_t); static bool cp_parser_simulate_error (cp_parser *); static bool cp_parser_check_type_definition (cp_parser *); static void cp_parser_check_for_definition_in_return_type - (cp_declarator *, tree); + (cp_declarator *, tree, location_t type_location); static void cp_parser_check_for_invalid_template_id - (cp_parser *, tree); + (cp_parser *, tree, location_t location); static bool cp_parser_non_integral_constant_expression (cp_parser *, const char *); static void cp_parser_diagnose_invalid_type_name - (cp_parser *, tree, tree); + (cp_parser *, tree, tree, location_t); static bool cp_parser_parse_and_diagnose_invalid_type_name (cp_parser *); static int cp_parser_skip_to_closing_parenthesis @@ -2030,7 +2030,7 @@ static bool cp_parser_is_string_literal static bool cp_parser_is_keyword (cp_token *, enum rid); static tree cp_parser_make_typename_type - (cp_parser *, tree, tree); + (cp_parser *, tree, tree, location_t location); static cp_declarator * cp_parser_make_indirect_declarator (enum tree_code, tree, cp_cv_quals, cp_declarator *); @@ -2079,7 +2079,7 @@ cp_parser_error (cp_parser* parser, const char* message) if (token->type == CPP_PRAGMA) { - error ("%<#pragma%> is not allowed here"); + error ("%H%<#pragma%> is not allowed here", &token->location); cp_parser_skip_to_pragma_eol (parser, token); return; } @@ -2102,33 +2102,34 @@ static void cp_parser_name_lookup_error (cp_parser* parser, tree name, tree decl, - const char* desired) + const char* desired, + location_t location) { /* If name lookup completely failed, tell the user that NAME was not declared. */ if (decl == error_mark_node) { if (parser->scope && parser->scope != global_namespace) - error ("%<%E::%E%> has not been declared", - parser->scope, name); + error ("%H%<%E::%E%> has not been declared", + &location, parser->scope, name); else if (parser->scope == global_namespace) - error ("%<::%E%> has not been declared", name); + error ("%H%<::%E%> has not been declared", &location, name); else if (parser->object_scope && !CLASS_TYPE_P (parser->object_scope)) - error ("request for member %qE in non-class type %qT", - name, parser->object_scope); + error ("%Hrequest for member %qE in non-class type %qT", + &location, name, parser->object_scope); else if (parser->object_scope) - error ("%<%T::%E%> has not been declared", - parser->object_scope, name); + error ("%H%<%T::%E%> has not been declared", + &location, parser->object_scope, name); else - error ("%qE has not been declared", name); + error ("%H%qE has not been declared", &location, name); } else if (parser->scope && parser->scope != global_namespace) - error ("%<%E::%E%> %s", parser->scope, name, desired); + error ("%H%<%E::%E%> %s", &location, parser->scope, name, desired); else if (parser->scope == global_namespace) - error ("%<::%E%> %s", name, desired); + error ("%H%<::%E%> %s", &location, name, desired); else - error ("%qE %s", name, desired); + error ("%H%qE %s", &location, name, desired); } /* If we are parsing tentatively, remember that an error has occurred @@ -2149,7 +2150,8 @@ cp_parser_simulate_error (cp_parser* parser) /* Check for repeated decl-specifiers. */ static void -cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs) +cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs, + location_t location) { cp_decl_spec ds; @@ -2162,10 +2164,11 @@ cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs) if (ds == ds_long) { if (count > 2) - error ("%<long long long%> is too long for GCC"); + error ("%H%<long long long%> is too long for GCC", &location); else if (pedantic && !in_system_header && warn_long_long && cxx_dialect == cxx98) - pedwarn ("ISO C++ 1998 does not support %<long long%>"); + pedwarn ("%HISO C++ 1998 does not support %<long long%>", + &location); } else if (count > 1) { @@ -2185,7 +2188,7 @@ cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs) "__complex", "__thread" }; - error ("duplicate %qs", decl_spec_names[(int)ds]); + error ("%Hduplicate %qs", &location, decl_spec_names[(int)ds]); } } } @@ -2211,11 +2214,12 @@ cp_parser_check_type_definition (cp_parser* parser) /* This function is called when the DECLARATOR is processed. The TYPE was a type defined in the decl-specifiers. If it is invalid to define a type in the decl-specifiers for DECLARATOR, an error is - issued. */ + issued. TYPE_LOCATION is the location of TYPE and is used + for error reporting. */ static void cp_parser_check_for_definition_in_return_type (cp_declarator *declarator, - tree type) + tree type, location_t type_location) { /* [dcl.fct] forbids type definitions in return types. Unfortunately, it's not easy to know whether or not we are @@ -2228,31 +2232,32 @@ cp_parser_check_for_definition_in_return_type (cp_declarator *declarator, if (declarator && declarator->kind == cdk_function) { - error ("new types may not be defined in a return type"); - inform ("(perhaps a semicolon is missing after the definition of %qT)", - type); + error ("%Hnew types may not be defined in a return type", &type_location); + inform ("%H(perhaps a semicolon is missing after the definition of %qT)", + &type_location, type); } } /* A type-specifier (TYPE) has been parsed which cannot be followed by "<" in any valid C++ program. If the next token is indeed "<", issue a message warning the user about what appears to be an - invalid attempt to form a template-id. */ + invalid attempt to form a template-id. LOCATION is the location + of the type-specifier (TYPE) */ static void cp_parser_check_for_invalid_template_id (cp_parser* parser, - tree type) + tree type, location_t location) { cp_token_position start = 0; if (cp_lexer_next_token_is (parser->lexer, CPP_LESS)) { if (TYPE_P (type)) - error ("%qT is not a template", type); + error ("%H%qT is not a template", &location, type); else if (TREE_CODE (type) == IDENTIFIER_NODE) - error ("%qE is not a template", type); + error ("%H%qE is not a template", &location, type); else - error ("invalid template-id"); + error ("%Hinvalid template-id", &location); /* Remember the location of the invalid "<". */ if (cp_parser_uncommitted_to_tentative_parse_p (parser)) start = cp_lexer_token_position (parser->lexer, true); @@ -2298,30 +2303,34 @@ cp_parser_non_integral_constant_expression (cp_parser *parser, qualifying scope (or NULL, if none) for ID. This function commits to the current active tentative parse, if any. (Otherwise, the problematic construct might be encountered again later, resulting - in duplicate error messages.) */ + in duplicate error messages.) LOCATION is the location of ID. */ static void -cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree scope, tree id) +cp_parser_diagnose_invalid_type_name (cp_parser *parser, + tree scope, tree id, + location_t location) { tree decl, old_scope; /* Try to lookup the identifier. */ old_scope = parser->scope; parser->scope = scope; - decl = cp_parser_lookup_name_simple (parser, id); + decl = cp_parser_lookup_name_simple (parser, id, location); parser->scope = old_scope; /* If the lookup found a template-name, it means that the user forgot to specify an argument list. Emit a useful error message. */ if (TREE_CODE (decl) == TEMPLATE_DECL) - error ("invalid use of template-name %qE without an argument list", decl); + error ("%Hinvalid use of template-name %qE without an argument list", + &location, decl); else if (TREE_CODE (id) == BIT_NOT_EXPR) - error ("invalid use of destructor %qD as a type", id); + error ("%Hinvalid use of destructor %qD as a type", &location, id); else if (TREE_CODE (decl) == TYPE_DECL) /* Something like 'unsigned A a;' */ - error ("invalid combination of multiple type-specifiers"); + error ("%Hinvalid combination of multiple type-specifiers", + &location); else if (!parser->scope) { /* Issue an error message. */ - error ("%qE does not name a type", id); + error ("%H%qE does not name a type", &location, id); /* If we're in a template class, it's possible that the user was referring to a type from a base class. For example: @@ -2353,8 +2362,8 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree scope, tree id) if (TREE_CODE (field) == TYPE_DECL && DECL_NAME (field) == id) { - inform ("(perhaps %<typename %T::%E%> was intended)", - BINFO_TYPE (b), id); + inform ("%H(perhaps %<typename %T::%E%> was intended)", + &location, BINFO_TYPE (b), id); break; } if (field) @@ -2368,10 +2377,11 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree scope, tree id) else if (parser->scope != error_mark_node) { if (TREE_CODE (parser->scope) == NAMESPACE_DECL) - error ("%qE in namespace %qE does not name a type", - id, parser->scope); + error ("%H%qE in namespace %qE does not name a type", + &location, id, parser->scope); else if (TYPE_P (parser->scope)) - error ("%qE in class %qT does not name a type", id, parser->scope); + error ("%H%qE in class %qT does not name a type", + &location, id, parser->scope); else gcc_unreachable (); } @@ -2392,6 +2402,7 @@ static bool cp_parser_parse_and_diagnose_invalid_type_name (cp_parser *parser) { tree id; + cp_token *token = cp_lexer_peek_token (parser->lexer); cp_parser_parse_tentatively (parser); id = cp_parser_id_expression (parser, @@ -2415,7 +2426,8 @@ cp_parser_parse_and_diagnose_invalid_type_name (cp_parser *parser) return false; /* Emit a diagnostic for the invalid type. */ - cp_parser_diagnose_invalid_type_name (parser, parser->scope, id); + 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); @@ -2703,7 +2715,8 @@ cp_parser_require_pragma_eol (cp_parser *parser, cp_token *pragma_tok) using cp_parser_diagnose_invalid_type_name. */ static tree -cp_parser_make_typename_type (cp_parser *parser, tree scope, tree id) +cp_parser_make_typename_type (cp_parser *parser, tree scope, + tree id, location_t id_location) { tree result; if (TREE_CODE (id) == IDENTIFIER_NODE) @@ -2711,7 +2724,7 @@ cp_parser_make_typename_type (cp_parser *parser, tree scope, tree id) result = make_typename_type (scope, id, typename_type, /*complain=*/tf_none); if (result == error_mark_node) - cp_parser_diagnose_invalid_type_name (parser, scope, id); + cp_parser_diagnose_invalid_type_name (parser, scope, id, id_location); return result; } return make_typename_type (scope, id, typename_type, tf_error); @@ -2929,7 +2942,8 @@ cp_parser_string_literal (cp_parser *parser, bool translate, bool wide_ok) if (type == CPP_STRING) type = tok->type; else if (tok->type != CPP_STRING) - error ("unsupported non-standard concatenation of string literals"); + error ("%Hunsupported non-standard concatenation " + "of string literals", &tok->location); } obstack_grow (&str_ob, &str, sizeof (cpp_string)); @@ -3108,7 +3122,7 @@ cp_parser_primary_expression (cp_parser *parser, bool template_arg_p, cp_id_kind *idk) { - cp_token *token; + cp_token *token = NULL; /* Assume the primary expression is not an id-expression. */ *idk = CP_ID_KIND_NONE; @@ -3206,7 +3220,8 @@ cp_parser_primary_expression (cp_parser *parser, { /* Statement-expressions are not allowed by the standard. */ if (pedantic) - pedwarn ("ISO C++ forbids braced-groups within expressions"); + pedwarn ("%HISO C++ forbids braced-groups within expressions", + &token->location); /* And they're not allowed outside of a function-body; you cannot, for example, write: @@ -3217,8 +3232,9 @@ cp_parser_primary_expression (cp_parser *parser, if (!parser->in_function_body || parser->in_template_argument_list_p) { - error ("statement-expressions are not allowed outside " - "functions nor in template-argument lists"); + error ("%Hstatement-expressions are not allowed outside " + "functions nor in template-argument lists", + &token->location); cp_parser_skip_to_end_of_block_or_statement (parser); expr = error_mark_node; } @@ -3275,7 +3291,8 @@ cp_parser_primary_expression (cp_parser *parser, cp_lexer_consume_token (parser->lexer); if (parser->local_variables_forbidden_p) { - error ("%<this%> may not be used in this context"); + error ("%H%<this%> may not be used in this context", + &token->location); return error_mark_node; } /* Pointers cannot appear in constant-expressions. */ @@ -3375,6 +3392,7 @@ cp_parser_primary_expression (cp_parser *parser, const char *error_msg; bool template_p; bool done; + cp_token *id_expr_token; id_expression: /* Parse the id-expression. */ @@ -3387,6 +3405,7 @@ cp_parser_primary_expression (cp_parser *parser, /*optional_p=*/false); if (id_expression == error_mark_node) return error_mark_node; + id_expr_token = token; token = cp_lexer_peek_token (parser->lexer); done = (token->type != CPP_OPEN_SQUARE && token->type != CPP_OPEN_PAREN @@ -3410,7 +3429,8 @@ cp_parser_primary_expression (cp_parser *parser, template_p, /*is_namespace=*/false, /*check_dependency=*/true, - &ambiguous_decls); + &ambiguous_decls, + id_expr_token->location); /* If the lookup was ambiguous, an error will already have been issued. */ if (ambiguous_decls) @@ -3457,8 +3477,8 @@ cp_parser_primary_expression (cp_parser *parser, decl = check_for_out_of_scope_variable (decl); if (local_variable_p (decl)) { - error ("local variable %qD may not appear in this context", - decl); + error ("%Hlocal variable %qD may not appear in this context", + &id_expr_token->location, decl); return error_mark_node; } } @@ -3472,7 +3492,8 @@ cp_parser_primary_expression (cp_parser *parser, &parser->non_integral_constant_expression_p, template_p, done, address_p, template_arg_p, - &error_msg)); + &error_msg, + id_expr_token->location)); if (error_msg) cp_parser_error (parser, error_msg); return decl; @@ -3756,7 +3777,8 @@ cp_parser_unqualified_id (cp_parser* parser, if (scope && TREE_CODE (scope) == NAMESPACE_DECL) { if (!cp_parser_uncommitted_to_tentative_parse_p (parser)) - error ("scope %qT before %<~%> is not a class-name", scope); + error ("%Hscope %qT before %<~%> is not a class-name", + &token->location, scope); cp_parser_simulate_error (parser); if (cp_lexer_next_token_is (parser->lexer, CPP_NAME)) cp_lexer_consume_token (parser->lexer); @@ -3857,8 +3879,8 @@ cp_parser_unqualified_id (cp_parser* parser, if (declarator_p && scope && !check_dtor_name (scope, type_decl)) { if (!cp_parser_uncommitted_to_tentative_parse_p (parser)) - error ("declaration of %<~%T%> as member of %qT", - type_decl, scope); + error ("%Hdeclaration of %<~%T%> as member of %qT", + &token->location, type_decl, scope); cp_parser_simulate_error (parser); return error_mark_node; } @@ -3871,8 +3893,8 @@ cp_parser_unqualified_id (cp_parser* parser, && !DECL_IMPLICIT_TYPEDEF_P (type_decl) && !DECL_SELF_REFERENCE_P (type_decl) && !cp_parser_uncommitted_to_tentative_parse_p (parser)) - error ("typedef-name %qD used as destructor declarator", - type_decl); + error ("%Htypedef-name %qD used as destructor declarator", + &token->location, type_decl); return build_nt (BIT_NOT_EXPR, TREE_TYPE (type_decl)); } @@ -4076,20 +4098,23 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, /*is_template=*/false, /*is_namespace=*/false, /*check_dependency=*/true, - &ambiguous_decls); + &ambiguous_decls, + token->location); if (TREE_CODE (decl) == TEMPLATE_DECL) - error ("%qD used without template parameters", decl); + error ("%H%qD used without template parameters", + &token->location, decl); else if (ambiguous_decls) { - error ("reference to %qD is ambiguous", - token->u.value); + error ("%Hreference to %qD is ambiguous", + &token->location, token->u.value); print_candidates (ambiguous_decls); decl = error_mark_node; } else cp_parser_name_lookup_error (parser, token->u.value, decl, - "is not a class or namespace"); + "is not a class or namespace", + token->location); } parser->scope = error_mark_node; error_p = true; @@ -4725,6 +4750,9 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, koenig_p, tf_warning_or_error); + if (warn_disallowed_functions) + warn_if_disallowed_function_p (postfix_expression); + /* The POSTFIX_EXPRESSION is certainly no longer an id. */ idk = CP_ID_KIND_NONE; } @@ -4743,7 +4771,8 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, postfix_expression = cp_parser_postfix_dot_deref_expression (parser, token->type, postfix_expression, - false, &idk); + false, &idk, + token->location); is_member_access = true; break; @@ -4857,7 +4886,8 @@ static tree cp_parser_postfix_dot_deref_expression (cp_parser *parser, enum cpp_ttype token_type, tree postfix_expression, - bool for_offsetof, cp_id_kind *idk) + bool for_offsetof, cp_id_kind *idk, + location_t location) { tree name; bool dependent_p; @@ -4889,7 +4919,7 @@ cp_parser_postfix_dot_deref_expression (cp_parser *parser, /* The type of the POSTFIX_EXPRESSION must be complete. */ if (scope == unknown_type_node) { - error ("%qE does not have class type", postfix_expression); + error ("%H%qE does not have class type", &location, postfix_expression); scope = NULL_TREE; } else @@ -4945,6 +4975,7 @@ cp_parser_postfix_dot_deref_expression (cp_parser *parser, ordinary class member access expression, rather than a pseudo-destructor-name. */ bool template_p; + cp_token *token = cp_lexer_peek_token (parser->lexer); /* Parse the id-expression. */ name = (cp_parser_id_expression (parser, @@ -4972,7 +5003,7 @@ cp_parser_postfix_dot_deref_expression (cp_parser *parser, TYPE_DECL here. That is invalid code. */ if (TREE_CODE (name) == TYPE_DECL) { - error ("invalid use of %qD", name); + error ("%Hinvalid use of %qD", &token->location, name); postfix_expression = error_mark_node; } else @@ -5535,19 +5566,23 @@ cp_parser_new_expression (cp_parser* parser) type-id. */ if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN)) { + cp_token *token; /* Consume the `('. */ cp_lexer_consume_token (parser->lexer); /* Parse the type-id. */ type = cp_parser_type_id (parser); /* Look for the closing `)'. */ cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"); + token = cp_lexer_peek_token (parser->lexer); /* There should not be a direct-new-declarator in this production, but GCC used to allowed this, so we check and emit a sensible error message for this case. */ if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_SQUARE)) { - error ("array bound forbidden after parenthesized type-id"); - inform ("try removing the parentheses around the type-id"); + error ("%Harray bound forbidden after parenthesized type-id", + &token->location); + inform ("%Htry removing the parentheses around the type-id", + &token->location); cp_parser_direct_new_declarator (parser); } nelts = NULL_TREE; @@ -5724,6 +5759,7 @@ cp_parser_direct_new_declarator (cp_parser* parser) /* The first expression is not required to be constant. */ if (!declarator) { + cp_token *token = cp_lexer_peek_token (parser->lexer); expression = cp_parser_expression (parser, /*cast_p=*/false); /* The standard requires that the expression have integral type. DR 74 adds enumeration types. We believe that the @@ -5739,8 +5775,8 @@ cp_parser_direct_new_declarator (cp_parser* parser) /*complain=*/true); if (!expression) { - error ("expression in new-declarator must have integral " - "or enumeration type"); + error ("%Hexpression in new-declarator must have integral " + "or enumeration type", &token->location); expression = error_mark_node; } } @@ -6481,6 +6517,7 @@ cp_parser_builtin_offsetof (cp_parser *parser) int save_ice_p, save_non_ice_p; tree type, expr; cp_id_kind dummy; + cp_token *token; /* We're about to accept non-integral-constant things, but will definitely yield an integral constant expression. Save and @@ -6496,6 +6533,7 @@ cp_parser_builtin_offsetof (cp_parser *parser) type = cp_parser_type_id (parser); /* Look for the `,'. */ cp_parser_require (parser, CPP_COMMA, "%<,%>"); + token = cp_lexer_peek_token (parser->lexer); /* Build the (type *)null that begins the traditional offsetof macro. */ expr = build_static_cast (build_pointer_type (type), null_pointer_node, @@ -6503,10 +6541,10 @@ cp_parser_builtin_offsetof (cp_parser *parser) /* Parse the offsetof-member-designator. We begin as if we saw "expr->". */ expr = cp_parser_postfix_dot_deref_expression (parser, CPP_DEREF, expr, - true, &dummy); + true, &dummy, token->location); while (true) { - cp_token *token = cp_lexer_peek_token (parser->lexer); + token = cp_lexer_peek_token (parser->lexer); switch (token->type) { case CPP_OPEN_SQUARE: @@ -6518,7 +6556,8 @@ cp_parser_builtin_offsetof (cp_parser *parser) /* offsetof-member-designator "." identifier */ cp_lexer_consume_token (parser->lexer); expr = cp_parser_postfix_dot_deref_expression (parser, CPP_DOT, expr, - true, &dummy); + true, &dummy, + token->location); break; case CPP_CLOSE_PAREN: @@ -6880,7 +6919,8 @@ cp_parser_label_for_labeled_statement (cp_parser* parser) if (parser->in_switch_statement_p) finish_case_label (expr, expr_hi); else - error ("case label %qE not within a switch statement", expr); + error ("%Hcase label %qE not within a switch statement", + &token->location, expr); } break; @@ -6891,7 +6931,7 @@ cp_parser_label_for_labeled_statement (cp_parser* parser) if (parser->in_switch_statement_p) finish_case_label (NULL_TREE, NULL_TREE); else - error ("case label not within a switch statement"); + error ("%Hcase label not within a switch statement", &token->location); break; default: @@ -7009,7 +7049,7 @@ cp_parser_statement_seq_opt (cp_parser* parser, tree in_statement_expr) else { token = cp_lexer_consume_token (parser->lexer); - error ("%<else%> without a previous %<if%>"); + error ("%H%<else%> without a previous %<if%>", &token->location); } } @@ -7511,7 +7551,7 @@ cp_parser_jump_statement (cp_parser* parser) switch (in_statement) { case 0: - error ("break statement not within loop or switch"); + error ("%Hbreak statement not within loop or switch", &token->location); break; default: gcc_assert ((in_statement & IN_SWITCH_STMT) @@ -7519,10 +7559,10 @@ cp_parser_jump_statement (cp_parser* parser) statement = finish_break_stmt (); break; case IN_OMP_BLOCK: - error ("invalid exit from OpenMP structured block"); + error ("%Hinvalid exit from OpenMP structured block", &token->location); break; case IN_OMP_FOR: - error ("break statement used with OpenMP for loop"); + error ("%Hbreak statement used with OpenMP for loop", &token->location); break; } cp_parser_require (parser, CPP_SEMICOLON, "%<;%>"); @@ -7532,14 +7572,14 @@ cp_parser_jump_statement (cp_parser* parser) switch (parser->in_statement & ~(IN_SWITCH_STMT | IN_IF_STMT)) { case 0: - error ("continue statement not within a loop"); + error ("%Hcontinue statement not within a loop", &token->location); break; case IN_ITERATION_STMT: case IN_OMP_FOR: statement = finish_continue_stmt (); break; case IN_OMP_BLOCK: - error ("invalid exit from OpenMP structured block"); + error ("%Hinvalid exit from OpenMP structured block", &token->location); break; default: gcc_unreachable (); @@ -7576,7 +7616,7 @@ cp_parser_jump_statement (cp_parser* parser) { /* Issue a warning about this use of a GNU extension. */ if (pedantic) - pedwarn ("ISO C++ forbids computed gotos"); + pedwarn ("%HISO C++ forbids computed gotos", &token->location); /* Consume the '*' token. */ cp_lexer_consume_token (parser->lexer); /* Parse the dependent expression. */ @@ -7937,7 +7977,7 @@ cp_parser_block_declaration (cp_parser *parser, else if (token1->keyword == RID_LABEL) { cp_lexer_consume_token (parser->lexer); - error ("%<__label__%> not at the beginning of a block"); + error ("%H%<__label__%> not at the beginning of a block", &token1->location); cp_parser_skip_to_end_of_statement (parser); /* If the next token is now a `;', consume it. */ if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON)) @@ -8071,7 +8111,11 @@ cp_parser_simple_declaration (cp_parser* parser, which is erroneous. */ if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) - error ("mixing declarations and function-definitions is forbidden"); + { + cp_token *token = cp_lexer_peek_token (parser->lexer); + error ("%Hmixing declarations and function-definitions is forbidden", + &token->location); + } /* Otherwise, we're done with the list of declarators. */ else { @@ -8167,6 +8211,7 @@ cp_parser_decl_specifier_seq (cp_parser* parser, int* declares_class_or_enum) { bool constructor_possible_p = !parser->in_declarator_p; + cp_token *start_token = NULL; /* Clear DECL_SPECS. */ clear_decl_specs (decl_specs); @@ -8183,6 +8228,11 @@ cp_parser_decl_specifier_seq (cp_parser* parser, /* Peek at the next token. */ token = cp_lexer_peek_token (parser->lexer); + + /* Save the first token of the decl spec list for error + reporting. */ + if (!start_token) + start_token = token; /* Handle attributes. */ if (token->keyword == RID_ATTRIBUTE) { @@ -8259,15 +8309,17 @@ cp_parser_decl_specifier_seq (cp_parser* parser, we're complaining about C++0x compatibility. */ warning (OPT_Wc__0x_compat, - "%<auto%> will change meaning in C++0x; please remove it"); + "%H%<auto%> will change meaning in C++0x; please remove it", + &token->location); /* Set the storage class anyway. */ - cp_parser_set_storage_class (parser, decl_specs, RID_AUTO); + cp_parser_set_storage_class (parser, decl_specs, RID_AUTO, + token->location); } else /* We do not yet support the use of `auto' as a type-specifier. */ - error ("C++0x %<auto%> specifier not supported"); + error ("%HC++0x %<auto%> specifier not supported", &token->location); break; case RID_REGISTER: @@ -8276,7 +8328,8 @@ cp_parser_decl_specifier_seq (cp_parser* parser, case RID_MUTABLE: /* Consume the token. */ cp_lexer_consume_token (parser->lexer); - cp_parser_set_storage_class (parser, decl_specs, token->keyword); + cp_parser_set_storage_class (parser, decl_specs, token->keyword, + token->location); break; case RID_THREAD: /* Consume the token. */ @@ -8312,7 +8365,6 @@ cp_parser_decl_specifier_seq (cp_parser* parser, /*is_declaration=*/true, &decl_spec_declares_class_or_enum, &is_cv_qualifier); - *declares_class_or_enum |= decl_spec_declares_class_or_enum; /* If this type-specifier referenced a user-defined type @@ -8372,12 +8424,13 @@ cp_parser_decl_specifier_seq (cp_parser* parser, flags |= CP_PARSER_FLAGS_OPTIONAL; } - cp_parser_check_decl_spec (decl_specs); + cp_parser_check_decl_spec (decl_specs, start_token->location); /* Don't allow a friend specifier with a class definition. */ if (decl_specs->specs[(int) ds_friend] != 0 && (*declares_class_or_enum & 2)) - error ("class definition may not be declared a friend"); + error ("%Hclass definition may not be declared a friend", + &start_token->location); } /* Parse an (optional) storage-class-specifier. @@ -8433,7 +8486,8 @@ static tree cp_parser_function_specifier_opt (cp_parser* parser, cp_decl_specifier_seq *decl_specs) { - switch (cp_lexer_peek_token (parser->lexer)->keyword) + cp_token *token = cp_lexer_peek_token (parser->lexer); + switch (token->keyword) { case RID_INLINE: if (decl_specs) @@ -8445,7 +8499,7 @@ cp_parser_function_specifier_opt (cp_parser* parser, A member function template shall not be virtual. */ if (PROCESSING_REAL_TEMPLATE_DECL_P ()) - error ("templates may not be %<virtual%>"); + error ("%Htemplates may not be %<virtual%>", &token->location); else if (decl_specs) ++decl_specs->specs[(int) ds_virtual]; break; @@ -8599,6 +8653,7 @@ cp_parser_decltype (cp_parser *parser) const char *saved_message; bool saved_integral_constant_expression_p; bool saved_non_integral_constant_expression_p; + cp_token *id_expr_start_token; /* Look for the `decltype' token. */ if (!cp_parser_require_keyword (parser, RID_DECLTYPE, "%<decltype%>")) @@ -8628,6 +8683,7 @@ cp_parser_decltype (cp_parser *parser) return error_mark_node; /* First, try parsing an id-expression. */ + id_expr_start_token = cp_lexer_peek_token (parser->lexer); cp_parser_parse_tentatively (parser); expr = cp_parser_id_expression (parser, /*template_keyword_p=*/false, @@ -8650,7 +8706,8 @@ cp_parser_decltype (cp_parser *parser) /*is_template=*/false, /*is_namespace=*/false, /*check_dependency=*/true, - /*ambiguous_decls=*/NULL); + /*ambiguous_decls=*/NULL, + id_expr_start_token->location); if (expr && expr != error_mark_node @@ -8670,7 +8727,8 @@ cp_parser_decltype (cp_parser *parser) /*done=*/true, /*address_p=*/false, /*template_arg_p=*/false, - &error_msg)); + &error_msg, + id_expr_start_token->location)); if (expr == error_mark_node) /* We found an id-expression, but it was something that we @@ -8913,17 +8971,20 @@ static void cp_parser_mem_initializer_list (cp_parser* parser) { tree mem_initializer_list = NULL_TREE; + cp_token *token = cp_lexer_peek_token (parser->lexer); /* Let the semantic analysis code know that we are starting the mem-initializer-list. */ if (!DECL_CONSTRUCTOR_P (current_function_decl)) - error ("only constructors take base initializers"); + error ("%Honly constructors take base initializers", + &token->location); /* Loop through the list. */ while (true) { tree mem_initializer; + token = cp_lexer_peek_token (parser->lexer); /* Parse the mem-initializer. */ mem_initializer = cp_parser_mem_initializer (parser); /* If the next token is a `...', we're expanding member initializers. */ @@ -8937,8 +8998,8 @@ cp_parser_mem_initializer_list (cp_parser* parser) if (mem_initializer != error_mark_node && !TYPE_P (TREE_PURPOSE (mem_initializer))) { - error ("cannot expand initializer for member %<%D%>", - TREE_PURPOSE (mem_initializer)); + error ("%Hcannot expand initializer for member %<%D%>", + &token->location, TREE_PURPOSE (mem_initializer)); mem_initializer = error_mark_node; } @@ -8986,11 +9047,13 @@ cp_parser_mem_initializer (cp_parser* parser) tree mem_initializer_id; tree expression_list; tree member; + cp_token *token = cp_lexer_peek_token (parser->lexer); /* Find out what is being initialized. */ if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN)) { - permerror ("anachronistic old-style base class initializer"); + permerror ("%Hanachronistic old-style base class initializer", + &token->location); mem_initializer_id = NULL_TREE; } else @@ -9041,11 +9104,14 @@ cp_parser_mem_initializer_id (cp_parser* parser) bool template_p = false; tree id; + cp_token *token = cp_lexer_peek_token (parser->lexer); + /* `typename' is not allowed in this context ([temp.res]). */ if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TYPENAME)) { - error ("keyword %<typename%> not allowed in this context (a qualified " - "member initializer is implicitly a type)"); + error ("%Hkeyword %<typename%> not allowed in this context (a qualified " + "member initializer is implicitly a type)", + &token->location); cp_lexer_consume_token (parser->lexer); } /* Look for the optional `::' operator. */ @@ -9562,6 +9628,7 @@ cp_parser_template_parameter (cp_parser* parser, bool *is_non_type, appropriate diagnostic here. */ /* Consume the `='. */ + cp_token *start_token = cp_lexer_peek_token (parser->lexer); cp_lexer_consume_token (parser->lexer); /* Find the name of the parameter pack. */ @@ -9570,10 +9637,11 @@ cp_parser_template_parameter (cp_parser* parser, bool *is_non_type, id_declarator = id_declarator->declarator; if (id_declarator && id_declarator->kind == cdk_id) - error ("template parameter pack %qD cannot have a default argument", - id_declarator->u.id.unqualified_name); + error ("%Htemplate parameter pack %qD cannot have a default argument", + &start_token->location, id_declarator->u.id.unqualified_name); else - error ("template parameter pack cannot have a default argument"); + error ("%Htemplate parameter pack cannot have a default argument", + &start_token->location); /* Parse the default argument, but throw away the result. */ cp_parser_default_argument (parser, /*template_parm_p=*/true); @@ -9667,10 +9735,11 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack) if (*is_parameter_pack) { if (identifier) - error ("template parameter pack %qD cannot have a default argument", - identifier); + error ("%Htemplate parameter pack %qD cannot have a " + "default argument", &token->location, identifier); else - error ("template parameter packs cannot have default arguments"); + error ("%Htemplate parameter packs cannot have " + "default arguments", &token->location); default_argument = NULL_TREE; } pop_deferring_access_checks (); @@ -9738,6 +9807,9 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack) cp_lexer_consume_token (parser->lexer); /* Parse the id-expression. */ push_deferring_access_checks (dk_no_deferred); + /* save token before parsing the id-expression, for error + reporting */ + token = cp_lexer_peek_token (parser->lexer); default_argument = cp_parser_id_expression (parser, /*template_keyword_p=*/false, @@ -9758,7 +9830,8 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack) /*is_template=*/is_template, /*is_namespace=*/false, /*check_dependency=*/true, - /*ambiguous_decls=*/NULL); + /*ambiguous_decls=*/NULL, + token->location); /* See if the default argument is valid. */ default_argument = check_template_template_default_arg (default_argument); @@ -9768,10 +9841,13 @@ cp_parser_type_parameter (cp_parser* parser, bool *is_parameter_pack) if (*is_parameter_pack) { if (identifier) - error ("template parameter pack %qD cannot have a default argument", - identifier); + error ("%Htemplate parameter pack %qD cannot " + "have a default argument", + &token->location, identifier); else - error ("template parameter packs cannot have default arguments"); + error ("%Htemplate parameter packs cannot " + "have default arguments", + &token->location); default_argument = NULL_TREE; } pop_deferring_access_checks (); @@ -9820,7 +9896,7 @@ cp_parser_template_id (cp_parser *parser, cp_token_position start_of_id = 0; deferred_access_check *chk; VEC (deferred_access_check,gc) *access_check; - cp_token *next_token, *next_token_2; + cp_token *next_token = NULL, *next_token_2 = NULL, *token = NULL; bool is_identifier; /* If the next token corresponds to a template-id, there is no need @@ -9868,6 +9944,7 @@ cp_parser_template_id (cp_parser *parser, /* Parse the template-name. */ is_identifier = false; + token = cp_lexer_peek_token (parser->lexer); template = cp_parser_template_name (parser, template_keyword_p, check_dependency_p, is_declaration, @@ -9894,6 +9971,7 @@ cp_parser_template_id (cp_parser *parser, /* Consume the first token (CPP_OPEN_SQUARE - which we pretend it is CPP_LESS. */ cp_lexer_consume_token (parser->lexer); + /* Parse the arguments. */ arguments = cp_parser_enclosed_template_argument_list (parser); if (!cp_parser_parse_definitely (parser)) @@ -9908,15 +9986,18 @@ cp_parser_template_id (cp_parser *parser, } /* Otherwise, emit an error about the invalid digraph, but continue parsing because we got our argument list. */ - permerror ("%<<::%> cannot begin a template-argument list"); - inform ("%<<:%> is an alternate spelling for %<[%>. Insert whitespace " - "between %<<%> and %<::%>"); + permerror ("%H%<<::%> cannot begin a template-argument list", + &next_token->location); + inform ("%H%<<:%> is an alternate spelling for %<[%>. Insert whitespace " + "between %<<%> and %<::%>", + &next_token->location); if (!flag_permissive) { static bool hint; if (!hint) { - inform ("(if you use %<-fpermissive%> G++ will accept your code)"); + inform ("%H(if you use %<-fpermissive%> G++ will accept your code)", + &next_token->location); hint = true; } } @@ -9989,7 +10070,8 @@ cp_parser_template_id (cp_parser *parser, user, as opposed to simply marking the tentative parse as failed? */ if (cp_parser_error_occurred (parser) && template_id != error_mark_node) - error ("parse error in template argument list"); + error ("%Hparse error in template argument list", + &token->location); } pop_deferring_access_checks (); @@ -10043,6 +10125,7 @@ cp_parser_template_name (cp_parser* parser, tree identifier; tree decl; tree fns; + cp_token *token = cp_lexer_peek_token (parser->lexer); /* If the next token is `operator', then we have either an operator-function-id or a conversion-function-id. */ @@ -10102,7 +10185,8 @@ cp_parser_template_name (cp_parser* parser, cp_token_position start = 0; /* Explain what went wrong. */ - error ("non-template %qD used as template", identifier); + error ("%Hnon-template %qD used as template", + &token->location, identifier); inform ("use %<%T::template %D%> to indicate that it is a template", parser->scope, identifier); /* If parsing tentatively, find the location of the "<" token. */ @@ -10146,7 +10230,8 @@ cp_parser_template_name (cp_parser* parser, /*is_template=*/false, /*is_namespace=*/false, check_dependency_p, - /*ambiguous_decls=*/NULL); + /*ambiguous_decls=*/NULL, + token->location); decl = maybe_get_template_decl_from_type_decl (decl); /* If DECL is a template, then the name was a template-name. */ @@ -10292,7 +10377,7 @@ cp_parser_template_argument (cp_parser* parser) bool template_p; bool address_p; bool maybe_type_id = false; - cp_token *token; + cp_token *token = NULL, *argument_start_token = NULL; cp_id_kind idk; /* There's really no way to know what we're looking at, so we just @@ -10339,6 +10424,7 @@ cp_parser_template_argument (cp_parser* parser) /* We're still not sure what the argument will be. */ cp_parser_parse_tentatively (parser); /* Try a template. */ + argument_start_token = cp_lexer_peek_token (parser->lexer); argument = cp_parser_id_expression (parser, /*template_keyword_p=*/false, /*check_dependency_p=*/true, @@ -10361,7 +10447,8 @@ cp_parser_template_argument (cp_parser* parser) /*is_template=*/template_p, /*is_namespace=*/false, /*check_dependency=*/true, - /*ambiguous_decls=*/NULL); + /*ambiguous_decls=*/NULL, + argument_start_token->location); if (TREE_CODE (argument) != TEMPLATE_DECL && TREE_CODE (argument) != UNBOUND_CLASS_TEMPLATE) cp_parser_error (parser, "expected template-name"); @@ -10518,6 +10605,7 @@ cp_parser_explicit_instantiation (cp_parser* parser) int declares_class_or_enum; cp_decl_specifier_seq decl_specifiers; tree extension_specifier = NULL_TREE; + cp_token *token; /* Look for an (optional) storage-class-specifier or function-specifier. */ @@ -10540,6 +10628,7 @@ cp_parser_explicit_instantiation (cp_parser* parser) control while processing explicit instantiation directives. */ push_deferring_access_checks (dk_no_check); /* Parse a decl-specifier-seq. */ + token = cp_lexer_peek_token (parser->lexer); cp_parser_decl_specifier_seq (parser, CP_PARSER_FLAGS_OPTIONAL, &decl_specifiers, @@ -10572,7 +10661,8 @@ cp_parser_explicit_instantiation (cp_parser* parser) /*member_p=*/false); if (declares_class_or_enum & 2) cp_parser_check_for_definition_in_return_type (declarator, - decl_specifiers.type); + decl_specifiers.type, + decl_specifiers.type_location); if (declarator != cp_error_declarator) { decl = grokdeclarator (declarator, &decl_specifiers, @@ -10613,6 +10703,8 @@ static void cp_parser_explicit_specialization (cp_parser* parser) { bool need_lang_pop; + cp_token *token = cp_lexer_peek_token (parser->lexer); + /* Look for the `template' keyword. */ cp_parser_require_keyword (parser, RID_TEMPLATE, "%<template%>"); /* Look for the `<'. */ @@ -10627,7 +10719,7 @@ cp_parser_explicit_specialization (cp_parser* parser) linkage. */ if (current_lang_name == lang_name_c) { - error ("template specialization with C linkage"); + error ("%Htemplate specialization with C linkage", &token->location); /* Give it C++ linkage to avoid confusing other parts of the front end. */ push_lang_context (lang_name_cplusplus); @@ -10742,6 +10834,7 @@ cp_parser_type_specifier (cp_parser* parser, if (decl_specs) cp_parser_set_decl_spec_type (decl_specs, type_spec, + token->location, /*user_defined_p=*/true); return type_spec; } @@ -10766,6 +10859,7 @@ cp_parser_type_specifier (cp_parser* parser, if (decl_specs) cp_parser_set_decl_spec_type (decl_specs, type_spec, + token->location, /*user_defined_p=*/true); return type_spec; } @@ -10787,6 +10881,7 @@ cp_parser_type_specifier (cp_parser* parser, if (decl_specs) cp_parser_set_decl_spec_type (decl_specs, type_spec, + token->location, /*user_defined_p=*/true); return type_spec; @@ -10952,7 +11047,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, cp_lexer_consume_token (parser->lexer); /* We do not yet support the use of `auto' as a type-specifier. */ - error ("C++0x %<auto%> specifier not supported"); + error ("%HC++0x %<auto%> specifier not supported", &token->location); } break; @@ -10962,6 +11057,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, if (decl_specs) cp_parser_set_decl_spec_type (decl_specs, type, + token->location, /*user_defined_p=*/true); return type; @@ -10977,6 +11073,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, if (decl_specs) cp_parser_set_decl_spec_type (decl_specs, type, + token->location, /*user_defined_p=*/true); return type; @@ -10998,6 +11095,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, && token->keyword != RID_LONG)) cp_parser_set_decl_spec_type (decl_specs, type, + token->location, /*user_defined=*/false); if (decl_specs) decl_specs->any_specifiers_p = true; @@ -11008,7 +11106,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, /* There is no valid C++ program where a non-template type is followed by a "<". That usually indicates that the user thought that the type was a template. */ - cp_parser_check_for_invalid_template_id (parser, type); + cp_parser_check_for_invalid_template_id (parser, type, token->location); return TYPE_NAME (type); } @@ -11037,6 +11135,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, /*type_p=*/false, /*is_declaration=*/false) != NULL_TREE); + token = cp_lexer_peek_token (parser->lexer); /* If we have seen a nested-name-specifier, and the next token is `template', then we are using the template-id production. */ if (parser->scope @@ -11071,6 +11170,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, type = NULL_TREE; if (type && decl_specs) cp_parser_set_decl_spec_type (decl_specs, type, + token->location, /*user_defined=*/true); } @@ -11103,7 +11203,8 @@ cp_parser_simple_type_specifier (cp_parser* parser, return qual_type; } - cp_parser_check_for_invalid_template_id (parser, TREE_TYPE (type)); + cp_parser_check_for_invalid_template_id (parser, TREE_TYPE (type), + token->location); } return type; @@ -11165,12 +11266,13 @@ cp_parser_nonclass_name (cp_parser* parser) tree type_decl; tree identifier; + cp_token *token = cp_lexer_peek_token (parser->lexer); identifier = cp_parser_identifier (parser); if (identifier == error_mark_node) return error_mark_node; /* Look up the type-name. */ - type_decl = cp_parser_lookup_name_simple (parser, identifier); + type_decl = cp_parser_lookup_name_simple (parser, identifier, token->location); if (TREE_CODE (type_decl) != TYPE_DECL && (objc_is_id (identifier) || objc_is_class_name (identifier))) @@ -11187,7 +11289,7 @@ cp_parser_nonclass_name (cp_parser* parser) { if (!cp_parser_simulate_error (parser)) cp_parser_name_lookup_error (parser, identifier, type_decl, - "is not a type"); + "is not a type", token->location); return error_mark_node; } /* Remember that the name was used in the definition of the @@ -11236,6 +11338,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, tree identifier; tree type = NULL_TREE; tree attributes = NULL_TREE; + cp_token *token = NULL; /* See if we're looking at the `enum' keyword. */ if (cp_lexer_next_token_is_keyword (parser->lexer, RID_ENUM)) @@ -11305,6 +11408,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, if (!template_p) cp_parser_parse_tentatively (parser); /* Parse the template-id. */ + token = cp_lexer_peek_token (parser->lexer); decl = cp_parser_template_id (parser, template_p, /*check_dependency_p=*/true, is_declaration); @@ -11326,6 +11430,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, if (!type) { + token = cp_lexer_peek_token (parser->lexer); identifier = cp_parser_identifier (parser); if (identifier == error_mark_node) @@ -11338,7 +11443,8 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, if (tag_type == typename_type && TREE_CODE (parser->scope) != NAMESPACE_DECL) return cp_parser_make_typename_type (parser, parser->scope, - identifier); + identifier, + token->location); /* Look up a qualified name in the usual way. */ if (parser->scope) { @@ -11350,7 +11456,8 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, /*is_template=*/false, /*is_namespace=*/false, /*check_dependency=*/true, - &ambiguous_decls); + &ambiguous_decls, + token->location); /* If the lookup was ambiguous, an error will already have been issued. */ @@ -11386,7 +11493,8 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, { cp_parser_diagnose_invalid_type_name (parser, parser->scope, - identifier); + identifier, + token->location); return error_mark_node; } @@ -11486,7 +11594,8 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, /* An unqualified name was used to reference this type, so there were no qualifying templates. */ if (!cp_parser_check_template_parameters (parser, - /*num_templates=*/0)) + /*num_templates=*/0, + token->location)) return error_mark_node; type = xref_tag (tag_type, identifier, ts, template_p); } @@ -11517,7 +11626,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser, /* A "<" cannot follow an elaborated type specifier. If that happens, the user was probably trying to form a template-id. */ - cp_parser_check_for_invalid_template_id (parser, type); + cp_parser_check_for_invalid_template_id (parser, type, token->location); return type; } @@ -11689,6 +11798,8 @@ cp_parser_namespace_name (cp_parser* parser) tree identifier; tree namespace_decl; + cp_token *token = cp_lexer_peek_token (parser->lexer); + /* Get the name of the namespace. */ identifier = cp_parser_identifier (parser); if (identifier == error_mark_node) @@ -11717,13 +11828,14 @@ cp_parser_namespace_name (cp_parser* parser) /*is_template=*/false, /*is_namespace=*/true, /*check_dependency=*/true, - /*ambiguous_decls=*/NULL); + /*ambiguous_decls=*/NULL, + token->location); /* If it's not a namespace, issue an error. */ if (namespace_decl == error_mark_node || TREE_CODE (namespace_decl) != NAMESPACE_DECL) { if (!cp_parser_uncommitted_to_tentative_parse_p (parser)) - error ("%qD is not a namespace-name", identifier); + error ("%H%qD is not a namespace-name", &token->location, identifier); cp_parser_error (parser, "expected namespace-name"); namespace_decl = error_mark_node; } @@ -11838,6 +11950,8 @@ cp_parser_namespace_alias_definition (cp_parser* parser) tree identifier; tree namespace_specifier; + cp_token *token = cp_lexer_peek_token (parser->lexer); + /* Look for the `namespace' keyword. */ cp_parser_require_keyword (parser, RID_NAMESPACE, "%<namespace%>"); /* Look for the identifier. */ @@ -11848,7 +11962,7 @@ cp_parser_namespace_alias_definition (cp_parser* parser) if (!cp_parser_uncommitted_to_tentative_parse_p (parser) && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)) { - error ("%<namespace%> definition is not allowed here"); + error ("%H%<namespace%> definition is not allowed here", &token->location); /* Skip the definition. */ cp_lexer_consume_token (parser->lexer); if (cp_parser_skip_to_closing_brace (parser)) @@ -11963,6 +12077,7 @@ cp_parser_using_declaration (cp_parser* parser, cp_parser_parse_definitely will be false, as required. */ return cp_parser_parse_definitely (parser); + token = cp_lexer_peek_token (parser->lexer); /* Parse the unqualified-id. */ identifier = cp_parser_unqualified_id (parser, /*template_keyword_p=*/false, @@ -11987,7 +12102,8 @@ cp_parser_using_declaration (cp_parser* parser, /* [namespace.udecl] A using declaration shall not name a template-id. */ - error ("a template-id may not appear in a using-declaration"); + error ("%Ha template-id may not appear in a using-declaration", + &token->location); else { if (at_class_scope_p ()) @@ -12003,9 +12119,13 @@ cp_parser_using_declaration (cp_parser* parser, } else { - decl = cp_parser_lookup_name_simple (parser, identifier); + decl = cp_parser_lookup_name_simple (parser, + identifier, + token->location); if (decl == error_mark_node) - cp_parser_name_lookup_error (parser, identifier, decl, NULL); + cp_parser_name_lookup_error (parser, identifier, + decl, NULL, + token->location); else if (check_for_bare_parameter_packs (decl)) return false; else if (!at_namespace_scope_p ()) @@ -12255,7 +12375,8 @@ cp_parser_init_declarator (cp_parser* parser, int declares_class_or_enum, bool* function_definition_p) { - cp_token *token; + cp_token *token = NULL, *asm_spec_start_token = NULL, + *attributes_start_token = NULL; cp_declarator *declarator; tree prefix_attributes; tree attributes; @@ -12289,6 +12410,7 @@ cp_parser_init_declarator (cp_parser* parser, resume_deferring_access_checks (); /* Parse the declarator. */ + token = cp_lexer_peek_token (parser->lexer); declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_NAMED, &ctor_dtor_or_conv_p, @@ -12303,12 +12425,14 @@ cp_parser_init_declarator (cp_parser* parser, return error_mark_node; /* Check that the number of template-parameter-lists is OK. */ - if (!cp_parser_check_declarator_template_parameters (parser, declarator)) + if (!cp_parser_check_declarator_template_parameters (parser, declarator, + token->location)) return error_mark_node; if (declares_class_or_enum & 2) cp_parser_check_for_definition_in_return_type (declarator, - decl_specifiers->type); + decl_specifiers->type, + decl_specifiers->type_location); /* Figure out what scope the entity declared by the DECLARATOR is located in. `grokdeclarator' sometimes changes the scope, so @@ -12320,8 +12444,10 @@ cp_parser_init_declarator (cp_parser* parser, if (cp_parser_allow_gnu_extensions_p (parser)) { /* Look for an asm-specification. */ + asm_spec_start_token = cp_lexer_peek_token (parser->lexer); asm_specification = cp_parser_asm_specification_opt (parser); /* And attributes. */ + attributes_start_token = cp_lexer_peek_token (parser->lexer); attributes = cp_parser_attributes_opt (parser); } else @@ -12350,9 +12476,12 @@ cp_parser_init_declarator (cp_parser* parser, /* Neither attributes nor an asm-specification are allowed on a function-definition. */ if (asm_specification) - error ("an asm-specification is not allowed on a function-definition"); + error ("%Han asm-specification is not allowed " + "on a function-definition", + &asm_spec_start_token->location); if (attributes) - error ("attributes are not allowed on a function-definition"); + error ("%Hattributes are not allowed on a function-definition", + &attributes_start_token->location); /* This is a function-definition. */ *function_definition_p = true; @@ -12478,6 +12607,7 @@ cp_parser_init_declarator (cp_parser* parser, { if (function_declarator_p (declarator)) { + cp_token *initializer_start_token = cp_lexer_peek_token (parser->lexer); if (initialization_kind == CPP_EQ) initializer = cp_parser_pure_specifier (parser); else @@ -12486,7 +12616,8 @@ cp_parser_init_declarator (cp_parser* parser, know what the user intended, so just silently consume the initializer. */ if (decl != error_mark_node) - error ("initializer provided for function"); + error ("%Hinitializer provided for function", + &initializer_start_token->location); cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true, /*or_comma=*/false, @@ -12888,7 +13019,8 @@ cp_parser_direct_declarator (cp_parser* parser, in function scopes. */ else if (!parser->in_function_body) { - error ("array bound is not an integer constant"); + error ("%Harray bound is not an integer constant", + &token->location); bounds = error_mark_node; } } @@ -12910,6 +13042,7 @@ cp_parser_direct_declarator (cp_parser* parser, special_function_kind sfk; bool abstract_ok; bool pack_expansion_p = false; + cp_token *declarator_id_start_token; /* Parse a declarator-id */ abstract_ok = (dcl_kind == CP_PARSER_DECLARATOR_EITHER); @@ -12928,6 +13061,7 @@ cp_parser_direct_declarator (cp_parser* parser, } } + declarator_id_start_token = cp_lexer_peek_token (parser->lexer); unqualified_name = cp_parser_declarator_id (parser, /*optional_p=*/abstract_ok); qualifying_scope = parser->scope; @@ -12997,7 +13131,8 @@ cp_parser_direct_declarator (cp_parser* parser, /*only_current_p=*/false); /* If that failed, the declarator is invalid. */ if (TREE_CODE (type) == TYPENAME_TYPE) - error ("%<%T::%E%> is not a type", + error ("%H%<%T::%E%> is not a type", + &declarator_id_start_token->location, TYPE_CONTEXT (qualifying_scope), TYPE_IDENTIFIER (qualifying_scope)); qualifying_scope = type; @@ -13023,7 +13158,8 @@ cp_parser_direct_declarator (cp_parser* parser, if (qualifying_scope && CLASSTYPE_USE_TEMPLATE (name_type)) { - error ("invalid use of constructor as a template"); + error ("%Hinvalid use of constructor as a template", + &declarator_id_start_token->location); inform ("use %<%T::%D%> instead of %<%T::%D%> to " "name the constructor in a qualified name", class_type, @@ -13182,6 +13318,7 @@ cp_parser_ptr_operator (cp_parser* parser, cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/false); /* Look for the nested-name specifier. */ + token = cp_lexer_peek_token (parser->lexer); cp_parser_nested_name_specifier (parser, /*typename_keyword_p=*/false, /*check_dependency_p=*/true, @@ -13196,7 +13333,7 @@ cp_parser_ptr_operator (cp_parser* parser, code = INDIRECT_REF; if (TREE_CODE (parser->scope) == NAMESPACE_DECL) - error ("%qD is a namespace", parser->scope); + error ("%H%qD is a namespace", &token->location, parser->scope); else { /* The type of which the member is a member is given by the @@ -13271,7 +13408,7 @@ cp_parser_cv_qualifier_seq_opt (cp_parser* parser) if (cv_quals & cv_qualifier) { - error ("duplicate cv-qualifier"); + error ("%Hduplicate cv-qualifier", &token->location); cp_lexer_purge_token (parser->lexer); } else @@ -13381,6 +13518,7 @@ cp_parser_type_specifier_seq (cp_parser* parser, { bool seen_type_specifier = false; cp_parser_flags flags = CP_PARSER_FLAGS_OPTIONAL; + cp_token *start_token = NULL; /* Clear the TYPE_SPECIFIER_SEQ. */ clear_decl_specs (type_specifier_seq); @@ -13400,6 +13538,11 @@ cp_parser_type_specifier_seq (cp_parser* parser, continue; } + /* record the token of the beginning of the type specifier seq, + for error reporting purposes*/ + if (!start_token) + start_token = cp_lexer_peek_token (parser->lexer); + /* Look for the type-specifier. */ type_specifier = cp_parser_type_specifier (parser, flags, @@ -13443,7 +13586,7 @@ cp_parser_type_specifier_seq (cp_parser* parser, flags |= CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES; } - cp_parser_check_decl_spec (type_specifier_seq); + cp_parser_check_decl_spec (type_specifier_seq, start_token->location); } /* Parse a parameter-declaration-clause. @@ -13670,7 +13813,7 @@ cp_parser_parameter_declaration (cp_parser *parser, cp_decl_specifier_seq decl_specifiers; cp_declarator *declarator; tree default_argument; - cp_token *token; + cp_token *token = NULL, *declarator_token_start = NULL; const char *saved_message; /* In a template parameter, `>' is not an operator. @@ -13739,6 +13882,7 @@ cp_parser_parameter_declaration (cp_parser *parser, && cp_lexer_next_token_is_not (parser->lexer, CPP_OPEN_PAREN)) cp_parser_commit_to_tentative_parse (parser); /* Parse the declarator. */ + declarator_token_start = token; declarator = cp_parser_declarator (parser, CP_PARSER_DECLARATOR_EITHER, /*ctor_dtor_or_conv_p=*/NULL, @@ -13897,7 +14041,7 @@ cp_parser_parameter_declaration (cp_parser *parser, /* If we run out of tokens, issue an error message. */ case CPP_EOF: case CPP_PRAGMA_EOL: - error ("file ends in default argument"); + error ("%Hfile ends in default argument", &token->location); done = true; break; @@ -13934,8 +14078,11 @@ cp_parser_parameter_declaration (cp_parser *parser, /* Outside of a class definition, we can just parse the assignment-expression. */ else - default_argument - = cp_parser_default_argument (parser, template_parm_p); + { + token = cp_lexer_peek_token (parser->lexer); + default_argument + = cp_parser_default_argument (parser, template_parm_p); + } if (!parser->default_arg_ok_p) { @@ -13943,7 +14090,9 @@ cp_parser_parameter_declaration (cp_parser *parser, warning (0, "deprecated use of default argument for parameter of non-function"); else { - error ("default arguments are only permitted for function parameters"); + error ("%Hdefault arguments are only " + "permitted for function parameters", + &token->location); default_argument = NULL_TREE; } } @@ -13959,11 +14108,12 @@ cp_parser_parameter_declaration (cp_parser *parser, id_declarator = id_declarator->declarator; if (id_declarator && id_declarator->kind == cdk_id) - error ("%sparameter pack %qD cannot have a default argument", + error ("%H%sparameter pack %qD cannot have a default argument", + &declarator_token_start->location, kind, id_declarator->u.id.unqualified_name); else - error ("%sparameter pack cannot have a default argument", - kind); + error ("%H%sparameter pack cannot have a default argument", + &declarator_token_start->location, kind); default_argument = NULL_TREE; } @@ -14374,10 +14524,12 @@ cp_parser_class_name (cp_parser *parser, /*is_template=*/false, /*is_namespace=*/false, check_dependency_p, - &ambiguous_decls); + &ambiguous_decls, + identifier_token->location); if (ambiguous_decls) { - error ("reference to %qD is ambiguous", identifier); + error ("%Hreference to %qD is ambiguous", + &identifier_token->location, identifier); print_candidates (ambiguous_decls); if (cp_parser_parsing_tentatively (parser)) { @@ -14668,7 +14820,7 @@ cp_parser_class_head (cp_parser* parser, bool invalid_explicit_specialization_p = false; tree pushed_scope = NULL_TREE; unsigned num_templates; - + cp_token *type_start_token = NULL, *nested_name_specifier_token_start = NULL; /* Assume no nested-name-specifier will be present. */ *nested_name_specifier_p = false; /* Assume no template parameter lists will be used in defining the @@ -14701,6 +14853,7 @@ cp_parser_class_head (cp_parser* parser, /* Determine the name of the class. Begin by looking for an optional nested-name-specifier. */ + nested_name_specifier_token_start = cp_lexer_peek_token (parser->lexer); nested_name_specifier = cp_parser_nested_name_specifier_opt (parser, /*typename_keyword_p=*/false, @@ -14711,6 +14864,7 @@ cp_parser_class_head (cp_parser* parser, identifier. */ if (nested_name_specifier) { + type_start_token = cp_lexer_peek_token (parser->lexer); /* Although the grammar says `identifier', it really means `class-name' or `template-name'. You are only allowed to define a class that has already been declared with this @@ -14740,6 +14894,7 @@ cp_parser_class_head (cp_parser* parser, if (!cp_parser_parse_definitely (parser)) { invalid_nested_name_p = true; + type_start_token = cp_lexer_peek_token (parser->lexer); id = cp_parser_identifier (parser); if (id == error_mark_node) id = NULL_TREE; @@ -14774,6 +14929,7 @@ cp_parser_class_head (cp_parser* parser, an identifier, or nothing at all. */ cp_parser_parse_tentatively (parser); /* Check for a template-id. */ + type_start_token = cp_lexer_peek_token (parser->lexer); id = cp_parser_template_id (parser, /*template_keyword_p=*/false, /*check_dependency_p=*/true, @@ -14782,7 +14938,10 @@ cp_parser_class_head (cp_parser* parser, if (!cp_parser_parse_definitely (parser)) { if (cp_lexer_next_token_is (parser->lexer, CPP_NAME)) - id = cp_parser_identifier (parser); + { + type_start_token = cp_lexer_peek_token (parser->lexer); + id = cp_parser_identifier (parser); + } else id = NULL_TREE; } @@ -14796,7 +14955,8 @@ cp_parser_class_head (cp_parser* parser, pop_deferring_access_checks (); if (id) - cp_parser_check_for_invalid_template_id (parser, id); + cp_parser_check_for_invalid_template_id (parser, id, + type_start_token->location); /* If it's not a `:' or a `{' then we can't really be looking at a class-head, since a class-head only appears as part of a @@ -14825,7 +14985,8 @@ cp_parser_class_head (cp_parser* parser, /* Reject typedef-names in class heads. */ if (!DECL_IMPLICIT_TYPEDEF_P (type)) { - error ("invalid class name in declaration of %qD", type); + error ("%Hinvalid class name in declaration of %qD", + &type_start_token->location, type); type = NULL_TREE; goto done; } @@ -14837,10 +14998,13 @@ cp_parser_class_head (cp_parser* parser, if (scope && !is_ancestor (scope, nested_name_specifier)) { if (at_namespace_scope_p ()) - error ("declaration of %qD in namespace %qD which does not " - "enclose %qD", type, scope, nested_name_specifier); + error ("%Hdeclaration of %qD in namespace %qD which does not " + "enclose %qD", + &type_start_token->location, + type, scope, nested_name_specifier); else - error ("declaration of %qD in %qD which does not enclose %qD", + error ("%Hdeclaration of %qD in %qD which does not enclose %qD", + &type_start_token->location, type, scope, nested_name_specifier); type = NULL_TREE; goto done; @@ -14853,7 +15017,8 @@ cp_parser_class_head (cp_parser* parser, class member of a namespace outside of its namespace. */ if (scope == nested_name_specifier) { - permerror ("extra qualification not allowed"); + permerror ("%Hextra qualification not allowed", + &nested_name_specifier_token_start->location); nested_name_specifier = NULL_TREE; num_templates = 0; } @@ -14864,7 +15029,8 @@ cp_parser_class_head (cp_parser* parser, && parser->num_template_parameter_lists == 0 && template_id_p) { - error ("an explicit specialization must be preceded by %<template <>%>"); + error ("%Han explicit specialization must be preceded by %<template <>%>", + &type_start_token->location); invalid_explicit_specialization_p = true; /* Take the same action that would have been taken by cp_parser_explicit_specialization. */ @@ -14876,7 +15042,8 @@ cp_parser_class_head (cp_parser* parser, use "goto done;" to return. */ /* Make sure that the right number of template parameters were present. */ - if (!cp_parser_check_template_parameters (parser, num_templates)) + if (!cp_parser_check_template_parameters (parser, num_templates, + type_start_token->location)) { /* If something went wrong, there is no point in even trying to process the class-definition. */ @@ -14891,7 +15058,8 @@ cp_parser_class_head (cp_parser* parser, && (DECL_FUNCTION_TEMPLATE_P (TREE_OPERAND (id, 0)) || TREE_CODE (TREE_OPERAND (id, 0)) == OVERLOAD)) { - error ("function template %qD redeclared as a class template", id); + error ("%Hfunction template %qD redeclared as a class template", + &type_start_token->location, id); type = error_mark_node; } else @@ -14972,8 +15140,10 @@ cp_parser_class_head (cp_parser* parser, that's an error. */ if (type != error_mark_node && COMPLETE_TYPE_P (type)) { - error ("redefinition of %q#T", type); - error ("previous definition of %q+#T", type); + error ("%Hredefinition of %q#T", + &type_start_token->location, type); + error ("%Hprevious definition of %q+#T", + &type_start_token->location, type); type = NULL_TREE; goto done; } @@ -15128,7 +15298,9 @@ cp_parser_member_declaration (cp_parser* parser) tree decl; int declares_class_or_enum; bool friend_p; - cp_token *token; + cp_token *token = NULL; + cp_token *decl_spec_token_start = NULL; + cp_token *initializer_token_start = NULL; int saved_pedantic; /* Check for the `__extension__' keyword. */ @@ -15192,6 +15364,7 @@ cp_parser_member_declaration (cp_parser* parser) return; /* Parse the decl-specifier-seq. */ + decl_spec_token_start = cp_lexer_peek_token (parser->lexer); cp_parser_decl_specifier_seq (parser, CP_PARSER_FLAGS_OPTIONAL, &decl_specifiers, @@ -15237,7 +15410,8 @@ cp_parser_member_declaration (cp_parser* parser) /* If the `friend' keyword was present, the friend must be introduced with a class-key. */ if (!declares_class_or_enum) - error ("a class-key must be used when declaring a friend"); + error ("%Ha class-key must be used when declaring a friend", + &decl_spec_token_start->location); /* In this case: template <typename T> struct A { @@ -15251,8 +15425,8 @@ cp_parser_member_declaration (cp_parser* parser) && TYPE_P (decl_specifiers.type)) type = decl_specifiers.type; if (!type || !TYPE_P (type)) - error ("friend declaration does not name a class or " - "function"); + error ("%Hfriend declaration does not name a class or " + "function", &decl_spec_token_start->location); else make_friend_class (current_class_type, type, /*complain=*/true); @@ -15275,7 +15449,9 @@ cp_parser_member_declaration (cp_parser* parser) finish_member_declaration (decl); } else - cp_parser_check_access_in_redeclaration (TYPE_NAME (type)); + cp_parser_check_access_in_redeclaration + (TYPE_NAME (type), + decl_spec_token_start->location); } } else @@ -15369,7 +15545,8 @@ cp_parser_member_declaration (cp_parser* parser) if (declares_class_or_enum & 2) cp_parser_check_for_definition_in_return_type - (declarator, decl_specifiers.type); + (declarator, decl_specifiers.type, + decl_specifiers.type_location); /* Look for an asm-specification. */ asm_specification = cp_parser_asm_specification_opt (parser); @@ -15403,6 +15580,7 @@ cp_parser_member_declaration (cp_parser* parser) for a pure-specifier; otherwise, we look for a constant-initializer. When we call `grokfield', it will perform more stringent semantics checks. */ + initializer_token_start = cp_lexer_peek_token (parser->lexer); if (function_declarator_p (declarator)) initializer = cp_parser_pure_specifier (parser); else @@ -15427,7 +15605,8 @@ cp_parser_member_declaration (cp_parser* parser) standard, since a pure function may be defined outside of the class-specifier. */ if (initializer) - error ("pure-specifier on function-definition"); + error ("%Hpure-specifier on function-definition", + &initializer_token_start->location); decl = cp_parser_save_member_function_body (parser, &decl_specifiers, declarator, @@ -15518,7 +15697,7 @@ cp_parser_pure_specifier (cp_parser* parser) } if (PROCESSING_REAL_TEMPLATE_DECL_P ()) { - error ("templates may not be %<virtual%>"); + error ("%Htemplates may not be %<virtual%>", &token->location); return error_mark_node; } @@ -15720,11 +15899,14 @@ cp_parser_base_specifier (cp_parser* parser) as base classes. */ if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TYPENAME)) { + token = cp_lexer_peek_token (parser->lexer); if (!processing_template_decl) - error ("keyword %<typename%> not allowed outside of templates"); + error ("%Hkeyword %<typename%> not allowed outside of templates", + &token->location); else - error ("keyword %<typename%> not allowed in this context " - "(the base class is implicitly a type)"); + error ("%Hkeyword %<typename%> not allowed in this context " + "(the base class is implicitly a type)", + &token->location); cp_lexer_consume_token (parser->lexer); } @@ -16425,7 +16607,8 @@ cp_parser_lookup_name (cp_parser *parser, tree name, bool is_template, bool is_namespace, bool check_dependency, - tree *ambiguous_decls) + tree *ambiguous_decls, + location_t name_location) { int flags = 0; tree decl; @@ -16606,7 +16789,8 @@ cp_parser_lookup_name (cp_parser *parser, tree name, cp_parser_error, so we incorporate its actions directly. */ if (!cp_parser_simulate_error (parser)) { - error ("reference to %qD is ambiguous", name); + error ("%Hreference to %qD is ambiguous", + &name_location, name); print_candidates (decl); } return error_mark_node; @@ -16636,14 +16820,15 @@ cp_parser_lookup_name (cp_parser *parser, tree name, IS_NAMESPACE is FALSE, and CHECK_DEPENDENCY is TRUE. */ static tree -cp_parser_lookup_name_simple (cp_parser* parser, tree name) +cp_parser_lookup_name_simple (cp_parser* parser, tree name, location_t location) { return cp_parser_lookup_name (parser, name, none_type, /*is_template=*/false, /*is_namespace=*/false, /*check_dependency=*/true, - /*ambiguous_decls=*/NULL); + /*ambiguous_decls=*/NULL, + location); } /* If DECL is a TEMPLATE_DECL that can be treated like a TYPE_DECL in @@ -16696,7 +16881,8 @@ cp_parser_maybe_treat_template_as_class (tree decl, bool tag_name_p) static bool cp_parser_check_declarator_template_parameters (cp_parser* parser, - cp_declarator *declarator) + cp_declarator *declarator, + location_t declarator_location) { unsigned num_templates; @@ -16746,7 +16932,8 @@ cp_parser_check_declarator_template_parameters (cp_parser* parser, ++num_templates; return cp_parser_check_template_parameters (parser, - num_templates); + num_templates, + declarator_location); case cdk_function: case cdk_array: @@ -16754,7 +16941,7 @@ cp_parser_check_declarator_template_parameters (cp_parser* parser, case cdk_reference: case cdk_ptrmem: return (cp_parser_check_declarator_template_parameters - (parser, declarator->declarator)); + (parser, declarator->declarator, declarator_location)); case cdk_error: return true; @@ -16771,7 +16958,8 @@ cp_parser_check_declarator_template_parameters (cp_parser* parser, static bool cp_parser_check_template_parameters (cp_parser* parser, - unsigned num_templates) + unsigned num_templates, + location_t location) { /* If there are more template classes than parameter lists, we have something like: @@ -16779,7 +16967,7 @@ 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) { - error ("too few template-parameter-lists"); + error ("%Htoo few template-parameter-lists", &location); return false; } /* If there are the same number of template classes and parameter @@ -16794,7 +16982,7 @@ cp_parser_check_template_parameters (cp_parser* parser, something like: template <class T> template <class U> void S::f(); */ - error ("too many template-parameter-lists"); + error ("%Htoo many template-parameter-lists", &location); return false; } @@ -17052,12 +17240,14 @@ cp_parser_function_definition_after_declarator (cp_parser* parser, bool saved_in_unbraced_linkage_specification_p; bool saved_in_function_body; unsigned saved_num_template_parameter_lists; + cp_token *token; saved_in_function_body = parser->in_function_body; parser->in_function_body = true; /* If the next token is `return', then the code may be trying to make use of the "named return value" extension that G++ used to support. */ + token = cp_lexer_peek_token (parser->lexer); if (cp_lexer_next_token_is_keyword (parser->lexer, RID_RETURN)) { /* Consume the `return' keyword. */ @@ -17066,7 +17256,8 @@ cp_parser_function_definition_after_declarator (cp_parser* parser, returned. */ cp_parser_identifier (parser); /* Issue an error message. */ - error ("named return values are no longer supported"); + error ("%Hnamed return values are no longer supported", + &token->location); /* Skip tokens until we reach the start of the function body. */ while (true) { @@ -17125,8 +17316,10 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p) tree parameter_list; bool friend_p = false; bool need_lang_pop; + cp_token *token; /* Look for the `template' keyword. */ + token = cp_lexer_peek_token (parser->lexer); if (!cp_parser_require_keyword (parser, RID_TEMPLATE, "%<template%>")) return; @@ -17138,7 +17331,8 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p) /* 14.5.2.2 [temp.mem] A local class shall not have member templates. */ - error ("invalid declaration of member template in local class"); + error ("%Hinvalid declaration of member template in local class", + &token->location); cp_parser_skip_to_end_of_block_or_statement (parser); return; } @@ -17147,7 +17341,7 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p) A template ... shall not have C linkage. */ if (current_lang_name == lang_name_c) { - error ("template with C linkage"); + error ("%Htemplate with C linkage", &token->location); /* Give it C++ linkage to avoid confusing other parts of the front end. */ push_lang_context (lang_name_cplusplus); @@ -17194,6 +17388,7 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p) /* There are no access checks when parsing a template, as we do not know if a specialization will be a friend. */ push_deferring_access_checks (dk_no_check); + token = cp_lexer_peek_token (parser->lexer); decl = cp_parser_single_declaration (parser, checks, member_p, @@ -17206,7 +17401,7 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p) if (member_p && !friend_p && decl) { if (TREE_CODE (decl) == TYPE_DECL) - cp_parser_check_access_in_redeclaration (decl); + cp_parser_check_access_in_redeclaration (decl, token->location); decl = finish_member_template_decl (decl); } @@ -17270,6 +17465,7 @@ cp_parser_single_declaration (cp_parser* parser, tree decl = NULL_TREE; cp_decl_specifier_seq decl_specifiers; bool function_definition_p = false; + cp_token *decl_spec_token_start; /* This function is only used when processing a template declaration. */ @@ -17281,6 +17477,7 @@ cp_parser_single_declaration (cp_parser* parser, /* Try the `decl-specifier-seq [opt] init-declarator [opt]' alternative. */ + decl_spec_token_start = cp_lexer_peek_token (parser->lexer); cp_parser_decl_specifier_seq (parser, CP_PARSER_FLAGS_OPTIONAL, &decl_specifiers, @@ -17291,7 +17488,8 @@ cp_parser_single_declaration (cp_parser* parser, /* There are no template typedefs. */ if (decl_specifiers.specs[(int) ds_typedef]) { - error ("template declaration of %qs", "typedef"); + error ("%Htemplate declaration of %qs", + &decl_spec_token_start->location, "typedef"); decl = error_mark_node; } @@ -17354,7 +17552,8 @@ cp_parser_single_declaration (cp_parser* parser, && explicit_specialization_p && decl_specifiers.storage_class != sc_none) { - error ("explicit template specialization cannot have a storage class"); + error ("%Hexplicit template specialization cannot have a storage class", + &decl_spec_token_start->location); decl = error_mark_node; } } @@ -17583,9 +17782,9 @@ cp_parser_enclosed_template_argument_list (cp_parser* parser) is a typo for '>'. Emit an error message and continue. Same deal about the token location, but here we can get it right by consuming the '>>' before issuing the diagnostic. */ - cp_lexer_consume_token (parser->lexer); - error ("spurious %<>>%>, use %<>%> to terminate " - "a template argument list"); + cp_token *token = cp_lexer_consume_token (parser->lexer); + error ("%Hspurious %<>>%>, use %<>%> to terminate " + "a template argument list", &token->location); } } else @@ -17906,14 +18105,15 @@ cp_parser_declares_only_class_p (cp_parser *parser) static void cp_parser_set_storage_class (cp_parser *parser, cp_decl_specifier_seq *decl_specs, - enum rid keyword) + enum rid keyword, + location_t location) { cp_storage_class storage_class; if (parser->in_unbraced_linkage_specification_p) { - error ("invalid use of %qD in linkage specification", - ridpointers[keyword]); + error ("%Hinvalid use of %qD in linkage specification", + &location, ridpointers[keyword]); return; } else if (decl_specs->storage_class != sc_none) @@ -17925,7 +18125,7 @@ cp_parser_set_storage_class (cp_parser *parser, if ((keyword == RID_EXTERN || keyword == RID_STATIC) && decl_specs->specs[(int) ds_thread]) { - error ("%<__thread%> before %qD", ridpointers[keyword]); + error ("%H%<__thread%> before %qD", &location, ridpointers[keyword]); decl_specs->specs[(int) ds_thread] = 0; } @@ -17966,6 +18166,7 @@ cp_parser_set_storage_class (cp_parser *parser, static void cp_parser_set_decl_spec_type (cp_decl_specifier_seq *decl_specs, tree type_spec, + location_t location, bool user_defined_p) { decl_specs->any_specifiers_p = true; @@ -17992,6 +18193,7 @@ cp_parser_set_decl_spec_type (cp_decl_specifier_seq *decl_specs, { decl_specs->type = type_spec; decl_specs->user_defined_type_p = false; + decl_specs->type_location = location; } } else if (decl_specs->type) @@ -18001,6 +18203,7 @@ cp_parser_set_decl_spec_type (cp_decl_specifier_seq *decl_specs, decl_specs->type = type_spec; decl_specs->user_defined_type_p = user_defined_p; decl_specs->redefined_builtin_type = NULL_TREE; + decl_specs->type_location = location; } } @@ -18255,7 +18458,7 @@ cp_parser_check_class_key (enum tag_types class_key, tree type) [class.mem/1]. */ static void -cp_parser_check_access_in_redeclaration (tree decl) +cp_parser_check_access_in_redeclaration (tree decl, location_t location) { if (!decl || !CLASS_TYPE_P (TREE_TYPE (decl))) return; @@ -18264,7 +18467,7 @@ cp_parser_check_access_in_redeclaration (tree decl) != (current_access_specifier == access_private_node)) || (TREE_PROTECTED (decl) != (current_access_specifier == access_protected_node))) - error ("%qD redeclared with different access", decl); + error ("%H%qD redeclared with different access", &location, decl); } /* Look for the `template' keyword, as a syntactic disambiguator. @@ -18281,8 +18484,9 @@ cp_parser_optional_template_keyword (cp_parser *parser) template and what is not. */ if (!processing_template_decl) { - error ("%<template%> (as a disambiguator) is only allowed " - "within templates"); + cp_token *token = cp_lexer_peek_token (parser->lexer); + error ("%H%<template%> (as a disambiguator) is only allowed " + "within templates", &token->location); /* If this part of the token stream is rescanned, the same error message would be generated. So, we purge the token from the stream. */ @@ -18547,7 +18751,8 @@ cp_parser_objc_expression (cp_parser* parser) break; } default: - error ("misplaced %<@%D%> Objective-C++ construct", kwd->u.value); + error ("%Hmisplaced %<@%D%> Objective-C++ construct", + &kwd->location, kwd->u.value); cp_parser_skip_to_end_of_block_or_statement (parser); } @@ -18680,15 +18885,18 @@ static tree cp_parser_objc_encode_expression (cp_parser* parser) { tree type; + cp_token *token; cp_lexer_consume_token (parser->lexer); /* Eat '@encode'. */ cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"); + token = cp_lexer_peek_token (parser->lexer); type = complete_type (cp_parser_type_id (parser)); cp_parser_require (parser, CPP_CLOSE_PAREN, "%<)%>"); if (!type) { - error ("%<@encode%> must specify a type as an argument"); + error ("%H%<@encode%> must specify a type as an argument", + &token->location); return error_mark_node; } @@ -19003,7 +19211,7 @@ cp_parser_objc_selector (cp_parser* parser) if (!cp_parser_objc_selector_p (token->type)) { - error ("invalid Objective-C++ selector name"); + error ("%Hinvalid Objective-C++ selector name", &token->location); return error_mark_node; } @@ -19333,7 +19541,8 @@ cp_parser_objc_protocol_declaration (cp_parser* parser) cp_lexer_consume_token (parser->lexer); /* Eat '@protocol'. */ if (cp_lexer_next_token_is_not (parser->lexer, CPP_NAME)) { - error ("identifier expected after %<@protocol%>"); + tok = cp_lexer_peek_token (parser->lexer); + error ("%Hidentifier expected after %<@protocol%>", &tok->location); goto finish; } @@ -19469,7 +19678,8 @@ cp_parser_objc_declaration (cp_parser* parser) cp_parser_objc_end_implementation (parser); break; default: - error ("misplaced %<@%D%> Objective-C++ construct", kwd->u.value); + error ("%Hmisplaced %<@%D%> Objective-C++ construct", + &kwd->location, kwd->u.value); cp_parser_skip_to_end_of_block_or_statement (parser); } } @@ -19600,7 +19810,8 @@ cp_parser_objc_statement (cp_parser * parser) { case RID_AT_THROW: return cp_parser_objc_throw_statement (parser); default: - error ("misplaced %<@%D%> Objective-C++ construct", kwd->u.value); + error ("%Hmisplaced %<@%D%> Objective-C++ construct", + &kwd->location, kwd->u.value); cp_parser_skip_to_end_of_block_or_statement (parser); } @@ -19684,14 +19895,15 @@ cp_parser_omp_clause_name (cp_parser *parser) /* Validate that a clause of the given type does not already exist. */ static void -check_no_duplicate_clause (tree clauses, enum tree_code code, const char *name) +check_no_duplicate_clause (tree clauses, enum tree_code code, + const char *name, location_t location) { tree c; for (c = clauses; c ; c = OMP_CLAUSE_CHAIN (c)) if (OMP_CLAUSE_CODE (c) == code) { - error ("too many %qs clauses", name); + error ("%Htoo many %qs clauses", &location, name); break; } } @@ -19714,10 +19926,12 @@ static tree cp_parser_omp_var_list_no_open (cp_parser *parser, enum omp_clause_code kind, tree list) { + cp_token *token; while (1) { tree name, decl; + token = cp_lexer_peek_token (parser->lexer); name = cp_parser_id_expression (parser, /*template_p=*/false, /*check_dependency_p=*/true, /*template_p=*/NULL, @@ -19726,9 +19940,9 @@ cp_parser_omp_var_list_no_open (cp_parser *parser, enum omp_clause_code kind, if (name == error_mark_node) goto skip_comma; - decl = cp_parser_lookup_name_simple (parser, name); + decl = cp_parser_lookup_name_simple (parser, name, token->location); if (decl == error_mark_node) - cp_parser_name_lookup_error (parser, name, decl, NULL); + cp_parser_name_lookup_error (parser, name, decl, NULL, token->location); else if (kind != 0) { tree u = build_omp_clause (kind); @@ -19778,7 +19992,7 @@ cp_parser_omp_var_list (cp_parser *parser, enum omp_clause_code kind, tree list) collapse ( constant-expression ) */ static tree -cp_parser_omp_clause_collapse (cp_parser *parser, tree list) +cp_parser_omp_clause_collapse (cp_parser *parser, tree list, location_t location) { tree c, num; location_t loc; @@ -19803,11 +20017,12 @@ cp_parser_omp_clause_collapse (cp_parser *parser, tree list) || (n = tree_low_cst (num, 0)) <= 0 || (int) n != n) { - error ("%Hcollapse argument needs positive constant integer expression", &loc); + error ("%Hcollapse argument needs positive constant integer expression", + &loc); return list; } - check_no_duplicate_clause (list, OMP_CLAUSE_COLLAPSE, "collapse"); + check_no_duplicate_clause (list, OMP_CLAUSE_COLLAPSE, "collapse", location); c = build_omp_clause (OMP_CLAUSE_COLLAPSE); OMP_CLAUSE_CHAIN (c) = list; OMP_CLAUSE_COLLAPSE_EXPR (c) = num; @@ -19819,7 +20034,7 @@ cp_parser_omp_clause_collapse (cp_parser *parser, tree list) default ( shared | none ) */ static tree -cp_parser_omp_clause_default (cp_parser *parser, tree list) +cp_parser_omp_clause_default (cp_parser *parser, tree list, location_t location) { enum omp_clause_default_kind kind = OMP_CLAUSE_DEFAULT_UNSPECIFIED; tree c; @@ -19865,7 +20080,7 @@ cp_parser_omp_clause_default (cp_parser *parser, tree list) if (kind == OMP_CLAUSE_DEFAULT_UNSPECIFIED) return list; - check_no_duplicate_clause (list, OMP_CLAUSE_DEFAULT, "default"); + check_no_duplicate_clause (list, OMP_CLAUSE_DEFAULT, "default", location); c = build_omp_clause (OMP_CLAUSE_DEFAULT); OMP_CLAUSE_CHAIN (c) = list; OMP_CLAUSE_DEFAULT_KIND (c) = kind; @@ -19877,7 +20092,7 @@ cp_parser_omp_clause_default (cp_parser *parser, tree list) if ( expression ) */ static tree -cp_parser_omp_clause_if (cp_parser *parser, tree list) +cp_parser_omp_clause_if (cp_parser *parser, tree list, location_t location) { tree t, c; @@ -19892,7 +20107,7 @@ cp_parser_omp_clause_if (cp_parser *parser, tree list) /*or_comma=*/false, /*consume_paren=*/true); - check_no_duplicate_clause (list, OMP_CLAUSE_IF, "if"); + check_no_duplicate_clause (list, OMP_CLAUSE_IF, "if", location); c = build_omp_clause (OMP_CLAUSE_IF); OMP_CLAUSE_IF_EXPR (c) = t; @@ -19905,11 +20120,12 @@ cp_parser_omp_clause_if (cp_parser *parser, tree list) nowait */ static tree -cp_parser_omp_clause_nowait (cp_parser *parser ATTRIBUTE_UNUSED, tree list) +cp_parser_omp_clause_nowait (cp_parser *parser ATTRIBUTE_UNUSED, + tree list, location_t location) { tree c; - check_no_duplicate_clause (list, OMP_CLAUSE_NOWAIT, "nowait"); + check_no_duplicate_clause (list, OMP_CLAUSE_NOWAIT, "nowait", location); c = build_omp_clause (OMP_CLAUSE_NOWAIT); OMP_CLAUSE_CHAIN (c) = list; @@ -19920,7 +20136,8 @@ cp_parser_omp_clause_nowait (cp_parser *parser ATTRIBUTE_UNUSED, tree list) num_threads ( expression ) */ static tree -cp_parser_omp_clause_num_threads (cp_parser *parser, tree list) +cp_parser_omp_clause_num_threads (cp_parser *parser, tree list, + location_t location) { tree t, c; @@ -19935,7 +20152,8 @@ cp_parser_omp_clause_num_threads (cp_parser *parser, tree list) /*or_comma=*/false, /*consume_paren=*/true); - check_no_duplicate_clause (list, OMP_CLAUSE_NUM_THREADS, "num_threads"); + check_no_duplicate_clause (list, OMP_CLAUSE_NUM_THREADS, + "num_threads", location); c = build_omp_clause (OMP_CLAUSE_NUM_THREADS); OMP_CLAUSE_NUM_THREADS_EXPR (c) = t; @@ -19948,11 +20166,13 @@ cp_parser_omp_clause_num_threads (cp_parser *parser, tree list) ordered */ static tree -cp_parser_omp_clause_ordered (cp_parser *parser ATTRIBUTE_UNUSED, tree list) +cp_parser_omp_clause_ordered (cp_parser *parser ATTRIBUTE_UNUSED, + tree list, location_t location) { tree c; - check_no_duplicate_clause (list, OMP_CLAUSE_ORDERED, "ordered"); + check_no_duplicate_clause (list, OMP_CLAUSE_ORDERED, + "ordered", location); c = build_omp_clause (OMP_CLAUSE_ORDERED); OMP_CLAUSE_CHAIN (c) = list; @@ -20029,7 +20249,7 @@ cp_parser_omp_clause_reduction (cp_parser *parser, tree list) static | dynamic | guided | runtime | auto */ static tree -cp_parser_omp_clause_schedule (cp_parser *parser, tree list) +cp_parser_omp_clause_schedule (cp_parser *parser, tree list, location_t location) { tree c, t; @@ -20077,18 +20297,20 @@ cp_parser_omp_clause_schedule (cp_parser *parser, tree list) if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) { + cp_token *token; cp_lexer_consume_token (parser->lexer); + token = cp_lexer_peek_token (parser->lexer); t = cp_parser_assignment_expression (parser, false); if (t == error_mark_node) goto resync_fail; else if (OMP_CLAUSE_SCHEDULE_KIND (c) == OMP_CLAUSE_SCHEDULE_RUNTIME) - error ("schedule %<runtime%> does not take " - "a %<chunk_size%> parameter"); + error ("%Hschedule %<runtime%> does not take " + "a %<chunk_size%> parameter", &token->location); else if (OMP_CLAUSE_SCHEDULE_KIND (c) == OMP_CLAUSE_SCHEDULE_AUTO) - error ("schedule %<auto%> does not take " - "a %<chunk_size%> parameter"); + error ("%Hschedule %<auto%> does not take " + "a %<chunk_size%> parameter", &token->location); else OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (c) = t; @@ -20098,7 +20320,7 @@ cp_parser_omp_clause_schedule (cp_parser *parser, tree list) else if (!cp_parser_require (parser, CPP_CLOSE_PAREN, "%<,%> or %<)%>")) goto resync_fail; - check_no_duplicate_clause (list, OMP_CLAUSE_SCHEDULE, "schedule"); + check_no_duplicate_clause (list, OMP_CLAUSE_SCHEDULE, "schedule", location); OMP_CLAUSE_CHAIN (c) = list; return c; @@ -20115,11 +20337,12 @@ cp_parser_omp_clause_schedule (cp_parser *parser, tree list) untied */ static tree -cp_parser_omp_clause_untied (cp_parser *parser ATTRIBUTE_UNUSED, tree list) +cp_parser_omp_clause_untied (cp_parser *parser ATTRIBUTE_UNUSED, + tree list, location_t location) { tree c; - check_no_duplicate_clause (list, OMP_CLAUSE_UNTIED, "untied"); + check_no_duplicate_clause (list, OMP_CLAUSE_UNTIED, "untied", location); c = build_omp_clause (OMP_CLAUSE_UNTIED); OMP_CLAUSE_CHAIN (c) = list; @@ -20136,6 +20359,7 @@ cp_parser_omp_all_clauses (cp_parser *parser, unsigned int mask, { tree clauses = NULL; bool first = true; + cp_token *token = NULL; while (cp_lexer_next_token_is_not (parser->lexer, CPP_PRAGMA_EOL)) { @@ -20146,13 +20370,15 @@ cp_parser_omp_all_clauses (cp_parser *parser, unsigned int mask, if (!first && cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) cp_lexer_consume_token (parser->lexer); + token = cp_lexer_peek_token (parser->lexer); c_kind = cp_parser_omp_clause_name (parser); first = false; switch (c_kind) { case PRAGMA_OMP_CLAUSE_COLLAPSE: - clauses = cp_parser_omp_clause_collapse (parser, clauses); + clauses = cp_parser_omp_clause_collapse (parser, clauses, + token->location); c_name = "collapse"; break; case PRAGMA_OMP_CLAUSE_COPYIN: @@ -20165,7 +20391,8 @@ cp_parser_omp_all_clauses (cp_parser *parser, unsigned int mask, c_name = "copyprivate"; break; case PRAGMA_OMP_CLAUSE_DEFAULT: - clauses = cp_parser_omp_clause_default (parser, clauses); + clauses = cp_parser_omp_clause_default (parser, clauses, + token->location); c_name = "default"; break; case PRAGMA_OMP_CLAUSE_FIRSTPRIVATE: @@ -20174,7 +20401,7 @@ cp_parser_omp_all_clauses (cp_parser *parser, unsigned int mask, c_name = "firstprivate"; break; case PRAGMA_OMP_CLAUSE_IF: - clauses = cp_parser_omp_clause_if (parser, clauses); + clauses = cp_parser_omp_clause_if (parser, clauses, token->location); c_name = "if"; break; case PRAGMA_OMP_CLAUSE_LASTPRIVATE: @@ -20183,15 +20410,17 @@ cp_parser_omp_all_clauses (cp_parser *parser, unsigned int mask, c_name = "lastprivate"; break; case PRAGMA_OMP_CLAUSE_NOWAIT: - clauses = cp_parser_omp_clause_nowait (parser, clauses); + clauses = cp_parser_omp_clause_nowait (parser, clauses, token->location); c_name = "nowait"; break; case PRAGMA_OMP_CLAUSE_NUM_THREADS: - clauses = cp_parser_omp_clause_num_threads (parser, clauses); + clauses = cp_parser_omp_clause_num_threads (parser, clauses, + token->location); c_name = "num_threads"; break; case PRAGMA_OMP_CLAUSE_ORDERED: - clauses = cp_parser_omp_clause_ordered (parser, clauses); + clauses = cp_parser_omp_clause_ordered (parser, clauses, + token->location); c_name = "ordered"; break; case PRAGMA_OMP_CLAUSE_PRIVATE: @@ -20204,7 +20433,8 @@ cp_parser_omp_all_clauses (cp_parser *parser, unsigned int mask, c_name = "reduction"; break; case PRAGMA_OMP_CLAUSE_SCHEDULE: - clauses = cp_parser_omp_clause_schedule (parser, clauses); + clauses = cp_parser_omp_clause_schedule (parser, clauses, + token->location); c_name = "schedule"; break; case PRAGMA_OMP_CLAUSE_SHARED: @@ -20213,7 +20443,8 @@ cp_parser_omp_all_clauses (cp_parser *parser, unsigned int mask, c_name = "shared"; break; case PRAGMA_OMP_CLAUSE_UNTIED: - clauses = cp_parser_omp_clause_untied (parser, clauses); + clauses = cp_parser_omp_clause_untied (parser, clauses, + token->location); c_name = "nowait"; break; default: @@ -20226,7 +20457,7 @@ cp_parser_omp_all_clauses (cp_parser *parser, unsigned int mask, /* Remove the invalid clause(s) from the list to avoid confusing the rest of the compiler. */ clauses = prev; - error ("%qs is not valid for %qs", c_name, where); + error ("%H%qs is not valid for %qs", &token->location, c_name, where); } } saw_error: @@ -20902,7 +21133,10 @@ cp_parser_omp_for_loop (cp_parser *parser, tree clauses, tree *par_clauses) else { if (!collapse_err) - error ("collapsed loops not perfectly nested"); + { + location_t loc = cp_lexer_peek_token (parser->lexer)->location; + error ("%Hcollapsed loops not perfectly nested", &loc); + } collapse_err = true; cp_parser_statement_seq_opt (parser, NULL); cp_parser_require (parser, CPP_CLOSE_BRACE, "%<}%>"); @@ -21312,10 +21546,11 @@ cp_parser_initial_pragma (cp_token *first_token) cp_lexer_get_preprocessor_token (NULL, first_token); if (first_token->type != CPP_PRAGMA_EOL) - error ("junk at end of %<#pragma GCC pch_preprocess%>"); + error ("%Hjunk at end of %<#pragma GCC pch_preprocess%>", + &first_token->location); } else - error ("expected string literal"); + error ("%Hexpected string literal", &first_token->location); /* Skip to the end of the pragma. */ while (first_token->type != CPP_PRAGMA_EOL && first_token->type != CPP_EOF) @@ -21348,7 +21583,8 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context) switch (id) { case PRAGMA_GCC_PCH_PREPROCESS: - error ("%<#pragma GCC pch_preprocess%> must be first"); + error ("%H%<#pragma GCC pch_preprocess%> must be first", + &pragma_tok->location); break; case PRAGMA_OMP_BARRIER: @@ -21358,8 +21594,8 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context) cp_parser_omp_barrier (parser, pragma_tok); return false; case pragma_stmt: - error ("%<#pragma omp barrier%> may only be " - "used in compound statements"); + error ("%H%<#pragma omp barrier%> may only be " + "used in compound statements", &pragma_tok->location); break; default: goto bad_stmt; @@ -21373,8 +21609,8 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context) cp_parser_omp_flush (parser, pragma_tok); return false; case pragma_stmt: - error ("%<#pragma omp flush%> may only be " - "used in compound statements"); + error ("%H%<#pragma omp flush%> may only be " + "used in compound statements", &pragma_tok->location); break; default: goto bad_stmt; @@ -21388,8 +21624,9 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context) cp_parser_omp_taskwait (parser, pragma_tok); return false; case pragma_stmt: - error ("%<#pragma omp taskwait%> may only be " - "used in compound statements"); + error ("%H%<#pragma omp taskwait%> may only be " + "used in compound statements", + &pragma_tok->location); break; default: goto bad_stmt; @@ -21415,8 +21652,8 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context) return true; case PRAGMA_OMP_SECTION: - error ("%<#pragma omp section%> may only be used in " - "%<#pragma omp sections%> construct"); + error ("%H%<#pragma omp section%> may only be used in " + "%<#pragma omp sections%> construct", &pragma_tok->location); break; default: diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index cce706f0705..1378e5618dc 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -8765,13 +8765,6 @@ tsubst_function_type (tree t, if (arg_types == error_mark_node) return error_mark_node; - if (TYPE_QUALS (return_type) != TYPE_UNQUALIFIED - && in_decl != NULL_TREE - && !TREE_NO_WARNING (in_decl) - && (SCALAR_TYPE_P (return_type) || VOID_TYPE_P (return_type))) - warning (OPT_Wignored_qualifiers, - "type qualifiers ignored on function return type"); - /* Construct a new type node and return it. */ if (TREE_CODE (t) == FUNCTION_TYPE) fntype = build_function_type (return_type, arg_types); @@ -9750,7 +9743,7 @@ tsubst_qualified_id (tree qualified_id, tree args, if (complain & tf_error) qualified_name_lookup_error (scope, TREE_OPERAND (qualified_id, 1), - expr); + expr, input_location); return error_mark_node; } @@ -9759,7 +9752,7 @@ tsubst_qualified_id (tree qualified_id, tree args, if (expr == error_mark_node && complain & tf_error) qualified_name_lookup_error (scope, TREE_OPERAND (qualified_id, 1), - expr); + expr, input_location); else if (TYPE_P (scope)) { expr = (adjust_result_of_qualified_name_lookup @@ -10491,7 +10484,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl, /*is_type_p=*/false, /*complain=*/false); if (decl == error_mark_node || TREE_CODE (decl) == TREE_LIST) - qualified_name_lookup_error (scope, name, decl); + qualified_name_lookup_error (scope, name, decl, input_location); else do_local_using_decl (decl, scope, name); } @@ -10938,7 +10931,8 @@ tsubst_copy_and_build (tree t, /*done=*/true, /*address_p=*/false, /*template_arg_p=*/false, - &error_msg); + &error_msg, + input_location); if (error_msg) error (error_msg); if (!function_p && TREE_CODE (decl) == IDENTIFIER_NODE) @@ -11467,7 +11461,8 @@ tsubst_copy_and_build (tree t, } else { - qualified_name_lookup_error (object_type, tmpl, member); + qualified_name_lookup_error (object_type, tmpl, member, + input_location); return error_mark_node; } } diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index fa65e9b2804..17b1e5dee49 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2502,29 +2502,33 @@ finish_base_specifier (tree base, tree access, bool virtual_p) } /* Issue a diagnostic that NAME cannot be found in SCOPE. DECL is - what we found when we tried to do the lookup. */ + what we found when we tried to do the lookup. + LOCATION is the location of the NAME identifier; + The location is used in the error message*/ void -qualified_name_lookup_error (tree scope, tree name, tree decl) +qualified_name_lookup_error (tree scope, tree name, + tree decl, location_t location) { if (scope == error_mark_node) ; /* We already complained. */ else if (TYPE_P (scope)) { if (!COMPLETE_TYPE_P (scope)) - error ("incomplete type %qT used in nested name specifier", scope); + error ("%Hincomplete type %qT used in nested name specifier", + &location, scope); else if (TREE_CODE (decl) == TREE_LIST) { - error ("reference to %<%T::%D%> is ambiguous", scope, name); + error ("%Hreference to %<%T::%D%> is ambiguous", &location, scope, name); print_candidates (decl); } else - error ("%qD is not a member of %qT", name, scope); + error ("%H%qD is not a member of %qT", &location, name, scope); } else if (scope != global_namespace) - error ("%qD is not a member of %qD", name, scope); + error ("%H%qD is not a member of %qD", &location, name, scope); else - error ("%<::%D%> has not been declared", name); + error ("%H%<::%D%> has not been declared", &location, name); } /* If FNS is a member function, a set of member functions, or a @@ -2589,7 +2593,6 @@ baselink_for_fns (tree fns) the use of "this" explicit. Upon return, *IDK will be filled in appropriately. */ - tree finish_id_expression (tree id_expression, tree decl, @@ -2602,7 +2605,8 @@ finish_id_expression (tree id_expression, bool done, bool address_p, bool template_arg_p, - const char **error_msg) + const char **error_msg, + location_t location) { /* Initialize the output parameters. */ *idk = CP_ID_KIND_NONE; @@ -2632,7 +2636,7 @@ finish_id_expression (tree id_expression, /* If the qualifying type is non-dependent (and the name does not name a conversion operator to a dependent type), issue an error. */ - qualified_name_lookup_error (scope, id_expression, decl); + qualified_name_lookup_error (scope, id_expression, decl, location); return error_mark_node; } else if (!scope) diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 7a59af30e20..fa7557912d6 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -166,6 +166,7 @@ DEBUG_COUNTER (jump_bypass) DEBUG_COUNTER (local_alloc_for_sched) DEBUG_COUNTER (postreload_cse) DEBUG_COUNTER (pre_insn) +DEBUG_COUNTER (treepre_insert) DEBUG_COUNTER (sched2_func) DEBUG_COUNTER (sched_block) DEBUG_COUNTER (sched_func) @@ -174,4 +175,3 @@ DEBUG_COUNTER (sched_region) DEBUG_COUNTER (sms_sched_loop) DEBUG_COUNTER (split_for_sched2) DEBUG_COUNTER (tail_call) - diff --git a/gcc/df-core.c b/gcc/df-core.c index 8e6a4e14825..1ea30122254 100644 --- a/gcc/df-core.c +++ b/gcc/df-core.c @@ -622,7 +622,7 @@ df_remove_problem (struct dataflow *dflow) int j; for (j = i + 1; j < df->num_problems_defined; j++) df->problems_in_order[j-1] = df->problems_in_order[j]; - df->problems_in_order[j] = NULL; + df->problems_in_order[j-1] = NULL; df->num_problems_defined--; break; } diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 56e89265b49..eecb4ca5bf4 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -9120,9 +9120,10 @@ always specify the signedness. @item Compiling with @option{-maltivec} adds keywords @code{__vector}, -@code{__pixel}, and @code{__bool}. Macros @option{vector}, -@code{pixel}, and @code{bool} are defined in @code{<altivec.h>} and can -be undefined. +@code{vector}, @code{__pixel}, @code{pixel}, @code{__bool} and +@code{bool}. When compiling ISO C, the context-sensitive substitution +of the keywords @code{vector}, @code{pixel} and @code{bool} is +disabled. To use them, you must include @code{<altivec.h>} instead. @item GCC allows using a @code{typedef} name as the type specifier for a diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a87d89e9d84..98cceba8cd4 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -231,8 +231,9 @@ Objective-C and Objective-C++ Dialects}. -Wno-attributes -Wc++-compat -Wc++0x-compat -Wcast-align -Wcast-qual @gol -Wchar-subscripts -Wclobbered -Wcomment @gol -Wconversion -Wcoverage-mismatch -Wno-deprecated @gol --Wno-deprecated-declarations -Wdisabled-optimization -Wno-div-by-zero @gol --Wempty-body -Wenum-compare -Wno-endif-labels @gol +-Wno-deprecated-declarations -Wdisabled-optimization @gol +-Wdisallowed-function-list=@var{sym},@var{sym},@dots{} @gol +-Wno-div-by-zero -Wempty-body -Wenum-compare -Wno-endif-labels @gol -Werror -Werror=* @gol -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol @@ -560,6 +561,7 @@ Objective-C and Objective-C++ Dialects}. -maes -mpclmul @gol -msse4a -m3dnow -mpopcnt -mabm -msse5 @gol -mthreads -mno-align-stringops -minline-all-stringops @gol +-minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol -m96bit-long-double -mregparm=@var{num} -msseregparm @gol -mveclibabi=@var{type} -mpc32 -mpc64 -mpc80 -mstackrealign @gol @@ -4105,6 +4107,13 @@ minimum maximum, so we do not diagnose overlength strings in C++@. This option is implied by @option{-pedantic}, and can be disabled with @option{-Wno-overlength-strings}. + +@item -Wdisallowed-function-list=@var{sym},@var{sym},@dots{} +@opindex Wdisallowed-function-list + +If any of @var{sym} is called, GCC will issue a warning. This can be useful +in enforcing coding conventions that ban calls to certain functions, for +example, @code{alloca}, @code{malloc}, etc. @end table @node Debugging Options diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index c0018a77d12..66ca3e98fd0 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -2483,6 +2483,10 @@ to store doubleword values. A register suitable for use in an indirect jump. This will always be @code{$25} for @option{-mabicalls}. +@item v +Register @code{$3}. Do not use this constraint in new code; +it is retained only for compatibility with glibc. + @item y Equivalent to @code{r}; retained for backwards compatibility. @@ -4217,7 +4221,8 @@ it may provide the value 4 for this operand. Optional operands 5 and 6 specify expected alignment and size of block respectively. The expected alignment differs from alignment in operand 4 in a way that the blocks are not required to be aligned according to it in -all cases. Expected size, when unknown, is set to @code{(const_int -1)}. +all cases. This expected alignment is also in bytes, just like operand 4. +Expected size, when unknown, is set to @code{(const_int -1)}. Descriptions of multiple @code{movmem@var{m}} patterns can only be beneficial if the patterns for smaller modes have fewer restrictions @@ -4254,7 +4259,8 @@ operand. Optional operands 5 and 6 specify expected alignment and size of block respectively. The expected alignment differs from alignment in operand 4 in a way that the blocks are not required to be aligned according to it in -all cases. Expected size, when unknown, is set to @code{(const_int -1)}. +all cases. This expected alignment is also in bytes, just like operand 4. +Expected size, when unknown, is set to @code{(const_int -1)}. The use for multiple @code{setmem@var{m}} is as for @code{movmem@var{m}}. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index b5418a3f465..58600186940 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -2242,6 +2242,16 @@ possible since doing so will allow GCC to perform better register allocation. @end defmac +@deftypefn {Target Hook} bool TARGET_HARD_REGNO_SCRATCH_OK (unsigned int @var{regno}) +This target hook should return @code{true} if it is OK to use a hard register +@var{regno} as scratch reg in peephole2. + +One common use of this macro is to prevent using of a register that +is not saved by a prologue in an interrupt handler. + +The default version of this hook always returns @code{true}. +@end deftypefn + @defmac AVOID_CCMODE_COPIES Define this macro if the compiler should avoid copies to/from @code{CCmode} registers. You should only define this macro if support for copying to/from diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 80bdc0a4bb0..46ab10481d5 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1579,6 +1579,32 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) && (!MEM_P (SET_DEST (elem)) || GET_CODE (expr) == SEQUENCE) && (RTX_FRAME_RELATED_P (elem) || par_index == 0)) dwarf2out_frame_debug_expr (elem, label); + else if (GET_CODE (elem) == SET + && par_index != 0 + && !RTX_FRAME_RELATED_P (elem)) + { + /* Stack adjustment combining might combine some post-prologue + stack adjustment into a prologue stack adjustment. */ + HOST_WIDE_INT offset = stack_adjust_offset (elem); + + if (offset != 0) + { + if (cfa.reg == STACK_POINTER_REGNUM) + cfa.offset += offset; + +#ifndef STACK_GROWS_DOWNWARD + offset = -offset; +#endif + + args_size += offset; + if (args_size < 0) + args_size = 0; + + def_cfa_1 (label, &cfa); + if (flag_asynchronous_unwind_tables) + dwarf2out_args_size (label, args_size); + } + } } return; } diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 22c7979a773..658d50d25e4 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1486,7 +1486,7 @@ mem_expr_equal_p (const_tree expr1, const_tree expr2) return 0; } -/* Given REF, a MEM, and T, either the type of X or the expression +/* Given REF (a MEM) and T, either the type of X or the expression corresponding to REF, set the memory attributes. OBJECTP is nonzero if we are making a new object of this type. BITPOS is nonzero if there is an offset outstanding on T that will be applied later. */ diff --git a/gcc/expr.c b/gcc/expr.c index 33616d6900e..e7c24e2b838 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1360,7 +1360,8 @@ emit_block_move_via_movmem (rtx x, rtx y, rtx size, unsigned int align, pat = GEN_FCN ((int) code) (x, y, op2, opalign); else pat = GEN_FCN ((int) code) (x, y, op2, opalign, - GEN_INT (expected_align), + GEN_INT (expected_align + / BITS_PER_UNIT), GEN_INT (expected_size)); if (pat) { @@ -2780,7 +2781,8 @@ set_storage_via_setmem (rtx object, rtx size, rtx val, unsigned int align, pat = GEN_FCN ((int) code) (object, opsize, opchar, opalign); else pat = GEN_FCN ((int) code) (object, opsize, opchar, opalign, - GEN_INT (expected_align), + GEN_INT (expected_align + / BITS_PER_UNIT), GEN_INT (expected_size)); if (pat) { diff --git a/gcc/final.c b/gcc/final.c index cbdb3f1bfdd..7a87235321e 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -410,7 +410,7 @@ get_attr_length_1 (rtx insn ATTRIBUTE_UNUSED, length = asm_insn_count (body) * fallback_fn (insn); else if (GET_CODE (body) == SEQUENCE) for (i = 0; i < XVECLEN (body, 0); i++) - length += get_attr_length (XVECEXP (body, 0, i)); + length += get_attr_length_1 (XVECEXP (body, 0, i), fallback_fn); else length = fallback_fn (insn); break; diff --git a/gcc/flags.h b/gcc/flags.h index 1818a42c5ca..edc96e95920 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -279,6 +279,13 @@ extern bool flag_speculative_prefetching_set; instrumentation. */ extern bool flag_instrument_functions_exclude_p (tree fndecl); +/* Emit warning if the function call is disallowed under + -Wdisallowed-function-list=... */ +extern void warn_if_disallowed_function_p (const_tree fncall); + +/* True, if the -Wdisallowed-function-list=... option has been specified. */ +extern bool warn_disallowed_functions; + /* True if the given mode has a NaN representation and the treatment of NaN operands is important. Certain optimizations, such as folding x * 0 into 0, are not correct for NaN operands, and are normally diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 44f61fa2458..e36e8089c24 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,22 @@ +2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * Make-lang.in (gfortranspec.o): Fix dependencies. + +2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR fortran/36725 + * io.c: Add error check for g0 edit descriptor followed by '.'. + +2008-07-12 Daniel Kraft <d@domob.eu> + + * resolve.c (resolve_fl_derived): Allow pointer components to empty + derived types fixing a missing part of PR fortran/33221. + +2008-07-10 Daniel Kraft <d@domob.eu> + + * gfc-internals.texi (section gfc_expr): Created documentation about + the gfc_expr internal data structure. + 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/36670 diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in index 6acdbbefd7b..b0944c94308 100644 --- a/gcc/fortran/Make-lang.in +++ b/gcc/fortran/Make-lang.in @@ -77,7 +77,8 @@ fortran: f951$(exeext) # Tell GNU make to ignore files by these names if they exist. .PHONY: fortran -gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) $(CONFIG_H) +gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \ + $(CONFIG_H) coretypes.h intl.h (SHLIB_LINK='$(SHLIB_LINK)'; \ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ $(INCLUDES) $(srcdir)/fortran/gfortranspec.c) diff --git a/gcc/fortran/gfc-internals.texi b/gcc/fortran/gfc-internals.texi index dfe5d161842..330db81c59c 100644 --- a/gcc/fortran/gfc-internals.texi +++ b/gcc/fortran/gfc-internals.texi @@ -285,8 +285,10 @@ structures. @menu * gfc_code:: Representation of Executable Statements. +* gfc_expr:: Representation of Values and Expressions. @end menu + @c gfc_code @c -------- @@ -403,6 +405,153 @@ case-block, and @code{extx.case_list} contains the case-values this block corresponds to. The @code{block} member links to the next case in the list. +@c gfc_expr +@c -------- + +@node gfc_expr +@section @code{gfc_expr} +@tindex @code{gfc_expr} +@tindex @code{struct gfc_expr} + +Expressions and ``values'', including constants, variable-, array- and +component-references as well as complex expressions consisting of operators and +function calls are internally represented as one or a whole tree of +@code{gfc_expr} objects. The member @code{expr_type} specifies the overall +type of an expression (for instance, @code{EXPR_CONSTANT} for constants or +@code{EXPR_VARIABLE} for variable references). The members @code{ts} and +@code{rank} as well as @code{shape}, which can be @code{NULL}, specify +the type, rank and, if applicable, shape of the whole expression or expression +tree of which the current structure is the root. @code{where} is the locus of +this expression in the source code. + +Depending on the flavour of the expression being described by the object +(that is, the value of its @code{expr_type} member), the corresponding structure +in the @code{value} union will usually contain additional data describing the +expression's value in a type-specific manner. The @code{ref} member is used to +build chains of (array-, component- and substring-) references if the expression +in question contains such references, see below for details. + + +@subsection Constants + +Scalar constants are represented by @code{gfc_expr} nodes with their +@code{expr_type} set to @code{EXPR_CONSTANT}. The constant's value shall +already be known at compile-time and is stored in the @code{logical}, +@code{integer}, @code{real}, @code{complex} or @code{character} struct inside +@code{value}, depending on the constant's type specification. + + +@subsection Operators + +Operator-expressions are expressions that are the result of the execution of +some operator on one or two operands. The expressions have an @code{expr_type} +of @code{EXPR_OP}. Their @code{value.op} structure contains additional data. + +@code{op1} and optionally @code{op2} if the operator is binary point to the +two operands, and @code{operator} or @code{uop} describe the operator that +should be evaluated on these operands, where @code{uop} describes a user-defined +operator. + + +@subsection Function Calls + +If the expression is the return value of a function-call, its @code{expr_type} +is set to @code{EXPR_FUNCTION}, and @code{symtree} must point to the symtree +identifying the function to be called. @code{value.function.actual} holds the +actual arguments given to the function as a linked list of +@code{gfc_actual_arglist} nodes. + +The other members of @code{value.function} describe the function being called +in more detail, containing a link to the intrinsic symbol or user-defined +function symbol if the call is to an intrinsic or external function, +respectively. These values are determined during resolution-phase from the +structure's @code{symtree} member. + + +@subsection Array- and Structure-Constructors + +Array- and structure-constructors (one could probably call them ``array-'' and +``derived-type constants'') are @code{gfc_expr} structures with their +@code{expr_type} member set to @code{EXPR_ARRAY} or @code{EXPR_STRUCTURE}, +respectively. For structure constructors, @code{symtree} points to the +derived-type symbol for the type being constructed. + +The values for initializing each array element or structure component are +stored as linked-list of @code{gfc_constructor} nodes in the +@code{value.constructor} member. + + +@subsection Null + +@code{NULL} is a special value for pointers; it can be of different base types. +Such a @code{NULL} value is represented in the internal tree by a +@code{gfc_expr} node with @code{expr_type} @code{EXPR_NULL}. If the base type +of the @code{NULL} expression is known, it is stored in @code{ts} (that's for +instance the case for default-initializers of @code{ALLOCATABLE} components), +but this member can also be set to @code{BT_UNKNOWN} if the information is not +available (for instance, when the expression is a pointer-initializer +@code{NULL()}). + + +@subsection Variables and Reference Expressions + +Variable references are @code{gfc_expr} structures with their @code{expr_type} +set to @code{EXPR_VARIABLE}; their @code{symtree} should point to the variable +that is referenced. + +For this type of expression, it's also possible to chain array-, component- +or substring-references to the original expression to get something like +@samp{struct%component(2:5)}, where @code{component} is either an array or +a @code{CHARACTER} member of @code{struct} that is of some derived-type. Such a +chain of references is achieved by a linked list headed by @code{ref} of the +@code{gfc_expr} node. For the example above it would be (@samp{==|} is the +last @code{NULL} pointer): + +@smallexample +EXPR_VARIABLE(struct) ==> REF_COMPONENT(component) ==> REF_ARRAY(2:5) ==| +@end smallexample + +If @code{component} is a string rather than an array, the last element would be +a @code{REF_SUBSTRING} reference, of course. If the variable itself or some +component referenced is an array and the expression should reference the whole +array rather than being followed by an array-element or -section reference, a +@code{REF_ARRAY} reference must be built as the last element in the chain with +an array-reference type of @code{AR_FULL}. Consider this example code: + +@smallexample +TYPE :: mytype + INTEGER :: array(42) +END TYPE mytype + +TYPE(mytype) :: variable +INTEGER :: local_array(5) + +CALL do_something (variable%array, local_array) +@end smallexample + +The @code{gfc_expr} nodes representing the arguments to the @samp{do_something} +call will have a reference-chain like this: + +@smallexample +EXPR_VARIABLE(variable) ==> REF_COMPONENT(array) ==> REF_ARRAY(FULL) ==| +EXPR_VARIABLE(local_array) ==> REF_ARRAY(FULL) ==| +@end smallexample + + +@subsection Constant Substring References + +@code{EXPR_SUBSTRING} is a special type of expression that encodes a substring +reference of a constant string, as in the following code snippet: + +@smallexample +x = "abcde"(1:2) +@end smallexample + +In this case, @code{value.character} contains the full string's data as if it +was a string constant, but the @code{ref} member is also set and points to a +substring reference as described in the subsection above. + + @c --------------------------------------------------------------------- @c LibGFortran @c --------------------------------------------------------------------- diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 3494e8e863f..23bf5f92216 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -477,6 +477,7 @@ check_format (bool is_input) const char *unexpected_element = _("Unexpected element"); const char *unexpected_end = _("Unexpected end of format string"); const char *zero_width = _("Zero width in format descriptor"); + const char *g0_precision = _("Specifying precision with G0 not allowed"); const char *error; format_token t, u; @@ -694,9 +695,19 @@ data_desc: error = zero_width; goto syntax; } - else - return gfc_notify_std (GFC_STD_F2008, "Fortran F2008: 'G0' in " - "format at %C"); + + if (gfc_notify_std (GFC_STD_F2008, "Fortran F2008: 'G0' in " + "format at %C") == FAILURE) + return FAILURE; + + u = format_lex (); + if (u == FMT_PERIOD) + { + error = g0_precision; + goto syntax; + } + saved_token = u; + goto between_desc; } if (u == FMT_ERROR) diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index c0ec7847747..273f2ae746b 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -7657,7 +7657,8 @@ resolve_fl_derived (gfc_symbol *sym) } if (c->ts.type == BT_DERIVED && c->pointer - && c->ts.derived->components == NULL) + && c->ts.derived->components == NULL + && !c->ts.derived->attr.zero_comp) { gfc_error ("The pointer component '%s' of '%s' at %L is a type " "that has not been declared", c->name, sym->name, diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 079c81f9552..794a8db1bb1 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -1846,11 +1846,11 @@ insert_right_side (enum rtx_code code, rtx exp, rtx term, int insn_code, int ins if (GET_CODE (exp) == code) { - rtx new = insert_right_side (code, XEXP (exp, 1), - term, insn_code, insn_index); - if (new != XEXP (exp, 1)) + rtx new_rtx = insert_right_side (code, XEXP (exp, 1), + term, insn_code, insn_index); + if (new_rtx != XEXP (exp, 1)) /* Make a copy of this expression and call recursively. */ - newexp = attr_rtx (code, XEXP (exp, 0), new); + newexp = attr_rtx (code, XEXP (exp, 0), new_rtx); else newexp = exp; } @@ -1980,10 +1980,10 @@ evaluate_eq_attr (rtx exp, rtx value, int insn_code, int insn_index) for (i = 0; i < XVECLEN (value, 0); i += 2) { - rtx this = simplify_test_exp_in_temp (XVECEXP (value, 0, i), - insn_code, insn_index); + rtx this_cond = simplify_test_exp_in_temp (XVECEXP (value, 0, i), + insn_code, insn_index); - right = insert_right_side (AND, andexp, this, + right = insert_right_side (AND, andexp, this_cond, insn_code, insn_index); right = insert_right_side (AND, right, evaluate_eq_attr (exp, @@ -1995,7 +1995,7 @@ evaluate_eq_attr (rtx exp, rtx value, int insn_code, int insn_index) insn_code, insn_index); /* Add this condition into the AND expression. */ - newexp = attr_rtx (NOT, this); + newexp = attr_rtx (NOT, this_cond); andexp = insert_right_side (AND, andexp, newexp, insn_code, insn_index); } diff --git a/gcc/genemit.c b/gcc/genemit.c index caf808e99c9..35e5691b94f 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -357,17 +357,17 @@ gen_insn (rtx insn, int lineno) for (j = i + 1; j < XVECLEN (insn, 1); j++) { - rtx old = XEXP (XVECEXP (p->pattern, 1, j), 0); - rtx new = XEXP (XVECEXP (insn, 1, j), 0); + rtx old_rtx = XEXP (XVECEXP (p->pattern, 1, j), 0); + rtx new_rtx = XEXP (XVECEXP (insn, 1, j), 0); - /* OLD and NEW are the same if both are to be a SCRATCH + /* OLD and NEW_INSN are the same if both are to be a SCRATCH of the same mode, or if both are registers of the same mode and number. */ - if (! (GET_MODE (old) == GET_MODE (new) - && ((GET_CODE (old) == MATCH_SCRATCH - && GET_CODE (new) == MATCH_SCRATCH) - || (REG_P (old) && REG_P (new) - && REGNO (old) == REGNO (new))))) + if (! (GET_MODE (old_rtx) == GET_MODE (new_rtx) + && ((GET_CODE (old_rtx) == MATCH_SCRATCH + && GET_CODE (new_rtx) == MATCH_SCRATCH) + || (REG_P (old_rtx) && REG_P (new_rtx) + && REGNO (old_rtx) == REGNO (new_rtx))))) break; } diff --git a/gcc/gengtype.c b/gcc/gengtype.c index b73fdfa7495..5799be04ea6 100644 --- a/gcc/gengtype.c +++ b/gcc/gengtype.c @@ -3533,22 +3533,22 @@ write_roots (pair_p variables) where the GTY(()) tags are only present if is_scalar is _false_. */ void -note_def_vec (const char *typename, bool is_scalar, struct fileloc *pos) +note_def_vec (const char *type_name, bool is_scalar, struct fileloc *pos) { pair_p fields; type_p t; options_p o; type_p len_ty = create_scalar_type ("unsigned"); - const char *name = concat ("VEC_", typename, "_base", (char *)0); + const char *name = concat ("VEC_", type_name, "_base", (char *)0); if (is_scalar) { - t = create_scalar_type (typename); + t = create_scalar_type (type_name); o = 0; } else { - t = resolve_typedef (typename, pos); + t = resolve_typedef (type_name, pos); o = create_option (0, "length", "%h.num"); } diff --git a/gcc/gengtype.h b/gcc/gengtype.h index fef1262a958..916570a8b9c 100644 --- a/gcc/gengtype.h +++ b/gcc/gengtype.h @@ -64,7 +64,7 @@ extern pair_p nreverse_pairs (pair_p list); extern type_p adjust_field_type (type_p, options_p); extern void note_variable (const char *s, type_p t, options_p o, struct fileloc *pos); -extern void note_def_vec (const char *typename, bool is_scalar, +extern void note_def_vec (const char *type_name, bool is_scalar, struct fileloc *pos); extern void note_def_vec_alloc (const char *type, const char *astrat, struct fileloc *pos); diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 3592388bd64..601483d8b2f 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -154,7 +154,7 @@ struct data { struct data *next; const char *name; - const char *template; + const char *template_code; int code_number; int index_number; const char *filename; @@ -336,7 +336,7 @@ output_insn_data (void) break; case INSN_OUTPUT_FORMAT_SINGLE: { - const char *p = d->template; + const char *p = d->template_code; char prev = 0; printf ("#if HAVE_DESIGNATED_INITIALIZERS\n"); @@ -656,36 +656,36 @@ place_operands (struct data *d) templates, or C code to generate the assembler code template. */ static void -process_template (struct data *d, const char *template) +process_template (struct data *d, const char *template_code) { const char *cp; int i; /* Templates starting with * contain straight code to be run. */ - if (template[0] == '*') + if (template_code[0] == '*') { - d->template = 0; + d->template_code = 0; d->output_format = INSN_OUTPUT_FORMAT_FUNCTION; puts ("\nstatic const char *"); printf ("output_%d (rtx *operands ATTRIBUTE_UNUSED, rtx insn ATTRIBUTE_UNUSED)\n", d->code_number); puts ("{"); - print_rtx_ptr_loc (template); - puts (template + 1); + print_rtx_ptr_loc (template_code); + puts (template_code + 1); puts ("}"); } /* If the assembler code template starts with a @ it is a newline-separated list of assembler code templates, one for each alternative. */ - else if (template[0] == '@') + else if (template_code[0] == '@') { - d->template = 0; + d->template_code = 0; d->output_format = INSN_OUTPUT_FORMAT_MULTI; printf ("\nstatic const char * const output_%d[] = {\n", d->code_number); - for (i = 0, cp = &template[1]; *cp; ) + for (i = 0, cp = &template_code[1]; *cp; ) { const char *ep, *sp; @@ -725,7 +725,7 @@ process_template (struct data *d, const char *template) } else { - d->template = template; + d->template_code = template_code; d->output_format = INSN_OUTPUT_FORMAT_SINGLE; } } @@ -952,7 +952,7 @@ gen_expand (rtx insn, int lineno) d->n_operands = max_opno + 1; d->n_dups = num_dups; - d->template = 0; + d->template_code = 0; d->output_format = INSN_OUTPUT_FORMAT_NONE; validate_insn_alternatives (d); @@ -993,7 +993,7 @@ gen_split (rtx split, int lineno) d->n_operands = max_opno + 1; d->n_dups = 0; d->n_alternatives = 0; - d->template = 0; + d->template_code = 0; d->output_format = INSN_OUTPUT_FORMAT_NONE; place_operands (d); @@ -1120,7 +1120,7 @@ note_constraint (rtx exp, int lineno) { const char *name = XSTR (exp, 0); unsigned int namelen = strlen (name); - struct constraint_data **iter, **slot, *new; + struct constraint_data **iter, **slot, *new_cdata; /* The 'm' constraint is special here since that constraint letter can be overridden by the back end by defining the @@ -1173,12 +1173,12 @@ note_constraint (rtx exp, int lineno) return; } } - new = XNEWVAR (struct constraint_data, sizeof (struct constraint_data) + namelen); - strcpy ((char *)new + offsetof(struct constraint_data, name), name); - new->namelen = namelen; - new->lineno = lineno; - new->next_this_letter = *slot; - *slot = new; + new_cdata = XNEWVAR (struct constraint_data, sizeof (struct constraint_data) + namelen); + strcpy ((char *)new_cdata + offsetof(struct constraint_data, name), name); + new_cdata->namelen = namelen; + new_cdata->lineno = lineno; + new_cdata->next_this_letter = *slot; + *slot = new_cdata; } /* Return the length of the constraint name beginning at position S diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 1713f133314..70ab87745d3 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -474,14 +474,14 @@ extern void debug_decision_list static struct decision * new_decision (const char *position, struct decision_head *last) { - struct decision *new = XCNEW (struct decision); + struct decision *new_decision = XCNEW (struct decision); - new->success = *last; - new->position = xstrdup (position); - new->number = next_number++; + new_decision->success = *last; + new_decision->position = xstrdup (position); + new_decision->number = next_number++; - last->first = last->last = new; - return new; + last->first = last->last = new_decision; + return new_decision; } /* Create a new test and link it in at PLACE. */ @@ -877,7 +877,7 @@ add_to_sequence (rtx pattern, struct decision_head *last, const char *position, enum routine_type insn_type, int top) { RTX_CODE code; - struct decision *this, *sub; + struct decision *this_decision, *sub; struct decision_test *test; struct decision_test **place; char *subpos; @@ -894,8 +894,8 @@ add_to_sequence (rtx pattern, struct decision_head *last, const char *position, strcpy (subpos, position); subpos[depth + 1] = 0; - sub = this = new_decision (position, last); - place = &this->tests; + sub = this_decision = new_decision (position, last); + place = &this_decision->tests; restart: mode = GET_MODE (pattern); @@ -1142,20 +1142,20 @@ add_to_sequence (rtx pattern, struct decision_head *last, const char *position, before any of the nodes we may have added above. */ if (code != UNKNOWN) { - place = &this->tests; + place = &this_decision->tests; test = new_decision_test (DT_code, &place); test->u.code = code; } if (mode != VOIDmode) { - place = &this->tests; + place = &this_decision->tests; test = new_decision_test (DT_mode, &place); test->u.mode = mode; } /* If we didn't insert any tests or accept nodes, hork. */ - gcc_assert (this->tests); + gcc_assert (this_decision->tests); ret: free (subpos); @@ -1592,7 +1592,7 @@ factor_tests (struct decision_head *head) for (first = head->first; first && first->next; first = next) { enum decision_type type; - struct decision *new, *old_last; + struct decision *new_dec, *old_last; type = first->tests->type; next = first->next; @@ -1615,8 +1615,8 @@ factor_tests (struct decision_head *head) below our first test. */ if (first->tests->next != NULL) { - new = new_decision (first->position, &first->success); - new->tests = first->tests->next; + new_dec = new_decision (first->position, &first->success); + new_dec->tests = first->tests->next; first->tests->next = NULL; } @@ -1633,14 +1633,14 @@ factor_tests (struct decision_head *head) if (next->tests->next != NULL) { - new = new_decision (next->position, &next->success); - new->tests = next->tests->next; + new_dec = new_decision (next->position, &next->success); + new_dec->tests = next->tests->next; next->tests->next = NULL; } - new = next; + new_dec = next; next = next->next; - new->next = NULL; - h.first = h.last = new; + new_dec->next = NULL; + h.first = h.last = new_dec; merge_trees (head, &h); } @@ -2618,25 +2618,25 @@ make_insn_sequence (rtx insn, enum routine_type type) if (i != XVECLEN (x, 0)) { - rtx new; + rtx new_rtx; struct decision_head clobber_head; /* Build a similar insn without the clobbers. */ if (i == 1) - new = XVECEXP (x, 0, 0); + new_rtx = XVECEXP (x, 0, 0); else { int j; - new = rtx_alloc (PARALLEL); - XVEC (new, 0) = rtvec_alloc (i); + new_rtx = rtx_alloc (PARALLEL); + XVEC (new_rtx, 0) = rtvec_alloc (i); for (j = i - 1; j >= 0; j--) - XVECEXP (new, 0, j) = XVECEXP (x, 0, j); + XVECEXP (new_rtx, 0, j) = XVECEXP (x, 0, j); } /* Recognize it. */ memset (&clobber_head, 0, sizeof(clobber_head)); - last = add_to_sequence (new, &clobber_head, "", type, 1); + last = add_to_sequence (new_rtx, &clobber_head, "", type, 1); /* Find the end of the test chain on the last node. */ for (test = last->tests; test->next; test = test->next) diff --git a/gcc/gensupport.c b/gcc/gensupport.c index 912b81b79c6..540c30e3575 100644 --- a/gcc/gensupport.c +++ b/gcc/gensupport.c @@ -1428,7 +1428,7 @@ record_insn_name (int code, const char *name) { static const char *last_real_name = "insn"; static int last_real_code = 0; - char *new; + char *new_name; if (insn_name_ptr_size <= code) { @@ -1442,14 +1442,14 @@ record_insn_name (int code, const char *name) if (!name || name[0] == '\0') { - new = XNEWVAR (char, strlen (last_real_name) + 10); - sprintf (new, "%s+%d", last_real_name, code - last_real_code); + new_name = XNEWVAR (char, strlen (last_real_name) + 10); + sprintf (new_name, "%s+%d", last_real_name, code - last_real_code); } else { - last_real_name = new = xstrdup (name); + last_real_name = new_name = xstrdup (name); last_real_code = code; } - insn_name_ptr[code] = new; + insn_name_ptr[code] = new_name; } diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 4ac73d4af4f..98a6c280ef3 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -799,7 +799,7 @@ alloc_page (unsigned order) alloc_size = GGC_QUIRE_SIZE * G.pagesize; else alloc_size = entry_size + G.pagesize - 1; - allocation = xmalloc (alloc_size); + allocation = XNEWVEC (char, alloc_size); page = (char *) (((size_t) allocation + G.pagesize - 1) & -G.pagesize); head_slop = page - allocation; @@ -842,7 +842,7 @@ alloc_page (unsigned order) struct page_entry *e, *f = G.free_pages; for (a = enda - G.pagesize; a != page; a -= G.pagesize) { - e = xcalloc (1, page_entry_size); + e = XCNEWVAR (struct page_entry, page_entry_size); e->order = order; e->bytes = G.pagesize; e->page = a; diff --git a/gcc/gimplify.c b/gcc/gimplify.c index c3af34bf27e..b6bc9ca79a5 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -85,26 +85,6 @@ struct gimplify_omp_ctx enum omp_region_type region_type; }; -struct gimplify_ctx -{ - struct gimplify_ctx *prev_context; - - tree current_bind_expr; - tree temps; - tree conditional_cleanups; - tree exit_label; - tree return_temp; - - VEC(tree,heap) *case_labels; - /* The formal temporary table. Should this be persistent? */ - htab_t temp_htab; - - int conditions; - bool save_stack; - bool into_ssa; - bool allow_rhs_cond_expr; -}; - static struct gimplify_ctx *gimplify_ctxp; static struct gimplify_omp_ctx *gimplify_omp_ctxp; @@ -169,15 +149,10 @@ gimple_tree_eq (const void *p1, const void *p2) /* Set up a context for the gimplifier. */ void -push_gimplify_context (void) +push_gimplify_context (struct gimplify_ctx *c) { - struct gimplify_ctx *c; - - c = (struct gimplify_ctx *) xcalloc (1, sizeof (struct gimplify_ctx)); + memset (c, '\0', sizeof (*c)); c->prev_context = gimplify_ctxp; - if (optimize) - c->temp_htab = htab_create (1000, gimple_tree_hash, gimple_tree_eq, free); - gimplify_ctxp = c; } @@ -202,9 +177,8 @@ pop_gimplify_context (tree body) else record_vars (c->temps); - if (optimize) + if (c->temp_htab) htab_delete (c->temp_htab); - free (c); } static void @@ -575,6 +549,9 @@ lookup_tmp_var (tree val, bool is_formal) void **slot; elt.val = val; + if (gimplify_ctxp->temp_htab == NULL) + gimplify_ctxp->temp_htab + = htab_create (1000, gimple_tree_hash, gimple_tree_eq, free); slot = htab_find_slot (gimplify_ctxp->temp_htab, (void *)&elt, INSERT); if (*slot == NULL) { @@ -5105,6 +5082,7 @@ gimplify_scan_omp_clauses (tree *list_p, tree *pre_p, enum omp_region_type region_type) { struct gimplify_omp_ctx *ctx, *outer_ctx; + struct gimplify_ctx gctx; tree c; ctx = new_omp_context (region_type); @@ -5161,10 +5139,10 @@ gimplify_scan_omp_clauses (tree *list_p, tree *pre_p, omp_add_variable (ctx, OMP_CLAUSE_REDUCTION_PLACEHOLDER (c), GOVD_LOCAL | GOVD_SEEN); gimplify_omp_ctxp = ctx; - push_gimplify_context (); + push_gimplify_context (&gctx); gimplify_stmt (&OMP_CLAUSE_REDUCTION_INIT (c)); pop_gimplify_context (OMP_CLAUSE_REDUCTION_INIT (c)); - push_gimplify_context (); + push_gimplify_context (&gctx); gimplify_stmt (&OMP_CLAUSE_REDUCTION_MERGE (c)); pop_gimplify_context (OMP_CLAUSE_REDUCTION_MERGE (c)); gimplify_omp_ctxp = outer_ctx; @@ -5173,7 +5151,7 @@ gimplify_scan_omp_clauses (tree *list_p, tree *pre_p, && OMP_CLAUSE_LASTPRIVATE_STMT (c)) { gimplify_omp_ctxp = ctx; - push_gimplify_context (); + push_gimplify_context (&gctx); if (TREE_CODE (OMP_CLAUSE_LASTPRIVATE_STMT (c)) != BIND_EXPR) { tree bind = build3 (BIND_EXPR, void_type_node, NULL, @@ -5396,13 +5374,14 @@ static enum gimplify_status gimplify_omp_parallel (tree *expr_p, tree *pre_p) { tree expr = *expr_p; + struct gimplify_ctx gctx; gimplify_scan_omp_clauses (&OMP_PARALLEL_CLAUSES (expr), pre_p, OMP_PARALLEL_COMBINED (expr) ? ORT_COMBINED_PARALLEL : ORT_PARALLEL); - push_gimplify_context (); + push_gimplify_context (&gctx); gimplify_stmt (&OMP_PARALLEL_BODY (expr)); @@ -5425,10 +5404,11 @@ static enum gimplify_status gimplify_omp_task (tree *expr_p, tree *pre_p) { tree expr = *expr_p; + struct gimplify_ctx gctx; gimplify_scan_omp_clauses (&OMP_TASK_CLAUSES (expr), pre_p, ORT_TASK); - push_gimplify_context (); + push_gimplify_context (&gctx); gimplify_stmt (&OMP_TASK_BODY (expr)); @@ -6653,11 +6633,12 @@ gimplify_body (tree *body_p, tree fndecl, bool do_parms) { location_t saved_location = input_location; tree body, parm_stmts; + struct gimplify_ctx gctx; timevar_push (TV_TREE_GIMPLIFY); gcc_assert (gimplify_ctxp == NULL); - push_gimplify_context (); + push_gimplify_context (&gctx); /* Unshare most shared trees in the body and in that of any nested functions. It would seem we don't have to do this for nested functions because @@ -6799,6 +6780,7 @@ force_gimple_operand (tree expr, tree *stmts, bool simple, tree var) tree t; enum gimplify_status ret; gimple_predicate gimple_test_f; + struct gimplify_ctx gctx; *stmts = NULL_TREE; @@ -6807,7 +6789,7 @@ force_gimple_operand (tree expr, tree *stmts, bool simple, tree var) gimple_test_f = simple ? is_gimple_val : is_gimple_reg_rhs; - push_gimplify_context (); + push_gimplify_context (&gctx); gimplify_ctxp->into_ssa = gimple_in_ssa_p (cfun); gimplify_ctxp->allow_rhs_cond_expr = true; diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index f0f57e76390..49cca65fe43 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * Make-lang.in (jvspec.o): Fix dependencies. + 2008-07-06 Tom Tromey <tromey@redhat.com> * Make-lang.in (java/parse.o-warn): Remove. diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index 6f0c4179f97..c5446db6569 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -57,7 +57,7 @@ JAVA_TARGET_INDEPENDENT_BIN_TOOLS = jcf-dump .PHONY: java jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \ - $(GCC_H) $(CONFIG_H) + $(GCC_H) $(CONFIG_H) java/jcf.h java/javaop.h (SHLIB_LINK='$(SHLIB_LINK)'; \ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ $(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION)) diff --git a/gcc/langhooks.c b/gcc/langhooks.c index 3943f02b794..e2460473f54 100644 --- a/gcc/langhooks.c +++ b/gcc/langhooks.c @@ -394,7 +394,9 @@ lhd_print_error_function (diagnostic_context *context, const char *file, if (abstract_origin) { ao = BLOCK_ABSTRACT_ORIGIN (abstract_origin); - while (TREE_CODE (ao) == BLOCK && BLOCK_ABSTRACT_ORIGIN (ao)) + while (TREE_CODE (ao) == BLOCK + && BLOCK_ABSTRACT_ORIGIN (ao) + && BLOCK_ABSTRACT_ORIGIN (ao) != ao) ao = BLOCK_ABSTRACT_ORIGIN (ao); gcc_assert (TREE_CODE (ao) == FUNCTION_DECL); fndecl = ao; @@ -424,7 +426,9 @@ lhd_print_error_function (diagnostic_context *context, const char *file, { ao = BLOCK_ABSTRACT_ORIGIN (block); - while (TREE_CODE (ao) == BLOCK && BLOCK_ABSTRACT_ORIGIN (ao)) + while (TREE_CODE (ao) == BLOCK + && BLOCK_ABSTRACT_ORIGIN (ao) + && BLOCK_ABSTRACT_ORIGIN (ao) != ao) ao = BLOCK_ABSTRACT_ORIGIN (ao); if (TREE_CODE (ao) == FUNCTION_DECL) diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index f5869b3bca9..15ba12c999a 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,18 @@ +2008-07-14 Jason Merrill <jason@redhat.com> + + PR objc++/36723 + * objc-act.c (objc_build_constructor): Update C++ tweak. + +2007-07-14 Rafael Avila de Espindola <espindola@google.com> + + * objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead + of DECL_IN_SYSTEM_HEADER. + +2008-07-11 Ian Lance Taylor <iant@google.com> + + * objc-act.c (objc_is_reserved_word): Always check for RID_CLASS, + etc., not just when OBJCPLUS is defined. + 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * objc-act.c (setup_string_decl, objc_build_string_object, diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 4aef9a02017..8cbf81a0313 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -760,12 +760,9 @@ objc_is_reserved_word (tree ident) unsigned char code = C_RID_CODE (ident); return (OBJC_IS_AT_KEYWORD (code) -#ifdef OBJCPLUS || code == RID_CLASS || code == RID_PUBLIC || code == RID_PROTECTED || code == RID_PRIVATE - || code == RID_TRY || code == RID_THROW || code == RID_CATCH -#endif - ); + || code == RID_TRY || code == RID_THROW || code == RID_CATCH); } /* Return true if TYPE is 'id'. */ @@ -1555,11 +1552,11 @@ synth_module_prologue (void) type = lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, objc_object_name, objc_object_type)); - DECL_IN_SYSTEM_HEADER (type) = 1; + TREE_NO_WARNING (type) = 1; type = lang_hooks.decls.pushdecl (build_decl (TYPE_DECL, objc_class_name, objc_class_type)); - DECL_IN_SYSTEM_HEADER (type) = 1; + TREE_NO_WARNING (type) = 1; /* Forward-declare '@interface Protocol'. */ @@ -2031,8 +2028,7 @@ objc_build_constructor (tree type, tree elts) /* Adjust for impedance mismatch. We should figure out how to build CONSTRUCTORs that consistently please both the C and C++ gods. */ if (!TREE_PURPOSE (elts)) - TREE_TYPE (constructor) = NULL_TREE; - TREE_HAS_CONSTRUCTOR (constructor) = 1; + TREE_TYPE (constructor) = init_list_type_node; #endif return constructor; diff --git a/gcc/omp-low.c b/gcc/omp-low.c index e5680077bd0..2f9aedeac39 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -5281,10 +5281,11 @@ lower_omp_sections (tree *stmt_p, omp_context *ctx) tree t, dlist; tree_stmt_iterator tsi; unsigned i, len; + struct gimplify_ctx gctx; stmt = *stmt_p; - push_gimplify_context (); + push_gimplify_context (&gctx); dlist = NULL; ilist = NULL; @@ -5482,8 +5483,9 @@ static void lower_omp_single (tree *stmt_p, omp_context *ctx) { tree t, bind, block, single_stmt = *stmt_p, dlist; + struct gimplify_ctx gctx; - push_gimplify_context (); + push_gimplify_context (&gctx); block = make_node (BLOCK); *stmt_p = bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, block); @@ -5526,8 +5528,9 @@ static void lower_omp_master (tree *stmt_p, omp_context *ctx) { tree bind, block, stmt = *stmt_p, lab = NULL, x; + struct gimplify_ctx gctx; - push_gimplify_context (); + push_gimplify_context (&gctx); block = make_node (BLOCK); *stmt_p = bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, block); @@ -5565,8 +5568,9 @@ static void lower_omp_ordered (tree *stmt_p, omp_context *ctx) { tree bind, block, stmt = *stmt_p, x; + struct gimplify_ctx gctx; - push_gimplify_context (); + push_gimplify_context (&gctx); block = make_node (BLOCK); *stmt_p = bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, block); @@ -5609,6 +5613,7 @@ lower_omp_critical (tree *stmt_p, omp_context *ctx) { tree bind, block, stmt = *stmt_p; tree t, lock, unlock, name; + struct gimplify_ctx gctx; name = OMP_CRITICAL_NAME (stmt); if (name) @@ -5658,7 +5663,7 @@ lower_omp_critical (tree *stmt_p, omp_context *ctx) unlock = build_call_expr (unlock, 0); } - push_gimplify_context (); + push_gimplify_context (&gctx); block = make_node (BLOCK); *stmt_p = bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, block); @@ -5743,10 +5748,11 @@ lower_omp_for (tree *stmt_p, omp_context *ctx) tree t, stmt, ilist, dlist, new_stmt, block, *body_p, *rhs_p; struct omp_for_data fd; int i; + struct gimplify_ctx gctx; stmt = *stmt_p; - push_gimplify_context (); + push_gimplify_context (&gctx); lower_omp (&OMP_FOR_PRE_BODY (stmt), ctx); lower_omp (&OMP_FOR_BODY (stmt), ctx); @@ -5909,6 +5915,7 @@ create_task_copyfn (tree task_stmt, omp_context *ctx) bool record_needs_remap = false, srecord_needs_remap = false; splay_tree_node n; struct omp_taskcopy_context tcctx; + struct gimplify_ctx gctx; child_fn = OMP_TASK_COPYFN (task_stmt); child_cfun = DECL_STRUCT_FUNCTION (child_fn); @@ -5921,7 +5928,7 @@ create_task_copyfn (tree task_stmt, omp_context *ctx) DECL_CONTEXT (t) = child_fn; /* Populate the function. */ - push_gimplify_context (); + push_gimplify_context (&gctx); current_function_decl = child_fn; bind = build3 (BIND_EXPR, void_type_node, NULL, NULL, NULL); @@ -6138,6 +6145,7 @@ lower_omp_taskreg (tree *stmt_p, omp_context *ctx) tree clauses, par_bind, par_body, new_body, bind; tree olist, ilist, par_olist, par_ilist; tree stmt, child_fn, t; + struct gimplify_ctx gctx; stmt = *stmt_p; @@ -6161,7 +6169,7 @@ lower_omp_taskreg (tree *stmt_p, omp_context *ctx) if (ctx->srecord_type) create_task_copyfn (stmt, ctx); - push_gimplify_context (); + push_gimplify_context (&gctx); par_olist = NULL_TREE; par_ilist = NULL_TREE; @@ -6238,10 +6246,12 @@ lower_omp_2 (tree *tp, int *walk_subtrees, void *data) omp_context *ctx = (omp_context *) data; /* Any variable with DECL_VALUE_EXPR needs to be regimplified. */ - if (TREE_CODE (t) == VAR_DECL - && ((ctx && DECL_HAS_VALUE_EXPR_P (t)) - || (task_shared_vars - && bitmap_bit_p (task_shared_vars, DECL_UID (t))))) + if (TREE_CODE (t) == VAR_DECL && ctx && DECL_HAS_VALUE_EXPR_P (t)) + return t; + + if (task_shared_vars + && DECL_P (t) + && bitmap_bit_p (task_shared_vars, DECL_UID (t))) return t; /* If a global variable has been privatized, TREE_CONSTANT on @@ -6422,8 +6432,10 @@ execute_lower_omp (void) if (all_contexts->root) { + struct gimplify_ctx gctx; + if (task_shared_vars) - push_gimplify_context (); + push_gimplify_context (&gctx); lower_omp (&DECL_SAVED_TREE (current_function_decl), NULL); if (task_shared_vars) pop_gimplify_context (NULL); diff --git a/gcc/opts.c b/gcc/opts.c index c26260acdd7..7e8e96c4dad 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -371,6 +371,12 @@ DEF_VEC_ALLOC_P(const_char_p,heap); static VEC(const_char_p,heap) *ignored_options; +/* Function calls disallowed under -Wdisallowed-function-list=... */ +static VEC(char_p,heap) *warning_disallowed_functions; + +/* If -Wdisallowed-function-list=... */ +bool warn_disallowed_functions = false; + /* Input file names. */ const char **in_fnames; unsigned num_in_fnames; @@ -451,14 +457,17 @@ complain_wrong_lang (const char *text, const struct cl_option *option, /* Buffer the unknown option described by the string OPT. Currently, we only complain about unknown -Wno-* options if they may have - prevented a diagnostic. Otherwise, we just ignore them. */ + prevented a diagnostic. Otherwise, we just ignore them. + Note that if we do complain, it is only as a warning, not an error; + passing the compiler an unrecognised -Wno-* option should never + change whether the compilation succeeds or fails. */ -static void postpone_unknown_option_error(const char *opt) +static void postpone_unknown_option_warning(const char *opt) { VEC_safe_push (const_char_p, heap, ignored_options, opt); } -/* Produce an error for each option previously buffered. */ +/* Produce a warning for each option previously buffered. */ void print_ignored_options (void) { @@ -470,7 +479,7 @@ void print_ignored_options (void) { const char *opt; opt = VEC_pop (const_char_p, ignored_options); - error ("unrecognized command line option \"%s\"", opt); + warning (0, "unrecognized command line option \"%s\"", opt); } input_location = saved_loc; @@ -507,9 +516,9 @@ handle_option (const char **argv, unsigned int lang_mask) opt_index = find_opt (opt + 1, lang_mask | CL_COMMON | CL_TARGET); if (opt_index == cl_options_count && opt[1] == 'W') { - /* We don't generate errors for unknown -Wno-* options + /* We don't generate warnings for unknown -Wno-* options unless we issue diagnostics. */ - postpone_unknown_option_error (argv[0]); + postpone_unknown_option_warning (argv[0]); result = 1; goto done; } @@ -655,12 +664,10 @@ add_input_filename (const char *filename) in_fnames[num_in_fnames - 1] = filename; } -/* Add functions or file names to a vector of names to exclude from - instrumentation. */ +/* Add comma-separated strings to a char_p vector. */ static void -add_instrument_functions_exclude_list (VEC(char_p,heap) **pvec, - const char* arg) +add_comma_separated_to_vector (VEC(char_p,heap) **pvec, const char* arg) { char *tmp; char *r; @@ -736,6 +743,31 @@ flag_instrument_functions_exclude_p (tree fndecl) return false; } + +/* Return whether this function call is disallowed. */ +void +warn_if_disallowed_function_p (const_tree exp) +{ + if (TREE_CODE(exp) == CALL_EXPR + && VEC_length (char_p, warning_disallowed_functions) > 0) + { + int i; + char *s; + const char *fnname = + IDENTIFIER_POINTER (DECL_NAME (get_callee_fndecl (exp))); + for (i = 0; VEC_iterate (char_p, warning_disallowed_functions, i, s); + ++i) + { + if (strcmp (fnname, s) == 0) + { + warning (OPT_Wdisallowed_function_list_, + "disallowed call to %qs", fnname); + break; + } + } + } +} + /* Decode and handle the vector of command line options. LANG_MASK contains has a single bit set representing the current language. */ @@ -1541,6 +1573,12 @@ common_handle_option (size_t scode, const char *arg, int value, set_Wextra (value); break; + case OPT_Wdisallowed_function_list_: + warn_disallowed_functions = true; + add_comma_separated_to_vector + (&warning_disallowed_functions, arg); + break; + case OPT_Werror_: enable_warning_as_error (arg, value, lang_mask); break; @@ -1691,12 +1729,12 @@ common_handle_option (size_t scode, const char *arg, int value, break; case OPT_finstrument_functions_exclude_function_list_: - add_instrument_functions_exclude_list + add_comma_separated_to_vector (&flag_instrument_functions_exclude_functions, arg); break; case OPT_finstrument_functions_exclude_file_list_: - add_instrument_functions_exclude_list + add_comma_separated_to_vector (&flag_instrument_functions_exclude_files, arg); break; diff --git a/gcc/recog.c b/gcc/recog.c index 3ddfd86c635..73d57647877 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see #include "basic-block.h" #include "output.h" #include "reload.h" +#include "target.h" #include "timevar.h" #include "tree-pass.h" #include "df.h" @@ -2898,6 +2899,9 @@ peep2_find_free_register (int from, int to, const char *class_str, /* Don't allocate fixed registers. */ if (fixed_regs[regno]) continue; + /* Don't allocate global registers. */ + if (global_regs[regno]) + continue; /* Make sure the register is of the right class. */ if (! TEST_HARD_REG_BIT (reg_class_contents[cl], regno)) continue; @@ -2907,6 +2911,9 @@ peep2_find_free_register (int from, int to, const char *class_str, /* And that we don't create an extra save/restore. */ if (! call_used_regs[regno] && ! df_regs_ever_live_p (regno)) continue; + if (! targetm.hard_regno_scratch_ok (regno)) + continue; + /* And we don't clobber traceback for noreturn functions. */ if ((regno == FRAME_POINTER_REGNUM || regno == HARD_FRAME_POINTER_REGNUM) && (! reload_completed || frame_pointer_needed)) diff --git a/gcc/reload.c b/gcc/reload.c index e426d3634f6..5a128f9fb81 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -6049,7 +6049,6 @@ find_reloads_subreg_address (rtx x, int force_replace, int opnum, unsigned inner_size = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))); int offset; rtx orig = tem; - enum machine_mode orig_mode = GET_MODE (orig); int reloaded; /* For big-endian paradoxical subregs, SUBREG_BYTE does not @@ -6095,7 +6094,9 @@ find_reloads_subreg_address (rtx x, int force_replace, int opnum, /* For some processors an address may be valid in the original mode but not in a smaller mode. For example, ARM accepts a scaled index register in - SImode but not in HImode. find_reloads_address + SImode but not in HImode. Similarly, the address may + have been valid before the subreg offset was added, + but not afterwards. find_reloads_address assumes that we pass it a valid address, and doesn't force a reload. This will probably be fine if find_reloads_address finds some reloads. But if it @@ -6103,7 +6104,6 @@ find_reloads_subreg_address (rtx x, int force_replace, int opnum, valid address into an invalid one. Check for that here. */ if (reloaded != 1 - && strict_memory_address_p (orig_mode, XEXP (tem, 0)) && !strict_memory_address_p (GET_MODE (tem), XEXP (tem, 0))) push_reload (XEXP (tem, 0), NULL_RTX, &XEXP (tem, 0), (rtx*) 0, diff --git a/gcc/target-def.h b/gcc/target-def.h index 7ffb1346021..29ed88873b2 100644 --- a/gcc/target-def.h +++ b/gcc/target-def.h @@ -619,6 +619,10 @@ #define TARGET_INSTANTIATE_DECLS hook_void_void #endif +#ifndef TARGET_HARD_REGNO_SCRATCH_OK +#define TARGET_HARD_REGNO_SCRATCH_OK default_hard_regno_scratch_ok +#endif + /* C specific. */ #ifndef TARGET_C_MODE_FOR_SUFFIX #define TARGET_C_MODE_FOR_SUFFIX default_mode_for_suffix @@ -846,6 +850,7 @@ TARGET_SECONDARY_RELOAD, \ TARGET_EXPAND_TO_RTL_HOOK, \ TARGET_INSTANTIATE_DECLS, \ + TARGET_HARD_REGNO_SCRATCH_OK, \ TARGET_C, \ TARGET_CXX, \ TARGET_EMUTLS, \ diff --git a/gcc/target.h b/gcc/target.h index 11852430c8d..d1642ef9497 100644 --- a/gcc/target.h +++ b/gcc/target.h @@ -872,6 +872,10 @@ struct gcc_target but will be later. */ void (* instantiate_decls) (void); + /* Return true if is OK to use a hard register REGNO as scratch register + in peephole2. */ + bool (* hard_regno_scratch_ok) (unsigned int regno); + /* Functions specific to the C family of frontends. */ struct c { /* Return machine mode for non-standard suffix diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 7e931c5ed9d..1cb561480b8 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -703,4 +703,10 @@ default_builtin_vector_alignment_reachable (const_tree type, bool is_packed) return true; } +bool +default_hard_regno_scratch_ok (unsigned int regno ATTRIBUTE_UNUSED) +{ + return true; +} + #include "gt-targhooks.h" diff --git a/gcc/targhooks.h b/gcc/targhooks.h index 5aebc7e667b..4ad0fc86805 100644 --- a/gcc/targhooks.h +++ b/gcc/targhooks.h @@ -97,3 +97,5 @@ extern int default_reloc_rw_mask (void); extern tree default_mangle_decl_assembler_name (tree, tree); extern tree default_emutls_var_fields (tree, tree *); extern tree default_emutls_var_init (tree, tree, tree); + +extern bool default_hard_regno_scratch_ok (unsigned int); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f73e0443f8a..3e7162570e1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,134 @@ +2008-07-14 Eric Botcazou <ebotcazou@adacore.com> + + * case_optimization1.ad[sb]: New test. + * case_optimization_pkg1.ads: New helper. + +2008-07-14 Jakub Jelinek <jakub@redhat.com> + + PR target/36745 + * g++.dg/torture/pr36745.C: Use __SIZE_TYPE__ in size_t typedef. + +2008-07-14 Andreas Krebbel <krebbel1@de.ibm.com> + + PR target/36745 + * g++.dg/torture/pr36745.C: New testcase. + +2008-07-14 Ben Elliston <bje@au.ibm.com> + + * gcc.target/powerpc/altivec-macros.c: New test. + * gcc.target/powerpc/altviec-26.c: Likewise. + * gcc.dg/vmx/1b-06.c: Remove bool variable. + * gcc.dg/vmx/1b-07.c: Likewise. + * gcc.dg/vmx/1b-06-ansi.c: New test for the pre-define method. + * gcc.dg/vmx/1b-07-ansi.c: Likewise. + +2008-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR fortran/36725 + gfortran.dg/fmt_go_4.f08: New test. + +2008-07-14 Hans-Peter Nilsson <hp@axis.com> + + PR target/35492 + * gcc.c-torture/compile/pr35492.c: New test. + +2008-07-12 Daniel Kraft <d@domob.eu> + + * gfortran.dg/used_types_21.f90: New test. + +2008-07-11 Ian Lance Taylor <iant@google.com> + + * gcc.dg/Wcxx-compat-2.c: New test. + +2008-07-11 Dodji Seketeli <dseketel@redhat.com> + + PR c++/13101 + * g++.dg/parse/func-ptr-decl.C: New test. + * gcc/testsuite/g++.old-deja/g++.jason/crash11.C: Update this to + catch a warning that is generated by virtue of fixing this bug. + +2008-07-11 Dodji Seketeli <dseketel@redhat.com> + + * g++.dg/other/semicolon.C: Tighten this test, making it column aware. + * g++.dg/parse/error15.C: update this because of more accurate column + numbers in error reporting. + * g++.old-deja/g++.brendan/crash16.C: Tighten the test, making it + column aware. + * g++.old-deja/g++.law/ctors5.C: Likewise. + * g++.old-deja/g++.other/crash25.C: Likewise. + +2008-06-30 Dodji Seketeli <dseketel@redhat.com> + + * g++.dg/parse/constructor1.C, g++.dg/parse/error*.C: Update these + tests to make them catch column number regressions. Make these tests + run with the -fshow-column option. + * g++.dg/parse/error-column.C: new column number test. + +2008-07-11 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/36765 + * gcc.c-torture/execute/pr36765.c: New testcase. + +2008-07-10 Joseph Myers <joseph@codesourcery.com> + + PR middle-end/29056 + * gcc.target/powerpc/ppc-negeq0-1.c: Use long instead of int. + Adjust shift and scan-assembler-not pattern to allow for 64-bit + case. + +2008-07-10 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/36790 + * gcc.dg/gomp/pr36790.c: New test. + * g++.dg/gomp/pr36790.C: New test. + + PR rtl-optimization/36419 + * g++.dg/eh/async-unwind1.C: New test. + +2008-07-10 Peter Maydell <pmaydell@chiark.greenend.org.uk> + + PR other/28322 + * gcc.dg/pr28322-2.c: Check that emitted diagnostic for -Wno-foobar + is a warning and not an error. + +2008-07-09 Ian Lance Taylor <iant@google.com> + + * gcc.dg/no-asm-1.c: New test. + * gcc.dg/no-asm-2.c: New test. + * gcc.dg/no-asm-3.c: New test. + * gcc.dg/no-asm-4.c: New test. + * g++.dg/ext/no-asm-1.C: New test. + * g++.dg/ext/no-asm-2.C: New test. + * g++.dg/ext/no-gnu-keywords-1.C: New test. + +2008-07-09 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/36760 + * g++.dg/warn/Wreturn-type-4.C: Adjust. + +2008-07-09 Richard Sandiford <rdsandiford@googlemail.com> + + PR target/35802 + * gcc.target/mips/pr35802.c: New test. + +2008-07-09 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/36760 + * g++.dg/warn/pragma-system_header5.C: New. + * g++.dg/warn/pragma-system_header5.h: Likewise. + +2008-07-09 Raksit Ashok <raksit@google.com> + + * gcc.dg/wdisallowed-functions-1.c: New test. + * gcc.dg/wdisallowed-functions-2.c: New test. + * g++.dg/warn/Wdisallowed-functions-1.C: New test. + * g++.dg/warn/Wdisallowed-functions-2.C: New test. + +2008-07-08 Simon Martin <simartin@users.sourceforge.net> + + PR c++/34963 + * g++.dg/parse/dtor13.C: New test. + 2008-07-07 H.J. Lu <hongjiu.lu@intel.com> * gcc.dg/compat/struct-layout-1_generate.c (vector_types): Add diff --git a/gcc/testsuite/g++.dg/eh/async-unwind1.C b/gcc/testsuite/g++.dg/eh/async-unwind1.C new file mode 100644 index 00000000000..69b2c345e75 --- /dev/null +++ b/gcc/testsuite/g++.dg/eh/async-unwind1.C @@ -0,0 +1,61 @@ +// PR rtl-optimization/36419 +// { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } +// { dg-options "-Os -fasynchronous-unwind-tables -mpreferred-stack-boundary=4" } + +extern "C" void abort (); + +int v = -1; +unsigned int n; + +__attribute__((noinline, used)) +void foo (int a, int) +{ + if (v < 0) + v = ((unsigned long) &a) & 15; + else if ((((unsigned long) &a) & 15) != v) + abort (); + if (n++ == 0) + throw 1; +} + +__attribute__((noinline, used)) +void baz (int a, int, int, int, int, int, int) +{ + if (v < 0) + v = ((unsigned long) &a) & 15; + else if ((((unsigned long) &a) & 15) != v) + abort (); + if (n++ == 0) + throw 1; +} + +struct A { A () { }; ~A (); char c[24]; }; + +__attribute__((noinline)) +A::~A () +{ + asm volatile ("" : : : "memory"); +} + +__attribute__((noinline)) +void bar () +{ + A a; + try + { + foo (1, 2); + baz (3, 4, 5, 6, 7, 8, 9); + } + catch (...) + { + } + foo (1, 2); + baz (3, 4, 5, 6, 7, 8, 9); +} + +int +main () +{ + bar (); + return 0; +} diff --git a/gcc/testsuite/g++.dg/ext/no-asm-1.C b/gcc/testsuite/g++.dg/ext/no-asm-1.C new file mode 100644 index 00000000000..6c4c2043959 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/no-asm-1.C @@ -0,0 +1,10 @@ +// { dg-do compile } +// { dg-options "" } + +// Verify that asm and the GNU extension typeof are recognized as +// keywords. + +int asm; // { dg-error "before .asm." } +int typeof; // { dg-error "expected" } +// { dg-error "multiple types" "" { target *-*-* } 8 } +// { dg-error "declaration" "" { target *-*-* } 8 } diff --git a/gcc/testsuite/g++.dg/ext/no-asm-2.C b/gcc/testsuite/g++.dg/ext/no-asm-2.C new file mode 100644 index 00000000000..fa614d8e24e --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/no-asm-2.C @@ -0,0 +1,10 @@ +// { dg-do compile } +// { dg-options "-fno-asm" } + +// Verify that the keyword asm and the GNU extension typeof are not +// recognized as keywords when using -fno-asm. Having -fno-asm affect +// a standard C++ keyword seems strange, but that is existing +// behaviour. If that behaviour changes, this test should change. + +int asm; // { dg-bogus "before .asm." } +int typeof; // { dg-bogus "before .typeof." } diff --git a/gcc/testsuite/g++.dg/ext/no-gnu-keywords-1.C b/gcc/testsuite/g++.dg/ext/no-gnu-keywords-1.C new file mode 100644 index 00000000000..8dbbd5f3482 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/no-gnu-keywords-1.C @@ -0,0 +1,9 @@ +// { dg-do compile } +// { dg-options "-fno-gnu-keywords" } + +// Verify that the keyword asm is recognized and that the GNU +// extension typeof is not recognized as a keyword when using +// -fno-gnu-keywords. + +int asm; // { dg-error "before .asm." } +int typeof; // { dg-bogus "before .typeof." } diff --git a/gcc/testsuite/g++.dg/gomp/pr36790.C b/gcc/testsuite/g++.dg/gomp/pr36790.C new file mode 100644 index 00000000000..07e8b105252 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr36790.C @@ -0,0 +1,23 @@ +// PR middle-end/36790 +// { dg-do compile } +// { dg-options "-fopenmp -O2" } + +void +foo (bool b) +{ +} + +void +bar (bool b) +{ + foo (b); + #pragma omp task default (shared) + b = false; +} + +int +main () +{ + bar (false); + return 0; +} diff --git a/gcc/testsuite/g++.dg/other/semicolon.C b/gcc/testsuite/g++.dg/other/semicolon.C index 6bc3d95217b..542d3b7b554 100644 --- a/gcc/testsuite/g++.dg/other/semicolon.C +++ b/gcc/testsuite/g++.dg/other/semicolon.C @@ -1,9 +1,10 @@ // PR c++/18368 // Origin: Chris Lattner <sabre@nondot.org> // { dg-do compile } +// { dg-options "-fshow-column" } struct A { - struct B { int i; } - void foo(); // { dg-error "two or more|return type" } -}; // { dg-error "semicolon is missing" "" { target *-*-* } 8 } + struct B { int i; } // { dg-error "3: error: new types may not be defined in a return type|note: \\(perhaps a semicolon is missing" } + void foo(); // { dg-error "12: error: two or more|return type" } +}; diff --git a/gcc/testsuite/g++.dg/parse/constructor1.C b/gcc/testsuite/g++.dg/parse/constructor1.C index 3011862ffbc..8f222f80b10 100644 --- a/gcc/testsuite/g++.dg/parse/constructor1.C +++ b/gcc/testsuite/g++.dg/parse/constructor1.C @@ -1,4 +1,7 @@ +// { dg-do compile } +// { dg-options "-fshow-column" } + ACE_Process_Descriptor::ACE_Process_Descriptor () : // { dg-error "" } - process_ (0) + process_ (0) // { dg-error "3: error: only constructors take base initializers" } { } diff --git a/gcc/testsuite/g++.dg/parse/dtor13.C b/gcc/testsuite/g++.dg/parse/dtor13.C new file mode 100644 index 00000000000..66cd5f7f34c --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/dtor13.C @@ -0,0 +1,8 @@ +/* PR c++/34963 This used to ICE */ +/* { dg-do "compile" } */ + +struct A +{ + static friend A::~A(); /* { dg-error "storage class specifiers|extra qualification|implicitly friend" } */ +}; + diff --git a/gcc/testsuite/g++.dg/parse/error-column.C b/gcc/testsuite/g++.dg/parse/error-column.C new file mode 100644 index 00000000000..812a499ff4d --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/error-column.C @@ -0,0 +1,9 @@ +// { dg-do compile } +// Make sure column information is correctly shown in error reporting +// { dg-options "-fshow-column" } + + +void foo () +{ + cout << "blah"; // { dg-error "3: error: 'cout'" } +} diff --git a/gcc/testsuite/g++.dg/parse/error1.C b/gcc/testsuite/g++.dg/parse/error1.C index 8756df64592..60e7d6587b3 100644 --- a/gcc/testsuite/g++.dg/parse/error1.C +++ b/gcc/testsuite/g++.dg/parse/error1.C @@ -1,6 +1,7 @@ +// { dg-options "-fshow-column" } struct INCOMPLETE; template <int> struct X { static INCOMPLETE value; }; -template <> INCOMPLETE X<1>::value = 0; // { dg-error "" } +template <> INCOMPLETE X<1>::value = 0; // { dg-error "30: error: variable 'INCOMPLETE X<1>::value' has initializer but incomplete type" } diff --git a/gcc/testsuite/g++.dg/parse/error10.C b/gcc/testsuite/g++.dg/parse/error10.C index 242c421c463..6e46922a115 100644 --- a/gcc/testsuite/g++.dg/parse/error10.C +++ b/gcc/testsuite/g++.dg/parse/error10.C @@ -1,5 +1,5 @@ // PR c++/3478 -// { dg-options "" } +// { dg-options "-fshow-column" } template <typename> struct A { @@ -11,5 +11,9 @@ template <typename T> void foo() enum A<void>::E e1; typename A<T>::E e2; enum A<T>::E e3; - enum typename A<T>::E e4; // { dg-error "" } + enum typename A<T>::E e4; } + +// Here, columns nums are not very accurate either. Still acceptable though +// { dg-error "30: error: invalid type in declaration before ';' token" "" { target *-*-* } { 14 } } +// { dg-error "30: error: two or more data types in declaration of 'e4'" "" { target *-*-* } { 14 } } diff --git a/gcc/testsuite/g++.dg/parse/error11.C b/gcc/testsuite/g++.dg/parse/error11.C index 0a8e2e4fc3d..f7093a8f987 100644 --- a/gcc/testsuite/g++.dg/parse/error11.C +++ b/gcc/testsuite/g++.dg/parse/error11.C @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-options "-fshow-column" }" // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // Try to find out when the digraph '<:' is used as a mistake, and parse it // correctly to avoid cascaded errors. @@ -15,16 +16,16 @@ struct Foo }; void method(void) { - typename Foo<::B>::template Nested<::B> n; // { dg-error "cannot begin|alternate spelling" } + typename Foo<::B>::template Nested<::B> n; // { dg-error "17: error: '<::' cannot begin|17: note: '<:' is an alternate spelling|39: error: '<::' cannot begin|39: note: '<:' is an alternate" } n.template Nested<B>::method(); - n.template Nested<::B>::method(); // { dg-error "cannot begin|alternate spelling" } + n.template Nested<::B>::method(); // { dg-error "22: error: '<::' cannot begin|22: note: '<:' is an alternate" } Nested<B>::method(); - Nested<::B>::method(); // { dg-error "cannot begin|alternate spelling" } + Nested<::B>::method(); // { dg-error "11: error: '<::' cannot begin|11: note: '<:' is an alternate" } } }; template <int N> struct Foo2 {}; -template struct Foo2<::B>; // { dg-error "cannot begin|alternate spelling|type/value mismatch|expected a constant" } +template struct Foo2<::B>; // { dg-error "21: error: '<::' cannot begin|21: note: '<:' is an alternate|25: error: type/value mismatch|25: error: expected a constant" } int value = 0; @@ -32,22 +33,28 @@ void func(void) { Foo<::B> f; // { dg-error "cannot begin|alternate spelling" } f.Foo<B>::method(); - f.Foo<::B>::method(); // { dg-error "cannot begin|alternate spelling" } + f.Foo<::B>::method(); // { dg-error "8: error|8: note" } // Check cases where we the token sequence is the correct one, but there // was no digraph or whitespaces in the middle, so we should not emit // the special error message. Foo<: :B> k2; // { dg-bogus "cannot begin|alternate spelling" "smart error should not be triggered here" } Foo[:B> k1; // { dg-bogus "cannot begin|alternate spelling" "smart error should not be triggered here" } -// { dg-error "" "" { target *-*-* } 40 } -// { dg-error "" "" { target *-*-* } 41 } - +// { dg-error "6: error: missing template arguments before" "" { target *-*-* } { 41 } } +// { dg-error "9: error: expected primary-expression before ':' token" "" { target *-*-* } 41 } +// { dg-error "9: error: expected '\]' before ':' token" "" { target *-*-* } 41 } +// { dg-error "9: error: expected ';' before ':' token" "" { target *-*-* } 41 } +// { dg-error "6: error: missing template arguments before" "" { target *-*-* } 42 } +// { dg-error "7: error: expected primary-expression before ':' token" "" { target *-*-* } 42 } +// { dg-error "7: error: expected '\]' before ':' token" "" { target *-*-* } 42 } +// { dg-error "7: error: expected ';' before ':' token" "" { target *-*-* } 42 } +// int Foo[2]; Foo[::value] = 0; } -template struct Foo<::B>; // { dg-error "cannot begin|alternate spelling" } +template struct Foo<::B>; // { dg-error "20: error: '<::' cannot begin|20: note: '<:' is an alternate" } // On the first error message, an additional note about the use of // -fpermissive should be present -// { dg-error "-fpermissive" "-fpermissive" { target *-*-* } 18 } +// { dg-error "17: note: \\(if you use '-fpermissive' G\\+\\+ will accept your code\\)" "-fpermissive" { target *-*-* } 19 } diff --git a/gcc/testsuite/g++.dg/parse/error12.C b/gcc/testsuite/g++.dg/parse/error12.C index ea04fd06d11..b0025885bf4 100644 --- a/gcc/testsuite/g++.dg/parse/error12.C +++ b/gcc/testsuite/g++.dg/parse/error12.C @@ -1,7 +1,7 @@ // { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // Make sure the error about '<:' can be turned into a warning -// { dg-options "-fpermissive" } +// { dg-options "-fpermissive -fshow-column" } struct B; @@ -9,4 +9,5 @@ template <class A> struct Foo {}; Foo<::B> foo; // { dg-bogus "error" "error in place of warning" } -// { dg-error "" "" { target *-*-* } 11 } +// { dg-error "4: warning: '<::' cannot begin a template-argument list" "warning <::" { target *-*-* } 11 } +// { dg-error "4: note: '<:' is an alternate spelling for '.'. Insert whitespace between '<' and '::'" "note <:" { target *-*-* } 11 } diff --git a/gcc/testsuite/g++.dg/parse/error13.C b/gcc/testsuite/g++.dg/parse/error13.C index 15642e39ed7..94ddae89705 100644 --- a/gcc/testsuite/g++.dg/parse/error13.C +++ b/gcc/testsuite/g++.dg/parse/error13.C @@ -1,13 +1,14 @@ +// { dg-options "-fshow-column" } // PR c++/13975 -public: // { dg-error "" } +public: // { dg-error "1: error: expected unqualified-id before 'public'" } int i; -protected: // { dg-error "" } +protected: // { dg-error "1: error: expected unqualified-id before 'protected'" } int j; -private: // { dg-error "" } +private: // { dg-error "1: error: expected unqualified-id before 'private'" } int k; diff --git a/gcc/testsuite/g++.dg/parse/error14.C b/gcc/testsuite/g++.dg/parse/error14.C index 4b230453867..906b98f87e2 100644 --- a/gcc/testsuite/g++.dg/parse/error14.C +++ b/gcc/testsuite/g++.dg/parse/error14.C @@ -1,3 +1,4 @@ +// { dg-options "-fshow-column" } // PR c++/13970 struct X @@ -18,5 +19,5 @@ struct X Zinc<int>( //); // } -}; // { dg-error "" } +}; // { dg-error "2: error: expected '.' at end of input|1: error: expected primary-expression before '.' token|1: error: expected ';' before '.' token|1: error: expected unqualified-id at end of input" } diff --git a/gcc/testsuite/g++.dg/parse/error15.C b/gcc/testsuite/g++.dg/parse/error15.C index b343970336f..5903a585e97 100644 --- a/gcc/testsuite/g++.dg/parse/error15.C +++ b/gcc/testsuite/g++.dg/parse/error15.C @@ -1,5 +1,6 @@ // { dg-do compile } // Contributed by Volker Reichelt <reichelt at gcc dot gnu dot org> +// { dg-options "-fshow-column" } // PR c++/14008: Improve diagnostic on invalid types in declarators. namespace N @@ -9,29 +10,29 @@ namespace N int K; } -N::A f2; // { dg-error "without an argument list" } -N::INVALID f3; // { dg-error "in namespace 'N' does not name a type" } -N::C::INVALID f4; // { dg-error "in class 'N::C' does not name a type" } -N::K f6; // { dg-error "in namespace 'N' does not name a type" } -typename N::A f7; // { dg-error "without an argument list|outside of template" } +N::A f2; // { dg-error "1: error: invalid use of template-name 'N::A' without an argument list" } +N::INVALID f3; // { dg-error "1: error: 'INVALID' in namespace 'N' does not name a type" } +N::C::INVALID f4; // { dg-error "1: error: 'INVALID' in class 'N::C' does not name a type" } +N::K f6; // { dg-error "1: error: 'K' in namespace 'N' does not name a type" } +typename N::A f7; // { dg-error "1: error: using 'typename' outside of template|13: error: invalid use of template-name 'N::A' without an argument list|17: error: invalid type in declaration before ';' token" } struct B { - N::A f2; // { dg-error "without an argument list" } - N::INVALID f3; // { dg-error "in namespace 'N' does not name a type" } - N::C::INVALID f4; // { dg-error "in class 'N::C' does not name a type" } - N::K f6; // { dg-error "in namespace 'N' does not name a type" } - typename N::A f7; // { dg-error "without an argument list|outside of template" } + N::A f2; // { dg-error "3: error: invalid use of template-name 'N::A' without an argument list" } + N::INVALID f3; // { dg-error "3: error: 'INVALID' in namespace 'N' does not name a type" } + N::C::INVALID f4; // { dg-error "3: error: 'INVALID' in class 'N::C' does not name a type" } + N::K f6; // { dg-error "3: error: 'K' in namespace 'N' does not name a type" } + typename N::A f7; // { dg-error "3: error: using 'typename' outside of template|15: error: invalid use of template-name 'N::A' without an argument list" } }; template <int> struct C { - N::A f2; // { dg-error "without an argument list" } - N::INVALID f3; // { dg-error "in namespace 'N' does not name a type" } - N::C::INVALID f4; // { dg-error "in class 'N::C' does not name a type" } - N::K f6; // { dg-error "in namespace 'N' does not name a type" } - typename N::A f7; // { dg-error "without an argument list" } + N::A f2; // { dg-error "3: error: invalid use of template-name 'N::A' without an argument list" } + N::INVALID f3; // { dg-error "3: error: 'INVALID' in namespace 'N' does not name a type" } + N::C::INVALID f4; // { dg-error "3: error: 'INVALID' in class 'N::C' does not name a type" } + N::K f6; // { dg-error "3: error: 'K' in namespace 'N' does not name a type" } + typename N::A f7; // { dg-error "15: error: invalid use of template-name 'N::A' without an argument list" } }; -// { dg-bogus "" "bogus excess errors in declaration" { xfail *-*-* } 16 } +// { dg-bogus "bogus excess errors in declaration" "bogus excess errors in declaration" { xfail *-*-* } 17 } diff --git a/gcc/testsuite/g++.dg/parse/error16.C b/gcc/testsuite/g++.dg/parse/error16.C index 3dc58ad53c0..ddc302c7cd6 100644 --- a/gcc/testsuite/g++.dg/parse/error16.C +++ b/gcc/testsuite/g++.dg/parse/error16.C @@ -1,8 +1,9 @@ +// { dg-options "-fshow-column" } // PR c++/16964 struct A { - struct B {}; // { dg-error "previous" } + struct B {}; // { dg-error "12: error: previous definition of 'struct A::B'" } }; -struct A::B{}; // { dg-error "redefinition" } +struct A::B{}; // { dg-error "11: error: redefinition of 'struct A::B'" } diff --git a/gcc/testsuite/g++.dg/parse/error17.C b/gcc/testsuite/g++.dg/parse/error17.C index 2a8f3f829ca..0e05217c04d 100644 --- a/gcc/testsuite/g++.dg/parse/error17.C +++ b/gcc/testsuite/g++.dg/parse/error17.C @@ -1,8 +1,9 @@ +// { dg-options "-fshow-column" } // PR c++/16965 template <typename T> struct B { - static int Bar(T); // { dg-error "" } + static int Bar(T); // { dg-error "19: error: candidates are: |19: error: " } }; struct D : B<int>, B<char> {}; -int i2 = D::Bar(2); // { dg-error "" } +int i2 = D::Bar(2); // { dg-error "13: error: reference to 'Bar' is ambiguous|10: error: reference to 'Bar' is ambiguous" } diff --git a/gcc/testsuite/g++.dg/parse/error18.C b/gcc/testsuite/g++.dg/parse/error18.C index 363aae99879..926af11eb6a 100644 --- a/gcc/testsuite/g++.dg/parse/error18.C +++ b/gcc/testsuite/g++.dg/parse/error18.C @@ -1,7 +1,8 @@ +// { dg-options "-fshow-column" } // PR c++/16002 void f() { - double Q *= 5.0; // { dg-error "initializer" } + double Q *= 5.0; // { dg-error "12: error: expected initializer before '..' token" } } diff --git a/gcc/testsuite/g++.dg/parse/error19.C b/gcc/testsuite/g++.dg/parse/error19.C index 24a66affdae..b22156a5d71 100644 --- a/gcc/testsuite/g++.dg/parse/error19.C +++ b/gcc/testsuite/g++.dg/parse/error19.C @@ -1,7 +1,8 @@ +// { dg-options "-fshow-column -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long " } // PR C++/17867 struct A -{ // { dg-error "candidate" } +{ // { dg-error "1: note: candidates are:" } A(int); }; @@ -9,5 +10,5 @@ const A& foo(); void bar() { - foo()=A(0); // { dg-error "A" } + foo()=A(0); // { dg-error "12: error: no match for 'operator='" } } diff --git a/gcc/testsuite/g++.dg/parse/error2.C b/gcc/testsuite/g++.dg/parse/error2.C index 8dd1e9d30da..075dcc2b0d1 100644 --- a/gcc/testsuite/g++.dg/parse/error2.C +++ b/gcc/testsuite/g++.dg/parse/error2.C @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-options "-fshow-column" } // Properly print CALL_EXPRs while dumping expressions double g; @@ -7,4 +8,8 @@ int func(double); template <int> struct Foo {}; -Foo<func(g)> f; // { dg-error "" "func(g)" } +Foo<func(g)> f; // { dg-error "5: error: 'int func.double.' cannot appear in a constant-expression" "" { target *-*-* } { 11 } } +// { dg-error "10: error: 'g' cannot appear in a constant-expression" "" { target *-*-* } { 11 } } +// { dg-error "11: error: a function call cannot appear in a constant-expression" "" { target *-*-* } { 11 } } +// { dg-error "12: error: template argument 1 is invalid" "" { target *-*-* } { 11 } } +// { dg-error "15: error: invalid type in declaration before ';' token" "" { target *-*-* } { 11 } } diff --git a/gcc/testsuite/g++.dg/parse/error20.C b/gcc/testsuite/g++.dg/parse/error20.C index ee7390a633c..9564fab757b 100644 --- a/gcc/testsuite/g++.dg/parse/error20.C +++ b/gcc/testsuite/g++.dg/parse/error20.C @@ -1,3 +1,4 @@ +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/17821 struct A { @@ -11,7 +12,7 @@ struct C { }; int main() { C c; - A(c.p.i); // { dg-error "member.*non-class" } + A(c.p.i); // { dg-error "9: error: request for member 'i' in 'c.C::p', which is of non-class type 'B" } return 0; } diff --git a/gcc/testsuite/g++.dg/parse/error21.C b/gcc/testsuite/g++.dg/parse/error21.C index 6e24ae2244e..f60bf2b9c54 100644 --- a/gcc/testsuite/g++.dg/parse/error21.C +++ b/gcc/testsuite/g++.dg/parse/error21.C @@ -1,5 +1,5 @@ // PR c++/17393 -// { dg-options "-Wall" } +// { dg-options "-Wall -fshow-column" } struct A { }; @@ -7,6 +7,6 @@ void foo() { // Check that we do not complain about an unused // compiler-generated variable. - A& = a; // { dg-error "token|declarator|not declared" } + A& = a; // { dg-error "6: error: expected unqualified-id before '=' token|8: error: 'a' was not declared in this scope" } } diff --git a/gcc/testsuite/g++.dg/parse/error22.C b/gcc/testsuite/g++.dg/parse/error22.C index da3a62f788a..30141219abc 100644 --- a/gcc/testsuite/g++.dg/parse/error22.C +++ b/gcc/testsuite/g++.dg/parse/error22.C @@ -1,5 +1,6 @@ +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/15786 struct A { - void foo(bar* p); /* { dg-error "declared" } */ + void foo(bar* p); /* { dg-error "12: error: 'bar' has not been declared" } */ }; diff --git a/gcc/testsuite/g++.dg/parse/error23.C b/gcc/testsuite/g++.dg/parse/error23.C index 7d6fda2cc41..21b24349608 100644 --- a/gcc/testsuite/g++.dg/parse/error23.C +++ b/gcc/testsuite/g++.dg/parse/error23.C @@ -1,7 +1,9 @@ +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/19149 struct QChar { QChar( char c ); QChar( const QChar& c ); - static const ; // { dg-error "" } + //following column number is not accurate enough but will make it for now + static const ; // { dg-error "10: error: declaration does not declare anything" } }; diff --git a/gcc/testsuite/g++.dg/parse/error24.C b/gcc/testsuite/g++.dg/parse/error24.C index c0722504271..e341c341291 100644 --- a/gcc/testsuite/g++.dg/parse/error24.C +++ b/gcc/testsuite/g++.dg/parse/error24.C @@ -1,7 +1,8 @@ +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/19395 struct A { - typedef int ::X; // { dg-error "" } + typedef int ::X; // { dg-error "17: error: typedef name may not be a nested-name-specifier" } }; diff --git a/gcc/testsuite/g++.dg/parse/error25.C b/gcc/testsuite/g++.dg/parse/error25.C index 360b40f2e7e..b5cb57ee1f0 100644 --- a/gcc/testsuite/g++.dg/parse/error25.C +++ b/gcc/testsuite/g++.dg/parse/error25.C @@ -1,4 +1,5 @@ // { dg-do compile } +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // Origin: Steven Bosscher <steven at gcc dot gnu dot org> // PR c++/17401: ICE with invalid pure specifier @@ -8,10 +9,10 @@ class foo { virtual void bar1 () = 0; - virtual void bar2 () = __null; // { dg-error "invalid pure specifier" } - virtual void bar3 () = 4; // { dg-error "invalid pure specifier" } - virtual void bar4 () = A::f; // { dg-error "invalid pure specifier" } - virtual void bar5 () = 0l; // { dg-error "invalid pure specifier" } - virtual void bar6 () = 00; // { dg-error "invalid pure specifier" } - virtual void bar7 () = 0x0; // { dg-error "invalid pure specifier" } + virtual void bar2 () = __null; // { dg-error "32: error: invalid pure specifier" } + virtual void bar3 () = 4; // { dg-error "27: error: invalid pure specifier" } + virtual void bar4 () = A::f; // { dg-error "27: error: invalid pure specifier" } + virtual void bar5 () = 0l; // { dg-error "28: error: invalid pure specifier" } + virtual void bar6 () = 00; // { dg-error "28: error: invalid pure specifier" } + virtual void bar7 () = 0x0; // { dg-error "29: error: invalid pure specifier" } }; diff --git a/gcc/testsuite/g++.dg/parse/error26.C b/gcc/testsuite/g++.dg/parse/error26.C index 6e2b897d92b..81f7ba6d382 100644 --- a/gcc/testsuite/g++.dg/parse/error26.C +++ b/gcc/testsuite/g++.dg/parse/error26.C @@ -1,12 +1,12 @@ // PR c++/20148 -// { dg-options "" } +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } void foo() { - if (({int c[2];})) ; // { dg-error "\{\.\.\.\}" } + if (({int c[2];})) ; // { dg-error "7: error: ISO C.. forbids|20: error: could not convert" } } void bar() { - if (({})); // { dg-error "\{\.\.\.\}" } + if (({})); // { dg-error "7: error: ISO C.. forbids|11: error: could not convert" } } diff --git a/gcc/testsuite/g++.dg/parse/error27.C b/gcc/testsuite/g++.dg/parse/error27.C index f52d3cecce6..f1fd5376e59 100644 --- a/gcc/testsuite/g++.dg/parse/error27.C +++ b/gcc/testsuite/g++.dg/parse/error27.C @@ -1,7 +1,8 @@ +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/20152 -struct KrSelectionMode { virtual void init() = 0; }; // { dg-error "previous definition" } -struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "previous definition" } -struct KrSelectionMode { virtual void init() = 0; }; // { dg-error "" } -struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "" } +struct KrSelectionMode { virtual void init() = 0; }; // { dg-error "24: error: previous definition of 'struct KrSelectionMode'" } +struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "52: error: previous definition of 'struct KrKDESelectionMode'" } +struct KrSelectionMode { virtual void init() = 0; }; // { dg-error "8: error: redefinition of 'struct KrSelectionMode'" } +struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "8: error: redefinition of 'struct KrKDESelectionMode'" } KrKDESelectionMode krKDESelectionMode; diff --git a/gcc/testsuite/g++.dg/parse/error28.C b/gcc/testsuite/g++.dg/parse/error28.C index 046cc501f0b..fd202a10767 100644 --- a/gcc/testsuite/g++.dg/parse/error28.C +++ b/gcc/testsuite/g++.dg/parse/error28.C @@ -1,10 +1,11 @@ +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/21908 struct virt { virt () {} virt (int i) {} }; -struct der : public virtual virt { // { dg-error "der" } - der (int i) : virt(i) {} // { dg-error "der" } +struct der : public virtual virt { // { dg-error "34: note: der::der" } + der (int i) : virt(i) {} // { dg-error "13: note: candidates are: der" } }; struct top : public der { - // { dg-error "der\\(\\)" "" { target *-*-* } 9 } top () {} // { dg-bogus "der\\(const" } }; +// { dg-error "10: error: no matching function for call to 'der" "" { target *-*-* } 9 } diff --git a/gcc/testsuite/g++.dg/parse/error29.C b/gcc/testsuite/g++.dg/parse/error29.C index b50b275a9e6..fcd091b0b65 100644 --- a/gcc/testsuite/g++.dg/parse/error29.C +++ b/gcc/testsuite/g++.dg/parse/error29.C @@ -1,3 +1,4 @@ +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/25637 struct A { @@ -6,7 +7,7 @@ struct A { void operator delete(void *); }; struct B { - friend void A::foo() {} // { dg-error "define" } - friend void A::operator delete(void*) {} // { dg-error "define" } - friend A::A() {} // { dg-error "define" } + friend void A::foo() {} // { dg-error "22: error: cannot define member function 'A::foo' within 'B'" } + friend void A::operator delete(void*) {} // { dg-error "39: error: cannot define member function 'A::operator delete' within 'B'" } + friend A::A() {} // { dg-error "15: error: cannot define member function 'A::A' within 'B'" } }; diff --git a/gcc/testsuite/g++.dg/parse/error3.C b/gcc/testsuite/g++.dg/parse/error3.C index a052346d8ca..1f337e91cde 100644 --- a/gcc/testsuite/g++.dg/parse/error3.C +++ b/gcc/testsuite/g++.dg/parse/error3.C @@ -1,6 +1,19 @@ +// { dg-options "-fshow-column" } // PR c++/10779 static void InstantiateConstraint(const float&, unsigned, - void(*AddFunction)(const TYPE&,bool&, // { dg-error "" } + void(*AddFunction)(const TYPE&,bool&, char*, char*, - unsigned*)); // { dg-error "" } + unsigned*)); +// { dg-error "64: error: expected ',' or '...' before '&' token" "" { target *-*-* } { 5 } } + +/// in the coming test, the column information is broken as it points to +// the end of the declaration instead of pointing to the begining of the +// 'TYPE' identifier. This is due to the warning being generated by the +// declaration groking code (gcc/cp/decl.c) and not the parser. So in that +// code, the exact token location information is lost as the declaration +// groking code manipulates TREEs only. The token location used is then +// the global one that is not accurate enough. Anyway, let's say it is +// good enough for now, until we find a way to propagate token location to +// code paths that manipulate TREEs only. +// { dg-error "64: error: ISO C\\+\\+ forbids declaration of 'TYPE' with no type" "" { target *-*-* } { 7 } } diff --git a/gcc/testsuite/g++.dg/parse/error30.C b/gcc/testsuite/g++.dg/parse/error30.C index 734a2552cb4..5c52d1ee67a 100644 --- a/gcc/testsuite/g++.dg/parse/error30.C +++ b/gcc/testsuite/g++.dg/parse/error30.C @@ -1,5 +1,6 @@ // PR c++/30854 // { dg-do compile } +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } struct A { @@ -7,5 +8,5 @@ struct A A(int); }; -A a = -A(); // { dg-error "no match for.*operator-.*in.*-A\\(\\)" } -A b = -A(5); // { dg-error "no match for.*operator-.*in.*-A\\(5\\)" } +A a = -A(); // { dg-error "10: error: no match for.*operator-.*in.*-A\\(\\)" } +A b = -A(5); // { dg-error "11: error: no match for.*operator-.*in.*-A\\(5\\)" } diff --git a/gcc/testsuite/g++.dg/parse/error31.C b/gcc/testsuite/g++.dg/parse/error31.C index 5264f442b31..d354cc3e0dd 100644 --- a/gcc/testsuite/g++.dg/parse/error31.C +++ b/gcc/testsuite/g++.dg/parse/error31.C @@ -1,10 +1,12 @@ +// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" } // PR c++/32190 template<typename T> class foo{ }; int main() { foo<int> i; - foo<foo<int> j; // { dg-error "template argument" } + // this column number is not accurate yet, but that will make it for now. + foo<foo<int> j; // { dg-error "18: error: template argument 1 is invalid" } int k; int l; foo<int> m; diff --git a/gcc/testsuite/g++.dg/parse/error4.C b/gcc/testsuite/g++.dg/parse/error4.C index aa1bfad0dc9..790e5c9a40b 100644 --- a/gcc/testsuite/g++.dg/parse/error4.C +++ b/gcc/testsuite/g++.dg/parse/error4.C @@ -1,7 +1,10 @@ // PR c++/12160 +// { dg-options "-fshow-column" } -struct X { - virtual void f(int, - itn, // { dg-error "declared" } +struct X { + virtual void f(int, + itn, int); -}; +}; + +// { dg-error "4: error: 'itn' has not been declared" "" { target *-*-* } { 6 } } diff --git a/gcc/testsuite/g++.dg/parse/error5.C b/gcc/testsuite/g++.dg/parse/error5.C index 81356ced1b0..8c9a039ac3c 100644 --- a/gcc/testsuite/g++.dg/parse/error5.C +++ b/gcc/testsuite/g++.dg/parse/error5.C @@ -1,4 +1,19 @@ // PR c++/13269 +// { dg-options "-fshow-column" } -class Foo { int foo() return 0; } }; // { dg-error "" } +class Foo { int foo() return 0; } }; + +// { dg-error "30: error: expected identifier before numeric constant" "" { target *-*-* } { 4 } } + +// { dg-error "23: error: named return values are no longer supported" "" { target *-*-* } { 4 } } + +// the column number info of this error output is still wrong because the error +// message has been generated by cp_parser_error() which does not +// necessarily allow accurate column number display. At some point, we will +// need make cp_parser_error() report more accurate column numbers. +// { dg-error "30: error: expected '\{' at end of input" "" { target *-*-* } { 4 } } + +// { dg-error "35: error: expected unqualified-id before '\}' token" "" {target *-*-* } { 4 } } + +// { dg-error "35: error: expected declaration before '\}' token" "" {target *-*-* } { 4 } } diff --git a/gcc/testsuite/g++.dg/parse/error6.C b/gcc/testsuite/g++.dg/parse/error6.C index 3a1666995eb..cd1b6b8cd33 100644 --- a/gcc/testsuite/g++.dg/parse/error6.C +++ b/gcc/testsuite/g++.dg/parse/error6.C @@ -1,6 +1,11 @@ // PR c++/10603 +// { dg-options "-fshow-column" } -int f(int not) { // { dg-error "!" } - return 1-not; // { dg-error "" } +int f(int not) { + return 1-not; } +// { dg-error "11: error: expected ',' or '...' before '!' token" "" { target *-*-* } { 4 } } + +// { dg-error "15: error: expected primary\\-expression before ';' token" "" { target *-*-* } { 5 } } + diff --git a/gcc/testsuite/g++.dg/parse/error7.C b/gcc/testsuite/g++.dg/parse/error7.C index 50e7f84dca5..f71c9aa9fa0 100644 --- a/gcc/testsuite/g++.dg/parse/error7.C +++ b/gcc/testsuite/g++.dg/parse/error7.C @@ -1,4 +1,7 @@ // PR c++/12827 +// { dg-options "-fshow-column" } void f(int x - int y); // { dg-error "," } + int y); + +// { dg-error "8: error: expected ',' or '...' before 'int'" "" { target *-*-* } { 5 } } diff --git a/gcc/testsuite/g++.dg/parse/error8.C b/gcc/testsuite/g++.dg/parse/error8.C index 125f2e42c6b..a399cfe63f7 100644 --- a/gcc/testsuite/g++.dg/parse/error8.C +++ b/gcc/testsuite/g++.dg/parse/error8.C @@ -1,4 +1,10 @@ // PR c++/13438 +// { dg-options "-fshow-column" } -struct A { friend typename struct B; }; // { dg-error "" } - +struct A { friend typename struct B; }; + + +// { dg-error "19: error: using 'typename' outside of template" "" { target *-*-* } { 4 } } +// { dg-error "28: error: expected nested-name-specifier before 'struct'" "" { target *-*-* } { 4 } } +// { dg-error "35: error: multiple types in one declaration" "" { target *-*-* } { 4 } } +// { dg-error "12: error: friend declaration does not name a class or function" "" { target *-*-* } { 4 } } diff --git a/gcc/testsuite/g++.dg/parse/error9.C b/gcc/testsuite/g++.dg/parse/error9.C index aa9109fd22b..c1be6979b47 100644 --- a/gcc/testsuite/g++.dg/parse/error9.C +++ b/gcc/testsuite/g++.dg/parse/error9.C @@ -1,5 +1,9 @@ // PR c++/12613 -// { dg-options "" } +// { dg-options "-fshow-column" } enum { FOO = 1, BAR = 2 }; -int a[] = { FOO: 1, BAR: 2 }; // { dg-error "" } +int a[] = { FOO: 1, BAR: 2 }; + +// the following 2 column locations are still not accurate enough +// { dg-error "28: error: name 'FOO' used in a GNU-style designated initializer for an array" "" { target *-*-* } { 5 } } +// { dg-error "28: error: name 'BAR' used in a GNU-style designated initializer for an array" "" { target *-*-* } { 5 } } diff --git a/gcc/testsuite/g++.dg/torture/pr36745.C b/gcc/testsuite/g++.dg/torture/pr36745.C new file mode 100644 index 00000000000..86047f1f0d8 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr36745.C @@ -0,0 +1,121 @@ +/* PR target/36745 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fPIC" } */ +/* { dg-require-effective-target fpic } */ + +typedef __SIZE_TYPE__ size_t; +class QBasicAtomicInt +{ +public: + int _q_value; + inline bool operator== (int value) const + { + } + bool ref (); + bool deref (); +}; +inline bool +QBasicAtomicInt::ref () +{ + __asm__ ("": "=m" (_q_value): :); + return true; +} + +namespace std +{ + using::size_t; +} +extern "C++" +{ + inline void *operator new (std::size_t, void *__p) + { + return __p; + } +} +struct QMapData +{ + QBasicAtomicInt ref; + static QMapData shared_null; +}; +template < class Key, class T > class QMap +{ + QMapData *d; +public: inline QMap ():d (&QMapData::shared_null) + { + } + inline ~ QMap () + { + if (!d->ref.deref ()) + freeData (d); + } + void freeData (QMapData * d); +}; +struct QVectorData +{ + static QVectorData shared_null; +}; +template < typename T > struct QVectorTypedData +{ + QBasicAtomicInt ref; +}; +template < typename T > class QVector +{ + union + { + QVectorData *p; + QVectorTypedData < T > *d; + }; +public: inline QVector ():p (&QVectorData::shared_null) + { + d->ref.ref (); + } + inline void detach () + { + if (d->ref == 1) + detach_helper (); + } + inline T *data () + { + detach (); + } + T & operator[](int i); + void detach_helper (); + void realloc (); +}; +template < typename T > void QVector < T >::detach_helper () +{ + realloc (); +} + +template < typename T > inline T & QVector < T >::operator[](int i) +{ + return data ()[i]; +} +template < typename T > void QVector < T >::realloc () +{ + T *j, *i; + i->~T (); + while (j-- == i) + new (j) T; +} + +void +mergeInto (QVector < int >*a) +{ +}; +struct QRegExpAutomatonState +{ + QVector < int >outs; + QMap < int, int >reenter; + QMap < int, int >anchors; +}; +class QRegExpEngine +{ + void addCatTransitions (); + QVector < QRegExpAutomatonState > s; +}; +void +QRegExpEngine::addCatTransitions () +{ + mergeInto (&s[2].outs); +} diff --git a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C new file mode 100644 index 00000000000..39760950d69 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-Wdisallowed-function-list=foobar" } */ + +int foobar (int i) +{ + return (i * 5); +} diff --git a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C new file mode 100644 index 00000000000..ca5aab0e50d --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-Wdisallowed-function-list=foo,foobar,bar,foobar" } */ + +int foobar (int i) +{ + return (i * 5); +} + +int foobar1 (int i) +{ + return foobar (i); /* { dg-warning "disallowed call to 'foobar'" } */ +} diff --git a/gcc/testsuite/g++.dg/warn/Wreturn-type-4.C b/gcc/testsuite/g++.dg/warn/Wreturn-type-4.C index 20c34a836a9..4f02678e7f9 100644 --- a/gcc/testsuite/g++.dg/warn/Wreturn-type-4.C +++ b/gcc/testsuite/g++.dg/warn/Wreturn-type-4.C @@ -16,7 +16,7 @@ template<typename T> const T getfoo(const T def) /* { dg-bogus "type qualifiers template<typename T> class Pair { public: - T getLeft() const { return T(); } /* { dg-warning "type qualifiers ignored" } */ + T getLeft() const { return T(); } /* { dg-bogus "type qualifiers ignored" } */ const T getRight() const { return T(); } /* { dg-bogus "type qualifiers ignored" } */ }; diff --git a/gcc/testsuite/g++.dg/warn/pragma-system_header5.C b/gcc/testsuite/g++.dg/warn/pragma-system_header5.C new file mode 100644 index 00000000000..771db3d7ce7 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/pragma-system_header5.C @@ -0,0 +1,10 @@ +// PR c++/36760 +// { dg-options "-Wextra" } + +#include "pragma-system_header5.h" + +void f() +{ + g<const double>(); + g<volatile void>(); +} diff --git a/gcc/testsuite/g++.dg/warn/pragma-system_header5.h b/gcc/testsuite/g++.dg/warn/pragma-system_header5.h new file mode 100644 index 00000000000..5732e4afd3a --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/pragma-system_header5.h @@ -0,0 +1,3 @@ +#pragma GCC system_header + +template <typename T> T g(); diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash16.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash16.C index 7151eb13618..ddcae3c97cb 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash16.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash16.C @@ -1,12 +1,14 @@ // { dg-do compile } +// { dg-options "-fshow-column" } // GROUPS passed old-abort -class Graph { + +class Graph { // { dg-error "1: error: new types|1: note: \\(perhaps" } public: unsigned char N; - Graph(void) {} // { dg-error "previously defined here" } + Graph(void) {} // { dg-error "17: error: 'Graph" } } -Graph::Graph(void) // { dg-error "return type|redefinition|semicolon" } +Graph::Graph(void) // { dg-error "18: error: return type|18: error: redefinition" } { N = 10; } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash11.C b/gcc/testsuite/g++.old-deja/g++.jason/crash11.C index e88eb78d53e..5cc8e5f3d6b 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash11.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/crash11.C @@ -6,4 +6,4 @@ struct A { }; const char foo[] = "bar"; const A a = { foo }; -extern const A* ap = &a; +extern const A* ap = &a; //{ dg-warning "warning: 'ap' initialized and declared 'extern'" } diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C index 334b59781b1..1f469cf5d49 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C @@ -1,11 +1,12 @@ // { dg-do assemble } +// { dg-options "-fshow-column" } // GROUPS passed constructors // ctors file // Subject: bug in handling static const object of the enclosing class // Date: Tue, 1 Sep 92 10:38:44 EDT class X -{ // { dg-error "X::X" } implicit constructor +{ // { dg-error "1: note: X::X\\(const X&\\)" } implicit constructor private: int x; public: @@ -13,21 +14,21 @@ class X X( int ); }; -class Y +class Y // { dg-error "1: error: new types may not be defined in a return type|1: note: \\(perhaps a semicolon is missing after the definition of 'Y'\\)" } { private: X xx; public: Y(); } -X::X( int xi ) // { dg-error "return type|X::X|semicolon" } +X::X( int xi ) // { dg-error "14: error: return type specification for constructor invalid|14: note: candidates are: X::X\\(int\\)" } { x = xi; } const X X::x0( 0 ); -Y::Y() // { dg-error "no match" } +Y::Y() // { dg-error "6: error: no matching function for call to 'X::X\\(\\)'" } { xx = X::x0; } diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash25.C b/gcc/testsuite/g++.old-deja/g++.other/crash25.C index b8417e8512e..517bac2d5d6 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/crash25.C +++ b/gcc/testsuite/g++.old-deja/g++.other/crash25.C @@ -1,16 +1,17 @@ // { dg-do assemble } +// { dg-options "-fshow-column" } // Origin: Jakub Jelinek <jakub@redhat.com> -class X { +class X { // { dg-error "1: error: new types may not be defined in a return type|1: note: \\(perhaps a semicolon is missing after the definition of 'X'\\)" } public: X(); virtual ~X(); } -X::x() // { dg-error "return type|member function|semicolon" } +X::x() // { dg-error "6: error: no 'X X::x\\(\\)' member function declared in class 'X'" } { } -X::~x() // { dg-error "expected class-name" } +X::~x() // { dg-error "6: error: expected class-name before '\\(' token" } { } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C b/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C index 42a21fcb072..7fe07a2df0e 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/niklas01a.C @@ -1,8 +1,9 @@ // { dg-do assemble } +// { dg-options "-fshow-column" } struct A { // { dg-error "" } forward declaration - friend struct B : A { // { dg-error "" } + friend struct B : A { // { dg-error "invalid use of incomplete type 'struct A'" } int x; - }; // { dg-error "" } class definition cannot be a friend + }; // { dg-error "class definition may not be declared a friend" "" { target *-*-* } { 5 } } int y; }; diff --git a/gcc/testsuite/gcc.c-torture/compile/20080704-1.c b/gcc/testsuite/gcc.c-torture/compile/20080704-1.c new file mode 100644 index 00000000000..9ca457cb952 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20080704-1.c @@ -0,0 +1,43 @@ +/* This code used to crash fold_convert due to PRE + wanting to fold_convert from a REA_TYPE to an INTEGER_TYPE. */ +typedef unsigned int uint32_t; +union double_union +{ + double d; + uint32_t i[2]; +}; +struct _Jv_reent +{ + int _errno; +}; +_Jv_strtod_r (struct _Jv_reent *ptr, char **se) +{ + int bb2, sign; + double aadj, aadj1, adj; + unsigned long y, z; + union double_union rv, *bs = ((void *) 0), *delta = ((void *) 0); + { + ovfl:ptr->_errno = 34; + { + (((uint32_t) 0xfffffL) | ((uint32_t) 0x100000L) * (1024 + 1023 - 1)); + } + if ((aadj = _Jv_ratio (delta, bs)) <= 2.) + { + { + if (aadj < 2. / 2) + aadj = 1. / 2; + aadj1 = -aadj; + } + } + { + (rv.i[1]) -= 53 * ((uint32_t) 0x100000L); + adj = aadj1 * _Jv_ulp (rv.d); + rv.d += adj; + if (((rv.i[1]) & ((uint32_t) 0x7ff00000L)) >= + ((uint32_t) 0x100000L) * (1024 + 1023 - 53)) + { + goto ovfl; + } + } + } +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35492.c b/gcc/testsuite/gcc.c-torture/compile/pr35492.c new file mode 100644 index 00000000000..a1681f0a09d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr35492.c @@ -0,0 +1,26 @@ +void prepare_to_wait (void *, void *, int); +void finish_wait (void *, void *); +extern signed long schedule_timeout (signed long); +struct sock +{ + unsigned char skc_state; + void *sk_sleep; + int sk_err; +}; + +void +sk_stream_wait_connect (struct sock *sk, long *timeo_p) +{ + int done; + int wait; + do + { + if ((1 << sk->skc_state) & ~12) + return; + prepare_to_wait (sk->sk_sleep, &wait, 1); + *(timeo_p) = schedule_timeout (0); + done = !sk->sk_err; + finish_wait (sk->sk_sleep, &wait); + } + while (!done); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr36765.c b/gcc/testsuite/gcc.c-torture/execute/pr36765.c new file mode 100644 index 00000000000..6883b0cfd75 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr36765.c @@ -0,0 +1,15 @@ +int __attribute__((noinline)) +foo(int i) +{ + int *p = __builtin_malloc (4 * sizeof(int)); + *p = 0; + p[i] = 1; + return *p; +} +extern void abort (void); +int main() +{ + if (foo(0) != 1) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/Wcxx-compat-2.c b/gcc/testsuite/gcc.dg/Wcxx-compat-2.c new file mode 100644 index 00000000000..5a46fbe4bd5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wcxx-compat-2.c @@ -0,0 +1,35 @@ +/* { dg-options "-Wc++-compat" } */ + +int bool; +int catch; +int char16_t; +int char32_t; +int class; +int const_cast; /* { dg-warning "keyword" } */ +int decltype; +int delete; +int dynamic_cast; /* { dg-warning "keyword" } */ +int explicit; +int export; +int false; +int friend; +int mutable; /* { dg-warning "keyword" } */ +int namespace; +int new; +int operator; +int private; +int protected; +int public; +int reinterpret_cast; /* { dg-warning "keyword" } */ +int static_assert; /* { dg-warning "keyword" } */ +int static_cast; /* { dg-warning "keyword" } */ +int template; +int this; +int throw; +int true; +int try; +int typename; +int typeid; +int using; +int virtual; +int wchar_t; diff --git a/gcc/testsuite/gcc.dg/gomp/pr36790.c b/gcc/testsuite/gcc.dg/gomp/pr36790.c new file mode 100644 index 00000000000..b3379f1564a --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/pr36790.c @@ -0,0 +1,23 @@ +/* PR middle-end/36790 */ +/* { dg-do compile } */ +/* { dg-options "-fopenmp" } */ + +void +foo (char b) +{ +} + +void +bar (char b) +{ + foo (b); + #pragma omp task default (shared) + b = 0; +} + +int +main () +{ + bar (0); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/no-asm-1.c b/gcc/testsuite/gcc.dg/no-asm-1.c new file mode 100644 index 00000000000..fdcf05459a4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/no-asm-1.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-std=gnu89" } */ + +/* Verify that these GNU extensions are recognized as keywords in + GNU89 mode. */ + +int asm; /* { dg-error "before .asm." } */ +int inline; /* { dg-warning "empty declaration" } */ +/* { dg-error "empty declaration" "" { target *-*-* } 8 } */ +int typeof; /* { dg-error "before .typeof." } */ diff --git a/gcc/testsuite/gcc.dg/no-asm-2.c b/gcc/testsuite/gcc.dg/no-asm-2.c new file mode 100644 index 00000000000..3cd41141de1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/no-asm-2.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=gnu89 -fno-asm" } */ + +/* Verify that these GNU extensions are not recognized as keywords + when using -fno-asm in GNU89 mode. */ + +int asm; /* { dg-bogus "before .asm." } */ +int inline; /* { dg-bogus "empty declaration" } */ +int typeof; /* { dg-bogus "before .typeof." } */ diff --git a/gcc/testsuite/gcc.dg/no-asm-3.c b/gcc/testsuite/gcc.dg/no-asm-3.c new file mode 100644 index 00000000000..9c806e43533 --- /dev/null +++ b/gcc/testsuite/gcc.dg/no-asm-3.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-std=gnu99" } */ + +/* Verify that these GNU extensions are recognized as keywords in + GNU99 mode. */ + +int asm; /* { dg-error "before .asm." } */ +int inline; /* { dg-warning "empty declaration" } */ +/* { dg-error "empty declaration" "" { target *-*-* } 8 } */ +int typeof; /* { dg-error "before .typeof." } */ diff --git a/gcc/testsuite/gcc.dg/no-asm-4.c b/gcc/testsuite/gcc.dg/no-asm-4.c new file mode 100644 index 00000000000..c4c1687800c --- /dev/null +++ b/gcc/testsuite/gcc.dg/no-asm-4.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-std=gnu99 -fno-asm" } */ + +/* Verify that the GNU extensions asm and typeof are not recognized as + keywords when using -fno-asm in GNU89 mode, but that inline (which + is a keyword in C99 but not C89) is recognized. */ + +int asm; /* { dg-bogus "before .asm." } */ +int inline; /* { dg-warning "empty declaration" } */ +/* { dg-error "empty declaration" "" { target *-*-* } 9 } */ +int typeof; /* { dg-bogus "before .typeof." } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loadpre24.c b/gcc/testsuite/gcc.dg/tree-ssa/loadpre24.c index 1e6b954bfa8..31fcc9f8b74 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loadpre24.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loadpre24.c @@ -18,7 +18,7 @@ int foo(int argc) return d + e; } -/* PRE of globals doesn't work. */ +/* We will move the load of a out of the loop. */ -/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre" } } */ /* { dg-final { cleanup-tree-dump "pre" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23455.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23455.c new file mode 100644 index 00000000000..3814d90e373 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23455.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-pre-stats" } */ +unsigned long outcnt; +extern void flush_outbuf(void); + +void +bi_windup(unsigned int *outbuf, unsigned int bi_buf) +{ + unsigned long t1 = outcnt; + outbuf[t1] = bi_buf; + + unsigned long t2 = outcnt; + if (t2 == 16384) + flush_outbuf(); + + unsigned long t3 = outcnt; + outbuf[t3] = bi_buf; +} +/* We should eliminate one load of outcnt, which will in turn let us eliminate + one multiply of outcnt which will in turn let us eliminate + one add involving outcnt and outbuf. */ +/* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "pre"} } */ +/* { dg-final { cleanup-tree-dump "pre" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr35286.c b/gcc/testsuite/gcc.dg/tree-ssa/pr35286.c new file mode 100644 index 00000000000..8601cabeca4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr35286.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-pre-stats" } */ +int g2; +struct A { + int a; int b; +}g1; +int foo(int a, int b) +{ + if (a > 0) + { + g1.a = a+ b; + } + else + g1.a = b; + + g2 = a+b; + + return g1.a; +} +/* We will eliminate the g1.a from the return statement as fully redundant, + and remove one calculation of a + b. */ +/* { dg-final { scan-tree-dump-times "Eliminated: 2" 1 "pre"} } */ +/* { dg-final { cleanup-tree-dump "pre" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr35287.c b/gcc/testsuite/gcc.dg/tree-ssa/pr35287.c new file mode 100644 index 00000000000..1e976628096 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr35287.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-pre-stats" } */ +int *gp; +int foo(int p) +{ + int t = 0; + if (p) + t = *gp + 1; + + return (*gp + t); +} + +/* We will eliminate one load of gp and one indirect load of *gp. */ +/* { dg-final { scan-tree-dump-times "Eliminated: 2" 1 "pre"} } */ +/* { dg-final { cleanup-tree-dump "pre" } } */ diff --git a/gcc/testsuite/gcc.dg/vmx/1b-06-ansi.c b/gcc/testsuite/gcc.dg/vmx/1b-06-ansi.c new file mode 100644 index 00000000000..780a4e6bc68 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vmx/1b-06-ansi.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-ansi -maltivec" } */ + +#include <altivec.h> +vector char bool _4 ; +vector char unsigned _31 ; +vector char signed _59 ; +/* bool is permitted in the predefine method, as it is expanded + unconditionally to int. */ +bool _84 ; +vector pixel _89 ; +vector int bool _95 ; +vector short bool _102 ; +vector unsigned int _122 ; +vector unsigned short _129 ; +vector signed int _150 ; +vector signed short _157 ; +vector int bool _179 ; +vector int short bool _186 ; +vector unsigned int _206 ; +vector int unsigned short _213 ; +vector signed int _234 ; +vector int signed short _241 ; +vector float _339 ; diff --git a/gcc/testsuite/gcc.dg/vmx/1b-06.c b/gcc/testsuite/gcc.dg/vmx/1b-06.c index 84c69813ce4..d25164c3151 100644 --- a/gcc/testsuite/gcc.dg/vmx/1b-06.c +++ b/gcc/testsuite/gcc.dg/vmx/1b-06.c @@ -3,7 +3,6 @@ vector char bool _4 ; vector char unsigned _31 ; vector char signed _59 ; -bool _84 ; vector pixel _89 ; vector int bool _95 ; vector short bool _102 ; diff --git a/gcc/testsuite/gcc.dg/vmx/1b-07-ansi.c b/gcc/testsuite/gcc.dg/vmx/1b-07-ansi.c new file mode 100644 index 00000000000..cfc98639b55 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vmx/1b-07-ansi.c @@ -0,0 +1,59 @@ +/* { dg-do compile } */ +/* { dg-options "-ansi -maltivec" } */ + +#include <altivec.h> +vector char bool _0 ; +vector bool char _8 ; +vector char unsigned _56 ; +vector unsigned char _64 ; +vector char signed _112 ; +vector signed char _120 ; +/* bool is permitted in the predefine method, as it is expanded + unconditionally to int. */ +bool _168 ; +vector pixel _170 ; +vector int bool _178 ; +vector bool int _186 ; +vector short bool _234 ; +vector bool short _242 ; +vector unsigned int _290 ; +vector int unsigned _298 ; +vector unsigned short _346 ; +vector short unsigned _354 ; +vector signed int _402 ; +vector int signed _410 ; +vector signed short _458 ; +vector short signed _466 ; +vector int bool _514 ; +vector int bool _544 ; +vector int bool _559 ; +vector bool int _589 ; +vector int short bool _874 ; +vector int bool short _889 ; +vector short int bool _904 ; +vector short bool int _919 ; +vector bool int short _934 ; +vector bool short int _949 ; +vector unsigned int _1234 ; +vector int unsigned _1249 ; +vector unsigned int _1279 ; +vector int unsigned _1294 ; +vector unsigned int _1309 ; +vector int unsigned short _1594 ; +vector int short unsigned _1609 ; +vector unsigned int short _1624 ; +vector unsigned short int _1639 ; +vector short int unsigned _1654 ; +vector short unsigned int _1669 ; +vector signed int _1954 ; +vector int signed _1969 ; +vector signed int _1999 ; +vector int signed _2014 ; +vector signed int _2029 ; +vector int signed short _2314 ; +vector int short signed _2329 ; +vector signed int short _2344 ; +vector signed short int _2359 ; +vector short int signed _2374 ; +vector short signed int _2389 ; +vector float _2674 ; diff --git a/gcc/testsuite/gcc.dg/vmx/1b-07.c b/gcc/testsuite/gcc.dg/vmx/1b-07.c index b1f4bb6e8a3..44bf4029f08 100644 --- a/gcc/testsuite/gcc.dg/vmx/1b-07.c +++ b/gcc/testsuite/gcc.dg/vmx/1b-07.c @@ -6,7 +6,6 @@ vector char unsigned _56 ; vector unsigned char _64 ; vector char signed _112 ; vector signed char _120 ; -bool _168 ; vector pixel _170 ; vector int bool _178 ; vector bool int _186 ; diff --git a/gcc/testsuite/gcc.dg/wdisallowed-functions-1.c b/gcc/testsuite/gcc.dg/wdisallowed-functions-1.c new file mode 100644 index 00000000000..39760950d69 --- /dev/null +++ b/gcc/testsuite/gcc.dg/wdisallowed-functions-1.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-Wdisallowed-function-list=foobar" } */ + +int foobar (int i) +{ + return (i * 5); +} diff --git a/gcc/testsuite/gcc.dg/wdisallowed-functions-2.c b/gcc/testsuite/gcc.dg/wdisallowed-functions-2.c new file mode 100644 index 00000000000..ca5aab0e50d --- /dev/null +++ b/gcc/testsuite/gcc.dg/wdisallowed-functions-2.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-Wdisallowed-function-list=foo,foobar,bar,foobar" } */ + +int foobar (int i) +{ + return (i * 5); +} + +int foobar1 (int i) +{ + return foobar (i); /* { dg-warning "disallowed call to 'foobar'" } */ +} diff --git a/gcc/testsuite/gcc.target/mips/pr35802.c b/gcc/testsuite/gcc.target/mips/pr35802.c new file mode 100644 index 00000000000..34300980695 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/pr35802.c @@ -0,0 +1,17 @@ +/* { dg-mips-options "-O2 -march=74kc -mgp32" } */ +__thread int x __attribute__((tls_model("initial-exec"))); +__thread int y __attribute__((tls_model("initial-exec"))); + +int bar (void); + +NOMIPS16 void +foo (int n) +{ + if (n > 5) + { + y = 0; + do + x += bar (); + while (n--); + } +} diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-26.c b/gcc/testsuite/gcc.target/powerpc/altivec-26.c new file mode 100644 index 00000000000..689d13a514f --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/altivec-26.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-maltivec" } */ + +/* A compiler implementing context-sensitive keywords must define this + preprocessor macro so that altivec.h does not provide the vector, + pixel, etc. macros. */ + +#ifndef __APPLE_ALTIVEC__ +#error __APPLE_ALTIVEC__ not pre-defined +#endif diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-macros.c b/gcc/testsuite/gcc.target/powerpc/altivec-macros.c new file mode 100644 index 00000000000..d95a68dd966 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/altivec-macros.c @@ -0,0 +1,63 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. */ + +/* { dg-do preprocess } */ +/* { dg-options "-maltivec" } */ + +/* Conditional macros should not be expanded by pragmas. */ +#pragma __vector +_Pragma ("__vector") + +/* Redefinition of conditional macros. */ +/* No warning should be generated. */ + +#define __vector __new_vector +#define __pixel __new_pixel +#define __bool __new_bool +#define vector new_vector +#define pixel new_pixel +#define bool new_bool + +/* Definition of conditional macros. */ +/* No warning should be generated. */ + +#undef __vector +#define __vector __new_vector + +#undef __pixel +#define __pixel __new_pixel + +#undef __bool +#define __bool __new_bool + +#undef vector +#define vector new_vector + +#undef pixel +#define pixel new_pixel + +#undef bool +#define bool new_bool + +/* Re-definition of "unconditional" macros. */ +/* Warnings should be generated as usual. */ + +#define __vector __newer_vector +#define __pixel __newer_pixel +#define __bool __newer_bool +#define vector newer_vector +#define pixel newer_pixel +#define bool newer_bool + +/* { dg-warning "redefined" "__vector redefined" { target *-*-* } 44 } */ +/* { dg-warning "redefined" "__pixel redefined" { target *-*-* } 45 } */ +/* { dg-warning "redefined" "__bool redefined" { target *-*-* } 46 } */ +/* { dg-warning "redefined" "vector redefined" { target *-*-* } 47 } */ +/* { dg-warning "redefined" "pixel redefined" { target *-*-* } 48 } */ +/* { dg-warning "redefined" "bool redefined" { target *-*-* } 49 } */ + +/* { dg-warning "previous" "prev __vector defn" { target *-*-* } 24 } */ +/* { dg-warning "previous" "prev __pixel defn" { target *-*-* } 27 } */ +/* { dg-warning "previous" "prev __bool defn" { target *-*-* } 30 } */ +/* { dg-warning "previous" "prev vector defn" { target *-*-* } 33 } */ +/* { dg-warning "previous" "prev pixel defn" { target *-*-* } 36 } */ +/* { dg-warning "previous" "prev bool defn" { target *-*-* } 39 } */ diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c index 37d10bc5b68..0386ecba7ca 100644 --- a/gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c +++ b/gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c @@ -1,15 +1,15 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ -int foo(int x) +long foo(long x) { return -(x == 0); } -int bar(int x) +long bar(long x) { - int t = __builtin_clz(x); - return -(t>>5); + long t = __builtin_clzl(x); + return -(t>>(sizeof(long) == 8 ? 6 : 5)); } -/* { dg-final { scan-assembler-not "cntlzw" } } */ +/* { dg-final { scan-assembler-not "cntlz" } } */ diff --git a/gcc/testsuite/gfortran.dg/fmt_g0_4.f08 b/gcc/testsuite/gfortran.dg/fmt_g0_4.f08 new file mode 100644 index 00000000000..149b1aa400a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/fmt_g0_4.f08 @@ -0,0 +1,5 @@ +! { dg-do compile } +! { dg-options "-std=f2008" } +! PR36725 Compile time error for g0 edit descriptor +print '(g0.9)', 0.1 ! { dg-error "Specifying precision" } +end diff --git a/gcc/testsuite/gfortran.dg/used_types_21.f90 b/gcc/testsuite/gfortran.dg/used_types_21.f90 new file mode 100644 index 00000000000..04b109f139a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/used_types_21.f90 @@ -0,0 +1,11 @@ +! { dg-do compile } +! Check that pointer components are allowed to empty types. + +TYPE :: empty_t +END TYPE empty_t + +TYPE :: comp_t + TYPE(empty_t), POINTER :: ptr +END TYPE comp_t + +END diff --git a/gcc/testsuite/gnat.dg/case_optimization1.adb b/gcc/testsuite/gnat.dg/case_optimization1.adb new file mode 100644 index 00000000000..3273b16fe77 --- /dev/null +++ b/gcc/testsuite/gnat.dg/case_optimization1.adb @@ -0,0 +1,21 @@ +-- { dg-do compile } +-- { dg-options "-O2" } + +package body Case_Optimization1 is + + function F (Op_Kind : Internal_Operator_Symbol_Kinds) return Integer is + begin + case Op_Kind is + when A_Not_Operator => return 3; + when An_Exponentiate_Operator => return 2; + when others => return 1; + end case; + end; + + function Len (E : Element) return Integer is + Op_Kind : Internal_Element_Kinds := Int_Kind (E); + begin + return F (Int_Kind (E)); + end; + +end Case_Optimization1; diff --git a/gcc/testsuite/gnat.dg/case_optimization1.ads b/gcc/testsuite/gnat.dg/case_optimization1.ads new file mode 100644 index 00000000000..737c9b70a56 --- /dev/null +++ b/gcc/testsuite/gnat.dg/case_optimization1.ads @@ -0,0 +1,7 @@ +with Case_Optimization_Pkg1; use Case_Optimization_Pkg1; + +package Case_Optimization1 is + + function Len (E : Element) return Integer; + +end Case_Optimization1; diff --git a/gcc/testsuite/gnat.dg/case_optimization_pkg1.ads b/gcc/testsuite/gnat.dg/case_optimization_pkg1.ads new file mode 100644 index 00000000000..da458645e9c --- /dev/null +++ b/gcc/testsuite/gnat.dg/case_optimization_pkg1.ads @@ -0,0 +1,432 @@ +package Case_Optimization_Pkg1 is + + type Element is null record; + + type Internal_Element_Kinds is + (Not_An_Element, + An_All_Calls_Remote_Pragma, + An_Asynchronous_Pragma, + An_Atomic_Pragma, + An_Atomic_Components_Pragma, + An_Attach_Handler_Pragma, + A_Controlled_Pragma, + A_Convention_Pragma, + A_Discard_Names_Pragma, + An_Elaborate_Pragma, + An_Elaborate_All_Pragma, + An_Elaborate_Body_Pragma, + An_Export_Pragma, + An_Import_Pragma, + An_Inline_Pragma, + An_Inspection_Point_Pragma, + An_Interrupt_Handler_Pragma, + An_Interrupt_Priority_Pragma, + A_Linker_Options_Pragma, + A_List_Pragma, + A_Locking_Policy_Pragma, + A_Normalize_Scalars_Pragma, + An_Optimize_Pragma, + A_Pack_Pragma, + A_Page_Pragma, + A_Preelaborate_Pragma, + A_Priority_Pragma, + A_Pure_Pragma, + A_Queuing_Policy_Pragma, + A_Remote_Call_Interface_Pragma, + A_Remote_Types_Pragma, + A_Restrictions_Pragma, + A_Reviewable_Pragma, + A_Shared_Passive_Pragma, + A_Storage_Size_Pragma, + A_Suppress_Pragma, + A_Task_Dispatching_Policy_Pragma, + A_Volatile_Pragma, + A_Volatile_Components_Pragma, + An_Assert_Pragma, + An_Assertion_Policy_Pragma, + A_Detect_Blocking_Pragma, + A_No_Return_Pragma, + A_Partition_Elaboration_Policy_Pragma, + A_Preelaborable_Initialization_Pragma, + A_Priority_Specific_Dispatching_Pragma, + A_Profile_Pragma, + A_Relative_Deadline_Pragma, + An_Unchecked_Union_Pragma, + An_Unsuppress_Pragma, + An_Implementation_Defined_Pragma, + An_Unknown_Pragma, + A_Defining_Identifier, + A_Defining_Character_Literal, + A_Defining_Enumeration_Literal, + A_Defining_And_Operator, + A_Defining_Or_Operator, + A_Defining_Xor_Operator, + A_Defining_Equal_Operator, + A_Defining_Not_Equal_Operator, + A_Defining_Less_Than_Operator, + A_Defining_Less_Than_Or_Equal_Operator, + A_Defining_Greater_Than_Operator, + A_Defining_Greater_Than_Or_Equal_Operator, + A_Defining_Plus_Operator, + A_Defining_Minus_Operator, + A_Defining_Concatenate_Operator, + A_Defining_Unary_Plus_Operator, + A_Defining_Unary_Minus_Operator, + A_Defining_Multiply_Operator, + A_Defining_Divide_Operator, + A_Defining_Mod_Operator, + A_Defining_Rem_Operator, + A_Defining_Exponentiate_Operator, + A_Defining_Abs_Operator, + A_Defining_Not_Operator, + A_Defining_Expanded_Name, + An_Ordinary_Type_Declaration, + A_Task_Type_Declaration, + A_Protected_Type_Declaration, + An_Incomplete_Type_Declaration, + A_Tagged_Incomplete_Type_Declaration, + A_Private_Type_Declaration, + A_Private_Extension_Declaration, + A_Subtype_Declaration, + A_Variable_Declaration, + A_Constant_Declaration, + A_Deferred_Constant_Declaration, + A_Single_Task_Declaration, + A_Single_Protected_Declaration, + An_Integer_Number_Declaration, + A_Real_Number_Declaration, + An_Enumeration_Literal_Specification, + A_Discriminant_Specification, + A_Component_Declaration, + A_Loop_Parameter_Specification, + A_Procedure_Declaration, + A_Function_Declaration, + A_Parameter_Specification, + A_Procedure_Body_Declaration, + A_Function_Body_Declaration, + A_Return_Object_Declaration, + A_Null_Procedure_Declaration, + A_Package_Declaration, + A_Package_Body_Declaration, + An_Object_Renaming_Declaration, + An_Exception_Renaming_Declaration, + A_Package_Renaming_Declaration, + A_Procedure_Renaming_Declaration, + A_Function_Renaming_Declaration, + A_Generic_Package_Renaming_Declaration, + A_Generic_Procedure_Renaming_Declaration, + A_Generic_Function_Renaming_Declaration, + A_Task_Body_Declaration, + A_Protected_Body_Declaration, + An_Entry_Declaration, + An_Entry_Body_Declaration, + An_Entry_Index_Specification, + A_Procedure_Body_Stub, + A_Function_Body_Stub, + A_Package_Body_Stub, + A_Task_Body_Stub, + A_Protected_Body_Stub, + An_Exception_Declaration, + A_Choice_Parameter_Specification, + A_Generic_Procedure_Declaration, + A_Generic_Function_Declaration, + A_Generic_Package_Declaration, + A_Package_Instantiation, + A_Procedure_Instantiation, + A_Function_Instantiation, + A_Formal_Object_Declaration, + A_Formal_Type_Declaration, + A_Formal_Procedure_Declaration, + A_Formal_Function_Declaration, + A_Formal_Package_Declaration, + A_Formal_Package_Declaration_With_Box, + A_Derived_Type_Definition, + A_Derived_Record_Extension_Definition, + An_Enumeration_Type_Definition, + A_Signed_Integer_Type_Definition, + A_Modular_Type_Definition, + A_Root_Integer_Definition, + A_Root_Real_Definition, + A_Universal_Integer_Definition, + A_Universal_Real_Definition, + A_Universal_Fixed_Definition, + A_Floating_Point_Definition, + An_Ordinary_Fixed_Point_Definition, + A_Decimal_Fixed_Point_Definition, + An_Unconstrained_Array_Definition, + A_Constrained_Array_Definition, + A_Record_Type_Definition, + A_Tagged_Record_Type_Definition, + An_Ordinary_Interface, + A_Limited_Interface, + A_Task_Interface, + A_Protected_Interface, + A_Synchronized_Interface, + A_Pool_Specific_Access_To_Variable, + An_Access_To_Variable, + An_Access_To_Constant, + An_Access_To_Procedure, + An_Access_To_Protected_Procedure, + An_Access_To_Function, + An_Access_To_Protected_Function, + A_Subtype_Indication, + A_Range_Attribute_Reference, + A_Simple_Expression_Range, + A_Digits_Constraint, + A_Delta_Constraint, + An_Index_Constraint, + A_Discriminant_Constraint, + A_Component_Definition, + A_Discrete_Subtype_Indication_As_Subtype_Definition, + A_Discrete_Range_Attribute_Reference_As_Subtype_Definition, + A_Discrete_Simple_Expression_Range_As_Subtype_Definition, + A_Discrete_Subtype_Indication, + A_Discrete_Range_Attribute_Reference, + A_Discrete_Simple_Expression_Range, + An_Unknown_Discriminant_Part, + A_Known_Discriminant_Part, + A_Record_Definition, + A_Null_Record_Definition, + A_Null_Component, + A_Variant_Part, + A_Variant, + An_Others_Choice, + An_Anonymous_Access_To_Variable, + An_Anonymous_Access_To_Constant, + An_Anonymous_Access_To_Procedure, + An_Anonymous_Access_To_Protected_Procedure, + An_Anonymous_Access_To_Function, + An_Anonymous_Access_To_Protected_Function, + A_Private_Type_Definition, + A_Tagged_Private_Type_Definition, + A_Private_Extension_Definition, + A_Task_Definition, + A_Protected_Definition, + A_Formal_Private_Type_Definition, + A_Formal_Tagged_Private_Type_Definition, + A_Formal_Derived_Type_Definition, + A_Formal_Discrete_Type_Definition, + A_Formal_Signed_Integer_Type_Definition, + A_Formal_Modular_Type_Definition, + A_Formal_Floating_Point_Definition, + A_Formal_Ordinary_Fixed_Point_Definition, + A_Formal_Decimal_Fixed_Point_Definition, + A_Formal_Ordinary_Interface, + A_Formal_Limited_Interface, + A_Formal_Task_Interface, + A_Formal_Protected_Interface, + A_Formal_Synchronized_Interface, + A_Formal_Unconstrained_Array_Definition, + A_Formal_Constrained_Array_Definition, + A_Formal_Pool_Specific_Access_To_Variable, + A_Formal_Access_To_Variable, + A_Formal_Access_To_Constant, + A_Formal_Access_To_Procedure, + A_Formal_Access_To_Protected_Procedure, + A_Formal_Access_To_Function, + A_Formal_Access_To_Protected_Function, + An_Integer_Literal, + A_Real_Literal, + A_String_Literal, + An_Identifier, + An_And_Operator, + An_Or_Operator, + An_Xor_Operator, + An_Equal_Operator, + A_Not_Equal_Operator, + A_Less_Than_Operator, + A_Less_Than_Or_Equal_Operator, + A_Greater_Than_Operator, + A_Greater_Than_Or_Equal_Operator, + A_Plus_Operator, + A_Minus_Operator, + A_Concatenate_Operator, + A_Unary_Plus_Operator, + A_Unary_Minus_Operator, + A_Multiply_Operator, + A_Divide_Operator, + A_Mod_Operator, + A_Rem_Operator, + An_Exponentiate_Operator, + An_Abs_Operator, + A_Not_Operator, + A_Character_Literal, + An_Enumeration_Literal, + An_Explicit_Dereference, + A_Function_Call, + An_Indexed_Component, + A_Slice, + A_Selected_Component, + An_Access_Attribute, + An_Address_Attribute, + An_Adjacent_Attribute, + An_Aft_Attribute, + An_Alignment_Attribute, + A_Base_Attribute, + A_Bit_Order_Attribute, + A_Body_Version_Attribute, + A_Callable_Attribute, + A_Caller_Attribute, + A_Ceiling_Attribute, + A_Class_Attribute, + A_Component_Size_Attribute, + A_Compose_Attribute, + A_Constrained_Attribute, + A_Copy_Sign_Attribute, + A_Count_Attribute, + A_Definite_Attribute, + A_Delta_Attribute, + A_Denorm_Attribute, + A_Digits_Attribute, + An_Exponent_Attribute, + An_External_Tag_Attribute, + A_First_Attribute, + A_First_Bit_Attribute, + A_Floor_Attribute, + A_Fore_Attribute, + A_Fraction_Attribute, + An_Identity_Attribute, + An_Image_Attribute, + An_Input_Attribute, + A_Last_Attribute, + A_Last_Bit_Attribute, + A_Leading_Part_Attribute, + A_Length_Attribute, + A_Machine_Attribute, + A_Machine_Emax_Attribute, + A_Machine_Emin_Attribute, + A_Machine_Mantissa_Attribute, + A_Machine_Overflows_Attribute, + A_Machine_Radix_Attribute, + A_Machine_Rounds_Attribute, + A_Max_Attribute, + A_Max_Size_In_Storage_Elements_Attribute, + A_Min_Attribute, + A_Model_Attribute, + A_Model_Emin_Attribute, + A_Model_Epsilon_Attribute, + A_Model_Mantissa_Attribute, + A_Model_Small_Attribute, + A_Modulus_Attribute, + An_Output_Attribute, + A_Partition_ID_Attribute, + A_Pos_Attribute, + A_Position_Attribute, + A_Pred_Attribute, + A_Range_Attribute, + A_Read_Attribute, + A_Remainder_Attribute, + A_Round_Attribute, + A_Rounding_Attribute, + A_Safe_First_Attribute, + A_Safe_Last_Attribute, + A_Scale_Attribute, + A_Scaling_Attribute, + A_Signed_Zeros_Attribute, + A_Size_Attribute, + A_Small_Attribute, + A_Storage_Pool_Attribute, + A_Storage_Size_Attribute, + A_Succ_Attribute, + A_Tag_Attribute, + A_Terminated_Attribute, + A_Truncation_Attribute, + An_Unbiased_Rounding_Attribute, + An_Unchecked_Access_Attribute, + A_Val_Attribute, + A_Valid_Attribute, + A_Value_Attribute, + A_Version_Attribute, + A_Wide_Image_Attribute, + A_Wide_Value_Attribute, + A_Wide_Width_Attribute, + A_Width_Attribute, + A_Write_Attribute, + A_Machine_Rounding_Attribute, + A_Mod_Attribute, + A_Priority_Attribute, + A_Stream_Size_Attribute, + A_Wide_Wide_Image_Attribute, + A_Wide_Wide_Value_Attribute, + A_Wide_Wide_Width_Attribute, + An_Implementation_Defined_Attribute, + An_Unknown_Attribute, + A_Record_Aggregate, + An_Extension_Aggregate, + A_Positional_Array_Aggregate, + A_Named_Array_Aggregate, + An_And_Then_Short_Circuit, + An_Or_Else_Short_Circuit, + An_In_Range_Membership_Test, + A_Not_In_Range_Membership_Test, + An_In_Type_Membership_Test, + A_Not_In_Type_Membership_Test, + A_Null_Literal, + A_Parenthesized_Expression, + A_Type_Conversion, + A_Qualified_Expression, + An_Allocation_From_Subtype, + An_Allocation_From_Qualified_Expression, + A_Pragma_Argument_Association, + A_Discriminant_Association, + A_Record_Component_Association, + An_Array_Component_Association, + A_Parameter_Association, + A_Generic_Association, + A_Null_Statement, + An_Assignment_Statement, + An_If_Statement, + A_Case_Statement, + A_Loop_Statement, + A_While_Loop_Statement, + A_For_Loop_Statement, + A_Block_Statement, + An_Exit_Statement, + A_Goto_Statement, + A_Procedure_Call_Statement, + A_Return_Statement, + An_Extended_Return_Statement, + An_Accept_Statement, + An_Entry_Call_Statement, + A_Requeue_Statement, + A_Requeue_Statement_With_Abort, + A_Delay_Until_Statement, + A_Delay_Relative_Statement, + A_Terminate_Alternative_Statement, + A_Selective_Accept_Statement, + A_Timed_Entry_Call_Statement, + A_Conditional_Entry_Call_Statement, + An_Asynchronous_Select_Statement, + An_Abort_Statement, + A_Raise_Statement, + A_Code_Statement, + An_If_Path, + An_Elsif_Path, + An_Else_Path, + A_Case_Path, + A_Select_Path, + An_Or_Path, + A_Then_Abort_Path, + A_Use_Package_Clause, + A_Use_Type_Clause, + A_With_Clause, + An_Attribute_Definition_Clause, + An_Enumeration_Representation_Clause, + A_Record_Representation_Clause, + An_At_Clause, + A_Component_Clause, + An_Exception_Handler, + Non_Trivial_Mapping, + Not_Implemented_Mapping, + Trivial_Mapping, + No_Mapping); + + subtype Internal_Expression_Kinds is Internal_Element_Kinds + range An_Integer_Literal .. An_Allocation_From_Qualified_Expression; + + subtype Internal_Operator_Symbol_Kinds is Internal_Expression_Kinds + range An_And_Operator .. A_Not_Operator; + + function Int_Kind (E : Element) return Internal_Element_Kinds; + +end Case_Optimization_Pkg1; diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp index c188824b841..7ca5b739781 100644 --- a/gcc/testsuite/lib/g++.exp +++ b/gcc/testsuite/lib/g++.exp @@ -273,7 +273,6 @@ proc g++_target_compile { source dest type options } { } lappend options "additional_flags=[libio_include_flags]" - lappend options "additional_flags=-fno-show-column" lappend options "compiler=$GXX_UNDER_TEST" set options [concat $gpp_compile_options $options] diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c index 4be0cf9bd89..8f7041bbf09 100644 --- a/gcc/tree-call-cdce.c +++ b/gcc/tree-call-cdce.c @@ -142,8 +142,10 @@ check_target_format (tree arg) type = TREE_TYPE (arg); mode = TYPE_MODE (type); rfmt = REAL_MODE_FORMAT (mode); - if ((mode == SFmode && rfmt == &ieee_single_format) - || (mode == DFmode && rfmt == &ieee_double_format) + if ((mode == SFmode + && (rfmt == &ieee_single_format || rfmt == &mips_single_format)) + || (mode == DFmode + && (rfmt == &ieee_double_format || rfmt == &mips_double_format)) /* For long double, we can not really check XFmode which is only defined on intel platforms. Candidate pre-selection using builtin function @@ -151,6 +153,7 @@ check_target_format (tree arg) for long double modes: double, quad, and extended. */ || (mode != SFmode && mode != DFmode && (rfmt == &ieee_quad_format + || rfmt == &mips_quad_format || rfmt == &ieee_extended_intel_96_format || rfmt == &ieee_extended_intel_128_format || rfmt == &ieee_extended_intel_96_round_53_format))) diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 480ca41b417..01f5214fcbc 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -1659,34 +1659,6 @@ set_symbol_mem_tag (tree sym, tree tag) get_var_ann (sym)->symbol_mem_tag = tag; } -/* Get the value handle of EXPR. This is the only correct way to get - the value handle for a "thing". If EXPR does not have a value - handle associated, it returns NULL_TREE. - NB: If EXPR is min_invariant, this function is *required* to return - EXPR. */ - -static inline tree -get_value_handle (tree expr) -{ - if (TREE_CODE (expr) == SSA_NAME) - return SSA_NAME_VALUE (expr); - else if (DECL_P (expr) || TREE_CODE (expr) == TREE_LIST - || TREE_CODE (expr) == CONSTRUCTOR) - { - tree_ann_common_t ann = tree_common_ann (expr); - return ((ann) ? ann->value_handle : NULL_TREE); - } - else if (is_gimple_min_invariant (expr)) - return expr; - else if (EXPR_P (expr)) - { - tree_ann_common_t ann = tree_common_ann (expr); - return ((ann) ? ann->value_handle : NULL_TREE); - } - else - gcc_unreachable (); -} - /* Accessor to tree-ssa-operands.c caches. */ static inline struct ssa_operands * gimple_ssa_operands (const struct function *fun) diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index 5479c3342c7..a441893e004 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -1124,16 +1124,16 @@ extern bool remove_stmt_from_eh_region (tree); extern bool maybe_clean_or_replace_eh_stmt (tree, tree); /* In tree-ssa-pre.c */ -void add_to_value (tree, tree); -void debug_value_expressions (tree); -void print_value_expressions (FILE *, tree); +struct pre_expr_d; +void add_to_value (unsigned int, struct pre_expr_d *); +void debug_value_expressions (unsigned int); +void print_value_expressions (FILE *, unsigned int); /* In tree-vn.c */ tree make_value_handle (tree); void set_value_handle (tree, tree); bool expressions_equal_p (tree, tree); -static inline tree get_value_handle (tree); void sort_vuses (VEC (tree, gc) *); void sort_vuses_heap (VEC (tree, heap) *); tree vn_lookup_or_add (tree); diff --git a/gcc/tree-gimple.h b/gcc/tree-gimple.h index 3864d5d9d3e..3691cbc5631 100644 --- a/gcc/tree-gimple.h +++ b/gcc/tree-gimple.h @@ -118,6 +118,26 @@ enum gimplify_status { GS_ALL_DONE = 1 /* The expression is fully gimplified. */ }; +struct gimplify_ctx +{ + struct gimplify_ctx *prev_context; + + tree current_bind_expr; + tree temps; + tree conditional_cleanups; + tree exit_label; + tree return_temp; + + VEC(tree,heap) *case_labels; + /* The formal temporary table. Should this be persistent? */ + htab_t temp_htab; + + int conditions; + bool save_stack; + bool into_ssa; + bool allow_rhs_cond_expr; +}; + extern enum gimplify_status gimplify_expr (tree *, tree *, tree *, bool (*) (tree), fallback_t); extern void gimplify_type_sizes (tree, tree *); @@ -125,7 +145,7 @@ extern void gimplify_one_sizepos (tree *, tree *); extern void gimplify_stmt (tree *); extern void gimplify_to_stmt_list (tree *); extern void gimplify_body (tree *, tree, bool); -extern void push_gimplify_context (void); +extern void push_gimplify_context (struct gimplify_ctx *); extern void pop_gimplify_context (tree); extern void gimplify_and_add (tree, tree *); diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 0f1a8bd1720..c0f4c880f7f 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1590,8 +1590,9 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn, || !is_gimple_reg (var)) { tree_stmt_iterator i; + struct gimplify_ctx gctx; - push_gimplify_context (); + push_gimplify_context (&gctx); gimplify_stmt (&init_stmt); if (gimple_in_ssa_p (cfun) && init_stmt && TREE_CODE (init_stmt) == STATEMENT_LIST) @@ -2986,6 +2987,8 @@ optimize_inline_calls (tree fn) tree prev_fn; basic_block bb; int last = n_basic_blocks; + struct gimplify_ctx gctx; + /* There is no point in performing inlining if errors have already occurred -- and we might crash if we try to inline invalid code. */ @@ -3012,7 +3015,7 @@ optimize_inline_calls (tree fn) id.transform_lang_insert_block = NULL; id.statements_to_fold = pointer_set_create (); - push_gimplify_context (); + push_gimplify_context (&gctx); /* We make no attempts to keep dominance info up-to-date. */ free_dominance_info (CDI_DOMINATORS); diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c index b5e8984a4df..46650b37dd4 100644 --- a/gcc/tree-mudflap.c +++ b/gcc/tree-mudflap.c @@ -421,13 +421,15 @@ mudflap_init (void) static unsigned int execute_mudflap_function_ops (void) { + struct gimplify_ctx gctx; + /* Don't instrument functions such as the synthetic constructor built during mudflap_finish_file. */ if (mf_marked_p (current_function_decl) || DECL_ARTIFICIAL (current_function_decl)) return 0; - push_gimplify_context (); + push_gimplify_context (&gctx); /* In multithreaded mode, don't cache the lookup cache parameters. */ if (! flag_mudflap_threads) @@ -958,13 +960,15 @@ mf_xform_derefs (void) static unsigned int execute_mudflap_function_decls (void) { + struct gimplify_ctx gctx; + /* Don't instrument functions such as the synthetic constructor built during mudflap_finish_file. */ if (mf_marked_p (current_function_decl) || DECL_ARTIFICIAL (current_function_decl)) return 0; - push_gimplify_context (); + push_gimplify_context (&gctx); mf_xform_decls (DECL_SAVED_TREE (current_function_decl), DECL_ARGUMENTS (current_function_decl)); diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 2f7de8f1c7d..fce766cc61e 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -952,16 +952,12 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, pp_character (buffer, ')'); pp_string (buffer, str); dump_generic_node (buffer, TREE_OPERAND (node, 1), spc, flags, false); - - if (TREE_CODE (op0) != VALUE_HANDLE) + op0 = component_ref_field_offset (node); + if (op0 && TREE_CODE (op0) != INTEGER_CST) { - op0 = component_ref_field_offset (node); - if (op0 && TREE_CODE (op0) != INTEGER_CST) - { - pp_string (buffer, "{off: "); + pp_string (buffer, "{off: "); dump_generic_node (buffer, op0, spc, flags, false); pp_character (buffer, '}'); - } } break; @@ -1789,10 +1785,6 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, pp_string (buffer, ">"); break; - case VALUE_HANDLE: - pp_printf (buffer, "VH.%d", VALUE_HANDLE_ID (node)); - break; - case ASSERT_EXPR: pp_string (buffer, "ASSERT_EXPR <"); dump_generic_node (buffer, ASSERT_EXPR_VAR (node), spc, flags, false); diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index c50c6cd225b..21cf367b23a 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2282,6 +2282,9 @@ sra_build_assignment (tree dst, tree src) var = utmp; } + /* fold_build3 (BIT_FIELD_REF, ...) sometimes returns a cast. */ + STRIP_NOPS (dst); + /* Finally, move and convert to the destination. */ if (!useless_type_conversion_p (TREE_TYPE (dst), TREE_TYPE (var))) { @@ -2306,6 +2309,12 @@ sra_build_assignment (tree dst, tree src) return list; } + /* fold_build3 (BIT_FIELD_REF, ...) sometimes returns a cast. */ + if (CONVERT_EXPR_P (dst)) + { + STRIP_NOPS (dst); + src = fold_convert (TREE_TYPE (dst), src); + } /* It was hoped that we could perform some type sanity checking here, but since front-ends can emit accesses of fields in types different from their nominal types and copy structures containing @@ -2316,8 +2325,8 @@ sra_build_assignment (tree dst, tree src) So we just assume type differences at this point are ok. The only exception we make here are pointer types, which can be different in e.g. structurally equal, but non-identical RECORD_TYPEs. */ - if (POINTER_TYPE_P (TREE_TYPE (dst)) - && !useless_type_conversion_p (TREE_TYPE (dst), TREE_TYPE (src))) + else if (POINTER_TYPE_P (TREE_TYPE (dst)) + && !useless_type_conversion_p (TREE_TYPE (dst), TREE_TYPE (src))) src = fold_convert (TREE_TYPE (dst), src); return build_gimple_modify_stmt (dst, src); @@ -2823,8 +2832,9 @@ static bool generate_element_init (struct sra_elt *elt, tree init, tree *list_p) { bool ret; + struct gimplify_ctx gctx; - push_gimplify_context (); + push_gimplify_context (&gctx); ret = generate_element_init_1 (elt, init, list_p); pop_gimplify_context (NULL); diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index d4a1e219a0c..3aa79feddd6 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -2370,6 +2370,8 @@ have_common_aliases_p (bitmap tag1aliases, bitmap tag2aliases) static void compute_flow_insensitive_aliasing (struct alias_info *ai) { + referenced_var_iterator rvi; + tree var; size_t i; timevar_push (TV_FLOW_INSENSITIVE); @@ -2460,6 +2462,24 @@ compute_flow_insensitive_aliasing (struct alias_info *ai) add_may_alias (tag1, tag2); } } + + /* We have to add all HEAP variables to all SMTs aliases bitmaps. + As we don't know which effective type the HEAP will have we cannot + do better here and we need the conflicts with obfuscated pointers + (a simple (*(int[n] *)ptr)[i] will do, with ptr from a VLA array + allocation). */ + for (i = 0; i < ai->num_pointers; i++) + { + struct alias_map_d *p_map = ai->pointers[i]; + tree tag = symbol_mem_tag (p_map->var); + + FOR_EACH_REFERENCED_VAR (var, rvi) + { + if (var_ann (var)->is_heapvar) + add_may_alias (tag, var); + } + } + timevar_pop (TV_FLOW_INSENSITIVE); } diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index da6b7855a81..4b6fe6a1b69 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -310,13 +310,10 @@ get_symbol_constant_value (tree sym) change the constant value of the PHI node, which allows for more constants to be propagated. - 3- If SSA_NAME_VALUE is set and it is a constant, its value is - used. - - 4- Variables defined by statements other than assignments and PHI + 3- Variables defined by statements other than assignments and PHI nodes are considered VARYING. - 5- Initial values of variables that are not GIMPLE registers are + 4- Initial values of variables that are not GIMPLE registers are considered VARYING. */ static prop_value_t @@ -332,12 +329,6 @@ get_default_value (tree var) non-register when DO_STORE_CCP is false. */ val.lattice_val = VARYING; } - else if (SSA_NAME_VALUE (var) - && is_gimple_min_invariant (SSA_NAME_VALUE (var))) - { - val.lattice_val = CONSTANT; - val.value = SSA_NAME_VALUE (var); - } else if ((cst_val = get_symbol_constant_value (sym)) != NULL_TREE) { /* Globals and static variables declared 'const' take their @@ -2825,8 +2816,9 @@ convert_to_gimple_builtin (block_stmt_iterator *si_p, tree expr, bool ignore) tree_stmt_iterator ti; tree stmt = bsi_stmt (*si_p); tree tmp, stmts = NULL; + struct gimplify_ctx gctx; - push_gimplify_context (); + push_gimplify_context (&gctx); if (ignore) { tmp = build_empty_stmt (); diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index ea99a021fb1..0b159382e7e 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -1163,7 +1163,7 @@ record_equality (tree x, tree y) prev_x = x, x = y, y = prev_x, prev_x = prev_y; else if (prev_x && is_gimple_min_invariant (prev_x)) x = y, y = prev_x, prev_x = prev_y; - else if (prev_y && TREE_CODE (prev_y) != VALUE_HANDLE) + else if (prev_y) y = prev_y; /* After the swapping, we must have one SSA_NAME. */ @@ -1629,7 +1629,7 @@ cprop_operand (tree stmt, use_operand_p op_p) copy of some other variable, use the value or copy stored in CONST_AND_COPIES. */ val = SSA_NAME_VALUE (op); - if (val && val != op && TREE_CODE (val) != VALUE_HANDLE) + if (val && val != op) { tree op_type, val_type; @@ -1969,7 +1969,7 @@ lookup_avail_expr (tree stmt, bool insert) if (TREE_CODE (lhs) == SSA_NAME) { temp = SSA_NAME_VALUE (lhs); - if (temp && TREE_CODE (temp) != VALUE_HANDLE) + if (temp) lhs = temp; } diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 423afe04785..07290bc48c4 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see #include "cfgloop.h" #include "tree-ssa-sccvn.h" #include "params.h" +#include "dbgcnt.h" /* TODO: @@ -116,172 +117,211 @@ along with GCC; see the file COPYING3. If not see /* Representations of value numbers: - Value numbers are represented using the "value handle" approach. - This means that each SSA_NAME (and for other reasons to be - disclosed in a moment, expression nodes) has a value handle that - can be retrieved through get_value_handle. This value handle *is* - the value number of the SSA_NAME. You can pointer compare the - value handles for equivalence purposes. - - For debugging reasons, the value handle is internally more than - just a number, it is a VALUE_HANDLE named "VH.x", where x is a - unique number for each value number in use. This allows - expressions with SSA_NAMES replaced by value handles to still be - pretty printed in a sane way. They simply print as "VH.3 * - VH.5", etc. - - Expression nodes have value handles associated with them as a - cache. Otherwise, we'd have to look them up again in the hash - table. This makes significant difference (factor of two or more) on - some test cases. They can be thrown away after the pass is - finished. */ + Value numbers are represented by a representative SSA_NAME. We + will create fake SSA_NAME's in situations where we need a + representative but do not have one (because it is a complex + expression). In order to facilitate storing the value numbers in + bitmaps, and keep the number of wasted SSA_NAME's down, we also + associate a value_id with each value number, and create full blown + ssa_name's only where we actually need them (IE in operands of + existing expressions). + + Theoretically you could replace all the value_id's with + SSA_NAME_VERSION, but this would allocate a large number of + SSA_NAME's (which are each > 30 bytes) just to get a 4 byte number. + It would also require an additional indirection at each point we + use the value id. */ /* Representation of expressions on value numbers: - In some portions of this code, you will notice we allocate "fake" - analogues to the expression we are value numbering, and replace the - operands with the values of the expression. Since we work on - values, and not just names, we canonicalize expressions to value - expressions for use in the ANTIC sets, the EXP_GEN set, etc. + Expressions consisting of value numbers are represented the same + way as our VN internally represents them, with an additional + "pre_expr" wrapping around them in order to facilitate storing all + of the expressions in the same sets. */ - This is theoretically unnecessary, it just saves a bunch of - repeated get_value_handle and find_leader calls in the remainder of - the code, trading off temporary memory usage for speed. The tree - nodes aren't actually creating more garbage, since they are - allocated in a special pools which are thrown away at the end of - this pass. +/* Representation of sets: - All of this also means that if you print the EXP_GEN or ANTIC sets, - you will see "VH.5 + VH.7" in the set, instead of "a_55 + - b_66" or something. The only thing that actually cares about - seeing the value leaders is phi translation, and it needs to be - able to find the leader for a value in an arbitrary block, so this - "value expression" form is perfect for it (otherwise you'd do - get_value_handle->find_leader->translate->get_value_handle->find_leader).*/ + The dataflow sets do not need to be sorted in any particular order + for the majority of their lifetime, are simply represented as two + bitmaps, one that keeps track of values present in the set, and one + that keeps track of expressions present in the set. + When we need them in topological order, we produce it on demand by + transforming the bitmap into an array and sorting it into topo + order. */ -/* Representation of sets: +/* Type of expression, used to know which member of the PRE_EXPR union + is valid. */ - There are currently two types of sets used, hopefully to be unified soon. - The AVAIL sets do not need to be sorted in any particular order, - and thus, are simply represented as two bitmaps, one that keeps - track of values present in the set, and one that keeps track of - expressions present in the set. +enum pre_expr_kind +{ + NAME, + NARY, + REFERENCE, + CONSTANT +}; - The other sets are represented as doubly linked lists kept in topological - order, with an optional supporting bitmap of values present in the - set. The sets represent values, and the elements can be values or - expressions. The elements can appear in different sets, but each - element can only appear once in each set. +typedef union pre_expr_union_d +{ + tree name; + tree constant; + vn_nary_op_t nary; + vn_reference_t reference; +} pre_expr_union; - Since each node in the set represents a value, we also want to be - able to map expression, set pairs to something that tells us - whether the value is present is a set. We use a per-set bitmap for - that. The value handles also point to a linked list of the - expressions they represent via a tree annotation. This is mainly - useful only for debugging, since we don't do identity lookups. */ +typedef struct pre_expr_d +{ + enum pre_expr_kind kind; + unsigned int id; + pre_expr_union u; +} *pre_expr; +#define PRE_EXPR_NAME(e) (e)->u.name +#define PRE_EXPR_NARY(e) (e)->u.nary +#define PRE_EXPR_REFERENCE(e) (e)->u.reference +#define PRE_EXPR_CONSTANT(e) (e)->u.constant -/* Next global expression id number. */ -static unsigned int next_expression_id; +static int +pre_expr_eq (const void *p1, const void *p2) +{ + const struct pre_expr_d *e1 = (const struct pre_expr_d *) p1; + const struct pre_expr_d *e2 = (const struct pre_expr_d *) p2; + + if (e1->kind != e2->kind) + return false; + + switch (e1->kind) + { + case CONSTANT: + return expressions_equal_p (PRE_EXPR_CONSTANT (e1), + PRE_EXPR_CONSTANT (e2)); + case NAME: + return PRE_EXPR_NAME (e1) == PRE_EXPR_NAME (e2); + case NARY: + return vn_nary_op_eq (PRE_EXPR_NARY (e1), PRE_EXPR_NARY (e2)); + case REFERENCE: + return vn_reference_eq (PRE_EXPR_REFERENCE (e1), + PRE_EXPR_REFERENCE (e2)); + default: + abort(); + } +} -typedef VEC(tree, gc) *vuse_vec; -DEF_VEC_P (vuse_vec); -DEF_VEC_ALLOC_P (vuse_vec, heap); +static hashval_t +pre_expr_hash (const void *p1) +{ + const struct pre_expr_d *e = (const struct pre_expr_d *) p1; + switch (e->kind) + { + case CONSTANT: + return iterative_hash_expr (PRE_EXPR_CONSTANT (e), 0); + case NAME: + return iterative_hash_expr (PRE_EXPR_NAME (e), 0); + case NARY: + return vn_nary_op_compute_hash (PRE_EXPR_NARY (e)); + case REFERENCE: + return vn_reference_compute_hash (PRE_EXPR_REFERENCE (e)); + default: + abort (); + } +} -static VEC(vuse_vec, heap) *expression_vuses; + +/* Next global expression id number. */ +static unsigned int next_expression_id; /* Mapping from expression to id number we can use in bitmap sets. */ -static VEC(tree, heap) *expressions; +DEF_VEC_P (pre_expr); +DEF_VEC_ALLOC_P (pre_expr, heap); +static VEC(pre_expr, heap) *expressions; +static htab_t expression_to_id; /* Allocate an expression id for EXPR. */ static inline unsigned int -alloc_expression_id (tree expr) +alloc_expression_id (pre_expr expr) { - tree_ann_common_t ann; - - ann = get_tree_common_ann (expr); - + void **slot; /* Make sure we won't overflow. */ gcc_assert (next_expression_id + 1 > next_expression_id); - - ann->aux = XNEW (unsigned int); - * ((unsigned int *)ann->aux) = next_expression_id++; - VEC_safe_push (tree, heap, expressions, expr); - VEC_safe_push (vuse_vec, heap, expression_vuses, NULL); + expr->id = next_expression_id++; + VEC_safe_push (pre_expr, heap, expressions, expr); + slot = htab_find_slot (expression_to_id, expr, INSERT); + gcc_assert (!*slot); + *slot = expr; return next_expression_id - 1; } /* Return the expression id for tree EXPR. */ static inline unsigned int -get_expression_id (tree expr) +get_expression_id (const pre_expr expr) { - tree_ann_common_t ann = tree_common_ann (expr); - gcc_assert (ann); - gcc_assert (ann->aux); + return expr->id; +} - return *((unsigned int *)ann->aux); +static inline unsigned int +lookup_expression_id (const pre_expr expr) +{ + void **slot; + + slot = htab_find_slot (expression_to_id, expr, NO_INSERT); + if (!slot) + return 0; + return ((pre_expr)*slot)->id; } /* Return the existing expression id for EXPR, or create one if one does not exist yet. */ static inline unsigned int -get_or_alloc_expression_id (tree expr) +get_or_alloc_expression_id (pre_expr expr) { - tree_ann_common_t ann = tree_common_ann (expr); - - if (ann == NULL || !ann->aux) + unsigned int id = lookup_expression_id (expr); + if (id == 0) return alloc_expression_id (expr); - - return get_expression_id (expr); + return expr->id = id; } /* Return the expression that has expression id ID */ -static inline tree +static inline pre_expr expression_for_id (unsigned int id) { - return VEC_index (tree, expressions, id); + return VEC_index (pre_expr, expressions, id); } -/* Return the expression vuses for EXPR, if there are any. */ - -static inline vuse_vec -get_expression_vuses (tree expr) -{ - unsigned int expr_id = get_or_alloc_expression_id (expr); - return VEC_index (vuse_vec, expression_vuses, expr_id); -} - -/* Set the expression vuses for EXPR to VUSES. */ - -static inline void -set_expression_vuses (tree expr, vuse_vec vuses) -{ - unsigned int expr_id = get_or_alloc_expression_id (expr); - VEC_replace (vuse_vec, expression_vuses, expr_id, vuses); -} - - /* Free the expression id field in all of our expressions, and then destroy the expressions array. */ static void clear_expression_ids (void) { - int i; - tree expr; + VEC_free (pre_expr, heap, expressions); +} - for (i = 0; VEC_iterate (tree, expressions, i, expr); i++) +static alloc_pool pre_expr_pool; + +/* Given an SSA_NAME NAME, get or create a pre_expr to represent it. */ + +static pre_expr +get_or_alloc_expr_for_name (tree name) +{ + pre_expr result = (pre_expr) pool_alloc (pre_expr_pool); + unsigned int result_id; + + result->kind = NAME; + result->id = 0; + PRE_EXPR_NAME (result) = name; + result_id = lookup_expression_id (result); + if (result_id != 0) { - free (tree_common_ann (expr)->aux); - tree_common_ann (expr)->aux = NULL; + pool_free (pre_expr_pool, result); + result = expression_for_id (result_id); + return result; } - VEC_free (tree, heap, expressions); - VEC_free (vuse_vec, heap, expression_vuses); + get_or_alloc_expression_id (result); + return result; } static bool in_fre = false; @@ -295,7 +335,12 @@ typedef struct bitmap_set } *bitmap_set_t; #define FOR_EACH_EXPR_ID_IN_SET(set, id, bi) \ - EXECUTE_IF_SET_IN_BITMAP(set->expressions, 0, id, bi) + EXECUTE_IF_SET_IN_BITMAP((set)->expressions, 0, (id), (bi)) + +/* Mapping from value id to expressions with that value_id. */ +DEF_VEC_P (bitmap_set_t); +DEF_VEC_ALLOC_P (bitmap_set_t, heap); +static VEC(bitmap_set_t, heap) *value_expressions; /* Sets that we need to keep track of. */ typedef struct bb_bitmap_sets @@ -347,6 +392,7 @@ typedef struct bb_bitmap_sets #define BB_VISITED(BB) ((bb_value_sets_t) ((BB)->aux))->visited #define BB_DEFERRED(BB) ((bb_value_sets_t) ((BB)->aux))->deferred + /* Maximal set of values, used to initialize the ANTIC problem, which is an intersection problem. */ static bitmap_set_t maximal_set; @@ -376,32 +422,24 @@ static struct } pre_stats; static bool do_partial_partial; -static tree bitmap_find_leader (bitmap_set_t, tree, tree); -static void bitmap_value_insert_into_set (bitmap_set_t, tree); -static void bitmap_value_replace_in_set (bitmap_set_t, tree); +static pre_expr bitmap_find_leader (bitmap_set_t, unsigned int , tree); +static void bitmap_value_insert_into_set (bitmap_set_t, pre_expr); +static void bitmap_value_replace_in_set (bitmap_set_t, pre_expr); static void bitmap_set_copy (bitmap_set_t, bitmap_set_t); -static bool bitmap_set_contains_value (bitmap_set_t, tree); -static void bitmap_insert_into_set (bitmap_set_t, tree); +static bool bitmap_set_contains_value (bitmap_set_t, unsigned int); +static void bitmap_insert_into_set (bitmap_set_t, pre_expr); +static void bitmap_insert_into_set_1 (bitmap_set_t, pre_expr, bool); static bitmap_set_t bitmap_set_new (void); -static tree create_expression_by_pieces (basic_block, tree, tree, tree); -static tree find_or_generate_expression (basic_block, tree, tree, tree); +static tree create_expression_by_pieces (basic_block, pre_expr, tree, tree, + tree); +static tree find_or_generate_expression (basic_block, pre_expr, tree, tree); /* We can add and remove elements and entries to and from sets and hash tables, so we use alloc pools for them. */ static alloc_pool bitmap_set_pool; -static alloc_pool binary_node_pool; -static alloc_pool unary_node_pool; -static alloc_pool reference_node_pool; -static alloc_pool comparison_node_pool; static bitmap_obstack grand_bitmap_obstack; -/* We can't use allocation pools to hold temporary CALL_EXPR objects, since - they are not of fixed size. Instead, use an obstack. */ - -static struct obstack temp_call_expr_obstack; - - /* To avoid adding 300 temporary variables when we only need one, we only create one temporary variable, on demand, and build ssa names off that. We do have to change the variable if the types don't @@ -428,16 +466,13 @@ static htab_t phi_translate_table; typedef struct expr_pred_trans_d { /* The expression. */ - tree e; + pre_expr e; /* The predecessor block along which we translated the expression. */ basic_block pred; - /* vuses associated with the expression. */ - VEC (tree, gc) *vuses; - /* The value that resulted from the translation. */ - tree v; + pre_expr v; /* The hashcode for the expression, pred pair. This is cached for speed reasons. */ @@ -464,50 +499,27 @@ expr_pred_trans_eq (const void *p1, const void *p2) const_expr_pred_trans_t const ve2 = (const_expr_pred_trans_t) p2; basic_block b1 = ve1->pred; basic_block b2 = ve2->pred; - int i; - tree vuse1; /* If they are not translations for the same basic block, they can't be equal. */ if (b1 != b2) return false; - - - /* If they are for the same basic block, determine if the - expressions are equal. */ - if (!expressions_equal_p (ve1->e, ve2->e)) - return false; - - /* Make sure the vuses are equivalent. */ - if (ve1->vuses == ve2->vuses) - return true; - - if (VEC_length (tree, ve1->vuses) != VEC_length (tree, ve2->vuses)) - return false; - - for (i = 0; VEC_iterate (tree, ve1->vuses, i, vuse1); i++) - { - if (VEC_index (tree, ve2->vuses, i) != vuse1) - return false; - } - - return true; + return pre_expr_eq (ve1->e, ve2->e); } /* Search in the phi translation table for the translation of - expression E in basic block PRED with vuses VUSES. + expression E in basic block PRED. Return the translated value, if found, NULL otherwise. */ -static inline tree -phi_trans_lookup (tree e, basic_block pred, VEC (tree, gc) *vuses) +static inline pre_expr +phi_trans_lookup (pre_expr e, basic_block pred) { void **slot; struct expr_pred_trans_d ept; ept.e = e; ept.pred = pred; - ept.vuses = vuses; - ept.hashcode = iterative_hash_expr (e, (unsigned long) pred); + ept.hashcode = iterative_hash_hashval_t (pre_expr_hash (e), pred->index); slot = htab_find_slot_with_hash (phi_translate_table, &ept, ept.hashcode, NO_INSERT); if (!slot) @@ -517,19 +529,20 @@ phi_trans_lookup (tree e, basic_block pred, VEC (tree, gc) *vuses) } -/* Add the tuple mapping from {expression E, basic block PRED, vuses VUSES} to +/* Add the tuple mapping from {expression E, basic block PRED} to value V, to the phi translation table. */ static inline void -phi_trans_add (tree e, tree v, basic_block pred, VEC (tree, gc) *vuses) +phi_trans_add (pre_expr e, pre_expr v, basic_block pred) { void **slot; expr_pred_trans_t new_pair = XNEW (struct expr_pred_trans_d); new_pair->e = e; new_pair->pred = pred; - new_pair->vuses = vuses; new_pair->v = v; - new_pair->hashcode = iterative_hash_expr (e, (unsigned long) pred); + new_pair->hashcode = iterative_hash_hashval_t (pre_expr_hash (e), + pred->index); + slot = htab_find_slot_with_hash (phi_translate_table, new_pair, new_pair->hashcode, INSERT); if (*slot) @@ -538,29 +551,27 @@ phi_trans_add (tree e, tree v, basic_block pred, VEC (tree, gc) *vuses) } -/* Return true if V is a value expression that represents itself. - In our world, this is *only* non-value handles. */ - -static inline bool -constant_expr_p (tree v) -{ - return TREE_CODE (v) != VALUE_HANDLE && - (TREE_CODE (v) == FIELD_DECL || is_gimple_min_invariant (v)); -} - -/* Add expression E to the expression set of value V. */ +/* Add expression E to the expression set of value id V. */ void -add_to_value (tree v, tree e) +add_to_value (unsigned int v, pre_expr e) { - /* Constants have no expression sets. */ - if (constant_expr_p (v)) - return; + bitmap_set_t set; - if (VALUE_HANDLE_EXPR_SET (v) == NULL) - VALUE_HANDLE_EXPR_SET (v) = bitmap_set_new (); + if (v >= VEC_length (bitmap_set_t, value_expressions)) + { + VEC_safe_grow_cleared (bitmap_set_t, heap, value_expressions, + v + 1); + } + + set = VEC_index (bitmap_set_t, value_expressions, v); + if (!set) + { + set = bitmap_set_new (); + VEC_replace (bitmap_set_t, value_expressions, v, set); + } - bitmap_insert_into_set (VALUE_HANDLE_EXPR_SET (v), e); + bitmap_insert_into_set_1 (set, e, true); } /* Create a new bitmap set and return it. */ @@ -574,36 +585,61 @@ bitmap_set_new (void) return ret; } +/* Return the value id for a PRE expression EXPR. */ + +static unsigned int +get_expr_value_id (pre_expr expr) +{ + switch (expr->kind) + { + case CONSTANT: + return get_or_alloc_constant_value_id (PRE_EXPR_CONSTANT (expr)); + case NAME: + return VN_INFO (PRE_EXPR_NAME (expr))->value_id; + case NARY: + return PRE_EXPR_NARY (expr)->value_id; + case REFERENCE: + return PRE_EXPR_REFERENCE (expr)->value_id; + default: + gcc_unreachable (); + } +} + /* Remove an expression EXPR from a bitmapped set. */ static void -bitmap_remove_from_set (bitmap_set_t set, tree expr) +bitmap_remove_from_set (bitmap_set_t set, pre_expr expr) { - tree val = get_value_handle (expr); - - gcc_assert (val); - if (!constant_expr_p (val)) + unsigned int val = get_expr_value_id (expr); + if (!value_id_constant_p (val)) { - bitmap_clear_bit (set->values, VALUE_HANDLE_ID (val)); + bitmap_clear_bit (set->values, val); bitmap_clear_bit (set->expressions, get_expression_id (expr)); } } -/* Insert an expression EXPR into a bitmapped set. */ - static void -bitmap_insert_into_set (bitmap_set_t set, tree expr) +bitmap_insert_into_set_1 (bitmap_set_t set, pre_expr expr, + bool allow_constants) { - tree val = get_value_handle (expr); - - gcc_assert (val); - if (!constant_expr_p (val)) + unsigned int val = get_expr_value_id (expr); + if (allow_constants || !value_id_constant_p (val)) { - bitmap_set_bit (set->values, VALUE_HANDLE_ID (val)); + /* We specifically expect this and only this function to be able to + insert constants into a set. */ + bitmap_set_bit (set->values, val); bitmap_set_bit (set->expressions, get_or_alloc_expression_id (expr)); } } +/* Insert an expression EXPR into a bitmapped set. */ + +static void +bitmap_insert_into_set (bitmap_set_t set, pre_expr expr) +{ + bitmap_insert_into_set_1 (set, expr, false); +} + /* Copy a bitmapped set ORIG, into bitmapped set DEST. */ static void @@ -624,40 +660,32 @@ bitmap_set_free (bitmap_set_t set) /* A comparison function for use in qsort to top sort a bitmap set. Simply - subtracts value handle ids, since they are created in topo-order. */ + subtracts value ids, since they are created with leaves before + their parent users (IE topological order). */ static int -vh_compare (const void *pa, const void *pb) +value_id_compare (const void *pa, const void *pb) { - const tree vha = get_value_handle (*((const tree *)pa)); - const tree vhb = get_value_handle (*((const tree *)pb)); + const unsigned int vha = get_expr_value_id (*((const pre_expr *)pa)); + const unsigned int vhb = get_expr_value_id (*((const pre_expr *)pb)); - /* This can happen when we constify things. */ - if (constant_expr_p (vha)) - { - if (constant_expr_p (vhb)) - return -1; - return -1; - } - else if (constant_expr_p (vhb)) - return 1; - return VALUE_HANDLE_ID (vha) - VALUE_HANDLE_ID (vhb); + return vha - vhb; } /* Generate an topological-ordered array of bitmap set SET. */ -static VEC(tree, heap) * +static VEC(pre_expr, heap) * sorted_array_from_bitmap_set (bitmap_set_t set) { unsigned int i; bitmap_iterator bi; - VEC(tree, heap) *result = NULL; + VEC(pre_expr, heap) *result = NULL; FOR_EACH_EXPR_ID_IN_SET (set, i, bi) - VEC_safe_push (tree, heap, result, expression_for_id (i)); + VEC_safe_push (pre_expr, heap, result, expression_for_id (i)); - qsort (VEC_address (tree, result), VEC_length (tree, result), - sizeof (tree), vh_compare); + qsort (VEC_address (pre_expr, result), VEC_length (pre_expr, result), + sizeof (pre_expr), value_id_compare); return result; } @@ -678,9 +706,9 @@ bitmap_set_and (bitmap_set_t dest, bitmap_set_t orig) bitmap_copy (temp, dest->expressions); EXECUTE_IF_SET_IN_BITMAP (temp, 0, i, bi) { - tree expr = expression_for_id (i); - tree val = get_value_handle (expr); - if (!bitmap_bit_p (dest->values, VALUE_HANDLE_ID (val))) + pre_expr expr = expression_for_id (i); + unsigned int value_id = get_expr_value_id (expr); + if (!bitmap_bit_p (dest->values, value_id)) bitmap_clear_bit (dest->expressions, i); } BITMAP_FREE (temp); @@ -701,9 +729,9 @@ bitmap_set_subtract (bitmap_set_t dest, bitmap_set_t orig) FOR_EACH_EXPR_ID_IN_SET (result, i, bi) { - tree expr = expression_for_id (i); - tree val = get_value_handle (expr); - bitmap_set_bit (result->values, VALUE_HANDLE_ID (val)); + pre_expr expr = expression_for_id (i); + unsigned int value_id = get_expr_value_id (expr); + bitmap_set_bit (result->values, value_id); } return result; @@ -721,30 +749,30 @@ bitmap_set_subtract_values (bitmap_set_t a, bitmap_set_t b) bitmap_copy (temp, a->expressions); EXECUTE_IF_SET_IN_BITMAP (temp, 0, i, bi) { - tree expr = expression_for_id (i); - if (bitmap_set_contains_value (b, get_value_handle (expr))) + pre_expr expr = expression_for_id (i); + if (bitmap_set_contains_value (b, get_expr_value_id (expr))) bitmap_remove_from_set (a, expr); } BITMAP_FREE (temp); } -/* Return true if bitmapped set SET contains the value VAL. */ +/* Return true if bitmapped set SET contains the value VALUE_ID. */ static bool -bitmap_set_contains_value (bitmap_set_t set, tree val) +bitmap_set_contains_value (bitmap_set_t set, unsigned int value_id) { - if (constant_expr_p (val)) + if (value_id_constant_p (value_id)) return true; if (!set || bitmap_empty_p (set->expressions)) return false; - return bitmap_bit_p (set->values, VALUE_HANDLE_ID (val)); + return bitmap_bit_p (set->values, value_id); } static inline bool -bitmap_set_contains_expr (bitmap_set_t set, tree expr) +bitmap_set_contains_expr (bitmap_set_t set, const pre_expr expr) { return bitmap_bit_p (set->expressions, get_expression_id (expr)); } @@ -752,13 +780,14 @@ bitmap_set_contains_expr (bitmap_set_t set, tree expr) /* Replace an instance of value LOOKFOR with expression EXPR in SET. */ static void -bitmap_set_replace_value (bitmap_set_t set, tree lookfor, tree expr) +bitmap_set_replace_value (bitmap_set_t set, unsigned int lookfor, + const pre_expr expr) { bitmap_set_t exprset; unsigned int i; bitmap_iterator bi; - if (constant_expr_p (lookfor)) + if (value_id_constant_p (lookfor)) return; if (!bitmap_set_contains_value (set, lookfor)) @@ -773,7 +802,7 @@ bitmap_set_replace_value (bitmap_set_t set, tree lookfor, tree expr) 5-10x faster than walking the bitmap. If this is somehow a significant lose for some cases, we can choose which set to walk based on the set size. */ - exprset = VALUE_HANDLE_EXPR_SET (lookfor); + exprset = VEC_index (bitmap_set_t, value_expressions, lookfor); FOR_EACH_EXPR_ID_IN_SET (exprset, i, bi) { if (bitmap_bit_p (set->expressions, i)) @@ -797,9 +826,9 @@ bitmap_set_equal (bitmap_set_t a, bitmap_set_t b) and add it otherwise. */ static void -bitmap_value_replace_in_set (bitmap_set_t set, tree expr) +bitmap_value_replace_in_set (bitmap_set_t set, pre_expr expr) { - tree val = get_value_handle (expr); + unsigned int val = get_expr_value_id (expr); if (bitmap_set_contains_value (set, val)) bitmap_set_replace_value (set, val, expr); @@ -811,17 +840,89 @@ bitmap_value_replace_in_set (bitmap_set_t set, tree expr) SET. */ static void -bitmap_value_insert_into_set (bitmap_set_t set, tree expr) +bitmap_value_insert_into_set (bitmap_set_t set, pre_expr expr) { - tree val = get_value_handle (expr); + unsigned int val = get_expr_value_id (expr); - if (constant_expr_p (val)) + if (value_id_constant_p (val)) return; if (!bitmap_set_contains_value (set, val)) bitmap_insert_into_set (set, expr); } +/* Print out EXPR to outfile. */ + +static void +print_pre_expr (FILE *outfile, const pre_expr expr) +{ + switch (expr->kind) + { + case CONSTANT: + print_generic_expr (outfile, PRE_EXPR_CONSTANT (expr), 0); + break; + case NAME: + print_generic_expr (outfile, PRE_EXPR_NAME (expr), 0); + break; + case NARY: + { + unsigned int i; + vn_nary_op_t nary = PRE_EXPR_NARY (expr); + fprintf (outfile, "{%s,", tree_code_name [nary->opcode]); + for (i = 0; i < nary->length; i++) + { + print_generic_expr (outfile, nary->op[i], 0); + if (i != (unsigned) nary->length - 1) + fprintf (outfile, ","); + } + fprintf (outfile, "}"); + } + break; + + case REFERENCE: + { + vn_reference_op_t vro; + unsigned int i; + vn_reference_t ref = PRE_EXPR_REFERENCE (expr); + fprintf (outfile, "{"); + for (i = 0; + VEC_iterate (vn_reference_op_s, ref->operands, i, vro); + i++) + { + if (vro->opcode != SSA_NAME + && TREE_CODE_CLASS (vro->opcode) != tcc_declaration) + fprintf (outfile, "%s ", tree_code_name [vro->opcode]); + if (vro->op0) + { + if (vro->op1) + fprintf (outfile, "<"); + print_generic_expr (outfile, vro->op0, 0); + if (vro->op1) + { + fprintf (outfile, ","); + print_generic_expr (outfile, vro->op1, 0); + } + if (vro->op1) + fprintf (outfile, ">"); + } + if (i != VEC_length (vn_reference_op_s, ref->operands) - 1) + fprintf (outfile, ","); + } + fprintf (outfile, "}"); + } + break; + } +} +void debug_pre_expr (pre_expr); + +/* Like print_pre_expr but always prints to stderr. */ +void +debug_pre_expr (pre_expr e) +{ + print_pre_expr (stderr, e); + fprintf (stderr, "\n"); +} + /* Print out SET to OUTFILE. */ static void @@ -837,16 +938,14 @@ print_bitmap_set (FILE *outfile, bitmap_set_t set, FOR_EACH_EXPR_ID_IN_SET (set, i, bi) { - tree expr = expression_for_id (i); + const pre_expr expr = expression_for_id (i); if (!first) fprintf (outfile, ", "); first = false; - print_generic_expr (outfile, expr, 0); + print_pre_expr (outfile, expr); - fprintf (outfile, " ("); - print_generic_expr (outfile, get_value_handle (expr), 0); - fprintf (outfile, ") "); + fprintf (outfile, " (%04d)", get_expr_value_id (expr)); } } fprintf (outfile, " }\n"); @@ -863,42 +962,152 @@ debug_bitmap_set (bitmap_set_t set) /* Print out the expressions that have VAL to OUTFILE. */ void -print_value_expressions (FILE *outfile, tree val) +print_value_expressions (FILE *outfile, unsigned int val) { - if (VALUE_HANDLE_EXPR_SET (val)) + bitmap_set_t set = VEC_index (bitmap_set_t, value_expressions, val); + if (set) { char s[10]; - sprintf (s, "VH.%04d", VALUE_HANDLE_ID (val)); - print_bitmap_set (outfile, VALUE_HANDLE_EXPR_SET (val), s, 0); + sprintf (s, "%04d", val); + print_bitmap_set (outfile, set, s, 0); } } void -debug_value_expressions (tree val) +debug_value_expressions (unsigned int val) { print_value_expressions (stderr, val); } -/* Return the folded version of T if T, when folded, is a gimple - min_invariant. Otherwise, return T. */ +/* Given a CONSTANT, allocate a new CONSTANT type PRE_EXPR to + represent it. */ -static tree -fully_constant_expression (tree t) +static pre_expr +get_or_alloc_expr_for_constant (tree constant) { - tree folded; - folded = fold (t); - if (folded && is_gimple_min_invariant (folded)) - return folded; - return t; + unsigned int result_id; + unsigned int value_id; + pre_expr newexpr = (pre_expr) pool_alloc (pre_expr_pool); + newexpr->kind = CONSTANT; + PRE_EXPR_CONSTANT (newexpr) = constant; + result_id = lookup_expression_id (newexpr); + if (result_id != 0) + { + pool_free (pre_expr_pool, newexpr); + newexpr = expression_for_id (result_id); + return newexpr; + } + value_id = get_or_alloc_constant_value_id (constant); + get_or_alloc_expression_id (newexpr); + add_to_value (value_id, newexpr); + return newexpr; } -/* Make a temporary copy of a CALL_EXPR object NODE. */ +/* Given a value id V, find the actual tree representing the constant + value if there is one, and return it. Return NULL if we can't find + a constant. */ static tree -temp_copy_call_expr (tree node) +get_constant_for_value_id (unsigned int v) { - return (tree) obstack_copy (&temp_call_expr_obstack, node, tree_size (node)); + if (value_id_constant_p (v)) + { + unsigned int i; + bitmap_iterator bi; + bitmap_set_t exprset = VEC_index (bitmap_set_t, value_expressions, v); + + FOR_EACH_EXPR_ID_IN_SET (exprset, i, bi) + { + pre_expr expr = expression_for_id (i); + if (expr->kind == CONSTANT) + return PRE_EXPR_CONSTANT (expr); + } + } + return NULL; +} + +/* Get or allocate a pre_expr for a piece of GIMPLE, and return it. + Currently only supports constants and SSA_NAMES. */ +static pre_expr +get_or_alloc_expr_for (tree t) +{ + if (TREE_CODE (t) == SSA_NAME) + return get_or_alloc_expr_for_name (t); + else if (is_gimple_min_invariant (t)) + return get_or_alloc_expr_for_constant (t); + return NULL; +} + +/* Return the folded version of T if T, when folded, is a gimple + min_invariant. Otherwise, return T. */ + +static pre_expr +fully_constant_expression (pre_expr e) +{ + switch (e->kind) + { + case CONSTANT: + return e; + case NARY: + { + vn_nary_op_t nary = PRE_EXPR_NARY (e); + switch (TREE_CODE_CLASS (nary->opcode)) + { + case tcc_binary: + { + /* We have to go from trees to pre exprs to value ids to + constants. */ + tree naryop0 = nary->op[0]; + tree naryop1 = nary->op[1]; + pre_expr rep0 = get_or_alloc_expr_for (naryop0); + pre_expr rep1 = get_or_alloc_expr_for (naryop1); + unsigned int vrep0 = get_expr_value_id (rep0); + unsigned int vrep1 = get_expr_value_id (rep1); + tree const0 = get_constant_for_value_id (vrep0); + tree const1 = get_constant_for_value_id (vrep1); + tree result = NULL; + if (const0 && const1) + { + tree type1 = TREE_TYPE (nary->op[0]); + tree type2 = TREE_TYPE (nary->op[1]); + const0 = fold_convert (type1, const0); + const1 = fold_convert (type2, const1); + result = fold_binary (nary->opcode, nary->type, const0, + const1); + } + if (result && is_gimple_min_invariant (result)) + return get_or_alloc_expr_for_constant (result); + return e; + } + case tcc_unary: + { + /* We have to go from trees to pre exprs to value ids to + constants. */ + tree naryop0 = nary->op[0]; + pre_expr rep0 = get_or_alloc_expr_for (naryop0); + unsigned int vrep0 = get_expr_value_id (rep0); + tree const0 = get_constant_for_value_id (vrep0); + tree result = NULL; + if (const0) + { + tree type1 = TREE_TYPE (nary->op[0]); + const0 = fold_convert (type1, const0); + result = fold_unary (nary->opcode, nary->type, const0); + } + + if (result && is_gimple_min_invariant (result)) + return get_or_alloc_expr_for_constant (result); + return e; + } + default: + return e; + } + } + default: + return e; + } + return e; } /* Translate the vuses in the VUSES vector backwards through phi nodes @@ -949,44 +1158,155 @@ translate_vuses_through_block (VEC (tree, gc) *vuses, SET2. This is used to avoid making a set consisting of the union of PA_IN and ANTIC_IN during insert. */ -static inline tree -find_leader_in_sets (tree expr, bitmap_set_t set1, bitmap_set_t set2) +static inline pre_expr +find_leader_in_sets (unsigned int val, bitmap_set_t set1, bitmap_set_t set2) { - tree result; + pre_expr result; - result = bitmap_find_leader (set1, expr, NULL_TREE); + result = bitmap_find_leader (set1, val, NULL_TREE); if (!result && set2) - result = bitmap_find_leader (set2, expr, NULL_TREE); + result = bitmap_find_leader (set2, val, NULL_TREE); return result; } +/* Get the tree type for our PRE expression e. */ + +static tree +get_expr_type (const pre_expr e) +{ + switch (e->kind) + { + case NAME: + return TREE_TYPE (PRE_EXPR_NAME (e)); + case CONSTANT: + return TREE_TYPE (PRE_EXPR_CONSTANT (e)); + case REFERENCE: + { + vn_reference_op_t vro; + + gcc_assert (PRE_EXPR_REFERENCE (e)->operands); + vro = VEC_index (vn_reference_op_s, + PRE_EXPR_REFERENCE (e)->operands, + 0); + /* We don't store type along with COMPONENT_REF because it is + always the same as FIELD_DECL's type. */ + if (!vro->type) + { + gcc_assert (vro->opcode == COMPONENT_REF); + return TREE_TYPE (vro->op0); + } + return vro->type; + } + + case NARY: + return PRE_EXPR_NARY (e)->type; + } + gcc_unreachable(); +} + +/* Get a representative SSA_NAME for a given expression. + Since all of our sub-expressions are treated as values, we require + them to be SSA_NAME's for simplicity. + Prior versions of GVNPRE used to use "value handles" here, so that + an expression would be VH.11 + VH.10 instead of d_3 + e_6. In + either case, the operands are really values (IE we do not expect + them to be usable without finding leaders). */ + +static tree +get_representative_for (const pre_expr e) +{ + tree exprtype; + tree name; + unsigned int value_id = get_expr_value_id (e); + + switch (e->kind) + { + case NAME: + return PRE_EXPR_NAME (e); + case CONSTANT: + case NARY: + case REFERENCE: + { + /* Go through all of the expressions representing this value + and pick out an SSA_NAME. */ + unsigned int i; + bitmap_iterator bi; + bitmap_set_t exprs = VEC_index (bitmap_set_t, value_expressions, + value_id); + FOR_EACH_EXPR_ID_IN_SET (exprs, i, bi) + { + pre_expr rep = expression_for_id (i); + if (rep->kind == NAME) + return PRE_EXPR_NAME (rep); + } + } + break; + } + /* If we reached here we couldn't find an SSA_NAME. This can + happen when we've discovered a value that has never appeared in + the program as set to an SSA_NAME, most likely as the result of + phi translation. */ + if (dump_file) + { + fprintf (dump_file, + "Could not find SSA_NAME representative for expression:"); + print_pre_expr (dump_file, e); + fprintf (dump_file, "\n"); + } + + exprtype = get_expr_type (e); + + /* Build and insert the assignment of the end result to the temporary + that we will return. */ + if (!pretemp || exprtype != TREE_TYPE (pretemp)) + { + pretemp = create_tmp_var (exprtype, "pretmp"); + get_var_ann (pretemp); + } + + name = make_ssa_name (pretemp, build_empty_stmt ()); + VN_INFO_GET (name)->value_id = value_id; + if (e->kind == CONSTANT) + VN_INFO (name)->valnum = PRE_EXPR_CONSTANT (e); + else + VN_INFO (name)->valnum = name; + + add_to_value (value_id, get_or_alloc_expr_for_name (name)); + if (dump_file) + { + fprintf (dump_file, "Created SSA_NAME representative "); + print_generic_expr (dump_file, name, 0); + fprintf (dump_file, " for expression:"); + print_pre_expr (dump_file, e); + fprintf (dump_file, "\n"); + } + + return name; +} + + + + /* Translate EXPR using phis in PHIBLOCK, so that it has the values of the phis in PRED. SEEN is a bitmap saying which expression we have translated since we started translation of the toplevel expression. Return NULL if we can't find a leader for each part of the translated expression. */ -static tree -phi_translate_1 (tree expr, bitmap_set_t set1, bitmap_set_t set2, +static pre_expr +phi_translate_1 (pre_expr expr, bitmap_set_t set1, bitmap_set_t set2, basic_block pred, basic_block phiblock, bitmap seen) { - tree phitrans = NULL; - tree oldexpr = expr; + pre_expr oldexpr = expr; + pre_expr phitrans; - if (expr == NULL) + if (!expr) return NULL; - if (constant_expr_p (expr)) + if (value_id_constant_p (get_expr_value_id (expr))) return expr; - /* Phi translations of a given expression don't change. */ - if (EXPR_P (expr) || GIMPLE_STMT_P (expr)) - { - phitrans = phi_trans_lookup (expr, pred, get_expression_vuses (expr)); - } - else - phitrans = phi_trans_lookup (expr, pred, NULL); - + phitrans = phi_trans_lookup (expr, pred); if (phitrans) return phitrans; @@ -1000,317 +1320,244 @@ phi_translate_1 (tree expr, bitmap_set_t set1, bitmap_set_t set2, bitmap_set_bit (seen, expr_id); } - switch (TREE_CODE_CLASS (TREE_CODE (expr))) + switch (expr->kind) { - case tcc_expression: - return NULL; + /* Constants contain no values that need translation. */ + case CONSTANT: + return expr; - case tcc_vl_exp: + case NARY: { - if (TREE_CODE (expr) != CALL_EXPR) - return NULL; - else + unsigned int i; + bool changed = false; + vn_nary_op_t nary = PRE_EXPR_NARY (expr); + struct vn_nary_op_s newnary; + /* The NARY structure is only guaranteed to have been + allocated to the nary->length operands. */ + memcpy (&newnary, nary, (sizeof (struct vn_nary_op_s) + - sizeof (tree) * (4 - nary->length))); + + for (i = 0; i < newnary.length; i++) { - tree oldfn = CALL_EXPR_FN (expr); - tree oldsc = CALL_EXPR_STATIC_CHAIN (expr); - tree newfn, newsc = NULL; - tree newexpr = NULL_TREE; - bool invariantarg = false; - int i, nargs; - VEC (tree, gc) *vuses = get_expression_vuses (expr); - VEC (tree, gc) *tvuses; - - newfn = phi_translate_1 (find_leader_in_sets (oldfn, set1, set2), - set1, set2, pred, phiblock, seen); - if (newfn == NULL) - return NULL; - if (newfn != oldfn) - { - newexpr = temp_copy_call_expr (expr); - CALL_EXPR_FN (newexpr) = get_value_handle (newfn); - } - if (oldsc) - { - newsc = phi_translate_1 (find_leader_in_sets (oldsc, set1, set2), - set1, set2, pred, phiblock, seen); - if (newsc == NULL) - return NULL; - if (newsc != oldsc) - { - if (!newexpr) - newexpr = temp_copy_call_expr (expr); - CALL_EXPR_STATIC_CHAIN (newexpr) = get_value_handle (newsc); - } - } - - /* phi translate the argument list piece by piece. */ - nargs = call_expr_nargs (expr); - for (i = 0; i < nargs; i++) + if (TREE_CODE (newnary.op[i]) != SSA_NAME) + continue; + else { - tree oldval = CALL_EXPR_ARG (expr, i); - tree newval; - if (oldval) + unsigned int op_val_id = VN_INFO (newnary.op[i])->value_id; + pre_expr leader = find_leader_in_sets (op_val_id, set1, set2); + pre_expr result = phi_translate_1 (leader, set1, set2, + pred, phiblock, seen); + if (result && result != leader) { - /* This may seem like a weird place for this - check, but it's actually the easiest place to - do it. We can't do it lower on in the - recursion because it's valid for pieces of a - component ref to be of AGGREGATE_TYPE, as long - as the outermost one is not. - To avoid *that* case, we have a check for - AGGREGATE_TYPE_P in insert_aux. However, that - check will *not* catch this case because here - it occurs in the argument list. */ - if (AGGREGATE_TYPE_P (TREE_TYPE (oldval))) - return NULL; - oldval = find_leader_in_sets (oldval, set1, set2); - newval = phi_translate_1 (oldval, set1, set2, pred, - phiblock, seen); - if (newval == NULL) + tree name = get_representative_for (result); + if (!name) return NULL; - if (newval != oldval) - { - invariantarg |= is_gimple_min_invariant (newval); - if (!newexpr) - newexpr = temp_copy_call_expr (expr); - CALL_EXPR_ARG (newexpr, i) = get_value_handle (newval); - } + newnary.op[i] = name; } - } + else if (!result) + return NULL; - /* In case of new invariant args we might try to fold the call - again. */ - if (invariantarg && !newsc) - { - tree tmp1 = build_call_array (TREE_TYPE (expr), - newfn, call_expr_nargs (newexpr), - CALL_EXPR_ARGP (newexpr)); - tree tmp2 = fold (tmp1); - if (tmp2 != tmp1) - { - STRIP_TYPE_NOPS (tmp2); - if (is_gimple_min_invariant (tmp2)) - return tmp2; - } + changed |= newnary.op[i] != nary->op[i]; } + } + if (changed) + { + pre_expr constant; + + tree result = vn_nary_op_lookup_pieces (newnary.length, + newnary.opcode, + newnary.type, + newnary.op[0], + newnary.op[1], + newnary.op[2], + newnary.op[3], + &nary); + unsigned int new_val_id; + + expr = (pre_expr) pool_alloc (pre_expr_pool); + expr->kind = NARY; + expr->id = 0; + if (result && is_gimple_min_invariant (result)) + return get_or_alloc_expr_for_constant (result); + + + if (nary) + { + PRE_EXPR_NARY (expr) = nary; + constant = fully_constant_expression (expr); + if (constant != expr) + return constant; - tvuses = translate_vuses_through_block (vuses, phiblock, pred); - if (vuses != tvuses && ! newexpr) - newexpr = temp_copy_call_expr (expr); - - if (newexpr) + new_val_id = nary->value_id; + get_or_alloc_expression_id (expr); + } + else { - newexpr->base.ann = NULL; - vn_lookup_or_add_with_vuses (newexpr, tvuses); - expr = newexpr; - set_expression_vuses (newexpr, tvuses); + new_val_id = get_next_value_id (); + VEC_safe_grow_cleared (bitmap_set_t, heap, + value_expressions, + get_max_value_id() + 1); + nary = vn_nary_op_insert_pieces (newnary.length, + newnary.opcode, + newnary.type, + newnary.op[0], + newnary.op[1], + newnary.op[2], + newnary.op[3], + result, new_val_id); + PRE_EXPR_NARY (expr) = nary; + constant = fully_constant_expression (expr); + if (constant != expr) + return constant; + get_or_alloc_expression_id (expr); } - phi_trans_add (oldexpr, expr, pred, tvuses); + add_to_value (new_val_id, expr); } + phi_trans_add (oldexpr, expr, pred); + return expr; } - return expr; - - case tcc_declaration: - { - VEC (tree, gc) * oldvuses = NULL; - VEC (tree, gc) * newvuses = NULL; - - oldvuses = get_expression_vuses (expr); - if (oldvuses) - newvuses = translate_vuses_through_block (oldvuses, phiblock, - pred); - - if (oldvuses != newvuses) - { - vn_lookup_or_add_with_vuses (expr, newvuses); - set_expression_vuses (expr, newvuses); - } - phi_trans_add (oldexpr, expr, pred, newvuses); - } - return expr; - - case tcc_reference: + break; + case REFERENCE: { - tree oldop0 = TREE_OPERAND (expr, 0); - tree oldop1 = NULL; - tree newop0; - tree newop1 = NULL; - tree oldop2 = NULL; - tree newop2 = NULL; - tree oldop3 = NULL; - tree newop3 = NULL; - tree newexpr; - VEC (tree, gc) * oldvuses = NULL; - VEC (tree, gc) * newvuses = NULL; - - if (TREE_CODE (expr) != INDIRECT_REF - && TREE_CODE (expr) != COMPONENT_REF - && TREE_CODE (expr) != ARRAY_REF) - return NULL; - - oldop0 = find_leader_in_sets (oldop0, set1, set2); - newop0 = phi_translate_1 (oldop0, set1, set2, pred, phiblock, seen); - if (newop0 == NULL) - return NULL; - - if (TREE_CODE (expr) == ARRAY_REF) + vn_reference_t ref = PRE_EXPR_REFERENCE (expr); + VEC (vn_reference_op_s, heap) *operands = ref->operands; + VEC (tree, gc) *vuses = ref->vuses; + VEC (tree, gc) *newvuses = vuses; + VEC (vn_reference_op_s, heap) *newoperands = NULL; + bool changed = false; + unsigned int i; + vn_reference_op_t operand; + vn_reference_t newref; + + for (i = 0; VEC_iterate (vn_reference_op_s, operands, i, operand); i++) { - oldop1 = TREE_OPERAND (expr, 1); - oldop1 = find_leader_in_sets (oldop1, set1, set2); - newop1 = phi_translate_1 (oldop1, set1, set2, pred, phiblock, seen); - - if (newop1 == NULL) - return NULL; - - oldop2 = TREE_OPERAND (expr, 2); - if (oldop2) + pre_expr opresult; + pre_expr leader; + tree oldop0 = operand->op0; + tree oldop1 = operand->op1; + tree oldop2 = operand->op2; + tree op0 = oldop0; + tree op1 = oldop1; + tree op2 = oldop2; + tree type = operand->type; + vn_reference_op_s newop = *operand; + + if (op0 && TREE_CODE (op0) == SSA_NAME) { - oldop2 = find_leader_in_sets (oldop2, set1, set2); - newop2 = phi_translate_1 (oldop2, set1, set2, pred, phiblock, seen); + unsigned int op_val_id = VN_INFO (op0)->value_id; + leader = find_leader_in_sets (op_val_id, set1, set2); + opresult = phi_translate_1 (leader, set1, set2, + pred, phiblock, seen); + if (opresult && opresult != leader) + { + tree name = get_representative_for (opresult); + if (!name) + return NULL; + op0 = name; + } + else if (!opresult) + return NULL; + } + changed |= op0 != oldop0; - if (newop2 == NULL) + if (op1 && TREE_CODE (op1) == SSA_NAME) + { + unsigned int op_val_id = VN_INFO (op1)->value_id; + leader = find_leader_in_sets (op_val_id, set1, set2); + opresult = phi_translate_1 (leader, set1, set2, + pred, phiblock, seen); + if (opresult && opresult != leader) + { + tree name = get_representative_for (opresult); + if (!name) + return NULL; + op1 = name; + } + else if (!opresult) return NULL; } - oldop3 = TREE_OPERAND (expr, 3); - if (oldop3) + changed |= op1 != oldop1; + if (op2 && TREE_CODE (op2) == SSA_NAME) { - oldop3 = find_leader_in_sets (oldop3, set1, set2); - newop3 = phi_translate_1 (oldop3, set1, set2, pred, phiblock, seen); - - if (newop3 == NULL) + unsigned int op_val_id = VN_INFO (op2)->value_id; + leader = find_leader_in_sets (op_val_id, set1, set2); + opresult = phi_translate_1 (leader, set1, set2, + pred, phiblock, seen); + if (opresult && opresult != leader) + { + tree name = get_representative_for (opresult); + if (!name) + return NULL; + op2 = name; + } + else if (!opresult) return NULL; } + changed |= op2 != oldop2; + + if (!newoperands) + newoperands = VEC_copy (vn_reference_op_s, heap, operands); + /* We may have changed from an SSA_NAME to a constant */ + if (newop.opcode == SSA_NAME && TREE_CODE (op0) != SSA_NAME) + newop.opcode = TREE_CODE (op0); + newop.type = type; + newop.op0 = op0; + newop.op1 = op1; + newop.op2 = op2; + VEC_replace (vn_reference_op_s, newoperands, i, &newop); } - oldvuses = get_expression_vuses (expr); - if (oldvuses) - newvuses = translate_vuses_through_block (oldvuses, phiblock, - pred); + newvuses = translate_vuses_through_block (vuses, phiblock, pred); + changed |= newvuses != vuses; - if (newop0 != oldop0 || newvuses != oldvuses - || newop1 != oldop1 - || newop2 != oldop2 - || newop3 != oldop3) + if (changed) { - tree t; + tree result = vn_reference_lookup_pieces (newvuses, + newoperands, + &newref); + unsigned int new_val_id; - newexpr = (tree) pool_alloc (reference_node_pool); - memcpy (newexpr, expr, tree_size (expr)); - TREE_OPERAND (newexpr, 0) = get_value_handle (newop0); - if (TREE_CODE (expr) == ARRAY_REF) - { - TREE_OPERAND (newexpr, 1) = get_value_handle (newop1); - if (newop2) - TREE_OPERAND (newexpr, 2) = get_value_handle (newop2); - if (newop3) - TREE_OPERAND (newexpr, 3) = get_value_handle (newop3); - } + if (newref) + VEC_free (vn_reference_op_s, heap, newoperands); - t = fully_constant_expression (newexpr); + if (result && is_gimple_min_invariant (result)) + return get_or_alloc_expr_for_constant (result); - if (t != newexpr) - { - pool_free (reference_node_pool, newexpr); - newexpr = t; - } - else - { - newexpr->base.ann = NULL; - vn_lookup_or_add_with_vuses (newexpr, newvuses); - set_expression_vuses (newexpr, newvuses); - } - expr = newexpr; - } - phi_trans_add (oldexpr, expr, pred, newvuses); - } - return expr; - break; - - case tcc_binary: - case tcc_comparison: - { - tree oldop1 = TREE_OPERAND (expr, 0); - tree oldval1 = oldop1; - tree oldop2 = TREE_OPERAND (expr, 1); - tree oldval2 = oldop2; - tree newop1; - tree newop2; - tree newexpr; - - oldop1 = find_leader_in_sets (oldop1, set1, set2); - newop1 = phi_translate_1 (oldop1, set1, set2, pred, phiblock, seen); - if (newop1 == NULL) - return NULL; - - oldop2 = find_leader_in_sets (oldop2, set1, set2); - newop2 = phi_translate_1 (oldop2, set1, set2, pred, phiblock, seen); - if (newop2 == NULL) - return NULL; - if (newop1 != oldop1 || newop2 != oldop2) - { - tree t; - newexpr = (tree) pool_alloc (binary_node_pool); - memcpy (newexpr, expr, tree_size (expr)); - TREE_OPERAND (newexpr, 0) = newop1 == oldop1 ? oldval1 : get_value_handle (newop1); - TREE_OPERAND (newexpr, 1) = newop2 == oldop2 ? oldval2 : get_value_handle (newop2); - t = fully_constant_expression (newexpr); - if (t != newexpr) - { - pool_free (binary_node_pool, newexpr); - newexpr = t; - } - else - { - newexpr->base.ann = NULL; - vn_lookup_or_add (newexpr); - } - expr = newexpr; - } - phi_trans_add (oldexpr, expr, pred, NULL); - } - return expr; + expr = (pre_expr) pool_alloc (pre_expr_pool); + expr->kind = REFERENCE; + expr->id = 0; - case tcc_unary: - { - tree oldop1 = TREE_OPERAND (expr, 0); - tree newop1; - tree newexpr; - - oldop1 = find_leader_in_sets (oldop1, set1, set2); - newop1 = phi_translate_1 (oldop1, set1, set2, pred, phiblock, seen); - if (newop1 == NULL) - return NULL; - if (newop1 != oldop1) - { - tree t; - newexpr = (tree) pool_alloc (unary_node_pool); - memcpy (newexpr, expr, tree_size (expr)); - TREE_OPERAND (newexpr, 0) = get_value_handle (newop1); - t = fully_constant_expression (newexpr); - if (t != newexpr) + if (newref) { - pool_free (unary_node_pool, newexpr); - newexpr = t; + PRE_EXPR_REFERENCE (expr) = newref; + new_val_id = newref->value_id; + get_or_alloc_expression_id (expr); } else { - newexpr->base.ann = NULL; - vn_lookup_or_add (newexpr); + new_val_id = get_next_value_id (); + VEC_safe_grow_cleared (bitmap_set_t, heap, value_expressions, + get_max_value_id() + 1); + newref = vn_reference_insert_pieces (newvuses, + newoperands, + result, new_val_id); + PRE_EXPR_REFERENCE (expr) = newref; + get_or_alloc_expression_id (expr); } - expr = newexpr; + add_to_value (new_val_id, expr); } - phi_trans_add (oldexpr, expr, pred, NULL); + phi_trans_add (oldexpr, expr, pred); + return expr; } - return expr; - - case tcc_exceptional: + break; + case NAME: { tree phi = NULL; edge e; tree def_stmt; - gcc_assert (TREE_CODE (expr) == SSA_NAME); + tree name = PRE_EXPR_NAME (expr); - def_stmt = SSA_NAME_DEF_STMT (expr); + def_stmt = SSA_NAME_DEF_STMT (name); if (TREE_CODE (def_stmt) == PHI_NODE && bb_for_stmt (def_stmt) == phiblock) phi = def_stmt; @@ -1320,18 +1567,18 @@ phi_translate_1 (tree expr, bitmap_set_t set1, bitmap_set_t set2, e = find_edge (pred, bb_for_stmt (phi)); if (e) { - tree val; tree def = PHI_ARG_DEF (phi, e->dest_idx); + pre_expr newexpr; + /* Handle constant. */ if (is_gimple_min_invariant (def)) - return def; + return get_or_alloc_expr_for_constant (def); if (TREE_CODE (def) == SSA_NAME && ssa_undefined_value_p (def)) return NULL; - val = get_value_handle (def); - gcc_assert (val); - return def; + newexpr = get_or_alloc_expr_for_name (def); + return newexpr; } } return expr; @@ -1346,8 +1593,8 @@ phi_translate_1 (tree expr, bitmap_set_t set1, bitmap_set_t set2, Return NULL if we can't find a leader for each part of the translated expression. */ -static tree -phi_translate (tree expr, bitmap_set_t set1, bitmap_set_t set2, +static pre_expr +phi_translate (pre_expr expr, bitmap_set_t set1, bitmap_set_t set2, basic_block pred, basic_block phiblock) { bitmap_clear (seen_during_translate); @@ -1355,7 +1602,7 @@ phi_translate (tree expr, bitmap_set_t set1, bitmap_set_t set2, seen_during_translate); } -/* For each expression in SET, translate the value handles through phi nodes +/* For each expression in SET, translate the values through phi nodes in PHIBLOCK using edge PHIBLOCK->PRED, and store the resulting expressions in DEST. */ @@ -1363,8 +1610,8 @@ static void phi_translate_set (bitmap_set_t dest, bitmap_set_t set, basic_block pred, basic_block phiblock) { - VEC (tree, heap) *exprs; - tree expr; + VEC (pre_expr, heap) *exprs; + pre_expr expr; int i; if (!phi_nodes (phiblock)) @@ -1374,23 +1621,20 @@ phi_translate_set (bitmap_set_t dest, bitmap_set_t set, basic_block pred, } exprs = sorted_array_from_bitmap_set (set); - for (i = 0; VEC_iterate (tree, exprs, i, expr); i++) + for (i = 0; VEC_iterate (pre_expr, exprs, i, expr); i++) { - tree translated; + pre_expr translated; translated = phi_translate (expr, set, NULL, pred, phiblock); /* Don't add constants or empty translations to the cache, since we won't look them up that way, or use the result, anyway. */ - if (translated && !is_gimple_min_invariant (translated)) - { - phi_trans_add (expr, translated, pred, - get_expression_vuses (translated)); - } + if (translated && !value_id_constant_p (get_expr_value_id (translated))) + phi_trans_add (expr, translated, pred); if (translated != NULL) bitmap_value_insert_into_set (dest, translated); } - VEC_free (tree, heap, exprs); + VEC_free (pre_expr, heap, exprs); } /* Find the leader for a value (i.e., the name representing that @@ -1398,15 +1642,22 @@ phi_translate_set (bitmap_set_t dest, bitmap_set_t set, basic_block pred, makes sure the defining statement for the leader dominates it. Return NULL if no leader is found. */ -static tree -bitmap_find_leader (bitmap_set_t set, tree val, tree stmt) +static pre_expr +bitmap_find_leader (bitmap_set_t set, unsigned int val, tree stmt) { - if (val == NULL) - return NULL; - - if (constant_expr_p (val)) - return val; + if (value_id_constant_p (val)) + { + unsigned int i; + bitmap_iterator bi; + bitmap_set_t exprset = VEC_index (bitmap_set_t, value_expressions, val); + FOR_EACH_EXPR_ID_IN_SET (exprset, i, bi) + { + pre_expr expr = expression_for_id (i); + if (expr->kind == CONSTANT) + return expr; + } + } if (bitmap_set_contains_value (set, val)) { /* Rather than walk the entire bitmap of expressions, and see @@ -1422,15 +1673,17 @@ bitmap_find_leader (bitmap_set_t set, tree val, tree stmt) choose which set to walk based on which set is smaller. */ unsigned int i; bitmap_iterator bi; - bitmap_set_t exprset = VALUE_HANDLE_EXPR_SET (val); + bitmap_set_t exprset = VEC_index (bitmap_set_t, value_expressions, val); EXECUTE_IF_AND_IN_BITMAP (exprset->expressions, set->expressions, 0, i, bi) { - tree val = expression_for_id (i); + pre_expr val = expression_for_id (i); + /* At the point where stmt is not null, there should always + be an SSA_NAME first in the list of expressions. */ if (stmt) { - tree def_stmt = SSA_NAME_DEF_STMT (val); + tree def_stmt = SSA_NAME_DEF_STMT (PRE_EXPR_NAME (val)); if (TREE_CODE (def_stmt) != PHI_NODE && bb_for_stmt (def_stmt) == bb_for_stmt (stmt) && stmt_ann (def_stmt)->uid >= stmt_ann (stmt)->uid) @@ -1450,11 +1703,11 @@ bitmap_find_leader (bitmap_set_t set, tree val, tree stmt) ANTIC_IN set already. */ static bool -value_dies_in_block_x (tree expr, basic_block block) +value_dies_in_block_x (pre_expr expr, basic_block block) { int i; tree vuse; - VEC (tree, gc) *vuses = get_expression_vuses (expr); + VEC (tree, gc) *vuses = PRE_EXPR_REFERENCE (expr)->vuses; /* Conservatively, a value dies if it's vuses are defined in this block, unless they come from phi nodes (which are merge operations, @@ -1472,120 +1725,115 @@ value_dies_in_block_x (tree expr, basic_block block) return false; } -/* Determine if the expression EXPR is valid in SET1 U SET2. - ONLY SET2 CAN BE NULL. - This means that we have a leader for each part of the expression - (if it consists of values), or the expression is an SSA_NAME. - For loads/calls, we also see if the vuses are killed in this block. - - NB: We never should run into a case where we have SSA_NAME + - SSA_NAME or SSA_NAME + value. The sets valid_in_sets is called on, - the ANTIC sets, will only ever have SSA_NAME's or value expressions - (IE VALUE1 + VALUE2, *VALUE1, VALUE1 < VALUE2) */ #define union_contains_value(SET1, SET2, VAL) \ (bitmap_set_contains_value ((SET1), (VAL)) \ || ((SET2) && bitmap_set_contains_value ((SET2), (VAL)))) +/* Determine if vn_reference_op_t VRO is legal in SET1 U SET2. + */ static bool -valid_in_sets (bitmap_set_t set1, bitmap_set_t set2, tree expr, - basic_block block) +vro_valid_in_sets (bitmap_set_t set1, bitmap_set_t set2, + vn_reference_op_t vro) { - switch (TREE_CODE_CLASS (TREE_CODE (expr))) + if (vro->op0 && TREE_CODE (vro->op0) == SSA_NAME) { - case tcc_binary: - case tcc_comparison: - { - tree op1 = TREE_OPERAND (expr, 0); - tree op2 = TREE_OPERAND (expr, 1); + struct pre_expr_d temp; + temp.kind = NAME; + temp.id = 0; + PRE_EXPR_NAME (&temp) = vro->op0; + temp.id = lookup_expression_id (&temp); + if (temp.id == 0) + return false; + if (!union_contains_value (set1, set2, + get_expr_value_id (&temp))) + return false; + } + if (vro->op1 && TREE_CODE (vro->op1) == SSA_NAME) + { + struct pre_expr_d temp; + temp.kind = NAME; + temp.id = 0; + PRE_EXPR_NAME (&temp) = vro->op1; + temp.id = lookup_expression_id (&temp); + if (temp.id == 0) + return false; + if (!union_contains_value (set1, set2, + get_expr_value_id (&temp))) + return false; + } - return union_contains_value (set1, set2, op1) - && union_contains_value (set1, set2, op2); - } + if (vro->op2 && TREE_CODE (vro->op2) == SSA_NAME) + { + struct pre_expr_d temp; + temp.kind = NAME; + temp.id = 0; + PRE_EXPR_NAME (&temp) = vro->op2; + temp.id = lookup_expression_id (&temp); + if (temp.id == 0) + return false; + if (!union_contains_value (set1, set2, + get_expr_value_id (&temp))) + return false; + } - case tcc_unary: - { - tree op1 = TREE_OPERAND (expr, 0); - return union_contains_value (set1, set2, op1); - } + return true; +} - case tcc_expression: - return false; +/* Determine if the expression EXPR is valid in SET1 U SET2. + ONLY SET2 CAN BE NULL. + This means that we have a leader for each part of the expression + (if it consists of values), or the expression is an SSA_NAME. + For loads/calls, we also see if the vuses are killed in this block. +*/ - case tcc_vl_exp: +static bool +valid_in_sets (bitmap_set_t set1, bitmap_set_t set2, pre_expr expr, + basic_block block) +{ + switch (expr->kind) + { + case NAME: + return bitmap_set_contains_expr (AVAIL_OUT (block), expr); + case NARY: { - if (TREE_CODE (expr) == CALL_EXPR) + unsigned int i; + vn_nary_op_t nary = PRE_EXPR_NARY (expr); + for (i = 0; i < nary->length; i++) { - tree fn = CALL_EXPR_FN (expr); - tree sc = CALL_EXPR_STATIC_CHAIN (expr); - tree arg; - call_expr_arg_iterator iter; - - /* Check the non-argument operands first. */ - if (!union_contains_value (set1, set2, fn) - || (sc && !union_contains_value (set1, set2, sc))) - return false; - - /* Now check the operands. */ - FOR_EACH_CALL_EXPR_ARG (arg, iter, expr) + if (TREE_CODE (nary->op[i]) == SSA_NAME) { - if (!union_contains_value (set1, set2, arg)) + struct pre_expr_d temp; + temp.kind = NAME; + temp.id = 0; + PRE_EXPR_NAME (&temp) = nary->op[i]; + temp.id = lookup_expression_id (&temp); + if (temp.id == 0) + return false; + if (!union_contains_value (set1, set2, + get_expr_value_id (&temp))) return false; } - return !value_dies_in_block_x (expr, block); } - return false; + return true; } - - case tcc_reference: + break; + case REFERENCE: { - if (TREE_CODE (expr) == INDIRECT_REF - || TREE_CODE (expr) == COMPONENT_REF - || TREE_CODE (expr) == ARRAY_REF) + vn_reference_t ref = PRE_EXPR_REFERENCE (expr); + vn_reference_op_t vro; + unsigned int i; + + for (i = 0; VEC_iterate (vn_reference_op_s, ref->operands, i, vro); i++) { - tree op0 = TREE_OPERAND (expr, 0); - gcc_assert (is_gimple_min_invariant (op0) - || TREE_CODE (op0) == VALUE_HANDLE); - if (!union_contains_value (set1, set2, op0)) + if (!vro_valid_in_sets (set1, set2, vro)) return false; - if (TREE_CODE (expr) == ARRAY_REF) - { - tree op1 = TREE_OPERAND (expr, 1); - tree op2 = TREE_OPERAND (expr, 2); - tree op3 = TREE_OPERAND (expr, 3); - gcc_assert (is_gimple_min_invariant (op1) - || TREE_CODE (op1) == VALUE_HANDLE); - if (!union_contains_value (set1, set2, op1)) - return false; - gcc_assert (!op2 || is_gimple_min_invariant (op2) - || TREE_CODE (op2) == VALUE_HANDLE); - if (op2 - && !union_contains_value (set1, set2, op2)) - return false; - gcc_assert (!op3 || is_gimple_min_invariant (op3) - || TREE_CODE (op3) == VALUE_HANDLE); - if (op3 - && !union_contains_value (set1, set2, op3)) - return false; - } - return !value_dies_in_block_x (expr, block); } + return !value_dies_in_block_x (expr, block); } - return false; - - case tcc_exceptional: - { - gcc_assert (TREE_CODE (expr) == SSA_NAME); - return bitmap_set_contains_expr (AVAIL_OUT (block), expr); - } - - case tcc_declaration: - return !value_dies_in_block_x (expr, block); - default: - /* No other cases should be encountered. */ gcc_unreachable (); - } + } } /* Clean the set of expressions that are no longer valid in SET1 or @@ -1597,16 +1845,16 @@ valid_in_sets (bitmap_set_t set1, bitmap_set_t set2, tree expr, static void dependent_clean (bitmap_set_t set1, bitmap_set_t set2, basic_block block) { - VEC (tree, heap) *exprs = sorted_array_from_bitmap_set (set1); - tree expr; + VEC (pre_expr, heap) *exprs = sorted_array_from_bitmap_set (set1); + pre_expr expr; int i; - for (i = 0; VEC_iterate (tree, exprs, i, expr); i++) + for (i = 0; VEC_iterate (pre_expr, exprs, i, expr); i++) { if (!valid_in_sets (set1, set2, expr, block)) bitmap_remove_from_set (set1, expr); } - VEC_free (tree, heap, exprs); + VEC_free (pre_expr, heap, exprs); } /* Clean the set of expressions that are no longer valid in SET. This @@ -1616,16 +1864,16 @@ dependent_clean (bitmap_set_t set1, bitmap_set_t set2, basic_block block) static void clean (bitmap_set_t set, basic_block block) { - VEC (tree, heap) *exprs = sorted_array_from_bitmap_set (set); - tree expr; + VEC (pre_expr, heap) *exprs = sorted_array_from_bitmap_set (set); + pre_expr expr; int i; - for (i = 0; VEC_iterate (tree, exprs, i, expr); i++) + for (i = 0; VEC_iterate (pre_expr, exprs, i, expr); i++) { if (!valid_in_sets (set, NULL, expr, block)) bitmap_remove_from_set (set, expr); } - VEC_free (tree, heap, exprs); + VEC_free (pre_expr, heap, exprs); } static sbitmap has_abnormal_preds; @@ -1967,73 +2215,6 @@ compute_partial_antic_aux (basic_block block, return changed; } -/* Initialize data structures used for ANTIC and AVAIL. */ - -static void -init_antic (void) -{ - basic_block bb; - - next_expression_id = 0; - expressions = NULL; - expression_vuses = NULL; - - postorder = XNEWVEC (int, n_basic_blocks - NUM_FIXED_BLOCKS); - post_order_compute (postorder, false, false); - - bitmap_obstack_initialize (&grand_bitmap_obstack); - obstack_init (&temp_call_expr_obstack); - seen_during_translate = BITMAP_ALLOC (&grand_bitmap_obstack); - - bitmap_set_pool = create_alloc_pool ("Bitmap sets", - sizeof (struct bitmap_set), 30); - binary_node_pool = create_alloc_pool ("Binary tree nodes", - tree_code_size (PLUS_EXPR), 30); - unary_node_pool = create_alloc_pool ("Unary tree nodes", - tree_code_size (NEGATE_EXPR), 30); - reference_node_pool = create_alloc_pool ("Reference tree nodes", - tree_code_size (ARRAY_REF), 30); - comparison_node_pool = create_alloc_pool ("Comparison tree nodes", - tree_code_size (EQ_EXPR), 30); - - phi_translate_table = htab_create (5110, expr_pred_trans_hash, - expr_pred_trans_eq, free); - maximal_set = in_fre ? NULL : bitmap_set_new (); - - FOR_ALL_BB (bb) - { - bb->aux = xcalloc (1, sizeof (struct bb_bitmap_sets)); - EXP_GEN (bb) = bitmap_set_new (); - PHI_GEN (bb) = bitmap_set_new (); - TMP_GEN (bb) = bitmap_set_new (); - AVAIL_OUT (bb) = bitmap_set_new (); - } -} - -/* Deinitialize data structures used for ANTIC and AVAIL. */ - -static void -fini_antic (void) -{ - basic_block bb; - - if (maximal_set) - bitmap_set_free (maximal_set); - free (postorder); - bitmap_obstack_release (&grand_bitmap_obstack); - free_alloc_pool (bitmap_set_pool); - free_alloc_pool (binary_node_pool); - free_alloc_pool (reference_node_pool); - free_alloc_pool (unary_node_pool); - free_alloc_pool (comparison_node_pool); - - FOR_ALL_BB (bb) - { - free (bb->aux); - bb->aux = NULL; - } -} - /* Compute ANTIC and partial ANTIC sets. */ static void @@ -2160,22 +2341,6 @@ is_exception_related (tree op) return TREE_CODE (op) == FILTER_EXPR || TREE_CODE (op) == EXC_PTR_EXPR; } -/* Return true if OP is a tree which we can perform value numbering - on. */ - -static bool -can_value_number_operation (tree op) -{ - return (UNARY_CLASS_P (op) - && !is_exception_related (TREE_OPERAND (op, 0))) - || BINARY_CLASS_P (op) - || COMPARISON_CLASS_P (op) - || REFERENCE_CLASS_P (op) - || (TREE_CODE (op) == CALL_EXPR - && can_value_number_call (op)); -} - - /* Return true if OP is a tree which we can perform PRE on on. This may not match the operations we can value number, but in a perfect world would. */ @@ -2218,90 +2383,203 @@ static VEC(tree, heap) *need_creation; are doing. */ static tree -create_component_ref_by_pieces (basic_block block, tree expr, tree stmts, - tree domstmt) +create_component_ref_by_pieces (basic_block block, vn_reference_t ref, + unsigned int operand, + tree stmts, + tree domstmt, + bool in_call) { - tree genop = expr; - tree folded; - - if (TREE_CODE (genop) == VALUE_HANDLE) + vn_reference_op_t currop = VEC_index (vn_reference_op_s, ref->operands, + operand); + tree genop; + switch (currop->opcode) { - tree found = bitmap_find_leader (AVAIL_OUT (block), expr, domstmt); - if (found) - return found; - } + case CALL_EXPR: + { + tree folded; + unsigned int i; + vn_reference_op_t declop = VEC_index (vn_reference_op_s, + ref->operands, 1); + unsigned int nargs = VEC_length (vn_reference_op_s, ref->operands) - 2; + tree *args = XNEWVEC (tree, nargs); - if (TREE_CODE (genop) == VALUE_HANDLE) - { - bitmap_set_t exprset = VALUE_HANDLE_EXPR_SET (expr); - unsigned int firstbit = bitmap_first_set_bit (exprset->expressions); - genop = expression_for_id (firstbit); - } + for (i = 0; i < nargs; i++) + { + args[i] = create_component_ref_by_pieces (block, ref, + operand + 2 + i, stmts, + domstmt, true); + } + folded = build_call_array (currop->type, declop->op0, nargs, args); + free (args); + return folded; + } + break; + case REALPART_EXPR: + case IMAGPART_EXPR: + case VIEW_CONVERT_EXPR: + { + tree folded; + tree genop0 = create_component_ref_by_pieces (block, ref, + operand + 1, + stmts, domstmt, + in_call); + if (!genop0) + return NULL_TREE; + folded = fold_build1 (currop->opcode, currop->type, + genop0); + return folded; + } + break; + case ALIGN_INDIRECT_REF: + case MISALIGNED_INDIRECT_REF: + case INDIRECT_REF: + { + /* Inside a CALL_EXPR op0 is the actual indirect_ref. */ + if (in_call) + { + tree folded; + tree op0 = TREE_OPERAND (currop->op0, 0); + pre_expr op0expr = get_or_alloc_expr_for (op0); + tree genop0 = find_or_generate_expression (block, op0expr, stmts, + domstmt); + if (!genop0) + return NULL_TREE; + folded = fold_build1 (currop->opcode, currop->type, + genop0); + return folded; + } + else + { - switch TREE_CODE (genop) - { - case ARRAY_REF: + tree folded; + tree genop1 = create_component_ref_by_pieces (block, ref, + operand + 1, + stmts, domstmt, + in_call); + if (!genop1) + return NULL_TREE; + genop1 = fold_convert (build_pointer_type (currop->type), + genop1); + + folded = fold_build1 (currop->opcode, currop->type, + genop1); + return folded; + } + } + break; + case BIT_FIELD_REF: { - tree op0; - tree op1, op2, op3; - op0 = create_component_ref_by_pieces (block, - TREE_OPERAND (genop, 0), - stmts, domstmt); - op1 = TREE_OPERAND (genop, 1); - if (TREE_CODE (op1) == VALUE_HANDLE) - op1 = find_or_generate_expression (block, op1, stmts, domstmt); - op2 = TREE_OPERAND (genop, 2); - if (op2 && TREE_CODE (op2) == VALUE_HANDLE) - op2 = find_or_generate_expression (block, op2, stmts, domstmt); - op3 = TREE_OPERAND (genop, 3); - if (op3 && TREE_CODE (op3) == VALUE_HANDLE) - op3 = find_or_generate_expression (block, op3, stmts, domstmt); - if (!op0 || !op1) + tree folded; + tree genop0 = create_component_ref_by_pieces (block, ref, operand + 1, + stmts, domstmt, + in_call); + pre_expr op1expr = get_or_alloc_expr_for (currop->op0); + pre_expr op2expr = get_or_alloc_expr_for (currop->op1); + tree genop1; + tree genop2; + + if (!genop0) + return NULL_TREE; + genop1 = find_or_generate_expression (block, op1expr, stmts, domstmt); + if (!genop1) + return NULL_TREE; + genop2 = find_or_generate_expression (block, op2expr, stmts, domstmt); + if (!genop2) return NULL_TREE; - folded = build4 (ARRAY_REF, TREE_TYPE (genop), op0, op1, - op2, op3); + folded = fold_build3 (BIT_FIELD_REF, currop->type, genop0, genop1, + genop2); return folded; } + + /* For array ref vn_reference_op's, operand 1 of the array ref + is op0 of the reference op and operand 3 of the array ref is + op1. */ + case ARRAY_RANGE_REF: + case ARRAY_REF: + { + vn_reference_op_t op0expr; + tree genop0; + tree genop1 = currop->op0; + pre_expr op1expr; + tree genop2 = currop->op1; + pre_expr op2expr; + tree genop3; + op0expr = VEC_index (vn_reference_op_s, ref->operands, operand + 1); + genop0 = create_component_ref_by_pieces (block, ref, operand + 1, + stmts, domstmt, + in_call); + if (!genop0) + return NULL_TREE; + op1expr = get_or_alloc_expr_for (genop1); + genop1 = find_or_generate_expression (block, op1expr, stmts, domstmt); + if (!genop1) + return NULL_TREE; + if (genop2) + { + op2expr = get_or_alloc_expr_for (genop2); + genop2 = find_or_generate_expression (block, op2expr, stmts, + domstmt); + if (!genop2) + return NULL_TREE; + } + + genop3 = currop->op2; + return build4 (currop->opcode, currop->type, genop0, genop1, + genop2, genop3); + } case COMPONENT_REF: { tree op0; tree op1; - op0 = create_component_ref_by_pieces (block, - TREE_OPERAND (genop, 0), - stmts, domstmt); + tree genop2 = currop->op1; + pre_expr op2expr; + op0 = create_component_ref_by_pieces (block, ref, operand + 1, + stmts, domstmt, in_call); if (!op0) return NULL_TREE; /* op1 should be a FIELD_DECL, which are represented by themselves. */ - op1 = TREE_OPERAND (genop, 1); - folded = fold_build3 (COMPONENT_REF, TREE_TYPE (genop), op0, op1, - NULL_TREE); - return folded; + op1 = currop->op0; + if (genop2) + { + op2expr = get_or_alloc_expr_for (genop2); + genop2 = find_or_generate_expression (block, op2expr, stmts, + domstmt); + if (!genop2) + return NULL_TREE; + } + + return fold_build3 (COMPONENT_REF, TREE_TYPE (op1), op0, op1, + genop2); } break; - case INDIRECT_REF: + case SSA_NAME: { - tree op1 = TREE_OPERAND (genop, 0); - tree genop1 = find_or_generate_expression (block, op1, stmts, domstmt); - if (!genop1) - return NULL_TREE; - - folded = fold_build1 (TREE_CODE (genop), TREE_TYPE (genop), - genop1); - return folded; + pre_expr op0expr = get_or_alloc_expr_for (currop->op0); + genop = find_or_generate_expression (block, op0expr, stmts, domstmt); + return genop; } - break; + case STRING_CST: + case INTEGER_CST: + case COMPLEX_CST: + case VECTOR_CST: + case REAL_CST: + case CONSTRUCTOR: case VAR_DECL: case PARM_DECL: + case CONST_DECL: case RESULT_DECL: - case SSA_NAME: - case STRING_CST: - return genop; + case FUNCTION_DECL: + /* For ADDR_EXPR in a CALL_EXPR, op0 is actually the entire + ADDR_EXPR, not just it's operand. */ + case ADDR_EXPR: + if (currop->opcode == ADDR_EXPR) + gcc_assert (currop->op0 != NULL); + return currop->op0; + default: gcc_unreachable (); } - - return NULL_TREE; } /* Find a leader for an expression, or generate one using @@ -2318,31 +2596,40 @@ create_component_ref_by_pieces (basic_block block, tree expr, tree stmts, on failure. */ static tree -find_or_generate_expression (basic_block block, tree expr, tree stmts, +find_or_generate_expression (basic_block block, pre_expr expr, tree stmts, tree domstmt) { - tree genop = bitmap_find_leader (AVAIL_OUT (block), expr, domstmt); + pre_expr leader = bitmap_find_leader (AVAIL_OUT (block), + get_expr_value_id (expr), domstmt); + tree genop = NULL; + if (leader) + { + if (leader->kind == NAME) + genop = PRE_EXPR_NAME (leader); + else if (leader->kind == CONSTANT) + genop = PRE_EXPR_CONSTANT (leader); + } /* If it's still NULL, it must be a complex expression, so generate it recursively. */ if (genop == NULL) { - bitmap_set_t exprset = VALUE_HANDLE_EXPR_SET (expr); + bitmap_set_t exprset; + unsigned int lookfor = get_expr_value_id (expr); bool handled = false; bitmap_iterator bi; unsigned int i; - /* We will hit cases where we have SSA_NAME's in exprset before - other operations, because we may have come up with the SCCVN - value before getting to the RHS of the expression. */ + exprset = VEC_index (bitmap_set_t, value_expressions, lookfor); FOR_EACH_EXPR_ID_IN_SET (exprset, i, bi) { - genop = expression_for_id (i); - if (can_PRE_operation (genop)) + pre_expr temp = expression_for_id (i); + if (temp->kind != NAME) { handled = true; - genop = create_expression_by_pieces (block, genop, stmts, - domstmt); + genop = create_expression_by_pieces (block, temp, stmts, + domstmt, + get_expr_type (expr)); break; } } @@ -2355,6 +2642,7 @@ find_or_generate_expression (basic_block block, tree expr, tree stmts, } #define NECESSARY(stmt) stmt->base.asm_written_flag + /* Create an expression in pieces, so that we can handle very complex expressions that may be ANTIC, but not necessary GIMPLE. BLOCK is the basic block the expression will be inserted into, @@ -2374,109 +2662,84 @@ find_or_generate_expression (basic_block block, tree expr, tree stmts, can return NULL_TREE to signal failure. */ static tree -create_expression_by_pieces (basic_block block, tree expr, tree stmts, - tree domstmt) +create_expression_by_pieces (basic_block block, pre_expr expr, tree stmts, + tree domstmt, + tree type) { tree temp, name; tree folded, forced_stmts, newexpr; - tree v; + unsigned int value_id; tree_stmt_iterator tsi; + tree exprtype = type ? type : get_expr_type (expr); + pre_expr nameexpr; - switch (TREE_CODE_CLASS (TREE_CODE (expr))) + switch (expr->kind) { - case tcc_vl_exp: + /* We may hit the NAME/CONSTANT case if we have to convert types + that value numbering saw through. */ + case NAME: + folded = PRE_EXPR_NAME (expr); + break; + case CONSTANT: + folded = PRE_EXPR_CONSTANT (expr); + break; + case REFERENCE: { - tree fn, sc; - tree genfn; - int i, nargs; - tree *buffer; - - gcc_assert (TREE_CODE (expr) == CALL_EXPR); - - fn = CALL_EXPR_FN (expr); - sc = CALL_EXPR_STATIC_CHAIN (expr); - - genfn = find_or_generate_expression (block, fn, stmts, domstmt); - if (!genfn) - return NULL_TREE; - - nargs = call_expr_nargs (expr); - buffer = (tree*) alloca (nargs * sizeof (tree)); - - for (i = 0; i < nargs; i++) - { - tree arg = CALL_EXPR_ARG (expr, i); - buffer[i] = find_or_generate_expression (block, arg, stmts, - domstmt); - if (!buffer[i]) - return NULL_TREE; - } - - folded = build_call_array (TREE_TYPE (expr), genfn, nargs, buffer); - if (sc) - { - CALL_EXPR_STATIC_CHAIN (folded) = - find_or_generate_expression (block, sc, stmts, domstmt); - if (!CALL_EXPR_STATIC_CHAIN (folded)) - return NULL_TREE; - } - folded = fold (folded); - break; + vn_reference_t ref = PRE_EXPR_REFERENCE (expr); + folded = create_component_ref_by_pieces (block, ref, 0, stmts, + domstmt, false); } break; - case tcc_reference: + case NARY: { - if (TREE_CODE (expr) == COMPONENT_REF - || TREE_CODE (expr) == ARRAY_REF) - { - folded = create_component_ref_by_pieces (block, expr, stmts, - domstmt); - if (!folded) - return NULL_TREE; - } - else + vn_nary_op_t nary = PRE_EXPR_NARY (expr); + switch (nary->length) { - tree op1 = TREE_OPERAND (expr, 0); - tree genop1 = find_or_generate_expression (block, op1, stmts, - domstmt); - if (!genop1) - return NULL_TREE; - - folded = fold_build1 (TREE_CODE (expr), TREE_TYPE (expr), - genop1); + case 2: + { + pre_expr op1 = get_or_alloc_expr_for (nary->op[0]); + pre_expr op2 = get_or_alloc_expr_for (nary->op[1]); + tree genop1 = find_or_generate_expression (block, op1, + stmts, domstmt); + tree genop2 = find_or_generate_expression (block, op2, + stmts, domstmt); + if (!genop1 || !genop2) + return NULL_TREE; + genop1 = fold_convert (TREE_TYPE (nary->op[0]), + genop1); + /* Ensure op2 is a sizetype for POINTER_PLUS_EXPR. It + may be a constant with the wrong type. */ + if (nary->opcode == POINTER_PLUS_EXPR) + genop2 = fold_convert (sizetype, genop2); + else + genop2 = fold_convert (TREE_TYPE (nary->op[1]), genop2); + + folded = fold_build2 (nary->opcode, nary->type, + genop1, genop2); + } + break; + case 1: + { + pre_expr op1 = get_or_alloc_expr_for (nary->op[0]); + tree genop1 = find_or_generate_expression (block, op1, + stmts, domstmt); + if (!genop1) + return NULL_TREE; + genop1 = fold_convert (TREE_TYPE (nary->op[0]), genop1); + + folded = fold_build1 (nary->opcode, nary->type, + genop1); + } + break; + default: + return NULL_TREE; } - break; } - - case tcc_binary: - case tcc_comparison: - { - tree op1 = TREE_OPERAND (expr, 0); - tree op2 = TREE_OPERAND (expr, 1); - tree genop1 = find_or_generate_expression (block, op1, stmts, domstmt); - tree genop2 = find_or_generate_expression (block, op2, stmts, domstmt); - if (!genop1 || !genop2) - return NULL_TREE; - folded = fold_build2 (TREE_CODE (expr), TREE_TYPE (expr), - genop1, genop2); - break; - } - - case tcc_unary: - { - tree op1 = TREE_OPERAND (expr, 0); - tree genop1 = find_or_generate_expression (block, op1, stmts, domstmt); - if (!genop1) - return NULL_TREE; - folded = fold_build1 (TREE_CODE (expr), TREE_TYPE (expr), - genop1); - break; - } - + break; default: - gcc_unreachable (); + return NULL_TREE; } - + folded = fold_convert (exprtype, folded); /* Force the generated expression to be a sequence of GIMPLE statements. We have to call unshare_expr because force_gimple_operand may @@ -2493,14 +2756,18 @@ create_expression_by_pieces (basic_block block, tree expr, tree stmts, { tree stmt = tsi_stmt (tsi); tree forcedname = GIMPLE_STMT_OPERAND (stmt, 0); - tree forcedexpr = GIMPLE_STMT_OPERAND (stmt, 1); - tree val = vn_lookup_or_add (forcedexpr); + pre_expr nameexpr; VEC_safe_push (tree, heap, inserted_exprs, stmt); - VN_INFO_GET (forcedname)->valnum = forcedname; - vn_add (forcedname, val); - bitmap_value_replace_in_set (NEW_SETS (block), forcedname); - bitmap_value_replace_in_set (AVAIL_OUT (block), forcedname); + if (TREE_CODE (forcedname) == SSA_NAME) + { + VN_INFO_GET (forcedname)->valnum = forcedname; + VN_INFO (forcedname)->value_id = get_next_value_id (); + nameexpr = get_or_alloc_expr_for_name (forcedname); + add_to_value (VN_INFO (forcedname)->value_id, nameexpr); + bitmap_value_replace_in_set (NEW_SETS (block), nameexpr); + bitmap_value_replace_in_set (AVAIL_OUT (block), nameexpr); + } mark_symbols_for_renaming (stmt); } tsi = tsi_last (stmts); @@ -2509,17 +2776,17 @@ create_expression_by_pieces (basic_block block, tree expr, tree stmts, /* Build and insert the assignment of the end result to the temporary that we will return. */ - if (!pretemp || TREE_TYPE (expr) != TREE_TYPE (pretemp)) + if (!pretemp || exprtype != TREE_TYPE (pretemp)) { - pretemp = create_tmp_var (TREE_TYPE (expr), "pretmp"); + pretemp = create_tmp_var (exprtype, "pretmp"); get_var_ann (pretemp); } temp = pretemp; add_referenced_var (temp); - if (TREE_CODE (TREE_TYPE (expr)) == COMPLEX_TYPE - || TREE_CODE (TREE_TYPE (expr)) == VECTOR_TYPE) + if (TREE_CODE (exprtype) == COMPLEX_TYPE + || TREE_CODE (exprtype) == VECTOR_TYPE) DECL_GIMPLE_REG_P (temp) = 1; newexpr = build_gimple_modify_stmt (temp, newexpr); @@ -2534,18 +2801,19 @@ create_expression_by_pieces (basic_block block, tree expr, tree stmts, /* All the symbols in NEWEXPR should be put into SSA form. */ mark_symbols_for_renaming (newexpr); - /* Add a value handle to the temporary. + /* Add a value number to the temporary. The value may already exist in either NEW_SETS, or AVAIL_OUT, because we are creating the expression by pieces, and this particular piece of the expression may have been represented. There is no harm in replacing here. */ - v = get_value_handle (expr); - vn_add (name, v); VN_INFO_GET (name)->valnum = name; - get_or_alloc_expression_id (name); + value_id = get_expr_value_id (expr); + VN_INFO (name)->value_id = value_id; + nameexpr = get_or_alloc_expr_for_name (name); + add_to_value (value_id, nameexpr); if (!in_fre) - bitmap_value_replace_in_set (NEW_SETS (block), name); - bitmap_value_replace_in_set (AVAIL_OUT (block), name); + bitmap_value_replace_in_set (NEW_SETS (block), nameexpr); + bitmap_value_replace_in_set (AVAIL_OUT (block), nameexpr); pre_stats.insertions++; if (dump_file && (dump_flags & TDF_DETAILS)) @@ -2558,39 +2826,38 @@ create_expression_by_pieces (basic_block block, tree expr, tree stmts, return name; } + /* Insert the to-be-made-available values of expression EXPRNUM for each predecessor, stored in AVAIL, into the predecessors of BLOCK, and - merge the result with a phi node, given the same value handle as + merge the result with a phi node, given the same value number as NODE. Return true if we have inserted new stuff. */ static bool insert_into_preds_of_block (basic_block block, unsigned int exprnum, - tree *avail) + pre_expr *avail) { - tree expr = expression_for_id (exprnum); - tree val = get_value_handle (expr); + pre_expr expr = expression_for_id (exprnum); + pre_expr newphi; + unsigned int val = get_expr_value_id (expr); edge pred; bool insertions = false; bool nophi = false; basic_block bprime; - tree eprime; + pre_expr eprime; edge_iterator ei; - tree type = TREE_TYPE (avail[EDGE_PRED (block, 0)->src->index]); + tree type = get_expr_type (expr); tree temp; if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, "Found partial redundancy for expression "); - print_generic_expr (dump_file, expr, 0); - fprintf (dump_file, " ("); - print_generic_expr (dump_file, val, 0); - fprintf (dump_file, ")"); - fprintf (dump_file, "\n"); + print_pre_expr (dump_file, expr); + fprintf (dump_file, " (%04d)\n", val); } /* Make sure we aren't creating an induction variable. */ if (block->loop_depth > 0 && EDGE_COUNT (block->preds) == 2 - && TREE_CODE_CLASS (TREE_CODE (expr)) != tcc_reference ) + && expr->kind != REFERENCE) { bool firstinsideloop = false; bool secondinsideloop = false; @@ -2616,16 +2883,104 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum, bprime = pred->src; eprime = avail[bprime->index]; - if (can_PRE_operation (eprime)) + if (eprime->kind != NAME && eprime->kind != CONSTANT) { builtexpr = create_expression_by_pieces (bprime, eprime, - stmts, NULL_TREE); + stmts, NULL_TREE, + type); gcc_assert (!(pred->flags & EDGE_ABNORMAL)); bsi_insert_on_edge (pred, stmts); - avail[bprime->index] = builtexpr; + avail[bprime->index] = get_or_alloc_expr_for_name (builtexpr); insertions = true; } + else if (eprime->kind == CONSTANT) + { + /* Constants may not have the right type, fold_convert + should give us back a constant with the right type. + */ + tree constant = PRE_EXPR_CONSTANT (eprime); + if (TREE_TYPE (constant) != type) + { + tree builtexpr = fold_convert (type, constant); + if (is_gimple_min_invariant (builtexpr)) + { + PRE_EXPR_CONSTANT (eprime) = builtexpr; + } + else + { + tree forcedexpr = force_gimple_operand (builtexpr, + &stmts, true, + NULL); + if (is_gimple_min_invariant (forcedexpr)) + { + PRE_EXPR_CONSTANT (eprime) = forcedexpr; + } + else + { + if (forcedexpr != builtexpr) + { + VN_INFO_GET (forcedexpr)->valnum = PRE_EXPR_CONSTANT (eprime); + VN_INFO (forcedexpr)->value_id = get_expr_value_id (eprime); + } + if (stmts) + { + tree_stmt_iterator tsi; + tsi = tsi_start (stmts); + for (; !tsi_end_p (tsi); tsi_next (&tsi)) + { + tree stmt = tsi_stmt (tsi); + tree lhs = GIMPLE_STMT_OPERAND (stmt, 0); + VEC_safe_push (tree, heap, inserted_exprs, stmt); + NECESSARY (lhs) = 0; + } + bsi_insert_on_edge (pred, stmts); + } + NECESSARY (forcedexpr) = 0; + avail[bprime->index] = get_or_alloc_expr_for_name (forcedexpr); + } + } + } + } + else if (eprime->kind == NAME) + { + /* We may have to do a conversion because our value + numbering can look through types in certain cases, but + our IL requires all operands of a phi node have the same + type. */ + tree name = PRE_EXPR_NAME (eprime); + if (!useless_type_conversion_p (type, TREE_TYPE (name))) + { + tree builtexpr; + tree forcedexpr; + builtexpr = fold_convert (type, name); + forcedexpr = force_gimple_operand (builtexpr, + &stmts, true, + NULL); + + if (forcedexpr != name) + { + VN_INFO_GET (forcedexpr)->valnum = VN_INFO (name)->valnum; + VN_INFO (forcedexpr)->value_id = VN_INFO (name)->value_id; + } + + if (stmts) + { + tree_stmt_iterator tsi; + tsi = tsi_start (stmts); + for (; !tsi_end_p (tsi); tsi_next (&tsi)) + { + tree stmt = tsi_stmt (tsi); + tree lhs = GIMPLE_STMT_OPERAND (stmt, 0); + VEC_safe_push (tree, heap, inserted_exprs, stmt); + NECESSARY (lhs) = 0; + } + bsi_insert_on_edge (pred, stmts); + } + NECESSARY (forcedexpr) = 0; + avail[bprime->index] = get_or_alloc_expr_for_name (forcedexpr); + } + } } /* If we didn't want a phi node, and we made insertions, we still have inserted new stuff, and thus return true. If we didn't want a phi node, @@ -2646,7 +3001,6 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum, temp = prephitemp; add_referenced_var (temp); - if (TREE_CODE (type) == COMPLEX_TYPE || TREE_CODE (type) == VECTOR_TYPE) DECL_GIMPLE_REG_P (temp) = 1; @@ -2654,12 +3008,21 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum, NECESSARY (temp) = 0; VN_INFO_GET (PHI_RESULT (temp))->valnum = PHI_RESULT (temp); - + VN_INFO (PHI_RESULT (temp))->value_id = val; VEC_safe_push (tree, heap, inserted_exprs, temp); FOR_EACH_EDGE (pred, ei, block->preds) - add_phi_arg (temp, avail[pred->src->index], pred); + { + pre_expr ae = avail[pred->src->index]; + gcc_assert (get_expr_type (ae) == type + || useless_type_conversion_p (type, get_expr_type (ae))); + if (ae->kind == CONSTANT) + add_phi_arg (temp, PRE_EXPR_CONSTANT (ae), pred); + else + add_phi_arg (temp, PRE_EXPR_NAME (avail[pred->src->index]), pred); + } - vn_add (PHI_RESULT (temp), val); + newphi = get_or_alloc_expr_for_name (PHI_RESULT (temp)); + add_to_value (val, newphi); /* The value should *not* exist in PHI_GEN, or else we wouldn't be doing this insertion, since we test for the existence of this value in PHI_GEN @@ -2675,12 +3038,11 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum, AVAIL_OUT, and would have been skipped due to the full redundancy check. */ - bitmap_insert_into_set (PHI_GEN (block), - PHI_RESULT (temp)); + bitmap_insert_into_set (PHI_GEN (block), newphi); bitmap_value_replace_in_set (AVAIL_OUT (block), - PHI_RESULT (temp)); + newphi); bitmap_insert_into_set (NEW_SETS (block), - PHI_RESULT (temp)); + newphi); if (dump_file && (dump_flags & TDF_DETAILS)) { @@ -2716,26 +3078,26 @@ static bool do_regular_insertion (basic_block block, basic_block dom) { bool new_stuff = false; - VEC (tree, heap) *exprs = sorted_array_from_bitmap_set (ANTIC_IN (block)); - tree expr; + VEC (pre_expr, heap) *exprs = sorted_array_from_bitmap_set (ANTIC_IN (block)); + pre_expr expr; int i; - for (i = 0; VEC_iterate (tree, exprs, i, expr); i++) + for (i = 0; VEC_iterate (pre_expr, exprs, i, expr); i++) { - if (can_PRE_operation (expr) && !AGGREGATE_TYPE_P (TREE_TYPE (expr))) + if (expr->kind != NAME) { - tree *avail; - tree val; + pre_expr *avail; + unsigned int val; bool by_some = false; bool cant_insert = false; bool all_same = true; - tree first_s = NULL; + pre_expr first_s = NULL; edge pred; basic_block bprime; - tree eprime = NULL_TREE; + pre_expr eprime = NULL; edge_iterator ei; - val = get_value_handle (expr); + val = get_expr_value_id (expr); if (bitmap_set_contains_value (PHI_GEN (block), val)) continue; if (bitmap_set_contains_value (AVAIL_OUT (dom), val)) @@ -2745,11 +3107,11 @@ do_regular_insertion (basic_block block, basic_block dom) continue; } - avail = XCNEWVEC (tree, last_basic_block); + avail = XCNEWVEC (pre_expr, last_basic_block); FOR_EACH_EDGE (pred, ei, block->preds) { - tree vprime; - tree edoubleprime; + unsigned int vprime; + pre_expr edoubleprime; /* This can happen in the very weird case that our fake infinite loop edges have caused a @@ -2779,8 +3141,7 @@ do_regular_insertion (basic_block block, basic_block dom) } eprime = fully_constant_expression (eprime); - vprime = get_value_handle (eprime); - gcc_assert (vprime); + vprime = get_expr_value_id (eprime); edoubleprime = bitmap_find_leader (AVAIL_OUT (bprime), vprime, NULL_TREE); if (edoubleprime == NULL) @@ -2794,8 +3155,7 @@ do_regular_insertion (basic_block block, basic_block dom) by_some = true; if (first_s == NULL) first_s = edoubleprime; - else if (!operand_equal_p (first_s, edoubleprime, - 0)) + else if (!pre_expr_eq (first_s, edoubleprime)) all_same = false; } } @@ -2803,7 +3163,7 @@ do_regular_insertion (basic_block block, basic_block dom) already existing along every predecessor, and it's defined by some predecessor, it is partially redundant. */ - if (!cant_insert && !all_same && by_some) + if (!cant_insert && !all_same && by_some && dbg_cnt (treepre_insert)) { if (insert_into_preds_of_block (block, get_expression_id (expr), avail)) @@ -2813,19 +3173,26 @@ do_regular_insertion (basic_block block, basic_block dom) an invariant, then the PHI has the same value on all edges. Note this. */ else if (!cant_insert && all_same && eprime - && is_gimple_min_invariant (eprime) - && !is_gimple_min_invariant (val)) + && eprime->kind == CONSTANT + && !value_id_constant_p (val)) { unsigned int j; bitmap_iterator bi; + bitmap_set_t exprset = VEC_index (bitmap_set_t, + value_expressions, val); - bitmap_set_t exprset = VALUE_HANDLE_EXPR_SET (val); + unsigned int new_val = get_expr_value_id (eprime); FOR_EACH_EXPR_ID_IN_SET (exprset, j, bi) { - tree expr = expression_for_id (j); - if (TREE_CODE (expr) == SSA_NAME) + pre_expr expr = expression_for_id (j); + + if (expr->kind == NAME) { - vn_add (expr, eprime); + vn_ssa_aux_t info = VN_INFO (PRE_EXPR_NAME (expr)); + /* Just reset the value id and valnum so it is + the same as the constant we have discovered. */ + info->valnum = PRE_EXPR_CONSTANT (eprime); + info->value_id = new_val; pre_stats.constified++; } } @@ -2834,7 +3201,7 @@ do_regular_insertion (basic_block block, basic_block dom) } } - VEC_free (tree, heap, exprs); + VEC_free (pre_expr, heap, exprs); return new_stuff; } @@ -2850,34 +3217,34 @@ static bool do_partial_partial_insertion (basic_block block, basic_block dom) { bool new_stuff = false; - VEC (tree, heap) *exprs = sorted_array_from_bitmap_set (PA_IN (block)); - tree expr; + VEC (pre_expr, heap) *exprs = sorted_array_from_bitmap_set (PA_IN (block)); + pre_expr expr; int i; - for (i = 0; VEC_iterate (tree, exprs, i, expr); i++) + for (i = 0; VEC_iterate (pre_expr, exprs, i, expr); i++) { - if (can_PRE_operation (expr) && !AGGREGATE_TYPE_P (TREE_TYPE (expr))) + if (expr->kind != NAME) { - tree *avail; - tree val; + pre_expr *avail; + unsigned int val; bool by_all = true; bool cant_insert = false; edge pred; basic_block bprime; - tree eprime = NULL_TREE; + pre_expr eprime = NULL; edge_iterator ei; - val = get_value_handle (expr); + val = get_expr_value_id (expr); if (bitmap_set_contains_value (PHI_GEN (block), val)) continue; if (bitmap_set_contains_value (AVAIL_OUT (dom), val)) continue; - avail = XCNEWVEC (tree, last_basic_block); + avail = XCNEWVEC (pre_expr, last_basic_block); FOR_EACH_EDGE (pred, ei, block->preds) { - tree vprime; - tree edoubleprime; + unsigned int vprime; + pre_expr edoubleprime; /* This can happen in the very weird case that our fake infinite loop edges have caused a @@ -2908,8 +3275,7 @@ do_partial_partial_insertion (basic_block block, basic_block dom) } eprime = fully_constant_expression (eprime); - vprime = get_value_handle (eprime); - gcc_assert (vprime); + vprime = get_expr_value_id (eprime); edoubleprime = bitmap_find_leader (AVAIL_OUT (bprime), vprime, NULL_TREE); if (edoubleprime == NULL) @@ -2926,7 +3292,7 @@ do_partial_partial_insertion (basic_block block, basic_block dom) already existing along every predecessor, and it's defined by some predecessor, it is partially redundant. */ - if (!cant_insert && by_all) + if (!cant_insert && by_all && dbg_cnt (treepre_insert)) { pre_stats.pa_insert++; if (insert_into_preds_of_block (block, get_expression_id (expr), @@ -2937,7 +3303,7 @@ do_partial_partial_insertion (basic_block block, basic_block dom) } } - VEC_free (tree, heap, exprs); + VEC_free (pre_expr, heap, exprs); return new_stuff; } @@ -2964,7 +3330,7 @@ insert_aux (basic_block block) to replace it with. */ FOR_EACH_EXPR_ID_IN_SET (newset, i, bi) { - tree expr = expression_for_id (i); + pre_expr expr = expression_for_id (i); bitmap_value_replace_in_set (NEW_SETS (block), expr); bitmap_value_replace_in_set (AVAIL_OUT (block), expr); } @@ -3019,163 +3385,17 @@ add_to_exp_gen (basic_block block, tree op) { if (!in_fre) { + pre_expr result; if (TREE_CODE (op) == SSA_NAME && ssa_undefined_value_p (op)) return; - bitmap_value_insert_into_set (EXP_GEN (block), op); + result = get_or_alloc_expr_for_name (op); + bitmap_value_insert_into_set (EXP_GEN (block), result); if (TREE_CODE (op) != SSA_NAME || TREE_CODE (SSA_NAME_DEF_STMT (op)) != PHI_NODE) - bitmap_value_insert_into_set (maximal_set, op); - } -} - - -/* Given an SSA variable VAR and an expression EXPR, compute the value - number for EXPR and create a value handle (VAL) for it. If VAR and - EXPR are not the same, associate VAL with VAR. Finally, add VAR to - S1 and its value handle to S2, and to the maximal set if - ADD_TO_MAXIMAL is true. - - VUSES represent the virtual use operands associated with EXPR (if - any). */ - -static inline void -add_to_sets (tree var, tree expr, VEC(tree, gc) *vuses, bitmap_set_t s1, - bitmap_set_t s2) -{ - tree val; - val = vn_lookup_or_add_with_vuses (expr, vuses); - - /* VAR and EXPR may be the same when processing statements for which - we are not computing value numbers (e.g., non-assignments, or - statements that make aliased stores). In those cases, we are - only interested in making VAR available as its own value. */ - if (var != expr) - vn_add (var, val); - - if (s1) - bitmap_insert_into_set (s1, var); - - bitmap_value_insert_into_set (s2, var); -} - -/* Find existing value expression that is the same as T, - and return it if it exists. */ - -static inline tree -find_existing_value_expr (tree t, VEC (tree, gc) *vuses) -{ - bitmap_iterator bi; - unsigned int bii; - tree vh; - bitmap_set_t exprset; - - if (REFERENCE_CLASS_P (t) || TREE_CODE (t) == CALL_EXPR || DECL_P (t)) - vh = vn_lookup_with_vuses (t, vuses); - else - vh = vn_lookup (t); - - if (!vh) - return NULL; - exprset = VALUE_HANDLE_EXPR_SET (vh); - FOR_EACH_EXPR_ID_IN_SET (exprset, bii, bi) - { - tree efi = expression_for_id (bii); - if (expressions_equal_p (t, efi)) - return efi; + bitmap_value_insert_into_set (maximal_set, result); } - return NULL; } -/* Given a unary or binary expression EXPR, create and return a new - expression with the same structure as EXPR but with its operands - replaced with the value handles of each of the operands of EXPR. - - VUSES represent the virtual use operands associated with EXPR (if - any). Insert EXPR's operands into the EXP_GEN set for BLOCK. - - If CHECK_AVAIL is true, checks availability of each operand in - BLOCKs AVAIL_OUT set. */ - -static inline tree -create_value_expr_from (tree expr, basic_block block, VEC (tree, gc) *vuses, - bool check_avail) -{ - int i; - enum tree_code code = TREE_CODE (expr); - tree vexpr; - alloc_pool pool = NULL; - tree efi; - - gcc_assert (TREE_CODE_CLASS (code) == tcc_unary - || TREE_CODE_CLASS (code) == tcc_binary - || TREE_CODE_CLASS (code) == tcc_comparison - || TREE_CODE_CLASS (code) == tcc_reference - || TREE_CODE_CLASS (code) == tcc_expression - || TREE_CODE_CLASS (code) == tcc_vl_exp - || TREE_CODE_CLASS (code) == tcc_exceptional - || TREE_CODE_CLASS (code) == tcc_declaration); - - if (TREE_CODE_CLASS (code) == tcc_unary) - pool = unary_node_pool; - else if (TREE_CODE_CLASS (code) == tcc_reference) - pool = reference_node_pool; - else if (TREE_CODE_CLASS (code) == tcc_binary) - pool = binary_node_pool; - else if (TREE_CODE_CLASS (code) == tcc_comparison) - pool = comparison_node_pool; - else - gcc_assert (code == CALL_EXPR); - - if (code == CALL_EXPR) - vexpr = temp_copy_call_expr (expr); - else - { - vexpr = (tree) pool_alloc (pool); - memcpy (vexpr, expr, tree_size (expr)); - } - - for (i = 0; i < TREE_OPERAND_LENGTH (expr); i++) - { - tree val = NULL_TREE; - tree op; - - op = TREE_OPERAND (expr, i); - if (op == NULL_TREE) - continue; - - /* Recursively value-numberize reference ops and tree lists. */ - if (REFERENCE_CLASS_P (op)) - { - tree tempop = create_value_expr_from (op, block, vuses, check_avail); - op = tempop ? tempop : op; - val = vn_lookup_or_add_with_vuses (op, vuses); - set_expression_vuses (op, vuses); - } - else - { - val = vn_lookup_or_add (op); - } - if (TREE_CODE (op) != TREE_LIST) - add_to_exp_gen (block, op); - - if (TREE_CODE (val) == VALUE_HANDLE) - TREE_TYPE (val) = TREE_TYPE (TREE_OPERAND (vexpr, i)); - - TREE_OPERAND (vexpr, i) = val; - - if (check_avail - && TREE_CODE (val) == VALUE_HANDLE - && !bitmap_set_contains_value (AVAIL_OUT (block), val)) - return NULL_TREE; - } - efi = find_existing_value_expr (vexpr, vuses); - if (efi) - return efi; - get_or_alloc_expression_id (vexpr); - return vexpr; -} - - /* For each real store operation of the form *a = <value> that we see, create a corresponding fake store of the form storetmp_<version> = *a. @@ -3287,57 +3507,7 @@ realify_fake_stores (void) } } -/* Given an SSA_NAME, see if SCCVN has a value number for it, and if - so, return the value handle for this value number, creating it if - necessary. - Return NULL if SCCVN has no info for us. */ - -static tree -get_sccvn_value (tree name) -{ - if (TREE_CODE (name) == SSA_NAME - && VN_INFO (name)->valnum != name - && VN_INFO (name)->valnum != VN_TOP) - { - tree val = VN_INFO (name)->valnum; - bool is_invariant = is_gimple_min_invariant (val); - tree valvh = !is_invariant ? get_value_handle (val) : NULL_TREE; - - /* We may end up with situations where SCCVN has chosen a - representative for the equivalence set that we have not - visited yet. In this case, just create the value handle for - it. */ - if (!valvh && !is_invariant) - { - /* We lookup with the LHS, so do not use vn_lookup_or_add_with_stmt - here, as that will result in useless reference lookups. */ - valvh = vn_lookup_or_add (val); - } - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "SCCVN says "); - print_generic_expr (dump_file, name, 0); - fprintf (dump_file, " value numbers to "); - if (valvh && !is_invariant) - { - print_generic_expr (dump_file, val, 0); - fprintf (dump_file, " ("); - print_generic_expr (dump_file, valvh, 0); - fprintf (dump_file, ")\n"); - } - else - print_generic_stmt (dump_file, val, 0); - } - if (valvh) - return valvh; - else - return val; - } - return NULL_TREE; -} - -/* Create value handles for PHI in BLOCK. */ +/* Create value ids for PHI in BLOCK. */ static void make_values_for_phi (tree phi, basic_block block) @@ -3347,124 +3517,13 @@ make_values_for_phi (tree phi, basic_block block) actual computations. */ if (is_gimple_reg (result)) { - tree sccvnval = get_sccvn_value (result); - if (sccvnval) - { - vn_add (result, sccvnval); - bitmap_insert_into_set (PHI_GEN (block), result); - bitmap_value_insert_into_set (AVAIL_OUT (block), result); - } - else - add_to_sets (result, result, NULL, - PHI_GEN (block), AVAIL_OUT (block)); + pre_expr e = get_or_alloc_expr_for_name (result); + add_to_value (get_expr_value_id (e), e); + bitmap_insert_into_set (PHI_GEN (block), e); + bitmap_value_insert_into_set (AVAIL_OUT (block), e); } } -/* Create value handles for STMT in BLOCK. Return true if we handled - the statement. */ - -static bool -make_values_for_stmt (tree stmt, basic_block block) -{ - - tree lhs = GIMPLE_STMT_OPERAND (stmt, 0); - tree rhs = GIMPLE_STMT_OPERAND (stmt, 1); - tree valvh = NULL_TREE; - tree lhsval; - VEC (tree, gc) *vuses = NULL; - - valvh = get_sccvn_value (lhs); - - if (valvh) - { - vn_add (lhs, valvh); - bitmap_value_insert_into_set (AVAIL_OUT (block), lhs); - /* Shortcut for FRE. We have no need to create value expressions, - just want to know what values are available where. */ - if (in_fre) - return true; - - } - else if (in_fre) - { - /* For FRE, if SCCVN didn't find anything, we aren't going to - either, so just make up a new value number if necessary and - call it a day */ - if (get_value_handle (lhs) == NULL) - vn_lookup_or_add (lhs); - bitmap_value_insert_into_set (AVAIL_OUT (block), lhs); - return true; - } - - lhsval = valvh ? valvh : get_value_handle (lhs); - vuses = copy_vuses_from_stmt (stmt); - STRIP_USELESS_TYPE_CONVERSION (rhs); - if (can_value_number_operation (rhs) - && (!lhsval || !is_gimple_min_invariant (lhsval)) - && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) - { - /* For value numberable operation, create a - duplicate expression with the operands replaced - with the value handles of the original RHS. */ - tree newt = create_value_expr_from (rhs, block, vuses, false); - if (newt) - { - set_expression_vuses (newt, vuses); - /* If we already have a value number for the LHS, reuse - it rather than creating a new one. */ - if (lhsval) - { - set_value_handle (newt, lhsval); - if (!is_gimple_min_invariant (lhsval)) - add_to_value (lhsval, newt); - } - else - { - tree val = vn_lookup_or_add_with_vuses (newt, vuses); - vn_add (lhs, val); - } - - add_to_exp_gen (block, newt); - } - - bitmap_insert_into_set (TMP_GEN (block), lhs); - bitmap_value_insert_into_set (AVAIL_OUT (block), lhs); - return true; - } - else if ((TREE_CODE (rhs) == SSA_NAME - && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs)) - || is_gimple_min_invariant (rhs) - || TREE_CODE (rhs) == ADDR_EXPR - || DECL_P (rhs)) - { - - if (lhsval) - { - set_expression_vuses (rhs, vuses); - set_value_handle (rhs, lhsval); - if (!is_gimple_min_invariant (lhsval)) - add_to_value (lhsval, rhs); - bitmap_insert_into_set (TMP_GEN (block), lhs); - bitmap_value_insert_into_set (AVAIL_OUT (block), lhs); - } - else - { - /* Compute a value number for the RHS of the statement - and add its value to the AVAIL_OUT set for the block. - Add the LHS to TMP_GEN. */ - set_expression_vuses (rhs, vuses); - add_to_sets (lhs, rhs, vuses, TMP_GEN (block), - AVAIL_OUT (block)); - } - /* None of the rest of these can be PRE'd. */ - if (TREE_CODE (rhs) == SSA_NAME && !ssa_undefined_value_p (rhs)) - add_to_exp_gen (block, rhs); - return true; - } - return false; - -} - /* Compute the AVAIL set for all basic blocks. This function performs value numbering of the statements in each basic @@ -3478,6 +3537,7 @@ make_values_for_stmt (tree stmt, basic_block block) static void compute_avail (void) { + basic_block block, son; basic_block *worklist; size_t sp = 0; @@ -3492,14 +3552,15 @@ compute_avail (void) if (gimple_default_def (cfun, param) != NULL) { tree def = gimple_default_def (cfun, param); + pre_expr e = get_or_alloc_expr_for_name (def); - vn_lookup_or_add (def); + add_to_value (get_expr_value_id (e), e); if (!in_fre) { - bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), def); - bitmap_value_insert_into_set (maximal_set, def); + bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e); + bitmap_value_insert_into_set (maximal_set, e); } - bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), def); + bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e); } } @@ -3510,14 +3571,15 @@ compute_avail (void) if (gimple_default_def (cfun, param) != NULL) { tree def = gimple_default_def (cfun, param); + pre_expr e = get_or_alloc_expr_for_name (def); - vn_lookup_or_add (def); + add_to_value (get_expr_value_id (e), e); if (!in_fre) { - bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), def); - bitmap_value_insert_into_set (maximal_set, def); + bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e); + bitmap_value_insert_into_set (maximal_set, e); } - bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), def); + bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e); } } @@ -3565,67 +3627,119 @@ compute_avail (void) set_gimple_stmt_uid (stmt, stmt_uid++); - /* For regular value numbering, we are only interested in - assignments of the form X_i = EXPR, where EXPR represents - an "interesting" computation, it has no volatile operands - and X_i doesn't flow through an abnormal edge. */ - if (TREE_CODE (stmt) == RETURN_EXPR - && !ann->has_volatile_ops) + FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF) { - tree realstmt = stmt; - tree lhs; - tree rhs; + pre_expr e = get_or_alloc_expr_for_name (op); - stmt = TREE_OPERAND (stmt, 0); - if (stmt && TREE_CODE (stmt) == GIMPLE_MODIFY_STMT) + add_to_value (get_expr_value_id (e), e); + if (!in_fre) { - lhs = GIMPLE_STMT_OPERAND (stmt, 0); - rhs = GIMPLE_STMT_OPERAND (stmt, 1); - if (TREE_CODE (lhs) == SSA_NAME - && is_gimple_min_invariant (VN_INFO (lhs)->valnum)) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "SCCVN says "); - print_generic_expr (dump_file, lhs, 0); - fprintf (dump_file, " value numbers to "); - print_generic_stmt (dump_file, VN_INFO (lhs)->valnum, - 0); - } - vn_add (lhs, VN_INFO (lhs)->valnum); - continue; - } - - if (TREE_CODE (rhs) == SSA_NAME) - add_to_exp_gen (block, rhs); - - FOR_EACH_SSA_TREE_OPERAND (op, realstmt, iter, SSA_OP_DEF) - add_to_sets (op, op, NULL, TMP_GEN (block), - AVAIL_OUT (block)); + bitmap_insert_into_set (TMP_GEN (block), e); + bitmap_value_insert_into_set (maximal_set, e); } - continue; + bitmap_value_insert_into_set (AVAIL_OUT (block), e); } - else if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT - && !ann->has_volatile_ops - && TREE_CODE (GIMPLE_STMT_OPERAND (stmt, 0)) == SSA_NAME - && !tree_could_throw_p (stmt)) + switch (TREE_CODE (stmt)) { - if (make_values_for_stmt (stmt, block)) + case RETURN_EXPR: + if (!ann->has_volatile_ops) + FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) + add_to_exp_gen (block, op); + continue; + case GIMPLE_MODIFY_STMT: + { + tree rhs = GIMPLE_STMT_OPERAND (stmt, 1); + if (!ann->has_volatile_ops + && !tree_could_throw_p (stmt)) + { + pre_expr result = NULL; + switch (TREE_CODE_CLASS (TREE_CODE (rhs))) + { + case tcc_unary: + if (is_exception_related (rhs)) + continue; + case tcc_binary: + { + vn_nary_op_t nary; + unsigned int i; + + vn_nary_op_lookup (rhs, &nary); + + if (!nary) + continue; + + for (i = 0; i < nary->length; i++) + if (TREE_CODE (nary->op[i]) == SSA_NAME) + add_to_exp_gen (block, nary->op[i]); + + result = (pre_expr) pool_alloc (pre_expr_pool); + result->kind = NARY; + result->id = 0; + PRE_EXPR_NARY (result) = nary; + } + break; + case tcc_vl_exp: + if (!can_value_number_call (rhs)) + continue; + + case tcc_declaration: + case tcc_reference: + { + vn_reference_t ref; + unsigned int i; + vn_reference_op_t vro; + + vn_reference_lookup (rhs, + shared_vuses_from_stmt (stmt), + true, &ref); + if (!ref) + continue; + + for (i = 0; VEC_iterate (vn_reference_op_s, + ref->operands, i, + vro); i++) + { + if (vro->op0 && TREE_CODE (vro->op0) == SSA_NAME) + add_to_exp_gen (block, vro->op0); + if (vro->op1 && TREE_CODE (vro->op1) == SSA_NAME) + add_to_exp_gen (block, vro->op1); + } + result = (pre_expr) pool_alloc (pre_expr_pool); + result->kind = REFERENCE; + result->id = 0; + PRE_EXPR_REFERENCE (result) = ref; + } + break; + default: + { + /* For any other statement that we don't + recognize, simply add all referenced + SSA_NAMEs to EXP_GEN. */ + FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) + add_to_exp_gen (block, op); + continue; + } + } + get_or_alloc_expression_id (result); + add_to_value (get_expr_value_id (result), result); + if (!in_fre) + { + bitmap_value_insert_into_set (EXP_GEN (block), + result); + bitmap_value_insert_into_set (maximal_set, result); + } + + } continue; + } + default: + break; + } - /* For any other statement that we don't recognize, simply - make the names generated by the statement available in - AVAIL_OUT and TMP_GEN. */ - FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF) - add_to_sets (op, op, NULL, TMP_GEN (block), AVAIL_OUT (block)); - /* Also add all referenced SSA_NAMEs to EXP_GEN. */ - FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) - add_to_exp_gen (block, op); } - /* Put the dominator children of BLOCK on the worklist of blocks to compute available sets for. */ for (son = first_dom_son (CDI_DOMINATORS, block); @@ -3648,18 +3762,21 @@ do_SCCVN_insertion (tree stmt, tree ssa_vn) basic_block bb = bb_for_stmt (stmt); block_stmt_iterator bsi; tree expr, stmts; + pre_expr e; /* First create a value expression from the expression we want to insert and associate it with the value handle for SSA_VN. */ - expr = create_value_expr_from (VN_INFO (ssa_vn)->expr, bb, NULL, true); - if (expr == NULL_TREE) + + /* TODO: Handle complex expressions. */ + e = get_or_alloc_expr_for (VN_INFO (ssa_vn)->expr); + if (e == NULL) return NULL_TREE; - set_value_handle (expr, get_value_handle (ssa_vn)); - /* Then use create_expression_by_pieces to generate a valid +/* Then use create_expression_by_pieces to generate a valid expression to insert at this point of the IL stream. */ stmts = alloc_stmt_list (); - expr = create_expression_by_pieces (bb, expr, stmts, stmt); + expr = create_expression_by_pieces (bb, e, stmts, stmt, + NULL); if (expr == NULL_TREE) return NULL_TREE; bsi = bsi_for_stmt (stmt); @@ -3695,24 +3812,58 @@ eliminate (void) { tree lhs = GIMPLE_STMT_OPERAND (stmt, 0); tree *rhs_p = &GIMPLE_STMT_OPERAND (stmt, 1); - tree sprime; + tree sprime = NULL; + pre_expr lhsexpr = get_or_alloc_expr_for_name (lhs); + pre_expr sprimeexpr; + + sprimeexpr = bitmap_find_leader (AVAIL_OUT (b), + get_expr_value_id (lhsexpr), + NULL_TREE); - sprime = bitmap_find_leader (AVAIL_OUT (b), - get_value_handle (lhs), NULL_TREE); + if (sprimeexpr) + { + if (sprimeexpr->kind == CONSTANT) + sprime = PRE_EXPR_CONSTANT (sprimeexpr); + else if (sprimeexpr->kind == NAME) + sprime = PRE_EXPR_NAME (sprimeexpr); + else + gcc_unreachable (); + } + + /* If there is no existing leader but SCCVN knows this + value is constant, use that constant. */ + if (!sprime && is_gimple_min_invariant (VN_INFO (lhs)->valnum)) + { + sprime = fold_convert (TREE_TYPE (lhs), + VN_INFO (lhs)->valnum); + + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fprintf (dump_file, "Replaced "); + print_generic_expr (dump_file, *rhs_p, 0); + fprintf (dump_file, " with "); + print_generic_expr (dump_file, sprime, 0); + fprintf (dump_file, " in "); + print_generic_stmt (dump_file, stmt, 0); + } + pre_stats.eliminations++; + propagate_tree_value (rhs_p, sprime); + update_stmt (stmt); + continue; + } /* If there is no existing usable leader but SCCVN thinks it has an expression it wants to use as replacement, insert that. */ - if (!sprime - || sprime == lhs) + if (!sprime || sprime == lhs) { tree val = VN_INFO (lhs)->valnum; if (val != VN_TOP + && TREE_CODE (val) == SSA_NAME && VN_INFO (val)->needs_insertion && can_PRE_operation (VN_INFO (val)->expr)) sprime = do_SCCVN_insertion (stmt, val); } - if (sprime && sprime != lhs && (TREE_CODE (*rhs_p) != SSA_NAME @@ -3921,6 +4072,15 @@ remove_dead_inserted_code (void) static void init_pre (bool do_fre) { + basic_block bb; + + next_expression_id = 1; + expressions = NULL; + VEC_safe_push (pre_expr, heap, expressions, NULL); + value_expressions = VEC_alloc (bitmap_set_t, heap, get_max_value_id () + 1); + VEC_safe_grow_cleared (bitmap_set_t, heap, value_expressions, + get_max_value_id() + 1); + in_fre = do_fre; inserted_exprs = NULL; @@ -3929,16 +4089,38 @@ init_pre (bool do_fre) storetemp = NULL_TREE; prephitemp = NULL_TREE; - if (!do_fre) - loop_optimizer_init (LOOPS_NORMAL); - connect_infinite_loops_to_exit (); memset (&pre_stats, 0, sizeof (pre_stats)); + + postorder = XNEWVEC (int, n_basic_blocks - NUM_FIXED_BLOCKS); + post_order_compute (postorder, false, false); + + FOR_ALL_BB (bb) + bb->aux = XCNEWVEC (struct bb_bitmap_sets, 1); + calculate_dominance_info (CDI_POST_DOMINATORS); calculate_dominance_info (CDI_DOMINATORS); - init_antic (); + bitmap_obstack_initialize (&grand_bitmap_obstack); + phi_translate_table = htab_create (5110, expr_pred_trans_hash, + expr_pred_trans_eq, free); + expression_to_id = htab_create (num_ssa_names * 3, + pre_expr_hash, + pre_expr_eq, NULL); + seen_during_translate = BITMAP_ALLOC (&grand_bitmap_obstack); + bitmap_set_pool = create_alloc_pool ("Bitmap sets", + sizeof (struct bitmap_set), 30); + pre_expr_pool = create_alloc_pool ("pre_expr nodes", + sizeof (struct pre_expr_d), 30); + FOR_ALL_BB (bb) + { + EXP_GEN (bb) = bitmap_set_new (); + PHI_GEN (bb) = bitmap_set_new (); + TMP_GEN (bb) = bitmap_set_new (); + AVAIL_OUT (bb) = bitmap_set_new (); + } + maximal_set = in_fre ? NULL : bitmap_set_new (); need_eh_cleanup = BITMAP_ALLOC (NULL); } @@ -3949,14 +4131,24 @@ init_pre (bool do_fre) static void fini_pre (void) { - unsigned int i; + basic_block bb; + free (postorder); + VEC_free (bitmap_set_t, heap, value_expressions); VEC_free (tree, heap, inserted_exprs); VEC_free (tree, heap, need_creation); + bitmap_obstack_release (&grand_bitmap_obstack); + free_alloc_pool (bitmap_set_pool); + free_alloc_pool (pre_expr_pool); htab_delete (phi_translate_table); + htab_delete (expression_to_id); remove_fake_exit_edges (); - fini_antic (); + FOR_ALL_BB (bb) + { + free (bb->aux); + bb->aux = NULL; + } free_dominance_info (CDI_POST_DOMINATORS); @@ -3968,19 +4160,6 @@ fini_pre (void) BITMAP_FREE (need_eh_cleanup); - /* Wipe out pointers to VALUE_HANDLEs. In the not terribly distant - future we will want them to be persistent though. */ - for (i = 0; i < num_ssa_names; i++) - { - tree name = ssa_name (i); - - if (!name) - continue; - - if (SSA_NAME_VALUE (name) - && TREE_CODE (SSA_NAME_VALUE (name)) == VALUE_HANDLE) - SSA_NAME_VALUE (name) = NULL; - } if (current_loops != NULL) loop_optimizer_finalize (); } @@ -3994,20 +4173,28 @@ execute_pre (bool do_fre) unsigned int todo = 0; do_partial_partial = optimize > 2; - init_pre (do_fre); + /* This has to happen before SCCVN runs because + loop_optimizer_init may create new phis, etc. */ if (!do_fre) + loop_optimizer_init (LOOPS_NORMAL); + if (0 && !do_fre) insert_fake_stores (); - /* Collect and value number expressions computed in each basic block. */ if (!run_scc_vn (do_fre)) { if (!do_fre) - remove_dead_inserted_code (); - fini_pre (); + { + remove_dead_inserted_code (); + loop_optimizer_finalize (); + } + return 0; } - switch_to_PRE_table (); + init_pre (do_fre); + + + /* Collect and value number expressions computed in each basic block. */ compute_avail (); if (dump_file && (dump_flags & TDF_DETAILS)) @@ -4032,16 +4219,6 @@ execute_pre (bool do_fre) if (!do_fre && n_basic_blocks < 4000) { compute_antic (); - if (dump_file && (dump_flags & TDF_DETAILS)) - { - basic_block bb; - - FOR_ALL_BB (bb) - { - print_bitmap_set (dump_file, ANTIC_IN (bb), "antic_in", bb->index); - } - } - insert (); } @@ -4060,7 +4237,8 @@ execute_pre (bool do_fre) if (!do_fre) { remove_dead_inserted_code (); - realify_fake_stores (); + if (0) + realify_fake_stores (); } fini_pre (); diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 99cc08d8445..f1318656b9b 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -115,72 +115,9 @@ typedef struct vn_tables_s alloc_pool references_pool; } *vn_tables_t; -/* Nary operations in the hashtable consist of length operands, an - opcode, and a type. Result is the value number of the operation, - and hashcode is stored to avoid having to calculate it - repeatedly. */ +static htab_t constant_to_value_id; +static bitmap constant_value_ids; -typedef struct vn_nary_op_s -{ - ENUM_BITFIELD(tree_code) opcode : 16; - unsigned length : 16; - hashval_t hashcode; - tree result; - tree type; - tree op[4]; -} *vn_nary_op_t; -typedef const struct vn_nary_op_s *const_vn_nary_op_t; - -/* Phi nodes in the hashtable consist of their non-VN_TOP phi - arguments, and the basic block the phi is in. Result is the value - number of the operation, and hashcode is stored to avoid having to - calculate it repeatedly. Phi nodes not in the same block are never - considered equivalent. */ - -typedef struct vn_phi_s -{ - VEC (tree, heap) *phiargs; - basic_block block; - hashval_t hashcode; - tree result; -} *vn_phi_t; -typedef const struct vn_phi_s *const_vn_phi_t; - -/* Reference operands only exist in reference operations structures. - They consist of an opcode, type, and some number of operands. For - a given opcode, some, all, or none of the operands may be used. - The operands are there to store the information that makes up the - portion of the addressing calculation that opcode performs. */ - -typedef struct vn_reference_op_struct -{ - enum tree_code opcode; - tree type; - tree op0; - tree op1; -} vn_reference_op_s; -typedef vn_reference_op_s *vn_reference_op_t; -typedef const vn_reference_op_s *const_vn_reference_op_t; - -DEF_VEC_O(vn_reference_op_s); -DEF_VEC_ALLOC_O(vn_reference_op_s, heap); - -/* A reference operation in the hashtable is representation as a - collection of vuses, representing the memory state at the time of - the operation, and a collection of operands that make up the - addressing calculation. If two vn_reference_t's have the same set - of operands, they access the same memory location. We also store - the resulting value number, and the hashcode. The vuses are - always stored in order sorted by ssa name version. */ - -typedef struct vn_reference_s -{ - VEC (tree, gc) *vuses; - VEC (vn_reference_op_s, heap) *operands; - hashval_t hashcode; - tree result; -} *vn_reference_t; -typedef const struct vn_reference_s *const_vn_reference_t; /* Valid hashtables storing information we have proven to be correct. */ @@ -192,11 +129,6 @@ static vn_tables_t valid_info; static vn_tables_t optimistic_info; -/* PRE hashtables storing information about mapping from expressions to - value handles. */ - -static vn_tables_t pre_info; - /* Pointer to the set of hashtables that is currently being used. Should always point to either the optimistic_info, or the valid_info. */ @@ -215,6 +147,10 @@ static int *rpo_numbers; tree VN_TOP; +/* Unique counter for our value ids. */ + +static unsigned int next_value_id; + /* Next DFS number and the stack for strongly connected component detection. */ @@ -239,8 +175,10 @@ static struct obstack vn_ssa_aux_obstack; vn_ssa_aux_t VN_INFO (tree name) { - return VEC_index (vn_ssa_aux_t, vn_ssa_aux_table, - SSA_NAME_VERSION (name)); + vn_ssa_aux_t res = VEC_index (vn_ssa_aux_t, vn_ssa_aux_table, + SSA_NAME_VERSION (name)); + gcc_assert (res); + return res; } /* Set the value numbering info for a given SSA name to a given @@ -290,6 +228,58 @@ free_reference (void *vp) VEC_free (vn_reference_op_s, heap, vr->operands); } +/* Hash table equality function for vn_constant_t. */ + +static int +vn_constant_eq (const void *p1, const void *p2) +{ + const struct vn_constant_s *vc1 = (const struct vn_constant_s *) p1; + const struct vn_constant_s *vc2 = (const struct vn_constant_s *) p2; + + return expressions_equal_p (vc1->constant, vc2->constant); +} + +/* Hash table hash function for vn_constant_t. */ + +static hashval_t +vn_constant_hash (const void *p1) +{ + const struct vn_constant_s *vc1 = (const struct vn_constant_s *) p1; + return vc1->hashcode; +} + +/* Lookup a value id for CONSTANT, and if it does not exist, create a + new one and return it. If it does exist, return it. */ + +unsigned int +get_or_alloc_constant_value_id (tree constant) +{ + void **slot; + vn_constant_t vc = XNEW (struct vn_constant_s); + + vc->hashcode = iterative_hash_expr (constant, 0); + vc->constant = constant; + slot = htab_find_slot_with_hash (constant_to_value_id, vc, + vc->hashcode, INSERT); + if (*slot) + { + free (vc); + return ((vn_constant_t)*slot)->value_id; + } + vc->value_id = get_next_value_id (); + *slot = vc; + bitmap_set_bit (constant_value_ids, vc->value_id); + return vc->value_id; +} + +/* Return true if V is a value id for a constant. */ + +bool +value_id_constant_p (unsigned int v) +{ + return bitmap_bit_p (constant_value_ids, v); +} + /* Compare two reference operands P1 and P2 for equality. Return true if they are equal, and false otherwise. */ @@ -301,7 +291,8 @@ vn_reference_op_eq (const void *p1, const void *p2) return vro1->opcode == vro2->opcode && vro1->type == vro2->type && expressions_equal_p (vro1->op0, vro2->op0) - && expressions_equal_p (vro1->op1, vro2->op1); + && expressions_equal_p (vro1->op1, vro2->op1) + && expressions_equal_p (vro1->op2, vro2->op2); } /* Compute the hash for a reference operand VRO1. */ @@ -324,7 +315,7 @@ vn_reference_hash (const void *p1) /* Compute a hash for the reference operation VR1 and return it. */ -static inline hashval_t +hashval_t vn_reference_compute_hash (const vn_reference_t vr1) { hashval_t result = 0; @@ -343,7 +334,7 @@ vn_reference_compute_hash (const vn_reference_t vr1) /* Return true if reference operations P1 and P2 are equivalent. This means they have the same set of operands and vuses. */ -static int +int vn_reference_eq (const void *p1, const void *p2) { tree v; @@ -484,10 +475,18 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result) temp.type = TREE_TYPE (ref); temp.opcode = CALL_EXPR; VEC_safe_push (vn_reference_op_s, heap, *result, &temp); - - callfn = get_callee_fndecl (ref); - if (!callfn) - callfn = CALL_EXPR_FN (ref); + + /* We make no attempt to simplify the called function because + the typical &FUNCTION_DECL form is also used in function pointer + cases that become constant. If we simplify the original to + FUNCTION_DECL but not the function pointer case (which can + happen because we have no fold functions that operate on + vn_reference_t), we will claim they are not equivalent. + + An example of this behavior can be see if CALL_EXPR_FN below is + replaced with get_callee_fndecl and gcc.dg/tree-ssa/ssa-pre-13.c + is compiled. */ + callfn = CALL_EXPR_FN (ref); temp.type = TREE_TYPE (callfn); temp.opcode = TREE_CODE (callfn); temp.op0 = callfn; @@ -554,6 +553,7 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result) a matching type is not necessary and a mismatching type is always a spurious difference. */ temp.type = NULL_TREE; +#if FIXME /* If this is a reference to a union member, record the union member size as operand. Do so only if we are doing expression insertion (during FRE), as PRE currently gets @@ -564,14 +564,17 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result) && integer_zerop (DECL_FIELD_BIT_OFFSET (TREE_OPERAND (ref, 1)))) temp.op0 = TYPE_SIZE (TREE_TYPE (TREE_OPERAND (ref, 1))); else +#endif /* Record field as operand. */ temp.op0 = TREE_OPERAND (ref, 1); + temp.op1 = TREE_OPERAND (ref, 2); break; case ARRAY_RANGE_REF: case ARRAY_REF: /* Record index as operand. */ temp.op0 = TREE_OPERAND (ref, 1); - temp.op1 = TREE_OPERAND (ref, 3); + temp.op1 = TREE_OPERAND (ref, 2); + temp.op2 = TREE_OPERAND (ref, 3); break; case STRING_CST: case INTEGER_CST: @@ -579,7 +582,6 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result) case VECTOR_CST: case REAL_CST: case CONSTRUCTOR: - case VALUE_HANDLE: case VAR_DECL: case PARM_DECL: case CONST_DECL: @@ -653,7 +655,16 @@ valueize_refs (VEC (vn_reference_op_s, heap) *orig) { if (vro->opcode == SSA_NAME || (vro->op0 && TREE_CODE (vro->op0) == SSA_NAME)) - vro->op0 = SSA_VAL (vro->op0); + { + vro->op0 = SSA_VAL (vro->op0); + /* If it transforms from an SSA_NAME to a constant, update + the opcode. */ + if (TREE_CODE (vro->op0) != SSA_NAME && vro->opcode == SSA_NAME) + vro->opcode = TREE_CODE (vro->op0); + } + /* TODO: Do we want to valueize op2 and op1 of + ARRAY_REF/COMPONENT_REF for Ada */ + } return orig; @@ -733,10 +744,11 @@ cont: /* Lookup a SCCVN reference operation VR in the current hash table. Returns the resulting value number if it exists in the hash table, - NULL_TREE otherwise. */ + NULL_TREE otherwise. VNRESULT will be filled in with the actual + vn_reference_t stored in the hashtable if something is found. */ static tree -vn_reference_lookup_1 (vn_reference_t vr) +vn_reference_lookup_1 (vn_reference_t vr, vn_reference_t *vnresult) { void **slot; hashval_t hash; @@ -748,25 +760,58 @@ vn_reference_lookup_1 (vn_reference_t vr) slot = htab_find_slot_with_hash (valid_info->references, vr, hash, NO_INSERT); if (slot) - return ((vn_reference_t)*slot)->result; - + { + if (vnresult) + *vnresult = (vn_reference_t)*slot; + return ((vn_reference_t)*slot)->result; + } + return NULL_TREE; } -/* Lookup OP in the current hash table, and return the resulting - value number if it exists in the hash table. Return NULL_TREE if - it does not exist in the hash table. */ + +/* Lookup a reference operation by it's parts, in the current hash table. + Returns the resulting value number if it exists in the hash table, + NULL_TREE otherwise. VNRESULT will be filled in with the actual + vn_reference_t stored in the hashtable if something is found. */ tree -vn_reference_lookup (tree op, VEC (tree, gc) *vuses, bool maywalk) +vn_reference_lookup_pieces (VEC (tree, gc) *vuses, + VEC (vn_reference_op_s, heap) *operands, + vn_reference_t *vnresult) +{ + struct vn_reference_s vr1; + tree result; + if (vnresult) + *vnresult = NULL; + + vr1.vuses = valueize_vuses (vuses); + vr1.operands = valueize_refs (operands); + vr1.hashcode = vn_reference_compute_hash (&vr1); + result = vn_reference_lookup_1 (&vr1, vnresult); + + return result; +} + +/* Lookup OP in the current hash table, and return the resulting value + number if it exists in the hash table. Return NULL_TREE if it does + not exist in the hash table or if the result field of the structure + was NULL.. VNRESULT will be filled in with the vn_reference_t + stored in the hashtable if one exists. */ + +tree +vn_reference_lookup (tree op, VEC (tree, gc) *vuses, bool maywalk, + vn_reference_t *vnresult) { struct vn_reference_s vr1; tree result, def_stmt; + if (vnresult) + *vnresult = NULL; vr1.vuses = valueize_vuses (vuses); vr1.operands = valueize_refs (shared_reference_ops_from_ref (op)); vr1.hashcode = vn_reference_compute_hash (&vr1); - result = vn_reference_lookup_1 (&vr1); + result = vn_reference_lookup_1 (&vr1, vnresult); /* If there is a single defining statement for all virtual uses, we can use that, following virtual use-def chains. */ @@ -786,23 +831,27 @@ vn_reference_lookup (tree op, VEC (tree, gc) *vuses, bool maywalk) vdefs_to_vec (def_stmt, &vuses); vr1.vuses = valueize_vuses (vuses); vr1.hashcode = vn_reference_compute_hash (&vr1); - result = vn_reference_lookup_1 (&vr1); + result = vn_reference_lookup_1 (&vr1, vnresult); } return result; } + /* Insert OP into the current hash table with a value number of - RESULT. */ + RESULT, and return the resulting reference structure we created. */ -void +vn_reference_t vn_reference_insert (tree op, tree result, VEC (tree, gc) *vuses) { void **slot; vn_reference_t vr1; vr1 = (vn_reference_t) pool_alloc (current_info->references_pool); - + if (TREE_CODE (result) == SSA_NAME) + vr1->value_id = VN_INFO (result)->value_id; + else + vr1->value_id = get_or_alloc_constant_value_id (result); vr1->vuses = valueize_vuses (vuses); vr1->operands = valueize_refs (create_reference_ops_from_ref (op)); vr1->hashcode = vn_reference_compute_hash (vr1); @@ -824,11 +873,48 @@ vn_reference_insert (tree op, tree result, VEC (tree, gc) *vuses) free_reference (*slot); *slot = vr1; + return vr1; +} + +/* Insert a reference by it's pieces into the current hash table with + a value number of RESULT. Return the resulting reference + structure we created. */ + +vn_reference_t +vn_reference_insert_pieces (VEC (tree, gc) *vuses, + VEC (vn_reference_op_s, heap) *operands, + tree result, unsigned int value_id) + +{ + void **slot; + vn_reference_t vr1; + + vr1 = (vn_reference_t) pool_alloc (current_info->references_pool); + vr1->value_id = value_id; + vr1->vuses = valueize_vuses (vuses); + vr1->operands = valueize_refs (operands); + vr1->hashcode = vn_reference_compute_hash (vr1); + if (result && TREE_CODE (result) == SSA_NAME) + result = SSA_VAL (result); + vr1->result = result; + + slot = htab_find_slot_with_hash (current_info->references, vr1, vr1->hashcode, + INSERT); + + /* At this point we should have all the things inserted that we have + seen before, and we should never try inserting something that + already exists. */ + gcc_assert (!*slot); + if (*slot) + free_reference (*slot); + + *slot = vr1; + return vr1; } /* Compute and return the hash value for nary operation VBO1. */ -static inline hashval_t +inline hashval_t vn_nary_op_compute_hash (const vn_nary_op_t vno1) { hashval_t hash = 0; @@ -865,7 +951,7 @@ vn_nary_op_hash (const void *p1) /* Compare nary operations P1 and P2 and return true if they are equivalent. */ -static int +int vn_nary_op_eq (const void *p1, const void *p2) { const_vn_nary_op_t const vno1 = (const_vn_nary_op_t) p1; @@ -883,17 +969,56 @@ vn_nary_op_eq (const void *p1, const void *p2) return true; } -/* Lookup OP in the current hash table, and return the resulting - value number if it exists in the hash table. Return NULL_TREE if - it does not exist in the hash table. */ +/* Lookup a n-ary operation by its pieces and return the resulting value + number if it exists in the hash table. Return NULL_TREE if it does + not exist in the hash table or if the result field of the operation + is NULL. VNRESULT will contain the vn_nary_op_t from the hashtable + if it exists. */ + +tree +vn_nary_op_lookup_pieces (unsigned int length, enum tree_code code, + tree type, tree op0, tree op1, tree op2, + tree op3, vn_nary_op_t *vnresult) +{ + void **slot; + struct vn_nary_op_s vno1; + if (vnresult) + *vnresult = NULL; + vno1.opcode = code; + vno1.length = length; + vno1.type = type; + vno1.op[0] = op0; + vno1.op[1] = op1; + vno1.op[2] = op2; + vno1.op[3] = op3; + vno1.hashcode = vn_nary_op_compute_hash (&vno1); + slot = htab_find_slot_with_hash (current_info->nary, &vno1, vno1.hashcode, + NO_INSERT); + if (!slot && current_info == optimistic_info) + slot = htab_find_slot_with_hash (valid_info->nary, &vno1, vno1.hashcode, + NO_INSERT); + if (!slot) + return NULL_TREE; + if (vnresult) + *vnresult = (vn_nary_op_t)*slot; + return ((vn_nary_op_t)*slot)->result; +} + +/* Lookup OP in the current hash table, and return the resulting value + number if it exists in the hash table. Return NULL_TREE if it does + not exist in the hash table or if the result field of the operation + is NULL. VNRESULT will contain the vn_nary_op_t from the hashtable + if it exists. */ tree -vn_nary_op_lookup (tree op) +vn_nary_op_lookup (tree op, vn_nary_op_t *vnresult) { void **slot; struct vn_nary_op_s vno1; unsigned i; + if (vnresult) + *vnresult = NULL; vno1.opcode = TREE_CODE (op); vno1.length = TREE_CODE_LENGTH (TREE_CODE (op)); vno1.type = TREE_TYPE (op); @@ -907,13 +1032,56 @@ vn_nary_op_lookup (tree op) NO_INSERT); if (!slot) return NULL_TREE; + if (vnresult) + *vnresult = (vn_nary_op_t)*slot; return ((vn_nary_op_t)*slot)->result; } +/* Insert a n-ary operation into the current hash table using it's + pieces. Return the vn_nary_op_t structure we created and put in + the hashtable. */ + +vn_nary_op_t +vn_nary_op_insert_pieces (unsigned int length, enum tree_code code, + tree type, tree op0, + tree op1, tree op2, tree op3, + tree result, + unsigned int value_id) +{ + void **slot; + vn_nary_op_t vno1; + + vno1 = (vn_nary_op_t) obstack_alloc (¤t_info->nary_obstack, + (sizeof (struct vn_nary_op_s) + - sizeof (tree) * (4 - length))); + vno1->value_id = value_id; + vno1->opcode = code; + vno1->length = length; + vno1->type = type; + if (length >= 1) + vno1->op[0] = op0; + if (length >= 2) + vno1->op[1] = op1; + if (length >= 3) + vno1->op[2] = op2; + if (length >= 4) + vno1->op[3] = op3; + vno1->result = result; + vno1->hashcode = vn_nary_op_compute_hash (vno1); + slot = htab_find_slot_with_hash (current_info->nary, vno1, vno1->hashcode, + INSERT); + gcc_assert (!*slot); + + *slot = vno1; + return vno1; + +} + /* Insert OP into the current hash table with a value number of - RESULT. */ + RESULT. Return the vn_nary_op_t structure we created and put in + the hashtable. */ -void +vn_nary_op_t vn_nary_op_insert (tree op, tree result) { unsigned length = TREE_CODE_LENGTH (TREE_CODE (op)); @@ -924,6 +1092,7 @@ vn_nary_op_insert (tree op, tree result) vno1 = (vn_nary_op_t) obstack_alloc (¤t_info->nary_obstack, (sizeof (struct vn_nary_op_s) - sizeof (tree) * (4 - length))); + vno1->value_id = VN_INFO (result)->value_id; vno1->opcode = TREE_CODE (op); vno1->length = length; vno1->type = TREE_TYPE (op); @@ -936,6 +1105,7 @@ vn_nary_op_insert (tree op, tree result) gcc_assert (!*slot); *slot = vno1; + return vno1; } /* Compute a hashcode for PHI operation VP1 and return it. */ @@ -1034,7 +1204,7 @@ vn_phi_lookup (tree phi) /* Insert PHI into the current hash table with a value number of RESULT. */ -static void +static vn_phi_t vn_phi_insert (tree phi, tree result) { void **slot; @@ -1049,6 +1219,7 @@ vn_phi_insert (tree phi, tree result) def = TREE_CODE (def) == SSA_NAME ? SSA_VAL (def) : def; VEC_safe_push (tree, heap, args, def); } + vp1->value_id = VN_INFO (result)->value_id; vp1->phiargs = args; vp1->block = bb_for_stmt (phi); vp1->result = result; @@ -1060,6 +1231,7 @@ vn_phi_insert (tree phi, tree result) /* Because we iterate over phi operations more than once, it's possible the slot might already exist here, hence no assert.*/ *slot = vp1; + return vp1; } @@ -1168,7 +1340,7 @@ static bool visit_unary_op (tree lhs, tree op) { bool changed = false; - tree result = vn_nary_op_lookup (op); + tree result = vn_nary_op_lookup (op, NULL); if (result) { @@ -1190,7 +1362,7 @@ static bool visit_binary_op (tree lhs, tree op) { bool changed = false; - tree result = vn_nary_op_lookup (op); + tree result = vn_nary_op_lookup (op, NULL); if (result) { @@ -1212,7 +1384,8 @@ static bool visit_reference_op_load (tree lhs, tree op, tree stmt) { bool changed = false; - tree result = vn_reference_lookup (op, shared_vuses_from_stmt (stmt), true); + tree result = vn_reference_lookup (op, shared_vuses_from_stmt (stmt), true, + NULL); /* We handle type-punning through unions by value-numbering based on offset and size of the access. Be prepared to handle a @@ -1236,7 +1409,7 @@ visit_reference_op_load (tree lhs, tree op, tree stmt) result = val; if (!is_gimple_min_invariant (val) && TREE_CODE (val) != SSA_NAME) - result = vn_nary_op_lookup (val); + result = vn_nary_op_lookup (val, NULL); /* If the expression is not yet available, value-number lhs to a new SSA_NAME we create. */ if (!result && may_insert) @@ -1319,7 +1492,8 @@ visit_reference_op_store (tree lhs, tree op, tree stmt) Otherwise, the vdefs for the store are used when inserting into the table, since the store generates a new memory state. */ - result = vn_reference_lookup (lhs, shared_vuses_from_stmt (stmt), false); + result = vn_reference_lookup (lhs, shared_vuses_from_stmt (stmt), false, + NULL); if (result) { @@ -2146,12 +2320,18 @@ init_scc_vn (void) calculate_dominance_info (CDI_DOMINATORS); sccstack = NULL; + constant_to_value_id = htab_create (23, vn_constant_hash, vn_constant_eq, + free); + + constant_value_ids = BITMAP_ALLOC (NULL); + next_dfs_num = 1; - + next_value_id = 1; + vn_ssa_aux_table = VEC_alloc (vn_ssa_aux_t, heap, num_ssa_names + 1); /* VEC_alloc doesn't actually grow it to the right size, it just preallocates the space to do so. */ - VEC_safe_grow (vn_ssa_aux_t, heap, vn_ssa_aux_table, num_ssa_names + 1); + VEC_safe_grow_cleared (vn_ssa_aux_t, heap, vn_ssa_aux_table, num_ssa_names + 1); gcc_obstack_init (&vn_ssa_aux_obstack); shared_lookup_phiargs = NULL; @@ -2180,6 +2360,7 @@ init_scc_vn (void) { VN_INFO_GET (name)->valnum = VN_TOP; VN_INFO (name)->expr = name; + VN_INFO (name)->value_id = 0; } } @@ -2190,15 +2371,6 @@ init_scc_vn (void) allocate_vn_table (valid_info); optimistic_info = XCNEW (struct vn_tables_s); allocate_vn_table (optimistic_info); - pre_info = NULL; -} - -void -switch_to_PRE_table (void) -{ - pre_info = XCNEW (struct vn_tables_s); - allocate_vn_table (pre_info); - current_info = pre_info; } void @@ -2206,6 +2378,8 @@ free_scc_vn (void) { size_t i; + htab_delete (constant_to_value_id); + BITMAP_FREE (constant_value_ids); VEC_free (tree, heap, shared_lookup_phiargs); VEC_free (tree, gc, shared_lookup_vops); VEC_free (vn_reference_op_s, heap, shared_lookup_references); @@ -2215,10 +2389,6 @@ free_scc_vn (void) { tree name = ssa_name (i); if (name - && SSA_NAME_VALUE (name) - && TREE_CODE (SSA_NAME_VALUE (name)) == VALUE_HANDLE) - SSA_NAME_VALUE (name) = NULL; - if (name && VN_INFO (name)->needs_insertion) release_ssa_name (name); } @@ -2230,10 +2400,55 @@ free_scc_vn (void) XDELETE (valid_info); free_vn_table (optimistic_info); XDELETE (optimistic_info); - if (pre_info) +} + +/* Set the value ids in the valid hash tables. */ + +static void +set_hashtable_value_ids (void) +{ + htab_iterator hi; + vn_nary_op_t vno; + vn_reference_t vr; + vn_phi_t vp; + + /* Now set the value ids of the things we had put in the hash + table. */ + + FOR_EACH_HTAB_ELEMENT (valid_info->nary, + vno, vn_nary_op_t, hi) + { + if (vno->result) + { + if (TREE_CODE (vno->result) == SSA_NAME) + vno->value_id = VN_INFO (vno->result)->value_id; + else if (is_gimple_min_invariant (vno->result)) + vno->value_id = get_or_alloc_constant_value_id (vno->result); + } + } + + FOR_EACH_HTAB_ELEMENT (valid_info->phis, + vp, vn_phi_t, hi) { - free_vn_table (pre_info); - XDELETE (pre_info); + if (vp->result) + { + if (TREE_CODE (vp->result) == SSA_NAME) + vp->value_id = VN_INFO (vp->result)->value_id; + else if (is_gimple_min_invariant (vp->result)) + vp->value_id = get_or_alloc_constant_value_id (vp->result); + } + } + + FOR_EACH_HTAB_ELEMENT (valid_info->references, + vr, vn_reference_t, hi) + { + if (vr->result) + { + if (TREE_CODE (vr->result) == SSA_NAME) + vr->value_id = VN_INFO (vr->result)->value_id; + else if (is_gimple_min_invariant (vr->result)) + vr->value_id = get_or_alloc_constant_value_id (vr->result); + } } } @@ -2245,7 +2460,8 @@ run_scc_vn (bool may_insert_arg) { size_t i; tree param; - + bool changed = true; + may_insert = may_insert_arg; init_scc_vn (); @@ -2276,22 +2492,57 @@ run_scc_vn (bool may_insert_arg) } } + /* Initialize the value ids. */ + + for (i = 1; i < num_ssa_names; ++i) + { + tree name = ssa_name (i); + vn_ssa_aux_t info; + if (!name) + continue; + info = VN_INFO (name); + if (info->valnum == name) + info->value_id = get_next_value_id (); + else if (is_gimple_min_invariant (info->valnum)) + info->value_id = get_or_alloc_constant_value_id (info->valnum); + } + + /* Propagate until they stop changing. */ + while (changed) + { + changed = false; + for (i = 1; i < num_ssa_names; ++i) + { + tree name = ssa_name (i); + vn_ssa_aux_t info; + if (!name) + continue; + info = VN_INFO (name); + if (TREE_CODE (info->valnum) == SSA_NAME + && info->valnum != name + && info->value_id != VN_INFO (info->valnum)->value_id) + { + changed = true; + info->value_id = VN_INFO (info->valnum)->value_id; + } + } + } + + set_hashtable_value_ids (); + if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, "Value numbers:\n"); for (i = 0; i < num_ssa_names; i++) { tree name = ssa_name (i); - if (name && VN_INFO (name)->visited - && (SSA_VAL (name) != name - || is_gimple_min_invariant (VN_INFO (name)->expr))) + if (name + && VN_INFO (name)->visited + && SSA_VAL (name) != name) { print_generic_expr (dump_file, name, 0); fprintf (dump_file, " = "); - if (is_gimple_min_invariant (VN_INFO (name)->expr)) - print_generic_expr (dump_file, VN_INFO (name)->expr, 0); - else - print_generic_expr (dump_file, SSA_VAL (name), 0); + print_generic_expr (dump_file, SSA_VAL (name), 0); fprintf (dump_file, "\n"); } } @@ -2300,3 +2551,83 @@ run_scc_vn (bool may_insert_arg) may_insert = false; return true; } + +/* Return the maximum value id we have ever seen. */ + +unsigned int +get_max_value_id (void) +{ + return next_value_id; +} + +/* Return the next unique value id. */ + +unsigned int +get_next_value_id (void) +{ + return next_value_id++; +} + + +/* Compare two expressions E1 and E2 and return true if they are + equal. */ + +bool +expressions_equal_p (tree e1, tree e2) +{ + tree te1, te2; + + if (e1 == e2) + return true; + + te1 = TREE_TYPE (e1); + te2 = TREE_TYPE (e2); + + if (TREE_CODE (e1) == TREE_LIST && TREE_CODE (e2) == TREE_LIST) + { + tree lop1 = e1; + tree lop2 = e2; + for (lop1 = e1, lop2 = e2; + lop1 || lop2; + lop1 = TREE_CHAIN (lop1), lop2 = TREE_CHAIN (lop2)) + { + if (!lop1 || !lop2) + return false; + if (!expressions_equal_p (TREE_VALUE (lop1), TREE_VALUE (lop2))) + return false; + } + return true; + + } + else if (TREE_CODE (e1) == TREE_CODE (e2) + && operand_equal_p (e1, e2, OEP_PURE_SAME)) + return true; + + return false; +} + +/* Sort the VUSE array so that we can do equality comparisons + quicker on two vuse vecs. */ + +void +sort_vuses (VEC (tree,gc) *vuses) +{ + if (VEC_length (tree, vuses) > 1) + qsort (VEC_address (tree, vuses), + VEC_length (tree, vuses), + sizeof (tree), + operand_build_cmp); +} + +/* Sort the VUSE array so that we can do equality comparisons + quicker on two vuse vecs. */ + +void +sort_vuses_heap (VEC (tree,heap) *vuses) +{ + if (VEC_length (tree, vuses) > 1) + qsort (VEC_address (tree, vuses), + VEC_length (tree, vuses), + sizeof (tree), + operand_build_cmp); +} diff --git a/gcc/tree-ssa-sccvn.h b/gcc/tree-ssa-sccvn.h index ecc3297af42..9f391af43aa 100644 --- a/gcc/tree-ssa-sccvn.h +++ b/gcc/tree-ssa-sccvn.h @@ -24,6 +24,87 @@ /* TOP of the VN lattice. */ extern tree VN_TOP; +/* N-ary operations in the hashtable consist of length operands, an + opcode, and a type. Result is the value number of the operation, + and hashcode is stored to avoid having to calculate it + repeatedly. */ + +typedef struct vn_nary_op_s +{ + /* Unique identify that all expressions with the same value have. */ + unsigned int value_id; + ENUM_BITFIELD(tree_code) opcode : 16; + unsigned length : 16; + hashval_t hashcode; + tree result; + tree type; + tree op[4]; +} *vn_nary_op_t; +typedef const struct vn_nary_op_s *const_vn_nary_op_t; + +/* Phi nodes in the hashtable consist of their non-VN_TOP phi + arguments, and the basic block the phi is in. Result is the value + number of the operation, and hashcode is stored to avoid having to + calculate it repeatedly. Phi nodes not in the same block are never + considered equivalent. */ + +typedef struct vn_phi_s +{ + /* Unique identifier that all expressions with the same value have. */ + unsigned int value_id; + hashval_t hashcode; + VEC (tree, heap) *phiargs; + basic_block block; + tree result; +} *vn_phi_t; +typedef const struct vn_phi_s *const_vn_phi_t; + +/* Reference operands only exist in reference operations structures. + They consist of an opcode, type, and some number of operands. For + a given opcode, some, all, or none of the operands may be used. + The operands are there to store the information that makes up the + portion of the addressing calculation that opcode performs. */ + +typedef struct vn_reference_op_struct +{ + enum tree_code opcode; + tree type; + tree op0; + tree op1; + tree op2; +} vn_reference_op_s; +typedef vn_reference_op_s *vn_reference_op_t; +typedef const vn_reference_op_s *const_vn_reference_op_t; + +DEF_VEC_O(vn_reference_op_s); +DEF_VEC_ALLOC_O(vn_reference_op_s, heap); + +/* A reference operation in the hashtable is representation as a + collection of vuses, representing the memory state at the time of + the operation, and a collection of operands that make up the + addressing calculation. If two vn_reference_t's have the same set + of operands, they access the same memory location. We also store + the resulting value number, and the hashcode. The vuses are + always stored in order sorted by ssa name version. */ + +typedef struct vn_reference_s +{ + /* Unique identifier that all expressions with the same value have. */ + unsigned int value_id; + hashval_t hashcode; + VEC (tree, gc) *vuses; + VEC (vn_reference_op_s, heap) *operands; + tree result; +} *vn_reference_t; +typedef const struct vn_reference_s *const_vn_reference_t; + +typedef struct vn_constant_s +{ + unsigned int value_id; + hashval_t hashcode; + tree constant; +} *vn_constant_t; + typedef struct vn_ssa_aux { /* Value number. This may be an SSA name or a constant. */ @@ -31,6 +112,9 @@ typedef struct vn_ssa_aux /* Representative expression, if not a direct constant. */ tree expr; + /* Unique identifier that all expressions with the same value have. */ + unsigned int value_id; + /* SCC information. */ unsigned int dfsnum; unsigned int low; @@ -56,13 +140,31 @@ extern vn_ssa_aux_t VN_INFO (tree); extern vn_ssa_aux_t VN_INFO_GET (tree); bool run_scc_vn (bool); void free_scc_vn (void); -void switch_to_PRE_table (void); -tree vn_nary_op_lookup (tree); -void vn_nary_op_insert (tree, tree); -tree vn_reference_lookup (tree, VEC (tree, gc) *, bool); -void vn_reference_insert (tree, tree, VEC (tree, gc) *); +tree vn_nary_op_lookup (tree, vn_nary_op_t *); +tree vn_nary_op_lookup_pieces (unsigned int, enum tree_code, + tree, tree, tree, tree, tree, + vn_nary_op_t *); +vn_nary_op_t vn_nary_op_insert (tree, tree); +vn_nary_op_t vn_nary_op_insert_pieces (unsigned int, enum tree_code, + tree, tree, tree, tree, + tree, tree, unsigned int); +tree vn_reference_lookup_pieces (VEC (tree, gc) *, + VEC (vn_reference_op_s, heap) *, + vn_reference_t *); +tree vn_reference_lookup (tree, VEC (tree, gc) *, bool, vn_reference_t *); +vn_reference_t vn_reference_insert (tree, tree, VEC (tree, gc) *); +vn_reference_t vn_reference_insert_pieces (VEC (tree, gc) *, + VEC (vn_reference_op_s, heap) *, + tree, unsigned int); + +hashval_t vn_nary_op_compute_hash (const vn_nary_op_t); +int vn_nary_op_eq (const void *, const void *); +hashval_t vn_reference_compute_hash (const vn_reference_t); +int vn_reference_eq (const void *, const void *); +unsigned int get_max_value_id (void); +unsigned int get_next_value_id (void); +unsigned int get_or_alloc_constant_value_id (tree); +bool value_id_constant_p (unsigned int); VEC (tree, gc) *shared_vuses_from_stmt (tree); VEC (tree, gc) *copy_vuses_from_stmt (tree); - - #endif /* TREE_SSA_SCCVN_H */ diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index f5de5fdb7ac..462da5d6058 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -313,7 +313,7 @@ record_temporary_equivalences_from_stmts_at_dest (edge e, copy[i++] = use; if (TREE_CODE (use) == SSA_NAME) tmp = SSA_NAME_VALUE (use); - if (tmp && TREE_CODE (tmp) != VALUE_HANDLE) + if (tmp) SET_USE (use_p, tmp); } @@ -407,14 +407,14 @@ simplify_control_stmt_condition (edge e, if (TREE_CODE (op0) == SSA_NAME) { tree tmp = SSA_NAME_VALUE (op0); - if (tmp && TREE_CODE (tmp) != VALUE_HANDLE) + if (tmp) op0 = tmp; } if (TREE_CODE (op1) == SSA_NAME) { tree tmp = SSA_NAME_VALUE (op1); - if (tmp && TREE_CODE (tmp) != VALUE_HANDLE) + if (tmp) op1 = tmp; } diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c index 0ce5fc91ead..36c87f9bd51 100644 --- a/gcc/tree-switch-conversion.c +++ b/gcc/tree-switch-conversion.c @@ -622,7 +622,7 @@ gen_inbound_check (tree swtch) tree label_decl3 = create_artificial_label (); tree label1, label2, label3; - tree utype = unsigned_type_for (TREE_TYPE (info.index_expr)); + tree utype; tree tmp_u; tree cast, cast_assign; tree ulb, minus, minus_assign; @@ -638,6 +638,12 @@ gen_inbound_check (tree swtch) gcc_assert (info.default_values); bb0 = bb_for_stmt (swtch); + /* Make sure we do not generate arithmetics in a subrange. */ + if (TREE_TYPE (TREE_TYPE (info.index_expr))) + utype = unsigned_type_for (TREE_TYPE (TREE_TYPE (info.index_expr))); + else + utype = unsigned_type_for (TREE_TYPE (info.index_expr)); + /* (end of) block 0 */ bsi = bsi_for_stmt (info.arr_ref_first); tmp_u = make_rename_temp (utype, "csui"); diff --git a/gcc/tree-vn.c b/gcc/tree-vn.c deleted file mode 100644 index 7ec19cd4b39..00000000000 --- a/gcc/tree-vn.c +++ /dev/null @@ -1,406 +0,0 @@ -/* Value Numbering routines for tree expressions. - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software - Foundation, Inc. - Contributed by Daniel Berlin <dan@dberlin.org>, Steven Bosscher - <stevenb@suse.de> and Diego Novillo <dnovillo@redhat.com> - -This file is part of GCC. - -GCC 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. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -<http://www.gnu.org/licenses/>. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "ggc.h" -#include "tree.h" -#include "tree-flow.h" -#include "hashtab.h" -#include "langhooks.h" -#include "tree-pass.h" -#include "tree-dump.h" -#include "diagnostic.h" -#include "tree-ssa-sccvn.h" - -/* Most of this is PRE specific. The real grunt work is done in - tree-ssa-sccvn.c. This is where the lookup and insertion - functions, etc, can be found. */ - -/* Create and return a new value handle node of type TYPE. */ - -tree -make_value_handle (tree type) -{ - static unsigned int id = 0; - tree vh; - - vh = build0 (VALUE_HANDLE, type); - VALUE_HANDLE_ID (vh) = id++; - return vh; -} - -/* Compare two expressions E1 and E2 and return true if they are - equal. */ - -bool -expressions_equal_p (tree e1, tree e2) -{ - tree te1, te2; - - if (e1 == e2) - return true; - - te1 = TREE_TYPE (e1); - te2 = TREE_TYPE (e2); - - if (TREE_CODE (e1) == TREE_LIST && TREE_CODE (e2) == TREE_LIST) - { - tree lop1 = e1; - tree lop2 = e2; - for (lop1 = e1, lop2 = e2; - lop1 || lop2; - lop1 = TREE_CHAIN (lop1), lop2 = TREE_CHAIN (lop2)) - { - if (!lop1 || !lop2) - return false; - if (!expressions_equal_p (TREE_VALUE (lop1), TREE_VALUE (lop2))) - return false; - } - return true; - - } - else if (TREE_CODE (e1) == TREE_CODE (e2) - && operand_equal_p (e1, e2, OEP_PURE_SAME)) - return true; - - return false; -} - -/* Set the value handle for expression E to value V. */ - -void -set_value_handle (tree e, tree v) -{ - if (TREE_CODE (e) == SSA_NAME) - SSA_NAME_VALUE (e) = v; - else if (EXPR_P (e) || DECL_P (e) || TREE_CODE (e) == TREE_LIST - || GIMPLE_STMT_P (e) - || TREE_CODE (e) == CONSTRUCTOR) - get_tree_common_ann (e)->value_handle = v; - else - /* Do nothing. Constants are their own value handles. */ - gcc_assert (is_gimple_min_invariant (e)); -} - -/* Print out the "Created value <x> for <Y>" statement to the - dump_file. - This is factored because both versions of lookup use it, and it - obscures the real work going on in those functions. */ - -static void -print_creation_to_file (tree v, tree expr, VEC (tree, gc) *vuses) -{ - fprintf (dump_file, "Created value "); - print_generic_expr (dump_file, v, dump_flags); - fprintf (dump_file, " for "); - print_generic_expr (dump_file, expr, dump_flags); - - if (vuses && VEC_length (tree, vuses) != 0) - { - size_t i; - tree vuse; - - fprintf (dump_file, " vuses: ("); - for (i = 0; VEC_iterate (tree, vuses, i, vuse); i++) - { - print_generic_expr (dump_file, vuse, dump_flags); - if (VEC_length (tree, vuses) - 1 != i) - fprintf (dump_file, ","); - } - fprintf (dump_file, ")"); - } - fprintf (dump_file, "\n"); -} - -/* Sort the VUSE array so that we can do equality comparisons - quicker on two vuse vecs. */ - -void -sort_vuses (VEC (tree,gc) *vuses) -{ - if (VEC_length (tree, vuses) > 1) - qsort (VEC_address (tree, vuses), - VEC_length (tree, vuses), - sizeof (tree), - operand_build_cmp); -} - -/* Sort the VUSE array so that we can do equality comparisons - quicker on two vuse vecs. */ - -void -sort_vuses_heap (VEC (tree,heap) *vuses) -{ - if (VEC_length (tree, vuses) > 1) - qsort (VEC_address (tree, vuses), - VEC_length (tree, vuses), - sizeof (tree), - operand_build_cmp); -} - -/* Insert EXPR into VALUE_TABLE with value VAL, and add expression - EXPR to the value set for value VAL. */ - -void -vn_add (tree expr, tree val) -{ - switch (TREE_CODE_CLASS (TREE_CODE (expr))) - { - case tcc_comparison: - case tcc_binary: - vn_nary_op_insert (expr, val); - break; - case tcc_unary: - vn_nary_op_insert (expr, val); - break; - /* In the case of array-refs of constants, for example, we can - end up with no vuses. */ - case tcc_reference: - vn_reference_insert (expr, val, NULL); - break; - /* The *only* time CALL_EXPR should appear here is - when it has no vuses. */ - case tcc_vl_exp: - case tcc_exceptional: - case tcc_expression: - case tcc_declaration: - if (TREE_CODE (expr) == CALL_EXPR || DECL_P (expr)) - { - vn_reference_insert (expr, val, NULL); - break; - } - else if (TREE_CODE (expr) == SSA_NAME) - { - SSA_NAME_VALUE (expr) = val; - break; - } - switch (TREE_CODE (expr)) - { - case ADDR_EXPR: - case TRUTH_AND_EXPR: - case TRUTH_OR_EXPR: - case TRUTH_XOR_EXPR: - case TRUTH_NOT_EXPR: - vn_nary_op_insert (expr, val); - break; - default: - gcc_unreachable (); - } - break; - default: - gcc_unreachable (); - } - set_value_handle (expr, val); - if (TREE_CODE (val) == VALUE_HANDLE) - add_to_value (val, expr); -} - -/* Insert EXPR into the value numbering tables with value VAL, and - add expression EXPR to the value set for value VAL. VUSES - represents the virtual use operands associated with EXPR. It is - used when computing a hash value for EXPR. */ - -void -vn_add_with_vuses (tree expr, tree val, VEC (tree, gc) *vuses) -{ - if (!vuses) - { - vn_add (expr, val); - return; - } - vn_reference_insert (expr, val, vuses); - - set_value_handle (expr, val); - if (TREE_CODE (val) == VALUE_HANDLE) - add_to_value (val, expr); -} - -/* Lookup EXPR in the value numbering tables and return the result, if - we have one. */ - -tree -vn_lookup (tree expr) -{ - /* Constants are their own value. */ - if (is_gimple_min_invariant (expr) || TREE_CODE (expr) == FIELD_DECL) - return expr; - - switch (TREE_CODE_CLASS (TREE_CODE (expr))) - { - case tcc_comparison: - case tcc_binary: - return vn_nary_op_lookup (expr); - case tcc_unary: - return vn_nary_op_lookup (expr); - break; - /* In the case of array-refs of constants, for example, we can - end up with no vuses. */ - case tcc_reference: - return vn_reference_lookup (expr, NULL, false); - break; - /* It is possible to have CALL_EXPR with no vuses for things - like "cos", and these will fall into vn_lookup. */ - case tcc_vl_exp: - case tcc_exceptional: - case tcc_expression: - case tcc_declaration: - if (TREE_CODE (expr) == CALL_EXPR || DECL_P (expr)) - return vn_reference_lookup (expr, NULL, false); - else if (TREE_CODE (expr) == SSA_NAME) - return SSA_NAME_VALUE (expr); - switch (TREE_CODE (expr)) - { - case ADDR_EXPR: - case TRUTH_AND_EXPR: - case TRUTH_OR_EXPR: - case TRUTH_XOR_EXPR: - case TRUTH_NOT_EXPR: - return vn_nary_op_lookup (expr); - default: - gcc_unreachable (); - } - break; - default: - gcc_unreachable (); - } - return NULL; -} - -/* Search in the value numbering tables for an existing instance of - expression EXPR, and return its value, or NULL if none has been set. STMT - represents the stmt associated with EXPR. It is used when computing the - hash value for EXPR for reference operations. */ - -tree -vn_lookup_with_stmt (tree expr, tree stmt) -{ - if (stmt == NULL) - return vn_lookup (expr); - - /* Constants are their own value. */ - if (is_gimple_min_invariant (expr) || TREE_CODE (expr) == FIELD_DECL) - return expr; - - return vn_lookup_with_vuses (expr, shared_vuses_from_stmt (stmt)); -} - -/* Search in VALUE_TABLE for an existing instance of expression EXPR, - and return its value, or NULL if none has been set. VUSES is the - list of virtual use operands associated with EXPR. It is used when - computing the hash value for EXPR. */ - -tree -vn_lookup_with_vuses (tree expr, VEC (tree, gc) *vuses) -{ - if (!vuses || !VEC_length (tree, vuses)) - return vn_lookup (expr); - - if (is_gimple_min_invariant (expr) || TREE_CODE (expr) == FIELD_DECL) - return expr; - - /* We may not walk the use-def chains here as the alias oracle cannot - properly deal with VALUE_HANDLE tree nodes we feed it here. */ - return vn_reference_lookup (expr, vuses, false); -} - -static tree -create_value_handle_for_expr (tree expr, VEC(tree, gc) *vuses) -{ - tree v; - - v = make_value_handle (TREE_TYPE (expr)); - - if (dump_file && (dump_flags & TDF_DETAILS)) - print_creation_to_file (v, expr, vuses); - return v; -} - -/* Like vn_lookup, but creates a new value for the operation if one - does not exist. */ - -tree -vn_lookup_or_add (tree expr) -{ - tree v = vn_lookup (expr); - - if (v == NULL_TREE) - { - v = create_value_handle_for_expr (expr, NULL); - vn_add (expr, v); - } - else - set_value_handle (expr, v); - - return v; -} - -/* Like vn_lookup, but handles reference operations as well by using - STMT to get the set of vuses. */ - -tree -vn_lookup_or_add_with_stmt (tree expr, tree stmt) -{ - tree v; - if (!stmt) - return vn_lookup_or_add (expr); - - v = vn_lookup_with_stmt (expr, stmt); - if (v == NULL_TREE) - { - VEC (tree, gc) *vuses = copy_vuses_from_stmt (stmt); - v = create_value_handle_for_expr (expr, vuses); - vn_add_with_vuses (expr, v, vuses); - } - else - set_value_handle (expr, v); - - return v; -} - -/* Like vn_lookup, but creates a new value for expression EXPR, if - EXPR doesn't already have a value. Return the existing/created - value for EXPR. STMT represents the stmt associated with EXPR. It is used - when computing the hash value for EXPR. */ - -tree -vn_lookup_or_add_with_vuses (tree expr, VEC (tree, gc) *vuses) -{ - tree v; - - if (!vuses || VEC_length (tree, vuses) == 0) - return vn_lookup_or_add (expr); - - v = vn_lookup_with_vuses (expr, vuses); - if (v == NULL_TREE) - { - v = create_value_handle_for_expr (expr, vuses); - vn_add_with_vuses (expr, v, vuses); - } - else - set_value_handle (expr, v); - - return v; -} - diff --git a/gcc/tree.c b/gcc/tree.c index 97b53bd951c..0bb9fd9367f 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -347,35 +347,77 @@ decl_assembler_name (tree decl) /* Compare ASMNAME with the DECL_ASSEMBLER_NAME of DECL. */ bool -decl_assembler_name_equal (tree decl, tree asmname) +decl_assembler_name_equal (tree decl, const_tree asmname) { tree decl_asmname = DECL_ASSEMBLER_NAME (decl); + const char *decl_str; + const char *asmname_str; + bool test = false; if (decl_asmname == asmname) return true; + decl_str = IDENTIFIER_POINTER (decl_asmname); + asmname_str = IDENTIFIER_POINTER (asmname); + + /* If the target assembler name was set by the user, things are trickier. We have a leading '*' to begin with. After that, it's arguable what is the correct thing to do with -fleading-underscore. Arguably, we've historically been doing the wrong thing in assemble_alias by always printing the leading underscore. Since we're not changing that, make sure user_label_prefix follows the '*' before matching. */ - if (IDENTIFIER_POINTER (decl_asmname)[0] == '*') + if (decl_str[0] == '*') { - const char *decl_str = IDENTIFIER_POINTER (decl_asmname) + 1; + size_t ulp_len = strlen (user_label_prefix); + + decl_str ++; + + if (ulp_len == 0) + test = true; + else if (strncmp (decl_str, user_label_prefix, ulp_len) == 0) + decl_str += ulp_len, test=true; + else + decl_str --; + } + if (asmname_str[0] == '*') + { + size_t ulp_len = strlen (user_label_prefix); + + asmname_str ++; + + if (ulp_len == 0) + test = true; + else if (strncmp (asmname_str, user_label_prefix, ulp_len) == 0) + asmname_str += ulp_len, test=true; + else + asmname_str --; + } + + if (!test) + return false; + return strcmp (decl_str, asmname_str) == 0; +} + +/* Hash asmnames ignoring the user specified marks. */ + +hashval_t +decl_assembler_name_hash (const_tree asmname) +{ + if (IDENTIFIER_POINTER (asmname)[0] == '*') + { + const char *decl_str = IDENTIFIER_POINTER (asmname) + 1; size_t ulp_len = strlen (user_label_prefix); if (ulp_len == 0) ; else if (strncmp (decl_str, user_label_prefix, ulp_len) == 0) decl_str += ulp_len; - else - return false; - return strcmp (decl_str, IDENTIFIER_POINTER (asmname)) == 0; + return htab_hash_string (decl_str); } - return false; + return htab_hash_string (IDENTIFIER_POINTER (asmname)); } /* Compute the number of bytes occupied by a tree with code CODE. @@ -462,7 +504,6 @@ tree_code_size (enum tree_code code) case STATEMENT_LIST: return sizeof (struct tree_statement_list); case BLOCK: return sizeof (struct tree_block); - case VALUE_HANDLE: return sizeof (struct tree_value_handle); case CONSTRUCTOR: return sizeof (struct tree_constructor); default: @@ -2387,7 +2428,6 @@ tree_node_structure (const_tree t) case BLOCK: return TS_BLOCK; case CONSTRUCTOR: return TS_CONSTRUCTOR; case TREE_BINFO: return TS_BINFO; - case VALUE_HANDLE: return TS_VALUE_HANDLE; case OMP_CLAUSE: return TS_OMP_CLAUSE; default: @@ -3639,7 +3679,7 @@ build_decl_attribute_variant (tree ddecl, tree attribute) /* Produce good hash value combining VAL and VAL2. */ -static inline hashval_t +hashval_t iterative_hash_hashval_t (hashval_t val, hashval_t val2) { /* the golden ratio; an arbitrary value. */ @@ -5358,7 +5398,6 @@ iterative_hash_expr (const_tree t, hashval_t val) return iterative_hash_expr (TREE_VECTOR_CST_ELTS (t), val); case SSA_NAME: - case VALUE_HANDLE: /* we can just compare by pointer. */ return iterative_hash_pointer (t, val); diff --git a/gcc/tree.def b/gcc/tree.def index 7474f2e68f1..48b2f1cbde1 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -925,12 +925,6 @@ DEFTREECODE (POLYNOMIAL_CHREC, "polynomial_chrec", tcc_expression, 3) Use the interface in tree-iterator.h to access this node. */ DEFTREECODE (STATEMENT_LIST, "statement_list", tcc_exceptional, 0) -/* Value handles. Artificial nodes to represent expressions in - partial redundancy elimination (tree-ssa-pre.c). These nodes are - used for expression canonicalization. If two expressions compute - the same value, they will be assigned the same value handle. */ -DEFTREECODE (VALUE_HANDLE, "value_handle", tcc_exceptional, 0) - /* Predicate assertion. Artificial expression generated by the optimizers to keep track of predicate values. This expression may only appear on the RHS of assignments. diff --git a/gcc/tree.h b/gcc/tree.h index e6b9f9cf65e..103f802c806 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3492,26 +3492,6 @@ struct tree_statement_list struct tree_statement_list_node *tail; }; -#define VALUE_HANDLE_ID(NODE) \ - (VALUE_HANDLE_CHECK (NODE)->value_handle.id) - -#define VALUE_HANDLE_EXPR_SET(NODE) \ - (VALUE_HANDLE_CHECK (NODE)->value_handle.expr_set) - -/* Defined and used in tree-ssa-pre.c. */ - -struct tree_value_handle GTY(()) -{ - struct tree_common common; - - /* The set of expressions represented by this handle. */ - struct bitmap_set * GTY ((skip)) expr_set; - - /* Unique ID for this value handle. IDs are handed out in a - conveniently dense form starting at 0, so that we can make - bitmaps of value handles. */ - unsigned int id; -}; /* Define the overall contents of a tree node. It may be any of the structures declared above @@ -3552,7 +3532,6 @@ union tree_node GTY ((ptr_alias (union lang_tree_node), struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo; struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list; struct gimple_stmt GTY ((tag ("TS_GIMPLE_STATEMENT"))) gstmt; - struct tree_value_handle GTY ((tag ("TS_VALUE_HANDLE"))) value_handle; struct tree_constructor GTY ((tag ("TS_CONSTRUCTOR"))) constructor; struct tree_memory_tag GTY ((tag ("TS_MEMORY_TAG"))) mtag; struct tree_omp_clause GTY ((tag ("TS_OMP_CLAUSE"))) omp_clause; @@ -3944,7 +3923,8 @@ enum ptrmemfunc_vbit_where_t #define NULL_TREE (tree) NULL extern tree decl_assembler_name (tree); -extern bool decl_assembler_name_equal (tree decl, tree asmname); +extern bool decl_assembler_name_equal (tree decl, const_tree asmname); +extern hashval_t decl_assembler_name_hash (const_tree asmname); /* Compute the number of bytes occupied by 'node'. This routine only looks at TREE_CODE and, if the code is TREE_VEC, TREE_VEC_LENGTH. */ @@ -4964,6 +4944,7 @@ extern int tree_log2 (const_tree); extern int tree_floor_log2 (const_tree); extern int simple_cst_equal (const_tree, const_tree); extern hashval_t iterative_hash_expr (const_tree, hashval_t); +extern hashval_t iterative_hash_hashval_t (hashval_t, hashval_t); extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT); extern int type_list_equal (const_tree, const_tree); extern int chain_member (const_tree, const_tree); diff --git a/gcc/treestruct.def b/gcc/treestruct.def index fb93e2c9dd4..cdf52704ebd 100644 --- a/gcc/treestruct.def +++ b/gcc/treestruct.def @@ -59,7 +59,6 @@ DEFTREESTRUCT(TS_BLOCK, "block") DEFTREESTRUCT(TS_BINFO, "binfo") DEFTREESTRUCT(TS_STATEMENT_LIST, "statement list") DEFTREESTRUCT(TS_GIMPLE_STATEMENT, "gimple statement") -DEFTREESTRUCT(TS_VALUE_HANDLE, "value handle") DEFTREESTRUCT(TS_CONSTRUCTOR, "constructor") DEFTREESTRUCT(TS_MEMORY_TAG, "memory tag") DEFTREESTRUCT(TS_OMP_CLAUSE, "omp clause") diff --git a/gcc/varasm.c b/gcc/varasm.c index d8c611444d3..49cdda4c9a5 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5380,7 +5380,10 @@ assemble_alias (tree decl, tree target) /* If the target has already been emitted, we don't have to queue the alias. This saves a tad of memory. */ - target_decl = find_decl_and_mark_needed (decl, target); + if (!flag_unit_at_a_time || cgraph_global_info_ready) + target_decl = find_decl_and_mark_needed (decl, target); + else + target_decl= NULL; if (target_decl && TREE_ASM_WRITTEN (target_decl)) do_assemble_alias (decl, target); else diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 2d29a309566..9b3b53e25de 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,20 @@ +2008-07-14 Ben Elliston <bje@au.ibm.com> + + * include/cpplib.h (NODE_CONDITIONAL): New. + (struct cpp_callbacks): New macro_to_expand field. + (struct cpp_hashnode): Adjust size of flags and type fields. + (cpp_peek_token): Prototype. + * lex.c (cpp_peek_token): New function. + (_cpp_temp_token): Protect pre-existing lookaheads. + * macro.c (cpp_get_token): Expand any conditional macros. + (_cpp_backup_tokens_direct): New. + (_cpp_backup_tokens): Call _cpp_backup_tokens_direct. + (warn_of_redefinition): Silently allow redefined conditional + macros. + (_cpp_create_definition): Remove the conditional flag when a user + defines one of the conditional macros. + * internal.h (_cpp_backup_tokens_direct): New prototype. + 2008-06-13 Andrew Haley <aph@redhat.com> PR preprocessor/33305 diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 92ab291db2c..a79c26dd6b8 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -484,6 +484,10 @@ struct cpp_callbacks void (*read_pch) (cpp_reader *, const char *, int, const char *); missing_header_cb missing_header; + /* Context-sensitive macro support. Returns macro (if any) that should + be expanded. */ + cpp_hashnode * (*macro_to_expand) (cpp_reader *, const cpp_token *); + /* Called to emit a diagnostic if client_diagnostic option is true. This callback receives the translated message. */ void (*error) (cpp_reader *, int, const char *, va_list *) @@ -558,6 +562,7 @@ extern const char *progname; #define NODE_DISABLED (1 << 5) /* A disabled macro. */ #define NODE_MACRO_ARG (1 << 6) /* Used during #define processing. */ #define NODE_USED (1 << 7) /* Dumped with -dU. */ +#define NODE_CONDITIONAL (1 << 8) /* Conditional macro */ /* Different flavors of hash node. */ enum node_type @@ -629,8 +634,8 @@ struct cpp_hashnode GTY(()) then index into directive table. Otherwise, a NODE_OPERATOR. */ unsigned char rid_code; /* Rid code - for front ends. */ - ENUM_BITFIELD(node_type) type : 8; /* CPP node type. */ - unsigned char flags; /* CPP flags. */ + ENUM_BITFIELD(node_type) type : 7; /* CPP node type. */ + unsigned int flags : 9; /* CPP flags. */ union _cpp_hashnode_value GTY ((desc ("CPP_HASHNODE_VALUE_IDX (%1)"))) value; }; @@ -717,6 +722,7 @@ extern const cpp_token *cpp_get_token_with_location (cpp_reader *, extern const unsigned char *cpp_macro_definition (cpp_reader *, const cpp_hashnode *); extern void _cpp_backup_tokens (cpp_reader *, unsigned int); +extern const cpp_token *cpp_peek_token (cpp_reader *, int); /* Evaluate a CPP_CHAR or CPP_WCHAR token. */ extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *, diff --git a/libcpp/internal.h b/libcpp/internal.h index 65cac325186..4fb4e431b81 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -532,6 +532,7 @@ extern const unsigned char *_cpp_builtin_macro_text (cpp_reader *, extern int _cpp_warn_if_unused_macro (cpp_reader *, cpp_hashnode *, void *); extern void _cpp_push_token_context (cpp_reader *, cpp_hashnode *, const cpp_token *, unsigned int); +extern void _cpp_backup_tokens_direct (cpp_reader *, unsigned int); /* In identifiers.c */ extern void _cpp_init_hashtable (cpp_reader *, hash_table *); diff --git a/libcpp/lex.c b/libcpp/lex.c index 70897fd57db..c1e009da06b 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -734,6 +734,49 @@ next_tokenrun (tokenrun *run) return run->next; } +/* Look ahead in the input stream. */ +const cpp_token * +cpp_peek_token (cpp_reader *pfile, int index) +{ + cpp_context *context = pfile->context; + const cpp_token *peektok; + int count; + + /* First, scan through any pending cpp_context objects. */ + while (context->prev) + { + ptrdiff_t sz = (context->direct_p + ? LAST (context).token - FIRST (context).token + : LAST (context).ptoken - FIRST (context).ptoken); + + if (index < (int) sz) + return (context->direct_p + ? FIRST (context).token + index + : *(FIRST (context).ptoken + index)); + + index -= (int) sz; + context = context->prev; + } + + /* We will have to read some new tokens after all (and do so + without invalidating preceding tokens). */ + count = index; + pfile->keep_tokens++; + + do + { + peektok = _cpp_lex_token (pfile); + if (peektok->type == CPP_EOF) + return peektok; + } + while (index--); + + _cpp_backup_tokens_direct (pfile, count + 1); + pfile->keep_tokens--; + + return peektok; +} + /* Allocate a single token that is invalidated at the same time as the rest of the tokens on the line. Has its line and col set to the same as the last lexed token, so that diagnostics appear in the @@ -742,9 +785,30 @@ cpp_token * _cpp_temp_token (cpp_reader *pfile) { cpp_token *old, *result; + ptrdiff_t sz = pfile->cur_run->limit - pfile->cur_token; + ptrdiff_t la = (ptrdiff_t) pfile->lookaheads; old = pfile->cur_token - 1; - if (pfile->cur_token == pfile->cur_run->limit) + /* Any pre-existing lookaheads must not be clobbered. */ + if (la) + { + if (sz <= la) + { + tokenrun *next = next_tokenrun (pfile->cur_run); + + if (sz < la) + memmove (next->base + 1, next->base, + (la - sz) * sizeof (cpp_token)); + + next->base[0] = pfile->cur_run->limit[-1]; + } + + if (sz > 1) + memmove (pfile->cur_token + 1, pfile->cur_token, + MIN (la, sz - 1) * sizeof (cpp_token)); + } + + if (!sz && pfile->cur_token == pfile->cur_run->limit) { pfile->cur_run = next_tokenrun (pfile->cur_run); pfile->cur_token = pfile->cur_run->base; diff --git a/libcpp/macro.c b/libcpp/macro.c index edc2856551a..1563d780d6f 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -1251,16 +1251,21 @@ cpp_get_token (cpp_reader *pfile) if (!(node->flags & NODE_DISABLED)) { - int ret; + int ret = 0; /* If not in a macro context, and we're going to start an expansion, record the location. */ if (can_set && !context->macro) pfile->invocation_location = result->src_loc; if (pfile->state.prevent_expansion) break; - ret = enter_macro_context (pfile, node, result); - if (ret) - { + + /* Conditional macros require that a predicate be evaluated + first. */ + if (((!(node->flags & NODE_CONDITIONAL)) + || (pfile->cb.macro_to_expand + && (node = pfile->cb.macro_to_expand (pfile, result)))) + && (ret = enter_macro_context (pfile, node, result))) + { if (pfile->state.in_directive || ret == 2) continue; return padding_token (pfile, result); @@ -1338,26 +1343,31 @@ cpp_scan_nooutput (cpp_reader *pfile) pfile->state.prevent_expansion--; } +/* Step back one or more tokens obtained from the lexer. */ +void +_cpp_backup_tokens_direct (cpp_reader *pfile, unsigned int count) +{ + pfile->lookaheads += count; + while (count--) + { + pfile->cur_token--; + if (pfile->cur_token == pfile->cur_run->base + /* Possible with -fpreprocessed and no leading #line. */ + && pfile->cur_run->prev != NULL) + { + pfile->cur_run = pfile->cur_run->prev; + pfile->cur_token = pfile->cur_run->limit; + } + } +} + /* Step back one (or more) tokens. Can only step back more than 1 if they are from the lexer, and not from macro expansion. */ void _cpp_backup_tokens (cpp_reader *pfile, unsigned int count) { if (pfile->context->prev == NULL) - { - pfile->lookaheads += count; - while (count--) - { - pfile->cur_token--; - if (pfile->cur_token == pfile->cur_run->base - /* Possible with -fpreprocessed and no leading #line. */ - && pfile->cur_run->prev != NULL) - { - pfile->cur_run = pfile->cur_run->prev; - pfile->cur_token = pfile->cur_run->limit; - } - } - } + _cpp_backup_tokens_direct (pfile, count); else { if (count != 1) @@ -1383,6 +1393,11 @@ warn_of_redefinition (cpp_reader *pfile, const cpp_hashnode *node, if (node->flags & NODE_WARN) return true; + /* Redefinitions of conditional (context-sensitive) macros, on + the other hand, must be allowed silently. */ + if (node->flags & NODE_CONDITIONAL) + return false; + /* Redefinition of a macro is allowed if and only if the old and new definitions are the same. (6.10.3 paragraph 2). */ macro1 = node->value.macro; @@ -1815,6 +1830,10 @@ _cpp_create_definition (cpp_reader *pfile, cpp_hashnode *node) && ustrcmp (NODE_NAME (node), (const uchar *) "__STDC_CONSTANT_MACROS")) node->flags |= NODE_WARN; + /* If user defines one of the conditional macros, remove the + conditional flag */ + node->flags &= ~NODE_CONDITIONAL; + return ok; } diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 2d7516b528c..671b48bde76 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,11 @@ +2008-07-08 David Edelsohn <edelsohn@gnu.org> + + * testsuite/libgomp.c++/c++.exp: Append multilib library path. + * testsuite/libgomp.fortran/fortran.exp: Same. + * testsuite/libgomp.c/c.exp: Same. + * testsuite/lib/libgomp.exp: Append AIX libgcc pthread multilib + directory to library path first. + 2008-06-29 Krister Walfridsson <krister.walfridsson@gmail.com> * env.c (parse_stacksize): Add cast to avoid warning. diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 274ee17f0a7..9aa891f202d 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -96,6 +96,10 @@ proc libgomp_init { args } { # Compute what needs to be added to the existing LD_LIBRARY_PATH. if {$gccdir != ""} { + # Add AIX pthread directory first. + if { [llength [glob -nocomplain ${gccdir}/pthread/libgcc_s*.a]] >= 1 } { + append always_ld_library_path ":${gccdir}/pthread" + } append always_ld_library_path ":${gccdir}" set compiler [lindex $GCC_UNDER_TEST 0] diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp index f3f42de6619..d9872cc1ef3 100644 --- a/libgomp/testsuite/libgomp.c++/c++.exp +++ b/libgomp/testsuite/libgomp.c++/c++.exp @@ -29,6 +29,7 @@ if { $lang_test_file_found } { set tests [lsort [glob -nocomplain $srcdir/$subdir/*.C]] set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" + append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] set_ld_library_path_env_vars set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags" diff --git a/libgomp/testsuite/libgomp.c/c.exp b/libgomp/testsuite/libgomp.c/c.exp index 9eaab6252c3..4085d0c07e0 100644 --- a/libgomp/testsuite/libgomp.c/c.exp +++ b/libgomp/testsuite/libgomp.c/c.exp @@ -18,6 +18,7 @@ dg-init set tests [lsort [find $srcdir/$subdir *.c]] set ld_library_path $always_ld_library_path +append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] set_ld_library_path_env_vars # Main loop. diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp index b7d6b1072e7..293ccbc6531 100644 --- a/libgomp/testsuite/libgomp.fortran/fortran.exp +++ b/libgomp/testsuite/libgomp.fortran/fortran.exp @@ -13,6 +13,7 @@ if [file exists "${blddir}/${lang_test_file}"] { set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]] set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" + append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] set_ld_library_path_env_vars # Main loop. diff --git a/libjava/gnu/gcj/convert/make-trie.h b/libjava/gnu/gcj/convert/make-trie.h new file mode 100644 index 00000000000..bbe20a5ccd8 --- /dev/null +++ b/libjava/gnu/gcj/convert/make-trie.h @@ -0,0 +1,13 @@ +/* Copyright (C) 2008 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#include <stddef.h> + +extern void print_table (char *name, FILE *out); + +extern void enter (int key, int value); diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index da30a6a741e..dc9437e5a94 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,64 @@ +2008-07-12 Paolo Carlini <paolo.carlini@oracle.com> + + * include/std/date_time: Remove, per N2549, in WP. + * src/date_time.cc: Likewise. + * config/abi/pre/gnu.ver: Remove <date_time> symbols. + * include/Makefile.am: Remove date_time in std headers. + * src/Makefile.am: Remove date_time.cc to source files. + * include/Makefile.in: Regenerate. + * src/Makefile.in: Likewise. + * testsuite/31_date_time/headers/date_time/types_std.cc: Remove. + * testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc: Likewise. + * testsuite/31_date_time/headers/date_time/functions_std.cc: Likewise. + * testsuite/31_date_time/headers/date_time/synopsis.cc: Likewise. + * testsuite/31_date_time/nanoseconds/requirements/traits.cc: Likewise. + * testsuite/31_date_time/nanoseconds/requirements/duration.cc: Likewise. + * testsuite/31_date_time/system_time/requirements: Likewise. + * testsuite/31_date_time/system_time/requirements/traits.cc: Likewise. + * testsuite/17_intro/headers/c++200x/all.cc: Adjust. + * testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: Adjust. + +2008-07-10 Johannes Singler <singler@ira.uka.de> + + * include/parallel/balanced_quicksort.h: + (qsb_divide) Replace "*end" by "*(end - 1)" in assertion. + +2008-07-09 Benjamin Kosnik <bkoz@redhat.com> + + PR libstdc++/36451 + * doc/xml/manual/allocator.xml: Fix links. + * doc/html/*: Regenerate. + +2008-07-09 Joseph Myers <joseph@codesourcery.com> + + * libsupc++/unwind-cxx.h (__is_gxx_forced_unwind_class, + __GXX_INIT_FORCED_UNWIND_CLASS): Define for ARM EABI unwinder. + * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Call + __GXX_INIT_FORCED_UNWIND_CLASS for forced unwind with ARM EABI + unwinder. + * libsupc++/eh_arm.cc (__cxa_type_match): Use + __is_gxx_forced_unwind_class to check for forced unwind. + +2008-07-09 Andreas Beckmann <gcc@abeckmann.de> + + PR libstdc++/36552 + * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ + null_metadata.hpp: Remove self-include. + +2008-07-09 Joseph Myers <joseph@codesourcery.com> + + * testsuite/20_util/make_signed/requirements/typedefs-2.cc, + testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Use + -Wl,--no-enum-size-warning for arm*-*-linux*eabi. + +2008-07-09 Johannes Singler <singler@ira.uka.de> + + PR libstdc++/36729 + * include/parallel/random_shuffle.h: + (sequential_random_shuffle) Copy data back. + * testsuite/25_algorithms/random_shuffle/1.cc: + New. Generic random_shuffle functionality test. + 2008-07-08 Chris Fairles <chris.fairles@gmail.com> * include/std/type_traits: Add common_type. diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 4578ce513fc..8327d10511f 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -882,17 +882,6 @@ GLIBCXX_3.4.11 { _ZSt20__throw_system_errorPKc; _ZSt20__throw_system_errori; - # date_time - _ZSt15get_system_timev; - - _ZNSt11nanoseconds16seconds_per_tickE; - _ZNSt11nanoseconds16ticks_per_secondE; - _ZNSt11nanoseconds12is_subsecondE; - - _ZNSt11system_time16seconds_per_tickE; - _ZNSt11system_time16ticks_per_secondE; - _ZNSt11system_time12is_subsecondE; - # char16_t and char32_t _ZNSt14numeric_limitsIu8char*; diff --git a/libstdc++-v3/doc/html/api.html b/libstdc++-v3/doc/html/api.html index 64bc65ac7df..26bebed1a39 100644 --- a/libstdc++-v3/doc/html/api.html +++ b/libstdc++-v3/doc/html/api.html @@ -5,7 +5,7 @@ <a class="ulink" href="http://www.fsf.org/" target="_top">FSF </a> - </p></div><div><div class="legalnotice"><a id="id566509"></a><p> + </p></div><div><div class="legalnotice"><a id="id344716"></a><p> <a class="ulink" href="17_intro/license.html" target="_top">License </a> </p></div></div></div><hr /></div><p> diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html index 33050723d6f..bceda223735 100644 --- a/libstdc++-v3/doc/html/manual/abi.html +++ b/libstdc++-v3/doc/html/manual/abi.html @@ -436,54 +436,54 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so. <a class="ulink" href="http://gcc.gnu.org/PR24660" target="_top">24660: versioning weak symbols in libstdc++</a> </p><p> <a class="ulink" href="http://gcc.gnu.org/PR19664" target="_top">19664: libstdc++ headers should have pop/push of the visibility around the declarations</a> -</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id585919"></a><p><span class="title"><i> +</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id473963"></a><p><span class="title"><i> ABIcheck, a vague idea of checking ABI compatibility </i>. </span><span class="biblioid"> <a class="ulink" href="http://abicheck.sourceforge.net/" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id585937"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id473980"></a><p><span class="title"><i> C++ ABI Reference </i>. </span><span class="biblioid"> <a class="ulink" href="http://www.codesourcery.com/cxx-abi" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id585954"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id473998"></a><p><span class="title"><i> Intel® Compilers for Linux* -Compatibility with the GNU Compilers </i>. </span><span class="biblioid"> <a class="ulink" href="http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id585972"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id474016"></a><p><span class="title"><i> Intel® Compilers for Linux* -Compatibility with the GNU Compilers </i>. </span><span class="biblioid"> <a class="ulink" href="http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id585990"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id369651"></a><p><span class="title"><i> Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386) </i>. </span><span class="biblioid"> <a class="ulink" href="http://docs.sun.com/?p=/doc/816-1386&a=load" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id586006"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id369667"></a><p><span class="title"><i> Sun Solaris 2.9 : C++ Migration Guide (document 816-2459) </i>. </span><span class="biblioid"> <a class="ulink" href="http://docs.sun.com/db/prod/solaris.9" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id586024"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id369685"></a><p><span class="title"><i> ELF Symbol Versioning </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="biblioid"> <a class="ulink" href="http://people.redhat.com/drepper/symbol-versioning" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id586052"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id369713"></a><p><span class="title"><i> C++ ABI for the ARM Architecture </i>. </span><span class="biblioid"> <a class="ulink" href="http://www.arm.com/miscPDFs/8033.pdf" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id586069"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id369730"></a><p><span class="title"><i> Dynamic Shared Objects: Survey and Issues </i>. </span><span class="subtitle"> ISO C++ J16/06-0046 . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span><span class="biblioid"> <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id586102"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id369763"></a><p><span class="title"><i> Versioning With Namespaces </i>. </span><span class="subtitle"> ISO C++ J16/06-0083 diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html index 7e5fc59faaf..4b093b1cbf4 100644 --- a/libstdc++-v3/doc/html/manual/api.html +++ b/libstdc++-v3/doc/html/manual/api.html @@ -72,11 +72,11 @@ _Alloc_traits</code> have been removed. <span class="type">__alloc</span> to select an underlying allocator that satisfied memory allocation requests. The selection of this underlying allocator was not user-configurable. - </p><div class="table"><a id="id586703"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator<T></code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator<T></code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template<int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc<T></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc<T></code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator<T></code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> Releases after gcc-3.4 have continued to add to the collection + </p><div class="table"><a id="id418406"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator<T></code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator<T></code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template<int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc<T></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc<T></code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator<T></code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> Releases after gcc-3.4 have continued to add to the collection of available allocators. All of these new allocators are standard-style. The following table includes details, along with the first released version of GCC that included the extension allocator. - </p><div class="table"><a id="id596348"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator<T></code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator<T></code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p> + </p><div class="table"><a id="id476738"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator<T></code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator<T></code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p> Debug mode first appears. </p><p> Precompiled header support <acronym class="acronym">PCH</acronym> support. diff --git a/libstdc++-v3/doc/html/manual/backwards.html b/libstdc++-v3/doc/html/manual/backwards.html index a124e09bae0..4e7f6e33c98 100644 --- a/libstdc++-v3/doc/html/manual/backwards.html +++ b/libstdc++-v3/doc/html/manual/backwards.html @@ -14,8 +14,8 @@ ISO Standard (e.g., statistical analysis). While there are a lot of really useful things that are used by a lot of people, the Standards Committee couldn't include everything, and so a lot of those “<span class="quote">obvious</span>” classes didn't get included. -</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id587031"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>. -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id587063"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p> +</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id442299"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>. +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id442331"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p> In earlier versions of the standard, <code class="filename">fstream.h</code>, <code class="filename">ostream.h</code> @@ -41,7 +41,7 @@ considered replaced and rewritten. archived. The code is considered replaced and rewritten. </p><p> Portability notes and known implementation limitations are as follows. -</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id596996"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p> +</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id386246"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p> Some care is required to support C++ compiler and or library implementation that do not have the standard library in <code class="code">namespace std</code>. @@ -105,7 +105,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [ AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ]) fi ]) -</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id597119"></a>Illegal iterator usage</h4></div></div></div><p> +</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id386369"></a>Illegal iterator usage</h4></div></div></div><p> The following illustrate implementation-allowed illegal iterator use, and then correct use. </p><div class="itemizedlist"><ul type="disc"><li><p> @@ -118,7 +118,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [ </p></li><li><p> <code class="code">if (iterator)</code> won't work any more => use <code class="code">if (iterator != iterator_type())</code> - </p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id597180"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro + </p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id386430"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro </h4></div></div></div><p> Glibc 2.0.x and 2.1.x define <code class="filename">ctype.h</code> functionality as macros (isspace, isalpha etc.). @@ -151,7 +151,7 @@ std:: (__ctype_b[(int) ( ( 'X' ) )] & (unsigned short int) _ISspace ) ; (<code class="filename">ctype.h</code>) and the definitions in namespace <code class="code">std::</code> (<code class="code"><cctype></code>). -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id597274"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p> +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496113"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p> One solution is to add an autoconf-test for this: </p><pre class="programlisting"> AC_MSG_CHECKING(for container::at) @@ -177,7 +177,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)], </pre><p> If you are using other (non-GNU) compilers it might be a good idea to check for <code class="code">string::at</code> separately. -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id564872"></a>No <code class="code">std::char_traits<char>::eof</code></h4></div></div></div><p> +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496151"></a>No <code class="code">std::char_traits<char>::eof</code></h4></div></div></div><p> Use some kind of autoconf test, plus this: </p><pre class="programlisting"> #ifdef HAVE_CHAR_TRAITS @@ -185,7 +185,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)], #else #define CPP_EOF EOF #endif -</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id564890"></a>No <code class="code">string::clear</code></h4></div></div></div><p> +</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496169"></a>No <code class="code">string::clear</code></h4></div></div></div><p> There are two functions for deleting the contents of a string: <code class="code">clear</code> and <code class="code">erase</code> (the latter returns the string). @@ -203,12 +203,12 @@ erase(size_type __pos = 0, size_type __n = npos) Unfortunately, <code class="code">clear</code> is not implemented in this version, so you should use <code class="code">erase</code> (which is probably faster than <code class="code">operator=(charT*)</code>). -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id564936"></a> +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496214"></a> Removal of <code class="code">ostream::form</code> and <code class="code">istream::scan</code> extensions </h4></div></div></div><p> These are no longer supported. Please use stringstreams instead. -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id564955"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p> +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496234"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p> Although the ISO standard <code class="code">i/ostringstream</code>-classes are provided, (<code class="filename">sstream</code>), for compatibility with older implementations the pre-ISO @@ -296,14 +296,14 @@ any = temp; Another example of using stringstreams is in <a class="link" href="bk01pt05ch13s05.html" title="Shrink to Fit">this howto</a>. </p><p> There is additional information in the libstdc++-v2 info files, in particular “<span class="quote">info iostream</span>”. -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id565107"></a>Little or no wide character support</h4></div></div></div><p> +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496386"></a>Little or no wide character support</h4></div></div></div><p> Classes <code class="classname">wstring</code> and <code class="classname">char_traits<wchar_t></code> are not supported. - </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id565126"></a>No templatized iostreams</h4></div></div></div><p> + </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id364967"></a>No templatized iostreams</h4></div></div></div><p> Classes <code class="classname">wfilebuf</code> and <code class="classname">wstringstream</code> are not supported. - </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id565145"></a>Thread safety issues</h4></div></div></div><p> + </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id364986"></a>Thread safety issues</h4></div></div></div><p> Earlier GCC releases had a somewhat different approach to threading configuration and proper compilation. Before GCC 3.0, configuration of the threading model was dictated by compiler @@ -361,7 +361,7 @@ libstdc++-v3. of the SGI STL (version 3.3), with extensive changes. </p><p>A more formal description of the V3 goals can be found in the official <a class="ulink" href="../17_intro/DESIGN" target="_top">design document</a>. - </p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id593953"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers + </p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id365104"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers (<code class="code">iostream.h</code>, <code class="code">defalloc.h</code> etc.) are available, unlike previous libstdc++ versions, but inclusion generates a warning that you are using deprecated headers. @@ -433,7 +433,7 @@ like <code class="filename">vector.h</code> can be replaced with <code class="fi directive <code class="code">using namespace std;</code> can be put at the global scope. This should be enough to get this code compiling, assuming the other usage is correct. -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id594036"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id365186"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been replaced by standardized libraries. In particular, the unordered_map and unordered_set containers of TR1 are suitable replacement for the non-standard hash_map and hash_set @@ -505,7 +505,7 @@ AC_DEFUN([AC_HEADER_EXT_HASH_SET], [ AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ]) fi ]) -</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id594138"></a>No <code class="code">ios::nocreate/ios::noreplace</code>. +</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363795"></a>No <code class="code">ios::nocreate/ios::noreplace</code>. </h4></div></div></div><p> The existence of <code class="code">ios::nocreate</code> being used for input-streams has been confirmed, most probably because the author thought it would be more correct to specify nocreate explicitly. So @@ -516,7 +516,7 @@ open the file for reading, check if it has been opened, and then decide whether you want to create/replace or not. To my knowledge, even older implementations support <code class="code">app</code>, <code class="code">ate</code> and <code class="code">trunc</code> (except for <code class="code">app</code> ?). -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id594186"></a> +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363843"></a> No <code class="code">stream::attach(int fd)</code> </h4></div></div></div><p> Phil Edwards writes: It was considered and rejected for the ISO @@ -539,7 +539,7 @@ No <code class="code">stream::attach(int fd)</code> For another example of this, refer to <a class="ulink" href="http://www.josuttis.com/cppcode/fdstream.html" target="_top">fdstream example</a> by Nicolai Josuttis. -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id677873"></a> +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363907"></a> Support for C++98 dialect. </h4></div></div></div><p>Check for complete library coverage of the C++1998/2003 standard. </p><pre class="programlisting"> @@ -607,7 +607,7 @@ AC_DEFUN([AC_HEADER_STDCXX_98], [ AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ]) fi ]) -</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id677900"></a> +</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363935"></a> Support for C++TR1 dialect. </h4></div></div></div><p>Check for library coverage of the TR1 standard. </p><pre class="programlisting"> @@ -684,7 +684,7 @@ AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [ AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ]) fi ]) -</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id677944"></a> +</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363978"></a> Support for C++0x dialect. </h4></div></div></div><p>Check for baseline language coverage in the compiler for the C++0xstandard. </p><pre class="programlisting"> @@ -896,27 +896,27 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [ AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ]) fi ]) -</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id678022"></a> +</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id364056"></a> Container::iterator_type is not necessarily Container::value_type* </h4></div></div></div><p> This is a change in behavior from the previous version. Now, most <span class="type">iterator_type</span> typedefs in container classes are POD objects, not <span class="type">value_type</span> pointers. -</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id678053"></a><p>[<abbr class="abbrev"> +</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id364087"></a><p>[<abbr class="abbrev"> kegel41 </abbr>] <span class="title"><i> Migrating to GCC 4.1 </i>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span><span class="biblioid"> <a class="ulink" href="http://www.kegel.com/gcc/gcc4.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id678085"></a><p>[<abbr class="abbrev"> + . </span></p></div><div class="biblioentry"><a id="id374201"></a><p>[<abbr class="abbrev"> kegel41 </abbr>] <span class="title"><i> Building the Whole Debian Archive with GCC 4.1: A Summary </i>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span><span class="biblioid"> <a class="ulink" href="http://lists.debian.org/debian-gcc/2006/03/msg00405.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id678118"></a><p>[<abbr class="abbrev"> + . </span></p></div><div class="biblioentry"><a id="id374234"></a><p>[<abbr class="abbrev"> lbl32 </abbr>] <span class="title"><i> Migration guide for GCC-3.2 diff --git a/libstdc++-v3/doc/html/manual/bitmap_allocator.html b/libstdc++-v3/doc/html/manual/bitmap_allocator.html index fdaed21319d..5e6458dcd29 100644 --- a/libstdc++-v3/doc/html/manual/bitmap_allocator.html +++ b/libstdc++-v3/doc/html/manual/bitmap_allocator.html @@ -103,7 +103,7 @@ else return false.</p></li></ol></div><p> </p><p> Consider a block of size 64 ints. In memory, it would look like this: (assume a 32-bit system where, size_t is a 32-bit entity). - </p><div class="table"><a id="id570814"></a><p class="title"><b>Table 32.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -> Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p> + </p><div class="table"><a id="id390307"></a><p class="title"><b>Table 32.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -> Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p> The first Column(268) represents the size of the Block in bytes as seen by the Bitmap Allocator. Internally, a global free list is used to keep track of the free blocks used and given back by the diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch01.html b/libstdc++-v3/doc/html/manual/bk01pt01ch01.html index 23f4da4f4d3..688f019c03a 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt01ch01.html +++ b/libstdc++-v3/doc/html/manual/bk01pt01ch01.html @@ -6101,7 +6101,7 @@ In this implementation the header names are prefixed by </p><p> This page describes the TR1 support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id619193"></a><p class="title"><b>Table 1.1. C++ TR1 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code"><functional></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code"><memory></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes</td></tr><tr><td align="left">2.2.3.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.6</td><td align="left"><code class="code">shared_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.7</td><td align="left"><code class="code">shared_ptr</code> I/O</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.8</td><td align="left"><code class="code">shared_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.9</td><td align="left"><code class="code">shared_ptr</code> casts</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.10</td><td align="left"><code class="code">get_deleter</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.1</td><td align="left"><code class="code">weak_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.2</td><td align="left"><code class="code">weak_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.3</td><td align="left"><code class="code">weak_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.4</td><td align="left"><code class="code">weak_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.5</td><td align="left"><code class="code">weak_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.6</td><td align="left"><code class="code">weak_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.7</td><td align="left"><code class="code">weak_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.5</td><td align="left">Class template <code class="code">enable_shared_from_this</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>3</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Function Objects</em></span></td></tr><tr><td align="left">3.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.2</td><td align="left">Additions to <code class="code"><functional> synopsis</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.3</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.5</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.6</td><td align="left">undefined operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>4</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.2</td><td align="left">Header <code class="code"><type_traits></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>5</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Numerical Facilities</em></span></td></tr><tr><td align="left">5.1</td><td align="left">Random number generation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.2</td><td align="left">Header <code class="code"><random></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.3</td><td align="left">Class template <code class="code">variate_generator</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4</td><td align="left">Random number engine class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.1</td><td align="left">Class template <code class="code">linear_congruential</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.2</td><td align="left">Class template <code class="code">mersenne_twister</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.3</td><td align="left">Class template <code class="code">subtract_with_carry</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.4</td><td align="left">Class template <code class="code">subtract_with_carry_01</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.5</td><td align="left">Class template <code class="code">discard_block</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.6</td><td align="left">Class template <code class="code">xor_combine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">operator()() per N2079</td></tr><tr><td align="left">5.1.5</td><td align="left">Engines with predefined parameters</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7</td><td align="left">Random distribution class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.1</td><td align="left">Class template <code class="code">uniform_int</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.2</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.4</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.5</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.6</td><td align="left">Class template <code class="code">uniform_real</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.7</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.8</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.9</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2</td><td align="left">Mathematical special functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1</td><td align="left">Additions to header <code class="code"><cmath></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.1</td><td align="left">associated Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.2</td><td align="left">associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.3</td><td align="left">beta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.4</td><td align="left">(complete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.5</td><td align="left">(complete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.6</td><td align="left">(complete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.7</td><td align="left">confluent hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.8</td><td align="left">regular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.9</td><td align="left">cylindrical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.10</td><td align="left">irregular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.11</td><td align="left">cylindrical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.12</td><td align="left">(incomplete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.13</td><td align="left">(incomplete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.14</td><td align="left">(incomplete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.15</td><td align="left">exponential integral</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.16</td><td align="left">Hermite polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.17</td><td align="left">hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.18</td><td align="left">Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.19</td><td align="left">Legendre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.20</td><td align="left">Riemann zeta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.21</td><td align="left">spherical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.22</td><td align="left">spherical associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.23</td><td align="left">spherical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.2</td><td align="left">Additions to header <code class="code"><math.h></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>6</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td align="left">6.1</td><td align="left">Tuple types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.1</td><td align="left">Header <code class="code"><tuple></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.2</td><td align="left">Additions to header <code class="code"><utility></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.4</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2</td><td align="left">Fixed size array</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.1</td><td align="left">Header <code class="code"><array></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2</td><td align="left">Class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.1</td><td align="left"><code class="code">array</code> constructors, copy, and assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.2</td><td align="left"><code class="code">array</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.3</td><td align="left"><code class="code">array</code> size</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.4</td><td align="left">Zero sized <code class="code">array</code>s</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.5</td><td align="left">Tuple interface to class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3</td><td align="left">Unordered associative containers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1</td><td align="left">Unordered associative container requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1.1</td><td align="left">Exception safety guarantees</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.2</td><td align="left">Additions to header <code class="code"><functional></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.3</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4</td><td align="left">Unordered associative container classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.1</td><td align="left">Header <code class="code"><unordered_set></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.2</td><td align="left">Header <code class="code"><unordered_map></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.1</td><td align="left"><code class="code">unordered_set</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.2</td><td align="left"><code class="code">unordered_set</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.1</td><td align="left"><code class="code">unordered_map</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.2</td><td align="left"><code class="code">unordered_map</code> element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.3</td><td align="left"><code class="code">unordered_map</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5</td><td align="left">Class template <code class="code">unordered_multiset<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.1</td><td align="left"><code class="code">unordered_multiset</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.2</td><td align="left"><code class="code">unordered_multiset</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.1</td><td align="left"><code class="code">unordered_multimap</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.2</td><td align="left"><code class="code">unordered_multimap</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>7</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr><td align="left">7.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.3</td><td align="left">Regular expressions summary</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.4</td><td align="left">Header <code class="code"><regex></code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5</td><td align="left">Namespace <code class="code">tr1::regex_constants</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.1</td><td align="left">Bitmask Type <code class="code">syntax_option_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.2</td><td align="left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.3</td><td align="left">Implementation defined <code class="code">error_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.6</td><td align="left">Class <code class="code">regex_error</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.7</td><td align="left">Class template <code class="code">regex_traits</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8</td><td align="left">Class template <code class="code">basic_regex</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.1</td><td align="left"><code class="code">basic_regex</code> constants</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.2</td><td align="left"><code class="code">basic_regex</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.3</td><td align="left"><code class="code">basic_regex</code> assign</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.4</td><td align="left"><code class="code">basic_regex</code> constant operations</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.5</td><td align="left"><code class="code">basic_regex</code> locale</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.6</td><td align="left"><code class="code">basic_regex</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7</td><td align="left"><code class="code">basic_regex</code> non-member functions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7.1</td><td align="left"><code class="code">basic_regex</code> non-member swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9</td><td align="left">Class template <code class="code">sub_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.1</td><td align="left"><code class="code">sub_match</code> members</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.2</td><td align="left"><code class="code">sub_match</code> non-member operators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10</td><td align="left">Class template <code class="code">match_results</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.1</td><td align="left"><code class="code">match_results</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.2</td><td align="left"><code class="code">match_results</code> size</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.3</td><td align="left"><code class="code">match_results</code> element access</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.4</td><td align="left"><code class="code">match_results</code> formatting</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.5</td><td align="left"><code class="code">match_results</code> allocator</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.6</td><td align="left"><code class="code">match_results</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11</td><td align="left">Regular expression algorithms</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.1</td><td align="left">exceptions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.2</td><td align="left"><code class="code">regex_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.3</td><td align="left"><code class="code">regex_search</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.4</td><td align="left"><code class="code">regex_replace</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12</td><td align="left">Regular expression Iterators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1</td><td align="left">Class template <code class="code">regex_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.1</td><td align="left"><code class="code">regex_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.2</td><td align="left"><code class="code">regex_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.3</td><td align="left"><code class="code">regex_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.4</td><td align="left"><code class="code">regex_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2</td><td align="left">Class template <code class="code">regex_token_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.1</td><td align="left"><code class="code">regex_token_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.2</td><td align="left"><code class="code">regex_token_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.3</td><td align="left"><code class="code">regex_token_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.4</td><td align="left"><code class="code">regex_token_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.13</td><td align="left">Modified ECMAScript regular expression grammar</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>8</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td align="left">8.1</td><td align="left">Additions to header <code class="code"><complex></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.2</td><td align="left">Function <code class="code">acos</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.3</td><td align="left">Function <code class="code">asin</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.4</td><td align="left">Function <code class="code">atan</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.5</td><td align="left">Function <code class="code">acosh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.6</td><td align="left">Function <code class="code">asinh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.7</td><td align="left">Function <code class="code">atanh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.8</td><td align="left">Function <code class="code">fabs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.9</td><td align="left">Additional Overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.2</td><td align="left">Header <code class="code"><ccomplex></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.3</td><td align="left">Header <code class="code"><complex.h></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.4</td><td align="left">Additions to header <code class="code"><cctype></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.2</td><td align="left">Function <code class="code">isblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.5</td><td align="left">Additions to header <code class="code"><ctype.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6</td><td align="left">Header <code class="code"><cfenv></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.7</td><td align="left">Header <code class="code"><fenv.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.8</td><td align="left">Additions to header <code class="code"><cfloat></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.9</td><td align="left">Additions to header <code class="code"><float.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.10</td><td align="left">Additions to header <code class="code"><ios></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.1</td><td align="left">Synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.2</td><td align="left">Function <code class="code">hexfloat</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.11</td><td align="left">Header <code class="code"><cinttypes></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.11.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 557</td></tr><tr><td align="left">8.11.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.12</td><td align="left">Header <code class="code"><inttypes.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.13</td><td align="left">Additions to header <code class="code"><climits></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.14</td><td align="left">Additions to header <code class="code"><limits.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.15</td><td align="left">Additions to header <code class="code"><locale></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.16</td><td align="left">Additions to header <code class="code"><cmath></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.3</td><td align="left">Function template definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.4</td><td align="left">Additional overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 568; DR 550</td></tr><tr><td align="left">8.17</td><td align="left">Additions to header <code class="code"><math.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.18</td><td align="left">Additions to header <code class="code"><cstdarg></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.19</td><td align="left">Additions to header <code class="code"><stdarg.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.20</td><td align="left">The header <code class="code"><cstdbool></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.21</td><td align="left">The header <code class="code"><stdbool.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22</td><td align="left">The header <code class="code"><cstdint></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.23</td><td align="left">The header <code class="code"><stdint.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24</td><td align="left">Additions to header <code class="code"><cstdio></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.3</td><td align="left">Additional format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.24.4</td><td align="left">Additions to header <code class="code"><stdio.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25</td><td align="left">Additions to header <code class="code"><cstdlib></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.3</td><td align="left">Function <code class="code">abs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.4</td><td align="left">Function <code class="code">div</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.26</td><td align="left">Additions to header <code class="code"><stdlib.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.27</td><td align="left">Header <code class="code"><ctgmath></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.28</td><td align="left">Header <code class="code"><tgmath.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.29</td><td align="left">Additions to header <code class="code"><ctime></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.30</td><td align="left">Additions to header <code class="code"><cwchar></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.3</td><td align="left">Additional wide format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.31</td><td align="left">Additions to header <code class="code"><wchar.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32</td><td align="left">Additions to header <code class="code"><cwctype></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.2</td><td align="left">Function <code class="code">iswblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.33</td><td align="left">Additions to header <code class="code"><wctype.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> +</p><div class="table"><a id="id337485"></a><p class="title"><b>Table 1.1. C++ TR1 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code"><functional></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code"><memory></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes</td></tr><tr><td align="left">2.2.3.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.6</td><td align="left"><code class="code">shared_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.7</td><td align="left"><code class="code">shared_ptr</code> I/O</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.8</td><td align="left"><code class="code">shared_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.9</td><td align="left"><code class="code">shared_ptr</code> casts</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.10</td><td align="left"><code class="code">get_deleter</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.1</td><td align="left"><code class="code">weak_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.2</td><td align="left"><code class="code">weak_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.3</td><td align="left"><code class="code">weak_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.4</td><td align="left"><code class="code">weak_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.5</td><td align="left"><code class="code">weak_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.6</td><td align="left"><code class="code">weak_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.7</td><td align="left"><code class="code">weak_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.5</td><td align="left">Class template <code class="code">enable_shared_from_this</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>3</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Function Objects</em></span></td></tr><tr><td align="left">3.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.2</td><td align="left">Additions to <code class="code"><functional> synopsis</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.3</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.5</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.6</td><td align="left">undefined operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>4</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.2</td><td align="left">Header <code class="code"><type_traits></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>5</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Numerical Facilities</em></span></td></tr><tr><td align="left">5.1</td><td align="left">Random number generation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.2</td><td align="left">Header <code class="code"><random></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.3</td><td align="left">Class template <code class="code">variate_generator</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4</td><td align="left">Random number engine class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.1</td><td align="left">Class template <code class="code">linear_congruential</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.2</td><td align="left">Class template <code class="code">mersenne_twister</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.3</td><td align="left">Class template <code class="code">subtract_with_carry</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.4</td><td align="left">Class template <code class="code">subtract_with_carry_01</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.5</td><td align="left">Class template <code class="code">discard_block</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.6</td><td align="left">Class template <code class="code">xor_combine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">operator()() per N2079</td></tr><tr><td align="left">5.1.5</td><td align="left">Engines with predefined parameters</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7</td><td align="left">Random distribution class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.1</td><td align="left">Class template <code class="code">uniform_int</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.2</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.4</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.5</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.6</td><td align="left">Class template <code class="code">uniform_real</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.7</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.8</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.9</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2</td><td align="left">Mathematical special functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1</td><td align="left">Additions to header <code class="code"><cmath></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.1</td><td align="left">associated Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.2</td><td align="left">associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.3</td><td align="left">beta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.4</td><td align="left">(complete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.5</td><td align="left">(complete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.6</td><td align="left">(complete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.7</td><td align="left">confluent hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.8</td><td align="left">regular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.9</td><td align="left">cylindrical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.10</td><td align="left">irregular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.11</td><td align="left">cylindrical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.12</td><td align="left">(incomplete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.13</td><td align="left">(incomplete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.14</td><td align="left">(incomplete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.15</td><td align="left">exponential integral</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.16</td><td align="left">Hermite polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.17</td><td align="left">hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.18</td><td align="left">Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.19</td><td align="left">Legendre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.20</td><td align="left">Riemann zeta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.21</td><td align="left">spherical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.22</td><td align="left">spherical associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.23</td><td align="left">spherical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.2</td><td align="left">Additions to header <code class="code"><math.h></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>6</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td align="left">6.1</td><td align="left">Tuple types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.1</td><td align="left">Header <code class="code"><tuple></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.2</td><td align="left">Additions to header <code class="code"><utility></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.4</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2</td><td align="left">Fixed size array</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.1</td><td align="left">Header <code class="code"><array></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2</td><td align="left">Class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.1</td><td align="left"><code class="code">array</code> constructors, copy, and assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.2</td><td align="left"><code class="code">array</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.3</td><td align="left"><code class="code">array</code> size</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.4</td><td align="left">Zero sized <code class="code">array</code>s</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.5</td><td align="left">Tuple interface to class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3</td><td align="left">Unordered associative containers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1</td><td align="left">Unordered associative container requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1.1</td><td align="left">Exception safety guarantees</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.2</td><td align="left">Additions to header <code class="code"><functional></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.3</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4</td><td align="left">Unordered associative container classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.1</td><td align="left">Header <code class="code"><unordered_set></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.2</td><td align="left">Header <code class="code"><unordered_map></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.1</td><td align="left"><code class="code">unordered_set</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.2</td><td align="left"><code class="code">unordered_set</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.1</td><td align="left"><code class="code">unordered_map</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.2</td><td align="left"><code class="code">unordered_map</code> element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.3</td><td align="left"><code class="code">unordered_map</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5</td><td align="left">Class template <code class="code">unordered_multiset<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.1</td><td align="left"><code class="code">unordered_multiset</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.2</td><td align="left"><code class="code">unordered_multiset</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.1</td><td align="left"><code class="code">unordered_multimap</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.2</td><td align="left"><code class="code">unordered_multimap</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>7</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr><td align="left">7.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.3</td><td align="left">Regular expressions summary</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.4</td><td align="left">Header <code class="code"><regex></code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5</td><td align="left">Namespace <code class="code">tr1::regex_constants</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.1</td><td align="left">Bitmask Type <code class="code">syntax_option_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.2</td><td align="left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.3</td><td align="left">Implementation defined <code class="code">error_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.6</td><td align="left">Class <code class="code">regex_error</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.7</td><td align="left">Class template <code class="code">regex_traits</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8</td><td align="left">Class template <code class="code">basic_regex</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.1</td><td align="left"><code class="code">basic_regex</code> constants</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.2</td><td align="left"><code class="code">basic_regex</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.3</td><td align="left"><code class="code">basic_regex</code> assign</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.4</td><td align="left"><code class="code">basic_regex</code> constant operations</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.5</td><td align="left"><code class="code">basic_regex</code> locale</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.6</td><td align="left"><code class="code">basic_regex</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7</td><td align="left"><code class="code">basic_regex</code> non-member functions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7.1</td><td align="left"><code class="code">basic_regex</code> non-member swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9</td><td align="left">Class template <code class="code">sub_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.1</td><td align="left"><code class="code">sub_match</code> members</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.2</td><td align="left"><code class="code">sub_match</code> non-member operators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10</td><td align="left">Class template <code class="code">match_results</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.1</td><td align="left"><code class="code">match_results</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.2</td><td align="left"><code class="code">match_results</code> size</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.3</td><td align="left"><code class="code">match_results</code> element access</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.4</td><td align="left"><code class="code">match_results</code> formatting</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.5</td><td align="left"><code class="code">match_results</code> allocator</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.6</td><td align="left"><code class="code">match_results</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11</td><td align="left">Regular expression algorithms</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.1</td><td align="left">exceptions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.2</td><td align="left"><code class="code">regex_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.3</td><td align="left"><code class="code">regex_search</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.4</td><td align="left"><code class="code">regex_replace</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12</td><td align="left">Regular expression Iterators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1</td><td align="left">Class template <code class="code">regex_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.1</td><td align="left"><code class="code">regex_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.2</td><td align="left"><code class="code">regex_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.3</td><td align="left"><code class="code">regex_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.4</td><td align="left"><code class="code">regex_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2</td><td align="left">Class template <code class="code">regex_token_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.1</td><td align="left"><code class="code">regex_token_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.2</td><td align="left"><code class="code">regex_token_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.3</td><td align="left"><code class="code">regex_token_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.4</td><td align="left"><code class="code">regex_token_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.13</td><td align="left">Modified ECMAScript regular expression grammar</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>8</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td align="left">8.1</td><td align="left">Additions to header <code class="code"><complex></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.2</td><td align="left">Function <code class="code">acos</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.3</td><td align="left">Function <code class="code">asin</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.4</td><td align="left">Function <code class="code">atan</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.5</td><td align="left">Function <code class="code">acosh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.6</td><td align="left">Function <code class="code">asinh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.7</td><td align="left">Function <code class="code">atanh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.8</td><td align="left">Function <code class="code">fabs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.9</td><td align="left">Additional Overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.2</td><td align="left">Header <code class="code"><ccomplex></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.3</td><td align="left">Header <code class="code"><complex.h></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.4</td><td align="left">Additions to header <code class="code"><cctype></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.2</td><td align="left">Function <code class="code">isblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.5</td><td align="left">Additions to header <code class="code"><ctype.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6</td><td align="left">Header <code class="code"><cfenv></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.7</td><td align="left">Header <code class="code"><fenv.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.8</td><td align="left">Additions to header <code class="code"><cfloat></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.9</td><td align="left">Additions to header <code class="code"><float.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.10</td><td align="left">Additions to header <code class="code"><ios></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.1</td><td align="left">Synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.2</td><td align="left">Function <code class="code">hexfloat</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.11</td><td align="left">Header <code class="code"><cinttypes></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.11.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 557</td></tr><tr><td align="left">8.11.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.12</td><td align="left">Header <code class="code"><inttypes.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.13</td><td align="left">Additions to header <code class="code"><climits></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.14</td><td align="left">Additions to header <code class="code"><limits.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.15</td><td align="left">Additions to header <code class="code"><locale></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.16</td><td align="left">Additions to header <code class="code"><cmath></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.3</td><td align="left">Function template definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.4</td><td align="left">Additional overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 568; DR 550</td></tr><tr><td align="left">8.17</td><td align="left">Additions to header <code class="code"><math.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.18</td><td align="left">Additions to header <code class="code"><cstdarg></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.19</td><td align="left">Additions to header <code class="code"><stdarg.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.20</td><td align="left">The header <code class="code"><cstdbool></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.21</td><td align="left">The header <code class="code"><stdbool.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22</td><td align="left">The header <code class="code"><cstdint></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.23</td><td align="left">The header <code class="code"><stdint.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24</td><td align="left">Additions to header <code class="code"><cstdio></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.3</td><td align="left">Additional format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.24.4</td><td align="left">Additions to header <code class="code"><stdio.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25</td><td align="left">Additions to header <code class="code"><cstdlib></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.3</td><td align="left">Function <code class="code">abs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.4</td><td align="left">Function <code class="code">div</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.26</td><td align="left">Additions to header <code class="code"><stdlib.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.27</td><td align="left">Header <code class="code"><ctgmath></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.28</td><td align="left">Header <code class="code"><tgmath.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.29</td><td align="left">Additions to header <code class="code"><ctime></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.30</td><td align="left">Additions to header <code class="code"><cwchar></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.3</td><td align="left">Additional wide format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.31</td><td align="left">Additions to header <code class="code"><wchar.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32</td><td align="left">Additions to header <code class="code"><cwctype></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.2</td><td align="left">Function <code class="code">iswblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.33</td><td align="left">Additions to header <code class="code"><wctype.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> Footnotes </p><p> The shared_ptr implementation uses some code from the @@ -6120,7 +6120,7 @@ presence of the required flag. </p><p> This page describes the C++0x support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id614832"></a><p class="title"><b>Table 1.2. C++ 200x Implementation Status</b></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>20</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">20.2</td><td align="left">Utility Components</td><td align="left"> </td><td align="left"> </td><td align="left">incomplete</td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">forward/move helpers</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Header <code class="code"><tuple></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4</td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">20.4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Header <code class="code"><type_traits></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5 </td><td align="left">Function Objects</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Additions to header <code class="code"><functional></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left">Base</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.14</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11</td><td align="left">Template function bind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.16</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Additions to header <code class="code"><memory></code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left">missing <code class="code">unique_ptr</code></td></tr><tr><td align="left">20.6.5</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">20.6.6</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes.</td></tr><tr><td align="left">20.6.6.2.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.6</td><td align="left"><code class="code">shared_ptr</code> creation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> +</p><div class="table"><a id="id382201"></a><p class="title"><b>Table 1.2. C++ 200x Implementation Status</b></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>20</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">20.2</td><td align="left">Utility Components</td><td align="left"> </td><td align="left"> </td><td align="left">incomplete</td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">forward/move helpers</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Header <code class="code"><tuple></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4</td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">20.4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Header <code class="code"><type_traits></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5 </td><td align="left">Function Objects</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Additions to header <code class="code"><functional></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left">Base</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.14</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11</td><td align="left">Template function bind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.16</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Additions to header <code class="code"><memory></code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left">missing <code class="code">unique_ptr</code></td></tr><tr><td align="left">20.6.5</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">20.6.6</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes.</td></tr><tr><td align="left">20.6.6.2.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.6</td><td align="left"><code class="code">shared_ptr</code> creation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top">N2351</a> </td></tr><tr><td align="left">20.6.6.2.7</td><td align="left"><code class="code">shared_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.8</td><td align="left"><code class="code">shared_ptr</code> I/O</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.9</td><td align="left"><code class="code">shared_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.10</td><td align="left"><code class="code">shared_ptr</code> casts</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.11</td><td align="left"><code class="code">get_deleter</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.1</td><td align="left"><code class="code">weak_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.2</td><td align="left"><code class="code">weak_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.3</td><td align="left"><code class="code">weak_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.4</td><td align="left"><code class="code">weak_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.5</td><td align="left"><code class="code">weak_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.6</td><td align="left"><code class="code">weak_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.7</td><td align="left"><code class="code">weak_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.4</td><td align="left">Class template <code class="code">enable_shared_from_this</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>23</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td align="left">23.2.1</td><td align="left">Header <code class="code"><array></code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1</td><td align="left">Class template array</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.1</td><td align="left"><code class="code">array</code> constructors, copy, and assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.2</td><td align="left"><code class="code">array</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.3</td><td align="left"><code class="code">array </code>size</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.4</td><td align="left"><code class="code">array </code>data</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.5</td><td align="left">Zero sized <code class="code">array</code>s</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.6</td><td align="left">Tuple interface to class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4</td><td align="left">Unordered associative containers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1.1</td><td align="left"><code class="code">unordered_map</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1.2</td><td align="left"><code class="code">unordered_map</code> element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1.3</td><td align="left"><code class="code">unordered_map</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2.1</td><td align="left"><code class="code">unordered_multimap</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2.2</td><td align="left"><code class="code">unordered_multimap</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.3</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.3.1</td><td align="left"><code class="code">unordered_set</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.3.2</td><td align="left"><code class="code">unordered_set</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4</td><td align="left">Class template <code class="code">unordered_multiset<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4.1</td><td align="left"><code class="code">unordered_multiset</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4.2</td><td align="left"><code class="code">unordered_multiset</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>26</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Numerics</em></span></td></tr><tr><td align="left">26.4</td><td align="left">Random number generation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.2</td><td align="left">Header <code class="code"><random></code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.3</td><td align="left">Random number engine class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.3.1</td><td align="left">Class template <code class="code">linear_congruential_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.3.2</td><td align="left">Class template <code class="code">mersenne_twister_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.3.3</td><td align="left">Class template <code class="code">subtract_with_carry_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4</td><td align="left">Random number engine adaptor class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.1</td><td align="left">Class template <code class="code">discard_block_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.2</td><td align="left">Class template <code class="code">independent_bits_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.3</td><td align="left">Class template <code class="code">shuffle_order_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.4</td><td align="left">Class template <code class="code">xor_combine_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">operator()() per N2079</td></tr><tr><td align="left">26.4.5</td><td align="left">Engines and engine adaptors with predefined parameters</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.7</td><td align="left">Utilities</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.7.1</td><td align="left">Class <code class="code">seed_seq</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.7.2</td><td align="left">Function template <code class="code">generate_canonical</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8</td><td align="left">Random number generation class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.1</td><td align="left">Uniform distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.1</td><td align="left">Class template <code class="code">uniform_int_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.1</td><td align="left">Class template <code class="code">uniform_real_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.2</td><td align="left">Bernoulli distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.1</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.2</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.4</td><td align="left">Class template <code class="code">negative_binomial_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.3</td><td align="left">Poisson distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.1</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.2</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.3</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.4</td><td align="left">Class template <code class="code">weibull_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.5</td><td align="left">Class template <code class="code">extreme_value_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4</td><td align="left">Normal distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.1</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.2</td><td align="left">Class template <code class="code">lognormal_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.3</td><td align="left">Class template <code class="code">chi_squared_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.4</td><td align="left">Class template <code class="code">cauchy_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.5</td><td align="left">Class template <code class="code">fisher_f_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.6</td><td align="left">Class template <code class="code">student_t_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5</td><td align="left">Sampling distributions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5.1</td><td align="left">Class template <code class="code">discrete_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5.1</td><td align="left">Class template <code class="code">piecewise_constant_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5.1</td><td align="left">Class template <code class="code">general_pdf_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>28</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr><td align="left">28.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.3</td><td align="left">Regular expressions summary</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.4</td><td align="left">Header <code class="code"><regex></code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5</td><td align="left">Namespace <code class="code">tr1::regex_constants</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5.1</td><td align="left">Bitmask Type <code class="code">syntax_option_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5.2</td><td align="left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5.3</td><td align="left">Implementation defined <code class="code">error_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.6</td><td align="left">Class <code class="code">regex_error</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.7</td><td align="left">Class template <code class="code">regex_traits</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8</td><td align="left">Class template <code class="code">basic_regex</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.1</td><td align="left"><code class="code">basic_regex</code> constants</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.2</td><td align="left"><code class="code">basic_regex</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.3</td><td align="left"><code class="code">basic_regex</code> assign</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.4</td><td align="left"><code class="code">basic_regex</code> constant operations</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.5</td><td align="left"><code class="code">basic_regex</code> locale</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.6</td><td align="left"><code class="code">basic_regex</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.7</td><td align="left"><code class="code">basic_regex</code> non-member functions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.7.1</td><td align="left"><code class="code">basic_regex</code> non-member swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.9</td><td align="left">Class template <code class="code">sub_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.9.1</td><td align="left"><code class="code">sub_match</code> members</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.9.2</td><td align="left"><code class="code">sub_match</code> non-member operators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10</td><td align="left">Class template <code class="code">match_results</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.1</td><td align="left"><code class="code">match_results</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.2</td><td align="left"><code class="code">match_results</code> size</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.3</td><td align="left"><code class="code">match_results</code> element access</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.4</td><td align="left"><code class="code">match_results</code> formatting</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.5</td><td align="left"><code class="code">match_results</code> allocator</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.6</td><td align="left"><code class="code">match_results</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11</td><td align="left">Regular expression algorithms</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.1</td><td align="left">exceptions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.2</td><td align="left"><code class="code">regex_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.3</td><td align="left"><code class="code">regex_search</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.4</td><td align="left"><code class="code">regex_replace</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12</td><td align="left">Regular expression Iterators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1</td><td align="left">Class template <code class="code">regex_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.1</td><td align="left"><code class="code">regex_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.2</td><td align="left"><code class="code">regex_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.3</td><td align="left"><code class="code">regex_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.4</td><td align="left"><code class="code">regex_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2</td><td align="left">Class template <code class="code">regex_token_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.1</td><td align="left"><code class="code">regex_token_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.2</td><td align="left"><code class="code">regex_token_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.3</td><td align="left"><code class="code">regex_token_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.4</td><td align="left"><code class="code">regex_token_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.13</td><td align="left">Modified ECMAScript regular expression grammar</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>C</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td align="left">C2.1</td><td align="left">Additions to header <code class="code"><complex></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.2</td><td align="left">Function <code class="code">acos</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.3</td><td align="left">Function <code class="code">asin</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.4</td><td align="left">Function <code class="code">atan</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.5</td><td align="left">Function <code class="code">acosh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.6</td><td align="left">Function <code class="code">asinh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.7</td><td align="left">Function <code class="code">atanh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.8</td><td align="left">Function <code class="code">fabs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.9</td><td align="left">Additional Overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.2</td><td align="left">Header <code class="code"><ccomplex></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">C2.3</td><td align="left">Header <code class="code"><complex.h></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">C2.4</td><td align="left">Additions to header <code class="code"><cctype></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.4.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.4.2</td><td align="left">Function <code class="code">isblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.5</td><td align="left">Additions to header <code class="code"><ctype.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.6</td><td align="left">Header <code class="code"><cfenv></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.6.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.6.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.7</td><td align="left">Header <code class="code"><fenv.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.8</td><td align="left">Additions to header <code class="code"><cfloat></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.9</td><td align="left">Additions to header <code class="code"><float.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.10</td><td align="left">Additions to header <code class="code"><ios></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.10.1</td><td align="left">Synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.10.2</td><td align="left">Function <code class="code">hexfloat</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.11</td><td align="left">Header <code class="code"><cinttypes></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.11.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 557</td></tr><tr><td align="left">C2.11.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.12</td><td align="left">Header <code class="code"><inttypes.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.13</td><td align="left">Additions to header <code class="code"><climits></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.14</td><td align="left">Additions to header <code class="code"><limits.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.15</td><td align="left">Additions to header <code class="code"><locale></code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.16</td><td align="left">Additions to header <code class="code"><cmath></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.3</td><td align="left">Function template definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.4</td><td align="left">Additional overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 568; DR 550</td></tr><tr><td align="left">C2.17</td><td align="left">Additions to header <code class="code"><math.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.18</td><td align="left">Additions to header <code class="code"><cstdarg></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.19</td><td align="left">Additions to header <code class="code"><stdarg.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.20</td><td align="left">The header <code class="code"><cstdbool></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.21</td><td align="left">The header <code class="code"><stdbool.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.22</td><td align="left">The header <code class="code"><cstdint></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.22.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.22.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.23</td><td align="left">The header <code class="code"><stdint.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24</td><td align="left">Additions to header <code class="code"><cstdio></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24.3</td><td align="left">Additional format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">C2.24.4</td><td align="left">Additions to header <code class="code"><stdio.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25</td><td align="left">Additions to header <code class="code"><cstdlib></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.3</td><td align="left">Function <code class="code">abs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.4</td><td align="left">Function <code class="code">div</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.26</td><td align="left">Additions to header <code class="code"><stdlib.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.27</td><td align="left">Header <code class="code"><ctgmath></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">C2.28</td><td align="left">Header <code class="code"><tgmath.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">C2.29</td><td align="left">Additions to header <code class="code"><ctime></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">C2.30</td><td align="left">Additions to header <code class="code"><cwchar></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.30.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.30.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.30.3</td><td align="left">Additional wide format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">C2.31</td><td align="left">Additions to header <code class="code"><wchar.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.32</td><td align="left">Additions to header <code class="code"><cwctype></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.32.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.32.2</td><td align="left">Function <code class="code">iswblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.33</td><td align="left">Additions to header <code class="code"><wctype.h></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>D</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Compatibility Features</em></span></td></tr><tr><td align="left">D.6</td><td align="left">Old iostream members</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.8</td><td align="left">Binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"><a class="ulink" href="http://gcc.gnu.org/PR33911" target="_top">33911</a></td></tr><tr><td align="left">D.9</td><td align="left">Class template <code class="code">auto_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"><a class="ulink" href="http://gcc.gnu.org/PR33911" target="_top">33911</a></td></tr></tbody></table></div></div><br class="table-break" /><p> Footnotes diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html index 7065e20c876..ba8763dec0e 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html @@ -20,14 +20,14 @@ upcoming 200x standard. </p><p> C++98/03 include files. These are available in the default compilation mode, i.e. <code class="code">-std=c++98</code> or <code class="code">-std=gnu++98</code>. - </p><div class="table"><a id="id559438"></a><p class="title"><b>Table 3.1. C++ 1998 Library Headers</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">streambuf</code></td></tr><tr><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">iosfwd</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">valarray</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">vector</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">limits</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id638001"></a><p class="title"><b>Table 3.2. C++ 1998 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">ctime</code></td></tr><tr><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">cwctype</code></td></tr><tr><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">cstddef</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>C++0x include files. These are only available in C++0x compilation mode, i.e. <code class="code">-std=c++0x</code> or <code class="code">-std=gnu++0x</code>. -</p><p></p><div class="table"><a id="id573284"></a><p class="title"><b>Table 3.3. C++ 200x Library Headers</b></p><div class="table-contents"><table summary="C++ 200x Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">regex</code></td><td align="left"><code class="filename">tuple</code></td></tr><tr><td align="left"><code class="filename">array</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">iosfwd</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">type_traits</code></td></tr><tr><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">unordered_map</code></td></tr><tr><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">unordered_set</code></td></tr><tr><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">limits</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">valarray</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="filename">random</code></td><td align="left"><code class="filename">system_error</code></td><td align="left"><code class="filename">vector</code></td></tr><tr><td align="left"><code class="filename">condition_variable</code></td><td align="left"><code class="filename">mutex</code></td><td align="left"><code class="filename">thread</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id555603"></a><p class="title"><b>Table 3.4. C++ 200x Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 200x Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">ctgmath</code></td></tr><tr><td align="left"><code class="filename">ccomplex</code></td><td align="left"><code class="filename">cinttypes</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">cstdint</code></td><td align="left"><code class="filename">ctime</code></td></tr><tr><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">cuchar</code></td></tr><tr><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cfenv</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cstdbool</code></td><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">cwctype</code></td></tr><tr><td align="left"><code class="filename">cstdatomic</code></td><td align="left"> </td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> + </p><div class="table"><a id="id394301"></a><p class="title"><b>Table 3.1. C++ 1998 Library Headers</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">streambuf</code></td></tr><tr><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">iosfwd</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">valarray</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">vector</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">limits</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id440630"></a><p class="title"><b>Table 3.2. C++ 1998 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">ctime</code></td></tr><tr><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">cwctype</code></td></tr><tr><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">cstddef</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>C++0x include files. These are only available in C++0x compilation mode, i.e. <code class="code">-std=c++0x</code> or <code class="code">-std=gnu++0x</code>. +</p><p></p><div class="table"><a id="id382991"></a><p class="title"><b>Table 3.3. C++ 200x Library Headers</b></p><div class="table-contents"><table summary="C++ 200x Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">regex</code></td><td align="left"><code class="filename">tuple</code></td></tr><tr><td align="left"><code class="filename">array</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">iosfwd</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">type_traits</code></td></tr><tr><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">unordered_map</code></td></tr><tr><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">unordered_set</code></td></tr><tr><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">limits</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">valarray</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="filename">random</code></td><td align="left"><code class="filename">system_error</code></td><td align="left"><code class="filename">vector</code></td></tr><tr><td align="left"><code class="filename">condition_variable</code></td><td align="left"><code class="filename">mutex</code></td><td align="left"><code class="filename">thread</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id425965"></a><p class="title"><b>Table 3.4. C++ 200x Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 200x Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">ctgmath</code></td></tr><tr><td align="left"><code class="filename">ccomplex</code></td><td align="left"><code class="filename">cinttypes</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">cstdint</code></td><td align="left"><code class="filename">ctime</code></td></tr><tr><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">cuchar</code></td></tr><tr><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cfenv</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cstdbool</code></td><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">cwctype</code></td></tr><tr><td align="left"><code class="filename">cstdatomic</code></td><td align="left"> </td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> In addition, TR1 includes as: -</p><div class="table"><a id="id556833"></a><p class="title"><b>Table 3.5. C++ TR1 Library Headers</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/array</code></td><td align="left"><code class="filename">tr1/memory</code></td><td align="left"><code class="filename">tr1/regex</code></td><td align="left"><code class="filename">tr1/type_traits</code></td><td align="left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td align="left"><code class="filename">tr1/complex</code></td><td align="left"><code class="filename">tr1/random</code></td><td align="left"><code class="filename">tr1/tuple</code></td><td align="left"><code class="filename">tr1/unordered_map</code></td><td align="left"><code class="filename">tr1/utility</code></td></tr><tr><td align="left"><code class="filename">tr1/functional</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id548044"></a><p class="title"><b>Table 3.6. C++ TR1 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/cmath</code></td><td align="left"><code class="filename">tr1/cfloat</code></td><td align="left"><code class="filename">tr1/cstdarg</code></td><td align="left"><code class="filename">tr1/cstdio</code></td><td align="left"><code class="filename">tr1/ctime</code></td></tr><tr><td align="left"><code class="filename">tr1/ccomplex</code></td><td align="left"><code class="filename">tr1/cinttypes</code></td><td align="left"><code class="filename">tr1/cstdbool</code></td><td align="left"><code class="filename">tr1/cstdlib</code></td><td align="left"><code class="filename">tr1/cwchar</code></td></tr><tr><td align="left"><code class="filename">tr1/cfenv</code></td><td align="left"><code class="filename">tr1/climits</code></td><td align="left"><code class="filename">tr1/cstdint</code></td><td align="left"><code class="filename">tr1/ctgmath</code></td><td align="left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break" /><p> +</p><div class="table"><a id="id442369"></a><p class="title"><b>Table 3.5. C++ TR1 Library Headers</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/array</code></td><td align="left"><code class="filename">tr1/memory</code></td><td align="left"><code class="filename">tr1/regex</code></td><td align="left"><code class="filename">tr1/type_traits</code></td><td align="left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td align="left"><code class="filename">tr1/complex</code></td><td align="left"><code class="filename">tr1/random</code></td><td align="left"><code class="filename">tr1/tuple</code></td><td align="left"><code class="filename">tr1/unordered_map</code></td><td align="left"><code class="filename">tr1/utility</code></td></tr><tr><td align="left"><code class="filename">tr1/functional</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id401478"></a><p class="title"><b>Table 3.6. C++ TR1 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/cmath</code></td><td align="left"><code class="filename">tr1/cfloat</code></td><td align="left"><code class="filename">tr1/cstdarg</code></td><td align="left"><code class="filename">tr1/cstdio</code></td><td align="left"><code class="filename">tr1/ctime</code></td></tr><tr><td align="left"><code class="filename">tr1/ccomplex</code></td><td align="left"><code class="filename">tr1/cinttypes</code></td><td align="left"><code class="filename">tr1/cstdbool</code></td><td align="left"><code class="filename">tr1/cstdlib</code></td><td align="left"><code class="filename">tr1/cwchar</code></td></tr><tr><td align="left"><code class="filename">tr1/cfenv</code></td><td align="left"><code class="filename">tr1/climits</code></td><td align="left"><code class="filename">tr1/cstdint</code></td><td align="left"><code class="filename">tr1/ctgmath</code></td><td align="left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break" /><p> Also included are files for the C++ ABI interface: -</p><div class="table"><a id="id634486"></a><p class="title"><b>Table 3.7. C++ ABI Headers</b></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cxxabi.h</code></td><td align="left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break" /><p> +</p><div class="table"><a id="id435323"></a><p class="title"><b>Table 3.7. C++ ABI Headers</b></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cxxabi.h</code></td><td align="left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break" /><p> And a large variety of extensions. -</p><div class="table"><a id="id624264"></a><p class="title"><b>Table 3.8. Extension Headers</b></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">ext/algorithm</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"><code class="filename">ext/pod_char_traits.h</code></td><td align="left"><code class="filename">ext/stdio_sync_filebuf.h</code></td></tr><tr><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left"><code class="filename">ext/enc_filebuf.h</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/atomicity.h</code></td><td align="left"><code class="filename">ext/functional</code></td><td align="left"><code class="filename">ext/numeric</code></td><td align="left"><code class="filename">ext/rb_tree</code></td><td align="left"><code class="filename">ext/typelist.h</code></td></tr><tr><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"><code class="filename">ext/iterator</code></td><td align="left"><code class="filename">ext/numeric_traits.h</code></td><td align="left"><code class="filename">ext/rope</code></td><td align="left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td align="left"><code class="filename">ext/codecvt_specializations.h</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td align="left"><code class="filename">ext/slist</code></td><td align="left"><code class="filename">ext/vstring.h</code></td></tr><tr><td align="left"><code class="filename">ext/concurrence.h</code></td><td align="left"><code class="filename">ext/memory</code></td><td align="left"><code class="filename">ext/pb_ds/priority_queue.h</code></td><td align="left"><code class="filename">ext/stdio_filebuf.h</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id648609"></a><p class="title"><b>Table 3.9. Extension Debug Headers</b></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">debug/bitset</code></td><td align="left"><code class="filename">debug/list</code></td><td align="left"><code class="filename">debug/set</code></td><td align="left"><code class="filename">debug/unordered_map</code></td><td align="left"><code class="filename">debug/vector</code></td></tr><tr><td align="left"><code class="filename">debug/deque</code></td><td align="left"><code class="filename">debug/map</code></td><td align="left"><code class="filename">debug/string</code></td><td align="left"><code class="filename">debug/unordered_set</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id609186"></a><p class="title"><b>Table 3.10. Extension Parallel Headers</b></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">parallel/algorithm</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"></a>Mixing Headers</h3></div></div></div><p> A few simple rules. +</p><div class="table"><a id="id432329"></a><p class="title"><b>Table 3.8. Extension Headers</b></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">ext/algorithm</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"><code class="filename">ext/pod_char_traits.h</code></td><td align="left"><code class="filename">ext/stdio_sync_filebuf.h</code></td></tr><tr><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left"><code class="filename">ext/enc_filebuf.h</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/atomicity.h</code></td><td align="left"><code class="filename">ext/functional</code></td><td align="left"><code class="filename">ext/numeric</code></td><td align="left"><code class="filename">ext/rb_tree</code></td><td align="left"><code class="filename">ext/typelist.h</code></td></tr><tr><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"><code class="filename">ext/iterator</code></td><td align="left"><code class="filename">ext/numeric_traits.h</code></td><td align="left"><code class="filename">ext/rope</code></td><td align="left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td align="left"><code class="filename">ext/codecvt_specializations.h</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td align="left"><code class="filename">ext/slist</code></td><td align="left"><code class="filename">ext/vstring.h</code></td></tr><tr><td align="left"><code class="filename">ext/concurrence.h</code></td><td align="left"><code class="filename">ext/memory</code></td><td align="left"><code class="filename">ext/pb_ds/priority_queue.h</code></td><td align="left"><code class="filename">ext/stdio_filebuf.h</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id440887"></a><p class="title"><b>Table 3.9. Extension Debug Headers</b></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">debug/bitset</code></td><td align="left"><code class="filename">debug/list</code></td><td align="left"><code class="filename">debug/set</code></td><td align="left"><code class="filename">debug/unordered_map</code></td><td align="left"><code class="filename">debug/vector</code></td></tr><tr><td align="left"><code class="filename">debug/deque</code></td><td align="left"><code class="filename">debug/map</code></td><td align="left"><code class="filename">debug/string</code></td><td align="left"><code class="filename">debug/unordered_set</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id457206"></a><p class="title"><b>Table 3.10. Extension Parallel Headers</b></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">parallel/algorithm</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"></a>Mixing Headers</h3></div></div></div><p> A few simple rules. </p><p>First, mixing different dialects of the standard headers is not possible. It's an all-or-nothing affair. Thus, code like </p><pre class="programlisting"> diff --git a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html index 2d36c3f072f..6f7451e9ae7 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html +++ b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="support.html" title="Part II. Support" /><link rel="next" href="bk01pt02ch04.html" title="Chapter 4. Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id580277"></a></h2></div></div></div><p> +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="support.html" title="Part II. Support" /><link rel="next" href="bk01pt02ch04.html" title="Chapter 4. Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id450521"></a></h2></div></div></div><p> This part deals with the functions called and objects created automatically during the course of a program's existence. </p><p> diff --git a/libstdc++-v3/doc/html/manual/bk01pt04ch11.html b/libstdc++-v3/doc/html/manual/bk01pt04ch11.html index 6602bf43f6a..905be71755b 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt04ch11.html +++ b/libstdc++-v3/doc/html/manual/bk01pt04ch11.html @@ -90,7 +90,7 @@ or loading and unloading shared objects in memory. As such, using caching allocators on systems that do not support <code class="function">abi::__cxa_atexit</code> is not recommended. - </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id648275"></a>Interface Design</h4></div></div></div><p> + </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id388518"></a>Interface Design</h4></div></div></div><p> The only allocator interface that is support is the standard C++ interface. As such, all STL containers have been adjusted, and all external allocators have @@ -103,7 +103,7 @@ </p><p> The base class that <code class="classname">allocator</code> is derived from may not be user-configurable. -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id627020"></a>Selecting Default Allocation Policy</h4></div></div></div><p> +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id449357"></a>Selecting Default Allocation Policy</h4></div></div></div><p> It's difficult to pick an allocation strategy that will provide maximum utility, without excessively penalizing some behavior. In fact, it's difficult just deciding which typical actions to measure @@ -140,7 +140,7 @@ The current default choice for <code class="classname">allocator</code> is <code class="classname">__gnu_cxx::new_allocator</code>. - </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id627284"></a>Disabling Memory Caching</h4></div></div></div><p> + </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385486"></a>Disabling Memory Caching</h4></div></div></div><p> In use, <code class="classname">allocator</code> may allocate and deallocate using implementation-specified strategies and heuristics. Because of this, every call to an allocator object's @@ -298,18 +298,18 @@ </p><p> A high-performance fixed-size allocator with exponentially-increasing allocations. It has its own - documentation, found <a class="ulink" href="../ext/mt_allocator.html" target="_top">here</a>. + documentation, found <a class="link" href="bk01pt12ch32.html#manual.ext.allocator.mt" title="mt_allocator">here</a>. </p></li><li><p> <code class="classname">bitmap_allocator</code> </p><p> A high-performance allocator that uses a bit-map to keep track of the used and unused memory locations. It has its own - documentation, found <a class="ulink" href="../ext/ballocator_doc.html" target="_top">here</a>. - </p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id611696"></a><p><span class="title"><i> + documentation, found <a class="link" href="bitmap_allocator.html" title="bitmap_allocator">here</a>. + </p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id336934"></a><p><span class="title"><i> ISO/IEC 14882:1998 Programming languages - C++ </i>. </span> isoc++_1998 - <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id548292"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good + <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id336949"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good </i>. </span> austernm <span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername"> @@ -317,28 +317,28 @@ . </span></span><span class="biblioid"> <a class="ulink" href="http://www.cuj.com/documents/s=8000/cujcexp1812austern/" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id556096"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span> + . </span></p></div><div class="biblioentry"><a id="id402117"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span> emeryb <span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="biblioid"> <a class="ulink" href="http://www.cs.umass.edu/~emery/hoard/" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id571024"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span> + . </span></p></div><div class="biblioentry"><a id="id386707"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span> bergerzorn <span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span><span class="biblioid"> <a class="ulink" href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id549463"></a><p><span class="title"><i>Allocator Types</i>. </span> + . </span></p></div><div class="biblioentry"><a id="id404915"></a><p><span class="title"><i>Allocator Types</i>. </span> kreftlanger <span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="publisher"><span class="publishername"> C/C++ Users Journal . </span></span><span class="biblioid"> <a class="ulink" href="http://www.langer.camelot.de/Articles/C++Report/Allocators/Allocators.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id610752"></a><p><span class="title"><i>The C++ Programming Language</i>. </span> + . </span></p></div><div class="biblioentry"><a id="id378638"></a><p><span class="title"><i>The C++ Programming Language</i>. </span> tcpl <span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id552856"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span> + . </span></span></p></div><div class="biblioentry"><a id="id401191"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span> yenf <span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span><span class="copyright">Copyright © . </span><span class="biblioid"> <a class="ulink" href="http://home.earthlink.net/~brimar/yalloc/" target="_top"> diff --git a/libstdc++-v3/doc/html/manual/bk01pt06ch14.html b/libstdc++-v3/doc/html/manual/bk01pt06ch14.html index 506ffab9a33..dbfaa8ddf72 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt06ch14.html +++ b/libstdc++-v3/doc/html/manual/bk01pt06ch14.html @@ -395,25 +395,25 @@ global locale" (emphasis Paolo), that is: What should non-required facet instantiations do? If the generic implementation is provided, then how to end-users provide specializations? - </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id563983"></a><p><span class="title"><i> + </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id431371"></a><p><span class="title"><i> The GNU C Library - </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id623816"></a><p><span class="title"><i> + </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id446999"></a><p><span class="title"><i> Correspondence - </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id571346"></a><p><span class="title"><i> + </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id376809"></a><p><span class="title"><i> ISO/IEC 14882:1998 Programming languages - C++ - </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id571365"></a><p><span class="title"><i> + </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id376828"></a><p><span class="title"><i> ISO/IEC 9899:1999 Programming languages - C - </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id636643"></a><p><span class="title"><i> + </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id401235"></a><p><span class="title"><i> System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x) </i>. </span><span class="copyright">Copyright © 1999 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid"> <a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id636670"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id398149"></a><p><span class="title"><i> The C++ Programming Language, Special Edition </i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id612616"></a><p><span class="title"><i> + . </span></span></p></div><div class="biblioentry"><a id="id426390"></a><p><span class="title"><i> Standard C++ IOStreams and Locales </i>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference diff --git a/libstdc++-v3/doc/html/manual/bk01pt06ch15.html b/libstdc++-v3/doc/html/manual/bk01pt06ch15.html index 65551aa0ab3..948928c1a7c 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt06ch15.html +++ b/libstdc++-v3/doc/html/manual/bk01pt06ch15.html @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 15. Facets aka Categories</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="bk01pt06ch14.html" title="Chapter 14. Locales" /><link rel="next" href="codecvt.html" title="codecvt" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. Facets aka Categories</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt06ch14.html">Prev</a> </td><th width="60%" align="center">Part VI. Localization</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id672533"></a>Specializations</h4></div></div></div><p> +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 15. Facets aka Categories</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="bk01pt06ch14.html" title="Chapter 14. Locales" /><link rel="next" href="codecvt.html" title="codecvt" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. Facets aka Categories</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt06ch14.html">Prev</a> </td><th width="60%" align="center">Part VI. Localization</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id373746"></a>Specializations</h4></div></div></div><p> For the required specialization codecvt<wchar_t, char, mbstate_t> , conversions are made between the internal character set (always UCS4 on GNU/Linux) and whatever the currently selected locale for the @@ -47,25 +47,25 @@ characters. </p></li><li><p> Rename abstract base class. See if just smash-overriding is a better approach. Clarify, add sanity to naming. - </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id628452"></a><p><span class="title"><i> + </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id382630"></a><p><span class="title"><i> The GNU C Library - </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id516793"></a><p><span class="title"><i> + </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id336899"></a><p><span class="title"><i> Correspondence - </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id567513"></a><p><span class="title"><i> + </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id433304"></a><p><span class="title"><i> ISO/IEC 14882:1998 Programming languages - C++ - </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id567532"></a><p><span class="title"><i> + </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id433322"></a><p><span class="title"><i> ISO/IEC 9899:1999 Programming languages - C - </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id566828"></a><p><span class="title"><i> + </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id428978"></a><p><span class="title"><i> System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x) </i>. </span><span class="copyright">Copyright © 1999 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid"> <a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id571204"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id429006"></a><p><span class="title"><i> The C++ Programming Language, Special Edition </i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id638138"></a><p><span class="title"><i> + . </span></span></p></div><div class="biblioentry"><a id="id380310"></a><p><span class="title"><i> Standard C++ IOStreams and Locales </i>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference diff --git a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html index 4f560caf0c6..93b071c47b7 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library , algorithm " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="algorithms.html" title="Part IX. Algorithms" /><link rel="next" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><th width="60%" align="center">Part IX. Algorithms</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id613410"></a></h2></div></div></div><p> +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library , algorithm " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="algorithms.html" title="Part IX. Algorithms" /><link rel="next" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><th width="60%" align="center">Part IX. Algorithms</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id457861"></a></h2></div></div></div><p> The neatest accomplishment of the algorithms chapter is that all the work is done via iterators, not containers directly. This means two important things: diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html index b13e08bcd78..d3c60f88747 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html @@ -19,6 +19,6 @@ mode or with debug mode. The following table provides the names and headers of the debugging containers: -</p><div class="table"><a id="id552456"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">deque</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">list</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional +</p><div class="table"><a id="id449953"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">deque</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">list</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional containers have additional debug capability. -</p><div class="table"><a id="id566906"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html> +</p><div class="table"><a id="id319073"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html index 3fc857516f7..53a56bf526c 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html @@ -63,4 +63,4 @@ Then compile this code with the prerequisite compiler flags flags for atomic operations.) </p><p> The following table provides the names and headers of all the parallel algorithms that can be used in a similar manner: -</p><div class="table"><a id="id619355"></a><p class="title"><b>Table 31.1. Parallel Algorithms</b></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Algorithm</th><th align="left">Header</th><th align="left">Parallel algorithm</th><th align="left">Parallel header</th></tr></thead><tbody><tr><td align="left"><code class="function">std::accumulate</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::accumulate</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_difference</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::inner_product</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::inner_product</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::partial_sum</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::partial_sum</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::equal</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::equal</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_first_of</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_first_of</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::for_each</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::for_each</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::lexicographical_compare</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::mismatch</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::mismatch</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::transform</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::transform</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::max_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::max_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::merge</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::merge</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::min_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::min_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::nth_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::nth_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partial_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partial_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partition</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partition</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::random_shuffle</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::random_shuffle</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_union</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_union</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_intersection</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_intersection</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_symmetric_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::stable_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::stable_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::unique_copy</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::unique_copy</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch31s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html> +</p><div class="table"><a id="id392310"></a><p class="title"><b>Table 31.1. Parallel Algorithms</b></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Algorithm</th><th align="left">Header</th><th align="left">Parallel algorithm</th><th align="left">Parallel header</th></tr></thead><tbody><tr><td align="left"><code class="function">std::accumulate</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::accumulate</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_difference</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::inner_product</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::inner_product</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::partial_sum</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::partial_sum</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::equal</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::equal</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_first_of</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_first_of</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::for_each</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::for_each</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::lexicographical_compare</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::mismatch</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::mismatch</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::transform</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::transform</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::max_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::max_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::merge</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::merge</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::min_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::min_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::nth_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::nth_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partial_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partial_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partition</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partition</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::random_shuffle</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::random_shuffle</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_union</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_union</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_intersection</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_intersection</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_symmetric_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::stable_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::stable_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::unique_copy</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::unique_copy</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch31s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/bk01pt12pr03.html b/libstdc++-v3/doc/html/manual/bk01pt12pr03.html index e813ee28dfb..fc79407e59b 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12pr03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12pr03.html @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="extensions.html" title="Part XII. Extensions" /><link rel="next" href="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch29.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id553784"></a></h2></div></div></div><p> +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="extensions.html" title="Part XII. Extensions" /><link rel="next" href="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch29.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id337521"></a></h2></div></div></div><p> Here we will make an attempt at describing the non-Standard extensions to the library. Some of these are from SGI's STL, some of these are GNU's, and some just seemed to appear on the doorstep. diff --git a/libstdc++-v3/doc/html/manual/codecvt.html b/libstdc++-v3/doc/html/manual/codecvt.html index a6a66b4ffe3..258acd27814 100644 --- a/libstdc++-v3/doc/html/manual/codecvt.html +++ b/libstdc++-v3/doc/html/manual/codecvt.html @@ -337,41 +337,41 @@ codecvt usage. </p></li><li><p> wchar_t/char internal buffers and conversions between internal/external buffers? - </p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id575272"></a><p><span class="title"><i> + </p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id272734"></a><p><span class="title"><i> The GNU C Library - </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id609952"></a><p><span class="title"><i> + </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id399498"></a><p><span class="title"><i> Correspondence - </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id609980"></a><p><span class="title"><i> + </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id442423"></a><p><span class="title"><i> ISO/IEC 14882:1998 Programming languages - C++ - </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id623913"></a><p><span class="title"><i> + </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id438296"></a><p><span class="title"><i> ISO/IEC 9899:1999 Programming languages - C - </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id623931"></a><p><span class="title"><i> + </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id438314"></a><p><span class="title"><i> System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x) </i>. </span><span class="copyright">Copyright © 1999 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid"> <a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id578900"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id436032"></a><p><span class="title"><i> The C++ Programming Language, Special Edition </i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id563010"></a><p><span class="title"><i> + . </span></span></p></div><div class="biblioentry"><a id="id400418"></a><p><span class="title"><i> Standard C++ IOStreams and Locales </i>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> Addison Wesley Longman - . </span></span></p></div><div class="biblioentry"><a id="id663404"></a><p><span class="title"><i> + . </span></span></p></div><div class="biblioentry"><a id="id402869"></a><p><span class="title"><i> A brief description of Normative Addendum 1 </i>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span><span class="biblioid"> <a class="ulink" href="http://www.lysator.liu.se/c/na1.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id654629"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id435221"></a><p><span class="title"><i> The Unicode HOWTO </i>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span><span class="biblioid"> <a class="ulink" href="ftp://ftp.ilog.fr/pub/Users/haible/utf8/Unicode-HOWTO.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id573501"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id435248"></a><p><span class="title"><i> UTF-8 and Unicode FAQ for Unix/Linux </i>. </span><span class="author"><span class="firstname">Markus</span> <span class="surname">Khun</span>. </span><span class="biblioid"> <a class="ulink" href="http://www.cl.cam.ac.uk/~mgk25/unicode.html" target="_top"> diff --git a/libstdc++-v3/doc/html/manual/messages.html b/libstdc++-v3/doc/html/manual/messages.html index 16f373c54ed..5284e8f11cc 100644 --- a/libstdc++-v3/doc/html/manual/messages.html +++ b/libstdc++-v3/doc/html/manual/messages.html @@ -241,38 +241,38 @@ void test01() model. As of this writing, it is unknown how to query to see if a specified message catalog exists using the gettext package. - </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id575136"></a><p><span class="title"><i> + </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id435992"></a><p><span class="title"><i> The GNU C Library </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling, and 7 Locales and Internationalization - . </span></p></div><div class="biblioentry"><a id="id642010"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id375623"></a><p><span class="title"><i> Correspondence - </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id548515"></a><p><span class="title"><i> + </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id377133"></a><p><span class="title"><i> ISO/IEC 14882:1998 Programming languages - C++ - </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id548534"></a><p><span class="title"><i> + </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id377151"></a><p><span class="title"><i> ISO/IEC 9899:1999 Programming languages - C - </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id548552"></a><p><span class="title"><i> + </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id430388"></a><p><span class="title"><i> System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x) </i>. </span><span class="copyright">Copyright © 1999 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid"> <a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id515522"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id430416"></a><p><span class="title"><i> The C++ Programming Language, Special Edition </i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id566179"></a><p><span class="title"><i> + . </span></span></p></div><div class="biblioentry"><a id="id470349"></a><p><span class="title"><i> Standard C++ IOStreams and Locales </i>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> Addison Wesley Longman - . </span></span></p></div><div class="biblioentry"><a id="id648665"></a><p><span class="title"><i> + . </span></span></p></div><div class="biblioentry"><a id="id433912"></a><p><span class="title"><i> Java 2 Platform, Standard Edition, v 1.3.1 API Specification </i>. </span><span class="pagenums">java.util.Properties, java.text.MessageFormat, java.util.Locale, java.util.ResourceBundle. </span><span class="biblioid"> <a class="ulink" href="http://java.sun.com/j2se/1.3/docs/api" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id606764"></a><p><span class="title"><i> + . </span></p></div><div class="biblioentry"><a id="id433933"></a><p><span class="title"><i> GNU gettext tools, version 0.10.38, Native Language Support Library and Tools. </i>. </span><span class="biblioid"> diff --git a/libstdc++-v3/doc/html/manual/parallel_mode.html b/libstdc++-v3/doc/html/manual/parallel_mode.html index 6ee676cf77d..f008aa39bc6 100644 --- a/libstdc++-v3/doc/html/manual/parallel_mode.html +++ b/libstdc++-v3/doc/html/manual/parallel_mode.html @@ -10,11 +10,11 @@ explicit source declaration or by compiling existing sources with a specific compiler flag. </p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.intro"></a>Intro</h2></div></div></div><p>The following library components in the include <code class="filename">numeric</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::accumulate</code></p></li><li><p><code class="function">std::adjacent_difference</code></p></li><li><p><code class="function">std::inner_product</code></p></li><li><p><code class="function">std::partial_sum</code></p></li></ul></div><p>The following library components in the include -<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id605457"></a><p><span class="title"><i> +<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id470991"></a><p><span class="title"><i> Parallelization of Bulk Operations for STL Dictionaries </i>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Leonor</span> <span class="surname">Frias</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername"> Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS) - . </span></span></p></div><div class="biblioentry"><a id="id566030"></a><p><span class="title"><i> + . </span></span></p></div><div class="biblioentry"><a id="id471037"></a><p><span class="title"><i> The Multi-Core Standard Template Library </i>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Peter</span> <span class="surname">Sanders</span>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Putze</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername"> Euro-Par 2007: Parallel Processing. (LNCS 4641) diff --git a/libstdc++-v3/doc/html/manual/shared_ptr.html b/libstdc++-v3/doc/html/manual/shared_ptr.html index 9bb311412ef..88dc97de6d0 100644 --- a/libstdc++-v3/doc/html/manual/shared_ptr.html +++ b/libstdc++-v3/doc/html/manual/shared_ptr.html @@ -29,7 +29,7 @@ drops to zero. Derived classes override those functions to destroy resources in a context where the correct dynamic type is known. This is an application of the technique known as type erasure. - </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id578202"></a>Class Hierarchy</h4></div></div></div><p> + </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id399768"></a>Class Hierarchy</h4></div></div></div><p> A <code class="classname">shared_ptr<T></code> contains a pointer of type <span class="type">T*</span> and an object of type <code class="classname">__shared_count</code>. The shared_count contains a @@ -71,7 +71,7 @@ be forwarded to <span class="type">Tp</span>'s constructor. Unlike the other <code class="classname">_Sp_counted_*</code> classes, this one is parameterized on the type of object, not the type of pointer; this is purely a convenience that simplifies the implementation slightly. - </p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id625910"></a>Thread Safety</h4></div></div></div><p> + </p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id438247"></a>Thread Safety</h4></div></div></div><p> The interface of <code class="classname">tr1::shared_ptr</code> was extended for C++0x with support for rvalue-references and the other features from N2351. As with other libstdc++ headers shared by TR1 and C++0x, @@ -129,7 +129,7 @@ compiler, standard library, platform etc. For the version of shared_ptr in libstdc++ the compiler and library are fixed, which makes things much simpler: we have an atomic CAS or we don't, see Lock Policy below for details. -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id633694"></a>Selecting Lock Policy</h4></div></div></div><p> +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id445836"></a>Selecting Lock Policy</h4></div></div></div><p> </p><p> There is a single <code class="classname">_Sp_counted_base</code> class, which is a template parameterized on the enum @@ -170,7 +170,7 @@ used when libstdc++ is built without <code class="literal">--enable-threads</cod <code class="filename">ext/atomicity.h</code>, which detect if the program is multi-threaded. If only one thread of execution exists in the program then less expensive non-atomic operations are used. - </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id573229"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p> + </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id390904"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p> The classes derived from <code class="classname">_Sp_counted_base</code> (see Class Hierarchy below) and <code class="classname">__shared_count</code> are implemented separately for C++0x and TR1, in <code class="filename">bits/boost_sp_shared_count.h</code> and @@ -181,7 +181,7 @@ The TR1 implementation is considered relatively stable, so is unlikely to change unless bug fixes require it. If the code that is common to both C++0x and TR1 modes needs to diverge further then it might be necessary to duplicate additional classes and only make changes to the C++0x versions. -</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id635141"></a>Related functions and classes</h4></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>, +</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id398449"></a>Related functions and classes</h4></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>, <code class="code">const_pointer_cast</code></span></dt><dd><p> As noted in N2351, these functions can be implemented non-intrusively using the alias constructor. However the aliasing constructor is only available @@ -214,10 +214,10 @@ is called. Users should not try to use this. As well as the extra constructors, this implementation also needs some members of _Sp_counted_deleter to be protected where they could otherwise be private. - </p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id635298"></a>Examples</h4></div></div></div><p> + </p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id399153"></a>Examples</h4></div></div></div><p> Examples of use can be found in the testsuite, under <code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>. - </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id635314"></a>Unresolved Issues</h4></div></div></div><p> + </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id440522"></a>Unresolved Issues</h4></div></div></div><p> The resolution to C++ Standard Library issue <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674" target="_top">674</a>, "shared_ptr interface changes for consistency with N1856" will need to be implemented after it is accepted into the working @@ -265,7 +265,7 @@ be private. code to work with, Peter Dimov in particular for his help and invaluable advice on thread safety. Phillip Jordan and Paolo Carlini for the lock policy implementation. - </p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id559108"></a><p>[<abbr class="abbrev"> + </p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id372846"></a><p>[<abbr class="abbrev"> n2351 </abbr>] <span class="title"><i> Improving shared_ptr for C++0x, Revision 2 @@ -274,7 +274,7 @@ be private. . </span><span class="biblioid"> <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id566266"></a><p>[<abbr class="abbrev"> + . </span></p></div><div class="biblioentry"><a id="id372870"></a><p>[<abbr class="abbrev"> n2456 </abbr>] <span class="title"><i> C++ Standard Library Active Issues List (Revision R52) @@ -283,7 +283,7 @@ be private. . </span><span class="biblioid"> <a class="ulink" href="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id542944"></a><p>[<abbr class="abbrev"> + . </span></p></div><div class="biblioentry"><a id="id426703"></a><p>[<abbr class="abbrev"> n2461 </abbr>] <span class="title"><i> Working Draft, Standard for Programming Language C++ @@ -292,7 +292,7 @@ be private. . </span><span class="biblioid"> <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf" target="_top"> </a> - . </span></p></div><div class="biblioentry"><a id="id542968"></a><p>[<abbr class="abbrev"> + . </span></p></div><div class="biblioentry"><a id="id446795"></a><p>[<abbr class="abbrev"> boostshared_ptr </abbr>] <span class="title"><i> Boost C++ Libraries documentation - shared_ptr class template diff --git a/libstdc++-v3/doc/html/manual/spine.html b/libstdc++-v3/doc/html/manual/spine.html index 8e79dbc3516..8b932707032 100644 --- a/libstdc++-v3/doc/html/manual/spine.html +++ b/libstdc++-v3/doc/html/manual/spine.html @@ -2,6 +2,6 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The GNU C++ Library</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="prev" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="next" href="intro.html" title="Part I. Introduction" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual-index"></a>The GNU C++ Library</h1></div><div><p class="copyright">Copyright © 2008 <a class="ulink" href="http://fsf.org" target="_top">FSF</a> - </p></div><div><div class="legalnotice"><a id="id626603"></a><p> + </p></div><div><div class="legalnotice"><a id="id441102"></a><p> <a class="ulink" href="17_intro/license.html" target="_top">License</a> - </p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="part"><a href="intro.html">I. Introduction</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.configure">Configure</a></span></dt><dt><span class="sect1"><a href="build.html">Build</a></span></dt><dd><dl><dt><span class="sect2"><a href="build.html#build.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="build.html#build.configure">Make</a></span></dt></dl></dd><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.naming">Naming Conventions</a></span></dt><dt><span class="sect2"><a href="test.html#test.utils">Utilities</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">New Test Cases</a></span></dt><dt><span class="sect2"><a href="test.html#test.dejagnu">Test Harness Details</a></span></dt><dt><span class="sect2"><a href="test.html#test.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.no">Support for <code class="literal">-fno-exceptions</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="support.html">II. Support</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="diagnostics.html">III. Diagnostics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></dd><dt><span class="part"><a href="utilities.html">IV. Utilities</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt04ch12.html">12. Traits</a></span></dt></dl></dd><dt><span class="part"><a href="strings.html">V. Strings</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="localization.html">VI. Localization</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="containers.html">VII. Containers</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="iterators.html">VIII. Iterators</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="algorithms.html">IX. Algorithms</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="numerics.html">X. Numerics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="io.html">XI. Input and Output</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="extensions.html">XII. Extensions</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt12ch29.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_contributing.html">A. Contributing</a></span></dt><dd><dl><dt><span class="sect1"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas03.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas05.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="appendix_porting.html">B. Porting and Maintenance</a></span></dt><dd><dl><dt><span class="sect1"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_free.html">C. Free Software Needs Free Documentation</a></span></dt><dt><span class="appendix"><a href="bk01apd.html">D. GNU General Public License</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apd.html#gpl-1">Preamble</a></span></dt><dt><span class="section"><a href="bk01apds02.html">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apds02.html#gpl-2-0">Section 0</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-1">Section 1</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-2">Section 2</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-3">Section 3</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-4">Section 4</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-5">Section 5</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-6">Section 6</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-7">Section 7</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-8">Section 8</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-9">Section 9</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-10">Section 10</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-11">NO WARRANTY Section 11</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-12">Section 12</a></span></dt></dl></dd><dt><span class="section"><a href="bk01apds03.html">How to Apply These Terms to Your New Programs</a></span></dt></dl></dd><dt><span class="appendix"><a href="bk01ape.html">E. GNU Free Documentation License</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>1.1. <a href="bk01pt01ch01.html#id619193">C++ TR1 Implementation Status</a></dt><dt>1.2. <a href="bk01pt01ch01.html#id614832">C++ 200x Implementation Status</a></dt><dt>3.1. <a href="bk01pt01ch03s02.html#id559438">C++ 1998 Library Headers</a></dt><dt>3.2. <a href="bk01pt01ch03s02.html#id638001">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.3. <a href="bk01pt01ch03s02.html#id573284">C++ 200x Library Headers</a></dt><dt>3.4. <a href="bk01pt01ch03s02.html#id555603">C++ 200x Library Headers for C Library Facilities</a></dt><dt>3.5. <a href="bk01pt01ch03s02.html#id556833">C++ TR1 Library Headers</a></dt><dt>3.6. <a href="bk01pt01ch03s02.html#id548044">C++ TR1 Library Headers for C Library Facilities</a></dt><dt>3.7. <a href="bk01pt01ch03s02.html#id634486">C++ ABI Headers</a></dt><dt>3.8. <a href="bk01pt01ch03s02.html#id624264">Extension Headers</a></dt><dt>3.9. <a href="bk01pt01ch03s02.html#id648609">Extension Debug Headers</a></dt><dt>3.10. <a href="bk01pt01ch03s02.html#id609186">Extension Parallel Headers</a></dt><dt>30.1. <a href="bk01pt12ch30s03.html#id552456">Debugging Containers</a></dt><dt>30.2. <a href="bk01pt12ch30s03.html#id566906">Debugging Containers C++0x</a></dt><dt>31.1. <a href="bk01pt12ch31s03.html#id619355">Parallel Algorithms</a></dt><dt>32.1. <a href="bitmap_allocator.html#id570814">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="api.html#id586703">Extension Allocators</a></dt><dt>B.2. <a href="api.html#id596348">Extension Allocators Continued</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library Documentation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part I. Introduction</td></tr></table></div></body></html> + </p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="part"><a href="intro.html">I. Introduction</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.configure">Configure</a></span></dt><dt><span class="sect1"><a href="build.html">Build</a></span></dt><dd><dl><dt><span class="sect2"><a href="build.html#build.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="build.html#build.configure">Make</a></span></dt></dl></dd><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.naming">Naming Conventions</a></span></dt><dt><span class="sect2"><a href="test.html#test.utils">Utilities</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">New Test Cases</a></span></dt><dt><span class="sect2"><a href="test.html#test.dejagnu">Test Harness Details</a></span></dt><dt><span class="sect2"><a href="test.html#test.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.no">Support for <code class="literal">-fno-exceptions</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="support.html">II. Support</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="diagnostics.html">III. Diagnostics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></dd><dt><span class="part"><a href="utilities.html">IV. Utilities</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt04ch12.html">12. Traits</a></span></dt></dl></dd><dt><span class="part"><a href="strings.html">V. Strings</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="localization.html">VI. Localization</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="containers.html">VII. Containers</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="iterators.html">VIII. Iterators</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="algorithms.html">IX. Algorithms</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="numerics.html">X. Numerics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="io.html">XI. Input and Output</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="extensions.html">XII. Extensions</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt12ch29.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_contributing.html">A. Contributing</a></span></dt><dd><dl><dt><span class="sect1"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas03.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas05.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="appendix_porting.html">B. Porting and Maintenance</a></span></dt><dd><dl><dt><span class="sect1"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_free.html">C. Free Software Needs Free Documentation</a></span></dt><dt><span class="appendix"><a href="bk01apd.html">D. GNU General Public License</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apd.html#gpl-1">Preamble</a></span></dt><dt><span class="section"><a href="bk01apds02.html">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apds02.html#gpl-2-0">Section 0</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-1">Section 1</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-2">Section 2</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-3">Section 3</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-4">Section 4</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-5">Section 5</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-6">Section 6</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-7">Section 7</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-8">Section 8</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-9">Section 9</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-10">Section 10</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-11">NO WARRANTY Section 11</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-12">Section 12</a></span></dt></dl></dd><dt><span class="section"><a href="bk01apds03.html">How to Apply These Terms to Your New Programs</a></span></dt></dl></dd><dt><span class="appendix"><a href="bk01ape.html">E. GNU Free Documentation License</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>1.1. <a href="bk01pt01ch01.html#id337485">C++ TR1 Implementation Status</a></dt><dt>1.2. <a href="bk01pt01ch01.html#id382201">C++ 200x Implementation Status</a></dt><dt>3.1. <a href="bk01pt01ch03s02.html#id394301">C++ 1998 Library Headers</a></dt><dt>3.2. <a href="bk01pt01ch03s02.html#id440630">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.3. <a href="bk01pt01ch03s02.html#id382991">C++ 200x Library Headers</a></dt><dt>3.4. <a href="bk01pt01ch03s02.html#id425965">C++ 200x Library Headers for C Library Facilities</a></dt><dt>3.5. <a href="bk01pt01ch03s02.html#id442369">C++ TR1 Library Headers</a></dt><dt>3.6. <a href="bk01pt01ch03s02.html#id401478">C++ TR1 Library Headers for C Library Facilities</a></dt><dt>3.7. <a href="bk01pt01ch03s02.html#id435323">C++ ABI Headers</a></dt><dt>3.8. <a href="bk01pt01ch03s02.html#id432329">Extension Headers</a></dt><dt>3.9. <a href="bk01pt01ch03s02.html#id440887">Extension Debug Headers</a></dt><dt>3.10. <a href="bk01pt01ch03s02.html#id457206">Extension Parallel Headers</a></dt><dt>30.1. <a href="bk01pt12ch30s03.html#id449953">Debugging Containers</a></dt><dt>30.2. <a href="bk01pt12ch30s03.html#id319073">Debugging Containers C++0x</a></dt><dt>31.1. <a href="bk01pt12ch31s03.html#id392310">Parallel Algorithms</a></dt><dt>32.1. <a href="bitmap_allocator.html#id390307">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="api.html#id418406">Extension Allocators</a></dt><dt>B.2. <a href="api.html#id476738">Extension Allocators Continued</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library Documentation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part I. Introduction</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/xml/manual/allocator.xml b/libstdc++-v3/doc/xml/manual/allocator.xml index cc325be0dc1..5aa4f3530f4 100644 --- a/libstdc++-v3/doc/xml/manual/allocator.xml +++ b/libstdc++-v3/doc/xml/manual/allocator.xml @@ -472,8 +472,8 @@ <para> A high-performance fixed-size allocator with exponentially-increasing allocations. It has its own - documentation, found <ulink - url="../ext/mt_allocator.html">here</ulink>. + documentation, found <link + linkend="manual.ext.allocator.mt">here</link>. </para> </listitem> @@ -484,8 +484,8 @@ <para> A high-performance allocator that uses a bit-map to keep track of the used and unused memory locations. It has its own - documentation, found <ulink - url="../ext/ballocator_doc.html">here</ulink>. + documentation, found <link + linkend="manual.ext.allocator.bitmap">here</link>. </para> </listitem> </orderedlist> diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 89ac735b218..5d8358b42eb 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -34,7 +34,6 @@ std_headers = \ ${std_srcdir}/c++0x_warning.h \ ${std_srcdir}/complex \ ${std_srcdir}/condition_variable \ - ${std_srcdir}/date_time \ ${std_srcdir}/deque \ ${std_srcdir}/fstream \ ${std_srcdir}/functional \ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 91374605548..5c8da2cf763 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -290,7 +290,6 @@ std_headers = \ ${std_srcdir}/c++0x_warning.h \ ${std_srcdir}/complex \ ${std_srcdir}/condition_variable \ - ${std_srcdir}/date_time \ ${std_srcdir}/deque \ ${std_srcdir}/fstream \ ${std_srcdir}/functional \ diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp index 290745e533d..fedbf032f6b 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2008 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 @@ -47,8 +47,6 @@ #ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NULL_METADATA_HPP #define PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NULL_METADATA_HPP -#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp> - namespace __gnu_pbds { namespace detail diff --git a/libstdc++-v3/include/parallel/balanced_quicksort.h b/libstdc++-v3/include/parallel/balanced_quicksort.h index d94cf332a73..3393655fc98 100644 --- a/libstdc++-v3/include/parallel/balanced_quicksort.h +++ b/libstdc++-v3/include/parallel/balanced_quicksort.h @@ -122,11 +122,11 @@ template<typename RandomAccessIterator, typename Comparator> _GLIBCXX_PARALLEL_ASSERT( (!comp(*pivot_pos, *begin) && !comp(*(begin + n / 2), *pivot_pos)) - || (!comp(*pivot_pos, *begin) && !comp(*end, *pivot_pos)) + || (!comp(*pivot_pos, *begin) && !comp(*(end - 1), *pivot_pos)) || (!comp(*pivot_pos, *(begin + n / 2)) && !comp(*begin, *pivot_pos)) - || (!comp(*pivot_pos, *(begin + n / 2)) && !comp(*end, *pivot_pos)) - || (!comp(*pivot_pos, *end) && !comp(*begin, *pivot_pos)) - || (!comp(*pivot_pos, *end) && !comp(*(begin + n / 2), *pivot_pos))); + || (!comp(*pivot_pos, *(begin + n / 2)) && !comp(*(end - 1), *pivot_pos)) + || (!comp(*pivot_pos, *(end - 1)) && !comp(*begin, *pivot_pos)) + || (!comp(*pivot_pos, *(end - 1)) && !comp(*(begin + n / 2), *pivot_pos))); #endif // Swap pivot value to end. diff --git a/libstdc++-v3/include/parallel/random_shuffle.h b/libstdc++-v3/include/parallel/random_shuffle.h index 1f7cc10742d..e5bc5395c0b 100644 --- a/libstdc++-v3/include/parallel/random_shuffle.h +++ b/libstdc++-v3/include/parallel/random_shuffle.h @@ -491,6 +491,9 @@ template<typename RandomAccessIterator, typename RandomNumberGenerator> rng); } + // Copy elements back. + std::copy(target, target + n, begin); + delete[] dist0; delete[] dist1; delete[] oracles; diff --git a/libstdc++-v3/include/std/date_time b/libstdc++-v3/include/std/date_time deleted file mode 100644 index 2ad95169715..00000000000 --- a/libstdc++-v3/include/std/date_time +++ /dev/null @@ -1,245 +0,0 @@ -// <date_time> -*- C++ -*- - -// Copyright (C) 2008 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 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this library; see the file COPYING. If not, write to -// the Free Software Foundation, 51 Franklin Street, Fifth Floor, -// Boston, MA 02110-1301, USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -/** @file date_time - * This is a Standard C++ Library header. - */ - -#ifndef _GLIBCXX_DATE_TIME -#define _GLIBCXX_DATE_TIME 1 - -#pragma GCC system_header - -#ifndef __GXX_EXPERIMENTAL_CXX0X__ -# include <c++0x_warning.h> -#else - -#include <ctime> - -namespace std -{ - // duration types - - /// nanoseconds - class nanoseconds - { - public: - - // traits information - typedef long long tick_type; - static const tick_type ticks_per_second = 1000L * 1000 * 1000; - static const tick_type seconds_per_tick = 0; - static const bool is_subsecond = true; - - // construct/copy/destroy - nanoseconds(long long __ns = 0) : _M_ns(__ns) { } - - // modifiers - template<typename _RhsDuration> - nanoseconds& - operator+=(const _RhsDuration& __d); - - template<typename _RhsDuration> - nanoseconds& - operator-=(const _RhsDuration& __d); - - nanoseconds& - operator*=(long __multiplier); - - nanoseconds& - operator/=(long __divisor); - - // observers - tick_type count() const { return _M_ns; } - - // operations - nanoseconds operator-() const { return nanoseconds(-_M_ns); } - - private: - tick_type _M_ns; - }; - - class microseconds; - class milliseconds; - class seconds; - class minutes; - class hours; - - /// timepoint type - class system_time - { - public: - - // traits information - typedef nanoseconds::tick_type tick_type; - static const tick_type ticks_per_second = nanoseconds::ticks_per_second; - static const tick_type seconds_per_tick = 0; - static const bool is_subsecond = true; - - // create/copy/destroy - - system_time() : _M_sec(0), _M_nsec(0) { } - - explicit system_time(time_t __s, nanoseconds __ns = 0) - : _M_sec(__s), _M_nsec(__ns.count()) { } - - time_t - seconds_since_epoch() const { return _M_sec; } - - nanoseconds - nanoseconds_since_epoch() const - { - return nanoseconds(_M_nsec + _M_sec * ticks_per_second); - } - - // comparison functions - - bool - operator==(const system_time& __rhs) const - { - const tick_type __ns = _M_nsec + _M_sec * ticks_per_second; - const tick_type __xns = __rhs._M_nsec + __rhs._M_sec * ticks_per_second; - return __ns == __xns; - } - - bool - operator!=(const system_time& __rhs) const - { - return !(*this == __rhs); - } - - bool - operator<(const system_time& __rhs) const - { - const tick_type __ns = _M_nsec + _M_sec * ticks_per_second; - const tick_type __xns = __rhs._M_nsec + __rhs._M_sec * ticks_per_second; - return __ns < __xns; - } - - bool - operator<=(const system_time& __rhs) const - { - return !(__rhs < *this); - } - - bool - operator>(const system_time& __rhs) const - { - return __rhs < *this; - } - - bool - operator>=(const system_time& __rhs) const - { - return !(*this < __rhs); - } - - // arithmetic functions - nanoseconds - operator-(const system_time& __rhs) const - { - const tick_type __ns = _M_nsec + _M_sec * ticks_per_second; - const tick_type __xns = __rhs._M_nsec + __rhs._M_sec * ticks_per_second; - return nanoseconds(__ns - __xns); - } - - template<typename _Duration> - system_time - operator+(const _Duration& __td) const; - - template<typename _Duration> - system_time& - operator+=(const _Duration& __td); - - template<typename _Duration> - system_time - operator-(const _Duration& __td) const; - - template<typename _Duration> - system_time& - operator-=(const _Duration& __td); - - public: - std::time_t _M_sec; - tick_type _M_nsec; - }; - - // non-member functions - system_time - get_system_time(); - - template<typename _Duration> - system_time - operator+(const _Duration& __td, const system_time& __rhs); - - template<class _LhsDuration, class _RhsDuration> - bool - operator==(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template<class _LhsDuration, class _RhsDuration> - bool - operator!=(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - - template<class _LhsDuration, class _RhsDuration> - bool - operator<(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template<class _LhsDuration, class _RhsDuration> - bool - operator<=(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template<class _LhsDuration, class _RhsDuration> - bool - operator>(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template<class _LhsDuration, class _RhsDuration> - bool - operator>=(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - - template<typename _LhsDuration, typename _RhsDuration> - struct __finest_duration; - - template<class _LhsDuration, class _RhsDuration> - typename __finest_duration<_LhsDuration, _RhsDuration>::type - operator+(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - template<class _LhsDuration, class _RhsDuration> - typename __finest_duration<_LhsDuration, _RhsDuration>::type - operator-(const _LhsDuration& __lhs, const _RhsDuration& __rhs); - - template<class _Duration> - _Duration - operator*(_Duration __lhs, long __rhs); - template<class _Duration> - _Duration - operator*(long __lhs, _Duration __rhs); - - template<class _Duration> - _Duration - operator/(_Duration __lhs, long __rhs); -} - -#endif // __GXX_EXPERIMENTAL_CXX0X__ - -#endif // _GLIBCXX_DATE_TIME diff --git a/libstdc++-v3/libsupc++/eh_arm.cc b/libstdc++-v3/libsupc++/eh_arm.cc index e1e4851604b..6f770e95663 100644 --- a/libstdc++-v3/libsupc++/eh_arm.cc +++ b/libstdc++-v3/libsupc++/eh_arm.cc @@ -46,12 +46,14 @@ __cxa_type_match(_Unwind_Exception* ue_header, bool is_reference __attribute__((__unused__)), void** thrown_ptr_p) { - bool foreign_exception = !__is_gxx_exception_class(ue_header->exception_class); + bool forced_unwind = __is_gxx_forced_unwind_class(ue_header->exception_class); + bool foreign_exception = !forced_unwind && !__is_gxx_exception_class(ue_header->exception_class); __cxa_exception* xh = __get_exception_header_from_ue(ue_header); const std::type_info* throw_type; - // XXX What to do with forced unwind? - if (foreign_exception) + if (forced_unwind) + throw_type = &typeid(abi::__forced_unwind); + else if (foreign_exception) throw_type = &typeid(abi::__foreign_exception); else throw_type = xh->exceptionType; diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc index 86cfbafc229..b7d957c4d37 100644 --- a/libstdc++-v3/libsupc++/eh_personality.cc +++ b/libstdc++-v3/libsupc++/eh_personality.cc @@ -544,8 +544,12 @@ PERSONALITY_FUNCTION (int version, #ifdef __ARM_EABI_UNWINDER__ throw_type = ue_header; - if ((actions & _UA_FORCE_UNWIND) - || foreign_exception) + if (actions & _UA_FORCE_UNWIND) + { + __GXX_INIT_FORCED_UNWIND_CLASS(ue_header->exception_class); + thrown_ptr = 0; + } + else if (foreign_exception) thrown_ptr = 0; #else // During forced unwinding, match a magic exception type. diff --git a/libstdc++-v3/libsupc++/unwind-cxx.h b/libstdc++-v3/libsupc++/unwind-cxx.h index c5636556434..75874fc5da4 100644 --- a/libstdc++-v3/libsupc++/unwind-cxx.h +++ b/libstdc++-v3/libsupc++/unwind-cxx.h @@ -201,6 +201,32 @@ __GXX_INIT_EXCEPTION_CLASS(_Unwind_Exception_Class c) c[7] = '\0'; } +static inline bool +__is_gxx_forced_unwind_class(_Unwind_Exception_Class c) +{ + return c[0] == 'G' + && c[1] == 'N' + && c[2] == 'U' + && c[3] == 'C' + && c[4] == 'F' + && c[5] == 'O' + && c[6] == 'R' + && c[7] == '\0'; +} + +static inline void +__GXX_INIT_FORCED_UNWIND_CLASS(_Unwind_Exception_Class c) +{ + c[0] = 'G'; + c[1] = 'N'; + c[2] = 'U'; + c[3] = 'C'; + c[4] = 'F'; + c[5] = 'O'; + c[6] = 'R'; + c[7] = '\0'; +} + static inline void* __gxx_caught_object(_Unwind_Exception* eo) { diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index f5d99c63525..8d2cbf5e14b 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -143,7 +143,6 @@ sources = \ compatibility.cc \ complex_io.cc \ ctype.cc \ - date_time.cc \ debug.cc \ functexcept.cc \ hash.cc \ @@ -268,11 +267,6 @@ limits_c++0x.lo: limits_c++0x.cc limits_c++0x.o: limits_c++0x.cc $(CXXCOMPILE) -std=gnu++0x -c $< -date_time.lo: date_time.cc - $(LTCXXCOMPILE) -std=gnu++0x -c $< -date_time.o: date_time.cc - $(CXXCOMPILE) -std=gnu++0x -c $< - atomic.lo: atomic.cc $(LTCXXCOMPILE) -x c++ -std=gnu++0x -c $< atomic.o: atomic.cc diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 5034564434a..df9c4b9e597 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -74,20 +74,20 @@ toolexeclibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(toolexeclib_LTLIBRARIES) am__libstdc___la_SOURCES_DIST = atomic.cc bitmap_allocator.cc \ pool_allocator.cc mt_allocator.cc codecvt.cc compatibility.cc \ - complex_io.cc ctype.cc date_time.cc debug.cc functexcept.cc \ - hash.cc hash_c++0x.cc globals_io.cc hashtable.cc \ - hashtable_c++0x.cc ios.cc ios_failure.cc ios_init.cc \ - ios_locale.cc limits.cc limits_c++0x.cc list.cc debug_list.cc \ - locale.cc locale_init.cc locale_facets.cc localename.cc \ - stdexcept.cc strstream.cc system_error.cc tree.cc \ - allocator-inst.cc concept-inst.cc fstream-inst.cc ext-inst.cc \ - ios-inst.cc iostream-inst.cc istream-inst.cc istream.cc \ - locale-inst.cc misc-inst.cc ostream-inst.cc sstream-inst.cc \ - streambuf-inst.cc streambuf.cc string-inst.cc valarray-inst.cc \ - wlocale-inst.cc wstring-inst.cc mutex.cc condition_variable.cc \ - atomicity.cc codecvt_members.cc collate_members.cc \ - ctype_members.cc messages_members.cc monetary_members.cc \ - numeric_members.cc time_members.cc basic_file.cc c++locale.cc \ + complex_io.cc ctype.cc debug.cc functexcept.cc hash.cc \ + hash_c++0x.cc globals_io.cc hashtable.cc hashtable_c++0x.cc \ + ios.cc ios_failure.cc ios_init.cc ios_locale.cc limits.cc \ + limits_c++0x.cc list.cc debug_list.cc locale.cc locale_init.cc \ + locale_facets.cc localename.cc stdexcept.cc strstream.cc \ + system_error.cc tree.cc allocator-inst.cc concept-inst.cc \ + fstream-inst.cc ext-inst.cc ios-inst.cc iostream-inst.cc \ + istream-inst.cc istream.cc locale-inst.cc misc-inst.cc \ + ostream-inst.cc sstream-inst.cc streambuf-inst.cc streambuf.cc \ + string-inst.cc valarray-inst.cc wlocale-inst.cc \ + wstring-inst.cc mutex.cc condition_variable.cc atomicity.cc \ + codecvt_members.cc collate_members.cc ctype_members.cc \ + messages_members.cc monetary_members.cc numeric_members.cc \ + time_members.cc basic_file.cc c++locale.cc \ compatibility-ldbl.cc parallel_list.cc parallel_settings.cc am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \ ctype_members.lo messages_members.lo monetary_members.lo \ @@ -99,9 +99,9 @@ am__objects_4 = basic_file.lo c++locale.lo $(am__objects_2) \ $(am__objects_3) am__objects_5 = atomic.lo bitmap_allocator.lo pool_allocator.lo \ mt_allocator.lo codecvt.lo compatibility.lo complex_io.lo \ - ctype.lo date_time.lo debug.lo functexcept.lo hash.lo \ - hash_c++0x.lo globals_io.lo hashtable.lo hashtable_c++0x.lo \ - ios.lo ios_failure.lo ios_init.lo ios_locale.lo limits.lo \ + ctype.lo debug.lo functexcept.lo hash.lo hash_c++0x.lo \ + globals_io.lo hashtable.lo hashtable_c++0x.lo ios.lo \ + ios_failure.lo ios_init.lo ios_locale.lo limits.lo \ limits_c++0x.lo list.lo debug_list.lo locale.lo locale_init.lo \ locale_facets.lo localename.lo stdexcept.lo strstream.lo \ system_error.lo tree.lo allocator-inst.lo concept-inst.lo \ @@ -382,7 +382,6 @@ sources = \ compatibility.cc \ complex_io.cc \ ctype.cc \ - date_time.cc \ debug.cc \ functexcept.cc \ hash.cc \ @@ -865,11 +864,6 @@ limits_c++0x.lo: limits_c++0x.cc limits_c++0x.o: limits_c++0x.cc $(CXXCOMPILE) -std=gnu++0x -c $< -date_time.lo: date_time.cc - $(LTCXXCOMPILE) -std=gnu++0x -c $< -date_time.o: date_time.cc - $(CXXCOMPILE) -std=gnu++0x -c $< - atomic.lo: atomic.cc $(LTCXXCOMPILE) -x c++ -std=gnu++0x -c $< atomic.o: atomic.cc diff --git a/libstdc++-v3/src/date_time.cc b/libstdc++-v3/src/date_time.cc deleted file mode 100644 index 0286917b779..00000000000 --- a/libstdc++-v3/src/date_time.cc +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2008 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 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -#include <date_time> - -namespace std -{ - system_time - get_system_time() - { - std::time_t sec = std::time(0); - return system_time(sec); - } - - const nanoseconds::tick_type nanoseconds::ticks_per_second; - const nanoseconds::tick_type nanoseconds::seconds_per_tick; - const bool nanoseconds::is_subsecond; - - const system_time::tick_type system_time::ticks_per_second; - const system_time::tick_type system_time::seconds_per_tick; - const bool system_time::is_subsecond; -} diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc index 049f42096d0..7988666739a 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all.cc @@ -97,7 +97,6 @@ #include <bitset> #include <condition_variable> #include <complex> -#include <date_time> #include <deque> #include <exception> #include <fstream> diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc index 869fa02675c..814fbc3a144 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc @@ -94,7 +94,6 @@ #include <array> #include <bitset> #include <complex> -#include <date_time> #include <deque> #include <exception> #include <fstream> @@ -205,7 +204,6 @@ #include <array> #include <bitset> #include <complex> -#include <date_time> #include <deque> #include <exception> #include <fstream> diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc index 377d1d17758..ea4de372296 100644 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-2.cc @@ -1,4 +1,5 @@ // { dg-options "-std=gnu++0x -funsigned-char -fshort-enums" } +// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } } // 2007-05-03 Benjamin Kosnik <bkoz@redhat.com> // diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc index 0789ef55f22..ce318c8a4c2 100644 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-2.cc @@ -1,4 +1,5 @@ // { dg-options "-std=gnu++0x -funsigned-char -fshort-enums" } +// { dg-options "-std=gnu++0x -funsigned-char -fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi } } // 2007-05-03 Benjamin Kosnik <bkoz@redhat.com> // diff --git a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/1.cc b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/1.cc new file mode 100644 index 00000000000..4c5836b2e70 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/1.cc @@ -0,0 +1,75 @@ +// Copyright (C) 2001 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 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +// 25.2.11 random_shuffle() + +#include <algorithm> +#include <testsuite_hooks.h> + +bool test __attribute__((unused)) = true; + +const int N = 200000; +int A[N], s1[N]; + +#if _GLIBCXX_PARALLEL +#define TAG , __gnu_parallel::sequential_tag() +#else +#define TAG +#endif + +void fill_ascending() +{ + for (int i = 0; i < N; ++i) + A[i] = i; +} + +void +test01() +{ + fill_ascending(); +#if _GLIBCXX_PARALLEL + for (int num_threads = 1; num_threads <= 2; ++num_threads) + { + omp_set_num_threads(num_threads); +#endif + std::copy(A, A + N, s1); + VERIFY(std::equal(s1, s1 + N, A TAG)); + + std::random_shuffle(s1, s1 + N); + // the chance that random_shuffle leaves the order as is by coincidence + // is negligible, so we expect it to be permuted + VERIFY(!std::equal(s1, s1 + N, A TAG)); + + std::sort(s1, s1 + N TAG); + VERIFY(std::equal(s1, s1 + N, A TAG)); +#if _GLIBCXX_PARALLEL + } +#endif +} + +int +main() +{ +#if _GLIBCXX_PARALLEL + __gnu_parallel::_Settings gpms = __gnu_parallel::_Settings::get(); + gpms.algorithm_strategy = __gnu_parallel::force_parallel; + __gnu_parallel::_Settings::set(gpms); +#endif + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/31_date_time/headers/date_time/functions_std.cc b/libstdc++-v3/testsuite/31_date_time/headers/date_time/functions_std.cc deleted file mode 100644 index 49b4ecac83b..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/headers/date_time/functions_std.cc +++ /dev/null @@ -1,27 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include <date_time> - -namespace gnu -{ - using std::get_system_time; -} diff --git a/libstdc++-v3/testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc b/libstdc++-v3/testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc deleted file mode 100644 index 9b98b628c77..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/headers/date_time/std_c++0x_neg.cc +++ /dev/null @@ -1,24 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++98" } - -// Copyright (C) 2008 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 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include <date_time> // { dg-excess-errors "In file included from" } - -// { dg-error "upcoming ISO" "" { target *-*-* } 36 } diff --git a/libstdc++-v3/testsuite/31_date_time/headers/date_time/synopsis.cc b/libstdc++-v3/testsuite/31_date_time/headers/date_time/synopsis.cc deleted file mode 100644 index e86c9b784bf..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/headers/date_time/synopsis.cc +++ /dev/null @@ -1,70 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include <date_time> - -namespace std { - // duration types - class nanoseconds; - class microseconds; - class milliseconds; - class seconds; - class minutes; - class hours; - - // timepoint type - class system_time; - - // non-member functions - system_time get_system_time(); - - template<typename Duration> - system_time operator+(const Duration& td, const system_time& rhs); - - template <class LhsDuration, class RhsDuration> - bool operator==(const LhsDuration& lhs, const RhsDuration& rhs); - template <class LhsDuration, class RhsDuration> - bool operator!=(const LhsDuration& lhs, const RhsDuration& rhs); - - template <class LhsDuration, class RhsDuration> - bool operator< (const LhsDuration& lhs, const RhsDuration& rhs); - template <class LhsDuration, class RhsDuration> - bool operator<=(const LhsDuration& lhs, const RhsDuration& rhs); - template <class LhsDuration, class RhsDuration> - bool operator> (const LhsDuration& lhs, const RhsDuration& rhs); - template <class LhsDuration, class RhsDuration> - bool operator>=(const LhsDuration& lhs, const RhsDuration& rhs); - -/* - template <class LhsDuration, class RhsDuration> - FinestDuration operator+(const LhsDuration& lhs, const RhsDuration& rhs); - template <class LhsDuration, class RhsDuration> - FinestDuration operator-(const LhsDuration& lhs, const RhsDuration& rhs); -*/ - - template <class Duration> - Duration operator*(Duration lhs, long rhs); - template <class Duration> - Duration operator*(long lhs, Duration rhs); - - template <class Duration> - Duration operator/(Duration lhs, long rhs); -} diff --git a/libstdc++-v3/testsuite/31_date_time/headers/date_time/types_std.cc b/libstdc++-v3/testsuite/31_date_time/headers/date_time/types_std.cc deleted file mode 100644 index f8fc5953c5b..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/headers/date_time/types_std.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include <date_time> - -namespace gnu -{ - typedef std::nanoseconds t1; - typedef std::microseconds t2; - typedef std::milliseconds t3; - typedef std::seconds t4; - typedef std::minutes t5; - typedef std::hours t6; - typedef std::system_time t7; -} diff --git a/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/duration.cc b/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/duration.cc deleted file mode 100644 index ca6e2cf374a..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/duration.cc +++ /dev/null @@ -1,50 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include <date_time> - -namespace gnu -{ - bool - test_nanoseconds_is_duration() - { - typedef std::nanoseconds D; - D d; - D e(d); - d == e; - d < e; - d = e; - - typedef D::tick_type tick_type; - tick_type t1 = D::ticks_per_second; - tick_type t2 = D::seconds_per_tick; - bool b1 = D::is_subsecond; - tick_type t3 = d.count(); - -d; - - d += e; - d -= e; - d *= static_cast<long>(1); - d /= static_cast<long>(1); - - return b1 || t1 || t2 || t3; - } -} diff --git a/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/traits.cc b/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/traits.cc deleted file mode 100644 index 53f36180ea4..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/nanoseconds/requirements/traits.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include <date_time> - -namespace gnu -{ - void - test_nanoseconds_traits() - { - static_assert(std::nanoseconds::ticks_per_second == 1000L * 1000 * 1000, "FIXME"); - static_assert(std::nanoseconds::seconds_per_tick == 0, "FIXME"); - static_assert(std::nanoseconds::is_subsecond == true, "FIXME"); - } -} diff --git a/libstdc++-v3/testsuite/31_date_time/system_time/requirements/traits.cc b/libstdc++-v3/testsuite/31_date_time/system_time/requirements/traits.cc deleted file mode 100644 index 0310333a620..00000000000 --- a/libstdc++-v3/testsuite/31_date_time/system_time/requirements/traits.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++0x" } - -// Copyright (C) 2008 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 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -#include <date_time> - -namespace gnu -{ - void - test_system_time_traits() - { - static_assert(std::nanoseconds::ticks_per_second == std::nanoseconds::ticks_per_second, "FIXME"); - static_assert(std::system_time::seconds_per_tick == 0, "FIXME"); - static_assert(std::system_time::is_subsecond == true, "FIXME"); - } -} |