1 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3 * class.c(finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4 * decl.c (xref_basetypes): Set it here.
6 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
7 Don't check for incomplete base.
8 (get_vfield_name): Simplify while loop.
9 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
11 2004-07-14 Mark Mitchell <mark@codesourcery.com>
13 * lex.c (cxx_make_type): Remove call to get_pointer_type.
14 (set_inherited_value_binding_p): Add class_type parameter.
15 (get_class_binding): Adjust.
16 (push_class_level_binding): Don't use set_inherited_value_binding_p.
18 * cp-tree.h (IDENTIFIER_VALUE): Remove.
19 (BINFO_PUSHDECLS_MARKED): Likewise.
20 (maybe_inject_for_scope_var): Likewise.
21 (push_class_decls): Likewise.
22 * name-lookup.h (push_class_binding): Remove.
23 (innermost_non_namespace_value): New function.
24 (outer_binding): Likewise.
25 * class.c (add_method): Push bindings before adding to
27 (restore_class_cache): Do not restore class_shadowed.
28 (pushclass): Do not add USING_DECLs. Do not call
30 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
31 * decl.c (pushdecl): Use outer_binding.
32 (poplevel): Set the scope for an out-of-scope for-loop declaration
34 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
35 * name-lookup.c (new_class_binding): New function.
36 (push_binding): Use it.
37 (pushdecl): Use innermost_non_namespace_value.
38 (maybe_inject_for_scope_var): Remove.
39 (push_class_binding): Remove.
40 (set_inherited_value_binding_p): New function.
41 (get_class_binding): New function.
42 (push_class_level_binding): Assert that the current_class_type is
44 (outer_binding): New function.
45 (innermost_non_namespace_value): Likewise.
46 (lookup_name_real): Use outer_binding.
47 (lookup_name_current_level): Ignore out-of-scope variables.
48 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
49 (lookup_template_class): Likewise.
50 * search.c (dfs_push_type_decls): Remove.
51 (dfs_push_decls): Likewise.
52 (setup_class_bindings): Likewise.
53 (lookup_field_1): Handle USING_DECLs from dependent scopes.
54 (marked_pushdecls_p): Remove.
55 (unmarked_pushdecls_p): Remove.
56 (marked_identifiers): Remove.
57 (setup_class_bindings): Remove.
58 (dfs_push_type_decls): Remove.
59 (dfs_push_decls): Remove.
60 (push_class_decls): Remove.
62 2004-07-13 Mark Mitchell <mark@codesourcery.com>
66 * decl.c (grokvardecl): Make declspecs parameter const.
67 (grokdeclarator): Likewise. Adjust accordingly.
68 * decl.h (grokdeclarator): Adjust declaration.
69 * parser.c (cp_parser_init_declarator): Do not clear
70 decl_specifiers->attributes.
72 * cp-tree.h (lang_identifier): Remove class_value.
73 (IDENTIFIER_CLASS_VALUE): Remove.
74 (pop_class_decls): Likewise.
75 (init_search_processing): Likewise.
76 * class.c (handle_using_decl): Use lookup_member, not
77 IDENTIFIER_CLASS_VALUE.
78 (restore_class_cache): New function, split out from ...
79 (pushclass): ... here. Do not call clear_identifier_class_values.
80 (invalidate_class_lookup_cache): Do not clear
81 IDENTIFIER_CLASS_VALUE.
82 (popclass): Do not call pop_class_decls.
83 (maybe_note_name_used_in_class): Do not save names looked up after
84 the class is complete. Use lookup_member, not
85 IDENTIFIER_CLASS_VALUE.
86 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
87 * decl.c (cxx_init_decl_processing): Do not call
88 init_search_processing.
89 * method.c (do_build_copy_constructor): Remove unnecessary code.
90 (do_build_assign_ref): Likewise.
91 * name-lookup.c (pushdecl): Use lookup_member, not
92 IDENTIFIER_CLASS_VALUE.
93 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
95 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
96 (push_class_binding): Do not set it.
97 (clear_identifier_class_values): Remove.
98 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
99 (store_binding): Do not save it.
100 (pop_from_top_level): Do not restore it.
101 * name-lookup.h (cxx_saved_binding): Remove class_value.
102 (clear_identifier_class_values): Remove.
103 * ptree.c (cxx_print_identifier): Do not print
104 IDENTIFIER_CLASS_VALUE.
105 * search.c (search_obstack): Remove.
106 (push_stack_level): Remove.
107 (pop_stack_level): Remove.
108 (search_level): Remove.
109 (search_stack): Remove.
110 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
111 (setup_class_bindings): Use IDENTIFIER_MARKED, not
112 IDENTIFIER_CLASS_VALUE.
113 (marked_identifiers): New variable.
114 (push_class_decls): Clear IDENTIFIER_MARKED.
115 (pop_class_decls): Don't call pop_search_level.
116 (init_search_processing): Remove.
118 2004-07-12 Mark Mitchell <mark@codesourcery.com>
120 * cp-tree.h (get_aggr_typedef): Remove.
121 * init.c (get_aggr_typedef): Likewise.
123 * name-lookup.c (push_class_level_binding): Simplify.
125 2004-07-12 Andrew Pinski <apinski@apple.com>
129 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
131 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
134 2004-07-12 Eric Christopher <echristo@redhat.com>
136 * parser.c (cp_parser_class_head): Remove unused variable.
138 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
140 * decl.c (grok_op_properties): Reject [de-]allocation functions
141 declared in a namespace, or declared as static.
143 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
145 * cp-tree.h (make_binfo): Remove.
146 * decl.c (xref_basetypes): Use make_tree_binfo directly.
147 * tree.h (copy_base_binfos): Likewise.
148 (make_binfo): Remove.
150 * call.c (build_user_type_conversion_1, build_new_op,
151 check_constructor_callable, build_temp,
152 perform_direct_initialization_of_possible): Pass type directly to
153 lookup_fnfields & build_special_member_call.
154 (build_special_member_call): Accept a type, and complete it.
155 * class.c (finish_stuct_bits): Copy the BINFOs here.
156 * cvt.c (ocp_convert): Pass type directly to
157 build_special_member_call.
158 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
159 (xref_basetypes): Allocate the binfo here. Adjust.
160 * init.c (build_init, build_new_1): Pass type directly to
161 build_special_member_call.
162 * lex.c (cxx_make_type): Do not allocate binfo here.
163 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
164 * parser.c (cp_parser_class_head): Always call xref_basetypes.
165 * pt.c (instantiate_class_template): Likewise. Inhibit access
166 checking for template friends.
167 * ptree.c (cxx_print_type): Adjust record printing.
168 * search.c (lookup_base): When taking a type, complete it before
170 (lookup_member): Delay completing a type.
171 (push_class_decls): Don't walk an incomplete type.
172 (lookup_conversions): Likewise.
173 * semantics.c (finish_stmt_expr_expr): Pass type directly to
174 build_special_member_call.
175 * tree.c (copy_base_binfos): Adjust.
176 (make_binfo): Likewise.
177 * typeck.c (build_modify_expr): Pass type directly to
178 build_special_member_call.
179 * typeck2.c (process_init_constructor): Check a binfo exists.
180 (build_m_component_ref): Allow accessing an incomplete type.
181 (build_functional_cast): Pass type directly to
182 build_special_member_call.
184 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
187 * config-lang.in (gtfiles): Add typeck2.c.
188 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
190 * cp-tree.h: Declare complete_type_check_abstract.
191 * typeck2.c (pat_calc_hash, pat_compare,
192 complete_type_check_abstract): New functions.
193 (abstract_virtuals_error): If the type is abstract, register the
194 declaration within abstract_pending_vars for further checks.
195 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
196 * decl.c (cp_finish_decl): Do not strip array types.
197 (create_array_type_for_decl): Check for abstractness of the element
199 (complete_vars): Call complete_type_check_abstract.
200 * class.c (finish_struct): Prepare a list of virtual functions for
201 template types, and call complete_vars on it to check for abstractness.
203 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
205 PR tree-optimization/14107
206 * decl.c (finish_function): Remove temporary band-aid.
208 2004-07-11 Mark Mitchell <mark@codesourcery.com>
210 * call.c (build_operator_new_call): Avoid using push_to_top_level.
211 (build_new_op): Adjust call to lookup_function_nonclass.
212 * name-lookup.c (identifier_type_value): Adjust call to
214 (lookup_name_real): Add block_p parameter.
215 (lookup_name_nonclass): Adjust call to lookup_name_real.
216 (lookup_function_nonclass): Likewise.
217 (lookup_name): Likewise.
218 * name-lookup.h (lookup_name_real): Change prototype.
219 (lookup_name_nonclass): Likewise.
220 * parser.c (cp_parser_lookup_name): Likewise.
222 * cp-tree.h (saved_scope): Make old_bindings a vector.
223 (unuse_fields): Remove.
224 * name-lookup.h (cxx_saved_binding): Define it.
225 * class.c (pushclass): Don't use unuse_fields.
226 * name-lookup.c (cxx_saved_binding_make): Remove.
227 (store_binding): Add new bindings to a vector, using an
228 accumulator style, rather than adding them to a list.
229 (store_bindings): Adjust accordingly.
230 (store_class_bindings): Likewise.
231 (push_to_top_level): Likewise.
232 (pop_from_top_level): Likewise.
233 * optimize.c (maybe_clone_body): Must push_to_top_level and
234 pop_from_top_level calls outside of loop.
235 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
236 calls here from cp_parser_late_parsing_default_args.
237 (cp_parser_save_default_args): Record the class type in which the
238 function is declared.
239 (cp_parser_late_parsing_default_args): Do not call
240 push_nested_class/pop_nested_class.
241 * search.c (dfs_unuse_fields): Remove.
242 (unuse_fields): Remove.
244 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
246 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
247 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
248 * cp-tree.h (poplevel): Declare.
250 * decl.c (set_block): Remove.
252 2004-07-10 Mike Stump <mrs@apple.com>
254 * decl2.c (import_export_class): Never export/import vtables
255 with inline key functions.
257 2004-07-09 Steven Bosscher <stevenb@suse.de>
259 * typeck.c (c_expand_asm_operands): Remove.
261 2004-07-09 Mike Stump <mrs@apple.com>
263 * typeck.c (build_class_member_access_expr): Skip null deref
264 warning when we don't dereference it.
266 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
270 * class.c (check_field_decls): Improve -Weffc++ warning: do not
271 warn for pointers to functions/members, or for classes without
274 2004-07-08 Mark Mitchell <mark@codesourcery.com>
276 * name-lookup.h (struct cp_binding_level): Update documentation
279 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
282 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
283 returning CALL_EXPR, and non-reference return type.
285 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
287 * name-lookup.c (push_binding): Use VEC_reserve.
289 2004-07-08 Richard Henderson <rth@redhat.com>
291 * cp-tree.h (expand_eh_spec_block): Remove.
293 2004-07-07 Mark Mitchell <mark@codesourcery.com>
295 * cp-tree.h (saved_scope): Remove x_previous_class_type and
296 x_previous_class_values; add x_previous_class_level.
297 (previous_class_type): Remove.
298 (previous_class_values): Remove.
299 (previous_class_level): New macro.
300 * class.c (pushclass): Restore the identifier cache more
302 (invalidate_class_lookup_cache): Use vector for class_shadowed and
303 previous_class_values.
304 * decl.c (poplevel): Likewise.
305 * name-lookup.c (cxx_binding_init): New function.
306 (cxx_binding_make): Use it.
307 (push_binding): For a binding in a class level, use a vector of
308 cp_class_binding nodes.
309 (push_binding_level): New function.
310 (begin_scope): Use it.
311 (leave_scope): Do not put class binding levels on the free list.
312 (print_binding_level): Adjust for the fact that class_shadowed is
314 (poplevel_class): Likewise.
315 (clear_identifier_class_values): Likewise.
316 (push_class_level_binding): Likewise.
317 (set_class_shadows): Remove.
318 (store_binding): New function.
319 (store_class_bindings): New function.
320 (push_to_top_level): Use store_class_bindings as appropriate.
321 (pop_from_top_level): Use previous_class_level, not
323 * name-lookup.h (cp_class_binding): New type.
324 (cp_binding_level): Use a vector object for class_shadowed.
325 (push_binding_level): Declare.
326 (set_class_shadows): Remove.
328 2004-07-07 Andrew Pinski <apinski@apple.com>
330 * class.c (instantiate_type): BUFFER_REF is dead.
331 * lex.c (init_operators): IN_EXPR is dead.
333 2004-07-07 Jason Merrill <jason@redhat.com>
336 * call.c (build_new_op): Give overload warnings for built-in
339 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
342 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
345 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
347 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
348 * class.c (build_primary_vtable, check_bases,
349 determine_primary_base, finish_struct_bits,
350 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
351 get_basefndecls, warn_hidden, walk_subobject_offsets,
352 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
353 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
354 finish_struct_1, get_vfield_name, contains_empty_class_p,
355 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
356 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
357 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
359 * decl.c (xref_basetypes): Likewise.
360 * dump.c (cp_dump_tree): Likewise.
361 * error.c (dump_expr): Likewise.
362 * init.c (sort_mem_initializers, expand_member_init,
363 push_base_cleanups): Likewise.
364 * method.c (do_build_copy_constructor, do_build_assign_reg,
365 synthesize_exception_spec): Likewise.
366 * name-lookup.c (arg_assoc_class):
367 * pt.c (instantiate_class_template, tsubst,
368 get_template_base_recursive):
369 * ptree.c (cxx_print_type):
370 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
371 * search.c (lookup_base_r, dynamic_cast_base_recurse,
372 dfs_access_in_type, access_in_type, lookup_field_queue_p,
373 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
374 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
375 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
376 binfo_for_vtable, copied_binfo, original_binfo): Likewise
377 * tree.c (copy_base_binfos, make_binfo): Likewise.
378 * typeck.c (commmon_base_type): Likewise
379 * typeck2.c (process_init_constructor): Likewise
381 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
383 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
385 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
388 * pt.c (convert_nontype_argument): Disallow conversions between
389 different enumeration types.
391 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
393 * cp-tree.h (BINFO_MARKED): Remove.
394 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
395 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
396 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
397 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
398 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
399 (mark_primary_bases, determine_primary_base, base_derived_from,
400 dfs_find_final_overrider, dfs_find_final_overrider_q,
401 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
402 dfs_modify_vtables, walk_subobject_offsets,
403 layout_nonempty_base_or_field, build_base_field,
404 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
405 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
406 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
407 build_ctor_vtbl_group, accumulate_vtble_inits,
408 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
409 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
410 add_vcall_offset_vtbl_entries_1): Likewise.
411 * decl.c (xref_basetypes): Incomming virtual base indicated by
413 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
414 * init.c (finish_init_stmts, sort_mem_initializers,
415 emit_mem_initializers, build_vtble_address, expand_member_init,
416 push_base_cleanups): Likewise.
417 * method.c (do_build_copy_constructor): Likewise.
418 * pt.c (instantiate_class_template,
419 get_template_base_recursive): Likewise.
420 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
421 get_pseudo_ti_desc): Likewise.
422 * search.c (lookup_base_r, dynamic_cast_base_recurse,
423 binfo_from_vbase, binfo_via_virtual, copied_binfo,
424 original_binfo): Likewise.
425 * semantics.c (finish_base_specifier): Virtualness is indicated
427 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
429 2004-07-06 Mark Mitchell <mark@codesourcery.com>
432 2004-06-24 Jason Merrill <jason@redhat.com>
434 * decl.c (grokparms): Give the PARM_DECL reference type if the
435 parameter is passed by invisible reference.
437 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
439 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
440 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
441 * pt.c (check_instantiated_args, unify): Likewise.
443 2004-07-05 Phil Edwards <phil@codesourcery.com>
445 * Make-lang.in (check-c++, lang_checks): Add some comments.
447 2004-07-05 Zack Weinberg <zack@codesourcery.com>
449 * cp-mudflap.c: Delete file.
450 * Makefile.in: Remove all references to cp-mudflap.o.
452 2004-07-05 Zack Weinberg <zack@codesourcery.com>
454 * decl.c (cxx_init_decl_processing): Call
455 build_common_tree_nodes before creating the global NAMESPACE_DECL.
457 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
460 * call.c (build_operator_new_call): Look only at global scope.
462 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
464 * call.c (enforce_access): Expect TREE_BINFO.
465 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
466 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
467 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
469 (BINFO_LANG_ELTS): Remove.
470 (BINFO_LANG_SLOTS): New.
471 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
472 (CLASSTYPE_TEMPLATE_INFO): Adjust.
473 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
474 * search.c (lookup_member): Check TREE_BINFO.
475 * semantics.c (perform_or_defer_access_check): Likewise.
476 (check_accessibility_of_qualified_id): Check
477 deferred_access_no_check.
478 * tree.c (make_binfo): Use make_tree_binfo.
480 2004-07-04 Mark Mitchell <mark@codesourcery.com>
482 * method.c (implicitly_declare_fn): Set linkage of generated
485 2004-07-04 Richard Henderson <rth@redhat.com>
487 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
489 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
492 * name-lookup.c (push_class_level_binding): Don't pass a
493 TREE_LIST of ambiguous names to check_template_shadow as it
494 only handles declarations. Instead, pull the declaration
497 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
500 * pt.c (check_explicit_specialization): Clarify error message.
502 2004-07-02 Richard Henderson <rth@redhat.com>
504 * tree.c (cp_unsave_r): Update remap_save_expr call.
506 2004-07-02 Mark Mitchell <mark@codesourcery.com>
509 * mangle.c (write_template_arg): Correct mangling.
512 * decl.c (grokdeclarator): Robustify.
514 2004-07-01 Richard Henderson <rth@redhat.com>
516 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
517 * method.c (synthesize_method): Don't clear_last_expr.
518 * name-lookup.c (maybe_push_cleanup_level): Likewise.
520 2004-07-01 Nick Clifton <nickc@redhat.com>
522 * decl2.c (import_export_class): Invoke the
523 import_export_class field in the gcc_target structure if it is not
526 2004-06-30 Richard Henderson (rth@redhat.com>
528 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
529 * method.c (use_thunk): Likewise.
531 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
533 * call.c (build_over_call), typeck.c (build_function_call): Call
534 check_function_arguments instead of check_function_format.
536 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
538 * call.c (build_over_call), typeck.c (build_function_call): Update
539 calls to check_function_format.
541 2004-06-30 Richard Henderson <rth@redhat.com>
543 * call.c (build_over_call): Use __builtin_memcpy for copying
544 CLASS_AS_BASE rather than funny casting.
546 2004-06-30 Richard Henderson <rth@redhat.com>
548 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
549 TYPE_SIZE_UNIT of full_type.
551 2004-06-30 Per Bothner <per@bothner.com>
553 Conditionally compile support for --enable-mapped_location.
554 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
555 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
556 adjustments - which I don't understand.
557 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
558 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
559 (print_instantiation_partial_context): Use expand_location.
560 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
561 * name-lookup.c: Likewise.
562 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
563 * name-lookup.c: Use input_line macro.
564 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
565 (cp_parser_statement): Rename locaal variable statement_locus to
566 statement_location and use SET_EXPR_LOCATION macro.
567 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
568 * tree.c (cp_walk_subtrees): Likewise.
570 2004-06-29 Per Bothner <per@bothner.com>
572 * tree.c (build_min_nt, build_min, build_min_non_dep):
573 Don't set TREE_COMPLEXITY from input_line.
575 2004-06-29 Paul Brook <paul@codesourcery.com>
577 * init.c: Include target.h.
578 (get_cookie_size): Remove and replace with target hook.
580 (build_new_1): Store the element size in the cookie.
582 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
585 * parser.c (cp_parser_template_declaration_after_export): Disable
586 access checks here ...
587 (cp_parser_class_specifier): ... not here.
589 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
591 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
592 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
593 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
596 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
598 * cp-tree.h (struct deferred_access): Move to ...
599 * semantics.c (struct deferred_access): ... here. Adjust.
600 (deferred_access_stack): Make a VEC(deferred_access),
601 (deferred_access_free_list): Remove.
602 (deferred_access_no_check): New.
603 (push_deferring_access_checks, resume_deferring_access_checks,
604 stop_deferring_access_checks, pop_deferring_access_checks,
605 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
606 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
608 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
611 * call.c (build_temp): Declare.
612 (check_constructor_callable): New.
613 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
614 CONSTRUCTOR_CALLABLE.
615 (convert_like_real, initialize_reference): Use
616 check_constructor_callable.
617 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
618 (LOOKUP_*): Renumber.
620 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
622 * friend.c (add_friend): Only perform access checks when context
624 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
625 * parser.c (cp_parser_class_specifier): Disable access checks here
626 when parsing the body of a templated class.
627 * semantics.c (perform_or_defer_access_checks): Reorder to allow
628 NULL binfos when not checking access.
630 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
632 Use vector API for vbase list.
633 * cp-tree.h: Include vec.h
634 (DEF_VEC_P (tree)): New type.
635 (struct lang_type_class): Change vbase's member type.
636 (binfo_for_vbase): Declare.
637 * class.c (determine_primary_base, base_derived_from,
638 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
639 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
640 build_vtbl_initializer): Adjust.
641 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
643 * init.c (sort_mem_initializers, expand_member_init,
644 push_base_cleanups): Adjust.
645 * method.c (do_build_copy_constructor): Adjust.
646 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
647 (binfo_for_vbase): New.
648 * tree.c (copy_base_binfos): Adjust.
650 2004-06-28 Mark Mitchell <mark@codesourcery.com>
652 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
654 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
657 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
658 paranthesis in case of pointers to array members.
659 * error.c (dump_type_prefix): Likewise.
660 (dump_type_suffix): Maybe issue a whitespace when printing
663 2004-06-27 Mark Mitchell <mark@codesourcery.com>
666 * parser.c (cp_parser_set_decl_spec_type): Refine test for
667 redefinition of built-in types.
669 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
671 * error.c (pp_template_argument_list_start): Remove.
672 (pp_template_argument_list_end): Likewise.
673 (pp_separate_with_comma): Use pp_cxx_separate_with.
674 (reinit_global_formatting_buffer): Remove.
675 (pp_non_consecutive_character): Likewise.
676 (dump_scope): Use pp_cxx_colon_colon.
677 (dump_template_parameter): Use pp_cxx_identifier,
678 pp_cxx_tree_identifier and pp_cxx_whitespace.
679 (dump_templat_bindings): Replace use of pp_string with sequence
680 of pp_cxx_whitespace and pp_equal.
681 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
682 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
684 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
685 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
686 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
687 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
688 pp_cxx_right_bracket, pp_cxx_identifier throughout,
689 (dump_decl): Likewise.
690 (dump_template_decl): Likewise.
691 (dump_function_decl): Likewise. Set padding as appropriate.
692 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
694 (dump_exception_spec): Likewise.
695 (dump_function_name): Use pp_cxx_tree_identifier and
697 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
698 pp_cxx_end_template_argument_list.
699 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
700 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
701 pp_cxx_whitespace throughout.
702 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
704 (dump_unary_op): Likewise.
705 (reinit_cxx_pp): New function.
706 (type_as_string); Use it.
707 (expr_as_string): Likewise.
708 (decl_as_string); Likewise.
709 (context_as_string): Likewise.
710 (lang_decl_name): Likewise.
711 (decl_to_string): Likewise.
712 (expr_to_string): Likewise.
713 (parm_to_string): Likewise.
714 (type_to_string): Likewise.
715 (args_to_string): Likewise.
716 (cv_to_string): Likewise.
718 2004-06-26 Mark Mitchell <mark@codesourcery.com>
720 * cp-tree.h (cp_cv_quals): New type.
721 (cp_declarator): Use it instead of "tree" as appropriate.
722 (grok_method_quals): Adjust prototype.
723 (grokclassfn): Likewise.
724 (do_friend): Likewise.
725 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
726 (grokdeclarator): Likewise.
727 * decl2.c (grok_method_quals): Likewise.
728 (grokclassfn): Likewise.
729 * friend.c (do_friend): Likewise.
730 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
731 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
732 (make_pointer_declarator): Likewise.
733 (make_reference_declarator): Likewise.
734 (make_ptrmem_declarator): Likewise.
735 (cp_parser_ptr_operator): Likewise.
736 (cp_parser_cv_qualifier_seq_opt): Likewise.
737 (cp_parser_cv_qualifier_opt): Remove.
738 (cp_parser_new_declarator_opt): Adjust call to
739 cp_parser_ptr_operator.
740 (cp_parser_conversion_declaration_opt): Likewise.
741 (cp_parser_declarator): Use cp_cv_quals, not tree.
742 (cp_parser_direct_declarator): Likewise.
744 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
746 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
747 Rename DECL_STMT to DECL_EXPR.
748 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
749 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
750 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
752 2004-06-26 Jan Hubicka <jh@suse.cz>
755 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
756 reachability analysis.
758 2004-06-25 Mark Mitchell <mark@codesourcery.com>
760 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
763 2004-06-25 Paul Brook <paul@codesourcery.com>
765 * decl2.c (get_guard): Call targetm.cxx.guard_type.
766 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
768 2004-06-24 Mark Mitchell <mark@codesourcery.com>
770 * decl.c (grokdeclarator): Restore error messages about __thread.
771 * parser.c (cp_parser_decl_specifier_seq): Likewise.
773 2004-06-24 Jason Merrill <jason@redhat.com>
776 * decl.c (grokparms): Give the PARM_DECL reference type if the
777 parameter is passed by invisible reference.
779 2004-06-24 Andreas Schwab <schwab@suse.de>
781 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
783 2004-06-23 Mark Mitchell <mark@codesourcery.com>
785 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
786 (cp/decl.o): Likewise.
787 (cp/decl2.o): Likewise.
789 (cp/semantics.o): Likewise.
790 * config-lang.in (gtfiles): Do not reference cp/lex.h.
791 * class.c: Do not include lex.h.
792 (add_implicitly_declared_members): Do not use
793 adding_implicit_members.
794 (check_bases_and_members): Do not talk about grok_x_components.
795 * cp/cp-tree.h (adding_implicit_members): Remove.
796 (cp_storage_class): New type.
797 (cp_decl_spec): Likewise.
798 (cp_decl_specifier_seq): Likewise.
799 (cp_parameter_declarator): Use it for the decl_specifiers field.
800 (check_tag_decl): Adjust prototype.
801 (shadow_tag): Likewise.
802 (groktypename): Likewise.
803 (start_decl): Likewise.
804 (start_function): Likewise.
805 (start_method): Likewise.
806 (grok_x_components): Remove.
807 (grokfield): Adjust prototype.
808 (grokbitfield): Likewise.
809 (finish_member_class_template): Remove.
810 * decl.c: Do not include lex.h.
811 (adding_implicit_members): Do not define.
812 (check_tag_decl): Do not use trees to represent decl-specifiers.
813 (shadow_tag): Likewise.
814 (groktypename): Likewise.
815 (start_decl): Likewise.
816 (grokvardecl): Likewise.
817 (grokdeclarator): Likewise.
818 (grokparms): Likewise.
819 (start_function): Likewise.
820 (start_method): Likewise.
821 * decl.h (grokdeclarator): Adjust prototype.
822 * decl2.c: Do not include lex.h.
823 (grok_x_components): Remove.
824 (grokfield): Do not use trees to represent decl-specifiers.
825 (grokbitfield): Likewise.
826 * lex.c: Do not include lex.h.
828 * parser.c: Include target.h.
829 (clear_decl_specs): New function.
830 (cp_parser_translation_unit): Do not use trees to represent
832 (cp_parser_postfix_expression): Likewise.
833 (cp_parser_new_type_id): Likewise.
834 (cp_parser_condition): Likewise.
835 (cp_parser_simple_declaration): Likewise.
836 (cp_parser_decl_specifier_seq): Likewise.
837 (cp_parser_function_specifier_opt): Likewise.
838 (cp_parser_conversion_type_id): Likewise.
839 (cp_parser_template_parameter): Likewise.
840 (cp_parser_explicit_instantiation): Likewise.
841 (cp_parser_type_specifier): Likewise.
842 (cp_parser_simple_type_specifier): Likewise.
843 (cp_parser_init_declarator): Likewise.
844 (cp_parser_type_id): Likewise.
845 (cp_parser_type_specifier_seq): Likewise.
846 (cp_parser_parameter_declaration): Likewise.
847 (cp_parser_member_declaration): Likewise.
848 (cp_parser_exception_declaration): Likewise.
849 (cp_parser_function_definition_from_specifiers_and_declarator):
851 (cp_parser_single_declaration): Likewise.
852 (cp_parser_save_member_function_body): Likewise.
853 (cp_parser_friend_p): Likewise.
854 (cp_parser_set_storage_class): New function.
855 (cp_parser_set_decl_spec_type): Likewise.
856 * pt.c: Do not include lex.h.
857 * semantics.c: Likewise.
858 (finish_member_class_template): Remove.
860 2004-06-23 Roger Sayle <roger@eyesopen.com>
862 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
863 longer take both "args" and "convert_args" as arguments.
864 (build_op_delete_call): Update call to build_cxx_call.
865 (build_over_call): Likewise, update call to build_cxx_call.
866 * cp-tree.h (build_cxx_call): Update funtion prototype.
867 * typeck.c (build_function_call): Don't call expand_tree_builtin.
868 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
869 (throw_bad_typeid): Likewise.
870 (build_dynamic_cast_1): Likewise.
872 2004-06-22 Richard Henderson <rth@redhat.com>
874 * class.c (build_vfn_ref): Take a pointer not object. Build
876 (cp_fold_obj_type_ref): New.
877 * call.c (build_over_call): Update build_vfn_ref call.
878 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
879 * cp-tree.h (cp_fold_obj_type_ref): Declare.
881 2004-06-21 Jason Merrill <jason@redhat.com>
884 * cp-gimplify.c (cp_gimplify_init_expr): Look through
887 2004-06-21 Mark Mitchell <mark@codesourcery.com>
889 * cp-tree.def (NEW_EXPR): Add a fourth slot.
890 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
891 (TREE_PARMLIST): Likewise.
892 (CALL_DECLARATOR_PARMS): Likewise.
893 (CALL_DECLARATOR_QUALS): Likewise.
894 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
895 (cp_declarator_kind): New type.
896 (cp_parameter_declarator): Likewise.
897 (cp_declarator): Likewise.
898 (cp_error_declarator): Likewise.
899 (no_parameters): Likewise.
900 (groktypename): Change prototype.
901 (start_decl): Likewise.
902 (start_handler_parms): Likewise.
903 (get_scope_of_declarator): Likewise.
904 (start_function): Likewise.
905 (start_preparsed_function): New function.
906 (start_function): Change prototype.
907 (start_method): Likewise.
908 (grokfield): Likewise.
909 (grokbitfield): Likewise.
910 (build_new): Likewise.
911 (make_pointer_declarator): Remove.
912 (make_reference_declarator): Likewise.
913 (make_call_declarator): Likewise.
914 (set_quals_and_spec): Likewise.
915 (process_template_parm): Change prototype.
916 (begin_function_definition): Remove.
917 (finish_parmlist): Remove.
918 * decl.c (groktypename): Do not use trees to represent
920 (start_decl): Likewise.
921 (start_handler_parms): Remove.
922 (get_scope_of_declarator): Reimplement.
923 (grokdeclarator): Do not use trees to represent declarators.
924 (grokparms): Likewise.
925 (start_function): Likewise.
926 (start_method): Likewise.
927 (build_void_list_mode): Do not use TREE_PARMLIST.
928 * decl.h (grokdeclarator): Change prototype.
929 * decl2.c (grok_method_quals): Robustify.
930 (grok_x_components): Do not use trees to represent declarators.
931 (grokfield): Likewise.
932 (grokbitfield): Likewise.
933 (start_objects): Build FUNCTION_DECLs, not declarators.
934 (start_static_storage_duration_function): Likewise.
935 * init.c (build_new): Simplify.
936 * lex.c (make_pointer_declarator): Remove.
937 (make_reference_declarator): Likewise.
938 (make_call_declarator): Likewise.
939 (set_quals_and_spec): Likewise.
940 * method.c (use_thunk): Use start_preparsed_function.
941 (synthesize_method): Likewise.
942 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
943 * optimize.c (maybe_clone_body): Use start_preparsed_function.
944 * parser.c (cp_error_declarator): New variable.
945 (declarator_obstack): Likewise.
946 (alloc_declarator): New function.
947 (make_declarator): Likewise.
948 (make_id_declarator): Likewise.
949 (make_pointer_declarator): Likewise.
950 (make_reference_declarator): Likewise.
951 (make_ptrmem_declarator): Likewise.
952 (make_call_declarator): Likewise.
953 (make_array_declarator): Likewise.
954 (no_parameters): New variable.
955 (make_parameter_declarator): Likewise.
956 (cp_parser_check_for_definition_in_return_type): Do not use trees
957 to represent declarators.
958 (cp_parser_translation_unit): Likewise.
959 (cp_parser_new_expression): Likewise.
960 (cp_parser_new_type_id): Likewise.
961 (cp_parser_new_declarator_opt): Likewise.
962 (cp_parser_direct_new_declarator): Likewise.
963 (cp_parser_condition): Likewise.
964 (cp_parser_declaration_statement): Likewise.
965 (cp_parser_declaration): Likewise.
966 (cp_parser_conversion_type_id): Likewise.
967 (cp_parser_conversion_declarator_opt): Likewise.
968 (cp_parser_template_parameter_list): Likewise.
969 (cp_parser_template_parameter): Likewise.
970 (cp_parser_explicit_instantiation): Likewise.
971 (cp_parser_init_declarator): Likewise.
972 (cp_parser_declarator): Likewise.
973 (cp_parser_direct_declarator): Likewise.
974 (cp_parser_type_id): Likewise.
975 (cp_parser_parameter_declaration_clause): Likewise.
976 (cp_parser_parameter_declaration_list): Likewise.
977 (cp_parser_parameter_declaration): Likewise.
978 (cp_parser_member_declaration): Likewise.
979 (cp_parser_exception_declaration): Likewise.
980 (cp_parser_check_declarator_template_parameters): Likewise.
981 (cp_parser_function_definition_from_specifiers_and_declarator):
983 (cp_parser_save_member_function_body): Likewise.
984 * pt.c (process_template_parm): Add is_non_type parameter.
985 (convert_template_argument): Adjust call to groktypename.
986 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
987 (tsubst): Do not expect declarators.
988 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
990 (instantiate_decl): Use start_preparsed_function.
991 * semantics.c (begin_function_definition): Remove.
992 (finish_parmlist): Remove.
993 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
996 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
998 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
999 (build_new_method_call): Likewise.
1000 * decl.c (local_variable_p_walkfn): Don't walk into types.
1001 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1002 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1003 * init.c (buld_new): Add new operand for ARRAY_REF.
1004 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1005 (do_build_assign_ref): Likewise.
1006 * parser.c (cp_parser_direct_new_declarator): Add new operands
1008 (cp_parser_direct_declarator): Likewise.
1009 * pt.c (tsubst): Likewise.
1010 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1012 * semantics.c (finish_non_static_data_member): Add new operand
1014 * typeck.c (build_class_member_access_expr): Likewise.
1015 (build_class_member_access_expr, finish_class_member_access_expr):
1017 (build_ptrmemfunc_access_expr): Likewise.
1018 (build_array_ref): Add new operands for ARRAY_REF.
1019 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1020 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1022 2004-06-21 Richard Henderson <rth@redhat.com>
1024 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1025 * parser.c (cp_parser_jump_statement): Update commentary.
1026 * pt.c (tsubst_expr): Use RETURN_EXPR.
1027 * semantics.c (finish_return_stmt): Likewise.
1028 (finalize_nrv_r): Likewise.
1029 * typeck.c, typeck2.c: Update file start commentary.
1031 2004-06-21 Richard Henderson <rth@redhat.com>
1033 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1035 2004-06-20 Richard Henderson <rth@redhat.com>
1037 * cp-tree.h (add_decl_stmt): Declare.
1038 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1039 * semantics.c (maybe_cleanup_point_expr): New.
1040 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1041 finish_for_expr, finish_switch_cond): Use it.
1042 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1044 2004-06-20 Richard Henderson <rth@redhat.com>
1046 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1047 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1048 (cp_gimplify_expr): Call it.
1049 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1050 (cp_genericize): New.
1051 * decl.c (finish_function): Call it.
1052 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1053 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1054 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1055 (cp_genericize): Declare.
1056 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1057 * dump.c (cp_dump_tree): Likewise.
1058 * semantics.c (push_cleanup): Move from c-semantics.c.
1060 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1062 * cp-lang.c (has_c_linkage): Implement.
1064 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1065 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1066 (builtin_function_1): Don't call make_decl_rtl.
1067 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1068 (grokvardecl): Don't call mangle_decl.
1069 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1070 DECL_ASSEMBLER_NAME.
1071 * method.c (set_mangled_name_for_decl): Delete.
1072 * name-lookup.c (pushdecl): When a local extern shadows a
1073 file-scope declaration of the same object, give both DECLs the
1075 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1076 on DECL_ASSEMBLER_NAME.
1078 2004-06-19 Richard Henderson <rth@redhat.com>
1080 * cp-gimplify.c: Remove unnecessary prototypes.
1081 (cp_gimplify_stmt): Merge into ...
1082 (cp_gimplify_expr): ... here. Move to end of file. Handle
1083 stmts_are_full_exprs_p frobbing.
1084 * cp-tree.h (cp_gimplify_stmt): Remove.
1085 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1086 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1088 2004-06-18 Richard Henderson <rth@redhat.com>
1091 * semantics.c (begin_cond): New.
1092 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1093 Assume that non-template decls go land before the conditional.
1094 (simplify_loop_decl_cond): Likewise.
1095 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1096 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1097 begin_switch_stmt, finish_switch_cond): Update to match.
1099 2004-06-17 Jason Merrill <jason@redhat.com>
1102 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1103 (finish_stmt_expr_expr): Update type after conversions.
1104 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1105 Handle void initializer.
1106 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1108 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1110 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1111 * cp-tree.h (defer_fn): Delete.
1112 * decl2.c (defer_fn): Delete.
1113 (finish_file): Simplify deferred_fns loops; check that
1114 only used inline functions get into deferred_fns.
1115 (mark_used): Inline previous contents of defer_fn.
1117 2004-06-16 Richard Henderson <rth@redhat.com>
1119 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1120 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1121 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1122 of CTOR_INITIALIZER ...
1123 (pp_cxx_statement): ... here.
1124 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1125 (finish_function): Use alloc_stmt_list to zap entire function.
1126 * parser.c (cp_parser_compound_statement): Update commentary.
1127 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1128 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1129 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1131 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1133 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1135 2004-06-16 Richard Henderson <rth@redhat.com>
1137 * parser.c (cp_parser_labeled_statement): Update commentary.
1138 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1139 * tree.c (mark_local_for_remap_r): Likewise.
1141 2004-06-16 Richard Henderson <rth@redhat.com>
1143 * parser.c (cp_parser_asm_definition): Update commentary.
1144 * pt.c (tsubst_expr): Use ASM_EXPR.
1145 * semantics.c (finish_asm_stmt): Likewise.
1147 2004-06-16 Richard Henderson <rth@redhat.com>
1149 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1150 * parser.c (cp_parser_statement): Update commentary.
1151 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1152 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1153 * tree.c (mark_local_for_remap_r): Likewise.
1155 2004-06-16 Richard Henderson <rth@redhat.com>
1158 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1159 statement in FOR_INIT_STMT for templates.
1161 2004-06-15 Richard Henderson <rth@redhat.com>
1163 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1164 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1165 (genericize_try_block): Use gimplify_stmt.
1166 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1167 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1168 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1169 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1170 (cp_tree_chain_matters_p): Remove.
1171 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1172 (COMPOUND_STMT_BODY_BLOCK): New.
1173 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1174 (EXPR_STMT_STMT_EXPR_RESULT): New.
1175 (building_stmt_tree): Check cur_stmt_list.
1176 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1177 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1178 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1179 (cp_finish_decl): Use push_cleanup.
1180 (start_function, finish_function): Use statement lists.
1181 (finish_stmt): Do nothing.
1182 * except.c (begin_eh_spec_block): Use statement lists.
1183 (check_handlers_1, check_handlers): Likewise.
1184 * init.c (construct_virtual_base): Don't add extra compound stmts.
1185 (build_vec_init): Likewise.
1186 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1187 * name-lookup.h (struct cp_binding_level): Add statement_list.
1188 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1189 (cp_parser_labeled_statement, cp_parser_expression_statement,
1190 cp_parser_statement_seq_opt): Likewise.
1191 (cp_parser_compound_statement): Likewise. Take bool for try block.
1192 (cp_parser_selection_statement): Tidy if processing.
1193 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1194 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1195 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1196 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1197 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1198 (finish_cond): New, rewritten from FINISH_COND.
1199 (simplify_loop_decl_cond): New.
1200 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1201 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1202 begin_else_clause, finish_else_clause, finish_if_stmt,
1203 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1204 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1205 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1206 finish_switch_cond, finish_switch_stmt, begin_try_block,
1207 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1208 finish_handler_sequence, finish_function_handler_sequence,
1209 begin_handler, finish_handler_parms, finish_handler,
1210 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1211 using statement lists.
1212 (begin_compound_stmt): Replace has_no_scope argument with flags.
1213 Update all callers. Use statement lists.
1214 (finish_compound_stmt): Likewise.
1215 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1216 (current_scope_stmt_stack): Remove.
1217 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1218 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1219 Rewrite with statement lists.
1221 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1223 * parser.c: Change all assignments of c_lex_string_translate
1224 to true and false to 1 and 0.
1225 (cp_lexer_read_token): Convert type of the translated string.
1226 (cp_parser_skip_to_closing_parentheses): Preserve original
1227 value of c_lex_string_translate, and set it to -1 while
1229 (cp_parser_cache_group): Likewise.
1230 (cp_parser_cache_group_1): Renamed.
1231 (cp_parser_asm_operand_list): Remove redundant setting of
1232 c_lex_string_translate.
1233 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1234 Handle chained strings.
1236 2004-06-12 Andrew Pinski <apinski@apple.com>
1240 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1242 * cp-tree.h: Fix typo.
1244 * cp-tree.h: Include cgraph.h
1245 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1246 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1248 2004-06-12 Jason Merrill <jason@redhat.com>
1250 PR tree-optimization/14107
1251 * decl.c (finish_function): Warn about no return in all functions.
1253 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1255 * cp-tree.h (struct language_function): Remove cannot_inline.
1256 * decl.c (save_function_data): cannot_inline is no more.
1257 (cxx_push_function_context): Likewise.
1258 * decl2.c (start_objects, start_static_storage_duration_function):
1259 Reset DECL_INLINE, set DECL_UNINLINABLE.
1261 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1264 * search.c (lookup_field): Propagate the ambiguity list.
1265 (lookup_fnfields): Likewise.
1267 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1270 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1271 template keyword to disambiguate.
1273 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1276 * decl.c (grokdeclarator): Ignore pointer-to-members when
1277 computing template depth.
1280 * name-lookup.c (pushtag): Do not try to put class declarations in
1281 explicit specialization scopes.
1283 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1285 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1287 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1290 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1291 bindings for undeclared built-ins.
1293 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1295 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1296 appear at the correct location.
1298 2004-06-10 Jason Merrill <jason@redhat.com>
1302 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1303 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1304 TREE_TYPE for non-dependent names.
1305 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1306 unknown_type_node as its TREE_TYPE.
1307 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1308 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1309 (dump_expr) <SCOPE_REF case>: Likewise.
1311 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1314 * parser.c (cp_parser_direct_declarator): Robustify.
1317 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1318 constants in non-dependent contexts.
1322 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1325 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1328 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1331 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1335 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1336 * lex.c (handle_pragma_interface): Deprecate.
1337 (handle_pragma_implementation): Likewise.
1339 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1341 * g++spec.c (lang_specific_driver): Remove check for -lm
1342 and -lmath when check it see if it was the math library.
1344 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1347 * parser.c (cp_parser_direct_declarator): Reject constructor named
1348 as qualified template-id.
1350 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1353 * lex.c (handle_pragma_interface): Deprecate.
1354 (handle_pragma_implementation): Likewise.
1356 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1359 * parser.c (cp_parser_iteration_statement): Fix typo in error
1363 * pt.c (tsubst_default_argument): Do not defer access checks
1364 while substituting into the default argument.
1367 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1368 constant in a non-dependent context.
1371 * except.c (build_throw): Ensure that temp_expr has been
1374 2004-06-06 Roger Sayle <roger@eyesopen.com>
1376 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1378 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1381 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1382 'typename', and accept 'template'.
1384 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1385 Jan Hubicka <jh@suse.cz>
1388 * method.c (use_think): Do not mark thunk as referenced.
1390 2004-06-03 Matt Austern <austern@apple.com>
1393 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1394 is nonzero, and if we see a noninline definition of a key method,
1395 make the vtables nonweak.
1397 2004-06-02 Matt Austern <austern@apple.com>
1399 * cp-tree.h (instantiate_decl): new boolean parameter,
1400 undefined_ok. Current behavior is equivalent to its being 0.
1401 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1402 * pt.c (mark_decl_instantiated): Unconditionally make
1403 instantiations explicit unconditionally
1404 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1405 since mark_decl_instantiated now does it.
1406 (instantiate_class_member): New. Instantiate a member of an
1407 explicitly instantiated class template.
1408 (do_type_instantiation): Explicitly instantiate members of an
1409 explicitly instantiated class template.
1410 (instantiate_decl): if undefined_ok is nonzero, and if we're
1411 trying to explicitly instantiated a template with no definition,
1412 change it to an implicit instantiation.
1413 (instantiate_pending_templates): Add new argument to instantiate_decl.
1414 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1416 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1418 * cp-tree.h: Fix typo.
1420 * cp-tree.h: Include cgraph.h
1421 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1422 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1424 2004-06-01 Jason Merrill <jason@redhat.com>
1427 * call.c (call_builtin_trap): Remove type parm.
1428 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1429 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1431 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1434 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1435 TREE_TYPE for non-dependent names.
1436 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1437 unknown_type_node as its TREE_TYPE.
1438 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1439 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1440 (dump_expr) <SCOPE_REF case>: Likewise.
1442 2004-06-01 Richard Henderson <rth@redhat.com>
1443 Andrew Pinski <pinskia@physics.uc.edu>
1445 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1446 * parser.c (struct cp_parser): Remove in_offsetof.
1447 (cp_parser_new): Don't set it.
1448 (cp_parser_unary_expression): Don't check it.
1449 (cp_parser_postfix_open_square_expression): Split out from ...
1450 (cp_parser_postfix_expression): ... here.
1451 (cp_parser_postfix_dot_deref_expression): Likewise.
1452 (cp_parser_builtin_offsetof): New.
1453 (cp_parser_primary_expression): Use it.
1455 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1458 * parser.c (cp_parser_postfix_expression): Allow subscript
1459 operator in offsetof.
1461 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1464 * friend.c (add_friend): Do not try to perform access checks for
1465 functions from dependent classes.
1467 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1469 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1470 (pp_cxx_begin_template_argument_list): Turn into a function.
1471 (pp_cxx_end_template_argument_list): Likewise.
1472 (pp_cxx_separate_with): Define.
1473 (pp_cxx_unqualified_id): Tidy.
1474 (pp_cxx_primary_expression): Likewise.
1475 (pp_cxx_postfix_expression): Likewise.
1476 (pp_cxx_expression): Likewise.
1477 (pp_cxx_simple_type_specifier): Likewise.
1478 (pp_cxx_type_specifier_seq): Likewise.
1479 (pp_cxx_parameter_declaration_clause): Likewise.
1480 (pp_cxx_exception_specification): Likewise.
1481 (pp_cxx_direct_declarator): Likewise.
1482 (pp_cxx_type_id): Likewise.
1483 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1485 (pp_cxx_left_paren): Likewise.
1486 (pp_cxx_right_paren): Likewise.
1487 (pp_cxx_left_brace): Likewise.
1488 (pp_cxx_right_brace): Likewise.
1489 (pp_cxx_left_bracket): Likewise.
1490 (pp_cxx_right_bracket): Likewise.
1491 (pp_cxx_dot): Likewise.
1492 (pp_cxx_identifier): Likewise.
1493 (pp_cxx_tree_identifier): Likewise.
1494 (pp_cxx_ampersand): New macro.
1495 (pp_cxx_star): Likewise.
1496 (pp_cxx_arrow): Likewise.
1497 (pp_cxx_semicolon): Likewise.
1498 (pp_cxx_complement): Likewise.
1499 (pp_cxx_begin_template_argument_list): Declaree.
1500 (pp_cxx_end_template_argument_list): Likewise.
1501 (pp_cxx_colon_colon): likewise.
1503 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1505 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1508 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1510 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1511 typeck.c: Fix comment formatting.
1513 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1515 * cp-lang.c (cp_expand_decl): Remove.
1516 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1518 2004-05-30 Andreas Jaeger <aj@suse.de>
1520 * lang-specs.h: Add missing initializers for .ii.
1522 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1524 * decl.c (cp_make_fname_decl): Free return value from
1527 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1530 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1532 * init.c (build_new): Likewise.
1535 * name-lookup.c (arg_assoc): Robustify.
1538 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1539 when determining the scope to use for a pointer to member.
1540 (lookup_anon_field): Give it external linkage.
1541 * cp-tree.h (lookup_anon_field): Declare it.
1542 * expr.c (cplus_expand_constant): Use it.
1544 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1547 * parser.c (cp_parser_simple_type_specifier): Call
1548 maybe_note_name_used_in_class.
1550 2004-05-28 Tom Marshall <tmarshall@real.com>
1553 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1554 the class has friends.
1556 2004-05-27 Adam Nemet <anemet@lnxw.com>
1559 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1560 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1562 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1564 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1565 if it might be needed.
1566 * pt.c (mark_decl_instantiated): Only call defer_fn if
1567 the function actually needs processing in finish_file.
1568 * decl2.c (finish_file): Add check that elements in
1569 deferred_fns_used are really needed there. Remove unnecessary
1570 test of DECL_SAVED_TREE.
1572 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1574 * Make-lang.in: No need to specify $(LIBCPP).
1576 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1579 * parser.c (cp_parser_class_head): Robustify.
1582 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1584 (cp_parser_constructor_declarator_p): Treat attributes
1588 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1589 base classes in templates.
1591 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1594 * pt.c (instantiate_template): Robustify.
1596 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1599 * decl.c (xref_tag): Issue errors about redeclaring template
1600 classes as non-template classes.
1602 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1605 * name-lookup.c (supplement_binding): Allow redefinitions of
1609 * parser.c (cp_parser_template_argument): Robustify.
1611 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1613 * class.c (alter_access): Use %E format specifier to print an
1614 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1615 (push_lang_context): Likewise.
1616 * decl.c (lookup_label): Likewise.
1617 (grokdeclarator): Likewise.
1618 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1619 * pt.c (do_type_instantiation): Likewise.
1620 * tree.c (handle_java_interface_attribute): Likewise.
1621 (handle_com_interface_attribute): Likewise.
1622 (handle_init_priority_attribute): Likewise.
1624 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1628 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1629 recognized as overloaded functions.
1631 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1634 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1635 layout conflicts for unions.
1638 * typeck.c (build_x_unary_op): Instantiate template class
1639 specializations before looking for "operator &".
1642 * typeck.c (complete_type): Layout non-dependent array types, even
1646 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1649 2004-05-22 Roger Sayle <roger@eyesopen.com>
1651 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1652 returning when TREE_TYPE is error_mark_node.
1653 * typeck.c (require_complete_type): Return error_mark_node if
1654 value's type is an error_mark_node.
1656 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1658 * optimize.c (calls_setjmp_r): Remove.
1659 (calls_setjmp_p): Remove.
1660 * cp-tree.c (calls_setjmp_p): Remove.
1661 * decl.c (finish_function): Do not call calls_setjmp_p.
1663 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1665 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1666 * decl2.c (maybe_make_one_only): Likewise.
1667 * method.c (use_thunk): Likewise.
1669 2004-05-18 Jason Merrill <jason@redhat.com>
1671 * class.c (build_base_path): Tidy a bit.
1673 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1675 * name-lookup.c (struct scope_binding): New.
1676 (EMPTY_SCOPE_BINDING): New.
1677 (lookup_using_namespace): Take a scope_binding instead of a
1679 (qualified_lookup_using_namespace): Likewise.
1680 (cxx_binding_clear): Delete.
1681 (do_nonmember_using_decl): Use a scope_binding instead of a
1683 (lookup_tag): Don't call select_decl.
1684 (ambiguous_decl): Don't return anything (and change callers to match).
1685 Take a scope_binding as the second parameter.
1686 (lookup_namespace_name): Use a scope_binding instead of a
1688 (unqualified_namespace_lookup): Likewise.
1689 (lookup_qualified_name): Likewise.
1690 (select_decl): Take a scope_binding instead of a cxx_binding.
1691 Use macros rather than hand-coding tests for type-ness.
1693 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1695 * cp-gimplify.c: Rename from cp-simplify.c.
1696 * Make-lang.in, optimize.c: Update.
1698 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1700 Merge from tree-ssa-20020619-branch. See
1701 ChangeLog.tree-ssa for details.
1703 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1704 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1705 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1706 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1708 * cp-mudflap.c: New file.
1709 * cp-simplify.c:: New file.
1711 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1714 * decl2.c (check_classfn): For member templates, compare also the
1715 template parameters to match the declaration.
1716 * cp-tree.h: Adjust declaration of check_classfn.
1717 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1718 * friend.c (do_friend): Likewise.
1719 * pt.c (tsubst_friend_function): Likewise.
1721 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1723 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1724 Instead, dig into the representation type to find the array bound.
1726 2004-04-30 Jason Merrill <jason@redhat.com>
1728 Refer to base members using COMPONENT_REFs where possible.
1729 * class.c (build_simple_base_path): New fn.
1730 (build_base_path): Use it for non-virtual base references.
1731 (layout_class_type): Change base fields to their real type
1732 after layout is done.
1733 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1734 * cp-lang.c (cxx_get_alias_set): Use it.
1736 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1738 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1741 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1744 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1745 used in integral constant expressions.
1747 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1749 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1752 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1754 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1755 * decl.c (reshape_init): Use it.
1756 * init.c (perform_member_init): Remove redundant condition.
1757 (build_aggr_init): Adjust to handle brace-enclosed initializers
1759 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1761 * parser.c (cp_parser_initializer_clause): Do not set
1762 TREE_HAS_CONSTRUCTOR on the initializer.
1763 * rtti.c (tinfo_base_init): Likewise.
1764 (generic_initializer): Likewise.
1765 (ptr_initializer): Likewise.
1766 (ptm_initializer): Likewise.
1767 (class_initializer): Likewise.
1768 (get_pseudo_ti_init): Likewise.
1769 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1771 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1773 * name-lookup.c (anonymous_namespace_name): Make static.
1775 2004-04-19 Roger Sayle <roger@eyesopen.com>
1778 * class.c (build_base_path): Call fold whilst building the NULL
1779 pointer check expression trees.
1781 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1783 * init.c (build_new_1): Don't use type size argument for Java
1784 _Jv_AllocObject call.
1786 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1788 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1789 declaration and definition.
1791 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1794 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1795 than ASM_OUTPUT_DEF.
1797 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1799 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1800 current_function_decl == NULL.
1802 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1805 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1808 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1810 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1812 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1813 or TREE_SIDE_EFFECTS of a type.
1815 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1818 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1819 cv-qualifier unification.
1820 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1822 2004-04-02 Jan Hubicka <jh@suse.cz>
1824 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1825 * cp-tree.h (cp_update_decl_after_saving): Declare.
1826 * tree.c (cp_update_decl_after_saving): Define.
1828 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1831 * typeck.c (get_delta_difference): Call fold before returning the
1834 2004-04-01 Richard Henderson <rth@redhat.com>
1837 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1838 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1840 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1843 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1845 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1847 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1849 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1851 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1852 * class.c (check_bitfield_decl): Likewise.
1853 * cvt.c (type_promotes_to): Likewise.
1854 * decl.c (finish_enum): Likewise.
1855 * mangle.c (write_builtin_type): Likewise.
1856 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1857 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1858 (build_binary_op): Likewise.
1860 2004-03-31 Jan Hubicka <jh@suse.cz>
1862 * tree.h (optimize_function): Kill prototype.
1863 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1864 * semantics.c (expand_body): Kill.
1866 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1869 * decl.c (start_decl_1): Do not decide whether or not to create a
1870 new cleanup level until after the type has been completed.
1873 * pt.c (tsubst_default_argument): Clear current_function_decl.
1875 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1877 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1879 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1881 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1882 is null, just print the literal name and return.
1884 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1886 * cxx-pretty-print.c: Fix comment typos.
1888 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1890 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1893 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1895 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1896 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1899 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1901 PR 12267, 12391, 12560, 13129, 14114, 14133
1902 * cp-lang.c (c_reset_state): Delete.
1903 (push_file_scope, pop_file_scope): New stubs.
1904 * parser.c (c_parse_file): Call sorry() here if called more than once.
1906 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1908 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1911 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1913 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1915 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1917 * error.c (enum pad): Remove.
1918 (dump_qualifiers): Likewise.
1919 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1920 (dump_aggr_type): Likewise.
1921 (dump_type_suffix): Likewise.
1922 (dump_simple_decl): Likewise.
1923 (dump_function_decl): Likewise.
1924 (cv_to_string): Likewise.
1925 (dump_type_prefix): Likewise. Adjust return void.
1926 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1928 (pp_cxx_template_keyword_if_needed): Document.
1929 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1930 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1931 MUST_NOT_THROW_EXPR.
1933 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1936 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1937 templates, if their type is non-dependent.
1939 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1941 * call.c (build_op_delete_call): Do not forget the placement
1942 arguments when iterating through mutiple delete operators.
1944 * cp-tree.h (svaed_scope): Remove last_parms.
1945 (NEW_DELETE_OPNAME_P): New macro.
1946 (last_function_parms): Remove.
1947 (do_friend): Adjust prototype.
1948 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1949 using last_function_parms.
1950 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1951 using last_function_parms.
1952 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1953 for class-specific operator new and operator delete.
1954 (grok_op_properties): Do not look for allocation functions with
1956 (start_function): Use DECL_ARGUMENTS instead of
1957 last_function_parms.
1958 * decl.h (last_function_parms): Do not declare.
1959 * decl2.c (grokclassfn): Do not use last_function_parms.
1960 * friend.c (do_friend): Remove parmdecls parameter.
1961 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1962 (pop_from_top_level): Do not restore it.
1963 * pt.c (check_explicit_specialization): Do not adjust
1964 last_function_parms.
1966 * name-lookup.c (do_local_using_decl): Create a local binding for
1967 types brought in via using declarations.
1969 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1970 function declarations correctly.
1972 * semantics.c (finish_id_expression): Correct handling of
1973 conversion operators to dependent types.
1975 * typeck.c (lookup_destructor): Allow the use of destructors from
1978 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1980 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1981 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1982 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1983 the field is named TEMPLATE_TYPE_PARM_INDEX.
1985 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1988 * parser.c (cp_parser_functional_cast): A cast to anything
1989 but integral or enumaration type is not an integral constant
1991 * pt.c (value_dependent_expression_p): Handle cast expressions
1992 without operands (such as "int()").
1994 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1996 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1997 cv-qualification between the type named by the
1998 pseudo-destructor-name and the object-type.
2000 * search.c (accessible_base_p): Handle non-proper bases.
2002 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2003 refers to a single overloaded function, set the type of the
2005 * tree.c (lvalue_type): Simplify.
2006 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2008 (build_unary_op): Handle OVERLOADs with known types.
2010 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2013 * parser.c (cp_parser_postfix_expression): Handle the use of
2014 "typename" in non-dependent contexts. Convert appropriately when
2015 when using a qualified name after "->" or ".".
2017 * call.c (conditional_conversion): Honor the requirement that some
2018 conversions refer to the original object.
2020 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2022 * call.c (build_conditional_expr): Do not call force_rvalue for
2023 operands of void_type when the conditional expression itself has
2025 * name-lookup.c (pushdecl): Don't consider a declaration of a
2026 function named "main" to be an overload of a type named "main".
2027 * parser.c (cp_parser_template_name): Perform name lookup when the
2028 template name is proceeded by "template" if the qualifying scope
2030 * typeck.c (composite_pointer_type_r): Correctly handle
2031 pointer-to-member types.
2032 (build_const_cast): Likewise.
2034 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2036 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2037 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2038 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2039 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2040 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2041 (TYPEOF_TYPE_EXPR): New macro.
2042 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2043 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2044 * pt.c (tsubst): Likewise.
2045 * semantics.c (finish_typeof): Likewise.
2046 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2047 and TEMPLATE_TYPE_PARM.
2048 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2049 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2051 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2054 * cp-tree.h (build_new_op): Change prototype.
2055 (build_x_binary_op): Likewise.
2056 * call.c (build_new_op): Add overloaded_p parameter.
2057 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2058 * parser.c (cp_parser_binary_expression): Note that uses of
2059 overloaded operators prevents an expression from being considered
2060 an integral constant.
2061 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2063 * semantics.c (finish_call_expr): Likewise.
2064 * typeck.c (rationalize_conditional_expr): Likewise.
2065 (build_x_indirect_ref): Likewise.
2066 (build_x_binary_op): Likewise.
2067 (build_x_unary_op): Likewise.
2068 (build_x_compound_expr): Likewise.
2069 (build_modify_expr): Likewise.
2070 * typeck2.c (build_x_arrow): Likewise.
2072 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2074 * cp-lang.c, ptree.c: Update copyright.
2076 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2079 * parser.c (cp_parser_non_integral_constant_expression): Encode
2080 more of the idiom that surrounded calls to this function within
2082 (cp_parser_primary_expression): Adjust accordingly.
2083 (cp_parser_postfix_expression): Likewise.
2084 (cp_parser_unary_expression): Likewise.
2085 (cp_parser_cast_expression): Likewise.
2086 (cp_parser_assignment_expression): Likewise.
2087 (cp_parser_expression): Likewise.
2088 (cp_parser_new_expression): Note that new-expressions are not
2089 allowed in integral constant expressions.
2090 (cp_parser_delete_expression): Likewise.
2092 2004-03-12 Matt Austern <austern@apple.com>
2094 * decl2.c (maybe_make_one_only): Look at
2095 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2096 to make an explicit instantiation weak.
2097 * method.c (use_thunk): Make sure we call comdat_linkage
2099 * pt.c (do_type_instantiation): On systems where weak symbols
2100 don't go in a static archive's TOC, explicit instantiation of a
2101 class must imply *explicit* instantiation of its memeber.
2103 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2105 * call.c, cp-tree.h, pt.c: Fix comment typos.
2107 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2110 * decl.c (xref_tag): Disregard non-type declarations when
2111 looking up a tagged type.
2113 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2116 * call.c (convert_like_real): Build a const qualified temporary,
2117 when testing ctor access.
2119 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2121 * call.c (initialize_reference): Fix typo.
2123 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2126 * pt.c (determine_specialization): For member templates, match also
2130 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2132 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2134 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2137 * call.c (initialize_reference): Handle initializers that are
2138 class-member access expressions applies to rvalues.
2140 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2143 * name-lookup.c (supplement_binding): Ignore functions that are
2144 marked DECL_ANTICIPATED.
2146 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2149 * class.c (check_field_decls): Complain about non-static data
2150 members of reference type in unions. Propagate
2151 CLASSTYPE_REF_FIELDS_NEED_INIT and
2152 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2154 * init.c (perform_member_init): Complain about mbmers with const
2155 type that are not explicitly initialized.
2157 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2159 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2160 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2161 (lang_identifier): Remove implicit_decl and error_locus.
2162 (IDENTIFIER_IMPLICIT_DECL): Remove.
2163 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2164 (IDENTIFIER_ERROR_LOCUS): Likewise.
2165 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2166 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2167 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2168 (implicitly_declare): Remove.
2169 * decl.c (warn_extern_redeclared_static): Remove check of
2170 IDENTIFIER_IMPLICIT_DECL.
2171 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2172 (implicitly_declare): Remove.
2173 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2174 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2175 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2176 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2177 in the innermost scope, rather than at namespace scope.
2178 * name-lookup.c (push_local_binding): Give it external linkage.
2179 (pushdecl): Remove dead code.
2180 * name-lookup.h (push_local_binding): Declare it.
2181 * ptree.c (cxx_print_identifier): Don't print
2182 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2183 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2184 not IDENTIFIER_ERROR_LOCUS.
2185 * typeck.c (build_function_call): Remove dead code.
2187 2004-03-08 Jason Merrill <jason@redhat.com>
2190 * decl.c (xref_tag): Remove attribute handling.
2191 * cp-tree.h: Adjust prototype.
2192 * decl.c, parser.c, rtti.c: Adjust callers.
2193 * parser.c (cp_parser_class_head): Pass back attributes in the
2195 (cp_parser_class_specifier): Adjust.
2197 2004-03-08 Matt Austern <austern@apple.com>
2200 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2201 as static, to static_decls array.
2203 2004-03-05 Jason Merrill <jason@redhat.com>
2205 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2207 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2209 * decl.c (grokfndecl): Update old incorrect comment.
2210 (grokvardecl): Diagnose C++ variables of type with no linkage.
2212 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2215 * pt.c (build_non_dependent_expr): Do not create a
2216 NON_DEPENDENT_EXPR for a THROW_EXPR.
2218 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2221 * error.c (dump_expr): Handle THROW_EXPR.
2223 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2226 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2227 lookup if ordinary name-lookup finds a non-function.
2228 * pt.c (tsubst_copy_and_build): Likewise.
2231 * parser.c (cp_parser_late_parsing_default_args): Check that there
2232 are no extra tokens after the end of the default-argument
2235 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2238 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2239 having C++ linkage for name-mangling purposes.
2242 * parser.c (cp_parser_direct_declarator): Recognize constructor
2243 declarators that use a template-id to name the class being
2247 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2248 (tsubst_expr): Do not call tsubst_copy, even when
2249 processing_template_decl.
2251 2004-03-01 Jeff Law <law@redhat.com>
2253 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2256 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2259 * name-lookup.h (push_scope): Change prototype.
2260 * name-lookup.c (push_scope): Do not reenter the current class
2262 * decl.c (grokfndecl): Check return code from push_scope before
2264 * decl2.c (check_classfn): Likewise.
2265 * parser.c (cp_parser_conversion_function_id): Likewise.
2266 (cp_parser_init_declarator): Likewise.
2267 (cp_parser_direct_declarator): Likewise.
2268 (cp_parser_class_specifier): Likewise.
2269 (cp_parser_class_head): Likewise.
2270 (cp_parser_lookup_name): Likewise.
2271 (cp_parser_constructor_declarator_p): Likewise.
2272 * pt.c (instantiate_class_template): Likewise.
2273 (resolve_typename_type): Likewise.
2275 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2278 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2282 * class.c (update_vtable_entry_for_fn): Do not go through
2283 covariance machinery if the type returned by an overrider is the
2284 same as the original.
2286 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2288 * call.c: Fix a comment typo.
2290 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2292 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2294 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2297 * parser.c (cp_parser_parameter_declaration_list): Commit
2298 to fewer tentative parses.
2300 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2303 * pt.c (dependent_type_p_r): A template template parameter is a
2306 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2309 * mangle.c (write_template_arg_literal): Don't rely on identity for
2312 2004-02-24 Jason Merrill <jason@redhat.com>
2314 * tree.c (build_exception_variant): Use check_qualified_type.
2316 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2317 Kazu Hirata <kazu@cs.umass.edu>
2319 * decl.c (cxx_init_decl_processing): Don't check
2320 flag_writable_strings.
2322 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2325 * typeck.c (maybe_warn_about_returning_address_of_location):
2326 Change check for VAR_DECL to use DECL_P instead.
2328 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2331 * cvt.c (build_expr_type_conversion): Type must be complete before
2332 looking up for conversions.
2334 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2337 * name-lookup.c (arg_assoc_class): Don't look into template
2338 arguments if it is not a primary template.
2340 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2343 * method.c (use_thunk): Always clone function argument tree.
2345 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2348 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2351 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2352 for all type variants.
2354 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2357 * decl.c (duplicate_decls): Return error_mark_node for invalid
2359 * name-lookup.c (push_namespace): Ignore the return value from
2361 * pt.c (push_template_decl_real): Robustify.
2364 * name-lookup.c (push_class_level_binding): Do not complain about
2365 adding a binding for a member whose name is the same as the
2366 enclosing class if the member is located in a base class of the
2369 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2372 * parser.c (cp_parser_new_expression): Parse an ill-formed
2373 direct-new-declarator after a parenthesized type-id to emit good
2376 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2378 * cp-tree.def, cvt.c: Update copyright.
2380 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2383 * cp-tree.h (abi_version_at_least): Remove.
2384 * mangle.c: Include flags.h.
2386 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2389 * call.c (build_conditional_expr): Handle conversions between
2390 class types which result in differently cv-qualified type
2394 * class.c (delete_duplicate_fields_1): Remove.
2395 (delete_duplicate_fields): Likewise.
2396 (finish_struct_anon): Remove check for members with the same name
2397 as their enclosing class.
2398 (check_field_decls): Do not call duplicate_fields.
2399 * decl.c (grokdeclarator): Remove check for static data members
2400 with the same name as their enclosing class.
2401 * name-lookup.c (push_class_level_binding): Check for members with
2402 the same name as their enclosing class.
2404 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2407 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2409 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2412 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2413 has full set of arguments.
2415 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2418 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2420 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2423 * cp-tree.h (delete_sanity): Change prototype.
2424 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2425 Remove dead code. Adjust code to warn about deleting an array.
2426 * typekc.c (decay_conversion): Use build_address and build_nop.
2429 * search.c (accessible_p): Do not check access in thunks.
2432 * call.c (build_conditional_expr): Call force_rvalue on the
2433 non-void operand in the case that one result is a throw-expression
2434 and the other is not.
2436 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2439 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2440 the type name and look ahead for ::~, and bail out early with a
2441 better error message if the parse is going to fail.
2443 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2445 * call.c (conversion_kind): New type.
2446 (conversion_rank): Likewise.
2447 (conversion): Likewise.
2448 (CONVERSION_RANK): New macro.
2449 (conversion_obstack): New variable.
2450 (obstack_initialized): Likewise.
2451 (z_candidate): Change type of convs and second_conv.
2452 (candidate_warning): New type.
2453 (IDENTITY_RANK): Remove.
2454 (EXACT_RANK): Likewise.
2455 (PROMO_RANK): Likewise.
2456 (STD_RANK): Likewise.
2457 (PBOOL_RANK): Likewise.
2458 (USER_RANK): Likewise.
2459 (ELLIPSIS_RANK): Likewise.
2460 (BAD_RANK): Likewise.
2461 (ICS_RANK): Likewise.
2462 (ICS_STD_RANK): Likewise.
2463 (ICS_USER_FLAG): Likewise.
2464 (ICS_ELLIPSIS_FLAG): Likewise.
2465 (ICS_THIS_FLAG): Likewise.
2466 (ICS_BAD_FLAG): Likewise.
2467 (NEED_TEMPORARY_P): Likewise.
2468 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2469 (USER_CONV_CAND): Likewise.
2470 (USER_CONV_FN): Likewise.
2471 (conversion_obstack_alloc): New function.
2472 (alloc_conversion): Likewise.
2473 (validate_conversion_obstack): Likewise.
2474 (alloc_conversions): Likewise.
2475 (build_conv): Adjust to deal with new conversion data structures.
2476 (build_identity_conv): New function.
2477 (build_ambiguous_conv): Likewise.
2478 (standard_conversion): Adjust to deal with new conversion data
2480 (convert_class_to_reference): Likewise.
2481 (direct_reference_binding): Likewise.
2482 (reference_binding): Likewise.
2483 (implicit_conversion): Likewise.
2484 (add_candidate): Likewise.
2485 (add_function_candidate): Likewise.
2486 (add_conv_candidate): Likewise.
2487 (build_builtin_candidate): Likewise.
2488 (print_z_candidate): Likewise.
2489 (merge_conversion_sequences): Likewise.
2490 (build_user_type_conversion_1): Likewise.
2491 (build_user_type_conversion): Likewise.
2492 (build_new_function_call): Likewise.
2493 (build_object_call): Likewise.
2494 (conditional_conversion): Likewise.
2495 (build_conditional_expr): Likewise.
2496 (build_new_op): Likewise.
2497 (build_op_delete_call): Likewise.
2498 (convert_like_real): Likewise.
2499 (build_over_call): Likewise.
2500 (build_new_method_call): Likewise.
2501 (is_subseq): Likewise.
2502 (maybe_handle_implicit_object): Likewise.
2503 (maybe_handle_ref_bind): Likewise.
2504 (compare_ics): Likewise.
2505 (source_type): Likewise.
2506 (add_warning): Likewise.
2508 (can_convert_arg): Likewise.
2509 (can_convert_arg_bad): Likewise.
2510 (perform_implicit_conversion): Likewise.
2511 (perform_direct_initialization_if_possible): Likewise.
2512 (initialize_reference): Likewise.
2513 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2514 * cp-tree.def (WRAPPER): Likewise.
2515 (IDENTITY_CONV): Remove.
2516 (LVALUE_CONV): Likewise.
2517 (QUAL_CONV): Likewise.
2518 (STD_CONV): Likewise.
2519 (PTR_CONV): Likewise.
2520 (PMEM_CONV): Likewise.
2521 (BASE_CONV): Likewise.
2522 (REF_BIND): Likewise.
2523 (USER_CONV): Likewise.
2524 (AMBIG_CONV): Likewise.
2525 (RVALUE_CONV): Likewise.
2526 * cp-tree.h (tree_wrapper): Remove.
2527 (WRAPPER_ZC): Remove.
2528 (lang_tree_node): Remove wrapper.
2529 (LOOKUP_SPECULATIVELY): Remove.
2530 (build_op_delete_call): Adjust prototype.
2531 (validate_conversion_obstack): Declare.
2532 (build_zc_wrapper): Remove.
2533 * cvt.c (convert_to_reference): Remove dead code.
2534 (ocp_convert): Likewise.
2535 * decl.c (redeclaration_error_message): Correct handling of
2537 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2538 (cp_tree_node_structure): Remove WRAPPER case.
2539 * decl2.c (finish_file): Call validate_conversion_obstack.
2540 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2541 (build_op_delete_call): Likewise.
2542 (build_x_delete): Likewise.
2543 (build_delete): Adjust call to build_op_delete_call.
2544 * pt.c (tsubst_friend_declaration): Adjust code to determine
2545 whether or not a friend template is a definition.
2546 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2547 * tree.c (build_zc_wrapper): Remove.
2549 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2551 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2552 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2553 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2554 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2556 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2558 * typeck.c (lookup_destructor): Fix typo in error message.
2560 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2562 * call.c, parser.c, tree.c: Fix comment typos.
2564 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2567 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2568 * decl.c (duplicate_decls, start_function): Likewise.
2570 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2572 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2573 * parser.c (free_parser_stacks): Delete.
2575 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2577 * rtti.c: Update copyright.
2579 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2582 * decl.c (require_complete_types_for_parms): Do not insert
2583 error_mark_node in the parameter list.
2585 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2588 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2589 error when terminator can not be found.
2591 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2593 Make-lang.in (po-generated): Delete.
2595 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2597 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2598 targetm.calls.promote_prototypes.
2600 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2604 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2606 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2607 (handle_pragma_implementation): Likewise.
2609 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2612 * typeck.c (lookup_destructor): Tweak error message.
2614 2004-02-05 Jan Hubicka <jh@suse.cz>
2616 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2619 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2622 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2623 code, only emits the diagnostic now. Added lookup of the identifier
2624 and support for qualified ids.
2625 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2626 Parse an (invalid) type name as id-expression within a declarator.
2627 (cp_parser_simple_declaration): Use it.
2628 (cp_parser_member_declaration): Likewise.
2629 (cp_parser_make_typename_type): New function. Handle errors through
2630 cp_parser_diagnose_invalid_typename.
2631 (cp_parser_elaborated_type_specifier): Use it.
2633 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2636 * call.c (convert_like_real): Use "converting" rather than
2637 "argument" as the descriptive keyword to
2638 dubious_conversion_warnings.
2639 * typeck.c (convert_for_assignment): Do not call
2640 dubious_conversion_warnings.
2642 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2645 * init.c (build_delete): Emit a more informative error message in
2646 case of an incomplete type, and on the correct source line.
2648 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2650 * error.c, search.c: Update copyright.
2652 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2655 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2656 linkage for the typeinfo name string.
2658 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2661 * cp-tree.h (fold_non_dependent_expr): New function.
2662 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2663 (cp_parser_template_argument): Use fold_non_dependent_expr.
2664 (cp_parser_direct_declarator): Likewise.
2665 * pt.c (fold_non_dependent_expr): New function.
2666 (convert_nontype_argument): Use it.
2667 (tsubst_qualified_id): Simplify.
2668 (tsubst_copy_and_build): Likewise.
2670 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2672 * decl.c (cxx_push_function_context): Do not set
2673 current_function_is_thunk.
2674 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2677 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2680 * pt.c (more_specialized_class): Increase processing_template_decl
2681 while partial ordering.
2683 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2686 * decl.c (start_function): Do not call pushdecl for any
2687 instantiation or specialization of a primary template.
2689 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2692 * parser.c (cp_parser_class_name): Robustify.
2695 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2698 * semantics.c (finish_id_expression): Do not return an
2699 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2701 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2704 * pt.c (build_non_dependent_expr): Do not build
2705 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2708 * semantics.c (finish_id_expression): Do not return an
2709 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2712 * parser.c (cp_parser_simple_declaration): When skipping to the
2713 end of the statement swallow the terminating semicolon.
2715 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2718 * init.c (build_offset_ref): Improve error recovery for invalid
2719 uses of non-static member functions.
2722 * cp-tree.h (cp_build_type_attribute_variant): New function.
2723 * class.c (build_clone): Use cp_build_type_attribute_variant.
2724 * decl.c (duplicate_decls): Likewise.
2725 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2726 (tsubst_function_type): Likewise.
2727 * tree.c (build_exception_variant): Check attributes before
2728 concluding that two types are the same.
2729 (cp_build_type-attribute_variant): New method.
2730 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2733 * call.c (convert_class_to_reference): Keep better track of
2734 pedantically invalid user-defined conversions.
2736 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2739 * pt.c (tsubst_qualified_id): Improved error message when a type
2740 is expected but not found.
2742 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2744 * class.c: Fix comment typos.
2746 * error.c: Likewise.
2747 * parser.c: Likewise.
2749 * search.c: Likewise.
2750 * typeck.c: Likewise.
2752 2004-01-30 Richard Henderson <rth@redhat.com>
2755 * method.c (use_thunk): Don't force_target_expr for void thunks.
2756 * tree.c (build_target_expr_with_type): Assert non-void type.
2757 (force_target_expr): Likewise.
2759 2004-01-30 Michael Matz <matz@suse.de>
2761 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2763 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2767 * decl.c (grokdeclarator): Check immediatly type completeness for
2768 non-dependent types.
2770 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2773 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2774 a sizeof expression.block
2776 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2779 * mangle.c (write_encoding): Correct encoding of member template
2782 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2784 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2785 template name as it was `<::' (digraph typo).
2786 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2787 (cp_parser_id_expression): Use it.
2788 (cp_parser_nested_name_specifier_opt): Likewise.
2789 (cp_parser_template_name): Likewise.
2790 (cp_parser_class_name): Likewise.
2791 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2793 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2796 * typeck.c (merge_types): Do not merge attributes into
2800 * parser.c (cp_parser_direct_declarator): Do not prevent
2801 backtracking inside a parenthesized declarator.
2802 (cp_parser_parameter_declaration): Fix typo in comment.
2804 2004-01-28 Jan Hubicka <jh@suse.cz>
2806 * semantics.c (expand_body) Do emit_associated_thunks before
2809 2004-01-27 Devang Patel <dpatel@apple.com>
2811 * name-lookup.c: Include "debug.h"
2812 (do_namespace_alias): Invoke debug_hooks to emit debug info
2813 for namespace alias.
2814 (do_local_using_decl): Invoke debug_hooks to emit debug info
2816 (do_class_using_decl): Same.
2817 (do_toplevel_using_decl): Same.
2818 (do_using_directive): Same.
2819 (cp_emit_debug_info_for_using): New function.
2820 * Make-lang.in (cp/parser.o): Depend on debug.h
2821 (cp/name-lookup.o): Same.
2823 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2825 * cp-tree.h (language_function, lang_type_header): Use
2827 * name-lookup.h (cp_binding_level): Likewise.
2829 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2832 * semantics.c (finish_for_expr): Check for unresolved overloaded
2835 * class.c (add_method): Just check processing_template_decl to
2836 determine whether or not we are within a template.
2837 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2838 * init.c (decl_constant_value): Check the type of the declaration,
2840 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2841 (push_to_top_level): ... this.
2842 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2843 * pt.c (push_template_decl_real): Reorder condition for speed.
2844 (convert_template_argument): Use dependency-checking functions in
2845 place of uses_template_parms.
2846 (lookup_template_class): Avoid calling uses_template_parms more
2848 (uses_template_parms): Reimplement, using dependency-checking
2850 (instantiate_class_template): Use push_to_top_level, not
2851 maybe_push_to_top_level.
2852 (type_unification_real): Simplify.
2853 (type_dependent_expression_p): Handle OFFSET_REFs and
2855 (any_dependent_template_arguments_p): Handle multiple levels of
2857 * semantics.c (expand_or_defer_fn): Do not check
2858 uses_template_parms for template instantiations.
2859 * typeck.c (comptypes): Avoid calling cp_type_quals.
2861 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2864 * call.c (build_over_call): Do not convert arguments when
2865 processing a template.
2866 * pt.c (build_non_dependent_expr): Do not build a
2867 NON_DEPENDENT_EXPR for arithmetic constants.
2869 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2872 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2873 returns a TYPE_DECL. no further lookup is required.
2874 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2875 is invalid. Rework to give better diagnostics.
2877 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2880 * pt.c (instantiate_class_template): Add an error_mark_node
2882 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2884 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2887 * decl.c (finish_function): Move the call to
2888 finish_fname_decls below the call to
2889 finish_eh_spec_block.
2891 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2893 * optimize.c, typeck2.c: Update copyright.
2895 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2897 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2898 init.c, mangle.c, typeck.c: Update copyright.
2900 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2902 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2904 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2906 * Make-lang.in: Replace $(docdir) with doc.
2907 (c++.info, c++.srcinfo): Dummy entry.
2908 (c++.man, c++.srcman): New rules.
2909 (c++.install-man): Revamp rule.
2911 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2913 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2914 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2915 immediate $(shell) instead of deferred backquote.
2917 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2920 * parser.c (cp_parser_postfix_expression): When encountering
2921 incomplete type on left-hand side of "->" or ".", treat the entire
2922 expression as erroneous.
2925 * call.c (build_field_call): Remove.
2926 (n_build_method_call): Likewise.
2927 (build_method_call): Likewise.
2928 (build_new_method_call): Do not call build_field_call.
2929 * class.c (n_build_method_call): Remove.
2930 (print_class_statistics): Do not print it.
2931 * cp-tree.h (build_method_call): Remove declaration.
2932 (finish_object_call_expr): Likewise.
2933 (build_new_1): Do not use build_method_call.
2934 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2935 when the function appearing on the right-hand-side of "." or "->"
2936 is not actually a function.
2937 * pt.c (tsubst_copy_and_build): Likewise.
2938 * semantics.c (finish_object_call_expr): Remove.
2940 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2943 * pt.c (tsubst): Use finish_typeof.
2945 2004-01-18 Jason Merrill <jason@redhat.com>
2948 * except.c (build_throw): In a template, set
2949 current_function_returns_abnormally.
2951 2004-01-17 Fred Fish <fnf@intrinsity.com>
2954 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2955 except don't call array_type_nelts() with a VECTOR_TYPE.
2957 2004-01-16 Jan Hubicka <jh@suse.cz>
2959 * mangle.c (write_mangled_name): Remove inline modifier.
2961 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2964 * decl.c (compute_array_index_type): Fix grammar in comment.
2965 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2968 * call.c (name_as_c_string): Print conversion operator names
2972 * call.c (initialize_reference): Pass -1 for inner parameter to
2975 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2978 * parser.c (cp_parser_base_specifier): Check for an invalid
2979 keyword `typename' and emit an user-friendly error message.
2981 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2984 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2985 (handle_pragma_implementation): Likewise.
2987 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2990 * typeck.c (build_class_member_access_expr): Allow to access members
2991 of the currently open class.
2992 (finish_class_member_access_expr): Likewise.
2994 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2997 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2998 name by value, instead of computing them.
2999 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3000 arguments. Pass them to validate_nonmember_using_decl.
3001 * name-lookup.h (do_local_using_decl): Adjust.
3002 (do_toplevel_using_decl): Likewise.
3003 * parser.c (cp_parser_using_declaration): Likewise.
3004 * pt.c (tsubst_expr): Likewise.
3006 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3010 * name-lookup.c (qualified_lookup_using_namespace): Search
3011 strongly-associated namespaces first, and only then try other
3014 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3016 * Make-lang.in (c++.srcextra): Dummy entry.
3018 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3021 * parser.c (cp_parser_template_name): Don't try to parse a
3022 conversion-function-id, as it cannot be a template-name.
3023 (cp_parser_simple_type_specifier): Check for invalid template-ids
3024 even after a built-in type.
3026 2004-01-14 Jan Hubicka <jh@suse.cz>
3029 * pt.c (instantiate_decl): Do not increase function_depth.
3031 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3035 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3036 attributes and discard.
3037 * decl.c (xref_tag): Don't overwite existing attributes with
3040 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3043 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3044 is no destructor while looking up a BIT_NOT_EXPR.
3046 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3048 * cxxfilt.c: Remove unused file.
3050 2004-01-14 Jan Hubicka <jh@suse.cz>
3052 Partial fix to PR c++/12850
3053 * decl2.c (mark_used): Do not proactively instantiate templates
3054 when compiling in unit-at-a-time or not optimizing.
3055 * optimize.c (maybe_clone_body): Do not increase function depth.
3057 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3060 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3062 2004-01-12 Steven Bosscher <stevenb@suse.de>
3065 * parser.c (cp_parser_member_declaration): Any non-type is also
3066 not a class or a function.
3068 2004-01-12 Jason Merrill <jason@redhat.com>
3071 * class.c (build_base_path): Do not mark vtable references as
3073 (build_vtbl_ref_1): Likewise.
3075 2004-01-12 Richard Henderson <rth@redhat.com>
3078 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3079 (store_init_value): Use it.
3080 * decl.c (check_initializer): Expect full initialization code
3081 from store_init_value.
3082 * init.c (expand_aggr_init_1): Likewise.
3083 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3085 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3087 * class.c (layout_class_type): For non-POD class types, also copy
3088 the DECL_SIZE and DECL_MODE of fields to the base class type.
3090 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3093 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3094 calling regenerate_decl_from_template.
3096 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3099 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3100 decl-specifier occurring along with a class definition.
3102 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3104 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3105 clauses to comments describing declares_class_or_enum.
3106 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3109 2004-01-12 Jan Hubicka <jh@suse.cz>
3111 * pt.c (for_each_template_parm): Do not check for duplicates.
3112 (for_each_template_parm): Use walk_tree duplicate checking code.
3114 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3117 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3118 is error_mark_node, don't add any more decl_specs.
3119 (cp_parser_init_declarator): After committing to a declaration, if
3120 the decl_specifiers start with error_mark_node, issue an error and
3121 change the type to "int".
3123 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3126 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3128 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3132 * pt.c (tsubst): Substitution must fail if we are attempting to
3133 create an array with element type that is an abstract class type.
3134 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3135 before calling abstract_virtuals_error.
3137 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3139 * name-lookup.c (qualified_lookup_using_namespace): Consider
3140 strong using directives even if we've already found a binding.
3142 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3144 * cp-tree.h (cxx_expand_expr): Change prototype.
3145 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3147 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3150 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3151 looking into them recursively. They can be there because of the
3152 new __offsetof__ extension.
3154 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3156 * parser.c (cp_parser_save_member_function_body): Mark the
3159 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3162 * class.c (build_clone): Copy type attributes from the original
3163 function to the clone.
3166 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3167 references as constant.
3170 * parser.c (cp_parser_explicit_instantiation): Improve error
3172 (cp_parser_require): Improve indication of the error location.
3175 * parser.c (cp_parser_class_head): Reorder logic to check for
3176 invalid qualification.
3178 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3181 * name-lookup.c (lookup_using_namespace): Remove spacesp
3183 (unqualified_namespace_lookup): Likewise.
3184 (lookup_qualified_name): Adjust accordingly.
3185 (lookup_name_real): Likewise.
3186 (lookup_arg_dependent): Do not eliminate the namespace of the
3187 functions found by unqualified name lookup unless that is the
3190 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3192 * semantics.c (push_deferring_access_checks): Fix format.
3193 (resume_deferring_access_checks): Likewise.
3194 (stop_deferring_access_checks): Likewise.
3195 (pop_deferring_access_checks): Likewise.
3196 (get_deferred_access_checks): Likewise.
3197 (pop_to_parent_deferring_access_checks): Likewise.
3198 (perform_deferred_access_checks): Likewise.
3199 (perform_or_defer_access_check): Likewise.
3201 2004-01-04 Richard Henderson <rth@redhat.com>
3203 * call.c (build_over_call): Don't create a save_expr of an
3204 aggregate, but rather its address.
3206 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3209 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3210 an offsetof expression.
3212 * parser.c (cp_parser_parameter_declaration): Fix comment.
3215 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3216 (reference_binding): Set it when appropriate.
3217 (build_temp): New function, split out from ...
3218 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3219 (initialize_reference): Likewise.
3222 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3223 (cp_parser_new): Initialize it.
3224 (cp_parser_postfix_expression): Set it.
3225 (cp_parser_sizeof_operand): Likewise.
3226 (cp_parser_parameteR_declaration): Do not commit early to tenative
3227 parsers when in_type_id_in_expr_p is set.
3229 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3232 * parser.c (cp_parser_template_argument): Don't call
3233 make_unbound_class_template directly.
3234 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3235 UNBOUND_CLASS_TEMPLATE tree node.
3237 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3240 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3242 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3245 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3246 (DECL_FUNCTION_TEMPLATE_P): Use it.
3247 (DECL_CLASS_TEMPLATE_P): Likewise.
3248 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3249 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3250 (cp_parser_template_name): Likewise.
3251 (cp_parser_elaborated_type_specifier): Likewise.
3252 (cp_parser_namespace_name): Likewise.
3253 (cp_parser_class_name): Likewise.
3254 (cp_parser_lookup_name_simple): Likewise.
3256 See ChangeLog.3 for earlier changes.