Age | Commit message (Collapse) | Author | Files | Lines |
|
PR c++/44333
* name-lookup.c (same_entity_p): New.
(ambiguous_decl): Multiple declarations of the same entity
are not ambiguous.
From-SVN: r160183
|
|
* diagnostic-core.h: New. Contents moved from diagnostic.h and
toplev.h.
* diagnostic.c: Don't include toplev.h.
(progname): Define. Moved from toplev.c.
(seen_error): New function.
* diagnostic.h: Include diagnostic-core.h.
(diagnostic_t, emit_diagnostic): Don't declare here.
* toplev.c (progname): Move to toplev.c.
(emit_debug_global_declarations, compile_file, finalize,
do_compile, toplev_main): Use seen_error.
* toplev.h: Include diagnostic-core.h.
(trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG,
internal_error, warning, warning_at, error, error_n, error_at,
fatal_error, pedwarn, permerror, sorry, inform, inform_n,
verbatim, fnotice, progname): Move to diagnostic-core.h.
* builtins.c: Include diagnostic-core.h instead of diagnostic.h.
(expand_builtin_expect): Use seen_error.
* c-decl.c: Include diagnostic-core.h instead of diagnostic.h.
(c_make_fname_decl, c_write_global_declarations): Use seen_error.
* c-format.c: Include diagnostic-core.h instead of diagnostic.h.
* c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h.
* c-lang.c: Include diagnostic-core.h instead of diagnostic.h.
* c-lex.c (c_lex_with_flags, interpret_float): Don't increment
errorcount for errors.
* c-opts.c (c_common_finish): Use seen_error.
* cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
* cgraphunit.c (verify_cgraph_node, verify_cgraph,
cgraph_output_pending_asms, cgraph_optimize): Use seen_error.
* coverage.c: Include diagnostic-core.h instead of diagnostic.h.
(get_coverage_counts): Use seen_error.
* dwarf2out.c (dwarf2out_finish): Use seen_error.
* gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup,
gimplify_body): Use seen_error.
* ipa-inline.c (cgraph_early_inlining): Use seen_error.
* ipa-pure-const.c (gate_pure_const): Use seen_error.
* ipa-reference.c (gate_reference): Use seen_error.
* jump.c: Include diagnostic-core.h instead of diagnostic.h.
* lambda-code.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
* lto-compress.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-section-in.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-streamer-out.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-streamer.c: Include diagnostic-core.h instead of
diagnostic.h.
(gate_lto_out): Use seen_error.
* matrix-reorg.c: Include diagnostic-core.h instead of
diagnostic.h.
* omega.c: Include diagnostic-core.h instead of diagnostic.h.
* omp-low.c: Include diagnostic-core.h instead of diagnostic.h.
(gate_expand_omp, lower_omp_1): Use seen_error.
* passes.c: Include diagnostic-core.h instead of diagnostic.h.
(rest_of_decl_compilation, rest_of_type_compilation,
gate_rest_of_compilation, ipa_write_summaries): Use seen_error.
* tree-cfg.c (label_to_block_fn): Use seen_error.
* tree-inline.c (optimize_inline_calls): Use seen_error.
* tree-mudflap.c (mudflap_finish_file): Use
seen_error.
* tree-optimize.c (gate_all_optimizations,
gate_all_early_local_passes, gate_all_early_optimizations): Use
seen_error.
* tree-ssa-structalias.c (gate_ipa_pta): Use seen_error.
* varpool.c: Include diagnostic-core.h instead of diagnostic.h.
(varpool_remove_unreferenced_decls,
varpool_assemble_pending_decls): Use seen_error.
* Makefile.in (DIAGNOSTIC_CORE_H): Define.
(TOPLEV_H, DIAGNOSTIC_H): Update.
(c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o,
lto-streamer-out.o, lto-section-in.o, lto-streamer.o,
c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o,
builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o,
coverage.o, lambda-code.o): Update dependencies.
cp:
* call.c: Include diagnostic-core.h instead of diagnostic.h.
* cp-lang.c: Don't include diagnostic.h
* name-lookup.c: Include diagnostic-core.h instead of
diagnostic.h.
(cp_emit_debug_info_for_using): Use seen_error.
* optimize.c: Include diagnostic-core.h instead of diagnostic.h.
* parser.c: Include diagnostic-core.h instead of diagnostic.h.
* pt.c (iterative_hash_template_arg): Use seen_error.
* repo.c: Include diagnostic-core.h instead of diagnostic.h.
* typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
* Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
dependencies.
lto:
* lto.c: Include diagnostic-core.h instead of diagnostic.h.
(read_cgraph_and_symbols, lto_main): Use seen_error.
* Make-lang.in (lto/lto.o): Update dependencies.
objc:
* objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
* Make-lang.in (objc/objc-act.o): Update dependencies.
From-SVN: r159947
|
|
parameters in C++)
gcc/cp/
2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
PR c++/30566
* name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
shadowing the outer parameter or variables by the declaration of
nested function in nested structure or class. Warn the shadowing by
the declaration of nested lambda expression.
gcc/testsuite/
2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
PR c++/30566
* testsuite/g++.dg/warn/Wshadow-4.C: Adjust.
* testsuite/g++.dg/warn/Wshadow-5.C: New test.
* testsuite/g++.dg/warn/Wshadow-6.C: New test.
From-SVN: r159383
|
|
PR bootstrap/44048
PR target/44099
gcc/cp:
* cp-tree.def (NULLPTR_TYPE): Remove.
* cp-tree.h (NULLPTR_TYPE_P): New.
(SCALAR_TYPE_P): Use it.
(nullptr_type_node): New.
(cp_tree_index): Add CPTI_NULLPTR_TYPE.
* decl.c (cxx_init_decl_processing): Call record_builtin_type on
nullptr_type_node.
* cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
* cxx-pretty-print.c (pp_cxx_constant): Likewise.
* error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
* mangle.c (write_type): Likewise.
* name-lookup.c (arg_assoc_type): Likewise.
* typeck.c (build_reinterpret_cast_1): Likewise.
* rtti.c (typeinfo_in_lib_p): Likewise.
(emit_support_tinfos): Remove local nullptr_type_node.
gcc:
* dbxout.c (dbxout_type): Remove NULLPTR_TYPE handling.
* sdbout.c (plain_type_1): Likewise.
* dwarf2out.c (is_base_type): Likewise.
(gen_type_die_with_usage): Likewise. Generate
DW_TAG_unspecified_type for any LANG_TYPE.
From-SVN: r159350
|
|
* cp-tree.h (UNKNOWN_TYPE): Remove.
* decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
* error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
* typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
* class.c (instantiate_type): Check unknown_type_node rather than
UNKNOWN_TYPE.
* name-lookup.c (maybe_push_decl): Likewise.
* rtti.c (get_tinfo_decl_dynamic): Likewise.
(get_typeid): Likewise.
* semantics.c (finish_offsetof): Likewise.
From-SVN: r159349
|
|
gcc:
* c-common.c (c_common_reswords): Add nullptr.
* c-common.h: Add RID_NULLPTR. Reorganize C++0x rids.
* dwarf2out.c (is_base_type): Handle NULLPTR_TYPE.
(gen_type_die_with_usage): Likewise.
* dbxout.c (dbxout_type): Likewise.
* sdbout.c (plain_type_1): Likewise.
gcc/cp:
* cp-tree.def: Add NULLPTR_TYPE.
* cp-tree.h: Add nullptr_node.
(cp_tree_index): Add CPTI_NULLPTR.
(SCALAR_TYPE_P): Add NULLPTR_TYPE.
* call.c (null_ptr_cst_p): Handle nullptr.
(standard_conversion): Likewise.
(convert_arg_to_ellipsis): Likewise.
* mangle.c (write_type): Likewise.
* name-lookup.c (arg_assoc_type): Likewise.
* parser.c (cp_parser_primary_expression): Likewise.
* typeck.c (cp_build_binary_op): Likewise.
(build_reinterpret_cast_1): Likewise.
* error.c (dump_type): Likewise.
(dump_type_prefix, dump_type_suffix): Likewise.
* decl.c (cxx_init_decl_processing): Likewise.
* cxx-pretty-print.c (pp_cxx_constant): Likewise.
* cvt.c (ocp_convert): Likewise.
* rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
nullptr_t tinfo in libsupc++.
libstdc++-v3:
* config/abi/pre/gnu.ver: Add typeinfo for decltype(nullptr).
libiberty:
* cp-demangle.c (cplus_demangle_builtin_types): Add nullptr.
(cplus_demangle_type): Handle nullptr.
From-SVN: r159131
|
|
class member access in lambda compound-statement)
PR c++/43856
* name-lookup.c (qualify_lookup): Disqualify lambda op().
* class.c (current_nonlambda_class_type): New fn.
* semantics.c (nonlambda_method_basetype): New.
* cp-tree.h: Declare them.
* tree.c (maybe_dummy_object): Handle implicit 'this' capture.
From-SVN: r158807
|
|
* name-lookup.c (current_decl_namespace): Non-static.
(pop_nested_namespace): Sanity check.
* cp-tree.h: Declare current_decl_namespace.
* decl.c (grokvardecl): Use it instead of current_namespace.
(grokfndecl): Likewise.
* gnu/gcj/runtime/natSharedLibLoader.cc (findCore): Move
declaration of _Jv_create_core out of the function.
From-SVN: r158074
|
|
structure, have 'overload' in set_decl_namespace, at cp/name-lookup.c:3105)
PR c++/43069
* name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
decl we looked up doesn't match.
From-SVN: r156841
|
|
PR c++/43033
* name-lookup.c (pushdecl_maybe_friend): Check default args of t
instead of x.
* g++.dg/other/default3.C: Xfail g4 test.
From-SVN: r156734
|
|
PR c++/41305, DR 384
* name-lookup.c (arg_assoc_class): Split out arg_assoc_class_only
and arg_assoc_bases.
(friend_of_associated_class_p): Remove.
(arg_assoc_namespace): Don't call it.
(arg_assoc_template_arg): Use arg_assoc_class_only for member
template context.
(arg_assoc_type): Handle UNION_TYPE and ENUMERAL_TYPE properly.
* name-lookup.c (arg_assoc): Handle TEMPLATE_ID_EXPR properly.
From-SVN: r155461
|
|
Fix PR c++/42225
gcc/cp/ChangeLog:
PR c++/42225
* typeck.c (incompatible_dependent_typedefs_p): New function.
(structural_comptypes): Use it.
* cp-tree.h (cp_set_underlying_type): Declare ...
* tree.c (cp_set_underlying_type): ... new function.
* class.c (build_self_reference): Use cp_set_underlying_type
instead of set_underlying_type.
* decl2.c (grokfield): Likewise.
* name-lookup.c (pushdecl_maybe_friend): Likewise.
gcc/testsuite/ChangeLog:
PR c++/42225
* g++.dg/template/typedef24.C: New test.
* g++.dg/template/typedef25.C: New test.
From-SVN: r155160
|
|
PR c++/29363
* decl.c (create_implicit_typedef): Set TYPE_STUB_DECL here.
(cxx_init_decl_processing): Not here.
* name-lookup.c (pushtag): Or here.
* pt.c (lookup_template_class): Or here.
From-SVN: r154163
|
|
PR c++/34870
* name-lookup.c (arg_assoc_class): Call complete_type.
* pt.c (instantiate_class_template): Call uses_template_parms
instead of dependent_type_p.
From-SVN: r153958
|
|
PR c++/17365, DR 218
* name-lookup.c (add_function): Ignore non-functions.
From-SVN: r153905
|
|
pop_visibility at c-pragma.c:757)
PR c++/41774
* c-pragma.c (visstack): Change into vector of ints rather than
enum symbol_visibility.
(push_visibility): Add kind argument, push default_visibility together
with kind.
(pop_visibility): Add kind argument, return true if successful, fail
if visibility stack is empty or if stack top is of different kind.
(handle_pragma_visibility): Don't check length of visstack, instead
call pop_visibility and issue diagnostics if it failed. Pass 0
as last argument to push_visibility and pop_visibility.
* c-pragma.h (push_visibility): Add kind argument.
(pop_visibility): Likewise. Return bool instead of void.
* name-lookup.c (handle_namespace_attrs): Pass 1 as last argument to
push_visibility.
* parser.c (cp_parser_namespace_definition): Pass 1 as argument to
pop_visibility.
* rtti.c (push_abi_namespace): Pass 2 as last argument to
push_visibility.
(pop_abi_namespace): Pass 2 as argument to pop_visibility.
* g++.dg/ext/visibility/namespace3.C: New test.
From-SVN: r153805
|
|
/gcc/cp
2009-10-30 Jerry Quinn <jlquinn@optonline.net>
* mangle.c (mangle_type_string_for_rtti): Reapply 153734.
(needs_fake_anon): Likewise.
(write_name): Likewise.
(write_nested_name): Likewise.
* cp-tree.h (mangle_type_string_for_rtti): Likewise.
(get_anonymous_namespace): Likewise.
* name-lookup.c (get_anonymous_namespace_name): Likewise.
* rtti.c (tinfo_name): Likewise, with +1 in the second
build_string call fixed.
(tinfo_base_init): Likewise.
libstdc++/
2009-10-30 Jerry Quinn <jlquinn@optonline.net>
* libsupc++/tinfo.cc (operator=(const type_info&)): Reapply 153734.
* libsupc++/typeinfo (type_info::name()): Likewise.
* libsupc++/tinfo2.cc (before): Likewise.
From-SVN: r153768
|
|
2009-10-30 Jerry Quinn <jlquinn@optonline.net>
* libsupc++/tinfo.cc (operator=(const type_info&)): Revert 153734.
* libsupc++/typeinfo (type_info::name()): Likewise.
* libsupc++/tinfo2.cc (before): Likewise.
2009-10-30 Jerry Quinn <jlquinn@optonline.net>
* mangle.c (mangle_type_string_for_rtti): Revert 153734.
(needs_fake_anon): Likewise.
(write_name): Likewise.
(write_nested_name): Likewise.
* cp-tree.h (mangle_type_string_for_rtti): Likewise.
(get_anonymous_namespace): Likewise.
* name-lookup.c (get_anonymous_namespace_name): Likewise.
* rtti.c (tinfo_name): Likewise.
(tinfo_base_init): Likewise.
From-SVN: r153742
|
|
2009-10-28 Jerry Quinn <jlquinn@optonline.net>
* mangle.c (mangle_type_string_for_rtti): Revert r149964.
(needs_fake_anon): Likewise.
(write_name): Likewise.
(write_nested_name): Likewise.
* cp-tree.h (mangle_type_string_for_rtti): Likewise.
(get_anonymous_namespace): Likewise.
* name-lookup.c (get_anonymous_namespace_name): Likewise.
* rtti.c (tinfo_name): Insert '*' in front of private names.
(tinfo_base_init): Use it.
2009-10-28 Jerry Quinn <jlquinn@optonline.net>
* libsupc++/tinfo.cc (operator=(const type_info&)): Compare by
pointer if name begins with '*'.
* libsupc++/typeinfo (type_info::name()): Likewise.
* libsupc++/tinfo2.cc (before): Likewise.
From-SVN: r153734
|
|
Core issue 812, 861
* name-lookup.c (set_decl_namespace): Deal properly with inline
namespaces.
(qualified_lookup_using_namespace): Overhaul.
* pt.c (print_candidates): Handle getting an OVERLOAD.
change lookup algorithm
From-SVN: r153682
|
|
* cp-tree.h (DECL_NORMAL_CAPTURE_P): New.
* name-lookup.c (qualify_lookup): Check it.
* parser.c (cp_parser_lambda_introducer): Pass explicit_init_p
to add_capture.
* semantics.c (add_capture): Set DECL_NORMAL_CAPTURE_P
on captures without explicit init.
(add_default_capture): Pass explicit_init_p.
Fix capture by copy of types with explicit copy constructor.
* cp-tree.h (TARGET_EXPR_DIRECT_INIT_P): New.
(DIRECT_INIT_EXPR_P): New.
* typeck.c (convert_for_initialization): Just return if
DIRECT_INIT_EXPR_P.
* parser.c (cp_parser_lambda_introducer): Use
TARGET_EXPR_DIRECT_INIT_P for normal captures.
From-SVN: r152500
|
|
From-SVN: r152318
|
|
From-SVN: r151931
|
|
* name-lookup.c (is_class_level): Remove.
(push_binding_level, leave_scope, resume_scope): Adjust.
(pushlevel_class): Adjust.
(poplevel_class): Make sure we're on class_binding_level.
From-SVN: r151527
|
|
Implement DR 757: It's OK for a decl to use a type without linkage
so long as the decl is defined in the current translation unit.
* decl2.c (no_linkage_decls): New vector.
(mark_used): Add decls that use types with no linkage.
(cp_write_global_declarations): Check that they are defined.
(decl_defined_p, no_linkage_error): New fns.
* cp-tree.h (DECL_NO_LINKAGE_CHECKED): New macro.
(struct lang_decl_base): Add flag.
* decl.c (grokfndecl): Don't check type linkage.
(grokvardecl): If the type has no linkage, just make sure
DECL_LANG_SPECIFIC is set.
* pt.c (check_instantiated_arg): Don't check type linkage.
* name-lookup.c (is_local_extern): New fn.
* name-lookup.h: Declare it.
From-SVN: r150634
|
|
* mangle.c (mangle_type_string_for_rtti): Rename to be clearer.
(needs_fake_anon): New.
(write_name): Check it.
(write_nested_name): Add a fake anonymous namespace scope if true.
* name-lookup.c (get_anonymous_namespace_name): No longer static.
* rtti.c, cp-tree.h: Adjust.
* libsupc++/typeinfo (__GXX_MERGED_TYPEINFO_NAMES): Default to 0.
From-SVN: r149964
|
|
namespaces just because we found something on...
* name-lookup.c (qualified_lookup_using_namespace): Don't stop
looking in used namespaces just because we found something on
another branch.
From-SVN: r149637
|
|
2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
* cgraphunit.c: Replace %J by an explicit location. Update all
calls.
* c-decl.c: Likewise.
* function.c: Likewise.
* varasm.c: Likewise.
* tree-ssa.c: Likewise.
* c-common.c: Likewise.
* tree-cfg.c: Likewise.
* config/spu/spu.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/v850/v850.c: Likewise.
java/
* class.c: Replace %J by an explicit location. Update all calls.
objc/
* objc-act.c: Replace %J by an explicit location. Update all
calls.
cp/
* init.c: Replace %J by an explicit location. Update all calls.
* decl.c: Likewise.
* typeck2.c: Likewise.
* pt.c: Likewise.
* name-lookup.c: Likewise.
From-SVN: r149312
|
|
* class.c (get_vtable_decl): Replace finish_decl with cp_finish_decl.
* decl.c (finish_decl): Remove.
(declare_global_var): Replace finish_decl with cp_finish_decl.
(start_method): Same.
* rtti.c (emit_tinfo_decl): Same.
* pt.c (tsubst_expr): Same.
(instantiate_decl): Same.
* decl2.c (grokbitfield): Same.
* name-lookup.c (pushdecl_top_level_1): Same.
* cp-tree.h: Remove finish_decl.
From-SVN: r148666
|
|
./: * c-common.c (skip_evaluation): Don't define.
(c_inhibit_evaluation_warnings): Define global variable.
(overflow_warning): Check c_inhibit_evaluation_warnings rather
than skip_evaluation.
(convert_and_check, warn_for_div_by_zero): Likewise.
* c-common.h (skip_evaluation): Don't declare.
(c_inhibit_evaluation_warnings): Declare.
* c-parser.c (c_parser_typeof_specifier): Set
c_inhibit_evaluation_warnings rather than skip_evaluation.
(c_parser_conditional_expression): Likewise.
(c_parser_binary_expression): Likewise.
(c_parser_sizeof_expression): Likewise.
(c_parser_alignof_expression): Likewise.
* c-typeck.c (build_indirect_ref): Check
c_inhibit_evaluation_warnings rather than skip_evaluation.
(build_conditional_expr, build_binary_op): Likewise.
cp/:
* parser.c (cp_unevaluated_operand): Define global variable.
(cp_parser_question_colon_clause): Increment
c_inhibit_evaluation_warnings when evaluating an expression which
will never be executed.
(cp_parser_decltype): Increment cp_unevaluated_operand and
c_inhibit_evaluation_warnings, not skip_evaluation.
(cp_parser_sizeof_operand): Likewise.
(cp_parser_enclosed_template_argument_list): Save
cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
skip_evaluation.
* cp-tree.h (struct saved_scope): Remove skip_evaluation field.
Add unevaluated_operand and inhibit_evaluation_warnings fields.
(cp_unevaluated_operand): Declare.
* name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
and c_inhibit_evaluation_warnings rather than skip_evaluation.
(pop_from_top_level): Restore cp_unevaluated_operand and
c_inhibit_evaluation_warnings rather than skip_evaluation.
* class.c (build_base_path): Check cp_unevaluated_operand rather
than skip_evaluation.
* typeck.c (build_class_member_access_expr): Likewise.
(cp_build_binary_op): Don't warn about bad shift counts if
c_inhibit_evaluation_warnings is non-zero.
* pt.c (coerce_template_parms): Save state of
cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
skip_evaluation.
(tsubst_aggr_type): Likewise.
(tsubst_pack_expansion): Check cp_unevaluated_operand rather than
skip_evaluation.
(tsubst_copy): Likewise.
(tsubst): Set cp_unevaluated_operand and
c_inhibit_evaluation_warnings, not skip_evaluation.
(tsubst_copy_and_build): Likewise.
* call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
rather than skip_evaluation.
* decl2.c (mark_used): Likewise.
* semantics.c (finish_non_static_data_member): Likewise.
* cvt.c (cp_convert_and_check): Check
c_inhibit_evaluation_warnings rather than skip_evaluation.
* mangle.c (write_type): Set cp_unevaluated_operand rather than
skip_evaluation.
testsuite/:
* g++.dg/warn/skip-1.C: New testcase.
From-SVN: r148535
|
|
gcc/java/
* java-gimplify.c (java_gimplify_block): New argument to
build_empty_stmt.
* expr.c (force_evaluation_order): Same.
* typeck.c: Add location to build_decl or PUSH_FIELD calls.
* class.c: Same.
* decl.c: Same.
* jcf-parse.c: Same.
* constants.c: Same.
* resource.c: Same.
* except.c: Same.
* builtins.c: Same.
* expr.c: Same.
* java-tree.h (PUSH_FIELD): Add location field.
gcc/objc/
* objc-act.c (finish_var_decl): Pass location to finish_decl.
(objc_get_parm_info): Same.
(get_super_receiver): Same.
* objc-act.c (objc_build_component_ref): Pass location to
build_compound_ref.
(build_module_initializer_routine): Pass location to
c_end_compound_stmt.
(objc_generate_static_init_call): Pass location to build_stmt.
(build_typed_selector_reference): New location argument.
(build_selector_reference): Same.
(objc_substitute_decl): Pass location to build_array_ref.
(next_sjlj_build_try_catch_finally): Pass location to build_stmt.
(objc_begin_catch_clause): Same.
(objc_finish_try_stmt): Same.
(objc_finish_catch_clause): Pass location to c_end_compound_stmt.
(objc_build_throw_stmt): New argument.
(generate_shared_structures): Pass location to build_c_cast.
(objc_build_message_expr): Use local location.
(objc_finish_message_expr): Use input_location.
(build_objc_method_call): New argument.
(objc_build_selector_expr): Same.
(get_super_receiver): Pass location to build_c_cast,
build_modify_expr, build_compound_expr.
* objc-act.c: Add location to all calls to start_struct, build_decl,
finish_struct.
gcc/
* tree-pretty-print.c (dump_generic_node): Dump column numbers.
* gimple-pretty-print.c (dump_gimple_stmt): Same.
* gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs
created.
* c-parser.c (c_parser_binary_expression): Use current column while
building binary operations.
* common.opt (fshow-column): Enable by default.
* tree-vrp.c (check_array_ref): Use warning_at.
(check_array_bounds): Use location from call back if expr has no
location.
* tree.h: Add location argument to maybe_fold_*.
* tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*.
(maybe_fold_offset_to_array_ref): Add location argument and use it.
(maybe_fold_offset_to_component_ref): Same.
(maybe_fold_offset_to_reference): Same.
(maybe_fold_offset_to_address): Same.
(maybe_fold_stmt_indirect): Same.
(maybe_fold_stmt_addition): Same.
(fold_stmt_r): Pass location to maybe_fold_*.
(fold_gimple_assign): Same.
* c-tree.h: Add location argument to finish_decl,
default_function_array_conversion, store_init_value.
* c-decl.c (define_label): Use error_at.
(c_make_fname_decl): Pass location to finish_decl.
(finish_decl): New location argument.
(build_compound_literal): Pass location to store_init_value.
(grokdeclarator): Pass location to finish_decl.
(grokfield): Same.
* c-typeck.c (array_to_pointer_conversion): New location argument.
(function_to_pointer_conversion): Same.
(default_function_array_conversion): Same.
(parser_build_unary_op): Pass location to overflow_warning.
(parser_build_binary_op): Same. Use warning_at.
(build_unary_op): Pass location to array_to_pointer_conversion.
(build_c_cast): Pass location to digest_init.
(build_modify_expr): New location argument.
(convert_for_assignment): Same.
(store_init_value): Same.
(digest_init): Same.
(output_init_element): Pass location to digest_init and
array_to_pointer_conversion.
(c_finish_return): Pass location to convert_for_assignment.
* gimplify.c (gimplify_conversion): Pass location to
maybe_fold_offset_to_address.
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location
to maybe_fold_stmt_addition.
* c-omp.c (c_finish_omp_atomic): Pass new location to
build_modify_expr.
(c_finish_omp_for): Same.
* c-common.c (overflow_warning): New argument.
* c-common.h: New argument to build_modify_expr, overflow_warning.
* c-parser.c (c_parser_declaration_or_fndef): Pass location to
finish_decl.
(c_parser_initializer): Pass location to
default_function_array_conversion.
(c_parser_initelt): Same.
(c_parser_initval): Same.
(c_parser_asm_operands): Same.
(c_parser_expr_no_commas): Same. Pass location to build_modify_expr.
(c_parser_conditional_expression): Same.
(c_parser_binary_expression): Add location info to stack. Use it.
(c_parser_unary_expression): Pass location to
default_function_array_conversion, parser_build_unary_op,
build_indirect_ref, c_parser_postfix_expression_after_primary.
(c_parser_postfix_expression_after_primary): New location argument.
Use it.
(c_parser_expression_conv): Pass location to
default_function_array_conversion.
(c_parser_expr_list): Same.
(c_parser_omp_atomic): Same.
(c_parser_omp_for_loop): Same.
* c-tree.h: (struct c_declarator): Add comment to id_loc.
(build_array_declarator): New argument.
* c-decl.c (build_array_declarator): Add location argument.
(grokdeclarator): Set id_loc for cdk_array.
* c-parser.c (c_parser_direct_declarator_inner): Pass location to
build_array_declarator.
* tree.c (build_omp_clause): Add location argument.
* tree.h (OMP_CLAUSE_HAS_LOCATION): New macro.
(OMP_CLAUSE_LOCATION): New macro.
(struct tree_omp_clause): Add location field.
(build_omp_clause): Add argument.
* testsuite/gcc.dg/gomp/for-1.c: Fix column.
* cp/pt.c (tsubst_omp_for_iterator): Pass location to
build_omp_clause.
* cp/parser.c (cp_parser_omp_var_list_no_open): Same.
(cp_parser_omp_clause_collapse): Same.
(cp_parser_omp_clause_default): Same.
(cp_parser_omp_clause_if): Same.
(cp_parser_omp_clause_nowait): Same.
(cp_parser_omp_clause_num_threads): Same.
(cp_parser_omp_clause_ordered): Same.
(cp_parser_omp_clause_schedule): Same.
(cp_parser_omp_clause_untied): Same.
(cp_parser_omp_for_loop): Same.
(cp_parser_omp_parallel): Pass location to c_split_parallel_clauses.
* c-tree.h (c_start_case): Add location argument.
(c_process_expr_stmt): Same.
(c_finish_goto_*): Same.
* tree-parloops.c (initialize_reductions): Pass location to
build_omp_clause.
(create_parallel_loop): Same.
* fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same.
(gfc_trans_omp_reduction_list): Same.
(gfc_trans_omp_clauses): Same.
(gfc_trans_omp_do): Same.
* c-typeck.c (c_finish_goto_label): Same.
(c_finish_goto_ptr): New location argument.
(c_start_case): Same.
(emit_side_effect_warnings): Same.
(c_process_expr_stmt): Same.
(c_finish_stmt_expr): Same.
(c_finish_omp_clauses): Use error_at instead of error.
* gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to
build_omp_clause.
* c-omp.c (c_split_parallel_clauses): New location argument.
* tree-nested.c (convert_nonlocal_reference_stmt): Pass location
to build_omp_clause.
(convert_local_reference_stmt): Same.
(convert_gimple_call): Same.
* c-common.h (c_split_parallel_clauses): New argument.
* c-parser.c (c_parser_statement_after_labels): Pass location to
c_finish_goto_label.
(c_parser_switch_statement): Pass location to c_start_case.
(c_parser_for_statement): Pass location to c_finish_expr_stmt,
and c_process_expr_stmt.
(c_parser_omp_variable_list): Add location argument.
(c_parser_omp_clause_collapse): Pass location to
build_omp_clause.
(c_parser_omp_clause_default): Same.
(c_parser_omp_clause_if): Same.
(c_parser_omp_clause_num_threads): Same.
(-c_parser_omp_clause_ordered): Same.
(c_parser_omp_clause_reduction): Pass location to
c_parser_omp_variable_list.
(c_parser_omp_clause_schedule): Pass location to build_omp_clause.
(c_parser_omp_clause_untied): Same.
(c_parser_omp_for_loop): Pass location to c_process_expr_stmt.
(c_parser_omp_parallel): Pass location to
c_split_parallel_clauses.
* c-tree.h (check_for_loop_decls, undeclared_variable,
build_component_ref, build_array_ref, build_external_ref,
c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op,
build_conditional_expr, build_compound_expr, c_cast_expr,
build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr,
c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New
argument.
* c-semantics.c (build_stmt): Same.
(build_case_label): Same.
* c-decl.c (c_finish_incomplete_decl): Pass location on down.
(undeclared_variable): New argument.
(make_label): Same.
(lookup_label): Pass location on down.
(define_label): Same.
(finish_decl): Same.
(build_compound_literal): Same.
(finish_struct): Same.
(finish_function): Do not set location here.
(check_for_loop_decls): New argument.
* tree.c (save_expr): Set location.
(build_empty_stmt): New argument.
* tree.h (build_empty_stmt): New argument to build_empty_stmt.
(CAN_HAVE_LOCATION_P): Make sure we have a non empty node.
* builtins.c (gimplify_va_arg_expr): Use locations.
(expand_builtin_sync_operation): Same.
* c-typeck.c (build_component_ref): New argument.
(build_array_ref): Same.
(build_external_ref): Same.
(c_expr_sizeof_expr): Same.
(c_expr_sizeof_type): Same.
(parser_build_unary_op): Same.
(build_conditional_expr): Same.
(build_compound_expr): Pass location on down.
(build_compound_expr): New argument.
(build_c_cast): Same.
(c_cast_expr): Same.
(build_asm_expr): Same.
(c_finish_return): Same.
(c_process_expr_stmt): Pass location on down.
(c_finish_stmt_expr): New argument.
(push_clenaup): Same.
(c_finish_omp_parallel): Same.
(c_finish_omp_task): Same.
* gimplify.c (gimplify_call_expr): Pass location on down.
* c-omp.c (c_finish_omp_master): New argument.
(c_finish_omp_critical): Same.
(c_finish_omp_ordered): Same.
(c_finish_omp_barrier): Same.
(-c_finish_omp_taskwait): Same.
(c_finish_omp_atomic): Same.
(c_finish_omp_flush): Same.
* tree-inline.c (copy_tree_body_r): Pass location on down.
(inline_forbidden_p): Remove use of input_location.
* c-gimplify.c (c_build_bind_expr): New argument.
* c-common.c (c_common_truthvalue_conversion): Pass location on down.
(c_sizeof_or_alignof_type): New argument.
(c_alignof_expr): Same.
(build_va_arg): Same.
(c_add_case_label): Same.
* c-common.h (c_sizeof_or_alignof_type, c_alignof_expr,
c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label,
c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt,
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_taskwait, c_finish_omp_for, c_split_parallel_clauses):
New argument.
* stub-objc.c (objc_build_selector_expr): Same.
(objc_build_throw_stmt): Same.
* c-parser.c (c_parser_declaration_or_fndef): Pass location on down.
(c_parser_initelt): Same.
(c_parser_compound_statement): Same.
(c_parser_compound_statement_nostart): Same.
(c_parser_label): Same.
(c_parser_statement_after_labels): Same.
(c_parser_if_body): Same.
(c_parser_else_body): Same.
(c_parser_if_statement): Same.
(c_parser_switch_statement): Same.
(c_parser_while_statement): Same.
(c_parser_do_statement): Same.
(c_parser_for_statement): Same.
(c_parser_asm_statement): Same.
(c_parser_conditional_expression): Same.
(c_parser_binary_expression): Same.
(c_parser_cast_expression): Same.
(c_parser_unary_expression): Same.
(c_parser_sizeof_expression): Same.
(c_parser_alignof_expression): Same.
(c_parser_postfix_expression): Same.
(c_parser_expression): Same.
(c_parser_objc_receiver): Same.
(c_parser_omp_variable_list): Same.
(c_parser_omp_structured_block): Same.
(c_parser_omp_atomic): New argument.
(c_parser_omp_barrier): Same.
(c_parser_omp_critical): Same.
(c_parser_omp_flush): Pass location on down.
(c_parser_omp_for_loop): New argument.
(c_parser_omp_for): Same.
(c_parser_omp_master): Same.
(c_parser_omp_ordered): Same.
(c_parser_omp_sections_scope): Same.
(c_parser_omp_sections): Same.
(c_parser_omp_parallel): Same.
(c_parser_omp_single): Same.
(c_parser_omp_task): Same.
(c_parser_omp_taskwait): Pass location on down.
(c_parser_omp_construct): Same.
(c_parser_omp_threadprivate): Same.
* dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h,
builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c,
tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c,
c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c,
c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c,
emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c,
rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h,
tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c,
config/i386/i386.c, stmt.c:
Add location argument to the following function definitions and/or
function calls: build_decl, objcp_start_struct, objcp_finish_struct,
start_struct, finish_struct, PUSH_FIELD, create_artificial_label,
cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl,
build_compound_literal, parser_xref_tag, resolve_overloaded_builtin,
do_case, c_finish_bc_stmt, build_compound_literal,
build_function_call.
* c-decl.c (build_compound_literal): Add location argument.
Make all diagnostic calls use location.
(start_struct): Same.
(finish_struct): Same.
(start_enum): Same.
(build_enumerator): Same.
(start_function): Same.
(grokdeclarator): Make all diagnostic calls use location.
(store_parm_decls_oldstyle): Same.
* c-typeck.c (build_function_call): Add location argument.
Make all diagnostic calls use location.
(do_case): Same.
(c_finish_bc_stmt): Same.
* tree-nested.c (get_trampoline_type): Add argument.
Pass location to build_decl.
(lookup_tramp_for_decl): Pass location to get_trampoline_type.
* rtl.h (RTL_LOCATION): New.
* c-common.c (c_add_case_label): Add location argument.
Make all diagnostic calls use location.
* c-common.h: Add location argument to make_fname_decl, do_case,
c_add_case_label, build_function_call, resolve_overloaded_builtin.
* c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc.
Set it appropriately for every case. Pass enum_loc to start_enum
call. Pass value_loc first to build_enumerator. Pass enum_loc to
parser_xref_tag.
(c_parser_struct_or_union_specifier): Save location. Use it for
start_struct, finish_struct, and parser_xref_tag.
gcc/testsuite/
* gcc.dg/old-style-prom-3.c: Add column info.
* gcc.dg/overflow-warn-1.c
* gcc.dg/gomp/pr27415.c
* gcc.dg/gomp/for-1.c: Same.
* gcc.dg/enum-compat-1.c: Same.
* gcc.dg/c99-tag-3.c: Same.
* gcc.dg/Wredundant-decls-2.c: Same.
* gcc.dg/func-ptr-conv-1.c: Same.
* gcc.dg/asm-wide-1.c: Same.
* gcc.dg/nofixed-point-2.c: Same.
* gcc.dg/cpp/line3.c: Same.
* gcc.dg/array-10.c: Same.
* gcc.dg/c99-vla-jump-1.c: Same.
* gcc.dg/pr20368-1.c: Same.
* gcc.dg/Wshadow-3.c: Same.
* gcc.dg/c90-const-expr-8.c: Same.
* gcc.dg/label-decl-2.c: Same.
* gcc.dg/dremf-type-compat-2.c: Same.
* gcc.dg/c90-const-expr-5.c: Same.
* gcc.dg/builtins-30.c: Same.
* gcc.dg/Warray-bounds.c: Same.
* gcc.dg/Wcxx-compat-2.c: Same.
* gcc.dg/tree-ssa/col-1.c: Same.
* gcc.dg/old-style-prom-2.c: Same.
* gcc.dg/cast-function-1.c: Same.
* gcc.dg/pr15698-1.c: Same.
* gcc.dg/dremf-type-compat-3.c: Same.
* gcc.dg/vla-8.c: Same.
* gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct
line.
* gcc.dg/label-decl-2.c: Move label diagnostic to correct line.
* gcc.dg/old-style-prom-3.c: Check for error on the correct line.
* gcc.dg/enum-compat-1.c: Same.
* gcc.dg/dremf-type-compat-2.c: Same.
* gcc.dg/old-style-prom-2.c: Same.
* gcc.dg/pr15698-1.c: Same.
* gcc.dg/pr20368-1.c: Same.
* gcc.dg/dremf-type-compat-3.c: Same.
* gcc.dg/builtins-30.c: Same. Test for columns.
gcc/objcp/
* objcp-decl.h (c_end_compound_stmt): New argument.
* objcp-decl.c (objcp_start_struct): Add argument.
(objcp_finish_struct): Same.
gcc/cp/
* typeck.c (cp_build_binary_op): Pass location to overflow_warning.
(build_modify_expr): New arg.
* semantics.c (finish_unary_op_expr): Pass location to
overflow_warning.
(handle_omp_for_class_iterator): Pass location to build_modify_expr.
* typeck.c (cxx_sizeof_or_alignof_type): Pass location to
c_sizeof_or_alignof_type.
(build_array_ref): New argument.
(build_compound_expr): Same.
(build_const_cast): Same.
(build_ptrmemfunc): Pass location to build_c_cast.
* init.c (avoid_placement_new_aliasing): Pass location to
build_stmt.
(build_vec_delete_1): Pass location to cp_build_modify_expr,
build_compound_expr.
* class.c (build_vtbl_ref_1): Pass location to build_array_ref.
* decl.c (poplevel): Pass location to c_build_bind_expr.
(finish_case_label): Pass location to build_case_label.
(finish_constructor_body): Same.
(finish_destructor_body): Pass location to build_stmt.
(cxx_maybe_build_cleanup): Same, but to build_compound_expr.
* call.c (build_new_op): Pass location to build_array_ref.
(build_x_va_arg): Pass location to build_va_arg.
* except.c (expand_end_catch_block): Pass location to
build_stmt.
* cp-tree.h (build_array_ref): New argument.
(build_compound_expr): Same.
(build_c_cast): Same.
* cp-gimplify.c (gimplify_if_stmt): Pass location on down.
(gimplify_switch_stmt): Same.
* typeck2.c (split_nonconstant_init_1): Same.
* pt.c (tsubst_copy): Same.
* semantics.c (add_decl_expr): Same.
(do_poplevel): Same.
(push_cleanup): Same.
(finish_goto_stmt): Same.
(finish_expr_stmt): Same.
(begin_if_stmt): Same.
(begin_while_stmt): Same.
(begin_do_stmt): Same.
(finish_return_stmt): Same.
(begin_for_stmt): Same.
(finish_break_stmt): Same.
(finish_continue_stmt): Same.
(begin_switch_stmt): Same.
(begin_try_block): Same.
(begin_handler): Same.
(finish_asm_stmt): Same.
(finish_label_stmt): Same.
(finish_stmt_expr_expr): Same.
(finalize_nrv_r): Same.
(finish_omp_atomic): Same.
* name-lookup.c (do_using_directive): Same.
* decl2.c (grok_array_decl): Same.
* parser.c (cp_parser_cast_expression): Same.
(cp_parser_selection_statement): Same.
(cp_parser_implicitly_scoped_statement): Same.
(cp_parser_objc_selector_expression): Same.
(cp_parser_objc_synchronized_statement): Same.
(cp_parser_objc_throw_statement): Same.
(cp_parser_omp_critical): Same.
(cp_parser_omp_master): Same.
* typeck.c (build_function_call): Add location argument.
* init.c: Add location argument to all build_decl calls.
* class.c: Same.
* method.c: Same.
* rtti.c: Same.
* tree.c: Same.
* pt.c: Same.
* semantics.c: Same.
* lex.c: Same.
* decl2.c: Same.
* cp-gimplify.c: Same.
* decl.c: Same.
(cp_make_fname_decl): Add location argument. Pass location ot
build_decl.
(finish_case_label): Same.
* cp-tree.h (finish_case_label): Add location argument.
* parser.c (cp_parser_label_for_labeled_statement): Pass location to
finish_case_label.
gcc/fortran/
* trans-array.c (gfc_trans_allocate_array_storage): Pass
location on down.
(gfc_trans_array_constructor_value): Same.
(gfc_trans_scalarized_loop_end): Same.
(gfc_conv_ss_startstride): Same.
(gfc_trans_g77_array): Same.
(gfc_trans_dummy_array_bias): Same.
(gfc_conv_array_parameter): Same.
(structure_alloc_comps): Same.
* trans-expr.c (gfc_conv_function_call): Same.
(fill_with_spaces): Same.
(gfc_trans_string_copy): Same.
(gfc_trans_scalar_assign): Same.
* trans-stmt.c (gfc_trans_goto): Same.
(gfc_trans_if_1): Same.
(gfc_trans_simple_do): Same.
(gfc_trans_do): Same.
(gfc_trans_do_while): Same.
(gfc_trans_logical_select): Same.
(gfc_trans_select): Same.
(gfc_trans_forall_loop): Same.
(gfc_trans_nested_forall_loop): Same.
(generate_loop_for_temp_to_lhs): Same.
(generate_loop_for_rhs_to_temp): Same.
(gfc_trans_forall_1): Same.
(gfc_trans_where_assign): Same.
(gfc_trans_where_3): Same.
(gfc_trans_allocate): Same.
* trans.c (gfc_finish_block): Same.
(gfc_trans_runtime_check): Same.
(gfc_call_malloc): Same.
(gfc_allocate_with_status): Same.
(gfc_call_free): Same.
(gfc_deallocate_with_status): Same.
(gfc_call_realloc): Same.
(gfc_trans_code): Same.
* trans-decl.c (gfc_init_default_dt): Same.
(gfc_generate_constructors): Same.
* trans-io.c (gfc_trans_io_runtime_check): Same.
* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
(gfc_conv_intrinsic_fdate): Same.
(gfc_conv_intrinsic_ttynam): Same.
(gfc_conv_intrinsic_minmax): Same.
(gfc_conv_intrinsic_minmax_char): Same.
(gfc_conv_intrinsic_anyall): Same.
(gfc_conv_intrinsic_count): Same.
(gfc_conv_intrinsic_arith): Same.
(gfc_conv_intrinsic_minmaxloc): Same.
(gfc_conv_intrinsic_minmaxval): Same.
(gfc_conv_intrinsic_rrspacing): Same.
(gfc_conv_intrinsic_array_transfer): Same.
(gfc_conv_intrinsic_trim): Same.
(gfc_conv_intrinsic_repeat): Same.
From-SVN: r148442
|
|
./: * tree.c (build_tree_list_vec_stat): New function.
(ctor_to_vec): New function.
(build_nt_call_vec): New function.
(build_call_array): Change args to be a const pointer.
(build_call_vec): New function.
* tree.h (build_nt_call_vec): Declare.
(build_tree_list_vec_stat): Declare.
(build_tree_list_vec): Define.
(build_call_array): Update declaration.
(build_call_vec): Declare.
(ctor_to_vec): Declare.
* c-common.c (tree_vector_cache): New static variable.
(make_tree_vector): New function.
(release_tree_vector): New function.
(make_tree_vector_single): New function.
(make_tree_vector_copy): New function.
* c-common.h (tree_vector_cache, make_tree_vector): Declare.
(make_tree_vector_single, make_tree_vector_copy): Declare.
* c-parser.c (cached_expr_list_1, cached_expr_list_2): Remove.
(c_parser_expr_list): Don't manage cache here, instead call
make_tree_vector.
(c_parser_release_expr_list): Remove static function.
(c_parser_vec_to_tree_list): Remove static function.
(c_parser_attributes): Call build_tree_list_vec instead of
c_parser_vec_to_tree_list. Call release_tree_vector instead of
c_parser_release_expr_list.
(c_parser_postfix_expression_after_primary): Likewise.
(c_parser_objc_keywordexpr): Likewise.
cp/:
* parser.c (cp_parser_postfix_expression): Change args to a vec.
Release it when done.
(tree_vector): Define typedef. Define VEC functions.
(cp_parser_parenthesized_expression_list): Change return type to
vec. Change all callers.
(cp_parser_new_expression): Change placement and initializer to
vecs. Release them when done.
(cp_parser_new_placement): Change return type to vec. Change all
callers.
(cp_parser_new_initializer): Likewise.
* typeck.c (build_function_call_vec): Just call
cp_build_function_call_vec.
(cp_build_function_call): Just build a vec and call
cp_build_function_call_vec.
(cp_build_function_call_vec): New function based on old
cp_build_function_call.
(convert_arguments): Remove nargs and argarray parameters. Change
values to a vec. Change caller.
(build_x_compound_expr_from_vec): New function.
(cp_build_modify_expr): Build vec to pass to
build_special_member_call.
* call.c (struct z_candidate): Add first_arg field. Change args
field to vec.
(convert_class_to_reference): Handle first argument separately.
(add_candidate): Add first_arg parameter. Change args parameter
to vec. Change all callers.
(add_function_candidate, add_conv_candidate): Likewise.
(add_template_candidate_real, add_template_candidate): Likewise.
(add_template_conv_candidate): Likewise.
(build_user_type_conversion_1): Handle first argument separately.
(resolve_args): Change return type and parameter type to vecs.
Change all callers.
(perform_overload_resolution): Change args parameter to vec.
Change all callers.
(build_new_function_call, build_operator_new_call): Likewise.
(add_candidates): Likewise.
(build_op_call): New globally visible function, built from and
replacing static function build_object_call.
(build_new_op): Don't handle CALL_EXPR. Build vec, not tree_list,
of arguments.
(build_op_delete_call): Build vec to pass to
cp_build_function_call_vec.
(build_temp): Build vec to pass to build_special_member_call.
(convert_like_real): Likewise.
(perform_direct_initialization_if_possible): Likewise.
(build_over_call): Handle first_arg field. Use build_call_array
rather than build_call_list.
(build_special_member_call): Change args parameter to vec. Change
all callers.
(build_new_method_call): Likewise.
* init.c (expand_default_init): Change parms to vec.
(build_raw_new_expr): Change placement and init to vecs. Change
all callers.
(build_new_1, build_new): Likewise.
* class.c (resolve_address_of_overloaded_function): Build array to
pass to fn_type_unification.
* pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
build_new. For CALL_EXPR create a vec rather than a tree_list;
expand a pack if necessary.
(fn_type_unification): Change args parameter to const tree *. Add
nargs parameter. Change all callers.
(type_unification_real): Likewise.
(unify): Build array to pass to type_unification_real.
(get_bindings): Build array to pass to fn_type_unification.
(any_type_dependent_arguments_p): Change args parameter to a vec.
Change all callers.
(make_args_non_dependent): Renamed from build_non_dependent_args.
Change return type to void. Change parameter type to vec. Change
all callers.
(do_auto_deduction): Pass an array to type_unification_real.
* semantics.c (perform_koenig_lookup): Change args to vec. Change
all callers.
(finish_call_expr): Change args to vec. Change all callers. Call
build_op_call instead of passing CALL_EXPR to build_new_op.
(cxx_omp_create_clause_info): Allocate vec to pass to
build_special_member_call.
* decl2.c (build_offset_ref_call_from_tree): Change args parameter
to vec. Change all callers.
* name-lookup.c (lookup_function_nonclass): Likewise.
(struct arg_lookup): Change args to vec.
(arg_assoc_namespace): Handle args as a vec.
(arg_assoc_args_vec): New static function.
(lookup_arg_dependent): Change args parameter to vec. Change all
callers.
* method.c (do_build_assign_ref): Allocate vec to pass to
build_special_member_call.
* except.c (build_throw): Likewise.
* typeck2.c (build_functional_cast): Likewise.
* cvt.c (ocp_convert): Likewise.
* tree.c (build_min_non_dep_call_vec): Change last parameter to
vec. Change all callers.
* cp-tree.h: Update declarations.
* name-lookup.h: Update declarations.
objc/:
* objc-act.c (objc_generate_cxx_ctor_or_dtor): Pass NULL rather
than NULL_TREE to build_special_member_call.
From-SVN: r147759
|
|
2009-04-21 Taras Glek <tglek@mozilla.com>
* include/hashtab.h: Update GTY annotations to new syntax
* include/splay-tree.h: Likewise
gcc/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* alias.c: Update GTY annotations to new syntax
* basic-block.h: Likewise
* bitmap.h: Likewise
* c-common.h: Likewise
* c-decl.c: Likewise
* c-parser.c: Likewise
* c-pragma.c: Likewise
* c-tree.h: Likewise
* cfgloop.h: Likewise
* cgraph.h: Likewise
* config/alpha/alpha.c: Likewise
* config/arm/arm.h: Likewise
* config/avr/avr.h: Likewise
* config/bfin/bfin.c: Likewise
* config/cris/cris.c: Likewise
* config/darwin.c: Likewise
* config/frv/frv.c: Likewise
* config/i386/i386.c: Likewise
* config/i386/i386.h: Likewise
* config/i386/winnt.c: Likewise
* config/ia64/ia64.h: Likewise
* config/iq2000/iq2000.c: Likewise
* config/mips/mips.c: Likewise
* config/mmix/mmix.h: Likewise
* config/pa/pa.c: Likewise
* config/pa/pa.h: Likewise
* config/rs6000/rs6000.c: Likewise
* config/s390/s390.c: Likewise
* config/sparc/sparc.c: Likewise
* config/xtensa/xtensa.c: Likewise
* cselib.h: Likewise
* dbxout.c: Likewise
* dwarf2out.c: Likewise
* except.c: Likewise
* except.h: Likewise
* fixed-value.h: Likewise
* function.c: Likewise
* function.h: Likewise
* gimple.h: Likewise
* integrate.c: Likewise
* optabs.c: Likewise
* output.h: Likewise
* real.h: Likewise
* rtl.h: Likewise
* stringpool.c: Likewise
* tree-data-ref.c: Likewise
* tree-flow.h: Likewise
* tree-scalar-evolution.c: Likewise
* tree-ssa-address.c: Likewise
* tree-ssa-alias.h: Likewise
* tree-ssa-operands.h: Likewise
* tree.c: Likewise
* tree.h: Likewise
* varasm.c: Likewise
* varray.h: Likewise
* vec.h: Likewise
* coretypes.h: Do not define GTY macro if it is already defined
* doc/gty.texi: Update GTY documentation to new syntax
* gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs
* gengtype-parse.c: Likewise
gcc/ada/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* gcc-interface/ada-tree.h: Update GTY annotations to new syntax
* gcc-interface/trans.c: Likewise
* gcc-interface/utils.c: Likewise
gcc/cp/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* cp-tree.h: Update GTY annotations to new syntax
* decl.c: Likewise
* mangle.c: Likewise
* name-lookup.c: Likewise
* name-lookup.h: Likewise
* parser.c: Likewise
* pt.c: Likewise
* rtti.c: Likewise
* semantics.c: Likewise
* typeck2.c: Likewise
gcc/fortran/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* f95-lang.c: Update GTY annotations to new syntax
* trans-intrinsic.c: Likewise
* trans-io.c: Likewise
* trans.h: Likewise
gcc/java/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* builtins.c: Update GTY annotations to new syntax
* decl.c: Likewise
* java-tree.h: Likewise
* jcf.h: Likewise
* lang.c: Likewise
gcc/objc/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* objc-act.c: Update GTY annotations to new syntax
* objc-act.h: Likewise
libcpp/ChangeLog
2009-04-21 Taras Glek <tglek@mozilla.com>
* include/cpp-id-data.h: Update GTY annotations to new syntax
* include/cpplib.h: Likewise
* include/line-map.h: Likewise
* include/symtab.h: Likewise
From-SVN: r146607
|
|
gcc/:
Fix enum conversions which are invalid in C++:
* auto-inc-dec.c (attempt_change): Change 0 to SET in function
call.
* calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function
call.
* cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call.
* dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
* dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function
call.
(dbxout_parms): Likewise.
* df-core.c (df_set_flags): Change changeable_flags parameter to
int.
(df_clear_flags): Likewise.
* df-problems.c (df_rd_bb_local_compute_process_def): Change
top_flag parameter to int.
(df_chain_create_bb_process_use): Likewise.
(df_chain_add_problem): Change chain_flags parameter to unsigned
int. Remove cast.
* df-scan.c (df_ref_create): Change ref_flags parameter to int.
(df_ref_create_structure, df_def_record_1): Likewise.
(df_defs_record, df_uses_record, df_get_call_refs): Likewise.
(df_notes_rescan): Change 0 to VOIDmode in function call.
(df_get_call_refs, df_insn_refs_collect): Likewise.
(df_bb_regs_collect): Likewise.
(df_entry_block_defs_collect): Likewise.
(df_exit_block_uses_collect): Likewise.
* df.h: Update declarations.
* double-int.c (double_int_divmod): Add cast to enum type.
* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
* dwarf2out.c (new_reg_loc_descr): Add casts to enum type.
(based_loc_descr): Likewise.
(loc_descriptor_from_tree_1): Change first_op and second_op to
enum dwarf_location_atom. Add cast to enum type.
* expmed.c (init_expmed): Change 0 to SET in function call.
* expr.c (init_expr_target): Change 0 to VOIDmode in function
call.
(expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call.
(do_store_flag): Likewise.
* fixed-value.h (struct fixed_value): Change mode to enum
machine_mode.
* function.c (assign_parms): Change 0 to VOIDmode in function
call.
* genautomata.c (insert_automaton_decl): Change 1 to INSERT in
function call.
(insert_insn_decl, insert_decl, insert_state): Likewise.
(automata_list_finish): Likewise.
* genrecog.c (process_define_predicate): Add cast to enum type.
* gensupport.c (init_predicate_table): Add cast to enum type.
* gimple.c (gimple_build_return): Change 0 to ERROR_MARK in
function call.
(gimple_build_call_1, gimple_build_label): Likewise.
(gimple_build_goto, gimple_build_asm_1): Likewise.
(gimple_build_switch_1, gimple_build_cdt): Likewise.
* gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function
call.
(enum fallback): Rename from enum fallback_t.
(fallback_t): Typedef as int.
* gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
GSI_SAME_STMT in function call.
* ira.c (setup_class_subset_and_memory_move_costs): Add casts to
enum type.
(setup_reg_class_relations): Likewise.
(setup_reg_class_nregs): Change cl to int. Add casts to enum
type.
(setup_prohibited_class_mode_regs): Add cast to enum type.
(setup_prohibited_mode_move_regs): Likewise.
* ira-costs.c (record_reg_classes): Change rclass to enum
reg_class.
(record_address_regs): Change i to enum reg_class.
* lists.c (alloc_EXPR_LIST): Add cast to enum type.
* machmode.h (GET_MODE_CLASS): Cast value to enum mode_class.
(GET_MODE_WIDER_MODE): Cast value to enum machine_mode.
(GET_MODE_2XWIDER_MODE): Likewise.
(GET_CLASS_NARROWEST_MODE): Likewise.
* omp-low.c (expand_omp_for): Add cast to enum type.
* optabs.c (debug_optab_libfuncs): Add casts to enum type.
* opts.c (enable_warning_as_error): Change kind to diagostic_t.
* postreload.c (reload_cse_simplify_operands): Change rclass local
to enum reg_class.
* predict.c (combine_predictions_for_insn): Change best_predictor
and predictor to enum br_predictor.
(combine_predictions_for_bb): Likewise.
(build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to
use SET_PREDICT_EXPR_OUTCOME.
* real.c (real_arithmetic): Change icode to code in function
call.
* reginfo.c (init_move_cost): Add casts to enum type.
(init_reg_sets_1, init_fake_stack_mems): Likewise.
* regmove.c (regclass_compatible_p): Change class0 and class1 to
enum reg_class.
* reload.c (find_valid_class): Add casts to enum type.
(push_reload): Change 0 to NO_REGS in function call.
(find_reloads): Change this_alternative to array of enum
reg_class. Remove some now-unnecessary casts.
(make_memloc): Change 0 to VOIDmode in function call.
* reload1.c (reload): Change 0 to VOIDmode in function call.
(eliminate_regs_1, elimination_effects): Likewise.
(eliminate_regs_in_insn): Likewise.
(emit_input_reload_insns): Add cast to enum type.
(delete_output_reload): Change 0 to VOIDmode in function call.
* reorg.c (insn_sets_resource_p): Convert include_delayed_effects
to enum type in function call.
* tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
(SET_PREDICT_EXPR_OUTCOME): Define.
* tree-dump.c (get_dump_file_info): Change phase parameter to
int.
(get_dump_file_name, dump_begin, dump_enabled_p): Likewise.
(dump_initialized_p, dump_flag_name, dump_end): Likewise.
(dump_function): Likewise.
* tree-dump.h: Update declarations.
* tree-pass.h: Update declarations.
* varasm.c (assemble_integer): Change mclass to enum mode_class.
* config/arm/arm.c (thumb_legitimize_reload_address): Add cast to
enum type.
(arm_rtx_costs_1): Correct parenthesization.
(arm_rtx_costs): Add casts to enum type.
(adjacent_mem_locations): Reverse arguments to const_ok_for_op.
(vfp_emit_fstmd): Use add_rg_note.
(emit_multi_reg_push, emit_sfm): Likewise.
(thumb_set_frame_pointer): Likewise.
(arm_expand_prologue): Likewise.
(arm_regno_class): Change return type to enum reg_class.
(thumb1_expand_prologue): Use add_reg_note.
* config/arm/arm-protos.h (arm_regno_class): Update declaration.
* config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL
in function call.
* config/arm/gentune.sh: Add cast to enum type.
* config/arm/arm-tune.md: Rebuild.
* config/i386/i386.c (ix86_expand_prologue): Use add_reg_note.
(ix86_split_fp_branch, predict_jump): Likewise.
(ix86_expand_multi_arg_builtin): Change sub_code from enum
insn_code to enum rtx_code.
(ix86_builtin_vectorized_function): Add cast to enum type.
* config/i386/i386.md (truncdfsf2): Change slot to enum
ix86_stack_slot.
(truncxf<mode>2, isinf<mode>2): Likewise.
* config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
enum type.
* config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note.
(spill_restore_mem, do_spill, ia64_expand_prologue): Likewise.
(insert_bundle_state): Change 1 to INSERT in function call.
(ia64_add_bundle_selector_before): Likewise.
* config/ia64/ia64.md (cpu attr): Add cast to enum type.
(save_stack_nonlocal): Change 0 to LCT_NORMAL in function call.
(restore_stack_nonlocal): Likewise.
* config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in
function call.
* config/mips/mips.c (mips_binary_cost): Change 0 to SET in
function call.
(mips_rtx_costs): Likewise.
(mips_override_options): Add casts to enum type.
* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL
in function call.
* config/pa/pa.c (legitimize_pic_address): Use add_reg_note.
(store_reg, set_reg_plus_d): Likewise.
(hppa_expand_prologue, hppa_profile_hook): Likewise.
* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
cast to enum type.
(altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in
function call.
(emit_unlikely_jump): Use add_reg_note.
(rs6000_emit_allocate_stack): Likewise.
(rs6000_frame_related, rs6000_emit_prologue): Likewise.
(output_toc): Change 1 to INSERT in function call.
(output_profile_hook): Change 0 to LCT_NORMAL in function call.
(rs6000_initialize_trampoline): Likewise.
(rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in
function call.
* config/s390/s390.c (s390_rtx_costs): Add cast to enum type.
(s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call.
(s390_expand_setmem, s390_expand_cmpmem): Likewise.
(save_gprs): Use add_reg_note.
(s390_emit_prologue): Likewise.
(s390_expand_builtin): Change 0 to EXPAND_NORMAL in function
call.
* config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note.
(sparc_fold_builtin): Add cast to enum type.
* config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to
enum insn_code.
(spu_expand_prologue): Use add_reg_note.
(expand_builtin_args): Change 0 to EXPAND_NORMAL in function
call.
* c-parser.c (c_parser_attributes): Change VEC back to tree list.
(c_parser_postfix_expression_after_primary): Get VEC for list of
arguments. Get original types of arguments. Call
build_function_call_vec.
(cached_expr_list_1, cached_expr_list_2): New static variables.
(c_parser_expr_list): Change return type to VEC *. Add
p_orig_types parameter. Change all callers.
(c_parser_release_expr): New static function.
(c_parser_vec_to_tree_list): New static function.
* c-typeck.c (build_function_call): Rewrite to build a VEC and
call build_function_call_vec.
(build_function_call_vec): New function, based on old
build_function_call.
(convert_arguments): Remove nargs and argarray parameters. Change
values to a VEC. Add origtypes parameter.
(build_modify_expr): Add rhs_origtype parameter. Change all
callers.
(convert_for_assignment): Add origtype parameter. Change all
callers. If warn_cxx_compat, check for conversion to an enum
type when calling a function.
(store_init_value): Add origtype parameter. Change all callers.
(digest_init): Likewise.
(struct init_node): Add origtype field.
(add_pending_init): Add origtype parameter. Change all callers.
(output_init_element): Likewise.
(output_pending_init_elements): Pass origtype from init_node to
output_init_element.
(process_init_elemnt): Pass origtype from c_expr to
output_init_element.
(c_finish_return): Add origtype parameter. Change all callers.
* c-common.c (sync_resolve_size): Change params to VEC *. Change
caller.
(sync_resolve_params): Likewise.
(sync_resolve_return): Change params to first_param. Change
caller.
(resolve_overloaded_builtins): Change params to VEC *. Change
callers. Save first parameter around call to
build_function_call_vec.
* c-decl.c (finish_decl): Add origtype parameter. Change all
callers. Call build_function_call_vec rather than
build_function_call for cleanup.
* c-tree.h: Update declarations.
* c-common.h: Update declarations.
* stub-objc.c (objc_rewrite_function_call): Change parameter from
params to first_param.
* target.h (struct gcc_target): Change resolve_overloaded_builtin
params parameter from tree to void *.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
Change arglist parameter to have type void *, and to be a pointer
to a VEC.
* config/rs6000/rs6000-protos.h
(altivec_resolve_overloaded_builtin): Update declaration.
* config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change
fnargs parameter to have type void *, and to be a pointer to a
VEC. Call build_function_call_vec instead of
build_function_call.
* config/spu/spu-protos.h (spu_expand_builtin): Update
declaration.
gcc/cp/:
* typeck.c (build_function_call_vec): New function.
(cp_build_function_call): Only pass first parameter to
objc_rewrite_function_call.
(build_modify_expr): Add rhs_origtype parameter. Change all
callers.
* decl.c (finish_decl): Add origtype parameter. Change all
callers.
* semantics.c (finish_call_expr): Pass VEC to
resolve_overloaded_builtin.
gcc/objc:
* objc-act.c (objc_rewrite_function_call): Change parameter from
params to first_param. Change all callers.
gcc/testsuite:
* gcc.dg/Wcxx-compat-3.c: New testcase.
From-SVN: r146451
|
|
unnamed temp objects)
PR c++/39763
* name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
about shadowing by tentative parms.
From-SVN: r146053
|
|
resolution with C linkage)
PR c++/34691
* name-lookup.c (merge_functions): Keep multiple extern "C" functions.
* call.c (joust): Complain about mismatched default arguments
in extern "C" functions.
* class.c (resolve_address_of_overloaded_function): Handle multiple
extern "C" functions.
* pt.c (resolve_overloaded_unification): Likewise.
From-SVN: r145709
|
|
gcc/ChangeLog:
2009-04-02 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
* c-decl.c: (clone_underlying_type): Move this ...
* c-common.c (set_underlying_type): ... here.
Also, make sure the function properly sets TYPE_STUB_DECL() on
the newly created typedef variant type.
* c-common.h (is_typedef_decl, set_underlying_type): Declare ...
* c-common.c (is_typedef_decl, set_underlying_type): ... new entry points.
gcc/cp/ChangeLog:
2009-04-02 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
* decl2.c (grokfield): when a typedef appears in a
class, create the typedef variant type node for it.
(save_template_attributes): Creating typedef variant type node
here is now useless.
* decl.c (grokdeclarator): If the typedef'ed struct/class was
anonymous, set the proper type name to all its type variants.
(xref_basetypes) : Fixup the variant types after setting
TYPE_BINFO on REF.
* name-lookup.c (pushdecl_maybe_friend): Reuse the
set_underlying_type function to install typedef variant types.
* cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
macro.
(append_type_to_template_for_access_check): New entry points.
* semantics.c (check_accessibility_of_qualified_id):
When a typedef that is a member of a class appears in a template,
add it to the template. It will be ...
* class.c (finish_struct_bits): Split type variant fixup into ...
(fixup_type_variants): A new entry point.
* pt.c (instantiate_class_template, instantiate_template ): ... access
checked at template instantiation time.
(resolve_type_name_type): The type name should be the name of the
main type variant.
(retrieve_specialization): Specializations of template typedefs aren't
to be looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
(append_type_to_template_for_access_check): New entry point.
(tsubst_decl): For typedefs, build the variant type from the correct
original type.
(get_class_bindings): Fix function comment.
(perform_typedefs_access_check): New entry point.
gcc/testsuite/ChangeLog:
2009-04-02 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
* g++.dg/template/typedef11.C: New test.
* g++.dg/template/typedef12.C: Likewise.
* g++.dg/template/typedef13.C: Likewise.
* g++.dg/template/typedef14.C: Likewise.
* g++.dg/template/typedef15.C: Likewise.
* g++.dg/template/typedef16.C: Likewise.
* g++.dg/template/sfinae3.C: Compile this pedantically.
The only errors expected should be the one saying the typedef is ill
formed.
* g++.old-deja/g++.pt/typename8.C: Likewise.
* g++.dg/template/access11.C: Update this.
libstdc++-v3/ChangeLog:
2009-04-02 Dodji Seketeli <dodji@redhat.com>
* include/ext/bitmap_allocator.h: the typedefs should be made public
if we want them to be accessible. This has been revealed by the patch
that fixes PR c++/26693 in g++.
From-SVN: r145440
|
|
resolution with C linkage)
PR c++/34691
* name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
extern C declarations.
* libsupc++/unwind-cxx.h: Correct __cxa_call_terminate prototype.
From-SVN: r145386
|
|
PR c++/28274
* name-lookup.c (pushdecl_maybe_friend): Check default args later.
From-SVN: r145042
|
|
unnamed temp objects)
PR c++/39526
* name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
a parm with a parm.
From-SVN: r145012
|
|
PR debug/37890
* name-lookup.c (do_namespace_alias): Don't call global_decl debug
hook at function scope.
From-SVN: r144913
|
|
IMPORTED_DECL_ASSOCIATED_DECL.
* dwarf2out.c (dwarf2out_imported_module_or_decl_1): Allow
non-NAMESPACE_DECL IMPORTED_DECL_ASSOCIATED_DECL.
* name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
instead of calling imported_module_or_decl debug hook if
building_stmt_tree ().
* cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
is a NAMESPACE_DECL.
From-SVN: r144912
|
|
From-SVN: r144324
|
|
From-SVN: r143562
|
|
gcc/ChangeLog:
2009-01-21 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
* c-decl.c: (clone_underlying_type): Move this ...
* c-common.c (set_underlying_type): ... here.
Also, make sure the function properly sets TYPE_STUB_DECL() on
the newly created typedef variant type.
(is_typedef_decl ): New entry point.
* tree.h: Added a new member member_types_needing_access_check to
struct tree_decl_non_common.
(set_underlying_type): New entry point.
(is_typedef_type): Likewise.
gcc/cp/ChangeLog/
2009-01-21 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
* decl2.c (grokfield): when a typedef appears in a
class, create the typedef variant type node for it.
(save_template_attributes): Creating typedef variant type node
here is now useless.
* decl.c (grokdeclarator): If the typedef'ed struct/class was
anonymous, set the proper type name to all its type variants.
* name-lookup.c (pushdecl_maybe_friend): Reuse the
set_underlying_type function to install typedef variant types.
* cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
macro.
(append_type_to_template_for_access_check): New entry points.
* semantics.c (check_accessibility_of_qualified_id):
When a typedef that is a member of a class appears in a template,
add it to the template. It will be ...
* pt.c (instantiate_class_template, instantiate_template ): ... access
checked at template instantiation time.
(tsubst): Handle the case of being called with NULL args.
(resolve_type_name_type): The type name should be the name of the
main type variant.
(append_type_to_template_for_access_check): New entry point.
gcc/testsuite/ChangeLog
2009-01-21 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
* g++.dg/template/typedef11.C: New test.
* g++.dg/template/typedef12.C: Likewise.
* g++.dg/template/typedef13.C: Likewise.
* g++.dg/template/typedef14.C: Likewise.
* g++.dg/template/sfinae3.C: Compile this pedantically.
The only errors expected should be the one saying the typedef is ill
formed.
* g++.old-deja/g++.pt/typename8.C: Likewise.
* g++.dg/template/access11.C: Update this.
libstdc++-v3/ChangeLog:
2009-01-21 Dodji Seketeli <dodji@redhat.com>
* include/ext/bitmap_allocator.h: the typedefs should be made public
if we want them to be accessible. This has been revealed by the patch
that fixes PR c++/26693 in g++.
From-SVN: r143546
|
|
gcc/cp/ChangeLog:
2009-01-13 Dodji Seketeli <dodji@redhat.com>
PR c++/38636
* name-lookup.c (pushtag): Don't create members to types that are not
being created.
gcc/testsuite/ChangeLog:
2009-01-13 Dodji Seketeli <dodji@redhat.com>
PR c++/38636
* g++.dg/parse/crash50.C: New test.
From-SVN: r143392
|
|
From-SVN: r143321
|
|
PR c++/35109
* name-lookup.c (lookup_name_real): Keep looking past a hidden
binding.
Co-Authored-By: Steve Ellcey <sje@cup.hp.com>
From-SVN: r143320
|
|
gcc/cp/ChangeLog:
2009-01-12 Dodji Seketeli <dodji@redhat.com>
PR c++/36019
* pt.c (parameter_of_template_p): New function.
* cp-tree.h: Declare it.
* name-lookup.c (binding_to_template_parms_of_scope_p): New
function.
(outer_binding): Take template parameters in account when looking for
a name binding.
gcc/testsuite/ChangeLog:
2009-01-12 Dodji Seketeli <dodji@redhat.com>
PR c++/36019
* g++.dg/lookup/hidden-class12.C: New test.
* g++.dg/lookup/hidden-class13.C: New test.
* g++.dg/lookup/hidden-class14.C: New test.
* g++.dg/lookup/hidden-class15.C: New test.
* g++.dg/lookup/hidden-class16.C: New test.
From-SVN: r143315
|
|
argument to function template)
PR c++/38597
* name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
From-SVN: r142868
|