Age | Commit message (Collapse) | Author | Files | Lines |
|
2011-07-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49645
* c-decl.c (finish_decl): Also set DECL_HARD_REGISTER for global
register variables.
* tree-ssa-sccvn.c (vn_reference_op_eq): Disregard differences
in type qualification here ...
(copy_reference_ops_from_ref): ... not here.
(vn_reference_lookup_3): ... or here.
(copy_reference_ops_from_ref): Record decl bases as MEM[&decl].
(vn_reference_lookup): Do the lookup with a valueized ao-ref.
* g++.dg/tree-ssa/pr8781.C: Disable SRA.
From-SVN: r175916
|
|
2011-07-05 Richard Guenther <rguenther@suse.de>
c-family/
* c-common.c (c_common_nodes_and_builtins): Build all common
tree nodes first.
* c-decl.c (c_init_decl_processing): Defer building common
tree nodes to c_common_nodes_and_builtins.
cp/
* decl.c (cxx_init_decl_processing): Defer building common
tree nodes to c_common_nodes_and_builtins.
From-SVN: r175856
|
|
* c-common.h (c_tree_chain_next): New static inline function.
* c-decl.c (union lang_tree_node): Use it in chain_next expression.
* cp-tree.h (union lang_tree_node): Use it in chain_next expression.
From-SVN: r175542
|
|
PR c++/46400
* cp-tree.h (union lang_tree_node): Use TYPE_NEXT_VARIANT
instead of TYPE_CHAIN for chain_next for types.
* c-decl.c (union lang_tree_node): Use TYPE_NEXT_VARIANT
instead of TYPE_CHAIN for chain_next for types.
From-SVN: r175389
|
|
/gcc/cp
2011-06-10 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h (error_operand_p): Remove.
/gcc
2011-06-10 Paolo Carlini <paolo.carlini@oracle.com>
* tree.h (error_operand_p): Add.
* dbxout.c (dbxout_type_fields): Use the latter.
* c-decl.c (add_stmt): Likewise.
* gimplify.c (omp_add_variable, omp_notice_variable,
gimplify_scan_omp_clauses): Likewise.
From-SVN: r174899
|
|
move TS_STATEMENT_LIST to be a substructure of TS_TYPED
gcc/
* c-decl.c (c_push_function_context): Copy the current statement
list stack.
(add_stmt): Check building_stmt_list_p and push_stmt if necessary.
(finish_struct): Call building_stmt_list_p instead of checking
cur_stmt_list.
* c-parser.c (c_parser_postfix_expression): Likewise.
* c-typeck.c (c_end_compound_stmt): Likewise.
* print-tree.c (print_node) [STATEMENT_LIST]: Don't print TREE_CHAIN.
* tree-iterator.c (stmt_list_cache): Change to a VEC.
(alloc_stmt_list): Adjust for stmt_list_cache's new type.
(free_stmt_list): Likewise.
* tree.h (struct tree_statement_list): Include typed_tree instead
of tree_common.
* tree.c (initialize_tree_contains_struct): Mark TS_STATEMENT_LIST
as TS_TYPED instead of TS_COMMON.
gcc/c-family/
* c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
(stmt_list_stack): Define.
(cur_stmt_list): Adjust for new type of x_cur_stmt_list.
* c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
gcc/cp/
* cp-tree.h (building_stmt_tree): Delete.
* decl.c (save_function_data): Tweak initializer for x_cur_stmt_list.
(build_aggr_init_full_exprs): Call building_stmt_list_p
instead of building_stmt_tree.
(initialize_local_var): Likewise.
(finish_function): Likewise.
* decl2.c (finish_anon_union): Likewise.
* init.c (begin_init_stmts): Likewise.
(finish_init_stmts): Likewise.
(expand_aggr_init_1): Likewise.
* name-lookup.c (do_local_using_decl): Likewise.
(do_namespace_alias): Likewise.
(do_using_directive): Likewise.
(cp_emit_debug_info_for_using): Likewise.
* semantics.c (add_stmt): Assert that stmt_list_stack is non-empty.
From-SVN: r174343
|
|
array in compound statement))
PR c/49120
* c-decl.c (start_decl): Convert expr to void_type_node.
* gcc.dg/pr49120.c: New test.
From-SVN: r174081
|
|
* c-decl.c (c_override_global_bindings_to_false): Remove.
(global_bindings_p): Don't check
c_override_global_bindings_to_false.
* c-tree.h (c_override_global_bindings_to_false): Remove.
* c-typeck.c (composite_type): Don't set
c_override_global_bindings_to_false.
From-SVN: r173632
|
|
to bool and adjust comment.
2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
* langhooks.h (lang_hooks_for_types): Change global_bindings_p's return
type to bool and adjust comment.
* fold-const.c (fold_range_test): Adjust call to global_bindings_p.
(fold_mathfn_compare): Remove calls to global_bindings_p.
(fold_inf_compare): Likewise.
* stor-layout.c (variable_size): Adjust call to global_bindings_p.
* c-tree.h (global_bindings_p): Adjust prototype.
* c-decl.c (global_bindings_p): Return bool and simplify.
ada/
* gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
* gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
cp/
* name-lookup.h (global_bindings_p): Adjust prototype.
* name-lookup.c (global_bindings_p): Return bool.
fortran/
* f95-lang.c (global_bindings_p): Return bool and simplify.
go/
* go-lang.c (global_bindings_p): Return bool and simplify.
java/
* java-tree.h (global_bindings_p): Adjust prototype.
* decl.c (global_bindings_p): Return bool.
lto/
* lto-lang.c (global_bindings_p): Return bool.
From-SVN: r173535
|
|
* tree.h (get_pending_sizes): Remove prototype.
(put_pending_size): Likewise.
(put_pending_sizes): Likewise.
* stor-layout.c (pending_sizes): Delete.
(get_pending_sizes): Likewise.
(put_pending_size): Likewise.
(put_pending_sizes): Likewise.
(variable_size): Do not call put_pending_size and tidy up.
* function.h (struct function): Remove dont_save_pending_sizes_p.
* lto-streamer-in.c (input_function): Do not stream it.
* lto-streamer-out.c (output_function): Likewise.
* tree-inline.c (initialize_cfun): Do not copy it.
* c-decl.c (store_parm_decls): Do not set it.
* omp-low.c (create_task_copyfn): Likewise.
* tree-optimize.c (tree_rest_of_compilation): Likewise.
cp/
* decl.c (start_preparsed_function): Likewise.
fortran/
* trans-decl.c (trans_function_start): Likewise.
ada/
* gcc-interface/utils.c (begin_subprog_body): Do not call
get_pending_sizes.
(end_subprog_body): Likewise.
From-SVN: r173424
|
|
* c-decl.c (finish_decl): Don't call get_pending_sizes.
(grokparm): Add parameter expr. Pass it to grokdeclarator.
(push_parm_decl): Add parameter expr. Pass it to grokdeclarator.
(c_variable_size): Remove.
(grokdeclarator): Use save_expr instead of c_variable_size. Don't
call put_pending_sizes.
(get_parm_info): Add parameter expr. Use it to set
arg_info->pending_sizes.
(store_parm_decls): Use arg_info->pending_sizes instead or calling
get_pending_sizes.
* c-parser.c (c_parser_parms_declarator): Update call to
c_parser_parms_list_declarator.
(c_parser_parms_list_declarator): Take parameter expr. Update
call to push_parm_decl. Update recursive call. Don't call
get_pending_sizes. Update calls to get_parm_info.
(c_parser_objc_method_definition): Update calls to
c_parser_objc_method_decl and objc_start_method_definition.
(c_parser_objc_methodproto): Update call to
c_parser_objc_method_decl.
(c_parser_objc_method_decl): Add parameter expr. Update call to
grokparm.
(c_parser_objc_try_catch_finally_statement): Update call to
grokparm.
* c-tree.h (struct c_arg_info.pending_sizes): Change to a tree.
(get_parm_info, grokparm, push_parm_decl): Update prototypes.
c-family:
* c-objc.h (objc_start_method_definition): Update prototype.
* stub-objc.c (objc_start_method_definition): Add extra parameter.
cp:
* parser.c (cp_parser_objc_method_definition_list): Update call to
objc_start_method_definition.
objc:
* objc-act.c (objc_start_method_definition): Add parameter expr.
Update call to start_method_def.
(objc_generate_cxx_ctor_or_dtor, objc_synthesize_getter,
objc_synthesize_setter) Update calls to
objc_start_method_definition.
(objc_get_parm_info): Add parameter expr. Update call to
get_parm_info.
(start_method_def): Add parameter expr. Update call to
objc_get_parm_info.
* objc-gnu-runtime-abi-01.c (build_module_initializer_routine):
Update call to objc_get_parm_info.
* objc-runtime-shared-support.h (objc_get_parm_info): Add extra
parameter.
From-SVN: r173422
|
|
2011-05-04 Richard Guenther <rguenther@suse.de>
* c-decl.c (check_bitfield_type_and_width): Do not pass NULL
to build_int_cst.
* c-typeck.c (really_start_incremental_init): Use bitsize_int
for constructor indices.
(push_init_level): Likewise.
c-family/
* c-common.c (fix_string_type): Use size_int for index type bounds.
(start_fname_decls): Do not pass NULL to build_int_cst.
(c_init_attributes): Likewise.
* c-lex.c (c_lex_with_flags): Likewise.
From-SVN: r173378
|
|
constant fits in the index type.
2011-05-03 Richard Guenther <rguenther@suse.de>
* c-decl.c (grokdeclarator): Instead of looking at
TREE_OVERFLOW check if the constant fits in the index type.
* gcc.dg/large-size-array-5.c: New testcase.
From-SVN: r173297
|
|
Index: gcc/ChangeLog
2011-04-27 Lawrence Crowl <crowl@google.com>
* timevar.h (timevar_cond_start): Remove unused POP_TIMEVAR_AND_RETURN.
(timevar_cond_start): New for starting a timer only when it is not
already running.
(timevar_cond_stop): New for stopping a timer when it was not already
running.
* timevar.c (timevar_stop): Enable start/stop timers to start again.
(timevar_cond_start): New as above.
(timevar_cond_stop): New as above.
* timevar.def: Add start/stop timers for compiler phases,
TV_PHASE_SETUP, TV_PHASE_PARSING, TV_PHASE_DEFERRED, TV_PHASE_CGRAPH,
TV_PHASE_DBGINFO (C), TV_PHASE_CHECK_DBGINFO (C++), TV_PHASE_GENERATE,
and TV_PHASE_FINALIZE.
Change push/pop timer TV_PARSE to TV_PARSE_GLOBAL.
Add push/pop timers TV_PARSE_STRUCT, TV_PARSE_ENUM, TV_PARSE_FUNC,
TV_PARSE_INLINE, TV_PARSE_INMETH, TV_TEMPLATE_INST.
Change push/pop timer TV_NAME_LOOKUP into a start/stop timer.
Make unused TV_OVERLOAD into a start/stop timer.
Remove unused timers TV_OVERLOAD, TV_TEMPLATE_INSTANTIATION.
Mark the strings for TV_NAME_LOOKUP and TV_OVERLOAD with a "|"
to indicate that they are start/stop timers.
* toplev.c (compile_file): Change TV_PARSE to TV_PARSE_GLOBAL.
Add start/stop timers TV_PHASE_PARSING and TV_PHASE_GENERATE.
Move initialization to do_compile.
(do_compile): Add initialization from above.
Add start/stop timers TV_PHASE_SETUP and TV_PHASE_FINALIZE.
* c-decl.c (c_write_global_declarations): Add start/stop of
TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO.
* c-parser.c (c_parser_declaration_or_fndef): Push/pop TV_PARSE_FUNC
or TV_PARSE_INLINE, as appropriate.
(c_parser_enum_specifier): Push/pop TV_PARSE_ENUM.
(c_parser_struct_or_union_specifier): Push/pop TV_PARSE_STRUCT.
Index: gcc/cp/ChangeLog
2011-04-27 Lawrence Crowl <crowl@google.com>
* decl.c: (push_local_name): Change TV_NAME_LOOKUP to start/stop.
(poplevel): Refactor POP_TIMEVAR_AND_RETURN to plain code.
Change TV_NAME_LOOKUP to start/stop.
(define_label): Refactor timevar calls out to a wrapper function.
Change TV_NAME_LOOKUP to start/stop.
(xref_tag): Likewise.
(lookup_label): Refactor timevar calls out to a wrapper function.
Change TV_NAME_LOOKUP to start_cond/stop_cond.
* pt.c: (instantiate_class_template): Add a wrapper to push/pop new
TV_TEMPLATE_INST.
(instantiate_template): Add a wrapper to push/pop new TV_TEMPLATE_INST.
(lookup_template_class): Refactor timevar calls out to a wrapper
function. Change use of TV_NAME_LOOKUP to TV_TEMPLATE_INST.
(instantiate_decl): Change TV_PARSE to TV_TEMPLATE_INST.
* name-lookup.c: (store_bindings): Change TV_NAME_LOOKUP to start/stop.
(poplevel_class): Change TV_NAME_LOOKUP to start_cond/stop_cond.
(push_namespace): Likewise.
(pop_nested_namespace): Likewise.
(pushdecl_namespace_level): Likewise.
(store_class_bindings): Likewise.
(push_to_top_level): Likewise.
(identifier_type_value): Refactor timevar calls out to a wrapper
function. Change TV_NAME_LOOKUP to start/stop.
(find_binding): Likewise.
(push_using_decl): Likewise.
(lookup_arg_dependent): Likewise.
(push_using_directive): Likewise.
(qualified_lookup_using_namespace): Refactor POP_TIMEVAR_AND_RETURN
to plain code. Change TV_NAME_LOOKUP to start/stop.
(lookup_type_current_level): Likewise. Refactor inner return to
break.
(pushdecl_class_level): Refactor POP_TIMEVAR_AND_RETURN to plain
code. Change TV_NAME_LOOKUP to start_cond/stop_cond.
(pushdecl_top_level_1): Likewise.
(lookup_using_namespace): Likewise.
(pushdecl_with_scope): Refactor timevar calls out to a wrapper
function. Change TV_NAME_LOOKUP to start_cond/stop_cond.
(push_overloaded_decl): Likewise.
(push_class_level_binding): Likewise.
(namespace_binding): Likewise.
(set_namespace_binding): Likewise.
(supplement_binding): Likewise.
(unqualified_namespace_lookup): Likewise.
(lookup_name_real): Likewise.
(lookup_type_scope): Likewise.
(namespace_ancestor): Likewise.
(lookup_name_innermost_nonclass_level): Likewise.
(pushtag): Likewise.
(pop_from_top_level): Likewise.
(pushdecl_maybe_friend): Refactor timevar calls out to a wrapper
function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Wrap long
lines.
(add_using_namespace): Refactor timevar calls out to a wrapper
function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Bypass
wrapper on call to self.
* decl2.c: (cp_write_global_declarations): Add start/stop of
new TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_CHECK_DBGINFO.
Remove push/pop calls to TV_VARCONST.
* parser.c: Add include of "timevar.h".
(cp_parser_explicit_instantiation): Add push/pop calls to
TV_TEMPLATE_INST.
(cp_parser_enum_specifier): Add push/pop calls to new TV_PARSE_ENUM.
(cp_parser_class_specifier): Add wrapper to add push/pop calls to
TV_PARSE_STRUCT.
(cp_parser_function_definition_from_specifiers_and_declarator): Add
push/pop calls to new TV_PARSE_FUNC or TV_PARSE_INLINE.
(cp_parser_late_parsing_for_member): Add push/pop calls to
new TV_PARSE_INMETH.
* call.c: Add include of "timevar.h".
(convert_class_to_reference): Wrap and add push/pop calls to
TV_OVERLOAD.
(build_op_call): Likewise.
(build_conditional_expr): Likewise.
(build_new_op): Likewise.
(build_new_method_call): Likewise.
(build_user_type_conversion): Reorganize to single return and add
push/pop calls to TV_OVERLOAD.
(perform_overload_resolution): Likewise.
* Make-lang.in: Add dependence of call.o and parser.o on $(TIMEVAR_H).
From-SVN: r173277
|
|
gcc/
2011-05-02 Simon Martin <simartin@users.sourceforge.net>
PR c/35445
* c-decl.c (finish_decl): Only create a composite if the types are
compatible.
gcc/testsuite/
2011-05-02 Simon Martin <simartin@users.sourceforge.net>
PR c/35445
* gcc.dg/pr35445.c: New test.
From-SVN: r173269
|
|
In gcc/c-family/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* c-objc.h (objc_get_interface_ivars): Removed.
(objc_detect_field_duplicates): New.
* stub-objc.c: Likewise.
In gcc/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* c-decl.c (detect_field_duplicates): Call
objc_detect_field_duplicates instead of objc_get_interface_ivars.
In gcc/objc/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_get_interface_ivars): Removed.
(objc_detect_field_duplicates): New.
(hash_instance_variable): New.
(eq_instance_variable): New.
In gcc/objcp/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objcp-decl.c (objcp_finish_struct): Use
objc_detect_field_duplicates instead of having a local
implementation.
In gcc/testsuite/:
2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/naming-4.m: Updated.
* objc.dg/naming-5.m: Updated.
* objc.dg/naming-6.m: New.
* objc.dg/naming-7.m: New.
* obj-c++.dg/naming-1.mm: Updated.
* obj-c++.dg/naming-2.mm: Updated.
* obj-c++.dg/naming-3.mm: New.
* obj-c++.dg/naming-4.mm: New.
From-SVN: r172511
|
|
TREE_CHAIN.
gcc/ada/
* gcc-interface/ada-tree.h (union lang_tree_node): Check for
TS_COMMON before calling TREE_CHAIN.
* gcc-interface/misc.c (gnat_init_ts): New function.
(LANG_HOOKS_INIT_TS): Define.
gcc/
* c-decl.c (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
* print-tree.c (print_node): Likewise.
* tree-inline.c (copy_tree_r): Likewise.
* c-lang.c (LANG_HOOKS_INIT_TS): Define.
* lto-streamer-in.c (lto_input_tree_pointers): Check for TS_TYPED
instead of TS_COMMON.
* lto-streamer-out.c (lto_output_tree_pointers): Likewise.
* tree.c (initialize_tree_contains_struct): Handle TS_TYPED.
(copy_node_stat): Zero TREE_CHAIN only if necessary.
(MARK_TS_BASE, MARK_TS_TYPED, MARK_TS_COMMON): Move these...
(MARK_TS_DECL_COMMON, MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL):
...and these...
(MARK_TS_DECL_WITH_VIS, MARK_TS_DECL_NON_COMMON): ...and these...
* tree.h: ...here.
(TREE_CHAIN): Check for a TS_COMMON structure.
(TREE_TYPE): Check for a TS_TYPED structure.
gcc/c-family/
* c-common.h (c_common_init_ts): Declare.
* c-common.c (c_common_init_ts): Define.
gcc/cp/
* cp-lang.c (cp_init_ts): Call cp_common_init_ts. Move
tree_contains_struct initialization to...
* cp-objcp-common.c (cp_common_init_ts): ...here. Use MARK_*
macros.
* cp-objcp-common.h (cp_common_init_ts): Declare.
* cp-tree.h (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
gcc/fortran/
* f95-lang.c (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
gcc/go/
* go-lang.c (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
gcc/java/
* java-tree.h (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
gcc/lto/
* lto-tree.h (union lang_tree_node): Check for TS_COMMON before
calling TREE_CHAIN.
* lto.c (lto_fixup_common): Likewise.
gcc/objc/
* objc-lang.c (objc_init_ts): Move code for this function...
* objc-act.c (objc_common_init_ts): ...here. Define.
* objc-act.h (objc_common_init_ts): Declare.
gcc/objcp/
* objcp-lang.c (objcxx_init_ts): Call objc_common_init_ts and
cp_common_init_ts.
From-SVN: r172359
|
|
2011-04-12 Martin Jambor <mjambor@suse.cz>
* cgraph.h (cgraph_node): Remove function declaration.
(cgraph_create_node): Declare.
(cgraph_get_create_node): Likewise.
* cgraph.c (cgraph_create_node): Renamed to cgraph_create_node_1.
Updated all callers.
(cgraph_node): Renamed to cgraph_create_node, assert that a node for
the decl does not already exist. Call cgraph_get_create_node instead
of cgraph_node.
(cgraph_get_create_node): New function.
(cgraph_same_body_alias): Update comment.
(cgraph_set_call_stmt): Call cgraph_get_node instead of cgraph_node,
assert it does not return NULL.
(cgraph_update_edges_for_call_stmt): Likewise.
(cgraph_clone_edge): Likewise.
(cgraph_create_virtual_clone): Likewise.
(cgraph_update_edges_for_call_stmt_node): Call cgraph_get_create_node
instead of cgraph_node.
(cgraph_add_new_function): Call cgraph_create_node or
cgraph_get_create_node instead of cgraph_node.
* cgraphbuild.c (record_reference): Call cgraph_get_create_node
instead of cgraph_node.
(record_eh_tables): Likewise.
(mark_address): Likewise.
(mark_load): Likewise.
(build_cgraph_edges): Call cgraph_get_create_node instead
of cgraph_node.
(rebuild_cgraph_edges): Likewise.
* cgraphunit.c (cgraph_finalize_function): Call cgraph_get_create_node
instead of cgraph_node.
(cgraph_copy_node_for_versioning): Call cgraph_create_node instead of
cgraph_node.
* lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Call
cgraph_create_node instead of cgraph_node.
* c-decl.c (finish_function): Call cgraph_get_create_node instead
of cgraph_node.
* lto-cgraph.c (input_node): Likewise.
* lto-streamer-in.c (input_function): Likewise.
* varasm.c (mark_decl_referenced): Likewise.
(assemble_alias): Likewise.
gcc/c-family/
* c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
of cgraph_node.
gcc/cp/
* cp/class.c (cp_fold_obj_type_ref): Call cgraph_get_create_node
instead of cgraph_node.
* cp/decl2.c (cxx_callgraph_analyze_expr): Likewise.
(cp_write_global_declarations): Likewise.
* cp/optimize.c (maybe_clone_body): Likewise.
* cp/semantics.c (maybe_add_lambda_conv_op): Likewise.
* cp/mangle.c (mangle_decl): Likewise.
* cp/method.c (make_alias_for_thunk): Likewise.
(use_thunk): Likewise.
gcc/ada/
* gcc-interface/utils.c (end_subprog_body): Call
cgraph_get_create_node instead of cgraph_node.
gcc/fortran/
* trans-decl.c (gfc_generate_function_code): Call
cgraph_get_create_node instead of cgraph_node.
gcc/objc/
* objc-act.c (mark_referenced_methods): Call cgraph_get_create_node
instead of cgraph_node.
From-SVN: r172307
|
|
2011-04-01 Gary Funck <gary@intrepid.com>
* c-decl.c (grokdeclarator): Fix formatting.
From-SVN: r171831
|
|
2011-03-21 Richard Guenther <rguenther@suse.de>
PR c/47939
* c-decl.c (grokdeclarator): Drop to the main variant only
for array types. Drop flag_gen_aux_info check.
* gcc.dg/debug/dwarf2/pr47939-1.c: New testcase.
* gcc.dg/debug/dwarf2/pr47939-2.c: Likewise.
* gcc.dg/debug/dwarf2/pr47939-3.c: Likewise.
* gcc.dg/debug/dwarf2/pr47939-4.c: Likewise.
From-SVN: r171245
|
|
with variably modified type.
* c-decl.c (diagnose_mismatched_decls): Give an error for
redefining a typedef with variably modified type.
testsuite:
* gcc.dg/c1x-typedef-1.c: Expect errors for redefinitions of
variably modified typedefs.
* gcc.dg/c1x-typedef-2.c: Remove.
From-SVN: r171172
|
|
tag by default.
* c-decl.c (grokfield): Don't allow typedefs for structures or
unions with no tag by default.
* doc/extend.texi (Unnamed Fields): Update.
testsuite:
* gcc.dg/c1x-anon-struct-1.c: Don't test use of typedefs.
* gcc.dg/c1x-anon-struct-3.c: New test.
* gcc.dg/anon-struct-11.c: Update.
From-SVN: r171170
|
|
PR tree-optimization/26854
* c-decl.c (struct c_scope): Add field has_jump_unsafe_decl.
(decl_jump_unsafe): Move higher in file, with no other change.
(bind): Set has_jump_unsafe_decl if appropriate.
(update_label_decls): Test has_jump_unsafe_decl to avoid loop.
(check_earlier_gotos): Likewise.
(c_check_switch_jump_warnings): Likewise.
From-SVN: r169267
|
|
union)
PR c/46889
* c-decl.c (detect_field_duplicates): Ensure hash is used for
finding duplicates when first field is anonymous.
testsuite:
* gcc.dg/anon-struct-15.c: New test.
From-SVN: r168348
|
|
gcc/
* c-aux-info.c (gen_formal_list_for_type): Use prototype_p.
* c-decl.c (diagnose_arglist_conflict): Likewise.
(diagnose_mismatched_decls, merge_decls): Likewise.
(c_builtin_function, c_builtin_function_ext_scope): Likewise.
(start_decl, start_function): Likewise.
* c-tree.h (C_DECL_ISNT_PROTOTYPED): Likewise.
* config/ia64/ia64.h (INIT_CUMULATIVE_ARGS): Likewise.
* config/mep/mep.c (mep_validate_interrupt): Likewise.
* config/pa/pa.h (INIT_CUMULATIVE_ARGS): Likewise.
* config/rs6000/rs6000.c (init_cumulative_args): Likewise.
* config/sh/sh.c (sh_init_cumulative_args): Likewise.
* config/sparc/sparc.c (init_cumulative_args): Likewise.
* dwarf2out.c (add_prototyped_attribute): Likewise.
(gen_subprogram_die): Likewise.
* ipa-type-escape.c (check_function_parameter_and_return_types):
Likewise.
(check_call): Likewise.
* tree-ssa.c (useless_type_conversion_p): Likewise.
gcc/ada/
* gcc-interface/utils.c (handle_nonnull_attribute): Use prototype_p.
(handle_sentinel_attribute): Likewise.
gcc/c-family/
* c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
Use prototype_p.
gcc/cp/
* decl.c (decls_match, duplicate_decls): Use prototype_p.
* pt.c (push_template_decl_real): Likewise.
gcc/lto/
* lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
Use prototype_p.
gcc/objc/
* objc-act.c (next_sjlj_build_enter_and_setjmp): Use prototype_p.
From-SVN: r168181
|
|
gcc:
2010-12-17 Paolo Bonzini <bonzini@gnu.org>
PR c/20385
* function.c (used_types_insert): Handle ERROR_MARK.
* c-decl.c (grokdeclarator): Handle ERROR_MARK.
(declspecs_add_type): Leave error_mark_node in specs->type.
(finish_declspecs): Change it to integer_type_node here.
* c-parser.c (c_parser_peek_2nd_token): Move earlier.
(enum c_lookahead_kind): New.
(c_parser_next_token_starts_typename): New name of
c_parser_next_tokens_start_typename. Accept lookahead enum
and handle it here instead of...
(c_parser_next_tokens_start_declaration): ... here. Call it.
(c_parser_declspecs): Accept another argument. Do not exit
on C_ID_ID if it is guessed to be an unknown typename.
(c_parser_parms_declarator): Use 2nd token to distinguish a K&R
declaration from an ANSI declaration starting with an unknown
typename.
(c_parser_struct_declaration, c_parser_objc_type_name,
c_parser_typeof_specifier, c_parser_declarator,
c_parser_direct_declarator_inner): Adjust calls.
(c_parser_parameter_declaration): Likewise.
(c_parser_type_name): Pass back an error_mark_node to the caller.
(c_parser_postfix_expression): Do error recovery when
c_parser_type_name returns NULL.
testsuite:
2010-12-17 Paolo Bonzini <bonzini@gnu.org>
PR c/20385
* objc.dg/tls/init-2.m: Adjust.
* gcc.dg/noncompile/920923-1.c: Adjust.
* gcc.dg/noncompile/pr44517.c: Adjust.
* gcc.dg/declspec-18.c: New test.
From-SVN: r167999
|
|
In gcc/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* c-family/c-common.h: Removed the declarations of all the objc_
callbacks, and moved them into c-objc.h. Removed
objc_ivar_visibility_kind and moved it into c-objc.h.
* c-family/c-objc.h: New file.
* c-family/c-common.c: Include c-objc.h.
* c-family/c-format.c: Same change.
* c-family/stub-objc.c: Same change.
* c-decl.c: Include c-family/c-objc.h.
* c-parser.c: Same change.
* c-typeck.c: Same change.
* c-config-lang.in (gtfiles): Added c-family/c-objc.h.
* Makefile.in (c-decl.o): Depend on c-family/c-objc.h.
(c-parser.o): same change.
(c-typeck.o): Same change.
(c-family/c-format.o): Same change.
(c-family/stub-objc.o): Same change.
(c-family/c-common.o): Same change.
(PLUGIN_HEADERS): Added c-family/c-objc.h.
In gcc/cp/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* call.c: Include c-family/c-objc.h.
* decl.c: Same change.
* decl2.c: Same change.
* error.c: Same change.
* lex.c: Same change.
* parser.c: Same change.
* pt.c: Same change.
* semantics.c: Same change.
* typeck.c: Same change.
* Make-lang.in (cp/decl.o): Depend on c-family/c-objc.h.
(cp/decl2.o): Same change.
(cp/call.o): Same change.
(cp/error.o): Same change.
(cp/lex.o): Same change.
(cp/parser.o): Same change.
(cp/pt.o): Same change.
(cp/semantics.o): Same change.
(cp/typeck.o): Same change.
* config-lang.in (gtfiles): Added c-family/c-objc.h.
In gcc/objc/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c: Include c-family/c-objc.h.
* objc-lang.c: Same change.
* Make-lang.in (objc/objc-act.o): Depend on
c-family/c-objc.h.
(objc/objc-lang.o): Same change.
* config-lang.in (gtfiles): Added c-family/c-objc.h.
In gcc/objcp/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* config-lang.in (gtfiles): Added c-family/c-objc.h.
* Make-lang.in (objcp/objcp-act.o): Depend on
c-family/c-objc.h.
(objcp/objcp-lang.o): Same change.
(objcp/objcp-decl.o): Same change.
* objcp-lang.c: Include c-family/c-objc.h.
* objcp-decl.c: Same change.
From-SVN: r167481
|
|
PR c/45062
* c-decl.c (grokparms): Set arg_info->parms to NULL_TREE when
!funcdef_flag.
From-SVN: r167381
|
|
In gcc/c-family/:
2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_finish_function): New.
(objc_non_volatilized_type): Removed.
(objc_type_quals_match): Removed.
* stub-objc.c (objc_finish_function): New.
(objc_non_volatilized_type): Removed.
(objc_type_quals_match): Removed.
In gcc/objc/:
2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_build_volatilized_type): Removed.
(objc_non_volatilized_type): Removed.
(objc_type_quals_match): Removed.
(local_variables_to_volatilize): New.
(objc_volatilize_decl): Add the decl to volatilize to
local_variables_to_volatilize, but don't volatilize it yet.
(objc_finish_function): New.
* objc-act.h (local_variables_to_volatilize): New.
In gcc/cp/:
2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
* decl.c (finish_function): Call objc_finish_function when
compiling Objective-C++.
* call.c (standard_conversion): Do not call
objc_non_volatilized_type().
(implicit_conversion): Same change.
* typeck.c (comp_ptr_ttypes_real): Same change.
In gcc/:
2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
* c-decl.c (finish_function): Call objc_finish_function in
Objective-C.
* c-typeck.c (convert_for_assignment): Do not call
objc_type_quals_match().
From-SVN: r167318
|
|
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
PR c/46462
* c-decl.c (declspecs_add_type): Make variables with error types
integers.
* c-parser.c (c_parser_next_tokens_start_declaration): Two IDs
do not start a declaration before an Objective-C foreach.
(c_parser_declaration_or_fndef): Improve recovery after unknown
type name.
(c_parser_for_statement): Hoist entrance of "foreach context"
before ifs, add corresponding reset where it was missing. Do
not set objc_could_be_foreach_context for C.
From-SVN: r166732
|
|
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
* c-tree.h (enum c_typespec_kind): Add ctsk_none.
(struct c_declspecs): Replace tagdef_seen_p and type_seen_p
with typespec_kind.
* c-decl.c (build_null_declspecs): Initialize typespec_kind.
(shadow_tag_warned, check_compound_literal_type): Adjust
uses of tag_defined_p.
(declspecs_add_type): Set typespec_kind.
* c-parser.c (c_parser_declaration_or_fndef,
c_parser_declspecs, c_parser_struct_declaration,
c_parser_parameter_declaration, c_parser_type_name,
c_parser_objc_diagnose_bad_element_prefix): Adjust uses
of type_seen_p.
* c-typeck.c (c_cast_expr): Use typespec_kind instead of
tag_defined_p, pass ctsk_firstref through.
testsuite:
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
* gcc.dg/Wcxx-compat-8.c: Add testcases involving incomplete types.
From-SVN: r166699
|
|
gcc/
2010-11-16 Simon Martin <simartin@users.sourceforge.net>
PR c/43384
* c-decl.c (lookup_label): Labels can only be referenced in a
function's scope.
(store_parm_decls_oldstyle): Skip erroneous parameters.
gcc/testsuite/
2010-11-16 Simon Martin <simartin@users.sourceforge.net>
PR c/43384
* gcc.dg/parser-error-3.c: New test.
From-SVN: r166408
|
|
PR c/44772
* c-decl.c (warn_cxx_compat_finish_struct): Don't call
pointer_set_contains if DECL_NAME is NULL.
* gcc.dg/Wcxx-compat-21.c: New test.
From-SVN: r166384
|
|
* tree.h (EXPR_LOC_OR_HERE): New macro.
* builtins.c (c_strlen): Use it.
* c-decl.c (build_enumerator): Likewise.
* gimplify.c (internal_get_tmp_var): Likewise.
(shortcut_cond_expr): Likewise.
(gimplify_one_sizepos): Likewise.
c-family/
* c-common.c (conversion_warning, warn_for_collisions_1): Use
EXPR_LOC_OR_HERE.
cp/
* decl.c (pop_switch): Use EXPR_LOC_OR_HERE.
* typeck.c (convert_for_assignment): Likewise.
From-SVN: r166123
|
|
In gcc/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* c-decl.c (c_write_global_declarations): Call
objc_write_global_declarations when compiling Objective-C.
* c-lang.c (finish_file): Removed.
In gcc/c-family/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (finish_file): Removed.
(objc_write_global_declarations): New.
* c-opts.c (c_common_parse_file): Do not call finish_file.
* stub-objc.c (objc_write_global_declarations): New.
In gcc/cp/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* cp-lang.c (finish_file): Removed.
* decl2.c (cp_write_global_declarations): Call
objc_write_global_declarations when compiling Objective-C++.
In gcc/objc/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-lang.c (finish_file): Removed.
* objc-act.c (objc_finish_file): Renamed to
objc_write_global_declarations. Do not try to instantiate C++
templates when compiling Objective-C++ as this is now
automatically done before this function is called. Do not check
for syntax-only run or PCH generation as this is done by the
callers.
* objc-act.h (objc_finish_file): Removed.
In gcc/objcp/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* objcp-lang.c (finish_file): Removed.
In gcc/testsuite/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers. Test adapted to
not require Foundation and run with the GNU runtime as well.
2006-03-13 Fariborz Jahanian <fjahanian@apple.com>
Radar 4439126
* obj-c++.dg/template-8.mm: New.
From-SVN: r165714
|
|
In gcc/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 4133425
* c-decl.c (undeclared_variable): Issue diagnostic on
private 'ivar' access.
In gcc/c-family/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 4133425
* c-common.h (objc_diagnose_private_ivar): New decl.
* stub-objc.c (objc_diagnose_private_ivar): New stub.
In gcc/cp/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from apple/trunk branch on FSF servers.
2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 4133425
* lex.c (unqualified_name_lookup_error): Issue diagnostic
for private 'ivar' access.
In gcc/objc/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 4133425
* objc-act.c (objc_diagnose_private_ivar): New.
In gcc/testsuite/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 4133425
* objc.dg/private-1.m: Test modified.
* obj-c++.dg/private-1.mm: Test modified.
From-SVN: r165601
|
|
In gcc/:
2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented fast enumeration for Objective-C.
* c-parser.c (objc_could_be_foreach_context): New.
(c_lex_one_token): Recognize RID_IN keyword in a potential
Objective-C foreach context.
(c_parser_declaration_or_fndef): Added parameter. Accept
Objective-C RID_IN keyword as terminating a declaration; in that
case, return the declaration in the new parameter.
(c_parser_extenral_declaration): Updated calls to
c_parser_declaration_or_fndef.
(c_parser_declaration_or_fndef): Same change.
(c_parser_compound_statement_nostart): Same change.
(c_parser_label): Same change.
(c_parser_objc_methodprotolist): Same change.
(c_parser_omp_for_loop): Same change.
(c_parser_for_statement): Detect and parse Objective-C foreach
statements.
(c_parser_omp_for_loop): Updated call to check_for_loop_decls().
* c-decl.c (check_for_loop_decls): Added parameter to allow ObjC
fast enumeration parsing code to turn off the c99 error but still
perform checks on the loop declarations.
* c-tree.h (check_for_loop_decls): Updated declaration.
* doc/objc.texi: Document fast enumeration.
In gcc/c-family/:
2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented fast enumeration for Objective-C.
* c-common.h (objc_finish_foreach_loop): New.
* stub-objc.c (objc_finish_foreach_loop): New.
In gcc/objc/:
2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented fast enumeration for Objective-C.
* objc-act.c (build_fast_enumeration_state_template): New.
(TAG_ENUMERATION_MUTATION): New.
(TAG_FAST_ENUMERATION_STATE): New.
(synth_module_prologue): Call build_fast_enumeration_state_template() and set up
objc_enumeration_mutation_decl.
(objc_create_temporary_var): Allow providing a name to temporary
variables.
(objc_build_exc_ptr): Updated calls to
objc_create_temporary_var().
(next_sjlj_build_try_catch_finally): Same change.
(objc_finish_foreach_loop): New.
* objc-act.h: Added OCTI_FAST_ENUM_STATE_TEMP,
OCTI_ENUM_MUTATION_DECL, objc_fast_enumeration_state_template,
objc_enumeration_mutation_decl.
Merge from 'apple/trunk' branch on FSF servers.
2006-04-12 Fariborz Jahanian <fjahanian@apple.com>
Radar 4507230
* objc-act.c (objc_type_valid_for_messaging): New routine to check
for valid objc object types.
(objc_finish_foreach_loop): Check for invalid objc objects in
foreach header.
In gcc/testsuite/:
2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented fast enumeration for Objective-C.
* objc.dg/foreach-1.m: New.
* objc.dg/foreach-2.m: New.
* objc.dg/foreach-3.m: New.
* objc.dg/foreach-4.m: New.
* objc.dg/foreach-5.m: New.
* objc.dg/foreach-6.m: New.
* objc.dg/foreach-7.m: New.
Merge from 'apple/trunk' branch on FSF servers:
2006-04-13 Fariborz Jahanian <fjahanian@apple.com>
Radar 4502236
* objc.dg/objc-foreach-5.m: New.
2006-04-12 Fariborz Jahanian <fjahanian@apple.com>
Radar 4507230
* objc.dg/objc-foreach-4.m: New.
2006-03-13 Fariborz Jahanian <fjahanian@apple.com>
Radar 4472881
* objc.dg/objc-foreach-3.m: New.
2005-03-07 Fariborz Jahanian <fjahanian@apple.com>
Radar 4468498
* objc.dg/objc-foreach-2.m: New.
2006-02-15 Fariborz Jahanian <fjahanian@apple.com>
Radar 4294910
* objc.dg/objc-foreach-1.m: New
In libobjc/:
2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented fast enumeration for Objective-C.
* Makefile.in (C_SOURCE_FILES): Added objc-foreach.c.
(OBJC_H): Added runtime.h
* objc-foreach.c: New file.
* objc/runtime.h: New file.
From-SVN: r165019
|
|
field using a typedef name.
gcc/:
* c-typeck.c (lookup_field): If -fplan9-extensions, permit
referring to a field using a typedef name.
(find_anonymous_field_with_type): New static function.
(convert_to_anonymous_field): New static function.
(convert_for_assignment): If -fplan9-extensions, permit converting
pointer to struct to pointer to anonymous field.
* c-decl.c (grokfield): If -fplan9-extensions, permit anonymous
fields.
(is_duplicate_field): New static function.
(detect_field_duplicates_hash): If -fplan9-extensions, check for
typedef names duplicating field names.
(detect_field_duplicates): Likewise.
* doc/invoke.texi (Option Summary): Mention -fplan9-extensions.
(C Dialect Options): Document -fplan9-extensions.
* doc/extend.texi (Unnamed Fields): Document -fplan9-extensions.
gcc/c-family/:
* c.opt (-fplan9-extensions): New option.
gcc/testsuite/:
* gcc.dg/anon-struct-11.c: New test.
* gcc.dg/anon-struct-12.c: New test.
* gcc.dg/anon-struct-13.c: New test.
* gcc.dg/anon-struct-14.c: New test.
From-SVN: r164926
|
|
In gcc/:
2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
* c-parser.c: Applied change originally in c-parse.in.
2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
Radar 4281748
* c-decl.c (start_decl): Check for redeclaration of class name.
* c-parse.in (after_type_declarator): Recognize CLASSNAME.
In gcc/c-family/:
2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
Radar 4281748
* c-common.h (objc_check_global_decl): New declaration.
* stub-objc.c (objc_check_global_decl): New stub.
In gcc/objc/:
2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
Radar 4281748
* objc-act.c (objc_check_global_decl): New
In gcc/testsuite/:
2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
Radar 4281748
* objc.dg/naming-2.m: Update
* objc.dg/naming-3.m: New
From-SVN: r164735
|
|
2010-09-24 Richard Guenther <rguenther@suse.de>
* c-decl.c (pop_scope): Always set file-scope DECL_CONTEXT.
Make sure to not call set_type_context with error_mark_node.
* langhooks.c (lhd_set_decl_assembler_name): Use DECL_FILE_SCOPE_P.
* gcc.dg/lto/20091006-2_0.c: Prune warnings.
From-SVN: r164591
|
|
PR objc/25965
In gcc/objc/:
* objc-act.c (objc_get_interface_ivars): New function.
(objc_collecting_ivars): New variable.
(continue_class): Set and reset objc_collecting_ivars for context.
In gcc/:
* c-decl.c (detect_field_duplicates): If compiling Objective-C,
call objc_get_interface_ivars ().
* c-family/c-common.h (objc_get_interface_ivars): New declaration.
* c-family/stub-objc.c (objc_get_interface_ivars): New stub.
In gcc/objcp/:
* objcp-decl.c (objcp_finish_struct): Call
objc_get_interface_ivars() and check for duplicate ivars.
In gcc/testsuite/:
Merge from 'apple/trunk' branch on FSF servers.
2005-10-11 Fariborz Jahanian <fjahanian@apple.com>
Radar 4291785
objc.dg/naming-4.m: New
objc.dg/naming-5.m: New
obj-c++.dg/naming-1.mm: New
obj-c++.dg/naming-2.mm: New
From-SVN: r164491
|
|
TS_TRANSLATION_UNIT_DECL.
2010-09-16 Richard Guenther <rguenther@suse.de>
* tree.c (tree_node_structure_for_code): TRANSLATION_UNIT_DECL
is TS_TRANSLATION_UNIT_DECL.
(initialize_tree_contains_struct): Adjust.
(all_translation_units): New global vector.
(build_translation_unit_decl): New function.
* tree.h (TRANSLATION_UNIT_LANGUAGE): New macro.
(struct tree_translation_unit_decl): New.
(all_translation_units): Declare.
(union tree_node): Add translation_unit_decl member.
(build_translation_unit_decl): Declare.
* treestruct.def (TS_TRANSLATION_UNIT_DECL): New.
* lto-streamer-out.c (pack_ts_translation_unit_decl_value_fields):
New function.
(pack_value_fields): Call it.
(lto_output_tree_ref): Handle references to TRANSLATION_UNIT_DECL.
(lto_output_ts_translation_unit_decl_tree_pointers): New function.
(lto_output_tree_pointers): Call it.
* lto-streamer-in.c (lto_input_tree_ref): Handle references
to TRANSLATION_UNIT_DECL.
(unpack_ts_translation_unit_decl_value_fields): New function.
(unpack_value_fields): Call it.
(lto_input_ts_translation_unit_decl_tree_pointers): New function.
(lto_input_tree_pointers): Call it.
* lto-streamer.c (check_handled_ts_structures): Adjust.
* lto-streamer.h (enum LTO_tags): Add LTO_translation_unit_decl_ref.
* c-decl.c (all_translation_units): Remove.
(pop_scope): Use build_translation_unit_decl.
(collect_all_refs): Adjust.
(for_each_global_decl): Likewise.
(c_write_global_declarations): Likewise.
java/
* jcf-parse.c (current_file_list): Remove.
(java_parse_file): Use build_translation_unit_decl. Adjust.
From-SVN: r164331
|
|
2010-09-10 Richard Guenther <rguenther@suse.de>
* tree.c (type_hash_eq): For ARRAY_TYPEs also compare
TYPE_SIZE.
(build_index_type): Implement in terms of build_range_type.
(build_range_type): Do not allow NULL_TREE type, improve
hashing to cover more cases. Set TYPE_STRUCTURAL_EQUALITY_P
if we didn't hash.
* c-decl.c (grokdeclarator): When modifying TYPE_SIZE manually
create a distinct copy of the type.
From-SVN: r164174
|
|
* c-tree.h, c-decl.c (build_enumerator): Add location parameter.
* c-parser.c (c_parser_enum_specifier): Adjust call to build_enumerator.
From-SVN: r163988
|
|
gcc/
* vec.h (FOR_EACH_VEC_ELT): Define.
* c-decl.c: Use it.
* cfgloop.c: Likewise.
* cfgloopmanip.c: Likewise.
* cgraph.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/mips/mips.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* dbxout.c: Likewise.
* df-scan.c: Likewise.
* dominance.c: Likewise.
* dse.c: Likewise.
* dwarf2out.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* function.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* ggc-common.c: Likewise.
* gimplify.c: Likewise.
* graphite-blocking.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* haifa-sched.c: Likewise.
* ifcvt.c: Likewise.
* implicit-zee.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-emit.c: Likewise.
* lambda-code.c: Likewise.
* loop-invariant.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-opts.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.c: Likewise.
* lto-symtab.c: Likewise.
* matrix-reorg.c: Likewise.
* opts.c: Likewise.
* predict.c: Likewise.
* print-tree.c: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched.c: Likewise.
* sese.c: Likewise.
* stor-layout.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-chrec.c: Likewise.
* tree-data-ref.c: Likewise.
* tree-emutls.c: Likewise.
* tree-inline.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-loop-manip.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* value-prof.c: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* vmsdbgout.c: Likewise.
gcc/ada/
* gcc-interface/decl.c: Use FOR_EACH_VEC_ELT.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
gcc/c-family/
* c-common.c: Use FOR_EACH_VEC_ELT.
* c-gimplify.c: Likewise.
* c-pragma.c: Likewise.
gcc/cp/
* call.c: Use FOR_EACH_VEC_ELT.
* class.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* error.c: Likewise.
* except.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* semantics.c: Likewise.
* typeck2.c: Likewise.
gcc/fortran/
* trans-openmp.c: Use FOR_EACH_VEC_ELT.
gcc/java/
* class.c: Use FOR_EACH_VEC_ELT.
* expr.c: Likewise.
* jcf-parse.c: Likewise.
* resource.c: Likewise.
gcc/lto/
* lto.c: Use FOR_EACH_VEC_ELT.
From-SVN: r163401
|
|
struct)
/gcc
2010-08-17 Shujing Zhao <pearly.zhao@oracle.com>
PR c/40563
* c-decl.c (diagnose_uninitialized_cst_member): New function.
(finish_decl): Use it to issue a -Wc++-compat warning about
uninitialized const field in struct or union.
(finish_struct): Use strip_array_types.
/gcc/testsuite
2010-08-17 Shujing Zhao <pearly.zhao@oracle.com>
PR c/40563
* gcc.dg/Wcxx-compat-20.c: New test.
From-SVN: r163296
|
|
* c-tree.h (build_arg_info): Declare.
* c-decl.c (build_arg_info): Define.
(get_parm_info): Call it. Delete initialization code.
* c-parser.c (c_parser_parms_declarator): Likewise.
(c_parser_parms_list_declaractor): Likewise.
From-SVN: r163014
|
|
* c-tree.h (c_arg_tag): Define. Define a VEC containing it.
(struct c_arg_info): Change type of tags field.
* c-decl.c (grokdeclarator): Update for changed type of tags field.
(get_parm_info): Likewise.
(store_parm_decls_newstyle): Likewise.
From-SVN: r163013
|
|
* c-decl.c (detect_field_duplicates): Use DECL_CHAIN insted of
TREE_CHAIN.
* c-typeck.c (push_init_level): Likewise.
(process_init_element): Likewise.
From-SVN: r162239
|
|
gcc/
* tree.h (DECL_CHAIN): Define.
* alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
* c-decl.c: Likewise.
* c-parser.c: Likewise.
* c-typeck.c: Likewise.
* cfgexpand.c: Likewise.
* cgraph.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/arm/arm.c: Likewise.
* config/frv/frv.c: Likewise.
* config/i386/i386.c: Likewise.
* config/i386/winnt-cxx.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/iq2000/iq2000.c: Likewise.
* config/mep/mep.c: Likewise.
* config/mips/mips.c: Likewise.
* config/pa/som.h: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/s390/s390.c: Likewise.
* config/sh/sh.c: Likewise.
* config/sh/symbian-cxx.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/spu/spu.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/vxworks.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* coverage.c: Likewise.
* dbxout.c: Likewise.
* dwarf2out.c: Likewise.
* emit-rtl.c: Likewise.
* expr.c: Likewise.
* function.c: Likewise.
* gimple-low.c: Likewise.
* gimple-pretty-print.c: Likewise.
* gimplify.c: Likewise.
* integrate.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-split.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-type-escape.c: Likewise.
* langhooks.c: Likewise.
* lto-cgraph.c: Likewise.
* omp-low.c: Likewise.
* stor-layout.c: Likewise.
* tree-cfg.c: Likewise.
* tree-complex.c: Likewise.
* tree-dfa.c: Likewise.
* tree-dump.c: Likewise.
* tree-inline.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-nested.c: Likewise.
* tree-object-size.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-tailcall.c: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
gcc/ada/
* gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
* gcc-interface/utils2.c: Likewise.
gcc/c-family/
* c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
* c-format.c: Likewise.
gcc/cp/
* cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
* call.c: Likewise.
* class.c: Likewise.
* cp-gimplify.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* init.c: Likewise.
* mangle.c: Likewise.
* name-lookup.c: Likewise.
* optimize.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* rtti.c: Likewise.
* search.c: Likewise.
* semantics.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
gcc/fortran/
* f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
* trans-common.c: Likewise.
* trans-decl.c: Likewise.
* trans-types.c: Likewise.
* trans.c: Likewise.
gcc/java/
* java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
* boehm.c: Likewise.
* class.c: Likewise.
* decl.c: Likewise.
* expr.c: Likewise.
* jcf-parse.c: Likewise.
* typeck.c: Likewise.
* verify-glue.c: Likewise.
gcc/objc/
* objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
gcc/testsuite/
* g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN
with DECL_CHAIN.
From-SVN: r162223
|