summaryrefslogtreecommitdiffstats
path: root/gcc/c-cppbuiltin.c
Commit message (Collapse)AuthorAgeFilesLines
* * ginclude/stdfix.h: New file.chaoyingfu2007-09-071-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-4/+3
| | | | | | 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
* PR target/30652ghazi2007-07-181-25/+2
| | | | | | | | | | | | | | | | | | | PR middle-end/20558 * builtins.c (expand_builtin_interclass_mathfn): Provide a generic fallback for isinf. * c-cppbuiltin.c (builtin_define_float_constants): Move FP max calculation code ... * real.c (get_max_float): ... to here. * real.h (get_max_float): New. testsuite: * gcc.dg/pr28796-1.c: Add more cases. * gcc.dg/pr28796-2.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126724 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/simartin2007-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-07 Simon Martin <simartin@users.sourceforge.net> PR c++/30759 * c-common.h (flag_cpp0x): Replaced by... (cxx_dialect): ... this new variable specifying the C++ dialect that is used. * c-common.c (flag_cpp0x): Removed. (cxx_dialect): Defined. * c-cppbuiltin.c (c_cpp_builtins): flag_cpp0x rewritten in terms of cxx_dialect. * c-opts.c (c_common_post_options): Likewise. (set_std_cxx98): Set cxx_dialect to cxx98. (set_std_cxx0x): Set cxx_dialect to cxx0x. gcc/cp/ 2007-06-07 Simon Martin <simartin@users.sourceforge.net> PR c++/30759 * decl.c (check_initializer): Report an error when a brace enclosed initializer is used for a non-aggregate type in C++98. (redeclaration_error_message): Rewrote flag_cpp0x in terms of cxx_dialect. (grokdeclarator): Likewise. (move_fn_p): Likewise. * typeck.c (check_return_expr): Likewise. * call.c (reference_binding): Likewise. * error.c (cp_cpp_error): Likewise. * pt.c (check_default_tmpl_args): Likewise. (tsubst): Likewise. * lex.c (init_reswords): Likewise. * parser.c (p_parser_primary_expression): Likewise. (TOKEN_PRECEDENCE): Likewise. (cp_parser_init_declarator): Likewise. (cp_parser_ptr_operator): Likewise. (cp_parser_parameter_declaration): Likewise. (cp_parser_enclosed_template_argument_list): Likewise. (cp_parser_skip_to_end_of_template_parameter_list): Likewise. (cp_parser_next_token_ends_template_argument_p): Likewise. gcc/testsuite/ 2007-06-07 Simon Martin <simartin@users.sourceforge.net> PR c++/30759 * g++.dg/init/brace6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125539 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-21 Paolo Bonzini <bonzini@gnu.org>paolo2007-05-211-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | Paolo Carlini <pcarlini@suse.de> Uros Bizjak <ubizjak@gmail.com> * c-cppbuiltin.c (c_cpp_builtins): Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16, if appropriate. * doc/cpp.texi ([Standard Predefined Macros]): Document. 2007-05-21 Paolo Bonzini <bonzini@gnu.org> Paolo Carlini <pcarlini@suse.de> Uros Bizjak <ubizjak@gmail.com> * gcc.dg/gcc-have-sync-compare-and-swap.c, gcc.target/i386/gcc-have-sync-compare-and-swap-1.c, gcc.target/i386/gcc-have-sync-compare-and-swap-2.c, gcc.target/i386/gcc-have-sync-compare-and-swap-3.c, gcc.target/i386/gcc-have-sync-compare-and-swap-4.c, New testcases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124926 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-21 Andreas Krebbel <krebbel1@de.ibm.com>krebbel2007-05-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | * defaults.h (IBM_FLOAT_FORMAT): Macro definition removed. * doc/tm.texi (IBM_FLOAT_FORMAT): Documentation entry removed. * real.c (encode_i370_single, decode_i370_single, encode_i370_double, decode_i370_double): Functions removed. (i370_single_format, i370_double_format): Initializations removed. (real_maxval, round_for_format, exact_real_truncate, significand_size): Consider the log2_b field to always be one. (ieee_single_format, mips_single_format, coldfire_single_format, ieee_double_format, mips_double_format, coldfire_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format, ibm_extended_format, mips_extended_format, ieee_quad_format, mips_quad_format, vax_f_format, vax_d_format, vax_g_format, decimal_single_format, decimal_double_format, decimal_quad_format, c4x_single_format, c4x_extended_format, real_internal_format): Remove initialization of log2_b. * real.h (i370_single_format, i370_double_format): Declarations removed. * c-cppbuiltin.c (builtin_define_float_constants): Consider the log2_b field to always be one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124901 138bc75d-0d04-0410-961f-82ee72b054a4
* PR driver/31694fxcoudert2007-05-071-0/+3
| | | | | | | | | | * c-opts.c (lang_fortran): Make it non static. * c-common.h (lang_fortran): New prototype. * c-cppbuiltin.c (c_cpp_builtins): Create a __GFORTRAN__ if the -lang-fortran option was passed by the driver. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124495 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (c_cpp_builtins): Remove definition ofjanis2007-04-191-10/+5
| | | | | | | __STDC_WANT_DEC_FP__. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123973 138bc75d-0d04-0410-961f-82ee72b054a4
* Add BID decimal supportmeissner2007-03-241-0/+11
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123185 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rsandifo2007-03-211-0/+5
| | | | | | | | * doc/invoke.texi (-fpie, -fPIE): Document __pie__ and __PIE__. * c-cppbuiltin.c (c_cpp_builtins): Define them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123104 138bc75d-0d04-0410-961f-82ee72b054a4
* * c.opt (fgnu89-inline): New option.ian2007-03-051-1/+7
| | | | | | | | | | | | | | | | | | | | | * c-opts.c (c_common_post_options): Set default value for flag_gnu89_inline. * c-decl.c (WANT_C99_INLINE_SEMANTICS): Remove. (pop_scope): Check flag_gnu89_inline rather than flag_isoc99 for inline functions. (diagnose_mismatched_decls, merge_decls, start_decl): Likewise. (grokdeclarator, start_function): Likewise. * c-cppbuiltin.c (c_cpp_builtins): Define either __GNUC_GNU_INLINE__ or __GNUC_STDC_INLINE__. * doc/invoke.texi (Option Summary): Mention -fgnu89-inline. (C Dialect Options): Document -fgnu89-inline. * doc/extend.texi (Function Attributes): Explain what the gnu_inline attribute does. * doc/cpp.texi (Common Predefined Macros): Document __GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122565 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com>krebbel2007-01-241-0/+27
| | | | | | | | | | | | | | | | | | | * c-cppbuiltin.c (builtin_define_type_sizeof): New function. (c_cpp_builtins): New builtin macros: __SIZEOF_INT__, __SIZEOF_LONG__, __SIZEOF_LONG_LONG__, __SIZEOF_SHORT__, __SIZEOF_POINTER__, __SIZEOF_FLOAT__, __SIZEOF_DOUBLE__, __SIZEOF_LONG_DOUBLE__, __SIZEOF_SIZE_T__, __SIZEOF_WCHAR_T__, __SIZEOF_WINT_T__ and __SIZEOF_PTRDIFF_T__. * doc/cpp.texi: Documentation for the new builtin macros added. 2007-01-24 Andreas Krebbel <krebbel1@de.ibm.com> * gcc.c-torture/compile/sizeof-macros-1.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121107 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-01-05 Benjamin Kosnik <bkoz@redhat.com>bkoz2007-01-051-2/+2
| | | | | | | | | | | * c-cppbuiltin.c (c_cpp_builtins): __GXX_EXPERIMENTAL_CPP0X__ to __GXX_EXPERIMENTAL_CXX0X__. * doc/cpp.texi: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120502 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-11-01 Douglas Gregor <doug.gregor@gmail.com>dgregor2006-11-011-0/+2
| | | | | | | | | | | | | | | | | * c-common.c (flag_cpp0x): New. * c-common.h (flag_cpp0x): New. * c-cppbuiltin.c (c_cpp_builtins): If C++0x extensions are supported, define __GXX_EXPERIMENTAL_CPP0X__. * c-opts.c (set_std_cxx0x): New. (c_common_handle_option): Handle -std=c++0x, -std=gnu++0x. * c.opt (std=c++0x): Document. (std=gnu++0x): Ditto. * doc/cpp.texi: Document __GXX_EXPERIMENTAL_CPP0X__. * doc/invoke.texi: Document -std=c++0x, -std=gnu++0x. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118386 138bc75d-0d04-0410-961f-82ee72b054a4
* Whitespace fixupsmrs2006-05-181-5/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113893 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-01-18 Richard Henderson <rth@redhat.com>dnovillo2006-01-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> * libgomp: New directory. * Makefile.def: Add target_module libgomp. * Makefile.in: Regenerate. * configure.in (target_libraries): Add target-libgomp. * configure: Regenerate. contrib/ 2006-01-18 Richard Henderson <rth@redhat.com> Diego Novillo <dnovillo@redhat.com> * gcc_update (files_and_dependencies): Add libgomp files. gcc/ 2006-01-18 Richard Henderson <rth@redhat.com> Aldy Hernandez <aldyh@redhat.com> Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> * omp-low.c: New file. * c-omp.c: New file. 2006-01-18 Richard Henderson <rth@redhat.com> Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> * doc/invoke.texi: Document -fopenmp. * tree-dump.h (debug_function): Declare. * hooks.c (hook_bool_tree_bool_false): New function. (hook_tree_tree_null): Remove. (hook_tree_tree_tree_null): New. * hooks.h: Update to match. * tree-pretty-print.c (debug_tree_chain): New. (print_generic_expr): Handle TDF_CHAIN. (dump_generic_node): Handle BLOCK. Do not abort with incomplete SWITCH_EXPRs. Do not dump body of an OpenMP directive if TDF_SLIM is given. <case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't print space after directive name. <OMP_FOR>: Handle printing OMP_FOR_PRE_BODY. Handle OMP_MASTER and OMP_ORDERED. Handle printing of OMP_BODY just in one place, goto dump_omp_body in the rest of OMP_* nodes that have OMP_BODY. Don't handle clause nodes here. Update omp statements to use dump_omp_clauses. Handle OMP_SINGLE, OMP_SECTIONS, OMP_SECTION, OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE, OMP_ATOMIC, OMP_CRITICAL, OMP_CLAUSE_NOWAIT, GOMP_CLAUSE_IF, GOMP_CLAUSE_NUM_THREADS, GOMP_FOR, GOMP_CLAUSE_SHARED, GOMP_CLAUSE_FIRSTPRIVATE, GOMP_CLAUSE_LASTPRIVATE, GOMP_CLAUSE_COPYIN and GOMP_CLAUSE_COPYPRIVATE. Adjust output for GOMP_PARALLEL. (dump_omp_clauses): New. (print_declaration): Dump DECL_VALUE_EXPR. (op_symbol_1): Split out of op_symbol. (dumping_stmts): Remove. Update all users. * cgraph.c (cgraph_analyze_queue): New. (cgraph_add_new_function): New. * cgraph.h (cgraph_analyze_queue): Declare. (cgraph_add_new_function): Declare. (cgraph_lower_function): Remove. * tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_* nodes. Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS and TYPE_P nodes in its default clause. (empty_body_p): New. (tree_range_check_failed): New. (build5_stat): New. * tree.h (OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER, OMP_CLAUSE_PRIVATE_DEBUG, OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_FOR_PRE_BODY, OMP_MASTER_BODY, OMP_ORDERED_BODY OMP_BODY, OMP_CLAUSES, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT_KIND, OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL, OMP_CLAUSE_INNER_DECL, OMP_CLAUSE_NUM_THREADS_EXPR, OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_SIZE. OMP_PARALLEL_VAR_INIT, OMP_PARALLEL_VAR_REDUC, OMP_FOR_VAR_INIT, OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC, OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST, OMP_SECTIONS_VAR_REDUC, OMP_CLAUSE_REDUCTION_CODE OMP_SINGLE_CLAUSES, OMP_SINGLE_BODY, OMP_CLAUSE_SCHEDULE_CHUNK_SIZE, OMP_SECTION_BODY, OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New. (TREE_RANGE_CHECK): New. (empty_body_p): Declare. (enum omp_clause_default_kind): New. (build_string_literal): Declare. (enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New. (build5_stat, build5): Declare. * tree-pass.h (TDF_CHAIN): Define. * tree-pass.h (PROP_gimple_lomp): Define. (pass_lower_omp): Declare. * diagnostic.h (debug_tree_chain): Declare. * builtins.c (get_builtin_sync_mode): Use 0 as last argument to mode_for_size. (expand_builtin): Handle sync BUILT_IN_*_16 builtins. * builtins.c (build_string_literal): Make extern. * gcc.c (include_spec_function): New. (static_spec_functions): Add it. (main): Move load of libgomp.spec ... (LINK_COMMAND_SPEC): ... here. (link_gomp_spec): New. (static_specs): Include it. (LINK_COMMAND_SPEC): Add link_gomp. (GOMP_SELF_SPECS): New. (driver_self_specs): Include it. (switch_matches): Don't mark inline. (main): Load libgomp.spec. * tree-gimple.c (is_gimple_stmt): True for OMP_MASTER, OMP_ORDERED, OMP_CRITICAL, OMP_SECTIONS, OMP_SECTION, and OMP_SINGLE, OMP_FOR and OMP_PARALLEL. * tree-gimple.h (enum omp_parallel): Declare. (determine_parallel_type): Declare. (omp_firstprivatize_variable): Declare. (omp_reduction_init): Declare. (diagnose_omp_structured_block_errors): Declare. (struct walk_stmt_info): Add want_return_expr. (struct walk_stmt_info): Add want_bind_expr, want_locations. (find_omp_clause): Declare. (insert_field_into_struct): Declare. (struct walk_stmt_info): Move from tree-nested.c (walk_stmts): Declare. * c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP to 200505. * cgraphunit.c (cgraph_lower_function): Make static. (cgraph_finalize_pending_functions): New. (cgraph_finalize_function): Call it. (cgraph_finalize_compilation_unit): Likewise. * builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16, BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add. (BT_FN_UINT_UINT): New. (DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_VAR_4): Document. (BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT, BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR, BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_UINT, BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR, BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New. * builtins.def: Update DEF_BUILTIN comment to include COND argument. Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins into separate files. (DEF_GOMP_BUILTIN): New. (BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER, BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END, BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END, BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START, BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START, BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START, BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START, BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START, BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START, BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT, BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT, BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT, BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT, BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START, BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START, BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START, BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START, BUILT_IN_GOMP_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT, BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END, BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END, BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT, BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END, BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START, BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New. * sync-builtins.def: New file, moved from builtins.def. * omp-builtins.def: New file, moved from builtins.def. * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine. * gimple-low.c (lower_function_body): Clear data. (lower_stmt): Do not handle COMPOUND_EXPR. Remove call to print_node_brief. * c-tree.h (c_finish_omp_clauses): New prototype. (C_DECL_THREADPRIVATE_P): Define. (lookup_name_no_remap, c_omp_remap_private): Remove (c_begin_omp_parallel, c_finish_omp_parallel): Update. (check_for_loop_decls): Update decl. (lookup_name_no_remap, c_omp_remap_private): Declare. (build_indirect_ref, build_modify_expr, pushdecl, pushdecl_top_level): Move to c-common.h. * dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp before the switch, but just in the 2 places that need it. * c-decl.c (diagnose_mismatched_decls): Do not check for mismatched thread-local attributes when OLDDECL is marked threadprivate and NEWDECL has no thread-local attributes. (merge_decls): Merge C_DECL_THREADPRIVATE_P. (c_gimple_diagnostics_recursively): Rename from c_warn_unused_result_recursively. Invoke diagnose_omp_structured_block_errors. (check_for_loop_decls): Return a singular decl found. * langhooks.c (lhd_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls. (lhd_omp_firstprivatize_type_sizes): New. (lhd_omp_assignment): New. (lhd_omp_predetermined_sharing): New. * langhooks.h (struct gimplify_omp_ctx): Forward declare. (struct lang_hooks_for_types): Add omp_firstprivatize_type_sizes, omp_privatize_by_reference, omp_predetermined_sharing, omp_disregard_value_expr, omp_private_debug_clause, omp_clause_default_ctor, omp_clause_copy_ctor, omp_clause_assign_op, omp_clause_dtor. (c_finish_omp_clauses): New. (c_finish_bc_stmt): Diagnose break within omp for. (c_begin_omp_parallel, c_finish_omp_parallel): New. (build_unary_op): Return error_mark after reporting a readonly_error. (build_modify_expr): Likewise. * gimplify.c: Include optabs.h and pointer-set.h. (enum gimplify_omp_var_data): Declare. (struct gimplify_omp_ctx): Declare. (struct gimplify_ctx): Add fields prev_context, combined_pre_p and combined_ctxp. (gimplify_ctxp, gimplify_omp_ctxp): New local variables. (push_gimplify_context, pop_gimplify_context): Allow nesting. (splay_tree_compare_decl_uid): New. (new_omp_context): New. (delete_omp_context): New. (gimple_add_tmp_var): Call omp_add_variable. (gimplify_bind_expr): Likewise. (gimplify_var_or_parm_decl): If omp_notice_variable returned true, disregard DECL_VALUE_EXPR on the decl if any. (gimplify_expr_in_ctx): New. (omp_firstprivatize_variable, omp_firstprivatize_type_sizes omp_add_variable, omp_notice_variable, omp_is_private gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1 gimplify_adjust_omp_clauses, gimplify_omp_parallel gimplify_omp_for, gimplify_omp_workshare, goa_lhs_expr_p gimplify_omp_atomic_fetch_op, goa_stabilize_expr gimplify_omp_atomic_pipeline, gimplify_omp_atomic_mutex gimplify_omp_atomic): New. (gimplify_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS, OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED, OMP_CRITICAL and OMP_ATOMIC. (gimplify_body): Verify gimplify_ctxp is empty after gimplification. * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ATOMIC, PRAGMA_OMP_BARRIER, PRAGMA_OMP_CRITICAL, PRAGMA_OMP_FLUSH, PRAGMA_OMP_FOR, PRAGMA_OMP_MASTER, PRAGMA_OMP_ORDERED, PRAGMA_OMP_PARALLEL, PRAGMA_OMP_PARALLEL_FOR, PRAGMA_OMP_PARALLEL_SECTIONS, PRAGMA_OMP_SECTION, PRAGMA_OMP_SECTIONS, PRAGMA_OMP_SINGLE, PRAGMA_OMP_THREADPRIVATE. * tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS, OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED, OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_NOWAIT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Define. * print-tree.c (print_node): Dump DECL_VALUE_EXPR. * tree-ssa-dce.c (find_control_dependence): Do not assume that ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR). * tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for OpenMP directives. (struct nesting_info): Add field_map, suppress_expansion, debug_var_chain. (create_nesting_tree): Initialize them. (lookup_field_for_decl): Use field_map. (get_nonlocal_debug_decl, get_local_debug_decl): New. (convert_local_omp_clauses): New. (finalize_nesting_tree_1): Add debug_var_chain to toplevel block. (walk_body): Split out of walk_function. (convert_nonlocal_omp_clauses, convert_local_omp_clauses): New. (convert_nonlocal_reference): Handle omp statements. (convert_local_reference): Likewise. (unnest_nesting_tree_1): Split out of finalize_nesting_tree_1. (unnest_nesting_tree): New. (lower_nested_functions): Call it. (insert_field_into_struct): Make extern. (struct walk_stmt_info): Move to tree-gimple.h. (walk_stmts): Make extern. * omp-builtins.def: New file. * tree-iterator.c (expr_only): Clarify comment. * c-common.h (pushdecl_top_level, pushdecl, build_modify_expr, build_indirect_ref, c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered, c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush, c_finish_omp_for, c_split_parallel_clauses, omp_clause_default_kind, c_omp_sharing_predetermined, c_omp_remap_decl): Declare. * Makefile.in (BUILTINS_DEF): Add omp-builtins.def. (OBJS-common): Add omp-low.o. (c-omp.o, omp-low.o): Add. (gimplify.o): Add dependency on $(OPTABS_H). (GTFILES): Add omp-low.c. (gt-stringpool.h): Add. * tree-cfg.c (set_bb_for_stmt): Do not update the block-to-labels map if we are currently expanding to RTL. (tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P checks. Handle IDENTIFIER_NODE. (tree_verify_flow_info): Do not ICE when emitting error messages about invalid labels. (dump_function_to_file): Reset CFUN before emitting the body of the function. (debug_function): New. * passes.c (init_optimization_passes): Schedule pass_lower_omp. * langhooks-def.h (lhd_omp_predetermined_sharing, lhd_omp_assignment, lhd_omp_firstprivatize_type_sizes): Declare. (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it. (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE, LANG_HOOKS_OMP_PREDETERMINED_SHARING, LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR, LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE, LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR, LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR): Define. (LANG_HOOK_DECLS): Use them. 2006-01-18 Dmitry Kurochkin <dmitry.kurochkin@gmail.com> Richard Henderson <rth@redhat.com> Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> * c-parser.c (pragma_omp_clause): Define. (c_parser_declaration_or_fndef): Document OpenMP syntax. (c_parser_compound_statement): Likewise. (c_parser_statement): Likewise. (c_parser_pragma): Handle omp pragmas. (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Define. (c_parser_omp_clause_name, check_no_duplicate_clause, c_parser_omp_variable_list, c_parser_omp_var_list_parens, c_parser_omp_clause_copyin, c_parser_omp_clause_copyprivate, c_parser_omp_clause_default, c_parser_omp_clause_firstprivate, c_parser_omp_clause_if, c_parser_omp_clause_lastprivate, c_parser_omp_clause_nowait, c_parser_omp_clause_num_threads, c_parser_omp_clause_ordered, c_parser_omp_clause_private, c_parser_omp_clause_reduction, c_parser_omp_clause_schedule, c_parser_omp_clause_shared, c_parser_omp_all_clauses, c_parser_omp_structured_block, c_parser_omp_atomic, c_parser_omp_barrier, c_parser_omp_critical, c_parser_omp_flush, c_parser_omp_for_loop, c_parser_omp_for, c_parser_omp_master, c_parser_omp_ordered, c_parser_omp_sections_scope, c_parser_omp_sections, c_parser_omp_parallel, c_parser_omp_single, c_parser_omp_construct, c_parser_omp_threadprivate): New. * c-pragma.c (init_pragma): Do omp pragma registration here. * c.opt (fopenmp): New flag. 2006-01-18 Eric Christopher <echristo@apple.com> * gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif. * config/darwin.h (GOMP_SELF_SPECS): Define. testsuite/ 2006-01-18 Richard Henderson <rth@redhat.com> Aldy Hernandez <aldyh@redhat.com> Jakub Jelinek <jakub@redhat.com> Diego Novillo <dnovillo@redhat.com> Uros Bizjak <uros@kss-loka.si> * testsuite/gcc.dg/gomp: New directory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109902 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-inline.c (copy_body_r): Use explicit cast whengdr2005-12-171-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | converting from void *. (copy_bb): Likewise. (copy_edges_for_bb): Likewise. (remap_decl_1): Likewise. (estimate_num_insns_1): Likewise. * cgraph.c (hash_node): Use explicit cast when converting from void *. (eq_node): Likewise. (cgraph_create_node): Use GGC_CNEW. (cgraph_create_edge): Use GGC_NEW. (cgraph_remove_node): Use explicit cast when converting from void *. (hash_varpool_node): Likewise. (eq_varpool_node): Likewise. (cgraph_varpool_node): Use GGC_CNEW. * lambda.h (lambda_vector_new): Use GGC_CNEWVEC. * tree-scalar-evolution.c (new_scev_info_str): Use XNEW. (eq_scev_info): Use explicit cast when converting from void *. (find_var_scev_info): Likewise. (set_instantiated_value): Likewise. (gather_stats_on_scev_database_1): Likewise. * cfgloop.h (simple_loop_desc): Use explicit cast when converting from void *. * c-pch.c (c_common_write_pch): Use XNEWVEC. (c_common_read_pch): Likewise. * prefix.c (save_string): Use XNEWVEC. (translate_name): Use explicit cast when converting from void *. * c-ppoutput.c (print_line): Use explicit cast when converting from void *. (pp_dir_change): Likewise. * c-cppbuiltin.c (builtin_define_std): Likewise. (builtin_define_with_value): Likewise. (builtin_define_with_value_n): Likewise. (builtin_define_with_int_value): Likewise. (builtin_define_type_max): Likewise. * c-incpath.c (add_env_var_paths): Use XNEWVEC. (add_path): Use XNEW. * c-format.c (check_format_info_main): Use GGC_NEW. (format_type_warning): Use explicit cast when converting from void *. * c-typeck.c (alloc_tagged_tu_seen_cache): Use XNEW instead of xmalloc. (start_init): Likewise. * tree-flow-inline.h (first_referenced_var): Use explicit cast when converting from void *. (next_referenced_var): Likewise. * c-pragma.c (push_alignment): Use GGC_NEW instead of ggc_alloc. * gensupport.c (lookup_predicate): Use explicit cast to convert from void *. (init_predicate_table): Use XCNEW instead of xcalloc. * genpreds.c (process_define_predicate): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108723 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-12-16 Jon Grimm <jgrimm2@us.ibm.com>bje2005-12-161-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Janis Johnson <janis187@us.ibm.com> Ben Elliston <bje@au.ibm.com> * target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): New. (TARGET_INITIALIZER): Add TARGET_DECIMAL_FLOAT_P. * target.h (struct gcc_target): Add decimal_float_supported_p. * targhooks.c (default_scalar_mode_supported_p): Handle MODE_DECIMAL_FLOAT. * builtins.def: Add new builtins for 32, 64 and 128 bit variants of inf, nan, finite, isinf and isnan. * builtin-types.def (BT_DFLOAT32, BT_DFLOAT64, BT_DFLOAT128, BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR, BT_FN_DFLOAT32, BT_FN_DFLOAT64, BT_FN_DFLOAT128, BT_FN_INT_DFLOAT32, BT_FN_INT_DFLOAT64, BT_FN_INT_DFLOAT128, BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT64_CONST_STRING, BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT32_DFLOAT32, BT_FN_DFLOAT64_DFLOAT64, BT_FN_DFLOAT128_DFLOAT128): New. * c-decl.c (declspecs_add_type): Verify combos on type qualifiers. Pedwarn if decimal floating point types are used. Error if decimal floating point is not supported by the target. (finish_declspecs): Return type from DFP typespec_word. * c-typeck.c (c_common_type): Choose the decimal floating point type with the greater precision when determining a common type. (convert_arguments): Warn if there is a mismatch between argument and prototype for decimal float types. Warn of conversions with binary float types and of precision narrowing due to prototype. * c-parser.c (reswords): Add _Decimal32, _Decimal64, _Decimal128. (c_token_starts_typename): Handle RID_DFLOAT32/64/128. (c_token_starts_declspecs): Likewise. (c_parser_attributes): Likewise. * c-common.h (enum rid): Add new enumeration values RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128. (T_D32, TEX_D32, T_D64, TEX_D64, T_D128, TEX_D128): New macros. * c-common.c (c_common_type_for_mode): Handle decimal float modes. (shorten_compare): Convert DFP/BFP operands to a common type. (c_common_modes_and_builtins): Register built-in decimal float types if the target supports them. (handle_mode_addtribute): Handle MODE_DECIMAL_FLOAT. * builtins.c (fold_builtin_1): Handle 32, 64 and 128 bit cases of inf, nan, finite, isinf and isnan builtins. * c-cppbuiltin.c (builtin_define_decimal_float_constants): New. (builtin_define_float_constants): Assert non-decimal radix. (c_cpp_builtins): Register built-in __DEC_EVAL_METHOD__ define. Call builtin_define_decimal_float_constants for each type. * c-lex.c (interpret_float): Decode decimal float types from CPP_N flags. Use real_from_string3, which can handle binary or decimal floats. * c-tree.h (enum c_typespec_keyword): Add cts_dfloat32, cts_dfloat64, cts_dfloat128. * tree.c (build_common_tree_nodes_2): Add decimal float types. * tree.h (enum tree_index): Add new enumeration values TI_DFLOAT32_TYPE, TI_DFLOAT64_TYPE, TI_DFLOAT128_TYPE, TI_DFLOAT32_PTR_TYPE, TI_DFLOAT64_PTR_TYPE, TI_DFLOAT128_PTR_TYPE. (dfloat32_type_node): New macro. (dfloat64_type_node, dfloat128_type_node): Likewise. (dfloat32_ptr_type_node, dfloat64_ptr_type_node): Likewise. (dfloat128_ptr_type_node): Likewise. * c-pretty-print.c (pp_c_floating_constant): Append 32, 64 and 128 bit decimal floating point types with "df", "dd" and "dl". * c-format.h (enum format_lengths): Add new enumeration values FMT_LEN_H, FMT_LEN_D and FMT_LEN_DD. * c-format.c (printf_length_specs, scanf_length_specs): Add entries for H, D, DD. (print_char_table, scan_char_table): Use new entries. (asm_fprintf_char_table, gcc_diag_char_table, gcc_cdiag_char_table, gcc_cxxdiag_char_table): Adjust for longer length arrays. * defaults.h (DECIMAL32_TYPE_SIZE): Define. (DECIMAL64_TYPE_SIZE): Likewise. (DECIMAL128_TYPE_SIZE): Likewise. (TARGET_DEC_EVAL_METHOD): Likewise. * doc/extend.texi (Decimal Float): New node. (Constructing Calls): Document decimal float built-ins. * doc/tm.texi: Document TARGET_DECIMAL_FLOAT_SUPPORTED_P hook. * Makefile.in (USER_H): Add $(srcdir)/ginclude/decfloat.h. * ginclude/decfloat.h: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108629 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-12-13 Carlos O'Donell <carlos@codesourcery.com>carlos2005-12-131-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | gcc/ * c-cppbuiltin.c (builtin_define_float_constants): Add fp_cast parameter, pass to builtin_define_with_hex_fp_value. Define __FLT_HAS_DENORM__, __DBL_HAS_DENORM__, __LDBL_HAS_DENORM__. (builtin_define_with_hex_fp_value): Use fp_cast when building macro. (c_cpp_builtins): If flag_single_precision_constant then set fp_cast to "((double)%sL)" otherwise "%s". gcc/testsuite/ * gcc.dg/single-precision-constant.c: New test. libstdc++-v3/ * include/std/std_limits.h (struct numeric_limits): Use __DBL_HAS_DENORM__, __FLT_HAS_DENORM__, __LDBL_HAS_DENORM__. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108458 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (c_cpp_builtins): Define __pic__ and __PIC__ whenghazi2005-11-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | flag_pic is set. * config/alpha/freebsd.h, config/alpha/linux.h, config/arm/linux-elf.h, config/bfin/bfin.h, config/cris/linux.h, config/darwin.h, config/freebsd-spec.h, config/i386/beos-elf.h, config/i386/gnu.h, config/i386/linux.h, config/i386/linux64.h, config/i386/nto.h, config/i386/sco5.h, config/m32r/m32r.h, config/m68k/linux.h, config/m68k/m68k.h, config/mips/linux.h, config/pa/pa-linux.h, config/rs6000/linux64.h, config/rs6000/sysv4.h, config/rs6000/vxworks.h, config/s390/linux.h, config/s390/tpf.h, config/sh/linux.h, config/sh/sh.h, config/sol2.h, config/sparc/linux.h, config/sparc/linux64.h, config/xtensa/xtensa.h: Don't define __pic__ or __PIC__. * doc/invoke.texi: Document that the macros __pic__ and __PIC__ are both defined when either flag -fpic or -fPIC are used. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107347 138bc75d-0d04-0410-961f-82ee72b054a4
* Document compatibility with earlier ProPolice implementation.wilson2005-08-131-1/+3
| | | | | | | | * c-cppbuiltin.c (c_cpp_builtins): Add comment for flag_stack_protect macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103058 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__.jakub2005-06-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101348 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
* * c-cppbuiltin.c (c_cpp_builtins): Do not define __GXX_WEAK__ to 1mmitchel2005-05-011-1/+1
| | | | | | | | | | | | if !flag_weak. * doc/cpp.texi (__DEPRECATED): Document. (__EXCEPTIONS): Likewise. (__GXX_WEAK__): Likewise. * g++.dg/cpp/weak.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99080 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (define__GNUC__): Correct assertion.tromey2005-01-211-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94019 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h, c-common.c, c-cppbuiltin.c, c-lang.c,kazu2005-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | c-tree.h, cfgbuild.c, cgraph.c, cgraph.h, collect2.c, combine.c, config.gcc, coverage.h, cse.c, cselib.c, defaults.h, df.c, dwarf2asm.c, dwarf2out.c, explow.c, expr.c, flow.c, fold-const.c, gcse.c, ggc-page.c, gimple-low.c, gimplify.c, ifcvt.c, langhooks-def.h, lcm.c, optabs.h, output.h, postreload-gcse.c, postreload.c, recog.c, resource.c, rtl.def, rtlanal.c, sched-deps.c, sched-rgn.c, targhooks.h, toplev.c, tree-data-ref.c, tree-eh.c, tree-flow.h, tree-loop-linear.c, tree-mudflap.h, tree-nrv.c, tree-optimize.c, tree-outof-ssa.c, tree-pass.h, tree-scalar-evolution.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dse.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa.c, tree-vectorizer.c, tree.def, unwind-dw2-fde-darwin.c, var-tracking.c: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93827 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (builtin_define_float_constants): Set __*_EPSILON__geoffk2005-01-071-1/+6
| | | | | | | for IBM long double format correctly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93021 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c, cgraph.c, domwalk.h, except.c, gimplify.c,kazu2004-11-131-1/+1
| | | | | | | | lambda-code.c, postreload.c, predict.c, tree-sra.c, tree-ssa-loop-manip.c, tree.c: Fix comment typos. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90596 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-aux-info.c, c-common.c, c-common.h, c-cppbuiltin.c, c-decl.c,jsm282004-10-031-1/+1
| | | | | | | | | c-format.c, c-incpath.c, c-lex.c, c-objc-common.c, c-opts.c, c-parse.in, c-pch.c, c-ppoutput.c, c-pragma.c, c-typeck.c: Follow code formatting conventions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88462 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-aux-info.c (gen_type): Use gcc_assert or gcc_unreachable.nathan2004-09-071-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (c_type_hash, c_common_nodes_and_builtins, c_expand_expr, boolean_increment, nonnull_check_p, check_function_arguments_recurse, fold_offsetof_1): Likewise. * c-cppbuiltin.c (define__GNUC__, builtin_define_stdint_macros, builtin_define_type_max): Likewise. * c-decl.c (bind, pop_scope, merge_decls, pushdecl_top_level, implicit_decl_warning, builtin_function, build_compound_literal, complete_array_type, grokdeclarator, get_parm_info, start_function, store_parm_decls_oldstyle, c_write_global_declarations): Likewise. * c-format.c (get_constant, decode_format_attr, maybe_read_dollar_number, get_flag_spec, check_format_arg, check_format_types, format_type_warning, find_char_info_specifier_index, init_dynamic_asm_fprintf_info, init_dynamic_diag_info, handle_format_attribute): Likewise. * c-gimplify.c (push_context, pop_context, finish_bc_block): * c-lex.c (c_lex_with_flags, lex_string): Likewise. * c-objc-common.c (c_tree_printer): Likewise. * c-pch.c (pch_init): Likewise. * c-pragma.c (maybe_apply_pragma_weak): Likewise. * c-pretty-print.c (pp_c_tree_decl_identifier): Likewise. * c-typeck.c (c_incomplete_type_error, composite_type, common_pointer_type, common_type, same_translation_unit_p, tagged_types_tu_compatible_p, finish_init, pop_init_level, set_designator, set_nonincremental_init_from_string, process_init_element, c_finish_if_stmt): Likewise. * caller-save.c (init_caller_save, save_call_clobbered_regs, insert_restore, insert_save, insert_one_insn): Likewise. * calls.c (emit_call_1, compute_argument_block_size, precompute_arguments, expand_call, emit_library_call_value_1, store_one_arg): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87140 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (c_stddef_cpp_builtins): Define __INTMAX_TYPE__ andjsm282004-08-051-0/+21
| | | | | | | | | | | | | | | | | | | __UINTMAX_TYPE__. * c-cppbuiltin.c (builtin_define_stdint_macros): New. Define __INTMAX_MAX__. (c_cpp_builtins): Call it. * doc/cpp.texi: Update. testsuite: * gcc.c-torture/execute/builtins/abs-2.c, gcc.c-torture/execute/builtins/abs-3.c, gcc.c-torture/execute/builtins/lib/abs.c, gcc.dg/format/format.h, gcc.dg/torture/builtin-attr-1.c: Use predefined macros for intmax_t, uintmax_t and their limits. * gcc.dg/intmax_t-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85588 138bc75d-0d04-0410-961f-82ee72b054a4
* * defaults.h (TARGET_DECLSPEC): New macro.mmitchel2004-08-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | * c-cppbuiltin.c (c_cpp_builtins): Handle TARGET_DECLSPEC. * config/arm/pe.h (SUBTARGET_CPP_SPEC): Remove __declspec support. * config/arm/symbian. (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define. * config/i386/beof-elf.h (TARGET_OS_CPP_BUILTINS): Remove __declspec support. (TARGET_DECLSPEC): Define. * config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Remove __declspec support. * config/i386/i386-interix.h (TARGET_OS_CPP_BUILTINS): Remove __declspec support. (TARGET_DECLSPEC): Define. * config/mcore/mcore.h (TARGET_CPU_CPP_BUILTINS): Remove __declspec support. * config/sh/symbian-pre.h (SUBTARGET_CPP_SPEC): Remove __declspec support. * doc/tm.texi (TARGET_DECLSPEC): Document. * doc/extend.texi: Fix typo in comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85571 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (has_c_linkage): New interface.zack2004-06-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-cppbuiltin.c: Include target.h. (c_cpp_builtins): Define __PRAGMA_REDEFINE_EXTNAME and __PRAGMA_EXTERN_PREFIX when appropriate. * c-pragma.c: Include target.h. Document clarified semantics of symbol-renaming #pragmas. (handle_pragma_redefine_extname, handle_pragma_extern_prefix) (maybe_apply_renaming_pragma): Rewrite according to clarified semantics. Always recognize, but do not necessarily execute. (init_pragma): Unconditionally register symbol-renaming pragmas. * system.h: Poison HANDLE_PRAGMA_REDEFINE_EXTNAME and HANDLE_PRAGMA_EXTERN_PREFIX. * target.h (struct gcc_target): Add handle_pragma_redefine_extname and handle_pragma_extern_prefix flags. * target-def.h: Add defaults for TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME and TARGET_HANDLE_PRAGMA_EXTERN_PREFIX. * Makefile.in (c-pragma.o, c-cppbuiltin.o): Update dependencies. * config/sol2.h: Define TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME, not HANDLE_PRAGMA_REDEFINE_EXTNAME. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_REDEFINE_EXTNAME. (TRANSFER_FROM_TRAMPOLINE): Prototype mprotect. * config/alpha/osf.h: Define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX, not HANDLE_PRAGMA_EXTERN_PREFIX. (TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_EXTERN_PREFIX. * doc/extend.texi (Solaris Pragmas, Tru64 Pragmas): Combine into one section "Symbol-Renaming Pragmas"; clarify; document adjusted semantics. * builtins.c (expand_builtin): Do not issue error for a builtin with no special case code and no DECL_ASSEMBLER_NAME; just do the library call. * c-decl.c (builtin_function): Don't call make_decl_rtl. * c-objc-common.c (has_c_linkage): Stub implementation. * cgraphunit.c (cgraph_expand_function) (cgraph_remove_unreachable_nodes): Don't clear DECL_ARGUMENTS. cp: * cp-lang.c (has_c_linkage): Implement. * cp-tree.h (set_mangled_name_for_decl): Don't prototype. * decl.c (duplicate_decls): Use COPY_DECL_RTL. (builtin_function_1): Don't call make_decl_rtl. (build_cp_library_fn): Don't call set_mangled_name_for_decl. (grokvardecl): Don't call mangle_decl. * except.c (nothrow_libfn_p): Look at DECL_NAME, not DECL_ASSEMBLER_NAME. * method.c (set_mangled_name_for_decl): Delete. * name-lookup.c (pushdecl): When a local extern shadows a file-scope declaration of the same object, give both DECLs the same DECL_UID. * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE on DECL_ASSEMBLER_NAME. testsuite: * g++.dg/expr/enum1.C, g++.dg/opt/const3.C: Declare abort with extern "C". * g++.dg/other/pragma-re-1.C: Add comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83405 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h: Remove include of version.hmgadams2004-06-031-0/+1
| | | | | | | | | | | | | | * c-cppbuiltin.c: Include version.h * diagnostic.c: Include version.h * dwarf2out.c: Include version.h * toplev.c: Include version.h * vmsdbgout.c: Include version.h * Makefile.in: Remove dependency on version.h from TREE_H, and add dependencies to required .o targets * gjavah.c: Include version.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82601 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c, c-aux-info.c, c-common.c, c-cppbuiltin.c, c-decl.c:kenner2004-04-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED. * c-format.c, c-opts.c, c-pretty-print.c, c-typeck.c: Likewise. * calls.c, convert.c, dbxout.c, dojump.c, dwarf2out.c: Likewise. * expmed.c, expr.c, fold-const.c, function.c, integrate.c: Likewise. * optabs.c, sdbout.c, stmt.c, stor-layout.c, tree-dump.c: Likewise. * tree.c, config/iq2000/iq2000.c, config/m32r/m32r.c: Likewise. * config/mips/mips.c, config/rs6000/rs6000.c: Likewise. * config/s390/s390.c, config/sparc/sparc.c, objc/objc-act.c: Likewise. * stor-layout.c (layout_type, case COMPLEX_TYPE): Test for REAL_TYPE, not INTEGER_TYPE. (layout_type, case VECTOR_TYPE): Simplify code. * tree.c (build_vector_type_for_mode): Remove dup unsigned setting. * tree.h: Update comments. (STRIP_NOPS): Use TYPE_UNSIGNED. (TYPE_UNSIGNED): New macro. (TYPE_TRAP_SIGNED): Remove now redundant check. (SAVE_EXPR_NOPLACEHOLDER): Don't use TREE_UNSIGNED. * cp/call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED. * cp/class.c (check_bitfield_decl): Likewise. * cp/cvt.c (type_promotes_to): Likewise. * cp/decl.c (finish_enum): Likewise. * cp/mangle.c (write_builtin_type): Likewise. * cp/semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise. * cp/typeck.c (type_after_usual_arithmetic_conversions): Likewise. (build_binary_op): Likewise. * f/com.c (ffecom_arrayref_): Use TYPE_UNSIGNED, not TREE_UNSIGNED. (ffecom_expr_): Likewise. * java/jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED. * treelang/treetree.c (tree_lang_signed_or_unsigned_type): Use TYPE_UNSIGNED, not TREE_UNSIGNED. * ada/decl.c (gnat_to_gnu_entity, make_type_from_size): Use TYPE_UNSIGNED, not TREE_UNSIGNED. * ada/trans.c (tree_transform, convert_with_check): Likewise. * ada/utils.c (gnat_signed_or_unsigned_type): Likewise. (build_vms_descriptor, unchecked_convert): Likewise. * ada/utils2.c (nonbinary_modular_operation): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80287 138bc75d-0d04-0410-961f-82ee72b054a4
* * real.c (encode_ibm_extended): Don't bother rounding low double.amodra2004-03-041-0/+10
| | | | | | | | * c-cppbuiltin.c (builtin_define_float_constants): Tweak MAX when fmt->pnan < fmt->p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78900 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c, basic-block.h, c-common.c, c-common.h,kazu2004-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c, calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c, combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c, cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h, defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c, expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c, genautomata.c, genconditions.c, genemit.c, genflags.c, gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c, ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c, langhooks-def.h, langhooks.c, langhooks.h, line-map.c, line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c, ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c, rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h, target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h, unwind.h, varray.c, varray.h: Update copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76302 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h: Fix comment formatting.kazu2004-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * c-cppbuiltin.c: Likewise. * c-pragma.c: Likewise. * calls.c: Likewise. * collect2.c: Likewise. * cppcharset.c: Likewise. * cpptrad.c: Likewise. * dbxout.c: Likewise. * defaults.h: Likewise. * dwarf2out.c: Likewise. * fold-const.c: Likewise. * genautomata.c: Likewise. * genconditions.c: Likewise. * genflags.c: Likewise. * gengtype.c: Likewise. * integrate.c: Likewise. * loop.c: Likewise. * predict.c: Likewise. * sdbout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75957 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (flag_abi_version): Default to 2.mmitchel2003-12-231-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_ABI_VERSION uniformly for versions above 2. * doc/invoke.texi: Update documentation for -fabi-version. * cp-lang.c (cp_expr_size): Return zero for empty classes. * cp-tree.h (warn_if_uknown_interface): Remove unused function. * decl2.c (warn_if_unknown_interface): Likewise. * g++.dg/abi/macro0.C: New test. * g++.dg/abi/macro1.C: Likewise. * g++.dg/abi/macro2.C: Likewise. * g++.dg/abi/bitfield5.C: Add explicit -fabi-version=1 option. * g++.dg/abi/bitfield7.C: Likewise. * g++.dg/abi/dtor2.C: Likewise. * g++.dg/abi/mangle11.C: Likewise. * g++.dg/abi/mangle12.C: Likewise. * g++.dg/abi/mangle14.C: Likewise. * g++.dg/abi/mangle17.C: Likewise. * g++.dg/abi/vbase10.C: Likewise. * g++.dg/abi/vbase14.C: Likewise. * g++.dg/template/qualttp17.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74973 138bc75d-0d04-0410-961f-82ee72b054a4
* * real.h (REAL_MODE_FORMAT): New macro.zack2003-10-061-1/+1
| | | | | | | | | | | | * c-cppbuiltin.c, optabs.c, real.c, config/alpha/alpha.c * config/c4x/c4x.c, config/i370/i370.c, config/i386/freebsd.h * config/i386/i386.c, config/i960/i960.c, config/ia64/ia64.c * config/m68k/m68k.c, config/mips/mips.c, config/rs6000/rs6000.c * config/vax/vax.c: Use REAL_MODE_FORMAT instead of referring directly to real_format_for_mode array, wherever possible. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72168 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (enum c_language_kind, flag_objc): Remove.neil2003-06-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (fix_string_type, check_case_value, c_common_nodes_and_builtins, c_add_case_label, finish_label_addr_expr, boolean_increment): Use c_dialect_ macros. * c-common.h (enum c_language_kind): Extend. (c_dialect_cxx, c_dialect_objc): New. (flag_objc): Remove. (c_common_init_options): Update prototype. * c-cppbuiltin.c (define__GNUC__, c_cpp_builtins): Use c_dialect_ macros. * c-decl.c (finsih_decl, grokfield, finish_struct): Use c_dialect_ macros. * c-format.c (C_STD_VER, C_STD_NAME): Similarly. * c-lang.c (c_init_options): Remove. (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. * c-lex.c (lex_charconst): Use c_dialect_cxx(). * c-opts.c (lang_flags): Make function-local. (c_common_init_options): Use c_dialect_ macros. Handle C++ diagnostic requirements. (c_common_handle_option, c_common_post_options): Use flag_cxx. * c-parse.in (init_reswords): Use c_dialect_objc (). * c-pch.c (get_ident): Use c_language. * c-pretty-print.c (pp_c_bool_literal): Use c_dialect_ macros. * c-typeck.c (comptypes, build_c_cast): Similarly. * objc/objc-lang.c (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. (objc_init_options): Remove. cp: * Make-lang.in: Update. * cp-lang.c (c_language): Define. (LANG_HOOKS_INIT_OPTIONS): Use common hook. * cp-tree.h (cxx_init_options): Remove. * lex.c: Don't include diagnostic.h. (cxx_init_options): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68734 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-aux-info.c: Convert to ISO C99.aj2003-06-191-52/+30
| | | | | | | | | | | | | | | | * 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
* Add commentary.rth2003-06-071-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67606 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (c_cpp_builtins): Define __EXCEPTIONS for C also.rth2003-06-071-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67605 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (TARGET_OS_CPP_BUILTINS, TARGET_OBJFMT_CPP_BUILTINS):neil2003-05-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Default here. (c_cpp_builtins): Invoke TARGET_OBJFMT_CPP_BUILTINS(). * defaults.h: Don't default TARGET_OS_CPP_BUILTINS here. * config/elfos.h (TARGET_OBJFMT_CPP_BUILTINS): Define __ELF__. * config/freebsd-spec.h, config/netbsd-elf.h, config/alpha/gnu.h, config/arm/linux-elf.h, config/arm/rtems-elf.h, config/arm/unknown-elf.h, config/cris/cris.h, config/cris/linux.h, config/h8300/elf.h, config/i370/linux.h, config/i386/beos-elf.h, config/i386/gnu.h, config/i386/linux.h, config/i386/linux64.h, config/i386/moss.h, config/i386/rtemself.h, config/ia64/ia64.h, config/m68k/rtemself.h, config/mcore/mcore-elf.h, config/mips/linux.h, config/pa/pa-linux.h, config/rs6000/linux.h, config/rs6000/linux64.h, config/rs6000/sysv4.h, config/rs6000/vxworks.h, config/s390/linux.h, config/sh/coff.h, config/sh/elf.h, config/sh/rtemself.h, config/sh/sh.h, config/sparc/linux.h, config/sparc/linux64.h, config/sparc/openbsd64.h, config/sparc/sp64-elf.h, config/sparc/sp86x-elf.h, config/xtensa/elf.h, config/xtensa/linux.h: Don't define __ELF__. * config/alpha.h, config/m68k/linux.h (TARGET_OBJFMT_CPP_BUILTINS): Define __ELF__. * doc/cpp.texi: Document __ELF__. * doc/tm.texi: Document TARGET_OBJFMT_CPP_BUILTINS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66926 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (c_cpp_builtins): Move __STDC_HOSTED__ intoneil2003-05-111-5/+0
| | | | | | | | | | | | | | cpplib as it's a Standard Predefined Macro. * c-opts.c (finish_options): Pass flag_hosted to cpp_init_builtins. * cppinit.c (_cpp_init_builtins): Take HOSTED. Define __STDC_HOSTED__ appropriately. * cpplib.h (_cpp_init_builtins): Update. * fix-header.c (read_scan_file): Update. * doc/cpp.texi, doc/cppopts.texi: Update documentation. * cppfiles.c (find_or_create_entry): Preserve errno. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66688 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace.sayle2003-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * c-typeck.c (c_tree_expr_nonnegative_p): Likewise. * cfgbuild.c (find_many_sub_basic_blocks): Likewise. (find_sub_basic_blocks): Likewise. * cgraphunit.c (cgraph_expand_functions): Likewise. * dwarf2out.c (prune_unused_types): Likewise. * expr.c (store_field): Likewise. * genextract.c (print_path): Likewise. * haifa-sched.c (schedule_insn): Likewise. * lcm.c (compute_antinout_edge): Likewise. * loop-unroll.c (decide_peel_once_rolling): Likewise. * ra-colorize.c (ra_colorize_free_all): Likewise. * ra-debug.c (dump_igraph): Likewise. (debug_hard_reg_set): Likewise. * reg-stack.c (reg_to_stack): Likewise. * rtlanal.c (refers_to_regno_p): Likewise. * tracer.c (layout_superblocks): Likewise. * cp/tree.c (count_functions): Fix whitespace. * f/ste.c (ffeste_R810): Fix whitespace. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64402 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2003-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (cb_register_builtins): Rename c_cpp_builtins. * c-lex.c (init_c_lex): Register builtins hook is dead. * c-opts.c (COMMAND_LINE_OPTIONS, missing_arg): Handle -A, -D and -U. (c_common_decode_option): Don't call cpp_handle_option. Handle -A, -D and -U. (handle_deferred_opts): Simplify. (finish_options): Define builtins and command line macros. * c-ppoutput.c (init_pp_output): Register builtins hook is dead. * cppinit.c: Don't include intl.h. (init_builtins): Rename cpp_init_builtins. No hook to call. (init_library): Don't need to sort options. (cpp_create_reader): Don't set pending. (cpp_destroy): Don't free pending. (struct pending_option, cl_directive_handler, struct cpp_pending, APPEND, free_chain, new_pending_directive, parse_option, opt_comp, cpp_finish_options, COMMAND_LINE_OPTIONS, DEF_OPT, struct cl_option, cl_options, cpp_handle_option): Remove. * cpplib.h (struct cpp_pending, register_builtins, cpp_handle_option, cpp_finish_options): Remove. (cpp_init_builtins): New. * fix-header.c (read_scan_file): Update to handle -D. Fix handling of -I. Replace call to cpp_finish_options. cp: * Make-lang.in: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64398 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (cb_register_builtins): Define LP64 builtins foraj2003-03-121-0/+9
| | | | | | | | | | | | | | | | | | | | | LP64 targets. * doc/cpp.texi (Common Predefined Macros): Document __LP64__ and _LP64. * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Do not define _LP64 macros here. * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Likewise. * config/alpha/netbsd.h (TARGET_OS_CPP_BUILTINS): Remove call to NETBSD_OS_CPP_BUILTINS_LP64. * config/sh/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Likewise. * config/sparc/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Likewise. * config/netbsd.h (NETBSD_OS_CPP_BUILTINS_LP64): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64259 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (builtin_define_std): Make non-static.neil2003-03-121-2/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64215 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud