diff options
152 files changed, 2087 insertions, 1077 deletions
diff --git a/ChangeLog.melt b/ChangeLog.melt index 8bf89e33a06..87c1fb18730 100644 --- a/ChangeLog.melt +++ b/ChangeLog.melt @@ -1,3 +1,6 @@ +2009-02-05 Basile Starynkevitch <basile@starynkevitch.net> + MELT branch merged with trunk r143951 + 2009-02-02 Basile Starynkevitch <basile@starynkevitch.net> MELT branch merged with trunk r143867 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4c777c57a5..11b461ec83d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,131 @@ +2009-02-05 Daniel Berlin <dberlin@dberlin.org> + Richard Guenther <rguenther@suse.de> + + PR tree-optimization/39100 + * tree-ssa-structalias.c (do_ds_constraint): Actually do what the + comment says and add edges. + +2009-02-05 Joseph Myers <joseph@codesourcery.com> + + PR c/35435 + * c-common.c (handle_tls_model_attribute): Ignore attribute for + non-VAR_DECLs without checking DECL_THREAD_LOCAL_P. + +2009-02-04 Tobias Grosser <grosser@fim.uni-passau.de> + + * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use, + sese_build_livein_liveouts_bb, sese_build_livein_liveouts, + register_bb_in_sese, new_sese, free_sese): Moved. + (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains, + outermost_loop_in_scop, build_scop_iteration_domain, + expand_scalar_variables_ssa_name, get_vdef_before_scop, + limit_scops): Use bb_in_sese_p instead of bb_in_scop_p. + Use loop_in_sese_p instead of loop_in_scop_p. + (new_graphite_bb, gloog): Do not initialize SCOP_BBS_B. + (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP and SCOP_BBS_B. + (scopdet_basic_block_info): Fix bug in scop detection. + (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop, + eq_loop_to_cloog_loop): Remove. + (nb_loops_around_loop_in_scop, nb_loop + ref_nb_loops): Moved here... + * graphite.h (ref_nb_loops): ... from here. + (struct scop): Remove bbs_b bitmap and loop2cloog_loop. + (loop_domain_dim, loop_iteration_vector_dim): Remove. + (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed. + * testsuite/gcc.dg/graphite/scop-19.c: New + +2009-02-04 Paolo Bonzini <bonzini@gnu.org> + Hans-Peter Nilsson <hp@axis.com> + + PR rtl-optimization/37889 + * rtlanal.c (rtx_addr_can_trap_p_1): Add offset and size arguments. + Move offset handling from PLUS to before the switch. Use new + arguments when considering SYMBOL_REFs too. + (rtx_addr_can_trap_p): Pass dummy offset and size. + (enum may_trap_p_flags): Remove. + (may_trap_p_1): Pass size from MEM_SIZE. + + PR rtl-optimization/38921 + * loop-invariant.c (find_invariant_insn): Use may_trap_or_fault_p. + * rtl.h (may_trap_after_code_motion_p): Delete prototype. + * rtlanal.c (may_trap_after_code_motion_p): Delete. + (may_trap_p, may_trap_or_fault_p): Pass 0/1 as flags. + +2009-02-04 H.J. Lu <hongjiu.lu@intel.com> + + AVX Programming Reference (January, 2009) + * config/i386/sse.md (*vpclmulqdq): New. + +2009-02-04 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/38977 + PR gcov-profile/38292 + * calls.c (special_function_p): Disregard __builtin_ + prefix. + +2009-02-04 Hariharan Sandanagobalane <hariharan@picochip.com> + + * config/picochip/picochip.c (GO_IF_LEGITIMATE_ADDRESS): Disallow + non-indexable addresses even before reload. + +2009-02-03 Joseph Myers <joseph@codesourcery.com> + + PR c/29129 + * c-decl.c (grokdeclarator): Mark [*] arrays in field declarators + as having variable size. Do not give an error for unnamed + parameters with [*] declarators. Give a warning for type names + with [*] declarators and mark them as variable size. + * c-parser.c (c_parser_sizeof_expression): Do not give an error + for sizeof applied to [*] type names. + +2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com> + + PR C++/36607 + * convert.c (convert_to_integer): Treat OFFSET_TYPE like INTEGER_TYPE. + +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + * gcc.c (process_command): Update copyright notice dates. + * gcov.c (print_version): Likewise. + * gcov-dump.c (print_version): Likewise. + * mips-tfile.c (main): Likewise. + * mips-tdump.c (main): Likewise. + +2009-02-03 Joseph Myers <joseph@codesourcery.com> + + PR c/35433 + * c-typeck.c (composite_type): Set TYPE_SIZE and TYPE_SIZE_UNIT + for composite type involving a zero-length array type. + +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + PR target/35318 + * function.c (match_asm_constraints_1): Skip over + initial optional % in the constraint. + + PR inline-asm/39059 + * c-parser.c (c_parser_postfix_expression): If fixed point is not + supported, don't accept FIXED_CSTs. + * c-decl.c (finish_declspecs): Error if fixed point is not supported + and _Sat is used without _Fract/_Accum. Set specs->type to + integer_type_node for cts_fract/cts_accum if fixed point is not + supported. + +2009-02-02 Catherine Moore <clm@codesourcery.com> + + * sde.h (SUBTARGET_ARM_SPEC): Don;t assemble -fpic code as + -mabicalls. + +2009-02-02 Richard Sandiford <rdsandiford@googlemail.com> + + * config/mips/mips.h (FILE_HAS_64BIT_SYMBOLS): New macro. + (ABI_HAS_64BIT_SYMBOLS): Use it. + (DWARF2_ADDR_SIZE): Use it instead of ABI_HAS_64BIT_SYMBOLS. + +2009-02-02 Paul Brook <paul@codesourcery.com> + + * config/arm/arm.md (arm_addsi3): Add r/r/k alternative. + 2009-02-02 Jakub Jelinek <jakub@redhat.com> PR inline-asm/39058 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 46c3257851e..dac850647d8 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20090202 +20090205 diff --git a/gcc/c-common.c b/gcc/c-common.c index 78c6afb8f4a..e145252d961 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -6275,7 +6275,7 @@ handle_tls_model_attribute (tree *node, tree name, tree args, *no_add_attrs = true; - if (!DECL_THREAD_LOCAL_P (decl)) + if (TREE_CODE (decl) != VAR_DECL || !DECL_THREAD_LOCAL_P (decl)) { warning (OPT_Wattributes, "%qE attribute ignored", name); return NULL_TREE; diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 9f65af4efac..35a9c4b8261 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4389,7 +4389,14 @@ grokdeclarator (const struct c_declarator *declarator, } else if (decl_context == FIELD) { - if (pedantic && !flag_isoc99 && !in_system_header) + if (array_parm_vla_unspec_p) + /* Field names can in fact have function prototype + scope so [*] is disallowed here through making + the field variably modified, not through being + something other than a declaration with function + prototype scope. */ + size_varies = 1; + else if (pedantic && !flag_isoc99 && !in_system_header) pedwarn (input_location, OPT_pedantic, "ISO C90 does not support flexible array members"); @@ -4401,12 +4408,6 @@ grokdeclarator (const struct c_declarator *declarator, { if (array_parm_vla_unspec_p) { - if (! orig_name) - { - /* C99 6.7.5.2p4 */ - error ("%<[*]%> not allowed in other than a declaration"); - } - itype = build_range_type (sizetype, size_zero_node, NULL_TREE); size_varies = 1; } @@ -4415,12 +4416,14 @@ grokdeclarator (const struct c_declarator *declarator, { if (array_parm_vla_unspec_p) { - /* The error is printed elsewhere. We use this to - avoid messing up with incomplete array types of - the same type, that would otherwise be modified - below. */ + /* C99 6.7.5.2p4 */ + warning (0, "%<[*]%> not in a declaration"); + /* We use this to avoid messing up with incomplete + array types of the same type, that would + otherwise be modified below. */ itype = build_range_type (sizetype, size_zero_node, NULL_TREE); + size_varies = 1; } } @@ -7772,6 +7775,8 @@ finish_declspecs (struct c_declspecs *specs) if (specs->saturating_p) { error ("%<_Sat%> is used without %<_Fract%> or %<_Accum%>"); + if (!targetm.fixed_point_supported_p ()) + error ("fixed-point types not supported for this target"); specs->typespec_word = cts_fract; } else if (specs->long_p || specs->short_p @@ -7894,8 +7899,10 @@ finish_declspecs (struct c_declspecs *specs) specs->type = dfloat128_type_node; break; case cts_fract: - gcc_assert (!specs->complex_p); - if (specs->saturating_p) + gcc_assert (!specs->complex_p); + if (!targetm.fixed_point_supported_p ()) + specs->type = integer_type_node; + else if (specs->saturating_p) { if (specs->long_long_p) specs->type = specs->unsigned_p @@ -7913,7 +7920,7 @@ finish_declspecs (struct c_declspecs *specs) specs->type = specs->unsigned_p ? sat_unsigned_fract_type_node : sat_fract_type_node; - } + } else { if (specs->long_long_p) @@ -7932,11 +7939,13 @@ finish_declspecs (struct c_declspecs *specs) specs->type = specs->unsigned_p ? unsigned_fract_type_node : fract_type_node; - } + } break; case cts_accum: - gcc_assert (!specs->complex_p); - if (specs->saturating_p) + gcc_assert (!specs->complex_p); + if (!targetm.fixed_point_supported_p ()) + specs->type = integer_type_node; + else if (specs->saturating_p) { if (specs->long_long_p) specs->type = specs->unsigned_p @@ -7954,7 +7963,7 @@ finish_declspecs (struct c_declspecs *specs) specs->type = specs->unsigned_p ? sat_unsigned_accum_type_node : sat_accum_type_node; - } + } else { if (specs->long_long_p) @@ -7973,7 +7982,7 @@ finish_declspecs (struct c_declspecs *specs) specs->type = specs->unsigned_p ? unsigned_accum_type_node : accum_type_node; - } + } break; default: gcc_unreachable (); diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 5cb1982a544..199a5a72f3f 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -4949,13 +4949,6 @@ c_parser_sizeof_expression (c_parser *parser) /* sizeof ( type-name ). */ skip_evaluation--; in_sizeof--; - if (type_name->declarator->kind == cdk_array - && type_name->declarator->u.array.vla_unspec_p) - { - /* C99 6.7.5.2p4 */ - error_at (expr_loc, - "%<[*]%> not allowed in other than a declaration"); - } return c_expr_sizeof_type (type_name); } else @@ -5089,6 +5082,17 @@ c_parser_postfix_expression (c_parser *parser) switch (c_parser_peek_token (parser)->type) { case CPP_NUMBER: + expr.value = c_parser_peek_token (parser)->value; + expr.original_code = ERROR_MARK; + loc = c_parser_peek_token (parser)->location; + c_parser_consume_token (parser); + if (TREE_CODE (expr.value) == FIXED_CST + && !targetm.fixed_point_supported_p ()) + { + error_at (loc, "fixed-point types not supported for this target"); + expr.value = error_mark_node; + } + break; case CPP_CHAR: case CPP_CHAR16: case CPP_CHAR32: diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 4b9b2b30d00..9ce60cdc9ca 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -326,10 +326,14 @@ composite_type (tree t1, tree t2) tree d2 = TYPE_DOMAIN (t2); bool d1_variable, d2_variable; bool d1_zero, d2_zero; + bool t1_complete, t2_complete; /* We should not have any type quals on arrays at all. */ gcc_assert (!TYPE_QUALS (t1) && !TYPE_QUALS (t2)); + t1_complete = COMPLETE_TYPE_P (t1); + t2_complete = COMPLETE_TYPE_P (t2); + d1_zero = d1 == 0 || !TYPE_MAX_VALUE (d1); d2_zero = d2 == 0 || !TYPE_MAX_VALUE (d2); @@ -369,6 +373,15 @@ composite_type (tree t1, tree t2) || !d1_variable)) ? t1 : t2)); + /* Ensure a composite type involving a zero-length array type + is a zero-length type not an incomplete type. */ + if (d1_zero && d2_zero + && (t1_complete || t2_complete) + && !COMPLETE_TYPE_P (t1)) + { + TYPE_SIZE (t1) = bitsize_zero_node; + TYPE_SIZE_UNIT (t1) = size_zero_node; + } t1 = c_build_qualified_type (t1, quals); return build_type_attribute_variant (t1, attributes); } diff --git a/gcc/calls.c b/gcc/calls.c index e6e882f24b1..9dcf66298ca 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -498,10 +498,14 @@ special_function_p (const_tree fndecl, int flags) && ! strcmp (name, "__builtin_alloca")))) flags |= ECF_MAY_BE_ALLOCA; - /* Disregard prefix _, __ or __x. */ + /* Disregard prefix _, __, __x or __builtin_. */ if (name[0] == '_') { - if (name[1] == '_' && name[2] == 'x') + if (name[1] == '_' + && name[2] == 'b' + && !strncmp (name + 3, "uiltin_", 7)) + tname += 10; + else if (name[1] == '_' && name[2] == 'x') tname += 3; else if (name[1] == '_') tname += 2; diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 0acf257cb43..4eccd734b82 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -605,14 +605,18 @@ "" ) +;; The r/r/k alternative is required when reloading the address +;; (plus (reg rN) (reg sp)) into (reg rN). In this case reload will +;; put the duplicated register first, and not try the commutative version. (define_insn_and_split "*arm_addsi3" - [(set (match_operand:SI 0 "s_register_operand" "=r, !k,r, !k,r") - (plus:SI (match_operand:SI 1 "s_register_operand" "%rk,!k,rk,!k,rk") - (match_operand:SI 2 "reg_or_int_operand" "rI, rI,L, L,?n")))] + [(set (match_operand:SI 0 "s_register_operand" "=r, !k, r,r, !k,r") + (plus:SI (match_operand:SI 1 "s_register_operand" "%rk,!k, r,rk,!k,rk") + (match_operand:SI 2 "reg_or_int_operand" "rI, rI,!k,L, L,?n")))] "TARGET_32BIT" "@ add%?\\t%0, %1, %2 add%?\\t%0, %1, %2 + add%?\\t%0, %2, %1 sub%?\\t%0, %1, #%n2 sub%?\\t%0, %1, #%n2 #" @@ -627,7 +631,7 @@ operands[1], 0); DONE; " - [(set_attr "length" "4,4,4,4,16") + [(set_attr "length" "4,4,4,4,4,16") (set_attr "predicable" "yes")] ) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 393a3161da6..a54133378b5 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -11509,6 +11509,18 @@ (set_attr "prefix" "maybe_vex") (set_attr "mode" "TI")]) +(define_insn "*vpclmulqdq" + [(set (match_operand:V2DI 0 "register_operand" "=x") + (unspec:V2DI [(match_operand:V2DI 1 "register_operand" "x") + (match_operand:V2DI 2 "nonimmediate_operand" "xm") + (match_operand:SI 3 "const_0_to_255_operand" "n")] + UNSPEC_PCLMUL))] + "TARGET_PCLMUL && TARGET_AVX" + "vpclmulqdq\t{%3, %2, %1, %0|%0, %1, %2, %3}" + [(set_attr "type" "sselog1") + (set_attr "prefix" "vex") + (set_attr "mode" "TI")]) + (define_insn "pclmulqdq" [(set (match_operand:V2DI 0 "register_operand" "=x") (unspec:V2DI [(match_operand:V2DI 1 "register_operand" "0") diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index f5de061d44c..464148704f3 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -767,9 +767,15 @@ enum mips_code_readable_setting { /* Likewise for 32-bit regs. */ #define ABI_NEEDS_32BIT_REGS (mips_abi == ABI_32) -/* True if symbols are 64 bits wide. At present, n64 is the only - ABI for which this is true. */ -#define ABI_HAS_64BIT_SYMBOLS (mips_abi == ABI_64 && !TARGET_SYM32) +/* True if the file format uses 64-bit symbols. At present, this is + only true for n64, which uses 64-bit ELF. */ +#define FILE_HAS_64BIT_SYMBOLS (mips_abi == ABI_64) + +/* True if symbols are 64 bits wide. This is usually determined by + the ABI's file format, but it can be overridden by -msym32. Note that + overriding the size with -msym32 changes the ABI of relocatable objects, + although it doesn't change the ABI of a fully-linked object. */ +#define ABI_HAS_64BIT_SYMBOLS (FILE_HAS_64BIT_SYMBOLS && !TARGET_SYM32) /* ISA has instructions for managing 64-bit fp and gp regs (e.g. mips3). */ #define ISA_HAS_64BIT_REGS (ISA_MIPS3 \ @@ -1218,7 +1224,14 @@ enum mips_code_readable_setting { #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG #endif -#define DWARF2_ADDR_SIZE (ABI_HAS_64BIT_SYMBOLS ? 8 : 4) +/* The size of DWARF addresses should be the same as the size of symbols + in the target file format. They shouldn't depend on things like -msym32, + because many DWARF consumers do not allow the mixture of address sizes + that one would then get from linking -msym32 code with -msym64 code. + + Note that the default POINTER_SIZE test is not appropriate for MIPS. + EABI64 has 64-bit pointers but uses 32-bit ELF. */ +#define DWARF2_ADDR_SIZE (FILE_HAS_64BIT_SYMBOLS ? 8 : 4) /* By default, turn on GDB extensions. */ #define DEFAULT_GDB_EXTENSIONS 1 diff --git a/gcc/config/mips/sde.h b/gcc/config/mips/sde.h index ee8b20b0996..876a990476f 100644 --- a/gcc/config/mips/sde.h +++ b/gcc/config/mips/sde.h @@ -60,7 +60,6 @@ along with GCC; see the file COPYING3. If not see #undef SUBTARGET_ASM_SPEC #define SUBTARGET_ASM_SPEC "\ %{!mips1:--trap} \ -%{fPIC|fpic|fPIE|fpie:%{!mips16*:-KPIC}} \ %{mips16:-no-mips16}" #undef LINK_SPEC diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c index a0686bdb262..066765661a9 100644 --- a/gcc/config/picochip/picochip.c +++ b/gcc/config/picochip/picochip.c @@ -1200,8 +1200,7 @@ picochip_legitimate_address_register (rtx x, unsigned strict) /* Determine whether the given constant is in the range required for the given base register. */ static int -picochip_const_ok_for_base (enum machine_mode mode, int regno, int offset, - int strict) +picochip_const_ok_for_base (enum machine_mode mode, int regno, int offset) { HOST_WIDE_INT corrected_offset; @@ -1209,17 +1208,16 @@ picochip_const_ok_for_base (enum machine_mode mode, int regno, int offset, { if (GET_MODE_SIZE(mode) <= 4) { - /* We can allow incorrect offsets if strict is 0. If strict is 1, - we are in reload and these memory accesses need to be changed. */ - if (offset % GET_MODE_SIZE (mode) != 0 && strict == 1) + /* We used to allow incorrect offsets if strict is 0. But, this would + then rely on reload doing the right thing. We have had problems + there before, and on > 4.3 compiler, there are no benefits. */ + if (offset % GET_MODE_SIZE (mode) != 0) return 0; corrected_offset = offset / GET_MODE_SIZE (mode); } else { - /* We can allow incorrect offsets if strict is 0. If strict is 1, - we are in reload and these memory accesses need to be changed. */ - if (offset % 4 != 0 && strict == 1) + if (offset % 4 != 0) return 0; corrected_offset = offset / 4; } @@ -1272,7 +1270,7 @@ picochip_legitimate_address_p (int mode, rtx x, unsigned strict) picochip_legitimate_address_register (base, strict) && CONST_INT == GET_CODE (offset) && picochip_const_ok_for_base (mode, REGNO (base), - INTVAL (offset),strict)); + INTVAL (offset))); break; } diff --git a/gcc/convert.c b/gcc/convert.c index 1a462e7626f..77907bafcb5 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -493,6 +493,7 @@ convert_to_integer (tree type, tree expr) case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: + case OFFSET_TYPE: /* If this is a logical operation, which just returns 0 or 1, we can change the type of the expression. */ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eeec03d466f..2a08d8bbae4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,42 @@ +2009-02-04 Jakub Jelinek <jakub@redhat.com> + + PR c++/39095 + * operators.def: Use COMPONENT_REF code for ->/pt operator again, + remove ./dt operator. + * mangle.c (write_expression): Handle COMPONENT_REF after handling + ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it + write_string ("dt") instead of using operators.def. + +2009-02-03 Jason Merrill <jason@redhat.com> + + * typeck.c (cp_build_unary_op): Only complain about taking address + of main if pedantic. + +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + PR inline-asm/39059 + * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs. + + PR c++/39056 + * typeck2.c (digest_init_r): Don't call process_init_constructor + for COMPLEX_TYPE. + +2009-02-03 Paolo Bonzini <bonzini@gnu.org> + + PR c++/36897 + * pt.c (convert_nontype_argument_function): Expect expr to be an + ADDR_EXPR. + + PR c++/37314 + * typeck.c (merge_types): Call resolve_typename_type if only + one type is a typename. + +2009-02-02 Jason Merrill <jason@redhat.com> + + PR c++/39054 + * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node + in BIT_NOT_EXPR. + 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/39053 diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index a7b466217eb..f51136ac3d5 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -2298,20 +2298,6 @@ write_expression (tree expr) write_template_args (template_args); } } - else if (code == COMPONENT_REF) - { - tree ob = TREE_OPERAND (expr, 0); - - if (TREE_CODE (ob) == ARROW_EXPR) - { - code = ARROW_EXPR; - ob = TREE_OPERAND (ob, 0); - } - - write_string (operator_name_info[(int)code].mangled_name); - write_expression (ob); - write_member_name (TREE_OPERAND (expr, 1)); - } else { int i; @@ -2334,6 +2320,23 @@ write_expression (tree expr) code = TREE_CODE (expr); } + if (code == COMPONENT_REF) + { + tree ob = TREE_OPERAND (expr, 0); + + if (TREE_CODE (ob) == ARROW_EXPR) + { + write_string (operator_name_info[(int)code].mangled_name); + ob = TREE_OPERAND (ob, 0); + } + else + write_string ("dt"); + + write_expression (ob); + write_member_name (TREE_OPERAND (expr, 1)); + return; + } + /* If it wasn't any of those, recursively expand the expression. */ write_string (operator_name_info[(int) code].mangled_name); diff --git a/gcc/cp/operators.def b/gcc/cp/operators.def index 20c74d88220..c63ce3f0429 100644 --- a/gcc/cp/operators.def +++ b/gcc/cp/operators.def @@ -125,8 +125,7 @@ DEF_SIMPLE_OPERATOR ("&&", TRUTH_ANDIF_EXPR, "aa", 2) DEF_SIMPLE_OPERATOR ("||", TRUTH_ORIF_EXPR, "oo", 2) DEF_SIMPLE_OPERATOR (",", COMPOUND_EXPR, "cm", 2) DEF_SIMPLE_OPERATOR ("->*", MEMBER_REF, "pm", 2) -DEF_SIMPLE_OPERATOR ("->", ARROW_EXPR, "pt", 2) -DEF_SIMPLE_OPERATOR (".", COMPONENT_REF, "dt", 2) +DEF_SIMPLE_OPERATOR ("->", COMPONENT_REF, "pt", 2) DEF_SIMPLE_OPERATOR ("[]", ARRAY_REF, "ix", 2) DEF_SIMPLE_OPERATOR ("++", POSTINCREMENT_EXPR, "pp", 2) DEF_SIMPLE_OPERATOR ("--", POSTDECREMENT_EXPR, "mm", 2) diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 5675e9bca12..404e45a14c6 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3144,6 +3144,12 @@ cp_parser_primary_expression (cp_parser *parser, case CPP_WCHAR: case CPP_NUMBER: token = cp_lexer_consume_token (parser->lexer); + if (TREE_CODE (token->u.value) == FIXED_CST) + { + error ("%Hfixed-point types not supported in C++", + &token->location); + return error_mark_node; + } /* Floating-point literals are only allowed in an integral constant expression if they are cast to an integral or enumeration type. */ @@ -3896,7 +3902,9 @@ cp_parser_unqualified_id (cp_parser* parser, /* We couldn't find a type with this name, so just accept it and check for a match at instantiation time. */ type_decl = cp_parser_identifier (parser); - return build_nt (BIT_NOT_EXPR, type_decl); + if (type_decl != error_mark_node) + type_decl = build_nt (BIT_NOT_EXPR, type_decl); + return type_decl; } } /* If an error occurred, assume that the name of the diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f6809f2bdf7..c5b675faa16 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4566,6 +4566,13 @@ convert_nontype_argument (tree type, tree expr) expr = convert_nontype_argument_function (type, expr); if (!expr || expr == error_mark_node) return expr; + + if (TREE_CODE (expr) != ADDR_EXPR) + { + error ("%qE is not a valid template argument for type %qT", expr, type); + error ("it must be the address of a function with external linkage"); + return NULL_TREE; + } } /* [temp.arg.nontype]/5, bullet 5 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index bca72ce452c..c58d40b9195 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -637,6 +637,20 @@ merge_types (tree t1, tree t2) code1 = TREE_CODE (t1); code2 = TREE_CODE (t2); + if (code1 != code2) + { + gcc_assert (code1 == TYPENAME_TYPE || code2 == TYPENAME_TYPE); + if (code1 == TYPENAME_TYPE) + { + t1 = resolve_typename_type (t1, /*only_current_p=*/true); + code1 = TREE_CODE (t1); + } + else + { + t2 = resolve_typename_type (t2, /*only_current_p=*/true); + code2 = TREE_CODE (t2); + } + } switch (code1) { @@ -4459,12 +4473,15 @@ cp_build_unary_op (enum tree_code code, tree xarg, int noconvert, arg = build1 (CONVERT_EXPR, type, arg); return arg; } - else if (DECL_MAIN_P (arg)) + else if (pedantic && DECL_MAIN_P (arg)) { /* ARM $3.4 */ - if (complain & tf_error) - permerror (input_location, "ISO C++ forbids taking address of function %<::main%>"); - else + /* Apparently a lot of autoconf scripts for C++ packages do this, + so only complain if -pedantic. */ + if (complain & (flag_pedantic_errors ? tf_error : tf_warning)) + pedwarn (input_location, OPT_pedantic, + "ISO C++ forbids taking address of function %<::main%>"); + else if (flag_pedantic_errors) return error_mark_node; } diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index a19a99920b6..526f780cddf 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -789,7 +789,8 @@ digest_init_r (tree type, tree init, bool nested) } /* Handle scalar types (including conversions) and references. */ - if (TREE_CODE (type) != COMPLEX_TYPE + if ((TREE_CODE (type) != COMPLEX_TYPE + || BRACE_ENCLOSED_INITIALIZER_P (init)) && (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE)) { tree *exp; diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1186064d029..4655ffe384a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + * gfortranspec.c (lang_specific_driver): Update copyright notice + dates. + 2009-01-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/38852 diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c index 4a7d02f11eb..0e5e7913e97 100644 --- a/gcc/fortran/gfortranspec.c +++ b/gcc/fortran/gfortranspec.c @@ -1,6 +1,6 @@ /* Specific flags and argument handling of the Fortran front-end. Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008 + 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -379,7 +379,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, case OPTION_version: printf ("GNU Fortran %s%s\n", pkgversion_string, version_string); - printf ("Copyright %s 2008 Free Software Foundation, Inc.\n\n", + printf ("Copyright %s 2009 Free Software Foundation, Inc.\n\n", _("(C)")); printf (_("GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\ You may redistribute copies of GNU Fortran\n\ diff --git a/gcc/function.c b/gcc/function.c index 0cf4d5d0000..7489dc915dd 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5477,6 +5477,9 @@ match_asm_constraints_1 (rtx insn, rtx *p_sets, int noutputs) char *end; int match, j; + if (*constraint == '%') + constraint++; + match = strtoul (constraint, &end, 10); if (end == constraint) continue; diff --git a/gcc/gcc.c b/gcc/gcc.c index e85d25de708..0a78282d87e 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3641,7 +3641,7 @@ process_command (int argc, const char **argv) /* translate_options () has turned --version into -fversion. */ printf (_("%s %s%s\n"), programname, pkgversion_string, version_string); - printf ("Copyright %s 2008 Free Software Foundation, Inc.\n", + printf ("Copyright %s 2009 Free Software Foundation, Inc.\n", _("(C)")); fputs (_("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c index ae8504669fb..174a02dafac 100644 --- a/gcc/gcov-dump.c +++ b/gcc/gcov-dump.c @@ -1,5 +1,5 @@ /* Dump a gcov file, for debugging use. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Nathan Sidwell <nathan@codesourcery.com> @@ -121,7 +121,7 @@ static void print_version (void) { printf ("gcov-dump %s%s\n", pkgversion_string, version_string); - printf ("Copyright (C) 2008 Free Software Foundation, Inc.\n"); + printf ("Copyright (C) 2009 Free Software Foundation, Inc.\n"); printf ("This is free software; see the source for copying conditions.\n" "There is NO warranty; not even for MERCHANTABILITY or \n" "FITNESS FOR A PARTICULAR PURPOSE.\n\n"); diff --git a/gcc/gcov.c b/gcc/gcov.c index a92ce91f2a3..61ac7ed6974 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -1,7 +1,7 @@ /* Gcov.c: prepend line execution counts and branch probabilities to a source file. Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by James E. Wilson of Cygnus Support. Mangled by Bob Manson of Cygnus Support. @@ -426,7 +426,7 @@ static void print_version (void) { fnotice (stdout, "gcov %s%s\n", pkgversion_string, version_string); - fprintf (stdout, "Copyright %s 2008 Free Software Foundation, Inc.\n", + fprintf (stdout, "Copyright %s 2009 Free Software Foundation, Inc.\n", _("(C)")); fnotice (stdout, _("This is free software; see the source for copying conditions.\n" diff --git a/gcc/graphite.c b/gcc/graphite.c index 3cb24b86b16..a4d5e36f132 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -69,6 +69,147 @@ gmp_cst_to_tree (tree type, Value v) return build_int_cst (type, value_get_si (v)); } +/* Returns true when BB is in REGION. */ + +static bool +bb_in_sese_p (basic_block bb, sese region) +{ + return pointer_set_contains (SESE_REGION_BBS (region), bb); +} + +/* Returns true when LOOP is in the SESE region R. */ + +static inline bool +loop_in_sese_p (struct loop *loop, sese r) +{ + return (bb_in_sese_p (loop->header, r) + && bb_in_sese_p (loop->latch, r)); +} + +/* For a USE in BB, if BB is outside REGION, mark the USE in the + SESE_LIVEIN and SESE_LIVEOUT sets. */ + +static void +sese_build_livein_liveouts_use (sese region, basic_block bb, tree use) +{ + unsigned ver; + basic_block def_bb; + + if (TREE_CODE (use) != SSA_NAME) + return; + + ver = SSA_NAME_VERSION (use); + def_bb = gimple_bb (SSA_NAME_DEF_STMT (use)); + if (!def_bb + || !bb_in_sese_p (def_bb, region) + || bb_in_sese_p (bb, region)) + return; + + if (!SESE_LIVEIN_VER (region, ver)) + SESE_LIVEIN_VER (region, ver) = BITMAP_ALLOC (NULL); + + bitmap_set_bit (SESE_LIVEIN_VER (region, ver), bb->index); + bitmap_set_bit (SESE_LIVEOUT (region), ver); +} + +/* Marks for rewrite all the SSA_NAMES defined in REGION and that are + used in BB that is outside of the REGION. */ + +static void +sese_build_livein_liveouts_bb (sese region, basic_block bb) +{ + gimple_stmt_iterator bsi; + edge e; + edge_iterator ei; + ssa_op_iter iter; + tree var; + + FOR_EACH_EDGE (e, ei, bb->succs) + for (bsi = gsi_start_phis (e->dest); !gsi_end_p (bsi); gsi_next (&bsi)) + sese_build_livein_liveouts_use (region, bb, + PHI_ARG_DEF_FROM_EDGE (gsi_stmt (bsi), e)); + + for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi)) + FOR_EACH_SSA_TREE_OPERAND (var, gsi_stmt (bsi), iter, SSA_OP_ALL_USES) + sese_build_livein_liveouts_use (region, bb, var); +} + +/* Build the SESE_LIVEIN and SESE_LIVEOUT for REGION. */ + +void +sese_build_livein_liveouts (sese region) +{ + basic_block bb; + + SESE_LIVEOUT (region) = BITMAP_ALLOC (NULL); + SESE_NUM_VER (region) = num_ssa_names; + SESE_LIVEIN (region) = XCNEWVEC (bitmap, SESE_NUM_VER (region)); + + FOR_EACH_BB (bb) + sese_build_livein_liveouts_bb (region, bb); +} + +/* Register basic blocks belonging to a region in a pointer set. */ + +static void +register_bb_in_sese (basic_block entry_bb, basic_block exit_bb, sese region) +{ + edge_iterator ei; + edge e; + basic_block bb = entry_bb; + + FOR_EACH_EDGE (e, ei, bb->succs) + { + if (!pointer_set_contains (SESE_REGION_BBS (region), e->dest) && + e->dest->index != exit_bb->index) + { + pointer_set_insert (SESE_REGION_BBS (region), e->dest); + register_bb_in_sese (e->dest, exit_bb, region); + } + } +} + +/* Builds a new SESE region from edges ENTRY and EXIT. */ + +sese +new_sese (edge entry, edge exit) +{ + sese res = XNEW (struct sese); + + SESE_ENTRY (res) = entry; + SESE_EXIT (res) = exit; + SESE_REGION_BBS (res) = pointer_set_create (); + register_bb_in_sese (entry->dest, exit->dest, res); + + SESE_LIVEOUT (res) = NULL; + SESE_NUM_VER (res) = 0; + SESE_LIVEIN (res) = NULL; + + return res; +} + +/* Deletes REGION. */ + +void +free_sese (sese region) +{ + int i; + + for (i = 0; i < SESE_NUM_VER (region); i++) + BITMAP_FREE (SESE_LIVEIN_VER (region, i)); + + if (SESE_LIVEIN (region)) + free (SESE_LIVEIN (region)); + + if (SESE_LIVEOUT (region)) + BITMAP_FREE (SESE_LIVEOUT (region)); + + pointer_set_destroy (SESE_REGION_BBS (region)); + XDELETE (region); +} + + + /* Debug the list of old induction variables for this SCOP. */ void @@ -701,7 +842,7 @@ dot_scop_1 (FILE *file, scop_p scop) if (bb == exit) fprintf (file, "%d [shape=box];\n", bb->index); - if (bb_in_scop_p (bb, scop)) + if (bb_in_sese_p (bb, SCOP_REGION (scop))) fprintf (file, "%d [color=red];\n", bb->index); FOR_EACH_EDGE (e, ei, bb->succs) @@ -755,7 +896,7 @@ dot_all_scops_1 (FILE *file) /* Select color for SCoP. */ for (i = 0; VEC_iterate (scop_p, current_scops, i, scop); i++) - if (bb_in_scop_p (bb, scop) + if (bb_in_sese_p (bb, SCOP_REGION (scop)) || (SCOP_EXIT (scop) == bb) || (SCOP_ENTRY (scop) == bb)) { @@ -818,7 +959,7 @@ dot_all_scops_1 (FILE *file) fprintf (file, " <TR><TD WIDTH=\"50\" BGCOLOR=\"%s\">", color); - if (!bb_in_scop_p (bb, scop)) + if (!bb_in_sese_p (bb, SCOP_REGION (scop))) fprintf (file, " ("); if (bb == SCOP_ENTRY (scop) @@ -831,7 +972,7 @@ dot_all_scops_1 (FILE *file) else fprintf (file, " %d ", bb->index); - if (!bb_in_scop_p (bb, scop)) + if (!bb_in_sese_p (bb, SCOP_REGION (scop))) fprintf (file, ")"); fprintf (file, "</TD></TR>\n"); @@ -887,7 +1028,8 @@ outermost_loop_in_scop (scop_p scop, basic_block bb) struct loop *nest; nest = bb->loop_father; - while (loop_outer (nest) && loop_in_scop_p (loop_outer (nest), scop)) + while (loop_outer (nest) + && loop_in_sese_p (loop_outer (nest), SCOP_REGION (scop))) nest = loop_outer (nest); return nest; @@ -1133,8 +1275,6 @@ new_graphite_bb (scop_p scop, basic_block bb) struct loop *nest = outermost_loop_in_scop (scop, bb); gimple_stmt_iterator gsi; - bitmap_set_bit (SCOP_BBS_B (scop), bb->index); - for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) find_data_references_in_stmt (nest, gsi_stmt (gsi), &drs); @@ -1273,138 +1413,6 @@ get_new_name_from_old_name (htab_t map, tree old_name) -/* Returns true when BB is in REGION. */ - -static bool -bb_in_sese_p (basic_block bb, sese region) -{ - return pointer_set_contains (SESE_REGION_BBS (region), bb); -} - -/* For a USE in BB, if BB is outside REGION, mark the USE in the - SESE_LIVEIN and SESE_LIVEOUT sets. */ - -static void -sese_build_livein_liveouts_use (sese region, basic_block bb, tree use) -{ - unsigned ver; - basic_block def_bb; - - if (TREE_CODE (use) != SSA_NAME) - return; - - ver = SSA_NAME_VERSION (use); - def_bb = gimple_bb (SSA_NAME_DEF_STMT (use)); - if (!def_bb - || !bb_in_sese_p (def_bb, region) - || bb_in_sese_p (bb, region)) - return; - - if (!SESE_LIVEIN_VER (region, ver)) - SESE_LIVEIN_VER (region, ver) = BITMAP_ALLOC (NULL); - - bitmap_set_bit (SESE_LIVEIN_VER (region, ver), bb->index); - bitmap_set_bit (SESE_LIVEOUT (region), ver); -} - -/* Marks for rewrite all the SSA_NAMES defined in REGION and that are - used in BB that is outside of the REGION. */ - -static void -sese_build_livein_liveouts_bb (sese region, basic_block bb) -{ - gimple_stmt_iterator bsi; - edge e; - edge_iterator ei; - ssa_op_iter iter; - tree var; - - FOR_EACH_EDGE (e, ei, bb->succs) - for (bsi = gsi_start_phis (e->dest); !gsi_end_p (bsi); gsi_next (&bsi)) - sese_build_livein_liveouts_use (region, bb, - PHI_ARG_DEF_FROM_EDGE (gsi_stmt (bsi), e)); - - for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi)) - FOR_EACH_SSA_TREE_OPERAND (var, gsi_stmt (bsi), iter, SSA_OP_ALL_USES) - sese_build_livein_liveouts_use (region, bb, var); -} - -/* Build the SESE_LIVEIN and SESE_LIVEOUT for REGION. */ - -void -sese_build_livein_liveouts (sese region) -{ - basic_block bb; - - SESE_LIVEOUT (region) = BITMAP_ALLOC (NULL); - SESE_NUM_VER (region) = num_ssa_names; - SESE_LIVEIN (region) = XCNEWVEC (bitmap, SESE_NUM_VER (region)); - - FOR_EACH_BB (bb) - sese_build_livein_liveouts_bb (region, bb); -} - -/* Register basic blocks belonging to a region in a pointer set. */ - -static void -register_bb_in_sese (basic_block entry_bb, basic_block exit_bb, sese region) -{ - edge_iterator ei; - edge e; - basic_block bb = entry_bb; - - FOR_EACH_EDGE (e, ei, bb->succs) - { - if (!pointer_set_contains (SESE_REGION_BBS (region), e->dest) && - e->dest->index != exit_bb->index) - { - pointer_set_insert (SESE_REGION_BBS (region), e->dest); - register_bb_in_sese (e->dest, exit_bb, region); - } - } -} - -/* Builds a new SESE region from edges ENTRY and EXIT. */ - -sese -new_sese (edge entry, edge exit) -{ - sese res = XNEW (struct sese); - - SESE_ENTRY (res) = entry; - SESE_EXIT (res) = exit; - SESE_REGION_BBS (res) = pointer_set_create (); - register_bb_in_sese (entry->dest, exit->dest, res); - - SESE_LIVEOUT (res) = NULL; - SESE_NUM_VER (res) = 0; - SESE_LIVEIN (res) = NULL; - - return res; -} - -/* Deletes REGION. */ - -void -free_sese (sese region) -{ - int i; - - for (i = 0; i < SESE_NUM_VER (region); i++) - BITMAP_FREE (SESE_LIVEIN_VER (region, i)); - - if (SESE_LIVEIN (region)) - free (SESE_LIVEIN (region)); - - if (SESE_LIVEOUT (region)) - BITMAP_FREE (SESE_LIVEOUT (region)); - - pointer_set_destroy (SESE_REGION_BBS (region)); - XDELETE (region); -} - - - /* Creates a new scop starting with ENTRY. */ static scop_p @@ -1417,7 +1425,6 @@ new_scop (edge entry, edge exit) SCOP_REGION (scop) = new_sese (entry, exit); SCOP_BBS (scop) = VEC_alloc (graphite_bb_p, heap, 3); SCOP_OLDIVS (scop) = VEC_alloc (name_tree, heap, 3); - SCOP_BBS_B (scop) = BITMAP_ALLOC (NULL); SCOP_LOOPS (scop) = BITMAP_ALLOC (NULL); SCOP_LOOP_NEST (scop) = VEC_alloc (loop_p, heap, 3); SCOP_ADD_PARAMS (scop) = true; @@ -1446,7 +1453,6 @@ free_scop (scop_p scop) free_graphite_bb (gb); VEC_free (graphite_bb_p, heap, SCOP_BBS (scop)); - BITMAP_FREE (SCOP_BBS_B (scop)); BITMAP_FREE (SCOP_LOOPS (scop)); VEC_free (loop_p, heap, SCOP_LOOP_NEST (scop)); @@ -1632,6 +1638,12 @@ scopdet_basic_block_info (basic_block bb, VEC (sd_region, heap) **scops, result.next = NULL; result.exits = false; result.last = bb; + + /* Mark bbs terminating a SESE region difficult, if they start + a condition. */ + if (VEC_length (edge, bb->succs) > 1) + result.difficult = true; + break; case GBB_SIMPLE: @@ -2410,13 +2422,13 @@ build_scop_loop_nests (scop_p scop) struct loop *loop0, *loop1; FOR_EACH_BB (bb) - if (bb_in_scop_p (bb, scop)) + if (bb_in_sese_p (bb, SCOP_REGION (scop))) { struct loop *loop = bb->loop_father; /* Only add loops if they are completely contained in the SCoP. */ if (loop->header == bb - && bb_in_scop_p (loop->latch, scop)) + && bb_in_sese_p (loop->latch, SCOP_REGION (scop))) { if (!scop_record_loop (scop, loop)) return false; @@ -2442,6 +2454,40 @@ build_scop_loop_nests (scop_p scop) return true; } +/* Calculate the number of loops around LOOP in the SCOP. */ + +static inline int +nb_loops_around_loop_in_scop (struct loop *l, scop_p scop) +{ + int d = 0; + + for (; loop_in_sese_p (l, SCOP_REGION (scop)); d++, l = loop_outer (l)); + + return d; +} + +/* Calculate the number of loops around GB in the current SCOP. */ + +int +nb_loops_around_gb (graphite_bb_p gb) +{ + return nb_loops_around_loop_in_scop (gbb_loop (gb), GBB_SCOP (gb)); +} + +/* Returns the dimensionality of an enclosing loop iteration domain + with respect to enclosing SCoP for a given data reference REF. The + returned dimensionality is homogeneous (depth of loop nest + number + of SCoP parameters + const). */ + +int +ref_nb_loops (data_reference_p ref) +{ + loop_p loop = loop_containing_stmt (DR_STMT (ref)); + scop_p scop = DR_SCOP (ref); + + return nb_loops_around_loop_in_scop (loop, scop) + scop_nb_params (scop) + 2; +} + /* Build dynamic schedules for all the BBs. */ static void @@ -3086,13 +3132,14 @@ build_loop_iteration_domains (scop_p scop, struct loop *loop, else gcc_unreachable (); - if (loop->inner && loop_in_scop_p (loop->inner, scop)) + if (loop->inner && loop_in_sese_p (loop->inner, SCOP_REGION (scop))) build_loop_iteration_domains (scop, loop->inner, cstr, nb_outer_loops + 1); /* Only go to the next loops, if we are not at the outermost layer. These have to be handled seperately, as we can be sure, that the chain at this layer will be connected. */ - if (nb_outer_loops != 0 && loop->next && loop_in_scop_p (loop->next, scop)) + if (nb_outer_loops != 0 && loop->next && loop_in_sese_p (loop->next, + SCOP_REGION (scop))) build_loop_iteration_domains (scop, loop->next, outer_cstr, nb_outer_loops); for (i = 0; VEC_iterate (graphite_bb_p, SCOP_BBS (scop), i, gb); i++) @@ -3368,7 +3415,7 @@ build_scop_conditions_1 (VEC (gimple, heap) **conditions, VEC (basic_block, heap) *dom; /* Make sure we are in the SCoP. */ - if (!bb_in_scop_p (bb, scop)) + if (!bb_in_sese_p (bb, SCOP_REGION (scop))) return true; if (bb_contains_non_iv_scalar_phi_nodes (bb)) @@ -3562,7 +3609,7 @@ build_scop_iteration_domain (scop_p scop) /* Build cloog loop for all loops, that are in the uppermost loop layer of this SCoP. */ for (i = 0; VEC_iterate (loop_p, SCOP_LOOP_NEST (scop), i, loop); i++) - if (!loop_in_scop_p (loop_outer (loop), scop)) + if (!loop_in_sese_p (loop_outer (loop), SCOP_REGION (scop))) { /* The outermost constraints is a matrix that has: -first column: eq/ineq boolean @@ -4138,7 +4185,7 @@ expand_scalar_variables_ssa_name (tree op0, basic_block bb, else { if (gimple_code (def_stmt) != GIMPLE_ASSIGN - || !bb_in_scop_p (gimple_bb (def_stmt), scop)) + || !bb_in_sese_p (gimple_bb (def_stmt), SCOP_REGION (scop))) return get_new_name_from_old_name (map, op0); var0 = gimple_assign_rhs1 (def_stmt); @@ -5142,7 +5189,7 @@ get_vdef_before_scop (scop_p scop, tree name, sbitmap visited) basic_block def_bb = gimple_bb (def_stmt); if (!def_bb - || !bb_in_scop_p (def_bb, scop)) + || !bb_in_sese_p (def_bb, SCOP_REGION (scop))) return name; if (TEST_BIT (visited, def_bb->index)) @@ -5396,7 +5443,6 @@ gloog (scop_p scop, struct clast_stmt *stmt) { basic_block bb = SESE_EXIT (SCOP_REGION (scop))->dest; SESE_EXIT (SCOP_REGION (scop)) = split_block_after_labels (bb); - bitmap_set_bit (SCOP_BBS_B (scop), bb->index); pointer_set_insert (SESE_REGION_BBS (SCOP_REGION (scop)), bb); } @@ -6031,7 +6077,7 @@ limit_scops (void) continue; for (j = 0; VEC_iterate (loop_p, SCOP_LOOP_NEST (scop), j, loop); j++) - if (!loop_in_scop_p (loop_outer (loop), scop)) + if (!loop_in_sese_p (loop_outer (loop), SCOP_REGION (scop))) { sd_region open_scop; open_scop.entry = loop->header; diff --git a/gcc/graphite.h b/gcc/graphite.h index 76f26c8728a..1063a01110c 100644 --- a/gcc/graphite.h +++ b/gcc/graphite.h @@ -23,6 +23,8 @@ along with GCC; see the file COPYING3. If not see #include "tree-data-ref.h" +int ref_nb_loops (data_reference_p); + typedef struct graphite_bb *graphite_bb_p; DEF_VEC_P(graphite_bb_p); DEF_VEC_ALLOC_P (graphite_bb_p, heap); @@ -216,6 +218,8 @@ gbb_loop (struct graphite_bb *gbb) return GBB_BB (gbb)->loop_father; } +int nb_loops_around_gb (graphite_bb_p); + /* Calculate the number of loops around GB in the current SCOP. Only works if GBB_DOMAIN is built. */ @@ -313,13 +317,11 @@ struct scop /* A SCOP is defined as a SESE region. */ sese region; - /* All the basic blocks in this scop. They have extra information - attached to them, in the graphite_bb structure. */ + /* All the basic blocks in this scop that contain memory references + and that will be represented as statements in the polyhedral + representation. */ VEC (graphite_bb_p, heap) *bbs; - /* Set for a basic block index when it belongs to this SCOP. */ - bitmap bbs_b; - lambda_vector static_schedule; /* Parameters used within the SCOP. */ @@ -349,7 +351,6 @@ struct scop }; #define SCOP_BBS(S) S->bbs -#define SCOP_BBS_B(S) S->bbs_b #define SCOP_REGION(S) S->region /* SCOP_ENTRY bb dominates all the bbs of the scop. SCOP_EXIT bb post-dominates all the bbs of the scop. SCOP_EXIT potentially @@ -572,59 +573,4 @@ scop_gimple_loop_depth (scop_p scop, loop_p loop) return depth; } -/* Static inline function prototypes. */ - -static inline unsigned scop_nb_params (scop_p scop); - -/* Returns true when BB is in SCOP. */ - -static inline bool -bb_in_scop_p (basic_block bb, scop_p scop) -{ - return bitmap_bit_p (SCOP_BBS_B (scop), bb->index); -} - -/* Returns true when LOOP is in SCOP. */ - -static inline bool -loop_in_scop_p (struct loop *loop, scop_p scop) -{ - return (bb_in_scop_p (loop->header, scop) - && bb_in_scop_p (loop->latch, scop)); -} - -/* Calculate the number of loops around LOOP in the SCOP. */ - -static inline int -nb_loops_around_loop_in_scop (struct loop *l, scop_p scop) -{ - int d = 0; - - for (; loop_in_scop_p (l, scop); d++, l = loop_outer (l)); - - return d; -} - -/* Calculate the number of loops around GB in the current SCOP. */ - -static inline int -nb_loops_around_gb (graphite_bb_p gb) -{ - return nb_loops_around_loop_in_scop (gbb_loop (gb), GBB_SCOP (gb)); -} - -/* Returns the dimensionality of an enclosing loop iteration domain - with respect to enclosing SCoP for a given data reference REF. The - returned dimensionality is homogeneous (depth of loop nest + number - of SCoP parameters + const). */ - -static inline int -ref_nb_loops (data_reference_p ref) -{ - loop_p loop = loop_containing_stmt (DR_STMT (ref)); - scop_p scop = DR_SCOP (ref); - - return nb_loops_around_loop_in_scop (loop, scop) + scop_nb_params (scop) + 2; -} - #endif /* GCC_GRAPHITE_H */ diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index dd696e689da..7726ca483d1 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + * jcf-dump.c (version): Update copyright notice dates. + 2009-01-16 Richard Guenther <rguenther@suse.de> PR tree-optimization/38835 diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c index 7615f97b7f2..8008dd2073f 100644 --- a/gcc/java/jcf-dump.c +++ b/gcc/java/jcf-dump.c @@ -2,7 +2,7 @@ Functionally similar to Sun's javap. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GCC. @@ -1167,7 +1167,7 @@ static void version (void) { printf ("jcf-dump %s%s\n\n", pkgversion_string, version_string); - printf ("Copyright %s 2008 Free Software Foundation, Inc.\n", _("(C)")); + printf ("Copyright %s 2009 Free Software Foundation, Inc.\n", _("(C)")); printf (_("This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n")); exit (0); diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index 9c0be87bc87..8b8345fe5fd 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -824,7 +824,7 @@ find_invariant_insn (rtx insn, bool always_reached, bool always_executed) return; /* We cannot make trapping insn executed, unless it was executed before. */ - if (may_trap_after_code_motion_p (PATTERN (insn)) && !always_reached) + if (may_trap_or_fault_p (PATTERN (insn)) && !always_reached) return; depends_on = BITMAP_ALLOC (NULL); diff --git a/gcc/mips-tdump.c b/gcc/mips-tdump.c index 2164a6e4b48..df902a6deb4 100644 --- a/gcc/mips-tdump.c +++ b/gcc/mips-tdump.c @@ -1,6 +1,6 @@ /* Read and manage MIPS symbol tables from object modules. Copyright (C) 1991, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2003, 2004, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by hartzell@boulder.colorado.edu, Rewritten by meissner@osf.org. @@ -1414,7 +1414,7 @@ main (int argc, char **argv) if (version) { printf ("mips-tdump %s%s\n", pkgversion_string, version_string); - fputs ("Copyright (C) 2008 Free Software Foundation, Inc.\n", stdout); + fputs ("Copyright (C) 2009 Free Software Foundation, Inc.\n", stdout); fputs ("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n", stdout); diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c index b984f47cb3f..f8bb492b381 100644 --- a/gcc/mips-tfile.c +++ b/gcc/mips-tfile.c @@ -3,7 +3,8 @@ in the form of comments (the mips assembler does not support assembly access to debug information). Copyright (C) 1991, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. Contributed by Michael Meissner (meissner@cygnus.com). This file is part of GCC. @@ -4780,7 +4781,7 @@ main (int argc, char **argv) if (version) { printf (_("mips-tfile %s%s\n"), pkgversion_string, version_string); - fputs ("Copyright (C) 2008 Free Software Foundation, Inc.\n", stdout); + fputs ("Copyright (C) 2009 Free Software Foundation, Inc.\n", stdout); fputs (_("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), stdout); diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index 6b6c206c4db..0df60c81682 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2009-02-03 Joseph S. Myers <joseph@codesourcery.com> + + * fi.po: Update. + 2009-01-12 Joseph S. Myers <joseph@codesourcery.com> * sv.po: Update. diff --git a/gcc/po/fi.po b/gcc/po/fi.po index 30f099086ac..3c144af4193 100644 --- a/gcc/po/fi.po +++ b/gcc/po/fi.po @@ -2,11 +2,10 @@ # Copyright (C) 2008 Free Software Foundation, Inc. # This file is distributed under the same license as the GCC package. # Ville Koskinen <ville.koskinen@iki.fi>, 2005. -# Lauri Nurmi <lanurmi@iki.fi>, 2007-2008. +# Lauri Nurmi <lanurmi@iki.fi>, 2007-2009. # # Joitakin termejä, joille voi miettiä (parempaa) suomennosta: # -# (non-)integral type -> ? # statement -> ? # variadic -> ? # nimike -> ? @@ -18,12 +17,15 @@ # case label -> ? # temporary (substantiivi) -> väliaikamitä? # +# Uusia: +# pass -> välittää vai antaa +# msgid "" msgstr "" -"Project-Id-Version: gcc 4.3.0\n" +"Project-Id-Version: gcc 4.4-b20081121\n" "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n" "POT-Creation-Date: 2008-11-18 20:02+0000\n" -"PO-Revision-Date: 2008-08-30 23:46+0300\n" +"PO-Revision-Date: 2009-02-03 22:16+0200\n" "Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n" "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n" "MIME-Version: 1.0\n" @@ -522,12 +524,12 @@ msgstr "collect2-versio %s" #: collect2.c:1385 #, c-format msgid "%d constructor(s) found\n" -msgstr "" +msgstr "löytyi %d muodostin(ta)\n" #: collect2.c:1386 #, c-format msgid "%d destructor(s) found\n" -msgstr "" +msgstr "löytyi %d hajotin(ta)\n" #: collect2.c:1387 #, c-format @@ -873,7 +875,7 @@ msgstr " --help Näytä tämä ohje\n" #: gcc.c:3230 #, fuzzy msgid " --target-help Display target specific command line options\n" -msgstr " --target-help Näytä aargh" +msgstr " --target-help Näytä " #: gcc.c:3231 msgid " --help={target|optimizers|warnings|undocumented|params}[,{[^]joined|[^]separate}]\n" @@ -14707,27 +14709,27 @@ msgstr "" #: c.opt:72 msgid "Generate make dependencies" -msgstr "" +msgstr "Luo make-riippuvuudet" #: c.opt:76 msgid "Generate make dependencies and compile" -msgstr "" +msgstr "Luo make-riippuvuudet ja käännä" #: c.opt:80 msgid "Write dependency output to the given file" -msgstr "" +msgstr "Kirjoita riippuvuustuloste annettuun tiedostoon" #: c.opt:84 msgid "Treat missing header files as generated files" -msgstr "" +msgstr "Käsittele puuttuvia otsikkotiedostoja luotavina tiedostoina" #: c.opt:88 msgid "Like -M but ignore system header files" -msgstr "" +msgstr "Kuten -M, mutta ilman järjestelmän otsikkotiedostoja" #: c.opt:92 msgid "Like -MD but ignore system header files" -msgstr "" +msgstr "Kuten -MD, mutta ilman järjestelmän otsikkotiedostoja" #: c.opt:96 msgid "Generate phony targets for all headers" @@ -14767,11 +14769,12 @@ msgstr "" #: c.opt:132 msgid "Warn about casting functions to incompatible types" -msgstr "" +msgstr "Varoita funktioiden muunnoksista epäyhteensopiviksi tyypeiksi" #: c.opt:136 +#, fuzzy msgid "Warn when a built-in preprocessor macro is undefined or redefined" -msgstr "" +msgstr "Varoita sisäisen makron ..." #: c.opt:140 msgid "Warn about C constructs that are not in the common subset of C and C++" @@ -14806,9 +14809,8 @@ msgid "Warn for implicit type conversions that may change a value" msgstr "" #: c.opt:172 -#, fuzzy msgid "Warn for implicit type conversions between signed and unsigned integers" -msgstr "etumerkillisen ja etumerkittömän kokonaislukulausekkeen välinen vertailu" +msgstr "Varoita implisiittisistä tyyppimuunnoksista etumerkillisten ja etumerkittömien kokonaislukujen välillä" #: c.opt:176 msgid "Warn when all constructors and destructors are private" @@ -14824,7 +14826,7 @@ msgstr "" #: c.opt:188 msgid "Warn about compile-time integer division by zero" -msgstr "" +msgstr "Varoita käännösaikaisesta nollalla jaosta" #: c.opt:192 msgid "Warn about violations of Effective C++ style rules" @@ -14902,19 +14904,19 @@ msgstr "tyyppimuunnos erisuuruisesta kokonaisluvusta osoittimeksi" #: c.opt:277 msgid "Warn about invalid uses of the \"offsetof\" macro" -msgstr "" +msgstr "Varoita ”offsetof”-makron virheellisestä käytöstä" #: c.opt:281 msgid "Warn about PCH files that are found but not used" -msgstr "" +msgstr "Varoita löytyneistä PCH-tiedostoista, joita ei käytetä" #: c.opt:285 msgid "Do not warn about using \"long long\" when -pedantic" -msgstr "" +msgstr "Älä varoita ”long long”-tyypistä -pedantic-tilassa" #: c.opt:289 msgid "Warn about suspicious declarations of \"main\"" -msgstr "" +msgstr "Varoita epäilyttävistä ”main”-funktion esittelyistä" #: c.opt:293 msgid "Warn about possibly missing braces around initializers" @@ -14942,11 +14944,11 @@ msgstr "" #: c.opt:317 msgid "Warn about global functions without prototypes" -msgstr "" +msgstr "Varoita globaaleista funktioista, joilla ei ole prototyyppiä" #: c.opt:321 msgid "Warn about use of multi-character character constants" -msgstr "" +msgstr "Varoita monimerkkisistä merkkivakioista" #: c.opt:325 msgid "Warn about \"extern\" declarations not at file scope" @@ -14986,7 +14988,7 @@ msgstr "" #: c.opt:361 msgid "Warn about overloaded virtual function names" -msgstr "" +msgstr "Varoita ylikuormitetuista virtuaalifunktioiden nimistä" #: c.opt:365 msgid "Warn about overriding initializers without side effects" @@ -15145,7 +15147,7 @@ msgstr "Tunnista sisäiset funktiot" #: c.opt:523 msgid "Check the return value of new" -msgstr "Tarkista new'n paluuarvo" +msgstr "Tarkista new’n paluuarvo" #: c.opt:527 msgid "Allow the arguments of the '?' operator to have different types" @@ -15242,7 +15244,7 @@ msgstr "Älä varoita Microsoft-laajennosten käytöstä" #: c.opt:647 msgid "Generate code for NeXT (Apple Mac OS X) runtime environment" -msgstr "" +msgstr "Luo koodia NeXT (Apple Mac OS X) -ajoympäristöön" #: c.opt:651 msgid "Assume that receivers of Objective-C messages may be nil" @@ -15320,7 +15322,7 @@ msgstr "" #: c.opt:741 msgid "Make \"char\" signed by default" -msgstr "" +msgstr "Tee ”char”-tyypistä oletuksena etumerkillinen" #: c.opt:748 msgid "Display statistics accumulated during compilation" @@ -15462,10 +15464,10 @@ msgstr "" msgid "Conform to the ISO 1998 C++ standard" msgstr "Noudata ISO 1998 C++ -standardia" +# Viesti ei jatku englanniksikaan pidemmälle. #: c.opt:920 -#, fuzzy msgid "Conform to the ISO 1998 C++ standard, with extensions that are likely to" -msgstr "Noudata ISO 1998 C++ -standardia GNU-laajennoksineen" +msgstr "Noudata ISO 1998 C++ -standardia laajennoksineen, jotka todennäköisesti" #: c.opt:927 c.opt:962 msgid "Conform to the ISO 1990 C standard" @@ -15594,7 +15596,7 @@ msgstr "Käsittele annettu varoitus virheenä" #: common.opt:111 msgid "Print extra (possibly unwanted) warnings" -msgstr "" +msgstr "Näytä ylimääräisiä (mahdollisesti ei-toivottuja) varoituksia" #: common.opt:115 msgid "Exit on the first error occurred" @@ -15687,7 +15689,7 @@ msgstr "" #: common.opt:218 msgid "Warn when a function is unused" -msgstr "" +msgstr "Varoita käyttämättömistä funktioista" #: common.opt:222 msgid "Warn when a label is unused" @@ -15695,7 +15697,7 @@ msgstr "" #: common.opt:226 msgid "Warn when a function parameter is unused" -msgstr "" +msgstr "Varoita käyttämättömistä funktion parametreista" #: common.opt:230 msgid "Warn when an expression value is unused" @@ -16919,9 +16921,9 @@ msgid "%<va_start%> used in function with fixed args" msgstr "funktiota %<va_start%> käytetty funktiossa, jolla on kiinteä määrä argumentteja" #: builtins.c:11606 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "wrong number of arguments to function %<va_start%>" -msgstr "liian vähän argumentteja funktiolle %<va_start%>" +msgstr "väärä määrä argumentteja funktiolle %<va_start%>" #. Evidently an out of date version of <stdarg.h>; can't validate #. va_start's second argument, but can still work as intended. @@ -16931,9 +16933,9 @@ msgid "%<__builtin_next_arg%> called without an argument" msgstr "funktiota %<__builtin_next_arg%> kutsuttu ilman argumenttia" #: builtins.c:11624 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "wrong number of arguments to function %<__builtin_next_arg%>" -msgstr "liian vähän argumentteja funktiolle %<va_start%>" +msgstr "väärä määrä argumentteja funktiolle %<__builtin_next_arg%>" #. FIXME: Sometimes with the tree optimizers we can get the #. not the last argument even though the user used the last @@ -17079,7 +17081,7 @@ msgstr "negatiivinen kokonaisluku muunnettu implisiittisesti etumerkittömään #: c-common.c:1572 #, gcc-internal-format msgid "conversion of unsigned constant value to negative integer" -msgstr "" +msgstr "etumerkittömän vakion muunnos negatiiviseksi kokonaisluvuksi" #: c-common.c:1599 #, fuzzy, gcc-internal-format @@ -17159,12 +17161,12 @@ msgstr "vertailu on aina tosi johtuen tietotyypin rajallisesta arvoalueesta" #: c-common.c:3171 #, gcc-internal-format msgid "comparison of unsigned expression >= 0 is always true" -msgstr "vertailu X\"etumerkitön lauseke >= 0X\" on aina tosi" +msgstr "vertailu ”etumerkitön lauseke >= 0” on aina tosi" #: c-common.c:3181 #, gcc-internal-format msgid "comparison of unsigned expression < 0 is always false" -msgstr "vertailu X\"etumerkitön lauseke < 0X\" on aina epätosi" +msgstr "vertailu ”etumerkitön lauseke < 0” on aina epätosi" #: c-common.c:3222 #, gcc-internal-format @@ -17276,11 +17278,10 @@ msgstr "%Jcase-arvo %qs ei ole luetellussa tyypissä" msgid "%Jcase value %qs not in enumerated type %qT" msgstr "%Jcase-arvo %qs ei ole luetellussa tyypissä %qT" -# XXX #: c-common.c:4858 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%Hswitch missing default case" -msgstr "%Hswitch-lauseesta puuttuu default-nimike" +msgstr "%Hswitch-lauseesta puuttuu default-tapaus" #: c-common.c:4929 #, gcc-internal-format @@ -17293,9 +17294,9 @@ msgid "taking the address of a label is non-standard" msgstr "nimikkeen osoitteen ottaminen ei ole standardia" #: c-common.c:5118 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%qE attribute ignored for field of type %qT" -msgstr "%qs-attribuuttia ei huomioida ei-luokkatyypeille" +msgstr "%qE-attribuuttia ei huomioida %qT-tyyppiselle kentälle" #: c-common.c:5129 c-common.c:5148 c-common.c:5166 c-common.c:5193 #: c-common.c:5220 c-common.c:5246 c-common.c:5265 c-common.c:5289 @@ -17659,7 +17660,7 @@ msgstr "ei-liukulukuargumentti funktiolle %qs" #: c-common.c:7532 #, gcc-internal-format msgid "%Hignoring return value of %qD, declared with attribute warn_unused_result" -msgstr "%Hpaluuarvoa %qD ei huomioida, esitelty attribuutilla warn_unused_result" +msgstr "%H%qD:n paluuarvoa ei huomioida, esitelty attribuutilla warn_unused_result" #: c-common.c:7536 #, gcc-internal-format @@ -17818,9 +17819,9 @@ msgid "label %q+D defined but not used" msgstr "%Jnimike %qD määritelty, mutta ei käytetty" #: c-common.c:8192 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "label %q+D declared but not defined" -msgstr "%Jnimike %qD esitelty, mutta ei määritelty" +msgstr "nimike %qD esitelty muttei määritelty" #: c-common.c:8212 #, gcc-internal-format @@ -17951,9 +17952,9 @@ msgid "previous declaration of %q+D was here" msgstr "%J%qD:n edellinen esittely oli täällä" #: c-decl.c:1167 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%q+D redeclared as different kind of symbol" -msgstr "%J%qD esitelty uudelleen erityyppisenä symbolina" +msgstr "%q+D esitelty uudelleen erityyppisenä symbolina" #: c-decl.c:1171 #, gcc-internal-format @@ -17961,9 +17962,9 @@ msgid "built-in function %q+D declared as non-function" msgstr "sisäinen funktio %qD esitelty ei-funktiona" #: c-decl.c:1174 c-decl.c:1294 c-decl.c:1960 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "declaration of %q+D shadows a built-in function" -msgstr "%J%qD:n esittely varjostaa sisäänrakennettua funktiota" +msgstr "%q+D:n esittely varjostaa sisäänrakennetun funktion" #: c-decl.c:1183 #, fuzzy, gcc-internal-format @@ -17990,24 +17991,24 @@ msgstr "%J ristiriitaiset tyyppimääreet %qD:lle" #. Allow OLDDECL to continue in use. #: c-decl.c:1269 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redefinition of typedef %q+D" -msgstr "%Jtypedef %qD määritelty uudelleen" +msgstr "typedef %q+D määritelty uudelleen" #: c-decl.c:1320 c-decl.c:1422 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redefinition of %q+D" -msgstr "%J%qD määritelty uudelleen" +msgstr "%q+D määritelty uudelleen" #: c-decl.c:1355 c-decl.c:1460 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "static declaration of %q+D follows non-static declaration" -msgstr "%J%qD esitelty staattisena, edellinen esittely ei-staattinen" +msgstr "%q+D esitelty staattisena, edellinen esittely ei-staattinen" #: c-decl.c:1365 c-decl.c:1373 c-decl.c:1450 c-decl.c:1457 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "non-static declaration of %q+D follows static declaration" -msgstr "%J%qD esitelty ei-staattisena, edellinen esittely staattinen" +msgstr "%q+D esitelty ei-staattisena, edellinen esittely staattinen" #: c-decl.c:1389 #, gcc-internal-format @@ -18045,9 +18046,9 @@ msgid "redeclaration of %q+D with no linkage" msgstr "%J%qD esitelty uudelleen ilman linkitystä" #: c-decl.c:1498 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redeclaration of %q+D with different visibility (old visibility preserved)" -msgstr "%J%qD esitelty uudelleen erilaisella näkyvyydellä (vanha näkyvyys säilytetty)" +msgstr "%q+D esitelty uudelleen erilaisella näkyvyydellä (vanha näkyvyys säilytetty)" #: c-decl.c:1509 #, fuzzy, gcc-internal-format @@ -18060,9 +18061,9 @@ msgid "declaration of %q+D with attribute noinline follows inline declaration " msgstr "%J%qD esitelty attribuutilla noinline, edellinen esittely on avoin " #: c-decl.c:1534 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "redefinition of parameter %q+D" -msgstr "%Jparametri %qD määritelty uudelleen" +msgstr "parametri %q+D määritelty uudelleen" #: c-decl.c:1561 #, fuzzy, gcc-internal-format @@ -18116,9 +18117,9 @@ msgid "incompatible implicit declaration of function %qD" msgstr "funktion %qD yhteensopimaton implisiittinen esittely" #: c-decl.c:2453 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%H%qE undeclared here (not in a function)" -msgstr "%qE esittelemätön täällä (ei funktiossa)" +msgstr "%H%qE esittelemättä täällä (ei funktiossa)" #: c-decl.c:2458 #, gcc-internal-format @@ -22592,9 +22593,9 @@ msgid "function returns an aggregate" msgstr "" #: function.c:4480 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "unused parameter %q+D" -msgstr "%Jkäyttämätön muuttuja %qD" +msgstr "käyttämätön muuttuja %q+D" #: gcc.c:1298 #, gcc-internal-format @@ -27355,7 +27356,7 @@ msgstr "" #: cp/call.c:2849 #, gcc-internal-format msgid "conversion from %qT to %qT is ambiguous" -msgstr "" +msgstr "muunnos tyypistä %qT tyyppiin %qT on monitulkintainen" #: cp/call.c:3004 cp/call.c:3024 cp/call.c:3088 #, gcc-internal-format @@ -27532,13 +27533,13 @@ msgstr "" #: cp/call.c:4853 #, gcc-internal-format msgid "cannot pass objects of non-POD type %q#T through %<...%>; call will abort at runtime" -msgstr "" +msgstr "%q#T-tyyppisiä epä-POD-objekteja ei voi välittää %<...%>:n kautta, ohjelma tulee keskeytymään ajettaessa" #. Undefined behavior [expr.call] 5.2.2/7. #: cp/call.c:4881 #, gcc-internal-format msgid "cannot receive objects of non-POD type %q#T through %<...%>; call will abort at runtime" -msgstr "" +msgstr "%q#T-tyyppisiä epä-POD-objekteja ei voi vastaanottaa %<...%>:n kautta, ohjelma tulee keskeytymään ajettaessa" #: cp/call.c:4929 #, gcc-internal-format @@ -27648,7 +27649,7 @@ msgstr "Java-luokalla %qT ei voi olla hajotinta" #: cp/class.c:977 #, gcc-internal-format msgid "Java class %qT cannot have an implicit non-trivial destructor" -msgstr "" +msgstr "Java-luokalla %qT ei voi olla implisiittistä epätriviaalia hajotinta" #: cp/class.c:1078 #, fuzzy, gcc-internal-format @@ -27763,9 +27764,9 @@ msgid "protected member %q+#D in anonymous struct" msgstr "" #: cp/class.c:2699 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "bit-field %q+#D with non-integral type" -msgstr "bittikentän %qs leveys ei ole kokonaislukuvakio" +msgstr "bittikenttä %+q#D ei ole kokonaislukutyyppinen" #: cp/class.c:2712 #, gcc-internal-format @@ -27933,9 +27934,9 @@ msgid "redefinition of %q#T" msgstr "%q#T uudelleenmääritelty" #: cp/class.c:5347 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%q#T has virtual functions and accessible non-virtual destructor" -msgstr "luokalla %q#T on virtuaalifunktioita mutta epävirtuaalinen hajotin" +msgstr "luokalla %q#T on virtuaalifunktioita ja käytettävissä oleva epävirtuaalinen hajotin" #: cp/class.c:5449 #, gcc-internal-format @@ -28027,10 +28028,11 @@ msgstr "" msgid "cannot convert %qE from type %qT to type %qT" msgstr "" +# Tämä esiintynee esim. const char* → char* -muunnoksessa. #: cp/cvt.c:452 #, gcc-internal-format msgid "conversion from %qT to %qT discards qualifiers" -msgstr "" +msgstr "muunnos tyypistä %qT tyyppiin %qT ei säilytä tyyppimääreitä" #: cp/cvt.c:470 cp/typeck.c:5386 #, gcc-internal-format @@ -28242,17 +28244,18 @@ msgstr "%J%qD:lle ei ole aiempaa esittelyä" #: cp/decl.c:1453 #, gcc-internal-format msgid "declaration of namespace %qD conflicts with" -msgstr "" +msgstr "nimiavaruuden %qD esittely on ristiriidassa" +# Oletetaan että tämä on edellisen jatkoa. #: cp/decl.c:1454 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "previous declaration of namespace %q+D here" -msgstr "%J%qD:n edellinen esittely oli täällä" +msgstr "täällä olevan %q+D:n edellisen esittelyn kanssa" #: cp/decl.c:1465 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%q+#D previously defined here" -msgstr "%Jviimeksi käytetty täällä" +msgstr "%q+#D määritelty aiemmin täällä" #. Prototype decl follows defn w/o prototype. #: cp/decl.c:1475 @@ -28442,12 +28445,12 @@ msgstr "" #: cp/decl.c:3755 #, gcc-internal-format msgid "%Jan anonymous struct cannot have function members" -msgstr "" +msgstr "%Janonyymillä structilla ei voi olla funktiojäseniä" #: cp/decl.c:3757 #, gcc-internal-format msgid "%Jan anonymous union cannot have function members" -msgstr "" +msgstr "%Janonyymillä unionilla ei voi olla funktiojäseniä" #: cp/decl.c:3775 #, gcc-internal-format @@ -28477,7 +28480,7 @@ msgstr "C++:n sisäinen tietotyyppi %qT määritelty uudelleen" #: cp/decl.c:3847 #, gcc-internal-format msgid "missing type-name in typedef-declaration" -msgstr "" +msgstr "tyypin nimi puuttuu typedef-esittelystä" #: cp/decl.c:3854 #, gcc-internal-format @@ -28656,7 +28659,7 @@ msgstr "" #: cp/decl.c:4610 #, gcc-internal-format msgid "uninitialized const %qD" -msgstr "" +msgstr "alustamaton const %qD" #: cp/decl.c:4722 #, gcc-internal-format @@ -28921,17 +28924,17 @@ msgstr "" #: cp/decl.c:7111 #, gcc-internal-format msgid "ISO C++ forbids initialization of member constant %qD of non-integral type %qT" -msgstr "" +msgstr "ISO C++ kieltää epäkokonaislukutyyppiä %2$qT olevan vakiojäsenen %1$qD alustamisen" #: cp/decl.c:7136 #, gcc-internal-format msgid "size of array %qD has non-integral type %qT" -msgstr "" +msgstr "taulukon %qD koolla on epäkokonaislukutyyppi %qT" #: cp/decl.c:7138 #, gcc-internal-format msgid "size of array has non-integral type %qT" -msgstr "" +msgstr "taulukon koolla on epäkokonaislukutyyppi %qT" #: cp/decl.c:7181 #, gcc-internal-format @@ -28956,12 +28959,12 @@ msgstr "ISO C++ kieltää nollan kokoiset taulukot" #: cp/decl.c:7200 #, gcc-internal-format msgid "size of array %qD is not an integral constant-expression" -msgstr "" +msgstr "taulukon %qD koko ei ole kokonaislukutyyppinen vakiolauseke" #: cp/decl.c:7203 #, gcc-internal-format msgid "size of array is not an integral constant-expression" -msgstr "" +msgstr "taulukon koko ei ole kokonaislukutyyppinen vakiolauseke" #: cp/decl.c:7209 #, gcc-internal-format @@ -28981,7 +28984,7 @@ msgstr "" #: cp/decl.c:7253 #, gcc-internal-format msgid "overflow in array dimension" -msgstr "" +msgstr "taulukon koon ylivuoto" #: cp/decl.c:7334 #, gcc-internal-format @@ -30020,7 +30023,7 @@ msgstr "" #: cp/decl2.c:1380 #, gcc-internal-format msgid "%<operator new%> must return type %qT" -msgstr "" +msgstr "%<operator new%>:n on palautettava tyyppi %qT" #. [basic.stc.dynamic.allocation] #. @@ -30034,17 +30037,17 @@ msgstr "%<va_start%>-funktion toinen parametri ei ole viimeinen nimetty argument #: cp/decl2.c:1407 #, gcc-internal-format msgid "%<operator new%> takes type %<size_t%> (%qT) as first parameter" -msgstr "" +msgstr "%<operator new%>:n ensimmäisen parametrin tyypin on oltava %<size_t%> (%qT)" #: cp/decl2.c:1436 #, gcc-internal-format msgid "%<operator delete%> must return type %qT" -msgstr "" +msgstr "%<operator delete%>:n on palautettava tyyppi %qT" #: cp/decl2.c:1445 #, gcc-internal-format msgid "%<operator delete%> takes type %qT as first parameter" -msgstr "" +msgstr "%<operator delete%>:n ensimmäisen parametrin tyypin on oltava %qT" #: cp/decl2.c:2122 #, gcc-internal-format @@ -30470,7 +30473,7 @@ msgstr "" #: cp/lex.c:319 #, gcc-internal-format msgid "junk at end of #pragma %s" -msgstr "" +msgstr "roskaa #pragma %s:n lopussa" #: cp/lex.c:326 #, gcc-internal-format @@ -30882,14 +30885,14 @@ msgid "%H%<::%E%> %s" msgstr "" #: cp/parser.c:2131 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%H%qE %s" -msgstr "%qE %s" +msgstr "%H%qE %s" #: cp/parser.c:2166 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%H%<long long long%> is too long for GCC" -msgstr "%<long long long%> on liian pitkä GCC:lle" +msgstr "%H%<long long long%> on liian pitkä GCC:lle" #: cp/parser.c:2170 #, gcc-internal-format @@ -30904,12 +30907,12 @@ msgstr "ylimääräinen %qs" #: cp/parser.c:2234 #, gcc-internal-format msgid "%Hnew types may not be defined in a return type" -msgstr "" +msgstr "%Huusia tyyppejä ei voi määritellä paluutyypissä" #: cp/parser.c:2236 #, gcc-internal-format msgid "(perhaps a semicolon is missing after the definition of %qT)" -msgstr "" +msgstr "(mahdollisesti %qT:n määrittelyn perästä puuttuu puolipiste)" #: cp/parser.c:2256 #, fuzzy, gcc-internal-format @@ -31009,9 +31012,9 @@ msgid "%H%qD used without template parameters" msgstr "%J%qD:n edellinen esittely oli täällä" #: cp/parser.c:4114 cp/parser.c:14760 cp/parser.c:17038 -#, gcc-internal-format +#, fuzzy, gcc-internal-format msgid "%Hreference to %qD is ambiguous" -msgstr "" +msgstr "muunnos tyypistä %qT tyyppiin %qT on monitulkintainen" #: cp/parser.c:4160 cp/pt.c:5599 #, gcc-internal-format @@ -31297,9 +31300,9 @@ msgid "use %<%T::%D%> instead of %<%T::%D%> to name the constructor in a qualifi msgstr "" #: cp/parser.c:13512 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%H%qD is a namespace" -msgstr "%qD on nimiavaruus" +msgstr "%H%qD on nimiavaruus" #: cp/parser.c:13587 #, fuzzy, gcc-internal-format @@ -31556,9 +31559,9 @@ msgid "%Hcollapsed loops not perfectly nested" msgstr "" #: cp/parser.c:21817 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "%Hjunk at end of %<#pragma GCC pch_preprocess%>" -msgstr "roskaa ilmaisun %<#pragma GCC pch_preprocess%> lopussa" +msgstr "%Hroskaa ilmaisun %<#pragma GCC pch_preprocess%> lopussa" #: cp/parser.c:21821 #, fuzzy, gcc-internal-format @@ -32288,7 +32291,7 @@ msgstr "" #: cp/pt.c:14534 #, gcc-internal-format msgid "%s %+#T" -msgstr "" +msgstr "%s %+#T" #: cp/pt.c:14557 cp/pt.c:14640 #, gcc-internal-format @@ -32320,7 +32323,6 @@ msgstr "" msgid "duplicate explicit instantiation of %q#D" msgstr "" -# semi-fuzzy; onko metodi tässä luokan jäsenfunktio ja yllä muu funktio? #: cp/pt.c:14650 cp/pt.c:14742 #, fuzzy, gcc-internal-format msgid "ISO C++ 1998 forbids the use of %<extern%> on explicit instantiations" @@ -32401,7 +32403,7 @@ msgstr "" #: cp/rtti.c:288 #, gcc-internal-format msgid "cannot use typeid with -fno-rtti" -msgstr "" +msgstr "typeid:tä ei voi käyttää -fno-rtti-valitsimen kanssa" #: cp/rtti.c:294 #, gcc-internal-format @@ -32881,9 +32883,9 @@ msgid "invalid application of %qs to a member function" msgstr "" #: cp/typeck.c:1374 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "invalid application of %<sizeof%> to a bit-field" -msgstr "epäkelpo %<sizeof%>-avainsanan soveltaminen funktiotyyppiin" +msgstr "epäkelpo %<sizeof%>-avainsanan soveltaminen bittikenttään" #: cp/typeck.c:1382 #, fuzzy, gcc-internal-format @@ -33162,14 +33164,14 @@ msgid "taking address of temporary" msgstr "" #: cp/typeck.c:4360 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "ISO C++ forbids incrementing an enum" -msgstr "ISO C kieltää sisäkkäiset funktiot" +msgstr "ISO C++ kieltää enumin lisäyksen" #: cp/typeck.c:4361 -#, fuzzy, gcc-internal-format +#, gcc-internal-format msgid "ISO C++ forbids decrementing an enum" -msgstr "ISO C++ kieltää muuttujan %qs esittelyn ilman tyyppiä" +msgstr "ISO C++ kieltää enumin vähentämisen" #: cp/typeck.c:4377 #, fuzzy, gcc-internal-format @@ -33294,7 +33296,7 @@ msgstr "ISO C++ kieltää tyyppimuunnoksen funktio-osoittimen ja olio-osoittimen #: cp/typeck.c:5496 #, gcc-internal-format msgid "invalid cast from type %qT to type %qT" -msgstr "" +msgstr "virheellinen muunnos tyypistä %qT tyyppiin %qT" #: cp/typeck.c:5552 #, gcc-internal-format @@ -33369,7 +33371,7 @@ msgstr "" #: cp/typeck.c:6544 #, gcc-internal-format msgid "cannot convert %qT to %qT for argument %qP to %qD" -msgstr "" +msgstr "ei voi muuntaa tyypistä %1$qT tyyppiin %2$qT %4$qD:n argumentiksi %3$qP" # XXX # %s on "initialization", jota EI VOI suomentaa tällä hetkellä. @@ -33439,7 +33441,7 @@ msgstr "arvo return-lauseelle funktiossa, jonka paluutyyppi on ”void”" #: cp/typeck.c:6850 #, gcc-internal-format msgid "%<operator new%> must not return NULL unless it is declared %<throw()%> (or -fcheck-new is in effect)" -msgstr "" +msgstr "%<operator new%> ei saa palauttaa NULLia ellei esittely ole %<throw()%> (tai -fcheck-new ole voimassa)" #: cp/typeck2.c:54 #, gcc-internal-format @@ -34391,7 +34393,7 @@ msgstr "%qs-nimikkeen kaksoisesittely" #: objc/objc-act.c:8426 #, gcc-internal-format msgid "%J%s %<%c%s%>" -msgstr "" +msgstr "%J%s %<%c%s%>" #: objc/objc-act.c:8757 #, gcc-internal-format @@ -34498,13 +34500,11 @@ msgstr "%J%qD:n esittely varjostaa edellistä paikallista" #~ msgid "Can't open included file '%s'" #~ msgstr "syötetiedoston avaaminen ei onnistu: %s" -#, fuzzy #~ msgid "too few arguments to function %qs" -#~ msgstr "liian vähän argumentteja funktiolle %qE" +#~ msgstr "liian vähän argumentteja funktiolle %qs" -#, fuzzy #~ msgid "too many arguments to function %qs" -#~ msgstr "liian monta argumenttia funktiolle %qE" +#~ msgstr "liian monta argumenttia funktiolle %qs" #, fuzzy #~ msgid "%q+D declared inline after being called" diff --git a/gcc/rtl.h b/gcc/rtl.h index 5c2a89edec9..eaedb009e85 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1767,7 +1767,6 @@ extern int volatile_refs_p (const_rtx); extern int volatile_insn_p (const_rtx); extern int may_trap_p_1 (const_rtx, unsigned); extern int may_trap_p (const_rtx); -extern int may_trap_after_code_motion_p (const_rtx); extern int may_trap_or_fault_p (const_rtx); extern int inequality_comparisons_p (const_rtx); extern rtx replace_rtx (rtx, rtx, rtx); diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 5d9df2cc089..cc7775ffd63 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -263,14 +263,68 @@ rtx_varies_p (const_rtx x, bool for_alias) alignment machines. */ static int -rtx_addr_can_trap_p_1 (const_rtx x, enum machine_mode mode, bool unaligned_mems) +rtx_addr_can_trap_p_1 (const_rtx x, HOST_WIDE_INT offset, HOST_WIDE_INT size, + enum machine_mode mode, bool unaligned_mems) { enum rtx_code code = GET_CODE (x); + if (STRICT_ALIGNMENT + && unaligned_mems + && GET_MODE_SIZE (mode) != 0) + { + HOST_WIDE_INT actual_offset = offset; +#ifdef SPARC_STACK_BOUNDARY_HACK + /* ??? The SPARC port may claim a STACK_BOUNDARY higher than + the real alignment of %sp. However, when it does this, the + alignment of %sp+STACK_POINTER_OFFSET is STACK_BOUNDARY. */ + if (SPARC_STACK_BOUNDARY_HACK + && (x == stack_pointer_rtx || x == hard_frame_pointer_rtx)) + actual_offset -= STACK_POINTER_OFFSET; +#endif + + return actual_offset % GET_MODE_SIZE (mode) != 0; + } + switch (code) { case SYMBOL_REF: - return SYMBOL_REF_WEAK (x); + if (SYMBOL_REF_WEAK (x)) + return 1; + if (!CONSTANT_POOL_ADDRESS_P (x)) + { + tree decl; + HOST_WIDE_INT decl_size; + + if (offset < 0) + return 1; + if (size == 0) + size = GET_MODE_SIZE (mode); + if (size == 0) + return offset != 0; + + /* If the size of the access or of the symbol is unknown, + assume the worst. */ + decl = SYMBOL_REF_DECL (x); + + /* Else check that the access is in bounds. TODO: restructure + expr_size/lhd_expr_size/int_expr_size and just use the latter. */ + if (!decl) + decl_size = -1; + else if (DECL_P (decl) && DECL_SIZE_UNIT (decl)) + decl_size = (host_integerp (DECL_SIZE_UNIT (decl), 0) + ? tree_low_cst (DECL_SIZE_UNIT (decl), 0) + : -1); + else if (TREE_CODE (decl) == STRING_CST) + decl_size = TREE_STRING_LENGTH (decl); + else if (TYPE_SIZE_UNIT (TREE_TYPE (decl))) + decl_size = int_size_in_bytes (TREE_TYPE (decl)); + else + decl_size = -1; + + return (decl_size <= 0 ? offset != 0 : offset + size > decl_size); + } + + return 0; case LABEL_REF: return 0; @@ -289,54 +343,37 @@ rtx_addr_can_trap_p_1 (const_rtx x, enum machine_mode mode, bool unaligned_mems) return 1; case CONST: - return rtx_addr_can_trap_p_1 (XEXP (x, 0), mode, unaligned_mems); + return rtx_addr_can_trap_p_1 (XEXP (x, 0), offset, size, + mode, unaligned_mems); case PLUS: /* An address is assumed not to trap if: - - it is an address that can't trap plus a constant integer, + - it is the pic register plus a constant. */ + if (XEXP (x, 0) == pic_offset_table_rtx && CONSTANT_P (XEXP (x, 1))) + return 0; + + /* - or it is an address that can't trap plus a constant integer, with the proper remainder modulo the mode size if we are considering unaligned memory references. */ - if (!rtx_addr_can_trap_p_1 (XEXP (x, 0), mode, unaligned_mems) - && GET_CODE (XEXP (x, 1)) == CONST_INT) - { - HOST_WIDE_INT offset; - - if (!STRICT_ALIGNMENT - || !unaligned_mems - || GET_MODE_SIZE (mode) == 0) - return 0; - - offset = INTVAL (XEXP (x, 1)); - -#ifdef SPARC_STACK_BOUNDARY_HACK - /* ??? The SPARC port may claim a STACK_BOUNDARY higher than - the real alignment of %sp. However, when it does this, the - alignment of %sp+STACK_POINTER_OFFSET is STACK_BOUNDARY. */ - if (SPARC_STACK_BOUNDARY_HACK - && (XEXP (x, 0) == stack_pointer_rtx - || XEXP (x, 0) == hard_frame_pointer_rtx)) - offset -= STACK_POINTER_OFFSET; -#endif - - return offset % GET_MODE_SIZE (mode) != 0; - } - - /* - or it is the pic register plus a constant. */ - if (XEXP (x, 0) == pic_offset_table_rtx && CONSTANT_P (XEXP (x, 1))) + if (GET_CODE (XEXP (x, 1)) == CONST_INT + && !rtx_addr_can_trap_p_1 (XEXP (x, 0), offset + INTVAL (XEXP (x, 1)), + size, mode, unaligned_mems)) return 0; return 1; case LO_SUM: case PRE_MODIFY: - return rtx_addr_can_trap_p_1 (XEXP (x, 1), mode, unaligned_mems); + return rtx_addr_can_trap_p_1 (XEXP (x, 1), offset, size, + mode, unaligned_mems); case PRE_DEC: case PRE_INC: case POST_DEC: case POST_INC: case POST_MODIFY: - return rtx_addr_can_trap_p_1 (XEXP (x, 0), mode, unaligned_mems); + return rtx_addr_can_trap_p_1 (XEXP (x, 0), offset, size, + mode, unaligned_mems); default: break; @@ -351,7 +388,7 @@ rtx_addr_can_trap_p_1 (const_rtx x, enum machine_mode mode, bool unaligned_mems) int rtx_addr_can_trap_p (const_rtx x) { - return rtx_addr_can_trap_p_1 (x, VOIDmode, false); + return rtx_addr_can_trap_p_1 (x, 0, 0, VOIDmode, false); } /* Return true if X is an address that is known to not be zero. */ @@ -2170,17 +2207,10 @@ side_effects_p (const_rtx x) return 0; } -enum may_trap_p_flags -{ - MTP_UNALIGNED_MEMS = 1, - MTP_AFTER_MOVE = 2 -}; /* Return nonzero if evaluating rtx X might cause a trap. - (FLAGS & MTP_UNALIGNED_MEMS) controls whether nonzero is returned for - unaligned memory accesses on strict alignment machines. If - (FLAGS & AFTER_MOVE) is true, returns nonzero even in case the expression - cannot trap at its current location, but it might become trapping if moved - elsewhere. */ + FLAGS controls how to consider MEMs. A nonzero means the context + of the access may have changed from the original, such that the + address may have become invalid. */ int may_trap_p_1 (const_rtx x, unsigned flags) @@ -2188,7 +2218,11 @@ may_trap_p_1 (const_rtx x, unsigned flags) int i; enum rtx_code code; const char *fmt; - bool unaligned_mems = (flags & MTP_UNALIGNED_MEMS) != 0; + + /* We make no distinction currently, but this function is part of + the internal target-hooks ABI so we keep the parameter as + "unsigned flags". */ + bool code_changed = flags != 0; if (x == 0) return 0; @@ -2223,14 +2257,17 @@ may_trap_p_1 (const_rtx x, unsigned flags) /* Memory ref can trap unless it's a static var or a stack slot. */ case MEM: if (/* MEM_NOTRAP_P only relates to the actual position of the memory - reference; moving it out of condition might cause its address - become invalid. */ - !(flags & MTP_AFTER_MOVE) - && MEM_NOTRAP_P (x) - && (!STRICT_ALIGNMENT || !unaligned_mems)) - return 0; - return - rtx_addr_can_trap_p_1 (XEXP (x, 0), GET_MODE (x), unaligned_mems); + reference; moving it out of context such as when moving code + when optimizing, might cause its address to become invalid. */ + code_changed + || !MEM_NOTRAP_P (x)) + { + HOST_WIDE_INT size = MEM_SIZE (x) ? INTVAL (MEM_SIZE (x)) : 0; + return rtx_addr_can_trap_p_1 (XEXP (x, 0), 0, size, + GET_MODE (x), code_changed); + } + + return 0; /* Division by a non-constant might trap. */ case DIV: @@ -2328,15 +2365,6 @@ may_trap_p (const_rtx x) return may_trap_p_1 (x, 0); } -/* Return nonzero if evaluating rtx X might cause a trap, when the expression - is moved from its current location by some optimization. */ - -int -may_trap_after_code_motion_p (const_rtx x) -{ - return may_trap_p_1 (x, MTP_AFTER_MOVE); -} - /* Same as above, but additionally return nonzero if evaluating rtx X might cause a fault. We define a fault for the purpose of this function as a erroneous execution condition that cannot be encountered during the normal @@ -2380,7 +2408,7 @@ may_trap_after_code_motion_p (const_rtx x) int may_trap_or_fault_p (const_rtx x) { - return may_trap_p_1 (x, MTP_UNALIGNED_MEMS); + return may_trap_p_1 (x, 1); } /* Return nonzero if X contains a comparison that is not either EQ or NE, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 828af3fad7a..33ba5fadec3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,96 @@ +2009-02-05 Daniel Berlin <dberlin@dberlin.org> + + * gcc.c-torture/execute/pr39100.c: New. + +2009-02-05 Joseph Myers <joseph@codesourcery.com> + + PR c/35435 + * gcc.dg/tls/diag-6.c: New test. + +2009-02-04 H.J. Lu <hongjiu.lu@intel.com> + + AVX Programming Reference (January, 2009) + * gcc.target/i386/avx-vpclmulqdq.c: New. + * gcc.target/i386/pclmul-avx-check.h: Likewise. + + * gcc.target/i386/i386.exp (check_effective_target_vpclmul): New. + + * gcc.target/i386/pclmulqdq.c (CHECK_H): New. + (TEST): Likewise. + Include CHECK_H instead of "pclmul-check.h". + (pclmul_test): Renamed to ... + (TEST): This. + +2009-02-04 Jakub Jelinek <jakub@redhat.com> + + PR c++/39095 + * g++.dg/abi/mangle31.C: New test. + +2009-02-03 Joseph Myers <joseph@codesourcery.com> + + PR c/29129 + * c90-arraydecl-1.c: Do not expect error for [*] in abstract + declarator. + * vla-6.c: Likewise. Expect warning not error for [*] lexically + inside function prototype but not part of parameter declarator. + * vla-11.c: New test. + +2009-02-03 Jason Merrill <jason@redhat.com> + + * g++.dg/warn/main-4.C: New test. + * g++.old-deja/g++.bugs/900227_01.C: Remove &main warnings. + +2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com> + + PR C++/36607 + * g++.dg/expr/cast10.C: New test. + +2009-02-03 Joseph Myers <joseph@codesourcery.com> + + PR c/35433 + * gcc.dg/init-bad-6.c: New test. + +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + PR target/35318 + * gcc.c-torture/compile/pr35318.c: New test. + + PR inline-asm/39059 + * gcc.dg/nofixed-point-2.c: New test. + * g++.dg/ext/fixed1.C: Adjust expected diagnostics. + * g++.dg/ext/fixed2.C: Likewise. + * g++.dg/other/error25.C: Likewise. + * g++.dg/lookup/crash7.C: Likewise. + * g++.dg/cpp0x/decltype-38655.C: Likewise. + + PR c++/39056 + * g++.dg/cpp0x/initlist13.C: New test. + +2009-02-03 Paolo Bonzini <bonzini@gnu.org> + + PR c++/36897 + * g++.dg/template/func2.C: New test. + + PR c++/37314 + * g++.dg/template/typename15.C: New. + * g++.dg/template/typename16.C: New. + +2009-02-03 Janis Johnson <janis187@us.ibm.com> + Ben Elliston <bje@au.ibm.com> + + PR c/39034 + * gcc.dg/dfp/pr39034.c: New test. + +2009-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + PR testsuite/38263 + * gcc.dg/ipa/ipacost-2.c: Add -fpie when pic. + +2009-02-02 Jason Merrill <jason@redhat.com> + + PR c++/39054 + * g++.dg/parse/dtor14.C: New test. + 2009-02-02 Jakub Jelinek <jakub@redhat.com> * lib/target-supports.exp diff --git a/gcc/testsuite/g++.dg/abi/mangle31.C b/gcc/testsuite/g++.dg/abi/mangle31.C new file mode 100644 index 00000000000..4be2e0b03fc --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/mangle31.C @@ -0,0 +1,35 @@ +// PR c++/39095 +// { dg-do compile } + +struct B +{ + int b; +}; + +struct A +{ + B *operator->(); + A (); + B b; +}; + +A::A () +{ +} + +B * +A::operator->() +{ + return &b; +} + +A a; + +int +foo () +{ + return a->b; +} + +// { dg-final { scan-assembler "_ZN1AptEv" } } +// { dg-final { scan-assembler-not "_ZN1AdtEv" } } diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C b/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C index 689be9fa474..3b8455bc13f 100644 --- a/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C +++ b/gcc/testsuite/g++.dg/cpp0x/decltype-38655.C @@ -1,4 +1,4 @@ // PR c++/38655 // { dg-options "" } -__decltype(0r)* p = 1; // { dg-error "unnamed-fixed" } +__decltype(0r)* p = 1; // { dg-error "not supported|invalid" } diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist13.C b/gcc/testsuite/g++.dg/cpp0x/initlist13.C new file mode 100644 index 00000000000..98af92bca53 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/initlist13.C @@ -0,0 +1,5 @@ +// PR c++/39056 +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +__complex__ int i ({0}); // { dg-error "cannot convert" } diff --git a/gcc/testsuite/g++.dg/expr/cast10.C b/gcc/testsuite/g++.dg/expr/cast10.C new file mode 100644 index 00000000000..cd3e0fc3c27 --- /dev/null +++ b/gcc/testsuite/g++.dg/expr/cast10.C @@ -0,0 +1,10 @@ +// { dg-do compile } +// This used to error out because we would try to convert m to a short. + + +struct a {}; +void b() { + int a::*m; + a *c; + short p = reinterpret_cast<char*>(&(c->*m)) - reinterpret_cast<char*>(c); +} diff --git a/gcc/testsuite/g++.dg/ext/fixed1.C b/gcc/testsuite/g++.dg/ext/fixed1.C index 9ee27808f46..5a479d6891a 100644 --- a/gcc/testsuite/g++.dg/ext/fixed1.C +++ b/gcc/testsuite/g++.dg/ext/fixed1.C @@ -3,6 +3,6 @@ template<int> struct A {}; -template<typename> struct B : A<sizeof(0=0r)> {}; +template<typename> struct B : A<sizeof(0=0r)> {}; // { dg-error "not supported" } -template<typename> struct C : A<sizeof(0=0r)> {}; +template<typename> struct C : A<sizeof(0=0r)> {}; // { dg-error "not supported" } diff --git a/gcc/testsuite/g++.dg/ext/fixed2.C b/gcc/testsuite/g++.dg/ext/fixed2.C index a4766eb794c..1ee5538a172 100644 --- a/gcc/testsuite/g++.dg/ext/fixed2.C +++ b/gcc/testsuite/g++.dg/ext/fixed2.C @@ -3,5 +3,5 @@ void foo() { - throw 0r; + throw 0r; // { dg-error "not supported" } } diff --git a/gcc/testsuite/g++.dg/parse/dtor14.C b/gcc/testsuite/g++.dg/parse/dtor14.C new file mode 100644 index 00000000000..6ba7a5b6c32 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/dtor14.C @@ -0,0 +1,8 @@ +// PR c++/39054 + +struct A {}; + +template<typename> void foo() +{ + A().~int(); // { dg-error "expected" } +} diff --git a/gcc/testsuite/g++.dg/template/func2.C b/gcc/testsuite/g++.dg/template/func2.C new file mode 100644 index 00000000000..b0f691d242b --- /dev/null +++ b/gcc/testsuite/g++.dg/template/func2.C @@ -0,0 +1,12 @@ +// { dg-do compile } + +typedef void (*fptr)(); +fptr zeroptr = 0; +template<typename T, fptr F> struct foo { }; +template<typename T> struct foo<T,zeroptr> { }; +// { dg-error "not a valid template argument" "not valid" { target *-*-* } 6 } +// { dg-error "must be the address" "must be the address " { target *-*-* } 6 } + +// The rest is needed to trigger the ICE in 4.0 to 4.3: +void f() { } +foo<int,&f> m_foo; diff --git a/gcc/testsuite/g++.dg/template/typename15.C b/gcc/testsuite/g++.dg/template/typename15.C new file mode 100644 index 00000000000..fece885ea78 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/typename15.C @@ -0,0 +1,12 @@ +// PR37314 ice-on-valid-code, from w.doeringer +template <typename T> +class Cdeque { + typedef T *pointer; + class iterator { + typedef typename Cdeque<T>::pointer pointer; + pointer operator->(); + }; +}; +template <typename T> T* Cdeque<T>::iterator::operator->() { } + + diff --git a/gcc/testsuite/g++.dg/template/typename16.C b/gcc/testsuite/g++.dg/template/typename16.C new file mode 100644 index 00000000000..45da11162db --- /dev/null +++ b/gcc/testsuite/g++.dg/template/typename16.C @@ -0,0 +1,25 @@ +// PR37314 rejects-valid, from w.doeringer +template <typename T> +struct A { + typedef __PTRDIFF_TYPE__ difference_type; + struct B { + typedef typename A<T>::difference_type difference_type; + difference_type operator-(B const&) const; + T t; + }; +}; +// + +template <typename T> +typename A<T>::B::difference_type A<T>::B::operator-(B const&) const { + return -1; +} + +// +int main() { + A<int>::B i; + ++i.t; + return 0; +} + + diff --git a/gcc/testsuite/g++.dg/warn/main-4.C b/gcc/testsuite/g++.dg/warn/main-4.C new file mode 100644 index 00000000000..ad2dd709827 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/main-4.C @@ -0,0 +1,5 @@ +// This pattern is used by a lot of autoconf scripts, so don't +// complain about it unless -pedantic. +// { dg-options "" } + +int main () { main (); return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C index 2bd4f3d76c2..b441eff650a 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900227_01.C @@ -33,9 +33,7 @@ int main (); -short s = (short) &main; // { dg-error "taking address" "addr" { xfail h8*-*-* xstormy16-*-* } } -// { dg-error "loses precision" "lose" { xfail h8*-*-* xstormy16-*-* } 36 } -char c = (char) &main; // { dg-error "taking address" } -// { dg-error "loses precision" "lose" { target *-*-* } 38 } +short s = (short) &main; // { dg-error "loses precision" "lose" { xfail h8*-*-* xstormy16-*-* } } +char c = (char) &main; // { dg-error "loses precision" "lose" } int main () { return 0; } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35318.c b/gcc/testsuite/gcc.c-torture/compile/pr35318.c new file mode 100644 index 00000000000..85bb3626986 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr35318.c @@ -0,0 +1,8 @@ +/* PR target/35318 */ + +void +foo () +{ + double x = 4, y; + __asm__ volatile ("" : "=r,r" (x), "=r,r" (y) : "%0,0" (x), "m,r" (8)); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr39100.c b/gcc/testsuite/gcc.c-torture/execute/pr39100.c new file mode 100644 index 00000000000..5cb9e25d437 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr39100.c @@ -0,0 +1,65 @@ +/* Bad PTA results (incorrect store handling) was causing us to delete + *na = 0 store. */ + +typedef struct E +{ + int p; + struct E *n; +} *EP; + +typedef struct C +{ + EP x; + short cn, cp; +} *CP; + +__attribute__((noinline)) CP +foo (CP h, EP x) +{ + EP pl = 0, *pa = &pl; + EP nl = 0, *na = &nl; + EP n; + + while (x) + { + n = x->n; + if ((x->p & 1) == 1) + { + h->cp++; + *pa = x; + pa = &((*pa)->n); + } + else + { + h->cn++; + *na = x; + na = &((*na)->n); + } + x = n; + } + *pa = nl; + *na = 0; + h->x = pl; + return h; +} + +int +main (void) +{ + struct C c = { 0, 0, 0 }; + struct E e[2] = { { 0, &e[1] }, { 1, 0 } }; + EP p; + + foo (&c, &e[0]); + if (c.cn != 1 || c.cp != 1) + __builtin_abort (); + if (c.x != &e[1]) + __builtin_abort (); + if (e[1].n != &e[0]) + __builtin_abort (); + if (e[0].n) + __builtin_abort (); + return 0; +} + + diff --git a/gcc/testsuite/gcc.dg/c90-arraydecl-1.c b/gcc/testsuite/gcc.dg/c90-arraydecl-1.c index 97dc1eee663..2b7eadbf615 100644 --- a/gcc/testsuite/gcc.dg/c90-arraydecl-1.c +++ b/gcc/testsuite/gcc.dg/c90-arraydecl-1.c @@ -10,7 +10,7 @@ void foo0 (int a, int b[*]); /* { dg-error "ISO C90" "\[*\] not in C90" } */ void foo1 (int, int [*]); /* { dg-error "ISO C90" "\[*\] not in C90" } */ -/* { dg-error "allowed" "\'\[*\]\' not allowed in other than a declaration" { target *-*-* } 12 } */ + /* Use of static and type qualifiers (not allowed with abstract declarators) is a C99 feature. */ diff --git a/gcc/testsuite/gcc.dg/dfp/pr39034.c b/gcc/testsuite/gcc.dg/dfp/pr39034.c new file mode 100644 index 00000000000..6a261c9ddc2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/dfp/pr39034.c @@ -0,0 +1,111 @@ +/* { dg-do run } */ +/* { dg-options "-std=gnu99 -O" } */ + +/* DFP TR 24732 == WG14 / N1176, N1312 */ +/* Based on a test from Fred Tydeman. */ + +extern void abort (void); +int failures = 0; + +#ifdef DBG +#include <stdio.h> +#define FAILURE(MSG) { printf ("line %d: %s\n", __LINE__, MSG); failures++; } +#else +#define FAILURE(MSG) failures++; +#endif + + +/* Test runtime computations. */ + +void +runtime32 (void) +{ + volatile float v1 = 28.f, v2 = 3.f, v3 = 9.f, v4 = 31.f, v5 = 3.f, v6 = 10.f; + float b32 = (float)((v1/v2-v3) - (v4/v5-v6)); + _Decimal32 d32 = (float)((v1/v2-v3) - (v4/v5-v6)); + + if (b32) + FAILURE ("runtime: b32 should be zero") + if (d32) + FAILURE ("runtime: d32 should be zero") +} + +void +runtime64 (void) +{ + volatile double v1 = 28., v2 = 3., v3 = 9., v4 = 31., v5 = 3., v6 = 10.; + double b64 = (double)((v1/v2-v3) - (v4/v5-v6)); + _Decimal64 d64 = (double)((v1/v2-v3) - (v4/v5-v6)); + + if (b64) + FAILURE ("runtime: b64 should be zero") + if (d64) + FAILURE ("runtime: d64 should be zero") +} + +void +runtime128 (void) +{ + volatile long double v1 = 28.l, v2 = 3.l, v3 = 9.l, + v4 = 31.l, v5 = 3.l, v6 = 10.l; + long double b128 = (long double)((v1/v2-v3) - (v4/v5-v6)); + _Decimal128 d128 = (long double)((v1/v2-v3) - (v4/v5-v6)); + + if (b128) + FAILURE ("runtime: b128 should be zero") + if (d128) + FAILURE ("runtime: d128 should be zero") +} + +/* Test constant folding. */ + +void +fold32 (void) +{ + double d32 = (float)((28.f/3.f-9.f) - (31.f/3.f-10.f)); + _Decimal32 b32 = (float)((28.f/3.f-9.f) - (31.f/3.f-10.f)); + + if (b32) + FAILURE ("fold: b32 should be zero") + if (d32) + FAILURE ("fold: d32 should be zero") +} + +void +fold64 (void) +{ + double b64 = (double)((28./3.-9.) - (31./3.-10.)); + _Decimal64 d64 = (double)((28./3.-9.) - (31./3.-10.)); + + if (b64) + FAILURE ("fold: b64 should be zero") + if (d64) + FAILURE ("fold: d64 should be zero") +} + +void +fold128 (void) +{ + long double b128 = (long double)((28./3.-9.) - (31./3.-10.)); + _Decimal128 d128 = (long double)((28./3.-9.) - (31./3.-10.)); + + if (b128) + FAILURE ("fold: b128 should be zero") + if (d128) + FAILURE ("fold: d128 should be zero") +} + +int +main () +{ + runtime32 (); + runtime64 (); + runtime128 (); + fold32 (); + fold64 (); + fold128 (); + + if (failures != 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/graphite/scop-19.c b/gcc/testsuite/gcc.dg/graphite/scop-19.c new file mode 100644 index 00000000000..3ad49971bc0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/scop-19.c @@ -0,0 +1,35 @@ +/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */ +typedef unsigned int __uint32_t; +typedef __uint32_t __size_t; +typedef __size_t size_t; +struct demangle_component +{ + union + { + } u; +}; +enum d_builtin_type_print +{ + D_PRINT_VOID +}; +struct d_growable_string +{ + size_t alc; +}; +d_growable_string_resize (struct d_growable_string *dgs, size_t need) +{ + size_t newalc; + newalc = dgs->alc > 0 ? dgs->alc : 2; + while (newalc < need) + newalc <<= 1; +} +d_growable_string_append_buffer (struct d_growable_string *dgs, + const char *s, size_t l) +{ + size_t need; + if (need > dgs->alc) + d_growable_string_resize (dgs, need); +} +/* { dg-final { scan-tree-dump-times "number of SCoPs: 0" 2 "graphite"} } */ +/* { dg-final { cleanup-tree-dump "graphite" } } */ + diff --git a/gcc/testsuite/gcc.dg/init-bad-6.c b/gcc/testsuite/gcc.dg/init-bad-6.c new file mode 100644 index 00000000000..8235f5d9676 --- /dev/null +++ b/gcc/testsuite/gcc.dg/init-bad-6.c @@ -0,0 +1,12 @@ +/* ICE arising from bug computing composite type of zero-length array + types: PR 35433. */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +typedef int* X; +typedef int* Y; + +X (*p)[][0]; +Y (*q)[][0]; + +typeof(*(0 ? p : q)) x = { 0 }; /* { dg-warning "excess elements in array initializer|near initialization" } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipacost-2.c b/gcc/testsuite/gcc.dg/ipa/ipacost-2.c index c2861baa369..46db85fde3e 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipacost-2.c +++ b/gcc/testsuite/gcc.dg/ipa/ipacost-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized" } */ +/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized -fpie" { target { ! nonpic } } } */ int array[100]; diff --git a/gcc/testsuite/gcc.dg/nofixed-point-2.c b/gcc/testsuite/gcc.dg/nofixed-point-2.c new file mode 100644 index 00000000000..97bbf70225c --- /dev/null +++ b/gcc/testsuite/gcc.dg/nofixed-point-2.c @@ -0,0 +1,30 @@ +/* PR inline-asm/39059 */ +/* { dg-do compile { target {! fixed_point} } } */ +/* { dg-options "-std=gnu99" } */ + +void +f1 (void) +{ + asm ("" : : "r" (0r)); /* { dg-error "not supported" "reject fixed-point" } */ +} + +__typeof (0r) /* { dg-error "not supported" "reject fixed-point" } */ +b2 (void) +{ + return 0r; /* { dg-error "not supported" "reject fixed-point" } */ +} + +_Accum /* { dg-error "not supported" "reject fixed-point" } */ +f3 (void) +{ + return 0k; /* { dg-error "not supported" "reject fixed-point" } */ +} + +_Sat +f4 (void) /* { dg-error "not supported" "reject fixed-point" } */ +{ + return 0k; /* { dg-error "not supported" "reject fixed-point" } */ +} + +/* { dg-warning "defaults to" "" { target *-*-* } 13 } */ +/* { dg-error "is used without" "" { target *-*-* } 24 } */ diff --git a/gcc/testsuite/gcc.dg/tls/diag-6.c b/gcc/testsuite/gcc.dg/tls/diag-6.c new file mode 100644 index 00000000000..71b0b95244e --- /dev/null +++ b/gcc/testsuite/gcc.dg/tls/diag-6.c @@ -0,0 +1,8 @@ +/* Invalid tls_model attributes. PR 35435. */ +/* { dg-require-effective-target tls } */ + +int v __attribute__((tls_model("initial-exec"))); /* { dg-warning "attribute ignored" } */ +typedef int X __attribute__((tls_model("initial-exec"))); /* { dg-warning "attribute ignored" } */ +void f(int x __attribute__((tls_model("initial-exec")))); /* { dg-warning "attribute ignored" } */ +__thread int a __attribute__((tls_model(1))); /* { dg-error "tls_model argument not a string" } */ +__thread int b __attribute__((tls_model("unknown"))); /* { dg-error "tls_model argument must be one of" } */ diff --git a/gcc/testsuite/gcc.dg/vla-11.c b/gcc/testsuite/gcc.dg/vla-11.c new file mode 100644 index 00000000000..8948e6b77a3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vla-11.c @@ -0,0 +1,13 @@ +/* Further tests of [*] being rejected other that in declarations, as + per the consensus in DR#341 that the second example there should be + invalid (but warnings because the final wording appears to allow + these cases). */ +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "-std=c99 -pedantic-errors" } */ + +void foo11a(int x[sizeof(int *(*)[*])]); /* { dg-warning "not in a declaration" } */ +void foo11b(__SIZE_TYPE__ x, int y[(__SIZE_TYPE__)(int (*)[*])x]); /* { dg-warning "not in a declaration" } */ +void foo11c(struct s { int (*x)[*]; } *y); /* { dg-error "a member of a structure or union cannot have a variably modified type" "variably modified" } */ +/* { dg-warning "'struct s' declared inside parameter list" "struct decl" { target *-*-* } 11 } */ +/* { dg-warning "its scope is only this definition or declaration" "struct scope" { target *-*-* } 11 } */ diff --git a/gcc/testsuite/gcc.dg/vla-6.c b/gcc/testsuite/gcc.dg/vla-6.c index b7bdb31eeca..a7f5f051561 100644 --- a/gcc/testsuite/gcc.dg/vla-6.c +++ b/gcc/testsuite/gcc.dg/vla-6.c @@ -7,9 +7,12 @@ int foo3(int i)[*]; /* { dg-error "not allowed in other than function prototype void foo4(int o[*][4]) { } /* { dg-error "not allowed in other than function prototype scope" } */ void foo5(int o[4][*]) { } /* { dg-error "not allowed in other than function prototype scope" } */ -/* [*] can't be used in a type that's not a declaration */ -void foo11(int x[sizeof(int (*)[*])]); /* { dg-error "not allowed in other than a declaration" } */ -void foo12(int [*]); /* { dg-error "not allowed in other than a declaration" } */ +/* [*] can't be used in a type that's not a declaration (maybe, the + final wording for DR#341 would allow it although the first + discussed intent would not). */ +void foo11(int x[sizeof(int (*)[*])]); /* { dg-warning "not in a declaration" } */ +/* This case is allowed per DR#341. */ +void foo12(int [*]); extern int n; int B[100]; diff --git a/gcc/testsuite/gcc.target/i386/avx-vpclmulqdq.c b/gcc/testsuite/gcc.target/i386/avx-vpclmulqdq.c new file mode 100644 index 00000000000..9b015abcd48 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx-vpclmulqdq.c @@ -0,0 +1,8 @@ +/* { dg-do run } */ +/* { dg-require-effective-target vpclmul } */ +/* { dg-options "-O2 -mpclmul -mavx" } */ + +#define CHECK_H "pclmul-avx-check.h" +#define TEST pclmul_avx_test + +#include "pclmulqdq.c" diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp index 612bec48e79..fa470e11a66 100644 --- a/gcc/testsuite/gcc.target/i386/i386.exp +++ b/gcc/testsuite/gcc.target/i386/i386.exp @@ -92,6 +92,21 @@ proc check_effective_target_pclmul { } { } "-O2 -mpclmul" ] } +# Return 1 if vpclmul instructions can be compiled. +proc check_effective_target_vpclmul { } { + return [check_no_compiler_messages vpclmul object { + typedef long long __m128i __attribute__ ((__vector_size__ (16))); + typedef long long __v2di __attribute__ ((__vector_size__ (16))); + + __m128i pclmulqdq_test (__m128i __X, __m128i __Y) + { + return (__m128i) __builtin_ia32_pclmulqdq128 ((__v2di)__X, + (__v2di)__Y, + 1); + } + } "-O2 -mpclmul -mavx" ] +} + # Return 1 if sse4a instructions can be compiled. proc check_effective_target_sse4a { } { return [check_no_compiler_messages sse4a object { diff --git a/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h b/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h new file mode 100644 index 00000000000..de633336157 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h @@ -0,0 +1,31 @@ +#ifdef DEBUG +#include <stdio.h> +#endif +#include <stdlib.h> +#include "cpuid.h" + +static void pclmul_avx_test (void); + +int +main () +{ + unsigned int eax, ebx, ecx, edx; + + if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) + return 0; + + /* Run PCLMUL + AVX test only if host has PCLMUL + AVX support. */ + if ((ecx & (bit_AVX | bit_PCLMUL)) == (bit_AVX | bit_PCLMUL)) + { + pclmul_avx_test (); +#ifdef DEBUG + printf ("PASSED\n"); +#endif + } +#ifdef DEBUG + else + printf ("SKIPPED\n"); +#endif + + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pclmulqdq.c b/gcc/testsuite/gcc.target/i386/pclmulqdq.c index d4ab8493e31..1c1d2aabeb6 100644 --- a/gcc/testsuite/gcc.target/i386/pclmulqdq.c +++ b/gcc/testsuite/gcc.target/i386/pclmulqdq.c @@ -2,11 +2,19 @@ /* { dg-require-effective-target pclmul } */ /* { dg-options "-O2 -mpclmul" } */ +#ifndef CHECK_H +#define CHECK_H "pclmul-check.h" +#endif + +#ifndef TEST +#define TEST pclmul_test +#endif + +#include CHECK_H + #include <wmmintrin.h> #include <string.h> -#include "pclmul-check.h" - extern void abort (void); #define NUM 1024 @@ -54,7 +62,7 @@ init_data (__m128i *ls1, __m128i *ls2, __m128i *le_00, __m128i *le_01, } static void -pclmul_test (void) +TEST (void) { int i; diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 3e8940e5166..03f7a4ade65 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -1657,15 +1657,17 @@ do_ds_constraint (constraint_t c, bitmap delta) t = find (v->id); tmp = get_varinfo (t)->solution; - if (set_union_with_increment (tmp, sol, 0)) + if (add_graph_edge (graph, t, rhs)) { - get_varinfo (t)->solution = tmp; - if (t == rhs) - sol = get_varinfo (rhs)->solution; - if (!TEST_BIT (changed, t)) + if (bitmap_ior_into (get_varinfo (t)->solution, sol)) { - SET_BIT (changed, t); - changed_count++; + if (t == rhs) + sol = get_varinfo (rhs)->solution; + if (!TEST_BIT (changed, t)) + { + SET_BIT (changed, t); + changed_count++; + } } } } diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d28dcc86ec8..96e39ca4a6d 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + * gnu/gcj/convert/Convert.java (version): Update copyright notice + dates. + * gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise. + 2009-01-26 Jakub Jelinek <jakub@redhat.com> PR libgcj/38872 diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj index aff0225dd16..8a813baac12 100644 --- a/libjava/classpath/ChangeLog.gcj +++ b/libjava/classpath/ChangeLog.gcj @@ -1,3 +1,9 @@ +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + * gnu/java/rmi/registry/RegistryImpl.java (version): Update + copyright notice dates. + * tools/gnu/classpath/tools/orbd/Main.java (run): Likewise. + 2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * configure: Regenerate. diff --git a/libjava/classpath/gnu/java/rmi/registry/RegistryImpl.java b/libjava/classpath/gnu/java/rmi/registry/RegistryImpl.java index ec076d0b774..5fe0173592e 100644 --- a/libjava/classpath/gnu/java/rmi/registry/RegistryImpl.java +++ b/libjava/classpath/gnu/java/rmi/registry/RegistryImpl.java @@ -1,5 +1,5 @@ /* RegistryImpl.java -- - Copyright (c) 1996, 1997, 1998, 1999, 2002, 2005, 2008 + Copyright (c) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -111,7 +111,7 @@ public static void version() { + System.getProperty("java.vm.name") + ") " + System.getProperty("java.vm.version")); - System.out.println("Copyright 2008 Free Software Foundation, Inc."); + System.out.println("Copyright 2009 Free Software Foundation, Inc."); System.out.println("This is free software; see the source for copying conditions. There is NO"); System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); System.exit(0); diff --git a/libjava/classpath/tools/gnu/classpath/tools/orbd/Main.java b/libjava/classpath/tools/gnu/classpath/tools/orbd/Main.java index 15f3612cc9a..35c45ef5ba3 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/orbd/Main.java +++ b/libjava/classpath/tools/gnu/classpath/tools/orbd/Main.java @@ -1,5 +1,5 @@ /* NamingServicePersistent.java -- The persistent naming service. - Copyright (C) 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -179,7 +179,7 @@ public class Main System.out.println("GNU Classpath persistent naming service " + "started at " + iorr.Internet.host + ":" + iorr.Internet.port + " key 'NameService'.\n\n" - + "Copyright (C) 2008 Free Software Foundation\n" + + "Copyright (C) 2009 Free Software Foundation\n" + "This tool comes with ABSOLUTELY NO WARRANTY. " + "This is free software, and you are\nwelcome to " + "redistribute it under conditions, defined in " diff --git a/libjava/gnu/gcj/convert/Convert.java b/libjava/gnu/gcj/convert/Convert.java index 2d5c053cb9f..96fe28d42e4 100644 --- a/libjava/gnu/gcj/convert/Convert.java +++ b/libjava/gnu/gcj/convert/Convert.java @@ -1,4 +1,5 @@ -/* Copyright (C) 1999, 2002, 2005, 2006, 2007, 2008 Free Software Foundation +/* Copyright (C) 1999, 2002, 2005, 2006, 2007, 2008, 2009 + Free Software Foundation This file is part of libgcj. @@ -45,7 +46,7 @@ public class Convert + ") " + System.getProperty("java.vm.version")); System.out.println(); - System.out.println("Copyright (C) 2008 Free Software Foundation, Inc."); + System.out.println("Copyright (C) 2009 Free Software Foundation, Inc."); System.out.println("This is free software; see the source for copying conditions. There is NO"); System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); System.exit(0); diff --git a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java index f1c45471186..bc40a5dedfb 100644 --- a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java +++ b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation +/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation This file is part of libgcj. @@ -46,7 +46,7 @@ public class Main + ") " + System.getProperty("java.vm.version")); System.out.println(); - System.out.println("Copyright 2008 Free Software Foundation, Inc."); + System.out.println("Copyright 2009 Free Software Foundation, Inc."); System.out.println("This is free software; see the source for copying conditions. There is NO"); System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); return; diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index e42a15b5605..d291462db3c 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,7 @@ +2009-02-03 Jakub Jelinek <jakub@redhat.com> + + * mf-runtime.c (__mf_usage): Update copyright notice dates. + 2009-01-23 Jie Zhang <jie.zhang@analog.com> * mf-impl.h (__mf_get_state, __mf_set_state): Don't use diff --git a/libmudflap/mf-runtime.c b/libmudflap/mf-runtime.c index 93b895a1573..0f122cb7977 100644 --- a/libmudflap/mf-runtime.c +++ b/libmudflap/mf-runtime.c @@ -1,5 +1,5 @@ /* Mudflap: narrow-pointer bounds-checking by tree rewriting. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008 + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. Contributed by Frank Ch. Eigler <fche@redhat.com> and Graydon Hoare <graydon@redhat.com> @@ -445,7 +445,7 @@ __mf_usage () fprintf (stderr, "This is a %s%sGCC \"mudflap\" memory-checked binary.\n" - "Mudflap is Copyright (C) 2002-2008 Free Software Foundation, Inc.\n" + "Mudflap is Copyright (C) 2002-2009 Free Software Foundation, Inc.\n" "\n" "The mudflap code can be controlled by an environment variable:\n" "\n" diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6839f557e32..b1340c4ecb4 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,118 @@ +2009-02-04 Benjamin Kosnik <bkoz@redhat.com> + + * include/bits/unique_ptr.h: Remove private __this_type typedef. + * include/bits/stl_vector.h: Remove private vector_type typedef. + * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: + Fix line numbers. + * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_1_neg.cc: Same. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_2_neg.cc: Same. + * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same. + * testsuite/20_util/unique_ptr/assign/assign.cc: Same. + +2009-02-03 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/25191 + * libsupc++/exception_defines.h: Depending on __EXCEPTIONS, + deal consistently with __try and __catch too. + * src/localename.cc: Replace try -> __try, catch -> __catch. + * src/ios.cc: Likewise. + * src/locale.cc: Likewise. + * src/istream.cc: Likewise. + * src/thread.cc: Likewise. + * src/compatibility.cc: Likewise. + * src/bitmap_allocator.cc: Likewise. + * src/ios_init.cc: Likewise. + * include/debug/deque: Likewise. + * include/debug/list: Likewise. + * include/tr1_impl/hashtable: Likewise. + * include/std/bitset: Likewise. + * include/ext/pb_ds/detail/resize_policy/ + hash_load_check_resize_trigger_imp.hpp: Likewise. + * include/ext/pb_ds/detail/resize_policy/ + hash_standard_resize_policy_imp.hpp: Likewise. + * include/ext/pb_ds/detail/cc_hash_table_map_/ + resize_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/cc_hash_table_map_/ + constructor_destructor_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/pat_trie_/ + split_join_branch_bag.hpp: Likewise. + * include/ext/pb_ds/detail/pat_trie_/ + constructors_destructor_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/bin_search_tree_/ + constructors_destructor_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/gp_hash_table_map_/ + resize_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/gp_hash_table_map_/ + constructor_destructor_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/binary_heap_/ + constructors_destructor_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/binary_heap_/ + erase_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/binary_heap_/ + split_join_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/left_child_next_sibling_heap_/ + constructors_destructor_fn_imps.hpp: Likewise. + * include/ext/pb_ds/detail/debug_map_base.hpp: Likewise. + * include/ext/pb_ds/detail/list_update_map_/ + constructor_destructor_fn_imps.hpp: Likewise. + * include/ext/slist: Likewise. + * include/ext/memory: Likewise. + * include/ext/rc_string_base.h: Likewise. + * include/ext/ropeimpl.h: Likewise. + * include/ext/vstring.tcc: Likewise. + * include/ext/rope: Likewise. + * include/ext/sso_string_base.h: Likewise. + * include/bits/shared_ptr.h: Likewise. + * include/bits/stl_list.h: Likewise. + * include/bits/locale_classes.tcc: Likewise. + * include/bits/locale_facets.tcc: Likewise. + * include/bits/locale_classes.h: Likewise. + * include/bits/forward_list.h: Likewise. + * include/bits/stl_vector.h: Likewise. + * include/bits/stl_deque.h: Likewise. + * include/bits/istream.tcc: Likewise. + * include/bits/stl_uninitialized.h: Likewise. + * include/bits/ostream.tcc: Likewise. + * include/bits/vector.tcc: Likewise. + * include/bits/stl_tempbuf.h: Likewise. + * include/bits/deque.tcc: Likewise. + * include/bits/basic_string.tcc: Likewise. + * include/bits/ostream_insert.h: Likewise. + * include/bits/locale_facets_nonio.tcc: Likewise. + * include/bits/stl_tree.h: Likewise. + * include/bits/fstream.tcc: Likewise. + * include/tr1/shared_ptr.h: Likewise. + * include/tr1/hypergeometric.tcc: Likewise. + * include/backward/hashtable.h: Likewise. + * libsupc++/exception_ptr.h: Likewise. + * libsupc++/eh_personality.cc: Likewise. + * libsupc++/eh_call.cc: Likewise. + * config/locale/gnu/monetary_members.cc: Likewise. + * config/locale/gnu/time_members.h: Likewise. + * config/locale/generic/time_members.h: Likewise. + +2009-02-03 Johannes Singler <singler@ira.uka.de> + + * include/parallel/algorithmfwd.h: + Add parallelism default for many declarations. + * include/parallel/numericfwd.h: Likewise. + * include/parallel/iterator.h: Use iterator_traits as usual. + * include/parallel/par_loop.h: + Include equally_split.h. + (for_each_template_random_access_ed): + Avoid calling the Result default constructor. + * include/parallel/numeric: Replace + for_each_template_random_access by + for_each_template_random_access_ed in numeric functions. + +2009-02-02 Benjamin Kosnik <bkoz@redhat.com> + + * config/os/gnu-linux/os_defines.h: Remove superfluous + __NO_STRING_INLINES. + 2009-02-02 Jakub Jelinek <jakub@redhat.com> * testsuite/21_strings/c_strings/char/3.cc: New test. diff --git a/libstdc++-v3/config/locale/generic/time_members.h b/libstdc++-v3/config/locale/generic/time_members.h index 20c2b54058d..538252ec199 100644 --- a/libstdc++-v3/config/locale/generic/time_members.h +++ b/libstdc++-v3/config/locale/generic/time_members.h @@ -1,6 +1,6 @@ // std::time_get, std::time_put implementation, generic version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -73,9 +73,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else _M_name_timepunct = _S_get_c_name(); - try + __try { _M_initialize_timepunct(__cloc); } - catch(...) + __catch(...) { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; diff --git a/libstdc++-v3/config/locale/gnu/monetary_members.cc b/libstdc++-v3/config/locale/gnu/monetary_members.cc index 1bf2487c86d..a9f04cdffc3 100644 --- a/libstdc++-v3/config/locale/gnu/monetary_members.cc +++ b/libstdc++-v3/config/locale/gnu/monetary_members.cc @@ -1,6 +1,6 @@ // std::moneypunct implementation details, GNU version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -479,7 +479,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) wchar_t* __wcs_ps = 0; wchar_t* __wcs_ns = 0; const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); - try + __try { mbstate_t __state; size_t __len = strlen(__cpossign); @@ -524,7 +524,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_data->_M_curr_symbol = L""; _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); } - catch(...) + __catch(...) { delete _M_data; _M_data = 0; @@ -647,7 +647,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) wchar_t* __wcs_ps = 0; wchar_t* __wcs_ns = 0; const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); - try + __try { mbstate_t __state; size_t __len; @@ -693,7 +693,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_data->_M_curr_symbol = L""; _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); } - catch(...) + __catch(...) { delete _M_data; _M_data = 0; diff --git a/libstdc++-v3/config/locale/gnu/time_members.h b/libstdc++-v3/config/locale/gnu/time_members.h index 3e5e0c3ed20..80e1e4f7dde 100644 --- a/libstdc++-v3/config/locale/gnu/time_members.h +++ b/libstdc++-v3/config/locale/gnu/time_members.h @@ -1,6 +1,6 @@ // std::time_get, std::time_put implementation, GNU version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -70,9 +70,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else _M_name_timepunct = _S_get_c_name(); - try + __try { _M_initialize_timepunct(__cloc); } - catch(...) + __catch(...) { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; diff --git a/libstdc++-v3/config/os/gnu-linux/os_defines.h b/libstdc++-v3/config/os/gnu-linux/os_defines.h index 188b8a83208..e2c5a77d230 100644 --- a/libstdc++-v3/config/os/gnu-linux/os_defines.h +++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h @@ -1,6 +1,6 @@ // Specific definitions for GNU/Linux -*- C++ -*- -// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001, 2002, 2003, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -43,9 +43,4 @@ #include <features.h> -// We must not see the optimized string functions GNU libc defines. -#if defined __GLIBC__ && __GLIBC__ >= 2 -#define __NO_STRING_INLINES -#endif - #endif diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/backward/hashtable.h index 7efb8ea5b12..62bc5bc5193 100644 --- a/libstdc++-v3/include/backward/hashtable.h +++ b/libstdc++-v3/include/backward/hashtable.h @@ -1,6 +1,6 @@ // Hashtable implementation used by containers -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -603,12 +603,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { _Node* __n = _M_get_node(); __n->_M_next = 0; - try + __try { this->get_allocator().construct(&__n->_M_val, __obj); return __n; } - catch(...) + __catch(...) { _M_put_node(__n); __throw_exception_again; @@ -995,7 +995,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) if (__n > __old_n) { _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator()); - try + __try { for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) { @@ -1012,7 +1012,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } _M_buckets.swap(__tmp); } - catch(...) + __catch(...) { for (size_type __bucket = 0; __bucket < __tmp.size(); ++__bucket) @@ -1098,7 +1098,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _M_buckets.clear(); _M_buckets.reserve(__ht._M_buckets.size()); _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0); - try + __try { for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) { const _Node* __cur = __ht._M_buckets[__i]; @@ -1118,7 +1118,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } _M_num_elements = __ht._M_num_elements; } - catch(...) + __catch(...) { clear(); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index 3201e361830..de41b8b7f00 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -1,7 +1,7 @@ // Components for manipulating sequences of characters -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); _M_copy(__r->_M_refdata(), __buf, __len); - try + __try { while (__beg != __end) { @@ -113,7 +113,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ++__beg; } } - catch(...) + __catch(...) { __r->_M_destroy(__a); __throw_exception_again; @@ -142,9 +142,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __end)); // Check for out_of_range and length_error exceptions. _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); - try + __try { _S_copy_chars(__r->_M_refdata(), __beg, __end); } - catch(...) + __catch(...) { __r->_M_destroy(__a); __throw_exception_again; @@ -992,7 +992,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { // Avoid reallocation for common case. __str.erase(); @@ -1025,12 +1025,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= __ios_base::eofbit; __in.width(0); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(__ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> @@ -1063,7 +1063,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, true); if (__cerb) { - try + __try { __str.erase(); const __int_type __idelim = _Traits::to_int_type(__delim); @@ -1089,12 +1089,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= __ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(__ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> diff --git a/libstdc++-v3/include/bits/deque.tcc b/libstdc++-v3/include/bits/deque.tcc index 9c1096f77ba..2a697686e9b 100644 --- a/libstdc++-v3/include/bits/deque.tcc +++ b/libstdc++-v3/include/bits/deque.tcc @@ -1,6 +1,6 @@ // Deque implementation (out of line) -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -242,13 +242,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); - try + __try { std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, __x, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } - catch(...) + __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); @@ -258,14 +258,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); - try + __try { std::__uninitialized_fill_a(this->_M_impl._M_finish, __new_finish, __x, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } - catch(...) + __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); @@ -282,7 +282,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_fill_initialize(const value_type& __value) { _Map_pointer __cur; - try + __try { for (__cur = this->_M_impl._M_start._M_node; __cur < this->_M_impl._M_finish._M_node; @@ -293,7 +293,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) this->_M_impl._M_finish._M_cur, __value, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), _M_get_Tp_allocator()); @@ -309,12 +309,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::input_iterator_tag) { this->_M_initialize_map(0); - try + __try { for (; __first != __last; ++__first) push_back(*__first); } - catch(...) + __catch(...) { clear(); __throw_exception_again; @@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) this->_M_initialize_map(__n); _Map_pointer __cur_node; - try + __try { for (__cur_node = this->_M_impl._M_start._M_node; __cur_node < this->_M_impl._M_finish._M_node; @@ -348,7 +348,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) this->_M_impl._M_finish._M_first, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur_node, __cur_node), @@ -372,7 +372,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) { _M_reserve_map_at_back(); *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); - try + __try { #ifdef __GXX_EXPERIMENTAL_CXX0X__ this->_M_impl.construct(this->_M_impl._M_finish._M_cur, @@ -384,7 +384,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) + 1); this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; } - catch(...) + __catch(...) { _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); __throw_exception_again; @@ -406,7 +406,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) { _M_reserve_map_at_front(); *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); - try + __try { this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node - 1); @@ -418,7 +418,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t); #endif } - catch(...) + __catch(...) { ++this->_M_impl._M_start; _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); @@ -473,13 +473,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); - try + __try { std::__uninitialized_copy_a(__first, __last, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } - catch(...) + __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); @@ -489,14 +489,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); - try + __try { std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } - catch(...) + __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); @@ -562,7 +562,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elems_before; - try + __try { if (__elems_before >= difference_type(__n)) { @@ -586,7 +586,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::fill(__old_start, __pos, __x_copy); } } - catch(...) + __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); @@ -600,7 +600,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const difference_type __elems_after = difference_type(__length) - __elems_before; __pos = this->_M_impl._M_finish - __elems_after; - try + __try { if (__elems_after > difference_type(__n)) { @@ -625,7 +625,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::fill(__pos, __old_finish, __x_copy); } } - catch(...) + __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); @@ -649,7 +649,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elemsbefore; - try + __try { if (__elemsbefore >= difference_type(__n)) { @@ -674,7 +674,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::copy(__mid, __last, __old_start); } } - catch(...) + __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); @@ -688,7 +688,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const difference_type __elemsafter = difference_type(__length) - __elemsbefore; __pos = this->_M_impl._M_finish - __elemsafter; - try + __try { if (__elemsafter > difference_type(__n)) { @@ -714,7 +714,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::copy(__first, __mid, __pos); } } - catch(...) + __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); @@ -757,12 +757,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) / _S_buffer_size()); _M_reserve_map_at_front(__new_nodes); size_type __i; - try + __try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); } - catch(...) + __catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); @@ -782,12 +782,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) / _S_buffer_size()); _M_reserve_map_at_back(__new_nodes); size_type __i; - try + __try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); } - catch(...) + __catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index e6a6a80d513..78f098faacd 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -366,13 +366,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_create_node(_Args&&... __args) { typename _Node::_Pointer __node = this->_M_get_node(); - try + __try { _M_get_Node_allocator().construct(__node, std::forward<_Args>(__args)...); __node->_M_next = 0; } - catch(...) + __catch(...) { this->_M_put_node(__node); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index 69119dc6853..f5de38c5d74 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -1,7 +1,7 @@ // File based streams -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -// 2007 +// 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -154,17 +154,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } __cs (this); - try + __try { if (!_M_terminate_output()) __testfail = true; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { _M_file.close(); __throw_exception_again; } - catch(...) + __catch(...) { __testfail = true; } } diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc index 440d234023e..ca5e31446c9 100644 --- a/libstdc++-v3/include/bits/istream.tcc +++ b/libstdc++-v3/include/bits/istream.tcc @@ -1,7 +1,7 @@ // istream classes -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -95,17 +95,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __v); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -162,7 +162,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, false); if (__cerb && __sbout) { - try + __try { bool __ineof; if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) @@ -170,12 +170,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__ineof) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::failbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::failbit); } } else if (!__sbout) @@ -197,7 +197,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { __c = this->rdbuf()->sbumpc(); // 27.6.1.1 paragraph 3 @@ -206,12 +206,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) @@ -231,7 +231,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { const int_type __cb = this->rdbuf()->sbumpc(); // 27.6.1.1 paragraph 3 @@ -243,12 +243,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) @@ -268,7 +268,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); @@ -286,12 +286,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -315,7 +315,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); @@ -334,12 +334,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) @@ -359,7 +359,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); @@ -387,12 +387,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= ios_base::failbit; } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -419,7 +419,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -429,12 +429,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else _M_gcount = 1; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -452,7 +452,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -491,12 +491,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -514,7 +514,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -556,12 +556,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __sb->sbumpc(); } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -580,18 +580,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { __c = this->rdbuf()->sgetc(); if (traits_type::eq_int_type(__c, traits_type::eof())) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -609,18 +609,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { _M_gcount = this->rdbuf()->sgetn(__s, __n); if (_M_gcount != __n) __err |= (ios_base::eofbit | ios_base::failbit); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -638,7 +638,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { // Cannot compare int_type with streamsize generically. const streamsize __num = this->rdbuf()->in_avail(); @@ -647,12 +647,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else if (__num == -1) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -672,7 +672,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -680,12 +680,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) __err |= ios_base::badbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -705,7 +705,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -713,12 +713,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) || traits_type::eq_int_type(__sb->sungetc(), __eof)) __err |= ios_base::badbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -738,7 +738,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { __streambuf_type* __sb = this->rdbuf(); if (__sb) @@ -749,12 +749,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __ret = 0; } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -770,18 +770,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. pos_type __ret = pos_type(-1); - try + __try { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } return __ret; } @@ -794,7 +794,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (!this->fail()) { @@ -807,12 +807,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= ios_base::failbit; } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -827,7 +827,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (!this->fail()) { @@ -840,12 +840,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= ios_base::failbit; } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -864,7 +864,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const __int_type __cb = __in.rdbuf()->sbumpc(); if (!_Traits::eq_int_type(__cb, _Traits::eof())) @@ -872,12 +872,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= (ios_base::eofbit | ios_base::failbit); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __in._M_setstate(ios_base::badbit); } if (__err) __in.setstate(__err); @@ -900,7 +900,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { // Figure out how many characters to extract. streamsize __num = __in.width(); @@ -930,12 +930,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) *__s = char_type(); __in.width(0); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __in._M_setstate(ios_base::badbit); } } if (!__extracted) diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h index cab5812160e..ad7b456c26d 100644 --- a/libstdc++-v3/include/bits/locale_classes.h +++ b/libstdc++-v3/include/bits/locale_classes.h @@ -1,7 +1,7 @@ // Locale support -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -404,9 +404,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { - try + __try { delete this; } - catch(...) + __catch(...) { } } } @@ -509,9 +509,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { - try + __try { delete this; } - catch(...) + __catch(...) { } } } diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc index 551fc90d3b6..bc2daeb2b15 100644 --- a/libstdc++-v3/include/bits/locale_classes.tcc +++ b/libstdc++-v3/include/bits/locale_classes.tcc @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -49,9 +49,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { _M_impl = new _Impl(*__other._M_impl, 1); - try + __try { _M_impl->_M_install_facet(&_Facet::id, __f); } - catch(...) + __catch(...) { _M_impl->_M_remove_reference(); __throw_exception_again; @@ -66,11 +66,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) combine(const locale& __other) const { _Impl* __tmp = new _Impl(*_M_impl, 1); - try + __try { __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); } - catch(...) + __catch(...) { __tmp->_M_remove_reference(); __throw_exception_again; @@ -189,7 +189,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _CharT* __c = new _CharT[__len]; - try + __try { // strxfrm stops when it sees a nul character so we break // the string into zero-terminated substrings and pass those @@ -217,7 +217,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __ret.push_back(_CharT()); } } - catch(...) + __catch(...) { delete [] __c; __throw_exception_again; diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 4ae827f4e99..779b4d505e1 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -1,7 +1,7 @@ // Locale support -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -62,12 +62,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (!__caches[__i]) { __numpunct_cache<_CharT>* __tmp = NULL; - try + __try { __tmp = new __numpunct_cache<_CharT>; __tmp->_M_cache(__loc); } - catch(...) + __catch(...) { delete __tmp; __throw_exception_again; diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc index ba75d3a01bf..9cc1b913d19 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc +++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -50,12 +50,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (!__caches[__i]) { __moneypunct_cache<_CharT, _Intl>* __tmp = NULL; - try + __try { __tmp = new __moneypunct_cache<_CharT, _Intl>; __tmp->_M_cache(__loc); } - catch(...) + __catch(...) { delete __tmp; __throw_exception_again; diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc index 06facc0360b..bdc6c2861fa 100644 --- a/libstdc++-v3/include/bits/ostream.tcc +++ b/libstdc++-v3/include/bits/ostream.tcc @@ -1,7 +1,7 @@ // ostream classes -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -72,18 +72,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const __num_put_type& __np = __check_facet(this->_M_num_put); if (__np.put(*this, *this, this->fill(), __v).failed()) __err |= ios_base::badbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -128,17 +128,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this); if (__cerb && __sbin) { - try + __try { if (!__copy_streambufs(__sbin, this->rdbuf())) __err |= ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::failbit); } } else if (!__sbin) @@ -163,18 +163,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __put = this->rdbuf()->sputc(__c); if (traits_type::eq_int_type(__put, traits_type::eof())) __err |= ios_base::badbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -197,14 +197,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this); if (__cerb) { - try + __try { _M_write(__s, __n); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } return *this; @@ -219,17 +219,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // DR 60. What is a formatted input function? // basic_ostream::flush() is *not* an unformatted output function. ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (this->rdbuf() && this->rdbuf()->pubsync() == -1) __err |= ios_base::badbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -242,17 +242,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) tellp() { pos_type __ret = pos_type(-1); - try + __try { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } return __ret; } @@ -263,7 +263,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) seekp(pos_type __pos) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (!this->fail()) { @@ -277,12 +277,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= ios_base::failbit; } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -295,7 +295,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) seekp(off_type __off, ios_base::seekdir __dir) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { if (!this->fail()) { @@ -309,12 +309,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= ios_base::failbit; } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // _GLIBCXX_RESOLVE_LIB_DEFECTS // 167. Improper use of traits_type::length() const size_t __clen = char_traits<char>::length(__s); - try + __try { struct __ptr_guard { @@ -347,12 +347,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __ws[__i] = __out.widen(__s[__i]); __ostream_insert(__out, __ws, __clen); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __out._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __out._M_setstate(ios_base::badbit); } } return __out; diff --git a/libstdc++-v3/include/bits/ostream_insert.h b/libstdc++-v3/include/bits/ostream_insert.h index 5f63263c297..170c6bc3a3e 100644 --- a/libstdc++-v3/include/bits/ostream_insert.h +++ b/libstdc++-v3/include/bits/ostream_insert.h @@ -1,6 +1,6 @@ // Helpers for ostream inserters -*- C++ -*- -// Copyright (C) 2007 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -85,7 +85,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __ostream_type::sentry __cerb(__out); if (__cerb) { - try + __try { const streamsize __w = __out.width(); if (__w > __n) @@ -104,12 +104,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __ostream_write(__out, __s, __n); __out.width(0); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __out._M_setstate(__ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __out._M_setstate(__ios_base::badbit); } } return __out; diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h index c017dcf6fc6..e4758dcdf38 100644 --- a/libstdc++-v3/include/bits/shared_ptr.h +++ b/libstdc++-v3/include/bits/shared_ptr.h @@ -1,6 +1,6 @@ // <bits/shared_ptr.h> -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -222,11 +222,11 @@ namespace std template<typename _Ptr> __shared_count(_Ptr __p) : _M_pi(0) { - try + __try { _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); } - catch(...) + __catch(...) { delete __p; __throw_exception_again; @@ -241,12 +241,12 @@ namespace std typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; typedef std::allocator<_Sp_cd_type> _Alloc2; _Alloc2 __a2; - try + __try { _M_pi = __a2.allocate(1); ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d); } - catch(...) + __catch(...) { __d(__p); // Call _Deleter on __p. if (_M_pi) @@ -261,12 +261,12 @@ namespace std typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; typedef typename _Alloc::template rebind<_Sp_cd_type>::other _Alloc2; _Alloc2 __a2(__a); - try + __try { _M_pi = __a2.allocate(1); ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d, __a); } - catch(...) + __catch(...) { __d(__p); // Call _Deleter on __p. if (_M_pi) @@ -282,13 +282,13 @@ namespace std typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; typedef typename _Alloc::template rebind<_Sp_cp_type>::other _Alloc2; _Alloc2 __a2(__a); - try + __try { _M_pi = __a2.allocate(1); ::new(static_cast<void*>(_M_pi)) _Sp_cp_type(__a, std::forward<_Args>(__args)...); } - catch(...) + __catch(...) { if (_M_pi) __a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1); @@ -1074,11 +1074,11 @@ namespace std if (expired()) return __shared_ptr<element_type, _Lp>(); - try + __try { return __shared_ptr<element_type, _Lp>(*this); } - catch(const bad_weak_ptr&) + __catch(const bad_weak_ptr&) { // Q: How can we get here? // A: Another thread may have invalidated r after the @@ -1447,11 +1447,11 @@ namespace std if (this->expired()) return shared_ptr<_Tp>(); - try + __try { return shared_ptr<_Tp>(*this); } - catch(const bad_weak_ptr&) + __catch(const bad_weak_ptr&) { return shared_ptr<_Tp>(); } diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index 070fc078909..ec9a727b0f3 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -1,6 +1,6 @@ // Deque implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -513,9 +513,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) + (this->_M_impl._M_map_size - __num_nodes) / 2); _Tp** __nfinish = __nstart + __num_nodes; - try + __try { _M_create_nodes(__nstart, __nfinish); } - catch(...) + __catch(...) { _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); this->_M_impl._M_map = 0; @@ -537,12 +537,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_create_nodes(_Tp** __nstart, _Tp** __nfinish) { _Tp** __cur; - try + __try { for (__cur = __nstart; __cur < __nfinish; ++__cur) *__cur = this->_M_allocate_node(); } - catch(...) + __catch(...) { _M_destroy_nodes(__nstart, __cur); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index 18f6f027681..d38fffe1b33 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -1,6 +1,6 @@ // List implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -465,11 +465,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_create_node(const value_type& __x) { _Node* __p = this->_M_get_node(); - try + __try { _M_get_Tp_allocator().construct(&__p->_M_data, __x); } - catch(...) + __catch(...) { _M_put_node(__p); __throw_exception_again; @@ -482,12 +482,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_create_node(_Args&&... __args) { _Node* __p = this->_M_get_node(); - try + __try { _M_get_Node_allocator().construct(__p, std::forward<_Args>(__args)...); } - catch(...) + __catch(...) { _M_put_node(__p); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h index e9ba10c7e8a..9e98fcd7bdc 100644 --- a/libstdc++-v3/include/bits/stl_tempbuf.h +++ b/libstdc++-v3/include/bits/stl_tempbuf.h @@ -1,6 +1,6 @@ // Temporary buffer implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -187,7 +187,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : _M_original_len(std::distance(__first, __last)), _M_len(0), _M_buffer(0) { - try + __try { std::pair<pointer, size_type> __p(std::get_temporary_buffer< value_type>(_M_original_len)); @@ -196,7 +196,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (!__is_pod(_Tp) && _M_len > 0) std::uninitialized_fill_n(_M_buffer, _M_len, *__first); } - catch(...) + __catch(...) { std::return_temporary_buffer(_M_buffer); _M_buffer = 0; diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index c80dbefc318..125b6661120 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -1,6 +1,6 @@ // RB tree implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -372,9 +372,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_create_node(const value_type& __x) { _Link_type __tmp = _M_get_node(); - try + __try { get_allocator().construct(&__tmp->_M_value_field, __x); } - catch(...) + __catch(...) { _M_put_node(__tmp); __throw_exception_again; @@ -394,12 +394,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_create_node(_Args&&... __args) { _Link_type __tmp = _M_get_node(); - try + __try { _M_get_Node_allocator().construct(__tmp, std::forward<_Args>(__args)...); } - catch(...) + __catch(...) { _M_put_node(__tmp); __throw_exception_again; @@ -937,7 +937,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _Link_type __top = _M_clone_node(__x); __top->_M_parent = __p; - try + __try { if (__x->_M_right) __top->_M_right = _M_copy(_S_right(__x), __top); @@ -955,7 +955,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __x = _S_left(__x); } } - catch(...) + __catch(...) { _M_erase(__top); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h index af51264a249..a9936cfecc3 100644 --- a/libstdc++-v3/include/bits/stl_uninitialized.h +++ b/libstdc++-v3/include/bits/stl_uninitialized.h @@ -1,6 +1,6 @@ // Raw memory manipulators -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -73,14 +73,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __result) { _ForwardIterator __cur = __result; - try + __try { for (; __first != __last; ++__first, ++__cur) ::new(static_cast<void*>(&*__cur)) typename iterator_traits<_ForwardIterator>::value_type(*__first); return __cur; } - catch(...) + __catch(...) { std::_Destroy(__result, __cur); __throw_exception_again; @@ -132,12 +132,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __last, const _Tp& __x) { _ForwardIterator __cur = __first; - try + __try { for (; __cur != __last; ++__cur) std::_Construct(&*__cur, __x); } - catch(...) + __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; @@ -186,12 +186,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const _Tp& __x) { _ForwardIterator __cur = __first; - try + __try { for (; __n > 0; --__n, ++__cur) std::_Construct(&*__cur, __x); } - catch(...) + __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; @@ -242,13 +242,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __cur = __result; - try + __try { for (; __first != __last; ++__first, ++__cur) __alloc.construct(&*__cur, *__first); return __cur; } - catch(...) + __catch(...) { std::_Destroy(__result, __cur, __alloc); __throw_exception_again; @@ -278,12 +278,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; - try + __try { for (; __cur != __last; ++__cur) __alloc.construct(&*__cur, __x); } - catch(...) + __catch(...) { std::_Destroy(__first, __cur, __alloc); __throw_exception_again; @@ -303,12 +303,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; - try + __try { for (; __n > 0; --__n, ++__cur) __alloc.construct(&*__cur, __x); } - catch(...) + __catch(...) { std::_Destroy(__first, __cur, __alloc); __throw_exception_again; @@ -345,11 +345,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, __result, __alloc); - try + __try { return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); } - catch(...) + __catch(...) { std::_Destroy(__result, __mid, __alloc); __throw_exception_again; @@ -373,11 +373,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, __result, __alloc); - try + __try { return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); } - catch(...) + __catch(...) { std::_Destroy(__result, __mid, __alloc); __throw_exception_again; @@ -395,11 +395,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _InputIterator __last, _Allocator& __alloc) { std::__uninitialized_fill_a(__result, __mid, __x, __alloc); - try + __try { return std::__uninitialized_move_a(__first, __last, __mid, __alloc); } - catch(...) + __catch(...) { std::_Destroy(__result, __mid, __alloc); __throw_exception_again; @@ -420,11 +420,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, __first2, __alloc); - try + __try { std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); } - catch(...) + __catch(...) { std::_Destroy(__first2, __mid2, __alloc); __throw_exception_again; @@ -439,14 +439,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _ForwardIterator __result, input_iterator_tag) { _ForwardIterator __cur = __result; - try + __try { for (; __n > 0; --__n, ++__first, ++__cur) ::new(static_cast<void*>(&*__cur)) typename iterator_traits<_ForwardIterator>::value_type(*__first); return __cur; } - catch(...) + __catch(...) { std::_Destroy(__result, __cur); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 37bd21803d4..e62aa726057 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -1,6 +1,6 @@ // Vector implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -181,7 +181,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept) typedef _Vector_base<_Tp, _Alloc> _Base; - typedef vector<_Tp, _Alloc> vector_type; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; public: @@ -190,8 +189,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) typedef typename _Tp_alloc_type::const_pointer const_pointer; typedef typename _Tp_alloc_type::reference reference; typedef typename _Tp_alloc_type::const_reference const_reference; - typedef __gnu_cxx::__normal_iterator<pointer, vector_type> iterator; - typedef __gnu_cxx::__normal_iterator<const_pointer, vector_type> + typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator; + typedef __gnu_cxx::__normal_iterator<const_pointer, vector> const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; @@ -968,13 +967,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _ForwardIterator __first, _ForwardIterator __last) { pointer __result = this->_M_allocate(__n); - try + __try { std::__uninitialized_copy_a(__first, __last, __result, _M_get_Tp_allocator()); return __result; } - catch(...) + __catch(...) { _M_deallocate(__result, __n); __throw_exception_again; diff --git a/libstdc++-v3/include/bits/unique_ptr.h b/libstdc++-v3/include/bits/unique_ptr.h index 3123a79ccae..5e4fa8c7139 100644 --- a/libstdc++-v3/include/bits/unique_ptr.h +++ b/libstdc++-v3/include/bits/unique_ptr.h @@ -1,6 +1,6 @@ // unique_ptr implementation -*- C++ -*- -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -80,21 +80,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } }; - /// 20.6.11.2 unique_ptr for single objects. + /// 20.7.12.2 unique_ptr for single objects. template <typename _Tp, typename _Tp_Deleter = default_delete<_Tp> > class unique_ptr { - typedef unique_ptr<_Tp, _Tp_Deleter> __this_type; typedef std::tuple<_Tp*, _Tp_Deleter> __tuple_type; - typedef __tuple_type __this_type::* __unspecified_bool_type; - typedef _Tp* __this_type::* __unspecified_pointer_type; + typedef __tuple_type unique_ptr::* __unspecified_bool_type; + typedef _Tp* unique_ptr::* __unspecified_pointer_type; public: - typedef _Tp* pointer; + typedef _Tp* pointer; typedef _Tp element_type; typedef _Tp_Deleter deleter_type; - // constructors + // Constructors. unique_ptr() : _M_t(pointer(), deleter_type()) { static_assert(!std::is_pointer<deleter_type>::value, @@ -117,8 +116,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { static_assert(!std::is_reference<deleter_type>::value, "rvalue deleter bound to reference"); } - // move constructors - unique_ptr(unique_ptr && __u) + // Move constructors. + unique_ptr(unique_ptr&& __u) : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } template<typename _Up, typename _Up_Deleter> @@ -126,10 +125,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } - // destructor + // Destructor. ~unique_ptr() { reset(); } - // assignment + // Assignment. unique_ptr& operator=(unique_ptr&& __u) { @@ -154,7 +153,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return *this; } - // observers + // Observers. typename std::add_lvalue_reference<element_type>::type operator*() const { _GLIBCXX_DEBUG_ASSERT(get() != 0); @@ -183,9 +182,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return std::get<1>(_M_t); } operator __unspecified_bool_type () const - { return get() == 0 ? 0 : &__this_type::_M_t; } + { return get() == 0 ? 0 : &unique_ptr::_M_t; } - // modifiers + // Modifiers. pointer release() { @@ -211,7 +210,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) swap(_M_t, __u._M_t); } - // disable copy from lvalue + // Disable copy from lvalue. unique_ptr(const unique_ptr&) = delete; template<typename _Up, typename _Up_Deleter> @@ -226,24 +225,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __tuple_type _M_t; }; - /// 20.6.11.3 unique_ptr for array objects with a runtime length + /// 20.7.12.3 unique_ptr for array objects with a runtime length // [unique.ptr.runtime] // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 740 - omit specialization for array objects with a compile time length template<typename _Tp, typename _Tp_Deleter> class unique_ptr<_Tp[], _Tp_Deleter> { - typedef unique_ptr<_Tp[], _Tp_Deleter> __this_type; - typedef std::tuple<_Tp*, _Tp_Deleter> __tuple_type; - typedef __tuple_type __this_type::* __unspecified_bool_type; - typedef _Tp* __this_type::* __unspecified_pointer_type; + typedef std::tuple<_Tp*, _Tp_Deleter> __tuple_type; + typedef __tuple_type unique_ptr::* __unspecified_bool_type; + typedef _Tp* unique_ptr::* __unspecified_pointer_type; public: - typedef _Tp* pointer; + typedef _Tp* pointer; typedef _Tp element_type; typedef _Tp_Deleter deleter_type; - // constructors + // Constructors. unique_ptr() : _M_t(pointer(), deleter_type()) { static_assert(!std::is_pointer<deleter_type>::value, @@ -266,7 +264,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { static_assert(!std::is_reference<deleter_type>::value, "rvalue deleter bound to reference"); } - // move constructors + // Move constructors. unique_ptr(unique_ptr&& __u) : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } @@ -275,10 +273,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } - // destructor + // Destructor. ~unique_ptr() { reset(); } - // assignment + // Assignment. unique_ptr& operator=(unique_ptr&& __u) { @@ -303,7 +301,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return *this; } - // observers + // Observers. typename std::add_lvalue_reference<element_type>::type operator[](size_t __i) const { @@ -326,9 +324,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return std::get<1>(_M_t); } operator __unspecified_bool_type () const - { return get() == 0 ? 0 : &__this_type::_M_t; } + { return get() == 0 ? 0 : &unique_ptr::_M_t; } - // modifiers + // Modifiers. pointer release() { @@ -358,11 +356,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) swap(_M_t, __u._M_t); } - // disable copy from lvalue + // Disable copy from lvalue. unique_ptr(const unique_ptr&) = delete; unique_ptr& operator=(const unique_ptr&) = delete; - // disable construction from convertible pointer types + // Disable construction from convertible pointer types. // (N2315 - 20.6.5.3.1) template<typename _Up> unique_ptr(_Up*, typename diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc index 04f76ca2c2c..39b7951bff5 100644 --- a/libstdc++-v3/include/bits/vector.tcc +++ b/libstdc++-v3/include/bits/vector.tcc @@ -1,6 +1,6 @@ // Vector implementation (out of line) -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -326,7 +326,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); - try + __try { // The order of the three operations is dictated by the C++0x // case, where the moves could alter a new element belonging @@ -352,7 +352,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __new_finish, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { if (!__new_finish) this->_M_impl.destroy(__new_start + __elems_before); @@ -418,7 +418,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); - try + __try { // See _M_insert_aux above. std::__uninitialized_fill_n_a(__new_start + __elems_before, @@ -439,7 +439,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __new_finish, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { if (!__new_finish) std::_Destroy(__new_start + __elems_before, @@ -525,7 +525,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _M_check_len(__n, "vector::_M_range_insert"); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); - try + __try { __new_finish = std::__uninitialized_move_a(this->_M_impl._M_start, @@ -542,7 +542,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __new_finish, _M_get_Tp_allocator()); } - catch(...) + __catch(...) { std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index 845e0dcaaf2..2003734eca9 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -1,6 +1,6 @@ // Debugging deque implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -416,12 +416,12 @@ namespace __debug iterator __victim = __position++; __victim._M_invalidate(); } - try + __try { return iterator(_Base::erase(__first.base(), __last.base()), this); } - catch(...) + __catch(...) { this->_M_revalidate_singular(); __throw_exception_again; diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list index 312aeebef92..96c100f59b8 100644 --- a/libstdc++-v3/include/debug/list +++ b/libstdc++-v3/include/debug/list @@ -1,6 +1,6 @@ // Debugging list implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -256,11 +256,11 @@ namespace __debug __real_victim._M_invalidate(); } - try + __try { _Base::resize(__sz, __c); } - catch(...) + __catch(...) { this->_M_revalidate_singular(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/memory b/libstdc++-v3/include/ext/memory index 0755d897507..7f08f1605fc 100644 --- a/libstdc++-v3/include/ext/memory +++ b/libstdc++-v3/include/ext/memory @@ -1,6 +1,7 @@ // Memory extensions -*- C++ -*- -// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +// Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -79,13 +80,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _ForwardIter __result, std::input_iterator_tag) { _ForwardIter __cur = __result; - try + __try { for (; __count > 0 ; --__count, ++__first, ++__cur) std::_Construct(&*__cur, *__first); return pair<_InputIter, _ForwardIter>(__first, __cur); } - catch(...) + __catch(...) { std::_Destroy(__result, __cur); __throw_exception_again; @@ -138,13 +139,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _Allocator __alloc) { _ForwardIter __cur = __result; - try + __try { for (; __count > 0 ; --__count, ++__first, ++__cur) __alloc.construct(&*__cur, *__first); return pair<_InputIter, _ForwardIter>(__first, __cur); } - catch(...) + __catch(...) { std::_Destroy(__result, __cur, __alloc); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp index 295a57aee17..617843b8718 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -95,7 +95,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : m_size = other.m_size; _GLIBCXX_DEBUG_ONLY(other.structure_only_assert_valid();) - try + __try { m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent); if (m_p_head->m_p_parent != NULL) @@ -103,7 +103,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : m_size = other.m_size; initialize_min_max(); } - catch(...) + __catch(...) { _GLIBCXX_DEBUG_ONLY(debug_base::clear();) s_node_allocator.deallocate(m_p_head, 1); @@ -163,11 +163,11 @@ recursive_copy_node(const node_pointer p_nd) return (NULL); node_pointer p_ret = s_node_allocator.allocate(1); - try + __try { new (p_ret) node(*p_nd); } - catch(...) + __catch(...) { s_node_allocator.deallocate(p_ret, 1); __throw_exception_again; @@ -175,12 +175,12 @@ recursive_copy_node(const node_pointer p_nd) p_ret->m_p_left = p_ret->m_p_right = NULL; - try + __try { p_ret->m_p_left = recursive_copy_node(p_nd->m_p_left); p_ret->m_p_right = recursive_copy_node(p_nd->m_p_right); } - catch(...) + __catch(...) { clear_imp(p_ret); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp index b43529beeb3..3cb48559631 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -109,7 +109,7 @@ binary_heap_(const PB_DS_CLASS_C_DEC& other) : const_iterator first_it = other.begin(); const_iterator last_it = other.end(); - try + __try { while (first_it != last_it) { @@ -117,7 +117,7 @@ binary_heap_(const PB_DS_CLASS_C_DEC& other) : ++first_it; } } - catch(...) + __catch(...) { for (size_type i = 0; i < m_size; ++i) erase_at(m_a_entries, i, s_no_throw_copies_ind); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp index 72686d12974..c7875df229d 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -52,7 +52,7 @@ clear() for (size_type i = 0; i < m_size; ++i) erase_at(m_a_entries, i, s_no_throw_copies_ind); - try + __try { const size_type actual_size = resize_policy::get_new_size_for_arbitrary(0); @@ -66,7 +66,7 @@ clear() m_a_entries = a_entries; } - catch(...) + __catch(...) { } m_size = 0; @@ -135,7 +135,7 @@ erase_if(Pred pred) for (size_type i = left; i < m_size; ++i) erase_at(m_a_entries, i, s_no_throw_copies_ind); - try + __try { const size_type actual_size = resize_policy::get_new_size_for_arbitrary(left); @@ -150,7 +150,7 @@ erase_if(Pred pred) resize_policy::notify_arbitrary(m_actual_size); } - catch(...) + __catch(...) { }; m_size = left; @@ -197,7 +197,7 @@ resize_for_erase_if_needed() if (!resize_policy::resize_needed_for_shrink(m_size)) return; - try + __try { const size_type new_actual_size = resize_policy::get_new_size_for_shrink(); @@ -215,7 +215,7 @@ resize_for_erase_if_needed() m_a_entries = a_new_entries; } - catch(...) + __catch(...) { } } diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp index 679efa5c475..34259eab697 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -77,13 +77,13 @@ split(Pred pred, PB_DS_CLASS_C_DEC& other) entry_pointer a_entries = NULL; entry_pointer a_other_entries = NULL; - try + __try { a_entries = s_entry_allocator.allocate(actual_size); a_other_entries = s_entry_allocator.allocate(other_actual_size); } - catch(...) + __catch(...) { if (a_entries != NULL) s_entry_allocator.deallocate(a_entries, actual_size); @@ -137,12 +137,12 @@ join(PB_DS_CLASS_C_DEC& other) entry_pointer a_entries = NULL; entry_pointer a_other_entries = NULL; - try + __try { a_entries = s_entry_allocator.allocate(actual_size); a_other_entries = s_entry_allocator.allocate(resize_policy::min_size); } - catch(...) + __catch(...) { if (a_entries != NULL) s_entry_allocator.deallocate(a_entries, actual_size); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp index e767bbec51f..2593101f9e9 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -139,11 +139,11 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : { initialize(); _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();) - try + __try { copy_from_range(other.begin(), other.end()); } - catch(...) + __catch(...) { deallocate_all(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp index eda2c48da52..036f9b842ef 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -69,11 +69,11 @@ do_resize_if_needed_no_throw() if (!resize_base::is_resize_needed()) return; - try + __try { resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e)); } - catch(...) + __catch(...) { } _GLIBCXX_DEBUG_ONLY(assert_valid();) @@ -94,13 +94,13 @@ resize_imp(size_type new_size) // Following line might throw an exception. ranged_hash_fn_base::notify_resized(new_size); - try + __try { // Following line might throw an exception. a_p_entries_resized = s_entry_pointer_allocator.allocate(new_size); m_num_e = new_size; } - catch(...) + __catch(...) { ranged_hash_fn_base::notify_resized(old_size); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp index 5319749128b..568c50991a5 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -168,11 +168,11 @@ namespace __gnu_pbds std::abort(); } - try + __try { m_key_set.push_back(r_key); } - catch(...) + __catch(...) { std::cerr << "insert_new" << r_key << std::endl; std::abort(); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp index 6f4844cf00d..3e8ae49d5ce 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -152,7 +152,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : for (size_type i = 0; i < m_num_e; ++i) m_entries[i].m_stat = (entry_status)empty_entry_status; - try + __try { for (size_type i = 0; i < m_num_e; ++i) { @@ -161,7 +161,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : new (m_entries + i) entry(other.m_entries[i]); } } - catch(...) + __catch(...) { deallocate_all(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp index 4368d12d626..ab6279f8907 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -69,11 +69,11 @@ do_resize_if_needed_no_throw() if (!resize_base::is_resize_needed()) return; - try + __try { resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e)); } - catch(...) + __catch(...) { } _GLIBCXX_DEBUG_ONLY(assert_valid();) @@ -104,11 +104,11 @@ resize_imp(size_type new_size) for (size_type i = 0; i < m_num_e; ++i) a_entries_resized[i].m_stat = empty_entry_status; - try + __try { resize_imp(a_entries_resized, old_size); } - catch(...) + __catch(...) { erase_all_valid_entries(a_entries_resized, new_size); m_num_e = old_size; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp index 85d2511cac6..cd18a7b023b 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -122,11 +122,11 @@ recursive_copy_node(const_node_pointer p_nd) node_pointer p_ret = s_node_allocator.allocate(1); - try + __try { new (p_ret) node(*p_nd); } - catch(...) + __catch(...) { s_node_allocator.deallocate(p_ret, 1); __throw_exception_again; @@ -135,12 +135,12 @@ recursive_copy_node(const_node_pointer p_nd) p_ret->m_p_l_child = p_ret->m_p_next_sibling = p_ret->m_p_prev_or_parent = NULL; - try + __try { p_ret->m_p_l_child = recursive_copy_node(p_nd->m_p_l_child); p_ret->m_p_next_sibling = recursive_copy_node(p_nd->m_p_next_sibling); } - catch(...) + __catch(...) { clear_imp(p_ret); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp index a3d96ec2f28..3be4df422d7 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -93,7 +93,7 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : #endif m_p_l(NULL) { - try + __try { for (const_iterator it = other.begin(); it != other.end(); ++it) { @@ -104,7 +104,7 @@ m_p_l(NULL) m_p_l = p_l; } } - catch(...) + __catch(...) { deallocate_all(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp index efa2e6104e5..40bd0a0d9ec 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -96,11 +96,11 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : _GLIBCXX_DEBUG_ONLY(assert_valid();) return; } - try + __try { m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent); } - catch(...) + __catch(...) { s_head_allocator.deallocate(m_p_head, 1); __throw_exception_again; @@ -193,13 +193,13 @@ recursive_copy_node(const_node_pointer p_other_nd) p_other_internal_nd->begin(); internal_node_pointer p_ret; - try + __try { while (child_it != p_other_internal_nd->end()) a_p_children[child_i++] = recursive_copy_node(*(child_it++)); p_ret = s_internal_node_allocator.allocate(1); } - catch(...) + __catch(...) { while (child_i-- > 0) clear_imp(a_p_children[child_i]); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp index bf04cb4ab7c..b727518a0dc 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -60,11 +60,11 @@ public: add_branch() { internal_node_pointer p_nd = s_internal_node_allocator.allocate(1); - try + __try { m_bag.push_back(p_nd); } - catch(...) + __catch(...) { s_internal_node_allocator.deallocate(p_nd, 1); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp index 8be9245110a..594965f00b8 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -259,13 +259,13 @@ set_loads(std::pair<float, float> load_pair) const size_type old_next_grow_size = m_next_grow_size; const bool old_resize_needed = m_resize_needed; - try + __try { m_load_min = load_pair.first; m_load_max = load_pair.second; do_resize(static_cast<size_type>(size_base::get_size() / ((m_load_min + m_load_max) / 2))); } - catch(...) + __catch(...) { m_load_min = old_load_min; m_load_max = old_load_max; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp index a37ccc0be9e..706af42d004 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -205,16 +205,16 @@ resize(size_type new_size) --actual_size; const size_type old_size = m_size; - try + __try { do_resize(actual_size - 1); } - catch(insert_error& ) + __catch(insert_error& ) { m_size = old_size; __throw_resize_error(); } - catch(...) + __catch(...) { m_size = old_size; __throw_exception_again; diff --git a/libstdc++-v3/include/ext/rc_string_base.h b/libstdc++-v3/include/ext/rc_string_base.h index 213e3cf1c97..ff2c9a8eca9 100644 --- a/libstdc++-v3/include/ext/rc_string_base.h +++ b/libstdc++-v3/include/ext/rc_string_base.h @@ -1,6 +1,6 @@ // Reference-counted versatile string base -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -515,7 +515,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); _S_copy(__r->_M_refdata(), __buf, __len); - try + __try { while (__beg != __end) { @@ -531,7 +531,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ++__beg; } } - catch(...) + __catch(...) { __r->_M_destroy(__a); __throw_exception_again; @@ -559,9 +559,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __end)); // Check for out_of_range and length_error exceptions. _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); - try + __try { _S_copy_chars(__r->_M_refdata(), __beg, __end); } - catch(...) + __catch(...) { __r->_M_destroy(__a); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope index b85f98e3be4..642f927c961 100644 --- a/libstdc++-v3/include/ext/rope +++ b/libstdc++-v3/include/ext/rope @@ -1,6 +1,6 @@ // SGI's rope class -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -1689,9 +1689,9 @@ protected: __uninitialized_copy_n_a(__s, __size, __buf, __a); _S_cond_store_eos(__buf[__size]); - try + __try { return _S_new_RopeLeaf(__buf, __size, __a); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__buf, __size, __a); __throw_exception_again; @@ -1845,12 +1845,12 @@ protected: _CharT* __buf = this->_Data_allocate(_S_rounded_up_size(1)); _M_get_allocator().construct(__buf, __c); - try + __try { this->_M_tree_ptr = _S_new_RopeLeaf(__buf, 1, _M_get_allocator()); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__buf, 1, _M_get_allocator()); __throw_exception_again; @@ -1924,13 +1924,13 @@ protected: _RopeRep* __old = this->_M_tree_ptr; _RopeRep* __left = __STL_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, _M_get_allocator()); - try + __try { this->_M_tree_ptr = _S_concat(__left, this->_M_tree_ptr); _S_unref(__old); _S_unref(__left); } - catch(...) + __catch(...) { _S_unref(__left); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h index 95dd8c2f722..8b330801366 100644 --- a/libstdc++-v3/include/ext/ropeimpl.h +++ b/libstdc++-v3/include/ext/ropeimpl.h @@ -1,6 +1,6 @@ // SGI's rope class implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -439,12 +439,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) uninitialized_copy_n(__r->_M_data, __old_len, __new_data); uninitialized_copy_n(__iter, __len, __new_data + __old_len); _S_cond_store_eos(__new_data[__old_len + __len]); - try + __try { __result = _S_new_RopeLeaf(__new_data, __old_len + __len, __r->_M_get_allocator()); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__new_data, __old_len + __len, __r->_M_get_allocator()); @@ -507,12 +507,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { _RopeRep* __balanced; - try + __try { __balanced = _S_balance(__result); __result->_M_unref_nonnil(); } - catch(...) + __catch(...) { _C_deallocate(__result,1); __throw_exception_again; @@ -558,9 +558,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _RopeRep* __nright = _S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen); __left->_M_ref_nonnil(); - try + __try { __result = _S_tree_concat(__left, __nright); } - catch(...) + __catch(...) { _S_unref(__left); _S_unref(__nright); @@ -571,12 +571,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } _RopeRep* __nright = __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator()); - try + __try { __r->_M_ref_nonnil(); __result = _S_tree_concat(__r, __nright); } - catch(...) + __catch(...) { _S_unref(__r); _S_unref(__nright); @@ -638,9 +638,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _RopeRep* __right = __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator()); __r->_M_ref_nonnil(); - try + __try { __result = _S_tree_concat(__r, __right); } - catch(...) + __catch(...) { _S_unref(__r); _S_unref(__right); @@ -690,9 +690,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _M_data, __right->_M_size); __leftleft->_M_ref_nonnil(); - try + __try { return(_S_tree_concat(__leftleft, __rest)); } - catch(...) + __catch(...) { _S_unref(__leftleft); _S_unref(__rest); @@ -703,9 +703,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } __left->_M_ref_nonnil(); __right->_M_ref_nonnil(); - try + __try { return(_S_tree_concat(__left, __right)); } - catch(...) + __catch(...) { _S_unref(__left); _S_unref(__right); @@ -818,9 +818,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) goto lazy; __section = (_CharT*) _Data_allocate(_S_rounded_up_size(__result_len)); - try + __try { (*(__f->_M_fn))(__start, __result_len, __section); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__section, __result_len, __base->_M_get_allocator()); @@ -965,13 +965,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) bool __result; _CharT* __buffer = (_CharT*)_Alloc().allocate(__len * sizeof(_CharT)); - try + __try { (*(__f->_M_fn))(__begin, __len, __buffer); __result = __c(__buffer, __len); _Alloc().deallocate(__buffer, __len * sizeof(_CharT)); } - catch(...) + __catch(...) { _Alloc().deallocate(__buffer, __len * sizeof(_CharT)); __throw_exception_again; @@ -1027,7 +1027,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) if (!__is_simple) __o.width(__w / __rope_len); - try + __try { if (__is_simple && !__left && __pad_len > 0) _Rope_fill(__o, __pad_len); @@ -1037,7 +1037,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) if (!__is_simple) __o.width(__w); } - catch(...) + __catch(...) { if (!__is_simple) __o.width(__w); @@ -1216,7 +1216,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i) __forest[__i] = 0; - try + __try { _S_add_to_forest(__r, __forest); for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i) @@ -1232,7 +1232,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) #endif } } - catch(...) + __catch(...) { for(__i = 0; __i <= int(__detail::_S_max_rope_depth); __i++) _S_unref(__forest[__i]); @@ -1552,10 +1552,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __uninitialized_fill_n_a(__rest_buffer, __rest, __c, _M_get_allocator()); _S_cond_store_eos(__rest_buffer[__rest]); - try + __try { __remainder = _S_new_RopeLeaf(__rest_buffer, __rest, _M_get_allocator()); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__rest_buffer, __rest, _M_get_allocator()); @@ -1572,13 +1572,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __uninitialized_fill_n_a(__base_buffer, __exponentiate_threshold, __c, _M_get_allocator()); _S_cond_store_eos(__base_buffer[__exponentiate_threshold]); - try + __try { __base_leaf = _S_new_RopeLeaf(__base_buffer, __exponentiate_threshold, _M_get_allocator()); } - catch(...) + __catch(...) { _RopeRep::__STL_FREE_STRING(__base_buffer, __exponentiate_threshold, diff --git a/libstdc++-v3/include/ext/slist b/libstdc++-v3/include/ext/slist index 7ae9ffbe101..ea6c3c076e9 100644 --- a/libstdc++-v3/include/ext/slist +++ b/libstdc++-v3/include/ext/slist @@ -1,6 +1,7 @@ // Singly-linked list implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2004, 2005, 2007 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2004, 2005, 2007, 2008, 2009 +// Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -327,12 +328,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _M_create_node(const value_type& __x) { _Node* __node = this->_M_get_node(); - try + __try { get_allocator().construct(&__node->_M_data, __x); __node->_M_next = 0; } - catch(...) + __catch(...) { this->_M_put_node(__node); __throw_exception_again; @@ -344,12 +345,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _M_create_node() { _Node* __node = this->_M_get_node(); - try + __try { get_allocator().construct(&__node->_M_data, value_type()); __node->_M_next = 0; } - catch(...) + __catch(...) { this->_M_put_node(__node); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/sso_string_base.h b/libstdc++-v3/include/ext/sso_string_base.h index 73c6a1b2df0..a50f48f9985 100644 --- a/libstdc++-v3/include/ext/sso_string_base.h +++ b/libstdc++-v3/include/ext/sso_string_base.h @@ -1,6 +1,6 @@ // Short-string-optimized versatile string base -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -398,7 +398,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ++__beg; } - try + __try { while (__beg != __end) { @@ -416,7 +416,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ++__beg; } } - catch(...) + __catch(...) { _M_dispose(); __throw_exception_again; @@ -446,9 +446,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } // Check for out_of_range and length_error exceptions. - try + __try { _S_copy_chars(_M_data(), __beg, __end); } - catch(...) + __catch(...) { _M_dispose(); __throw_exception_again; diff --git a/libstdc++-v3/include/ext/vstring.tcc b/libstdc++-v3/include/ext/vstring.tcc index 8d5b1b5e775..1ba2321281a 100644 --- a/libstdc++-v3/include/ext/vstring.tcc +++ b/libstdc++-v3/include/ext/vstring.tcc @@ -1,6 +1,6 @@ // Versatile string -*- C++ -*- -// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -567,7 +567,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { // Avoid reallocation for common case. __str.erase(); @@ -600,12 +600,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= __ios_base::eofbit; __in.width(0); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(__ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> @@ -641,7 +641,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename __istream_type::sentry __cerb(__in, true); if (__cerb) { - try + __try { // Avoid reallocation for common case. __str.erase(); @@ -676,12 +676,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= __ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(__ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> diff --git a/libstdc++-v3/include/parallel/algorithmfwd.h b/libstdc++-v3/include/parallel/algorithmfwd.h index 3f386a5cdbc..7aed7c71d4b 100644 --- a/libstdc++-v3/include/parallel/algorithmfwd.h +++ b/libstdc++-v3/include/parallel/algorithmfwd.h @@ -99,7 +99,8 @@ namespace __parallel template<typename _RAIter, typename _Tp> typename iterator_traits<_RAIter>::difference_type count_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_unbalanced); template<typename _IIter, typename _Predicate> @@ -121,7 +122,8 @@ namespace __parallel template<typename _RAIter, typename _Predicate> typename iterator_traits<_RAIter>::difference_type count_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_unbalanced); // algobase.h template<typename _IIter1, typename _IIter2> @@ -228,7 +230,8 @@ namespace __parallel template<typename _RAIter, typename _Function> _Function for_each_switch(_RAIter, _RAIter, _Function, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_balanced); template<typename _FIter, typename _Generator> @@ -250,7 +253,8 @@ namespace __parallel template<typename _RAIter, typename _Generator> void generate_switch(_RAIter, _RAIter, _Generator, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_balanced); template<typename _OIter, typename _Size, typename _Generator> _OIter @@ -272,7 +276,8 @@ namespace __parallel template<typename _RAIter, typename _Size, typename _Generator> _RAIter generate_n_switch(_RAIter, _Size, _Generator, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_balanced); template<typename _IIter1, typename _IIter2> bool @@ -429,7 +434,8 @@ namespace __parallel _RAOIter transform1_switch(_RAIIter, _RAIIter, _RAOIter, UnaryOperation, random_access_iterator_tag, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_balanced); template<typename _IIter1, typename _IIter2, typename _OIter, @@ -455,7 +461,8 @@ namespace __parallel transform2_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter3, _BiOperation, random_access_iterator_tag, random_access_iterator_tag, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_balanced); template<typename _IIter1, typename _IIter2, typename _OIter, typename _BiOperation, typename _Tag1, @@ -546,7 +553,8 @@ namespace __parallel template<typename _RAIter, typename _Compare> _RAIter max_element_switch(_RAIter, _RAIter, _Compare, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_balanced); template<typename _IIter1, typename _IIter2, typename _OIter> @@ -615,7 +623,8 @@ namespace __parallel template<typename _RAIter, typename _Compare> _RAIter min_element_switch(_RAIter, _RAIter, _Compare, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_balanced); template<typename _RAIter> void diff --git a/libstdc++-v3/include/parallel/iterator.h b/libstdc++-v3/include/parallel/iterator.h index 7aaafee8611..95ef844350f 100644 --- a/libstdc++-v3/include/parallel/iterator.h +++ b/libstdc++-v3/include/parallel/iterator.h @@ -131,7 +131,8 @@ namespace __gnu_parallel public: typedef IteratorCategory iterator_category; typedef void value_type; - typedef typename Iterator1::difference_type difference_type; + typedef typename std::iterator_traits<Iterator1>::difference_type + difference_type; typedef type* pointer; typedef type& reference; diff --git a/libstdc++-v3/include/parallel/numeric b/libstdc++-v3/include/parallel/numeric index 1269c5251e4..8706e3f4c01 100644 --- a/libstdc++-v3/include/parallel/numeric +++ b/libstdc++-v3/include/parallel/numeric @@ -103,13 +103,13 @@ namespace __parallel __gnu_parallel::accumulate_selector<_RandomAccessIterator> my_selector; __gnu_parallel:: - for_each_template_random_access(begin, end, + for_each_template_random_access_ed(begin, end, __gnu_parallel::nothing(), my_selector, __gnu_parallel:: accumulate_binop_reduct <BinaryOperation>(binary_op), - res, res, -1, parallelism_tag); + res, res, -1); return res; } else @@ -211,9 +211,9 @@ namespace __parallel inner_product_selector<RandomAccessIterator1, RandomAccessIterator2, T> my_selector(first1, first2); __gnu_parallel:: - for_each_template_random_access(first1, last1, binary_op2, + for_each_template_random_access_ed(first1, last1, binary_op2, my_selector, binary_op1, - res, res, -1, parallelism_tag); + res, res, -1); return res; } else @@ -432,10 +432,10 @@ namespace __parallel end_pair(end, result + (end - begin)); __gnu_parallel::adjacent_difference_selector<ip> functionality; __gnu_parallel:: - for_each_template_random_access(begin_pair, end_pair, bin_op, + for_each_template_random_access_ed(begin_pair, end_pair, bin_op, functionality, __gnu_parallel::dummy_reduct(), - dummy, dummy, -1, parallelism_tag); + dummy, dummy, -1); return functionality.finish_iterator; } else diff --git a/libstdc++-v3/include/parallel/numericfwd.h b/libstdc++-v3/include/parallel/numericfwd.h index 362725b4a67..b9bbe967fe2 100644 --- a/libstdc++-v3/include/parallel/numericfwd.h +++ b/libstdc++-v3/include/parallel/numericfwd.h @@ -83,7 +83,8 @@ namespace __parallel _Tp accumulate_switch(_RAIter, _RAIter, _Tp, _BinaryOper, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_unbalanced); template<typename _IIter, typename _OIter> _OIter @@ -124,7 +125,8 @@ namespace __parallel adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper, random_access_iterator_tag, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism parallelism + = __gnu_parallel::parallel_unbalanced); template<typename _IIter1, typename _IIter2, typename _Tp> _Tp @@ -164,7 +166,8 @@ namespace __parallel inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, BinaryFunction1, BinaryFunction2, random_access_iterator_tag, random_access_iterator_tag, - __gnu_parallel::_Parallelism); + __gnu_parallel::_Parallelism + = __gnu_parallel::parallel_unbalanced); template<typename _IIter1, typename _IIter2, typename _Tp, typename _BinaryFunction1, typename _BinaryFunction2, diff --git a/libstdc++-v3/include/parallel/par_loop.h b/libstdc++-v3/include/parallel/par_loop.h index c8d2a220ca8..a028ecb6af6 100644 --- a/libstdc++-v3/include/parallel/par_loop.h +++ b/libstdc++-v3/include/parallel/par_loop.h @@ -42,6 +42,7 @@ #include <omp.h> #include <parallel/settings.h> #include <parallel/base.h> +#include <parallel/equally_split.h> namespace __gnu_parallel { @@ -80,9 +81,9 @@ template<typename RandomAccessIterator, { typedef std::iterator_traits<RandomAccessIterator> traits_type; typedef typename traits_type::difference_type difference_type; - const difference_type length = end - begin; Result *thread_results; + bool* constructed; thread_index_t num_threads = __gnu_parallel::min<difference_type>(get_max_threads(), length); @@ -92,13 +93,15 @@ template<typename RandomAccessIterator, # pragma omp single { num_threads = omp_get_num_threads(); - thread_results = new Result[num_threads]; + thread_results = static_cast<Result*>( + ::operator new(num_threads * sizeof(Result))); + constructed = new bool[num_threads]; } thread_index_t iam = omp_get_thread_num(); // Neutral element. - Result reduct = Result(); + Result* reduct = static_cast<Result*>(::operator new(sizeof(Result))); difference_type start = equally_split_point(length, num_threads, iam), @@ -106,23 +109,30 @@ template<typename RandomAccessIterator, if (start < stop) { - reduct = f(o, begin + start); + new(reduct) Result(f(o, begin + start)); ++start; + constructed[iam] = true; } + else + constructed[iam] = false; for (; start < stop; ++start) - reduct = r(reduct, f(o, begin + start)); + *reduct = r(*reduct, f(o, begin + start)); - thread_results[iam] = reduct; + thread_results[iam] = *reduct; } //parallel for (thread_index_t i = 0; i < num_threads; ++i) - output = r(output, thread_results[i]); + if (constructed[i]) + output = r(output, thread_results[i]); // Points to last element processed (needed as return value for // some algorithms like transform). f.finish_iterator = begin + length; + delete[] thread_results; + delete[] constructed; + return o; } diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset index 67dfd694551..f8f001f8b6f 100644 --- a/libstdc++-v3/include/std/bitset +++ b/libstdc++-v3/include/std/bitset @@ -1,6 +1,6 @@ // <bitset> -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -1326,7 +1326,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) typename __istream_type::sentry __sentry(__is); if (__sentry) { - try + __try { for (size_t __i = _Nb; __i > 0; --__i) { @@ -1355,12 +1355,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __is._M_setstate(__ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __is._M_setstate(__ios_base::badbit); } } diff --git a/libstdc++-v3/include/tr1/hypergeometric.tcc b/libstdc++-v3/include/tr1/hypergeometric.tcc index 5e6902f98ed..e5f35e29111 100644 --- a/libstdc++-v3/include/tr1/hypergeometric.tcc +++ b/libstdc++-v3/include/tr1/hypergeometric.tcc @@ -1,6 +1,6 @@ // Special functions -*- C++ -*- -// Copyright (C) 2006, 2007, 2008 +// Copyright (C) 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -477,13 +477,13 @@ namespace tr1 bool __ok_d1 = true; _Tp __lng_ad, __lng_ad1, __lng_bd1; - try + __try { __lng_ad = __log_gamma(__ad); __lng_ad1 = __log_gamma(__a + __d1); __lng_bd1 = __log_gamma(__b + __d1); } - catch(...) + __catch(...) { __ok_d1 = false; } @@ -525,12 +525,12 @@ namespace tr1 // Evaluate F2. bool __ok_d2 = true; _Tp __lng_ad2, __lng_bd2; - try + __try { __lng_ad2 = __log_gamma(__a + __d2); __lng_bd2 = __log_gamma(__b + __d2); } - catch(...) + __catch(...) { __ok_d2 = false; } @@ -600,14 +600,14 @@ namespace tr1 bool __ok1 = true; _Tp __sgn_g1ca = _Tp(0), __ln_g1ca = _Tp(0); _Tp __sgn_g1cb = _Tp(0), __ln_g1cb = _Tp(0); - try + __try { __sgn_g1ca = __log_gamma_sign(__c - __a); __ln_g1ca = __log_gamma(__c - __a); __sgn_g1cb = __log_gamma_sign(__c - __b); __ln_g1cb = __log_gamma(__c - __b); } - catch(...) + __catch(...) { __ok1 = false; } @@ -615,14 +615,14 @@ namespace tr1 bool __ok2 = true; _Tp __sgn_g2a = _Tp(0), __ln_g2a = _Tp(0); _Tp __sgn_g2b = _Tp(0), __ln_g2b = _Tp(0); - try + __try { __sgn_g2a = __log_gamma_sign(__a); __ln_g2a = __log_gamma(__a); __sgn_g2b = __log_gamma_sign(__b); __ln_g2b = __log_gamma(__b); } - catch(...) + __catch(...) { __ok2 = false; } diff --git a/libstdc++-v3/include/tr1/shared_ptr.h b/libstdc++-v3/include/tr1/shared_ptr.h index 2dcb90a397a..a21561433d9 100644 --- a/libstdc++-v3/include/tr1/shared_ptr.h +++ b/libstdc++-v3/include/tr1/shared_ptr.h @@ -1,6 +1,6 @@ // <tr1/shared_ptr.h> -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -110,13 +110,13 @@ namespace tr1 template<typename _Ptr> __shared_count(_Ptr __p) : _M_pi(0) { - try + __try { typedef typename std::tr1::remove_pointer<_Ptr>::type _Tp; _M_pi = new _Sp_counted_base_impl<_Ptr, _Sp_deleter<_Tp>, _Lp>( __p, _Sp_deleter<_Tp>()); } - catch(...) + __catch(...) { delete __p; __throw_exception_again; @@ -126,11 +126,11 @@ namespace tr1 template<typename _Ptr, typename _Deleter> __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0) { - try + __try { _M_pi = new _Sp_counted_base_impl<_Ptr, _Deleter, _Lp>(__p, __d); } - catch(...) + __catch(...) { __d(__p); // Call _Deleter on __p. __throw_exception_again; @@ -709,11 +709,11 @@ namespace tr1 if (expired()) return __shared_ptr<element_type, _Lp>(); - try + __try { return __shared_ptr<element_type, _Lp>(*this); } - catch(const bad_weak_ptr&) + __catch(const bad_weak_ptr&) { // Q: How can we get here? // A: Another thread may have invalidated r after the @@ -958,11 +958,11 @@ namespace tr1 if (this->expired()) return shared_ptr<_Tp>(); - try + __try { return shared_ptr<_Tp>(*this); } - catch(const bad_weak_ptr&) + __catch(const bad_weak_ptr&) { return shared_ptr<_Tp>(); } diff --git a/libstdc++-v3/include/tr1_impl/hashtable b/libstdc++-v3/include/tr1_impl/hashtable index c6f1ac7aff6..c8651088cb2 100644 --- a/libstdc++-v3/include/tr1_impl/hashtable +++ b/libstdc++-v3/include/tr1_impl/hashtable @@ -1,6 +1,6 @@ // Internal header for TR1 unordered_set and unordered_map -*- C++ -*- -// Copyright (C) 2007, 2008 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -482,7 +482,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 _M_allocate_node(const value_type& __v) { _Node* __n = _M_node_allocator.allocate(1); - try + __try { #ifdef _GLIBCXX_INCLUDE_AS_CXX0X _M_node_allocator.construct(__n, __v); @@ -492,7 +492,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 __n->_M_next = 0; return __n; } - catch(...) + __catch(...) { _M_node_allocator.deallocate(__n, 1); __throw_exception_again; @@ -624,12 +624,12 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 __distance_fw(__f, __l))); _M_buckets = _M_allocate_buckets(_M_bucket_count); - try + __try { for (; __f != __l; ++__f) this->insert(*__f); } - catch(...) + __catch(...) { clear(); _M_deallocate_buckets(_M_buckets, _M_bucket_count); @@ -654,7 +654,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 _M_rehash_policy(__ht._M_rehash_policy) { _M_buckets = _M_allocate_buckets(_M_bucket_count); - try + __try { for (size_type __i = 0; __i < __ht._M_bucket_count; ++__i) { @@ -669,7 +669,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 } } } - catch(...) + __catch(...) { clear(); _M_deallocate_buckets(_M_buckets, _M_bucket_count); @@ -946,7 +946,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 // do a rehash if the allocation throws. _Node* __new_node = _M_allocate_node(__v); - try + __try { if (__do_rehash.first) { @@ -961,7 +961,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 ++_M_element_count; return iterator(__new_node, _M_buckets + __n); } - catch(...) + __catch(...) { _M_deallocate_node(__new_node); __throw_exception_again; @@ -1239,7 +1239,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 _M_rehash(size_type __n) { _Node** __new_array = _M_allocate_buckets(__n); - try + __try { for (size_type __i = 0; __i < _M_bucket_count; ++__i) while (_Node* __p = _M_buckets[__i]) @@ -1253,7 +1253,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 _M_bucket_count = __n; _M_buckets = __new_array; } - catch(...) + __catch(...) { // A failure here means that a hash function threw an exception. // We can't restore the previous state without calling the hash diff --git a/libstdc++-v3/libsupc++/eh_call.cc b/libstdc++-v3/libsupc++/eh_call.cc index 497d8623c67..1f64cfde224 100644 --- a/libstdc++-v3/libsupc++/eh_call.cc +++ b/libstdc++-v3/libsupc++/eh_call.cc @@ -1,5 +1,6 @@ // -*- C++ -*- Helpers for calling unextected and terminate -// Copyright (C) 2001, 2002, 2003, 2008 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +// Free Software Foundation, Inc. // // This file is part of GCC. // @@ -108,14 +109,14 @@ __cxa_call_unexpected(void* exc_obj_in) } end_catch_protect_obj; - try + __try { if (foreign_exception) std::unexpected(); else __unexpected(unexpectedHandler); } - catch(...) + __catch(...) { /* See if the new exception matches the rtti list. */ if (foreign_exception) diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc index 12b54c16587..177fe417584 100644 --- a/libstdc++-v3/libsupc++/eh_personality.cc +++ b/libstdc++-v3/libsupc++/eh_personality.cc @@ -1,5 +1,6 @@ // -*- C++ -*- The GNU C++ exception personality routine. -// Copyright (C) 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +// Free Software Foundation, Inc. // // This file is part of GCC. // @@ -664,9 +665,9 @@ PERSONALITY_FUNCTION (int version, std::terminate (); else if (handler_switch_value < 0) { - try + __try { std::unexpected (); } - catch(...) + __catch(...) { std::terminate (); } } } @@ -753,9 +754,9 @@ __cxa_call_unexpected (void *exc_obj_in) xh_terminate_handler = xh->terminateHandler; info.ttype_base = (_Unwind_Ptr) xh->catchTemp; - try + __try { __unexpected (xh->unexpectedHandler); } - catch(...) + __catch(...) { // Get the exception thrown from unexpected. diff --git a/libstdc++-v3/libsupc++/exception_defines.h b/libstdc++-v3/libsupc++/exception_defines.h index 446ed9466cb..342806bbb86 100644 --- a/libstdc++-v3/libsupc++/exception_defines.h +++ b/libstdc++-v3/libsupc++/exception_defines.h @@ -1,6 +1,7 @@ // -fno-exceptions Support -*- C++ -*- -// Copyright (C) 2001, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2006, 2007, 2008, 2009 +// Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -40,11 +41,13 @@ #ifndef __EXCEPTIONS // Iff -fno-exceptions, transform error handling code to work without it. -# define try if (true) -# define catch(X) if (false) +# define __try if (true) +# define __catch(X) if (false) # define __throw_exception_again #else // Else proceed normally. +# define __try try +# define __catch(X) catch(X) # define __throw_exception_again throw #endif diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h index 3f57b431e61..ae07db5f794 100644 --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -1,6 +1,6 @@ // Exception Handling support header (exception_ptr class) for -*- C++ -*- -// Copyright (C) 2008 Free Software Foundation +// Copyright (C) 2008, 2009 Free Software Foundation // // This file is part of GCC. // @@ -39,6 +39,7 @@ #pragma GCC visibility push(default) #include <bits/c++config.h> +#include <exception_defines.h> #if !defined(_GLIBCXX_ATOMIC_BUILTINS_4) # error This platform does not support exception propagation. @@ -152,11 +153,11 @@ namespace std template <class _Ex> exception_ptr copy_exception(_Ex __ex) throw() { - try + __try { throw __ex; } - catch(...) + __catch(...) { return current_exception (); } diff --git a/libstdc++-v3/src/bitmap_allocator.cc b/libstdc++-v3/src/bitmap_allocator.cc index 46b4d3c2bab..1d30b96a701 100644 --- a/libstdc++-v3/src/bitmap_allocator.cc +++ b/libstdc++-v3/src/bitmap_allocator.cc @@ -1,6 +1,7 @@ // Bitmap Allocator. Out of line function definitions. -*- C++ -*- -// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 +// Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -75,12 +76,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { size_t* __ret = 0; --__ctr; - try + __try { __ret = reinterpret_cast<size_t*> (::operator new(__sz + sizeof(size_t))); } - catch(...) + __catch(...) { this->_M_clear(); } diff --git a/libstdc++-v3/src/compatibility.cc b/libstdc++-v3/src/compatibility.cc index b4f942d3ce7..13f13cfcc98 100644 --- a/libstdc++-v3/src/compatibility.cc +++ b/libstdc++-v3/src/compatibility.cc @@ -1,6 +1,6 @@ // Compatibility symbols for previous versions -*- C++ -*- -// Copyright (C) 2005, 2006, 2009 +// Copyright (C) 2005, 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -115,12 +115,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -142,7 +142,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); @@ -186,12 +186,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); diff --git a/libstdc++-v3/src/ios.cc b/libstdc++-v3/src/ios.cc index fc140c0c3c3..ec07ef06888 100644 --- a/libstdc++-v3/src/ios.cc +++ b/libstdc++-v3/src/ios.cc @@ -1,6 +1,7 @@ // Iostreams base classes -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -125,9 +126,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__ix < numeric_limits<int>::max()) { __newsize = __ix + 1; - try + __try { __words = new _Words[__newsize]; } - catch(...) + __catch(...) { _M_streambuf_state |= badbit; if (_M_streambuf_state & _M_exception) @@ -170,9 +171,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _Callback_list* __p = _M_callbacks; while (__p) { - try + __try { (*__p->_M_fn) (__e, *this, __p->_M_index); } - catch(...) + __catch(...) { } __p = __p->_M_next; } diff --git a/libstdc++-v3/src/ios_init.cc b/libstdc++-v3/src/ios_init.cc index 50621aaeb5a..9db8f7d5634 100644 --- a/libstdc++-v3/src/ios_init.cc +++ b/libstdc++-v3/src/ios_init.cc @@ -1,6 +1,7 @@ // Iostreams base classes -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -129,7 +130,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__gnu_cxx::__exchange_and_add_dispatch(&_S_refcount, -1) == 2) { // Catch any exceptions thrown by basic_ostream::flush() - try + __try { // Flush standard output streams as required by 27.4.2.1.6 cout.flush(); @@ -142,7 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) wclog.flush(); #endif } - catch(...) + __catch(...) { } } } diff --git a/libstdc++-v3/src/istream.cc b/libstdc++-v3/src/istream.cc index 319202ee4c3..a5b7f605fe8 100644 --- a/libstdc++-v3/src/istream.cc +++ b/libstdc++-v3/src/istream.cc @@ -1,6 +1,7 @@ // Input streams -*- C++ -*- -// Copyright (C) 2004, 2005 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 +// Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -45,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); @@ -91,12 +92,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -123,7 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const char_type __cdelim = traits_type::to_char_type(__delim); const int_type __eof = traits_type::eof(); @@ -182,12 +183,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __sb->sbumpc(); } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -211,7 +212,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { // Figure out how many characters to extract. streamsize __num = __in.width(); @@ -261,12 +262,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) *__s = __char_type(); __in.width(0); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { __in._M_setstate(ios_base::badbit); } } if (!__extracted) @@ -294,7 +295,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __istream_type::sentry __cerb(__in, false); if (__cerb) { - try + __try { __str.erase(); const streamsize __w = __in.width(); @@ -336,12 +337,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __err |= ios_base::eofbit; __in.width(0); } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> @@ -376,7 +377,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __istream_type::sentry __cerb(__in, true); if (__cerb) { - try + __try { __str.erase(); const __int_type __idelim = __traits_type::to_int_type(__delim); @@ -421,12 +422,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> @@ -452,7 +453,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) sentry __cerb(*this, true); if (__cerb) { - try + __try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); @@ -498,12 +499,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } } // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -530,7 +531,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); - try + __try { const char_type __cdelim = traits_type::to_char_type(__delim); const int_type __eof = traits_type::eof(); @@ -589,12 +590,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __sb->sbumpc(); } } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); @@ -622,7 +623,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __istream_type::sentry __cerb(__in, true); if (__cerb) { - try + __try { __str.erase(); const __int_type __idelim = __traits_type::to_int_type(__delim); @@ -667,12 +668,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __err |= ios_base::failbit; } - catch(__cxxabiv1::__forced_unwind&) + __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); __throw_exception_again; } - catch(...) + __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index 7c30fc0bfe3..c87fcc93593 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -1,5 +1,5 @@ -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -// 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -256,7 +256,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : _M_refcount(__refs), _M_facets(0), _M_facets_size(__imp._M_facets_size), _M_caches(0), _M_names(0) { - try + __try { _M_facets = new const facet*[_M_facets_size]; for (size_t __i = 0; __i < _M_facets_size; ++__i) @@ -285,7 +285,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) std::memcpy(_M_names[__l], __imp._M_names[__l], __len); } } - catch(...) + __catch(...) { this->~_Impl(); __throw_exception_again; @@ -337,11 +337,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // New cache array. const facet** __oldc = _M_caches; const facet** __newc; - try + __try { __newc = new const facet*[__new_size]; } - catch(...) + __catch(...) { delete [] __newf; __throw_exception_again; diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc index 5f5ec5f62e9..875dbd4a3e1 100644 --- a/libstdc++-v3/src/localename.cc +++ b/libstdc++-v3/src/localename.cc @@ -1,5 +1,5 @@ // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008 +// 2006, 2007, 2008, 2009 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -166,9 +166,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __cat = _S_normalize_category(__cat); _M_impl = new _Impl(*__base._M_impl, 1); - try + __try { _M_impl->_M_replace_categories(__add._M_impl, __cat); } - catch (...) + __catch (...) { _M_impl->_M_remove_reference(); __throw_exception_again; @@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __c_locale __cloc; locale::facet::_S_create_c_locale(__cloc, __s); - try + __try { _M_facets = new const facet*[_M_facets_size]; for (size_t __i = 0; __i < _M_facets_size; ++__i) @@ -254,7 +254,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif locale::facet::_S_destroy_c_locale(__cloc); } - catch(...) + __catch(...) { locale::facet::_S_destroy_c_locale(__cloc); this->~_Impl(); diff --git a/libstdc++-v3/src/thread.cc b/libstdc++-v3/src/thread.cc index 357034f60b2..58e60cfe26b 100644 --- a/libstdc++-v3/src/thread.cc +++ b/libstdc++-v3/src/thread.cc @@ -44,11 +44,11 @@ namespace std __thread_data_ptr __local_thread_data; __local_thread_data.swap(__t->_M_this_ptr); - try + __try { __local_thread_data->_M_run(); } - catch(...) + __catch(...) { std::terminate(); } diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign.cc index 3ccc8701a0c..457312ea526 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign.cc @@ -1,7 +1,7 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// Copyright (C) 2008 Free Software Foundation +// Copyright (C) 2008, 2009 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -53,7 +53,7 @@ test03() // { dg-error "used here" "" { target *-*-* } 43 } // { dg-error "no matching" "" { target *-*-* } 49 } // { dg-error "used here" "" { target *-*-* } 50 } -// { dg-error "candidates are" "" { target *-*-* } 215 } -// { dg-error "deleted function" "" { target *-*-* } 215 } -// { dg-error "deleted function" "" { target *-*-* } 362 } +// { dg-error "candidates are" "" { target *-*-* } 214 } +// { dg-error "deleted function" "" { target *-*-* } 214 } +// { dg-error "deleted function" "" { target *-*-* } 360 } // { dg-excess-errors "note" } diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc index 37fcb6c9ed9..acff01ba260 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc @@ -1,7 +1,7 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// Copyright (C) 2008 Free Software Foundation +// Copyright (C) 2008, 2009 Free Software Foundation // // 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 @@ -37,4 +37,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 36 } -// { dg-error "deleted function" "" { target *-*-* } 352 } +// { dg-error "deleted function" "" { target *-*-* } 350 } diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc index c5e445fa6db..1f991cc938f 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2007, 2008 Free Software Foundation +// Copyright (C) 2007, 2008, 2009 Free Software Foundation // // 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 @@ -19,7 +19,7 @@ // USA. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1058 } +// { dg-error "no matching" "" { target *-*-* } 1057 } // { dg-excess-errors "" } #include <vector> diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc index dd115afd520..ff4021e12c1 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2007, 2008 Free Software Foundation +// Copyright (C) 2007, 2008, 2009 Free Software Foundation // // 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 @@ -19,7 +19,7 @@ // USA. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 998 } +// { dg-error "no matching" "" { target *-*-* } 997 } // { dg-excess-errors "" } #include <vector> diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc index 50e51cb8f3f..e1f53211e6e 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2007, 2008 Free Software Foundation +// Copyright (C) 2007, 2008, 2009 Free Software Foundation // // 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 @@ -19,7 +19,7 @@ // USA. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 998 } +// { dg-error "no matching" "" { target *-*-* } 997 } // { dg-excess-errors "" } #include <vector> diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc index 31642d75c5d..2c6169f1188 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2007, 2008 Free Software Foundation +// Copyright (C) 2007, 2008, 2009 Free Software Foundation // // 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 @@ -19,7 +19,7 @@ // USA. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1099 } +// { dg-error "no matching" "" { target *-*-* } 1098 } // { dg-excess-errors "" } #include <vector> |