summaryrefslogtreecommitdiffstats
path: root/gcc/c-convert.c
Commit message (Collapse)AuthorAgeFilesLines
* * c-tree.h: Add argument to c_objc_common_truthvalue_conversion,aldyh2008-09-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parser_build_binary_op. * c-decl.c (build_enumerator): Pass location to build_binary_op. * c-typeck.c (build_array_ref): Same. (parser_build_unary_op): New location argument. (pointer_diff): Pass location to build_binary_op, c_objc_common_truthvalue_conversion. (build_modify_expr): Same. (build_unary_op): New location argument. (build_binary_op): New location argument. (c_objc_common_truthvalue_conversion): Pass location to c_*common_truthvalue_conversion. * c-convert.c (convert): Same. * c-common.c (binary_op_error): New location argument. (pointer_int_sum): Pass location to build_binary_op. (c_common_truthvalue_conversion): New location argument. (warn_for_sign_compare): Same. * c-common.h: Add location argument to c_common_truthvalue_conversion, binary_op_error, build_binary_op, warn_for_sign_compare. * c-parser.c (c_parser_condition): Pass location to c_*common_truthvalue_conversion. (c_parser_conditional_expression): Save condition's location and pass it on down. (c_parser_binary_expression): Same, but for the binary operator's location. (c_parser_omp_for_loop): Pass location to c_objc_common_truthvalue_conversion. objc/ * objc-act.c (next_sjlj_build_enter_and_setjmp): Call c_common_truthvalue_conversion with location. (next_sjlj_build_catch_list): Same. (next_sjlj_build_try_catch_finally): Same. testsuite/ * gcc.dg/Walways-true-1.c: Test column numbers. * gcc.dg/c90-const-expr-5.c: Same. * gcc.dg/compare4.c: Same. * gcc.dg/Werror-1.c: Same. cp/ * typeck.c (build_array_ref): Pass location to cp_build_binary_op. (get_member_function_from_ptrfunc): Same. (build_x_binary_op): Same. (build_binary_op): Same. (cp_build_binary_op): New location argument. (pointer_diff): Pass location to cp_build_binary_op. (cp_truthvalue_conversion): Pass location to build_binary_op. (convert_ptrmem): Pass location to cp_build_binary_op. (cp_build_modify_expr): Same. (build_ptrmemfunc): Same. * init.c (expand_cleanup_for_base): Pass location to c_common_truthvalue_conversion. (build_new_1): Pass location to cp_build_binary_op. (build_vec_delete_1): Pass location to *build_binary_op, c_common_truthvalue_conversion. (build_vec_init): Same. (build_delete): Same. * decl.c (compute_array_index_type): Same. * call.c (build_new_op): Same. * rtti.c (build_dynamic_cast_1): Same. * cp-tree.h: Add argument to cp_build_binary_op. * semantics.c (handle_omp_for_class_iterator): Pass location to *build_binary_op, c_common_truthvalue_conversion. * decl2.c (get_guard_cond): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140598 138bc75d-0d04-0410-961f-82ee72b054a4
* * ginclude/stdfix.h: New file.chaoyingfu2007-09-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (USER_H): Add $(srcdir)/ginclude/stdfix.h. (convert.o): Add dependence on fixed-value.h. * c-convert.c (convert): Support FIXED_POINT_TYPE. * c-cppbuiltin.c (builtin_define_fixed_point_constants): New function to define fixed-point constants. (c_cpp_builtins): Define fixed-point constants. * convert.c (fixed-value.h): New include. (convert_to_real): Update comment to include fixed-point. Support FIXED_POINT_TYPE. (convert_to_integer): Update comment to include fixed-point. Support FIXED_POINT_TYPE. (convert_to_complex): Support FIXED_POINT_TYPE. (convert_to_fixed): New function. * convert.h (convert_to_fixed): Declare. * genopinit.c: Add comment about $Q for only fixed-point modes. (optabs): Add fract_optab, fractuns_optab, satfract_optab, satfractuns_optab, add_optab, ssadd_optab, usadd_optab, sub_optab, sssub_optab, ussub_optab, smul_optab, ssmul_optab, usmul_optab, ssmadd_widen_optab, usmadd_widen_optab, ssdiv_optab, udiv_optab, usdiv_optab, ssashl_optab, usashl_optab, neg_optab, ssneg_optab, usneg_optab for fixed-point modes. (gen_insn): Add force_fixed to track the $Q format for all fixed-point modes. * optabs.c (optab_for_tree_code): For *DIV_EXPR, LSHIFT_EXPR, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, NEGATE_EXPR, return signed or unsigned saturation optabs, when type is saturating. (shift_optab_p): Return true for SS_ASHIFT or US_ASHIFT. (expand_fixed_convert): New function. (gen_fixed_libfunc, gen_signed_fixed_libfunc, gen_unsigned_fixed_libfunc, gen_int_fp_fixed_libfunc, gen_int_fp_signed_fixed_libfunc, gen_int_fixed_libfunc, gen_int_signed_fixed_libfunc, gen_int_unsigned_fixed_libfunc, gen_fract_conv_libfunc, gen_fractuns_conv_libfunc, gen_satfract_conv_libfunc, gen_satfractuns_conv_libfunc): New functions. (init_optabs): Initialize ssadd_optab, usadd_optab, sssub_optab, ussub_optab, ssmul_optab, usmul_optab, ssmadd_widen_optab, usmadd_widen_optab, ssmsub_widen_optab, usmsub_widen_optab, ssdiv_optab, usdiv_optab, ssashl_optab, usashl_optab, ssneg_optab, usneg_optab, fract_optab, fractuns_optab, satfract_optab, satfractuns_optab. Initialize fixed-point libraries, including add, ssadd, usadd, sub, sssub, ussub, mul, ssmul, usmul, div, ssdiv, udiv, usdiv, ashl, ssashl, usashl, ashr, lshr, neg, ssneg, usneg, cmp, fract, satfract, fractuns, satfractuns. * optabs.h (enum optab_index): Add OTI_ssadd, OTI_usadd, OTI_sssub, OTI_ussub, OTI_ssmul, OTI_usmul, OTI_ssdiv, OTI_usdiv, OTI_ssneg, OTI_usneg, OTI_ssashl, OTI_usashl, OTI_ssmadd_widen, OTI_usmadd_widen, OTI_ssmsub_widen, OTI_usmsub_widen. (ssadd_optab, usadd_optab, sssub_optab, ussub_optab, ssmul_optab, usmul_optab, ssdiv_optab, usdiv_optab, ssneg_optab, usneg_optab, ssashl_optab, usashl_optab, ssmadd_widen_optab, usmadd_widen_optab, umsub_widen_optab, usmsub_widen_optab): Define. (enum convert_optab_index): Add COI_fract, COI_fractuns, COI_satfract, COI_satfractuns. (fract_optab, fractuns_optab, satfract_optab, satfractuns_optab): Define. (expand_fixed_convert): Declare. * expr.c (convert_move): Support the move of fixed-point modes. (emit_move_insn_1): Handle fixed-point mode to move via integer. (categorize_ctor_elements_1): Handle FIXED_CST. (count_type_elements): Handle FIXED_POINT_TYPE. (expand_expr_real_1): For VECTOR_CST, check MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. Support FIXED_CST. For PLUS_EXPR and MINUS_EXPR, support saturating and non-saturating multiply and add/subtract for fixed-point types. For MULT_EXPR, *DIV_EXPR, *SHIFT_EXPR, if the mode if a fixed-point mode, we jump to binop directly. Support FIXED_CONVERT_EXPR. (do_store_flag): Check FIXED_CST to put a constant second. (vector_mode_valid_p): Handle MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (const_vector_from_tree): Support FIXED_CST. * doc/extend.texi (Fixed-Point): New node. * doc/md.texi (ssadd, usadd, sssub, ussub, ssmul, usmul, ssdiv, usdiv, ssmadd, usmadd, ssmsub, usmsub, ssashl, usashl, ssneg, usneg, fract, satfract, fractuns, satfractuns): Document them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128218 138bc75d-0d04-0410-961f-82ee72b054a4
* Change copyright header to refer to version 3 of the GNU General Public ↵nickc2007-07-261-5/+4
| | | | | | License and to point readers at the COPYING3 file and the FSF's license web page. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126948 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (c_sizeof_or_alignof_type): Use fold_convert insteadjsm282005-12-031-20/+3
| | | | | | | | | | | | | | | | | | | | | of building a NOP_EXPR. (c_alignof_expr): Likewise. Handle CONVERT_EXPR the same as NOP_EXPR. * c-convert.c (convert): Use fold_convert instead of building NOP_EXPRs and CONVERT_EXPRs directly. Don't special case c_objc_common_truthvalue_conversion returning a NOP_EXPR. Remove #if 0 code. * c-pretty-print.c (pp_c_cast_expression, pp_c_expression): Handle NOP_EXPR the same as CONVERT_EXPR. * c-typeck.c (build_function_call): Use fold_convert instead of building a NOP_EXPR directly. (build_compound_expr): Handle NOP_EXPR the same as CONVERT_EXPR. testsuite: * gcc.dg/cast-pretty-print-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108001 138bc75d-0d04-0410-961f-82ee72b054a4
* * target.h (invalid_conversion, invalid_unary_op,jsm282005-06-281-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | invalid_binary_op): New hooks. * target-def.h (TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP, TARGET_INITIALIZER): Likewise. * hooks.h (hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): New. * hooks.c (hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Likewise. * gcc/doc/tm.texi (TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP): Document. * c-convert.c (convert): Use invalid_conversion hook. * c-typeck.c (build_unary_op): Use invalid_unary_op hook. (build_binary_op): Use invalid_binary_op hook. * config/ia64/ia64-modes.def: Define RFmode. * config/ia64/ia64-protos.h (spill_xfmode_operand): Remove. (ia64_expand_movxf_movrf): New. * config/ia64/ia64.md (movxf): Move code to ia64_expand_movxf_movrf. (movrf, movrf_internal): New. * ia64.c (ia64_invalid_conversion, ia64_invalid_unary_op, ia64_invalid_binary_op, TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP): New. (spill_xfmode_operand): Rename to spill_xfmode_rfmode_operand. Add mode parameter. Make static. (ia64_expand_movxf_movrf): New, moved from ia64.md. Handle RFmode as well as XFmode. (ia64_function_arg, ia64_function_value, ia64_register_move_cost, ia64_scalar_mode_supported_p): Handle RFmode as well as XFmode. (ia64_init_builtins): Set up __fpreg as RFmode. (ia64_mangle_fundamental_type): Mangle __fpreg as u7__fpreg. cp: * cvt.c (ocp_convert): Use invalid_conversion hook. * typeck.c (build_binary_op): Use invalid_binary_op hook. (build_unary_op): Use invalid_unary_op hook. testsuite: * g++.dg/ext/fpreg1.C, gcc.target/ia64/fpreg-1.c, gcc.target/ia64/fpreg-2.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101391 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c, c-common.c, c-convert.c, c-decl.c, c-typeck.c,kazu2005-06-261-3/+3
| | | | | | | | | | | | | convert.c, lambda-code.c, predict.c, tree-cfg.c, tree-complex.c, tree-data-ref.c, tree-if-conv.c, tree-mudflap.c, tree-scalar-evolution.c, tree-ssa-ccp.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-phiopt.c, tree-ssa-pre.c, tree-vect-analyze.c, tree-vect-transform.c, tree-vectorizer.c, tree.c: Use fold_buildN instead of fold (buildN (...)). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101338 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kcook2005-06-251-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101317 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtin-types.def, c-convert.c, c-format.c, ddg.c, debug.c,kazu2005-03-291-1/+1
| | | | | | | | | debug.h, et-forest.c, et-forest.h, gcov.c, rtl-profile.c, rtlhooks-def.h, rtlhooks.c, sdbout.c, tree-inline.h, tree-profile.c, tsystem.h, value-prof.h: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97209 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (c_common_truthvalue_conversion): Adjust comment.jsm282005-03-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call c_common_truthvalue_conversion rather than lang_hooks.truthvalue_conversion. * c-convert.c (convert): Call c_objc_common_truthvalue_conversion. * c-objc-common.c (c_objc_common_truthvalue_conversion): Move to c-typeck.c. * c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Change to c_common_truthvalue_conversion. * c-parser.c (c_parser_paren_condition, c_parser_for_statement, c_parser_conditional_expression, c_parser_binary_expression): Call c_objc_common_truthvalue_conversion. * c-typeck.c (build_unary_op): Call c_objc_common_truthvalue_conversion. (build_conditional_expr): Do not call lang_hooks.truthvalue_conversion. (build_binary_op): Call c_common_truthvalue_conversion. (c_objc_common_truthvalue_conversion): Moved from c-objc-common.c. Call default_function_array_conversion instead of default_conversion. objc: * objc-act.c (next_sjlj_build_enter_and_setjmp, next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally): Call c_common_truthvalue_conversion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96917 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge tree-ssa-20020619-branch into mainline.dnovillo2004-05-131-0/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) ()sayle2004-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with lang_hooks.foo (). * builtins.c (expand_builtin_va_arg): Likewise. * c-common.c (fname_as_string, c_common_truthvalue_conversion, c_common_type_for_mode, c_common_nodes_and_builtins, handle_mode_attribute, handle_vector_size_attribute): Likewise. * c-convert.c (convert): Likewise. * c-format.c (check_format_types): Likewise. * c-objc-common.c (c_tree_printer): Likewise. * c-typeck.c (build_unary_op, build_conditional_expr, build_binary_op): Likewise. * calls.c (try_to_integrate, expand_call, emit_library_call_value_1): Likewise. * cgraph.c (cgraph_node_name, cgraph_function_possibly_inlined_p): Likewise. * cgraphunit.c (record_call_1, cgraph_analyze_function, cgraph_expand_function): Likewise. * convert.c (convert_to_pointer, convert_to_integer): Likewise. * coverage.c (build_fn_info_type, build_ctr_info_type, build_gcov_info, create_coverage): Likewise. * dbxout.c (dbxout_init): Likewise. * diagnostic.c (diagnostic_report_current_function): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2_name): Likewise. * except.c (init_eh): Likewise. * explow.c (expr_size, int_expr_size): Likewise. * expmed.c (make_tree, const_mult_add_overflow_p, expand_mult_add): Likewise. * expr.c (store_expr, store_constructor, safe_from_p, expand_expr_real, do_store_flag, try_casesi): Likewise. * function.c (push_function_context_to, pop_function_context_from, free_after_parsing, assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack, allocate_struct_function, current_function_name): Likewise. * integrate.c (copy_decl_for_inlining, expand_inline_function): Likewise. * langhooks.c (lhd_clear_binding_stack, write_global_declarations, lhd_print_error_function): Likewise. * opts.c (handle_option, decode_options): Likewise. * passes.c (open_dump_file): Likewise. * print-tree.c (print_node): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_asm_operands, expand_decl_cleanup, emit_case_nodes): Likewise. * stor-layout.c (variable_size): Likewise. * toplev.c (announce_function, wrapup_global_declarations, check_global_declarations, compile_file, default_tree_printer, process_options, lang_dependent_init, finalize): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-inline.c (remap_decl, remap_block, copy_body_r, initialize_inlined_parameters, declare_return_variable, inlinable_function_p, expand_call_inline, optimize_inline_calls, walk_tree, copy_tree_r): Likewise. * tree-optimize.c (tree_rest_of_compilation): Likewise. * tree.c (decl_assembler_name, tree_size, size_in_bytes, staticp, unsafe_for_reeval, get_unwidened, get_narrower, get_callee_fndecl, variably_modified_type_p, dump_tree_statistics): Likewise. * varasm.c (assemble_variable, compare_constant, copy_constant, force_const_mem, compute_reloc_for_constant, output_constant, output_addressed_constants, initializer_constant_valid_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79481 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/kazu2004-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | * alloc-pool.h, c-convert.c, c-lang.c, c-tree.h, caller-save.c, df.h, genconfig.c, global.c, lcm.c, ra-rewrite.c, ra.c, regclass.c, regs.h, resource.c, sched-rgn.c, config/arm/aof.h, config/arm/cirrus.md, config/arm/fpa.md, config/arm/iwmmxt.md, config/arm/netbsd-elf.h, config/arm/netbsd.h, config/m68hc11/m68hc11.md, config/mips/iris5.h, config/mn10300/mn10300.md, config/rs6000/altivec.md, config/sparc/netbsd-elf.h: Update copyright. cp/ * error.c, search.c: Update copyright. java/ * typeck.c: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77265 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-02-03 Paolo Bonzini <bonzini@gnu.org>paolo2004-02-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c/11658 PR c/13994 * Makefile.in (c-parse.o, c-convert.o, c-typeck.o): Depend on langhooks.h. * objc/Make-lang.in (objc-parse.o): Depend on langhooks.h. * c-parse.in, c-convert.c, c-typeck.c, objc/objc-act.c: Include langhooks.h. Replace c_common_truthvalue_conversion with the truthvalue_conversion language hook throughout. (expr_no_commas): Call default_conversion before save_expr for the first term of the production 'x ? : y'. * c-common.c (c_common_truthvalue_conversion): Remove obsolete block. Invoke recursively the hook instead of this function. * c-convert.c (convert): handle ERROR_MARK_NODE. * c-typeck.c (build_binary_op): handle ERROR_MARK_NODE returned by the truthvalue_conversion language hook. * c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Use c_objc_common_truthvalue_conversion. * c-objc-common.c (c_objc_common_truthvalue_conversion): New function. * c-tree.h (c_objc_common_truthvalue_conversion): Declare it. * objc/objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Use c_objc_common_truthvalue_conversion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77168 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-aux-info.c: Convert to ISO C99.aj2003-06-191-3/+3
| | | | | | | | | | | | | | | | * c-pragma.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-convert.c: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-decl.c: Likewise * c-format.c: Likewise. * c-incpath.c: Likewise. * c-incpath.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68218 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix last change: c-common.h instead of c-convert.h.schwab2002-04-051-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51916 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-convert.c: Include c-convert.h.schwab2002-04-051-1/+2
| | | | | | | * Makefile.in (c-convert.o): Updated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51915 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (truthvalue_conversion): Rename, update.neil2002-04-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (c_common_truthvalue_conversion): New. * c-convert.c (convert): Update. * c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * c-parse.in (expr_no_commas, if_prefix, select_or_iter_stmt): Update. * c-typeck.c (build_binary_op, build_unary_op, build_conditional_expr): Update. * fold-const.c (constant_boolean_node, fold): Use langhook. * langhooks-def.h (LANGHOOK_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. * stmt.c (expand_decl_cleanup): Use langhook. * tree.h (truthvalue_conversion): Remove. ada: * gigi.h (truthvalue_conversion): Rename. * misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * trans.c (tree_transform): Update. * utils2.c (truthvalue_conversion): Rename, update. (build_binary_op, build_unary_op): Update. cp: * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. * cvt.c: Update comment. * init.c (expand_cleanup_for_base): Update. * semantics.c (finish_parenthesized_expr): Update. * typeck.c (cp_truthvalue_conversion): Update. f: * com.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. (truthvalue_conversion): Rename. Update. Make static. (ffecom_truth_value): Update. java: * expr.c (truthvalue_conversion): Rename. Update. (expand_compare): Update. * java-tree.h (java_truthvalue_conversion): New. * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. objc: * objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51880 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-10-10 Stan Shebs <shebs@apple.com>shebs2001-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46173 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,gerald2001-08-221-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45105 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-convert.c (convert): When converting to a BOOLEAN_TYPE, avoidjsm282001-04-231-1/+9
| | | | | | | | | | passing nested NOP_EXPRs to fold. testsuite: * gcc.c-torture/compile/20010423-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41508 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (boolean_increment): New function.jsm282000-11-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (enum c_tree_index): Add CTI_C_BOOL_TYPE, CTI_C_BOOL_TRUE and CTI_C_BOOL_FALSE. (c_bool_type_node, c_bool_true_node, c_bool_false_node): Define. (boolean_increment): Declare. * c-convert.c (convert): Allow for BOOLEAN_TYPE. * c-decl.c (init_decl_processing): Create boolean nodes. (finish_struct): Allow for _Bool bitfields. * c-parse.in (reswords): Add _Bool. (rid_to_yy): Allow for RID_BOOL. * c-typeck.c (default_conversion): Make booleans promote to int. (convert_arguments, build_unary_op, build_modify_expr, convert_for_assignment): Allow for booleans. * ginclude/stdbool.h: Make conforming to C99. cp: * typeck.c (build_unary_op): Use boolean_increment from c-common.c, moving the relevant code there. testsuite: * gcc.dg/c99-bool-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37428 138bc75d-0d04-0410-961f-82ee72b054a4
* Vector conversions supportcrux2000-06-241-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34680 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE.kenner2000-04-101-1/+1
| | | | | | | * c-typeck.c (convert_for_assignment): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33058 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-convert.c (convert): Return if output or input type is ERROR_MARK.kenner2000-03-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c (duplicate_decls): Only look at DECL_BUILT_IN_NONANSI and DECL_INLINE if FUNCTION_DECL. (pushdecl, redeclaration_error_message): Likewise, for DECL_INLINE. (store_parm_decls): Check for type of PARM_DECL being ERROR_MARK. Use DECL_WEAK, not DECL_RESULT, to flag for already seen. (combine_parm_decls): Likewise. * ggc-common.c (gcc_mark_tree_children, case 'd'): Use DECL_RESULT_FLD. * print-tree.c (print_node): Likewise. Only test DECL_PACKED, DECL_INLINE, DECL_BIT_FIELD, and DECL_TRANSPARENT_UNION on proper decl types. Properly handly DECL_INCOMING_RTL and DECL_SAVED_INSNS. * stor-layout.c (layout_decl): Only check DECL_PACKED and DECL_BIT_FIELD of FIELD_DECL. * tree.h (DECL_RESULT_FLD): New macro. * cp/class.c (check_field_decl): Fix typo. (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. (check_methods): Likewise. (check_field_decls): Likewise. Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): Use DECL_RESULT_FLD, not DECL_RESULT. * cp/decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. * cp/lex.c (identifier_type): Likewise. * cp/pt.c (determine_specialization, lookup_template_class): Likewise. (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. (resolve_overloaded_unification, more_specialized): Likewise. * cp/semantics.c (finish_member_declaration): Likewise. * cp/typeck.c (build_x_function_call): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32759 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge in gcc2-ss-010999law1999-09-071-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29150 138bc75d-0d04-0410-961f-82ee72b054a4
* Copyright fixes.law1999-01-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24535 138bc75d-0d04-0410-961f-82ee72b054a4
* Wed May 6 06:35:38 1998 Robert Lipe <robertl@dgii.com>robertl1998-05-061-0/+1
| | | | | | | | | | | | | | * toplev.h: New file. Protypes for functions in toplev.c. * tree.h, rtl.h: Deleted protos for functions in toplev.c. * c-common.c, c-convert.c, c-decl.c, c-iterate.c, c-lex.c, c-parse.in, c-parse.y, c-pragma.c, c-typeck.c, calls.c, convert.c, dwarf2out.c, except.c, expr.c, final.c, fold-const.c, function.c, hash.c, profile.c, real.c, reg-stack.c, regclass.c, reload.c, reload1.c, stmt.c, stor-layout.c, tlink.c, tree.c, varasm.c: include it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19563 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kenner1995-06-151-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9959 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert): Handle conversion to complex type.rms1993-03-041-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3640 138bc75d-0d04-0410-961f-82ee72b054a4
* Cygnus<-->FSF merge.brendan1993-01-091-324/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3162 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): Handle TRUTH_XOR_EXPR.kenner1992-12-301-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2994 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): Don't pass truncation thru lshiftrms1992-09-111-3/+15
| | | | | | | if shift count >= width of narrower type. Instead, just use 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2104 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): When optimizing LSHIFT_EXPR andrms1992-09-091-11/+11
| | | | | | | RSHIFT_EXPR, do compares at tree level. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2086 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert): When converting to variant of same type, fold.rms1992-08-141-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1824 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert): If main variants match,rms1992-07-311-1/+3
| | | | | | | but the type is not identical, make a NOP_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1725 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert): Succeed if TYPE is the main variant of the given type.rms1992-07-281-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1698 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): Don't add a NOP_EXPR in cases where we cankenner1992-07-171-17/+14
| | | | | | | simply change the type of the entire tree. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1616 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): Push truncation inside COND_EXPR.rms1992-07-171-0/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1609 138bc75d-0d04-0410-961f-82ee72b054a4
* entered into RCSwood1992-04-211-1/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@812 138bc75d-0d04-0410-961f-82ee72b054a4
* Initial revisionrms1992-01-291-0/+397
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud