1. 26 Mar, 2009 1 commit
  2. 16 Sep, 2008 1 commit
  3. 20 Aug, 2008 1 commit
    • diagnostic.c (inform): Add an explicit location_t parameter. · 1f5b3869
      2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	* diagnostic.c (inform): Add an explicit location_t parameter.
      	* toplev.h (inform): Update declaration.
      	* builtins.c: Update all calls to inform.
      	* c-common.c: Likewise.
      	* c-decl.c: Likewise.
      	* c-opts.c: Likewise.
      	* c-pch.c: Likewise.
      	* c-pragma.c: Likewise.
      	* c-typeck.c: Likewise.
      	* coverage.c: Likewise.
      	* opts.c: Likewise.
      	* toplev.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-ssa.c: Likewise.
      cp/	
      	* parser.c: Update all calls to inform.
      	* typeck.c: Likewise.
      	* init.c: Likewise.
      	* class.c: Likewise.
      	* call.c: Likewise.
      	* method.c: Likewise.
      	* friend.c: Likewise.
      	* typeck2.c: Likewise.
      	* pt.c: Likewise.
      	* name-lookup.c: Likewise.
      	* lex.c: Likewise.
      
      From-SVN: r139293
      Manuel López-Ibáñez committed
  4. 18 Aug, 2008 1 commit
    • diagnostics.c (permerror_at): Rename as permerror. · cbe5f3b3
      2008-08-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	* diagnostics.c (permerror_at): Rename as permerror.
      	(permerror): Delete.
      	* toplev.h: Likewise.
      cp/	
      	* typeck.c: Update all callers.
      	* init.c: Likewise.
      	* class.c: Likewise.
      	* decl.c: Likewise.
      	* call.c: Likewise.
      	* except.c: Likewise.
      	* cvt.c: Likewise.
      	* typeck2.c: Likewise.
      	* pt.c: Likewise.
      	* semantics.c: Likewise.
      	* name-lookup.c: Likewise.
      	* lex.c: Likewise.
      	* decl2.c: Likewise.
      	* parser.c: Likewise.
      
      From-SVN: r139193
      Manuel López-Ibáñez committed
  5. 25 Jul, 2008 1 commit
    • cgraphbuild.c (record_reference): Drop non-unit-at-a-time code. · 7e8b322a
      
      	* cgraphbuild.c (record_reference): Drop non-unit-at-a-time code.
      	(build_cgraph_edges): Likewise.
      	* cgraph.c (cgraph_node): Do not update assembler hash.
      	(cgraph_remove_node): Drop non-unit-at-a-time code.
      	* tree-pass.h (pass_O0_always_inline): Remove.
      	* ipa-reference.c (gate_reference): Remove unit-at-a-time check.
      	* toplev.c (process_options): Flag unit-at-a-time does not imply
      	no section anchors.
      	* cgraphunit.c: Update comments.
      	(decide_is_function_needed): Drop non-unit-at-a-time mode.
      	(cgraph_assemble_pending_functions): Remove.
      	(cgraph_reset_node): Drop non-unit-at-a-time code.
      	(cgraph_finalize_function): Likewise.
      	(cgraph_analyze_function): Likewise.
      	(cgraph_finalize_compilation_unit): Likewise.
      	(cgraph_expand_function): Likewise.
      	(cgraph_optimize): Likesise.
      	(save_inline_function_body): Likewise.
      	* ipa-pure-const.c (gate_pure_const): Drop flag_unit_at_a_time check.
      	* tree-ssa-alias.c (maybe_be_aliased): Likewise.
      	* ipa-inline.c: Update comments.
      	(enum inlining_mode): remove INLINE_SPEED.
      	(cgraph_clone_inlined_nodes): Drop unit-at-a-time check.
      	(cgraph_mark_inline_edge): Likewise.
      	(try_inline): Likewise.
      	(cgraph_decide_inlining_incrementally): Likewise.
      	(cgraph_gate_inlining): Remove.
      	(cgraph_early_inlining): Remove flag_unit_at_a_time checks.
      	(cgraph_gate_early_inlining): Likewise.
      	(gate_inline_passes): Remove.
      	(pass_inline_parameters, pass_ipa_inline): Remove gates.
      	(cgraph_gate_O0_always_inline, cgraph_O0_always_inline, 
      	pass_O0_always_inline): Remove.
      	* c-pch.c (c_pch_matching): Remove -funit-at-a-time.
      	* dwarf2out.c (reference_to_unused): Remove flag_unit_at_a_time check.
      	* opts.c (no_unit_at_a_time_default): Remove.
      	(decode_options): Remove flag_unit_at_a_time reset and warning.
      	* opts.h (no_unit_at_a_time_default): Remove.
      	* c-decl.c (diagnose_mismatched_decls): Do not require inline keyword
      	early in GNU dialect.
      	(merge_decls): Update comment; drop unit-at-a-time check.
      	(finish_decl): Likewise.
      	(grok_declaration): Remove flag_inline_trees code.
      	(finish_functions): Return on function returning non-void on all
      	statics.
      	* ipa-tye-escape.c (gate_type_escape_vars): Remove.
      	* cfgexpand.c (expand_one_static_var): Remove.
      	(expand_one_var): Remove expand_one_static_var call.
      	(expand_used_vars_for_block): Remove flag_unit_a_time check.
      	* c-opts.c (c_common_post_options): Remove flag_inline_trees code
      	and flag_unit_at_a-time compatibility checks.
      	* varasm.c (assemble_alias): Remove flag_unit_at_a_time check.
      	* tree-inline.c (flag_inline_trees): Remove.
      	(inlinable_function_p): Don't check it.
      	(expand_call_inline): Remove non-unit-at-a-time code.
      	* tree-inline.h (flag_inline_trees): Remove.
      	* tree-optimize.c (execute_early_local_optimizations): Remove
      	unit-at-a-time checks.
      	(tree_rest_of_compilation): Likewise.
      	* combine.c (setup_incoming_promotions): Likewise.
      	* tree-profile.c (tree_gen_ic_func_profiler): Likewise.
      	* tree-ssa-structalias.c (delete_points_to_sets): Likewise.
      	* passes.c (pass_inline_parameters): Update comments; remove
      	O0_alwaysinline pass.
      	(execute_one_ipa_transform_pass): Do not reset in_gimple_form.
      	(execute_one_pass): Likewise.
      	* i386.c (ix86_function_regparm): Remove unit-at-a-time check.
      	(ix86_function_sseregparm): Likewise.
      	* arm.c (arm_function_in_section_p): Likewise.
      	* bfin.c (bfin_load_pic_reg, bfin_function_ok_for_sibcall): Likewise.
      	* varpool.c: Update comments.
      	(decide_is_variable_needed): Remove unit-at-a-time checks.
      	(varpool_finalize_decl): Likewise.
      
      	* ada/utils.c (end_subprog_body): Remove inline trees check.
      	* ada/misc.c (gnat_post_options): Do not set flag_inline_trees.
      
      	* fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
      
      	* gcc.dg/winline-4.c: Remove.
      	* gcc.dg/pch/valid-3.hs: Remove.
      	* gcc.dg/pch/valid-3.c: Remove.
      	* g++.old-deja/g++.brendan/crash52.C: Accept returning void warning
      	* g++.old-deja/g++.jason/report.C: Likewise.
      	* testsuite/g++.dg/warn/pr23075.C: We get returning void warning
      	instead of control flow warning.
      
      
      	* cp/decl.c (duplicate_decls): Update comment and unit-at-a-time.
      	(grogfndecl): Drop flag_inline_trees code.
      	* cp/pt.c (instantiate_decl): Drop flag_iline_trees code.
      	* cp/lex.c (cxx_init): Do not set unit-at-a-time.
      
      
      	* java/decl.c: Include cgraph.h
      	(end_java_method): Remove non-unit-at-a-time code.
      	(java_mark_decl_local): Likewise; sanity check that we don't touch
      	finalized nodes.
      
      From-SVN: r138140
      Jan Hubicka committed
  6. 15 Jul, 2008 1 commit
  7. 11 Jul, 2008 1 commit
    • c-common.h (enum rid): Add RID_CXX_COMPAT_WARN. · eea1139b
      ./:	* c-common.h (enum rid): Add RID_CXX_COMPAT_WARN.
      	(struct c_common_resword): Define.
      	(D_CONLY, D_CXXONLY, D_C99, D_CXX0X, D_EXT, D_EXT89): Define.
      	(D_ASM, D_OBJC, D_CXX_OBJC, D_CXXWARN): Define.
      	(c_common_reswords, num_c_common_reswords): Declare.
      	* c-common.c (c_common_reswords): New global const array.
      	(num_c_common_reswords): New const int.
      	* c-parser.c (struct resword, reswords): Don't define.
      	(D_C89, D_EXT, D_EXT89, D_OBJC): Don't define.
      	(c_parse_init): Clarify mask code.  Use c_common_reswords rather
      	than reswords.  If warning about C++ keywords, give them a special
      	RID code.
      	(c_lex_one_token): Warn about C++ keywords.  Call
      	objc_is_reserved_word rather than OBJC_IS_AT_KEYWORD.
      	(c_parser_external_declaration): Look for RID_xxx rather than
      	RID_AT_xxx, for ObjC++ keywords which are also C++ keywords.
      	(c_parser_statement_after_labels): Likewise.
      	(c_parser_objc_class_instance_variables): Likewise.
      	(c_parser_objc_class_declaration): Likewise.
      	(c_parser_objc_try_catch_statement): Likewise.
      	* c-decl.c (c_print_identifier): Ignore RID_CXX_COMPAT_WARN.
      	(declspecs_add_type): Likewise.
      cp/:
      	* lex.c (struct resword, reswords): Don't define.
      	(D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
      	(init_reswords): Clarify mask code.  Use c_common_reswords rather
      	than reswords.
      objc/:
      	* objc-act.c (objc_is_reserved_word): Always check for RID_CLASS,
      	etc., not just when OBJCPLUS is defined.
      testsuite/:
      	* gcc.dg/Wcxx-compat-2.c: New test.
      
      From-SVN: r137724
      Ian Lance Taylor committed
  8. 22 Jun, 2008 1 commit
    • c-lex.c (narrowest_unsigned_type): Change itk to int. · d75d71e0
      	* c-lex.c (narrowest_unsigned_type): Change itk to int.
      	(narrowest_signed_type): Likewise.
      	* c-typeck.c (c_common_type): Change local variable mclass to enum
      	mode_class, twice.
      	(parser_build_binary_op): Compare the TREE_CODE_CLASS with
      	tcc_comparison, not the tree code itself.
      	* c-common.c (def_fn_type): Pass int, not an enum, to va_arg.
      	(c_expand_expr): Cast modifier to enum expand_modifier.
      	* c-common.h (C_RID_CODE): Add casts.
      	(C_SET_RID_CODE): Define.
      	* c-parser.c (c_parse_init): Use C_SET_RID_CODE.
      	(c_lex_one_token): Add cast to avoid warning.
      	(c_parser_objc_type_name): Rename local typename to type_name.
      	(check_no_duplicate_clause): Change code parameter to enum
      	omp_clause_code.
      	(c_parser_omp_var_list_parens): Change kind parameter to enum
      	omp_clause_code.
      	(c_parser_omp_flush): Pass OMP_CLAUSE_ERROR, not 0, to
      	c_parser_omp_list_var_parens.
      	(c_parser_omp_threadprivate): Likewise.
      	* cp/lex.c (init_reswords): Use C_SET_RID_CODE.
      	* cp/parser.c (cp_lexer_get_preprocessor_token): Likewise.
      	* c-format.c (NO_FMT): Define.
      	(printf_length_specs): Use NO_FMT.
      	(asm_fprintf_length_specs): Likewise.
      	(gcc_diag_length_specs): Likewise.
      	(scanf_length_specs): Likewise.
      	(strfmon_length_specs): Likewise.
      	(gcc_gfc_length_specs): Likewise.
      	(printf_flag_specs): Change 0 to STD_C89.
      	(asm_fprintf_flag_specs): Likewise.
      	(gcc_diag_flag_specs): Likewise.
      	(gcc_cxxdiag_flag_specs): Likewise.
      	(scanf_flag_specs): Likewise.
      	(strftime_flag_specs): Likewise.
      	(strfmon_flag_specs): Likewise.
      	(print_char_table): Likewise.
      	(asm_fprintf_char_table): Likewise.
      	(gcc_diag_char_table): Likewise.
      	(gcc_tdiag_char_table): Likewise.
      	(gcc_cdiag_char_table): Likewise.
      	(gcc_cxxdiag_char_table): Likewise.
      	(gcc_gfc_char_table): Likewise.
      	(scan_char_table): Likewise.
      	(time_char_table): Likewis.
      	(monetary_char_table): Likewise.
      	* c-format.h (BADLEN): Likewise.
      
      From-SVN: r137019
      Ian Lance Taylor committed
  9. 21 Jun, 2008 1 commit
    • tree.h (enum tree_code): Include all-tree.def, not tree.def. · c0ed0531
      	* tree.h (enum tree_code): Include all-tree.def, not tree.def.
      	Define END_OF_BASE_TREE_CODES around inclusion.
      	* tree.c (tree_code_type): New global array.
      	(tree_code_length, tree_code_name): Likewise.
      	* Makefile.in (TREE_H): Add all-tree.def, c-common.def, and
      	$(lang_tree_files).
      	(all-tree.def, s-alltree): New targets.
      	(gencheck.h, s-gencheck): Remove.
      	(tree.o): Depend upon all-tree.def.
      	(build/gencheck.o): Remove gencheck.h dependency.
      	(mostlyclean): Don't remove gencheck.h.
      	* c-common.h (enum c_tree_code): Remove.
      	* c-lang.c (tree_code_type): Remove.
      	(tree_code_length, tree_code_name): Remove.
      	* gencheck.c (tree_codes): Include all-tree.def, rather than
      	tree.def, c-common.def, and gencheck.h.  Undefined DEFTREECODE
      	after it is used.
      	* tree-browser.c (tb_tree_codes): Include all-tree.def, rather
      	than tree.def.
      	* cp/cp-tree.h (enum cplus_tree_code): Remove.
      	(operator_name_info): Size to MAX_TREE_CODES.
      	(assignment_operator_name_info): Likewise.
      	* cp/cp-lang.c (tree_code_type): Remove.
      	(tree_code_length, tree_code_name): Remove.
      	* cp/lex.c (operator_name_info): Size to MAX_TREE_CODES.
      	(assignment_operator_name_info): Likewise.
      	* cp/decl.c (grok_op_properties): Change LAST_CPLUS_TREE_CODE to
      	MAX_TREE_CODES.
      	* cp/mangle.c (write_expression): Likewise.
      	* cp/Make-lang.in (CXX_TREE_H): Remove cp/cp-tree.def.
      	* fortran/f95-lang.c (tree_code_type): Remove.
      	(tree_code_length, tree_code_name): Remove.
      	* java/java-tree.h (enum java_tree_code): Remove.
      	* java/lang.c (tree_code_type): Remove.
      	(tree_code_length, tree_code_name): Remove.
      	* java/Make-lang.in (JAVA_TREE_H): Remove java/java-tree.def.
      	* objc/objc-act.h (enum objc_tree_code): Remove.
      	* objc/objc-lang.c (tree_code_type): Remove.
      	(tree_code_length, tree_code_name): Remove.
      	* objcp/objcp-lang.c (tree_code_type): Remove.
      	(tree_code_length, tree_code_name): Remove.
      	* ada/ada-tree.h (enum gnat_tree_code): Remove.
      	* ada/Make-lang.in (ADA_TREE_H): Remove ada/ada-tre.def.
      	* ada/misc.c (tree_code_type): Remove.
      	(tree_code_length, tree_code_name): Remove.
      
      From-SVN: r137006
      Ian Lance Taylor committed
  10. 18 Apr, 2008 1 commit
    • cpp-id-data.h (UC): Was U, conflicts with U... · b6baa67d
      libcpp/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      * include/cpp-id-data.h (UC): Was U, conflicts with U... literal.
      * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
      (struct cpp_options): Added uliterals.
      (cpp_interpret_string): Update prototype.
      (cpp_interpret_string_notranslate): Idem.
      * charset.c (init_iconv_desc): New width member in cset_converter.
      (cpp_init_iconv): Add support for char{16,32}_cset_desc.
      (convert_ucn): Idem.
      (emit_numeric_escape): Idem.
      (convert_hex): Idem.
      (convert_oct): Idem.
      (convert_escape): Idem.
      (converter_for_type): New function.
      (cpp_interpret_string): Use converter_for_type, support u and U prefix.
      (cpp_interpret_string_notranslate): Match changed prototype.
      (wide_str_to_charconst): Use converter_for_type.
      (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
      * directives.c (linemarker_dir): Macro U changed to UC.
      (parse_include): Idem.
      (register_pragma_1): Idem.
      (restore_registered_pragmas): Idem.
      (get__Pragma_string): Support CPP_STRING{16,32}.
      * expr.c (eval_token): Support CPP_CHAR{16,32}.
      * init.c (struct lang_flags): Added uliterals.
      (lang_defaults): Idem.
      * internal.h (struct cset_converter) <width>: New field.
      (struct cpp_reader) <char16_cset_desc>: Idem.
      (struct cpp_reader) <char32_cset_desc>: Idem.
      * lex.c (digraph_spellings): Macro U changed to UC.
      (OP, TK): Idem.
      (lex_string): Add support for u'...', U'...', u... and U....
      (_cpp_lex_direct): Idem.
      * macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
      (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
      
      gcc/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
        
      * c-common.c (CHAR16_TYPE, CHAR32_TYPE): New macros.
      (fname_as_string): Match updated cpp_interpret_string prototype.
      (fix_string_type): Support char16_t* and char32_t*.
      (c_common_nodes_and_builtins): Add char16_t and char32_t (and
      derivative) nodes.  Register as builtin if C++0x.
      (c_parse_error): Support CPP_CHAR{16,32}.
      * c-common.h (RID_CHAR16, RID_CHAR32): New elements. 
      (enum c_tree_index) <CTI_CHAR16_TYPE, CTI_SIGNED_CHAR16_TYPE,
      CTI_UNSIGNED_CHAR16_TYPE, CTI_CHAR32_TYPE, CTI_SIGNED_CHAR32_TYPE,
      CTI_UNSIGNED_CHAR32_TYPE, CTI_CHAR16_ARRAY_TYPE,
      CTI_CHAR32_ARRAY_TYPE>: New elements.
      (char16_type_node, signed_char16_type_node, unsigned_char16_type_node,
      char32_type_node, signed_char32_type_node, char16_array_type_node,
      char32_array_type_node): New defines.
      * c-lex.c (cb_ident): Match updated cpp_interpret_string prototype.
      (c_lex_with_flags): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
      (lex_string): Support CPP_STRING{16,32}, match updated
      cpp_interpret_string and cpp_interpret_string_notranslate prototypes.
      (lex_charconst): Support CPP_CHAR{16,32}.
      * c-parser.c (c_parser_postfix_expression): Support CPP_CHAR{16,32}
      and CPP_STRING{16,32}.
      
      gcc/cp/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      * cvt.c (type_promotes_to): Support char16_t and char32_t.
      * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
      char16_t and char32_t.
      * lex.c (reswords): Add char16_t and char32_t (for c++0x).
      * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
      extended builtin type u8char32_t.
      * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
      RID_CHAR{16,32}.
      (cp_lexer_print_token): Support CPP_STRING{16,32}.
      (cp_parser_is_string_literal): Idem.
      (cp_parser_string_literal): Idem.
      (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
      CPP_STRING{16,32}.
      (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}. 
      * tree.c (char_type_p): Support char16_t and char32_t as char types.
      * typeck.c (string_conv_p): Support char16_t and char32_t.
      
      gcc/testsuite/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      Tests for char16_t and char32_t support.
      * g++.dg/ext/utf-cvt.C: New
      * g++.dg/ext/utf-cxx0x.C: New
      * g++.dg/ext/utf-cxx98.C: New
      * g++.dg/ext/utf-dflt.C: New
      * g++.dg/ext/utf-gnuxx0x.C: New
      * g++.dg/ext/utf-gnuxx98.C: New
      * g++.dg/ext/utf-mangle.C: New
      * g++.dg/ext/utf-typedef-cxx0x.C: New
      * g++.dg/ext/utf-typedef-
      * g++.dg/ext/utf-typespec.C: New
      * g++.dg/ext/utf16-1.C: New
      * g++.dg/ext/utf16-2.C: New
      * g++.dg/ext/utf16-3.C: New
      * g++.dg/ext/utf16-4.C: New
      * g++.dg/ext/utf32-1.C: New
      * g++.dg/ext/utf32-2.C: New
      * g++.dg/ext/utf32-3.C: New
      * g++.dg/ext/utf32-4.C: New
      * gcc.dg/utf-cvt.c: New
      * gcc.dg/utf-dflt.c: New
      * gcc.dg/utf16-1.c: New
      * gcc.dg/utf16-2.c: New
      * gcc.dg/utf16-3.c: New
      * gcc.dg/utf16-4.c: New
      * gcc.dg/utf32-1.c: New
      * gcc.dg/utf32-2.c: New
      * gcc.dg/utf32-3.c: New
      * gcc.dg/utf32-4.c: New
      
      libiberty/ChangeLog:
      2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
      
      * testsuite/demangle-expected: Added tests for char16_t and char32_t.
      
      From-SVN: r134438
      Kris Van Hees committed
  11. 24 Mar, 2008 1 commit
  12. 21 Mar, 2008 1 commit
    • cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P. · 9e1e64ec
      2008-03-21  Paolo Carlini  <pcarlini@suse.de>
      
      	* cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
      	(SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
      	(IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
      	(PROMOTES_TO_AGGR_TYPE): Remove.
      	(CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
      	* typeck.c (unary_complex_lvalue, build_modify_expr,
      	convert_for_initialization): Adjust.
      	* init.c (is_aggr_type): Remove.
      	(is_class_type): Add.
      	(build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
      	build_delete): Adjust.
      	* lex.c (make_aggr_type): Remove.
      	(make_class_type): Add.
      	(cxx_make_type): Adjust.
      	* class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
      	Adjust.
      	* decl.c (build_typename_type, make_typename_type,
      	make_unbound_class_template, cxx_init_decl_processing,
      	check_tag_decl, groktypename, start_decl_1, layout_var_decl,
      	check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
      	grok_op_properties, xref_tag, check_function_type): Adjust.
      	* call.c (check_dtor_name, standard_conversion, implicit_conversion,
      	add_builtin_candidate, add_builtin_candidates,
      	build_user_type_conversion_1, convert_like_real, build_cxx_call,
      	is_subseq, compare_ics): Adjust.
      	* method.c (use_thunk): Adjust.
      	* rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
      	create_tinfo_types): Adjust.
      	* cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
      	build_up_reference, convert_to_reference, convert_from_reference,
      	ocp_convert, build_expr_type_conversion): Adjust.
      	* tree.c (bind_template_template_parm, error_type): Adjust.
      	* dump.c (cp_dump_tree): Adjust.
      	* search.c (lookup_member): Adjust.
      	* friend.c (make_friend_class, do_friend): Adjust.
      	* typeck2.c (store_init_value, process_init_constructor_array,
      	process_init_constructor_record, build_x_arrow, build_m_component_ref,
      	build_functional_cast): Adjust.
      	* pt.c (finish_member_template_decl, process_template_parm,
      	lookup_template_class, tsubst_function_type, tsubst,
      	tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
      	Adjust.
      	* semantics.c (begin_class_definition, finish_base_specifier,
      	finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
      	Adjust.
      	* name-lookup.c (constructor_name_p, push_overloaded_decl,
      	do_class_using_decl, lookup_qualified_name,
      	maybe_process_template_type_declaration): Adjust.
      	* decl2.c (grok_array_decl, check_member_template,
      	constrain_class_visibility): Adjust.
      	* parser.c (cp_parser_class_name): Adjust.
      
      From-SVN: r133434
      Paolo Carlini committed
  13. 02 Mar, 2008 1 commit
    • re PR c++/24924 (front end and preprocessor pedantic_errors settings should agree) · 393eda6a
      2008-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org> 
      
      	PR 24924
      	* c-common.c (flag_permissive): Delete.
      	(constant_expression_warnings): Check flags first.
      	(constant_expression_error): New.
      	* c-common.h (flag_permissive): Delete.
      	(constant_expression_error): Declare.
      	* flags.h (flag_permissive): Declare. Update description.
      	* diagnostic.c (pedwarn): Update.
      	(permerror): New.
      	* diagnostic.h: (pedantic_error_kind): Rename as pedantic_warning_kind.
      	(permissive_error_kind): New.
      	* toplev.c (flag_permissive): Define. Update description.
      	* toplev.h (permissive_error_kind): Declare.
      	* c-errors.c (pedwarn_c99): Use pedantic_warning_kind.
      	(pedwarn_c90): Use pedantic_warning_kind.
      	* c-opts.c (c_common_post_options): flag_permissive does not affect
      	flag_pedantic_errors.
      cp/
      	* class.c (finish_struct_anon): Use permerror instead of pedwarn.
      	(check_field_decls): Likewise.
      	(note_name_declared_in_class): Likewise.
      	* call.c (build_new_op): Likewise.
      	(convert_like_real): Likewise.
      	(build_over_call): Likewise.
      	* lex.c (unqualified_fn_lookup_error): Likewise.
      	* parser.c (cp_parser_template_id): Likewise.
      	* cvt.c (warn_ref_binding): Likewise.
      	(convert_to_reference): Likewise.
      	(ocp_convert): Likewise.
      	(convert_to_void): Use error instead of pedwarn.
      	* error.c (cp_cpp_error): Use pedantic_warning_kind.
      	* decl.c (compute_array_index_type): Use constant_expression_error.
      testsuite/
      	* g++.dg/cpp/string-2.C: This is a warning now.
      	* g++.dg/cpp/pedantic-errors.C: -pedantic-errors is not enabled by
      	default, so add it.
      
      From-SVN: r132817
      Manuel López-Ibáñez committed
  14. 29 Feb, 2008 1 commit
    • toplev.c (input_file_stack, [...]): Remove. · 966e8f4d
      gcc
      	* toplev.c (input_file_stack, input_file_stack_tick, fs_p,
      	input_file_stack_history, input_file_stack_restored): Remove.
      	(push_srcloc, pop_srcloc, restore_input_file_stack): Likewise.
      	* input.h (struct file_stack): Remove.
      	(push_srcloc, pop_srcloc, restore_input_file_stack): Likewise.
      	(input_file_stack, input_file_stack_tick, INPUT_FILE_STACK_BITS):
      	Likewise.
      	* diagnostic.h (struct diagnostic_context) <last_module>: Change
      	type.
      	(diagnostic_last_module_changed): Add 'map' argument.
      	(diagnostic_set_last_function): Likewise.
      	* diagnostic.c (undiagnostic_report_current_module): Iterate using
      	line map, not input_file_stack.
      	* c-lex.c (fe_file_change): Don't use push_srcloc or pop_srcloc.
      gcc/cp
      	* parser.c (struct cp_token) <input_file_stack_index>: Remove.
      	(cp_lexer_get_preprocessor_token): Update.
      	(cp_lexer_set_source_position_from_token): Don't call
      	restore_input_file_stack.
      	* lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
      gcc/testsuite
      	* g++.dg/warn/pragma-system_header2.C: Ignore "included from"
      	line.
      
      From-SVN: r132775
      Tom Tromey committed
  15. 26 Feb, 2008 1 commit
    • system.h (USE_MAPPED_LOCATION): Poison. · 2d593c86
      gcc
      	* system.h (USE_MAPPED_LOCATION): Poison.
      	* Makefile.in (GTFILES): Put CPP_ID_DATA_H first.
      	* tree-cfg.c (make_cond_expr_edges): Remove old location code.
      	(make_goto_expr_edges): Likewise.
      	(remove_bb): Likewise.
      	(execute_warn_function_return): Likewise.
      	* basic-block.h (struct edge_def) <goto_locus>: Change type to
      	location_t.
      	* c-common.c (fname_decl): Remove old location code.
      	* tree-vect-transform.c (vect_finish_stmt_generation): Remove old
      	location code.
      	* rtl.h (ASM_OPERANDS_SOURCE_LOCATION): Remove old-location
      	variant.
      	(ASM_INPUT_SOURCE_LOCATION): Likewise.
      	(gen_rtx_ASM_INPUT): Likewise.
      	(gen_rtx_ASM_INPUT_loc): Likewise.
      	(get_rtx_asm_OPERANDS): Remove.
      	* cfglayout.c (insn_locators_alloc): Remove old location code.
      	(set_curr_insn_source_location): Likewise.
      	(curr_insn_locator): Likewise.
      	* print-tree.c (print_node): Remove old location code.
      	* tree-mudflap.c (mf_varname_tree): Remove old location code.
      	(mf_file_function_line_tree): Remove test of USE_MAPPED_LOCATION.
      	* cfgexpand.c (expand_gimple_cond_expr): Don't use
      	location_from_locus.
      	(construct_exit_block): Remove old location code.
      	* emit-rtl.c (force_next_line_note): Remove old location code.
      	* profile.c (branch_prob): Remove old location code.
      	* tree-vectorizer.h (LOC, UNKNOWN_LOC, EXPR_LOC, LOC_FILE,
      	LOC_LINE): Remove old-location variants.
      	* langhooks.c (lhd_print_error_function): Remove old location
      	code.
      	* configure, config.in: Rebuilt.
      	* configure.ac (--enable-mapped-location): Remove.
      	* c-decl.c (c_init_decl_processing): Remove old location code.
      	(finish_function): Likewise.
      	* recog.c (decode_asm_operands): Remove old location code.
      	* c-pch.c (c_common_read_pch): Remove old location code.
      	* rtl.def (ASM_INPUT, ASM_OPERANDS): Remove old location
      	variants.
      	* gimple-low.c (lower_function_body): Remove old location code.
      	* toplev.c (unknown_location): Remove.
      	(push_srcloc): Remove old-location variant.
      	(process_options): Remove old location code.
      	(lang_dependent_init): Likewise.
      	* input.h (UNKNOWN_LOCATION): Move definition.
      	(location_t): Undeprecate.
      	(source_locus): Remove.
      	(location_from_locus): Remove.
      	(struct location_s): Remove.
      	Remove all old-location code.
      	(input_line, input_filename): Remove.
      	* final.c (final_scan_insn): Remove old location code.
      	* diagnostic.c (diagnostic_build_prefix): Remove
      	USE_MAPPED_LOCATION test.
      	* tree.h (gimple_stmt) <locus>: Now a location_t.
      	(tree_exp) <locus>: Likewise.
      	(DECL_IS_BUILTIN): Remove old-location variant.
      	(annotate_with_file_line, annotate_with_locus): Likewise.
      	(expr_locus, set_expr_locus): Update.
      	* tree.c (build1_stat): Remove old location code.
      	(last_annotated_node): Remove.
      	(annotate_with_file_line): Remove old-location variant.
      	(annotate_with_locus): Likewise.
      	(expr_location): Remove old location code.
      	(set_expr_location): Likewise.
      	(expr_has_location): Likewise.
      	(expr_locus): Likewise.
      	(set_expr_locus): Likewise.
      	(expr_filename): Don't use location_from_locus.
      	(expr_lineno): Likewise.
      	* rtl-error.c (location_for_asm): Remove old location code.
      	* c-lex.c (cb_line_change): Remove old location code.
      	(fe_file_change): Likewise.
      	(cb_def_pragma): Likewise.
      	(c_lex_with_flags): Likewise.
      	* gengtype.c (do_typedef): Don't special-case location types.
      	(define_location_structures): Remove.
      	(main): Don't call define_location_structures.
      	* tree-pretty-print.c (dump_implicit_edges): Remove old location
      	code.
      gcc/ada
      	* misc.c (internal_error_function): Remove test of
      	USE_MAPPED_LOCATION.
      	* trans.c (gigi): Remove test of USE_MAPPED_LOCATION.
      	(Sloc_to_locus): Remove old location code.
      gcc/cp
      	* parser.c (eof_token): Remove old location code.
      	(check_empty_body): Remove test of USE_MAPPED_LOCATION.
      	* decl2.c (generate_ctor_or_dtor_function): Remove old location
      	code.
      	(cp_write_global_declarations): Likewise.
      	* lex.c (cxx_init): Remove old location code.
      	(handle_pragma_implementation): Remove test of
      	USE_MAPPED_LOCATION.
      	* pt.c (tsubst): Remove old location code.
      	* error.c (cp_print_error_function): Remove test of
      	USE_MAPPED_LOCATION.
      	* decl.c (pop_label): Remove old location code.
      	(finish_function): Likewise.
      gcc/fortran
      	* trans-io.c (set_error_locus): Remove old location code.
      	* trans-decl.c (gfc_set_decl_location): Remove old location code.
      	* f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
      	* scanner.c (gfc_gobble_whitespace): Remove old location code.
      	(get_file): Likewise.
      	(preprocessor_line): Likewise.
      	(load_file): Likewise.
      	(gfc_new_file): Likewise.
      	* trans.c (gfc_trans_runtime_check): Remove old location code.
      	(gfc_get_backend_locus): Likewise.
      	(gfc_set_backend_locus): Likewise.
      	* data.c (gfc_assign_data_value): Remove old location code.
      	* error.c (show_locus): Remove old location code.
      	* gfortran.h (gfc_linebuf): Remove old location code.
      	(gfc_linebuf_linenum): Remove old-location variant.
      gcc/java
      	* lang.c (java_post_options): Remove conditional.
      	* expr.c (expand_byte_code): Remove old location code.
      	* jcf-parse.c (set_source_filename): Remove old location code.
      	(give_name_to_class): Likewise.
      	(jcf_parse): Likewise.
      	(duplicate_class_warning): Likewise.
      	(parse_class_file): Likewise.
      	(java_parse_file): Likewise.
      	* decl.c (finish_method): Remove old location code.
      	* class.c (push_class): Remove old location code.
      gcc/objc
      	* objc-act.c (objc_init): Remove old location code.
      gcc/treelang
      	* tree1.c (treelang_init): Remove old location code.
      	(treelang_parse_file): Likewise.
      	* lex.l (LINEMAP_POSITION_FOR_COLUMN): Remove.
      	(update_lineno_charno): Remove old location code.
      
      From-SVN: r132679
      Tom Tromey committed
  16. 12 Nov, 2007 1 commit
  17. 25 Aug, 2007 1 commit
    • decl.c (cp_tree_node_structure): Kill TINST_LEVEL case. · e2c3721c
      2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
      
      	* decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
      	* cp-objcp-common.c (cp_tree_size): Ditto.
      	* tree.c (cp_walk_subtrees): Ditto
      	* cp-tree.def (TINST_LEVEL): Go away.
      	* cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
      	move together with other non-tree structs.
      	(enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
      	(union lang_tree_node): Eliminate tinst_level field.
      	(TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
      	(current_instantiation, outermost_tinst_level): Return
      	a "struct tinst_level *".
      
      	* error.c (print_instantiation_partial_context): Change second
      	parameter to a "struct tinst_level *".  Replace accessor macros
      	with field access.
      	(print_instantiation_full_context): Likewise.
      	* lex.c (in_main_input_context): Likewise.
      
      	* pt.c (struct pending_templates): New.
      	(pending_templates, last_pending_template): Use it as a type.
      	(current_tinst_level): Change typo to "struct tinst_level *"
      	(reopen_tinst_level): Accept "struct tinst_level *", return decl.
      	(add_pending_template): Construct a "struct pending_template".
      	Replace TINST_LEVEL accessor macros with field access.
      	(push_tinst_level): Likewise, using GGC_NEW instead of make_node.
      	(pop_tinst_level): Likewise.
      	(instantiate_pending_templates): Likewise.  Factor common code used
      	when an instantiation has been done.
      	(outermost_tinst_level): Replace tree_last with loop.
      	(current_instantiation): Return a "struct tinst_level *".
      
      From-SVN: r127796
      Paolo Bonzini committed
  18. 22 Aug, 2007 1 commit
  19. 02 Aug, 2007 1 commit
    • typeck.c: Change copyright header to refer to version 3 of the GNU General Public... · e77f031d
      * typeck.c: Change copyright header to refer to version 3 of the GNU General 
        Public License and to point readers at the COPYING3 file and the FSF's license
        web page.
      * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c, config-lang.in, 
        cp-tree.def, call.c, decl.h, ptree.c, Make-lang.in, method.c, rtti.c, 
        cp-objcp-common.c, g++spec.c, cp-objcp-common.h, except.c, error.c, 
        operators.def, cvt.c, tree.c, mangle.c, cp-tree.h, dump.c, search.c, 
        friend.c, expr.c, cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, 
        pt.c, cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
        name-lookup.h, parser.c: Likewise.
      
      From-SVN: r127154
      Nick Clifton committed
  20. 27 Jul, 2007 1 commit
    • typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes. · 3ad6a8e1
      2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
      
      	* typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
      	* cp-tree.def (DECLTYPE_TYPE): New.
      	* error.c (dump_type): Dump DECLTYPE_TYPE nodes.
      	(dump_type_prefix): Ditto.
      	(dump_type_suffix): Ditto.
      	* tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
      	* mangle.c (write_type): Handle DECLTYPE_TYPE.
      	* cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
      	types.
      	(DECLTYPE_TYPE_EXPR): New.
      	(DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
      	(finish_declared_type): Declare.
      	* cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
      	DECLTYPE_TYPE nodes.
      	(pp_cxx_type_id): Ditto.
      	* pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
      	(tsubst): Substitute into a DECLTYPE_TYPE node.
      	(tsubst_copy): Ditto.
      	(unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
      	nodes.
      	(dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
      	* semantics.c (finish_typeof): TYPEOF_TYPE types need to use
      	structural equality (because we can't hash the expressions).
      	(finish_declared_type): New.
      	* lex.c (reswords): Add "decltype" keyword.
      	* parser.c cp_lexer_next_token_is_decl_specifier_keyword
      	(cp_parser_postfix_expression): Add member_access_only_p to
      	restrict postfix expression to member access expressions.
      	(cp_parser_unary_expression): Update call to
      	cp_parser_postfix_expression to reflect new parameter.
      	(cp_parser_declared_type): New.
      	(cp_parser_simple_type_specifier): Parse decltype types.
      
      2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
      	
             * c-common.h (enum rid): Add RID_DECLTYPE, update RID_LAST_CXX0X.
      
      2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
      
      	* g++.dg/cpp0x/decltype1.C: New.
      	* g++.dg/cpp0x/decltype2.C: New.
      	* g++.dg/cpp0x/decltype3.C: New.
      	* g++.dg/cpp0x/decltype4.C: New.
      	* g++.dg/cpp0x/decltype5.C: New.
      	* g++.dg/cpp0x/decltype6.C: New.
      
      From-SVN: r126991
      Douglas Gregor committed
  21. 07 Jun, 2007 1 commit
    • re PR c++/30759 (initializer-list accepted for object of non-POD type) · c1ae8be5
      gcc/
      
      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.
      
      From-SVN: r125539
      Simon Martin committed
  22. 30 Mar, 2007 1 commit
    • re PR c++/26099 (support for type traits is not available) · cb68ec50
      gcc/
      2007-03-30  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/26099
      	* c-common.h (enum rid): Add RID_HAS_NOTHROW_ASSIGN,
      	RID_HAS_NOTHROW_CONSTRUCTOR, RID_HAS_NOTHROW_COPY,
      	RID_HAS_TRIVIAL_ASSIGN, RID_HAS_TRIVIAL_CONSTRUCTOR,
      	RID_HAS_TRIVIAL_COPY, RID_HAS_TRIVIAL_DESTRUCTOR,
      	RID_HAS_VIRTUAL_DESTRUCTOR, RID_IS_ABSTRACT, RID_IS_BASE_OF,
      	RID_IS_CONVERTIBLE_TO, RID_IS_CLASS, RID_IS_EMPTY, RID_IS_ENUM,
      	RID_IS_POD, RID_IS_POLYMORPHIC, RID_IS_UNION, as
      	C++ extensions.
      	* doc/extend.texi (Extensions to the C++ Language): Add Type Traits.
      
      gcc/cp/
      2007-03-30  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/26099
      	* cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
      	TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
      	(enum cp_tree_node_structure_enum, union lang_tree_node): Update.
      	(CLASS_TYPE_NON_UNION_P): Add.
      	(struct lang_type_class): Add has_complex_dflt.
      	(TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
      	(locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
      	* cp-tree.def: Add TRAIT_EXPR.
      	* cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
      	* lex.c (struct resword): Add __has_nothrow_assign,
      	__has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
      	__has_trivial_constructor, __has_trivial_copy,
      	__has_trivial_destructor, __has_virtual_destructor, __is_abstract,
      	__is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
      	__is_pod, __is_polymorphic, __is_union.
      	* parser.c (cp_parser_primary_expression): Deal with the new RIDs.
      	(cp_parser_trait_expr): New.
      	* semantics.c (finish_trait_expr, trait_expr_value
      	classtype_has_nothrow_copy_or_assign_p): New.
      	* method.c (locate_copy, locate_ctor, locate_dtor): Do not define
      	as static.
      	* decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
      	* class.c (check_bases, check_field_decl, check_bases_and_members):
      	Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
      	* pt.c (uses_template_parms, tsubst_copy_and_build,
      	value_dependent_expression_p, type_dependent_expression_p): Deal with
      	TRAIT_EXPR.
      	* tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
      
      gcc/testsuite/
      2007-03-30  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/26099
      	* g++.dg/ext/is_base_of.C: New.
      	* g++.dg/ext/has_virtual_destructor.C: New.
      	* g++.dg/ext/is_polymorphic.C: New.
      	* g++.dg/ext/is_base_of_diagnostic.C: New.
      	* g++.dg/ext/is_enum.C: New.
      	* g++.dg/ext/has_nothrow_assign.C: New.
      	* g++.dg/ext/has_nothrow_constructor.C: New.
      	* g++.dg/ext/is_empty.C: New.
      	* g++.dg/ext/has_trivial_copy.C: New.
      	* g++.dg/ext/has_trivial_assign.C: New.
      	* g++.dg/ext/is_abstract.C: New.
      	* g++.dg/ext/is_pod.C: New.
      	* g++.dg/ext/has_nothrow_copy.C: New.
      	* g++.dg/ext/is_class.C: New.
      	* g++.dg/ext/has_trivial_constructor.C: New.
      	* g++.dg/ext/is_union.C: New.
      	* g++.dg/ext/has_trivial_destructor.C: New.
      	* g++.dg/tree-ssa/pr22444.C: Adjust, avoid __is_pod.
      	* g++.dg/template/crash43.C: Likewise.
      
      libstdc++-v3/
      2007-03-30  Paolo Carlini  <pcarlini@suse.de>
      
      	PR c++/26099
      	* include/bits/cpp_type_traits.h (struct __is_pod, struct __is_empty):
      	Remove.
      	* include/bits/valarray_array.h: Adjust.
      	* include/bits/allocator.h: Likewise.
      	* include/bits/stl_tree.h: Likewise.
      
      From-SVN: r123366
      Paolo Carlini committed
  23. 04 Feb, 2007 1 commit
  24. 25 Jan, 2007 1 commit
    • lex.c (D_CPP0X): Rename. · 54654d29
      2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
      
      	* lex.c (D_CPP0X): Rename.
      	(D_CXX0X): To this.
      	(reswords): D_CPP0X -> D_CXX0X.
      	(init_reswords): Ditto.
      	* parser.c (cp_lexer_get_preprocessor_token): Warn about the use
      	of C++0x keywords as identifiers.
      
      From-SVN: r121161
      Douglas Gregor committed
  25. 21 Nov, 2006 1 commit
    • cp-tree.def (STATIC_ASSERT): New. · 55a3debe
      2006-11-21      Douglas Gregor <doug.gregor@gmail.com>
      
              * cp-tree.def (STATIC_ASSERT): New.  
      	* cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
      	* error.c (dump_decl): Handle STATIC_ASSERT.
      	* cp-tree.h (STATIC_ASSERT_CONDITION): New.
              (STATIC_ASSERT_MESSAGE): New.
      	(STATIC_ASSERT_SOURCE_LOCATION): New.
      	(struct tree_static_assert): New.
      	(enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
      	(union lang_tree_node): Add static_assertion.
              (finish_static_assert): Declare.
      	* cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
      	(pp_cxx_declaration): Handle STATIC_ASSERT.
      	* pt.c (instantiate_class_template): Handle
      	STATIC_ASSERT members.
              (tsubst_expr): Handle STATIC_ASSERT statements.  
      	* semantics.c (finish_static_assert): New.
              * lex.c (D_CPP0X): New.
              (reswords): Add static_assert keyword.
              (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
              * parser.c (cp_parser_block_declaration): Parse static
      	assertions.
              (cp_parser_static_assert): New.
              (cp_parser_member_declaration): Parse static assertions.
      
      From-SVN: r119066
      Douglas Gregor committed
  26. 07 Sep, 2006 1 commit
    • re PR c++/26195 (pragma interface no longer handles explicit names) · c533e34d
              PR c++/26195
              * decl.c (make_rtl_for_nonlocal_decl),
              (start_preparsed_function): Don't use lbasename on
              input_filename when calling get_fileinfo.
              * semantics.c (begin_class_definition): Likewise.
              * lex.c (cxx_make_type): Likewise.
              (handle_pragma_interface): Call get_fileinfo on input_filename,
              not on the parameter to the directive.
      
      From-SVN: r116740
      Zak Kipling committed
  27. 13 Feb, 2006 1 commit
  28. 29 Jan, 2006 1 commit
    • call.c (alloc_conversion): Use cast when converting from void *. · 67f5655f
              * call.c (alloc_conversion): Use cast when converting from
      	void *.
              (alloc_conversions): Likewise.
              (add_candidate): Likewise.
              (print_z_candidates): Likewise.
              (add_warning): Likewise.
              * pt.c (retrieve_local_specialization): Likewise.
              (process_partial_specialization): Likewise.
              (mangle_class_name_for_template): Likewise.
              (tsubst_template_args): Likewise.
              * typeck2.c (pat_calc_hash): Likewise.
              (pat_compare): Likewise.
              (abstract_virtuals_error): Likewise.
              * class.c (method_name_cmp): Likewise.
              (resort_method_name_cmp): Likewise.
              (get_vfield_name): Likewise.
              * decl2.c (generate_ctor_and_dtor_functions_for_priority):
      	Likewise.
              * lex.c (init_reswords): Likewise.
              * rtti.c (create_pseudo_type_info): Likewise.
              * search.c (dfs_lookup_base): Likewise.
              (dfs_dcast_hint_pre): Likewise.
              (dfs_dcast_hint_post): Likewise.
              * tree.c (hash_tree_cons): Likewise.
              * repo.c (extract_string): Likewise.
              (afgets): Likewise.
              * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
              * g++spec.c (lang_specific_driver): Likewise.
      
      From-SVN: r110366
      Gabriel Dos Reis committed
  29. 04 Jan, 2006 1 commit
    • directives.c (struct pragma_entry): Add is_deferred. · bc4071dd
      libcpp/
      	* directives.c (struct pragma_entry): Add is_deferred.  Add ident
      	entry to value union.
      	(end_directive): Don't eat the line if in_deferred_pragma.
      	(run_directive): Remove pragma hacks.
      	(insert_pragma_entry): Remove.
      	(new_pragma_entry): New.
      	(register_pragma_1): Split out of register_pragma.  Only handle
      	the lookup tree and return the new entry.
      	(cpp_register_pragma): Fill in the pragma entry here.
      	(cpp_register_deferred_pragma): New.
      	(register_pragma_internal): New.
      	(_cpp_init_internal_pragmas): Use register_pragma_internal.
      	(do_pragma): Allow pragma expansion after namespace.  For deferred
      	pragmas, don't slurp the line into a string.
      	(destringize_and_run): Save tokens for deferred pragmas.
      	(cpp_handle_deferred_pragma): Remove.
      	* macro.c (builtin_macro): Remove pragma token hack.
      	(_cpp_push_token_context): Rename from push_token_context and export.
      	* internal.h (struct lexer_state): Add pragma_allow_expansion.
      	(_cpp_push_token_context): Declare.
      	* lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return
      	a token.  Update the line number correctly if so.
      	(_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens.
      	(cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas.
      	* include/cpplib.h (PRAGMA_EOL): New.
      	(CPP_TOKEN_FLD_PRAGMA): New.
      	(struct cpp_token): Add val.pragma.
      	(struct cpp_options): Remove defer_pragmas.
      	(cpp_handle_deferred_pragma): Remove.
      	(cpp_register_deferred_pragma): Declare.
      
      gcc/
      	* c-lex.c (c_lex_with_flags) <CPP_PRAGMA>: Smuggle pragma id
      	via integer constant.
      	(pragma_lex): Remove.
      	* c-pch.c (c_common_pch_pragma): Accept the name as an argument,
      	rather than parsing it.
      	* c-pragma.c (handle_pragma_weak, handle_pragma_redefine_extname,
      	handle_pragma_extern_prefix): Add %< %> quotes.
      	(registered_pragmas): New.
      	(c_register_pragma_1): New.
      	(c_register_pragma): Use it.
      	(c_register_pragma_with_expansion): Likewise.
      	(c_invoke_pragma_handler): New.
      	(init_pragma): Use cpp_register_deferred_pragma directly for
      	pch_preprocess.
      	* c-pragma.h (enum pragma_kind): New.
      	(pragma_handler): New.
      	(c_invoke_pragma_handler): Declare.
      	* c-common.c (c_parse_error): Pretty print CPP_PRAGMA and
      	CPP_PRAGMA_EOL.
      	* c-common.h (c_common_pch_pragma): Update decl.
      	* Makefile.in (c-parser.o): Update dependencies.
      	(GTFILES): Add c-pragma.h.
      	* c-parser.c (struct c_token): Add pragma_kind.
      	(struct c_parser): Add in_pragma.
      	(c_lex_one_token): Always initialize keyword and pragma_kind.
      	Extract data for CPP_PRAGMA.
      	(c_parser_peek_2nd_token): Deny CPP_PRAGMA_EOL.
      	(c_parser_consume_token): Don't allow CPP_PRAGMA unless errors.
      	Don't allow CPP_PRAGMA_EOL if in_pragma.
      	(c_parser_consume_pragma): New.
      	(c_parser_skip_until_found): Stop on CPP_PRAGMA_EOL.
      	(c_parser_skip_to_end_of_parameter): Likewise.
      	(c_parser_skip_to_end_of_block_or_statement): Likewise.
      	(c_parser_skip_to_pragma_eol): New.
      	(c_parser_external_declaration): Handle CPP_PRAGMA.
      	(c_parser_compound_statement_nostart): Likewise.
      	(c_parser_statement_after_labels): Likewise.
      	(c_parser_pragma): New.
      	(pragma_lex): Likewise.
      	(c_parser_pragma_pch_preprocess): New.
      	(c_parser_new): Merge into ...
      	(c_parse_file): ... here.  Call c_parser_pragma_pch_preprocess.
      
      gcc/cp/
      	* lex.c (handle_pragma_java_exceptions): Fix whitespace.
      	* parser.c (struct cp_token): Add pragma_kind.
      	(eof_token): Update to match.
      	(struct cp_lexer): Add in_pragma; rearrange next for better packing.
      	(cp_parser_initial_pragma): New.
      	(cp_lexer_new_main): Use it.  Don't bother clearing
      	c_lex_return_raw_strings.
      	(cp_lexer_get_preprocessor_token): Always initialize keyword
      	and pragma_kind fields.  Handle CPP_PRAGMA.
      	(cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when 
      	in_pragma is set.
      	(cp_lexer_handle_pragma): Remove.  Update callers to cp_parser_pragma.
      	(cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
      	(cp_parser_skip_to_pragma_eol): New.
      	(cp_parser_error): Use it.
      	(cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
      	rearrange with switch statement.
      	(cp_parser_skip_to_end_of_statement): Likewise.
      	(cp_parser_skip_to_end_of_block_or_statement): Likewise.
      	(cp_parser_skip_to_closing_brace): Likewise.
      	(cp_parser_skip_until_found): Likewise.
      	(cp_parser_statement): Add in_compound argument; update callers.
      	Use it to decide how to handle pragma parsing.
      	(cp_parser_labeled_statement): Add in_compound argument; pass
      	it on to cp_parser_statement.
      	(cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
      	(cp_parser_declaration_seq_opt): Likewise.
      	(cp_parser_parameter_declaration): Likewise.
      	(cp_parser_member_specification_opt): Likewise.
      	(cp_parser_function_definition_after_decl): Likewise.
      	(cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
      	(cp_parser_pragma): New.
      	(pragma_lex): New.
      
      gcc/testsuite/
      	* g++.dg/parse/pragma2.C: Update expected error lines.
      
      From-SVN: r109336
      Richard Henderson committed
  30. 02 Dec, 2005 1 commit
    • decl2.c (get_priority_info): Use XNEW, not xmalloc. · 0ac1b889
              * decl2.c (get_priority_info): Use XNEW, not xmalloc.
              * decl.c (push_switch): Likewise.
              * lex.c (handle_pragma_implementation): Likewise.
              * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
              not ggc_alloc.
              (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
              * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
              * g++spec.c (lang_specific_driver): Likewise.
              * mangle.c (save_partially_mangled_name): Likewise.
              * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
              (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
              (cp_parser_sizeof_operand): Likewise.
              * repo.c (open_repo_file, open_repo_file): Likewise.
      
      From-SVN: r107884
      Gabriel Dos Reis committed
  31. 26 Nov, 2005 1 commit
    • c-lex.c (pragma_lex): Rename from c_lex. · 75ce3d48
              * c-lex.c (pragma_lex): Rename from c_lex.
              * c-pch.c: Update for pragma_lex rename.
              * c-pragma.c, c-pragma.h, config/ia64/ia64-c.c: Likewise.
              * config/m32c/m32c-pragma.c, config/darwin-c.c: Likewise.
              * config/rs6000/rs6000-c.c, config/c4x/c4x-c.c: Likewise.
              * config/sol2-c.c, config/v850/v850-c.c: Likewise.
              * doc/tm.texi: Likewise.
      cp/
              * lex.c: Update for pragma_lex rename.
              * parser.c: Likewise.
      
      From-SVN: r107544
      Richard Henderson committed
  32. 25 Jun, 2005 1 commit
  33. 15 Jun, 2005 1 commit
  34. 14 Jun, 2005 1 commit
  35. 27 May, 2005 1 commit
    • cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code. · 392e3d51
      	* cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
      	* parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
      	of CONVERT_EXPR.
      	(cp_parser_unary_expression): Likewise.
      	* typeck.c (build_unary_op): Likewise.
      	* call.c (add_builtin_candidate, build_new_op): Likewise.
      	* error.c (dump_expr): Likewise.
      	* pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
      	* decl.c (ambi_op_p, grok_op_properties): Likewise.
      	* dump.c (dump_op): Likewise.
      	* lex.c (init_operators): Likewise.
      	* operators.def ("+"): Likewise.
      	* cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
      	conversion, if the result and argument types differ.
      	* tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
      	like a NOP_EXPR when !processing_template_decl.
      
      	* cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
      	(pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
      
      Co-Authored-By: Giovanni Bajo <giovannibajo@gcc.gnu.org>
      
      From-SVN: r100285
      Roger Sayle committed
  36. 17 May, 2005 1 commit
    • Yet more Objective-C++... · e58a9aa1
              * cp-objcp-common.h (cxx_get_alias_set): Move from
              here...
              (cxx_warn_unused_global_decl): Likewise.
              (cp_expr_size): Likewise.
              (cp_tree_size): Likewise.
              (cp_var_mod_type_p): Likewise.
              (cxx_initialize_diagnostics): Likewise.
              (cxx_types_compatible_p): Likewise.
              * cp-tree.h: to here.
              (do_poplevel): Add.
              * lex.c (D_OBJC): Add.
              (init_reswords): Add.
              * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
              * parser.c: Add c-common.h include.
              * pt.c: Add c-common.h and cp-objcp-common.h includes.
              (template_args_equal): Use objc_comptypes as well.
              (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
              * semantics.c (do_poplevel): Remove static.
      
              * decl.c (objc_mark_locals_volatile): Don't change decls that are
              already ok.
              * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
              Objective C++ early enough.
              * lex.c (struct resword reswords): Add Objective-C++ support.
              * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
              (cp_parser_objc_message_receiver): Add.
              (cp_parser_objc_message_args): Likewise.
              (cp_parser_objc_message_expression): Likewise.
              (cp_parser_objc_encode_expression): Likewise.
              (cp_parser_objc_defs_expression): Likewise.
              (cp_parser_objc_protocol_expression): Likewise.
              (cp_parser_objc_selector_expression): Likewise.
              (cp_parser_objc_expression): Likewise.
              (cp_parser_objc_visibility_spec): Likewise.
              (cp_parser_objc_method_type): Likewise.
              (cp_parser_objc_protocol_qualifiers): Likewise.
              (cp_parser_objc_typename): Likewise.
              (cp_parser_objc_selector_p): Likewise.
              (cp_parser_objc_selector): Likewise.
              (cp_parser_objc_method_keyword_params): Likewise.
              (cp_parser_objc_method_tail_params_opt): Likewise.
              (cp_parser_objc_interstitial_code): Likewise.
              (cp_parser_objc_method_signature): Likewise.
              (cp_parser_objc_method_prototype_list): Likewise.
              (cp_parser_objc_method_definition_list): Likewise.
              (cp_parser_objc_class_ivars): Likewise.
              (cp_parser_objc_identifier_list): Likewise.
              (cp_parser_objc_alias_declaration): Likewise.
              (cp_parser_objc_class_declaration): Likewise.
              (cp_parser_objc_protocol_declaration): Likewise.
              (cp_parser_objc_protocol_refs_opt): Likewise.
              (cp_parser_objc_superclass_or_category): Likewise.
              (cp_parser_objc_class_interface): Likewise.
              (cp_parser_objc_class_implementation): Likewise.
              (cp_parser_objc_end_implementation): Likewise.
              (cp_parser_objc_declaration): Likewise.
              (cp_parser_objc_try_catch_finally_statement): Likewise.
              (cp_parser_objc_synchronized_statement): Likewise.
              (cp_parser_objc_throw_statement): Likewise.
              (cp_parser_objc_statement): Likewise.
              (cp_parser_primary_expression): Add Objective-C++.
              (cp_parser_statement): Likewise.
              (cp_parser_declaration): Likewise.
              (cp_parser_simple_type_specifier): Likewise.
              (cp_parser_type_name): Likewise.
              (cp_parser_parameter_declaration_list): Likewise.
              (cp_parser_member_declaration) Likewise.
              * tree.c: Include debug.h.
              * typeck.c (composite_pointer_type): Add Objective-C++ support.
              (finish_class_member_access_expr): Likewise.
              (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
              (build_modify_expr): Allow objc to generate write barriers.
      
              * Make-lang.in (cp/tree.o): Add debug.h.
              * tree.c (lvalue_p_1, case CONST_DECL): Add.
      
      From-SVN: r99855
      Ziemowit Laski committed
  37. 12 May, 2005 1 commit
    • c-common.h (statement_code_p): Don't declare. · feea5b18
      ./:	* c-common.h (statement_code_p): Don't declare.
      	(STATEMENT_CODE_P): Don't define.
      	(INIT_STATEMENT_CODES): Don't define.
      	* c-common.c (statement_code_p): Don't define.
      cp/:
      	* cp-tree.h (cp_stmt_codes): Don't define.
      	(statement_code_p): Declare.
      	(STATEMENT_CODE_P): Define.
      	* lex.c (statement_code_p): Define.
      	(cxx_init): Use actual codes in stmt_codes initializer, not
      	cp_stmt_codes macro.  Initialize statement_code_p directly, rather
      	than using INIT_STATEMENT_CODES.
      
      From-SVN: r99615
      Ian Lance Taylor committed
  38. 03 May, 2005 1 commit
  39. 02 May, 2005 1 commit
    • re PR c++/19542 (attribute(sentinel) has problems with C++ __null) · b2f97e4a
              PR c++/19542
              * c-common.c (c_common_nodes_and_builtins): Create global null_node.
              (warn_strict_null_sentinel): Define.
              (check_function_sentinel): Check for null_node as valid sentinel too.
              * c-common.h (c_tree_index): Added CTI_NULL.
              (null_node) Define global_tree[CTI_NULL].
              (warn_strict_null_sentinel): Declare.
              * c-opts.c: (c_common_handle_option): Handle -Wstrict-null-sentinel.
              * c.opt: (Wstrict-null-sentinel): New C++ option.
              * doc/invoke.texi (C++ Options): Document -Wstrict-null-sentinel.
      
              * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
              common frontend.
              (null_node): Remove.
              * lex.c (cxx_init): Move null_node initialisation to C common frontend.
      
              * g++.dg/warn/sentinel.C: New testcase for __null sentinels added.
      
      From-SVN: r99091
      Michael Matz committed
  40. 25 Apr, 2005 1 commit
    • c-common.def (EXPR_STMT): Remove, moved to C++ frontend. · 934790cc
      ./	* c-common.def (EXPR_STMT): Remove, moved to C++ frontend.
      	* c-common.h (EXPR_STMT_EXPR): Don't define.
      	(c_common_stmt_codes): Don't define.
      	* c-dump.c (c_dump_tree): Remove EXPR_STMT case.
      	* c-gimplify.c (gimplify_expr_stmt): Remove.
      	(c_gimplify_expr): Remove EXPR_STMT case.
      	* c-objc-common.c (c_objc_common_init): Remove stmt_codes and call
      	to INIT_STATEMENT_CODES.
      	* c-pretty-print.c (pp_c_statement): Just call dump_generic_node.
      cp/
      	* cp-tree.def: Add EXPR_STMT.
      	* cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
      	(EXPR_STMT_EXPR): Define.
      	* cp-gimplify.c: Include "flags.h".
      	(gimplify_expr_stmt): New static function.
      	(cp_gimplify_expr): Handle EXPR_STMT.
      	* cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
      	rather than pp_expression.
      	(pp_cxx_statement): Handle EXPR_STMT.
      	* dump.c (cp_dump_tree): Handle EXPR_STMT.
      	* lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
      	initializer.
      
      From-SVN: r98731
      Ian Lance Taylor committed