1 2004-07-15 Jason Merrill <jason@redhat.com>
3 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4 references and pointers are compatible.
6 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
8 * decl.c (xref_basetypes): Refactor.
9 * tree.c (copy_base_binfos): Replace with ...
10 (copy_binfo): ... this. Deep copy the given binfo, (not the just
11 bases of the given base).
12 * cp-tree.h (copy_base_binfo): Remove.
13 (copy_binfo): Declare.
15 2004-07-15 Mark Mitchell <mark@codesourcery.com>
17 * name-lookup.c (set_inherited_value_binding_p): Add class_type
19 (get_class_binding): Adjust.
20 (push_class_level_binding): Don't use set_inherited_value_binding_p.
22 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
24 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
25 * decl.c (xref_basetypes): Set it here.
27 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
28 Don't check for incomplete base.
29 (get_vfield_name): Simplify while loop.
30 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
32 2004-07-14 Mark Mitchell <mark@codesourcery.com>
34 * lex.c (cxx_make_type): Remove call to get_pointer_type.
36 * cp-tree.h (IDENTIFIER_VALUE): Remove.
37 (BINFO_PUSHDECLS_MARKED): Likewise.
38 (maybe_inject_for_scope_var): Likewise.
39 (push_class_decls): Likewise.
40 * name-lookup.h (push_class_binding): Remove.
41 (innermost_non_namespace_value): New function.
42 (outer_binding): Likewise.
43 * class.c (add_method): Push bindings before adding to
45 (restore_class_cache): Do not restore class_shadowed.
46 (pushclass): Do not add USING_DECLs. Do not call
48 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
49 * decl.c (pushdecl): Use outer_binding.
50 (poplevel): Set the scope for an out-of-scope for-loop declaration
52 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
53 * name-lookup.c (new_class_binding): New function.
54 (push_binding): Use it.
55 (pushdecl): Use innermost_non_namespace_value.
56 (maybe_inject_for_scope_var): Remove.
57 (push_class_binding): Remove.
58 (set_inherited_value_binding_p): New function.
59 (get_class_binding): New function.
60 (push_class_level_binding): Assert that the current_class_type is
62 (outer_binding): New function.
63 (innermost_non_namespace_value): Likewise.
64 (lookup_name_real): Use outer_binding.
65 (lookup_name_current_level): Ignore out-of-scope variables.
66 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
67 (lookup_template_class): Likewise.
68 * search.c (dfs_push_type_decls): Remove.
69 (dfs_push_decls): Likewise.
70 (setup_class_bindings): Likewise.
71 (lookup_field_1): Handle USING_DECLs from dependent scopes.
72 (marked_pushdecls_p): Remove.
73 (unmarked_pushdecls_p): Remove.
74 (marked_identifiers): Remove.
75 (setup_class_bindings): Remove.
76 (dfs_push_type_decls): Remove.
77 (dfs_push_decls): Remove.
78 (push_class_decls): Remove.
80 2004-07-13 Mark Mitchell <mark@codesourcery.com>
84 * decl.c (grokvardecl): Make declspecs parameter const.
85 (grokdeclarator): Likewise. Adjust accordingly.
86 * decl.h (grokdeclarator): Adjust declaration.
87 * parser.c (cp_parser_init_declarator): Do not clear
88 decl_specifiers->attributes.
90 * cp-tree.h (lang_identifier): Remove class_value.
91 (IDENTIFIER_CLASS_VALUE): Remove.
92 (pop_class_decls): Likewise.
93 (init_search_processing): Likewise.
94 * class.c (handle_using_decl): Use lookup_member, not
95 IDENTIFIER_CLASS_VALUE.
96 (restore_class_cache): New function, split out from ...
97 (pushclass): ... here. Do not call clear_identifier_class_values.
98 (invalidate_class_lookup_cache): Do not clear
99 IDENTIFIER_CLASS_VALUE.
100 (popclass): Do not call pop_class_decls.
101 (maybe_note_name_used_in_class): Do not save names looked up after
102 the class is complete. Use lookup_member, not
103 IDENTIFIER_CLASS_VALUE.
104 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
105 * decl.c (cxx_init_decl_processing): Do not call
106 init_search_processing.
107 * method.c (do_build_copy_constructor): Remove unnecessary code.
108 (do_build_assign_ref): Likewise.
109 * name-lookup.c (pushdecl): Use lookup_member, not
110 IDENTIFIER_CLASS_VALUE.
111 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
113 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
114 (push_class_binding): Do not set it.
115 (clear_identifier_class_values): Remove.
116 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
117 (store_binding): Do not save it.
118 (pop_from_top_level): Do not restore it.
119 * name-lookup.h (cxx_saved_binding): Remove class_value.
120 (clear_identifier_class_values): Remove.
121 * ptree.c (cxx_print_identifier): Do not print
122 IDENTIFIER_CLASS_VALUE.
123 * search.c (search_obstack): Remove.
124 (push_stack_level): Remove.
125 (pop_stack_level): Remove.
126 (search_level): Remove.
127 (search_stack): Remove.
128 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
129 (setup_class_bindings): Use IDENTIFIER_MARKED, not
130 IDENTIFIER_CLASS_VALUE.
131 (marked_identifiers): New variable.
132 (push_class_decls): Clear IDENTIFIER_MARKED.
133 (pop_class_decls): Don't call pop_search_level.
134 (init_search_processing): Remove.
136 2004-07-12 Mark Mitchell <mark@codesourcery.com>
138 * cp-tree.h (get_aggr_typedef): Remove.
139 * init.c (get_aggr_typedef): Likewise.
141 * name-lookup.c (push_class_level_binding): Simplify.
143 2004-07-12 Andrew Pinski <apinski@apple.com>
147 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
149 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
152 2004-07-12 Eric Christopher <echristo@redhat.com>
154 * parser.c (cp_parser_class_head): Remove unused variable.
156 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
158 * decl.c (grok_op_properties): Reject [de-]allocation functions
159 declared in a namespace, or declared as static.
161 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
163 * cp-tree.h (make_binfo): Remove.
164 * decl.c (xref_basetypes): Use make_tree_binfo directly.
165 * tree.h (copy_base_binfos): Likewise.
166 (make_binfo): Remove.
168 * call.c (build_user_type_conversion_1, build_new_op,
169 check_constructor_callable, build_temp,
170 perform_direct_initialization_of_possible): Pass type directly to
171 lookup_fnfields & build_special_member_call.
172 (build_special_member_call): Accept a type, and complete it.
173 * class.c (finish_stuct_bits): Copy the BINFOs here.
174 * cvt.c (ocp_convert): Pass type directly to
175 build_special_member_call.
176 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
177 (xref_basetypes): Allocate the binfo here. Adjust.
178 * init.c (build_init, build_new_1): Pass type directly to
179 build_special_member_call.
180 * lex.c (cxx_make_type): Do not allocate binfo here.
181 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
182 * parser.c (cp_parser_class_head): Always call xref_basetypes.
183 * pt.c (instantiate_class_template): Likewise. Inhibit access
184 checking for template friends.
185 * ptree.c (cxx_print_type): Adjust record printing.
186 * search.c (lookup_base): When taking a type, complete it before
188 (lookup_member): Delay completing a type.
189 (push_class_decls): Don't walk an incomplete type.
190 (lookup_conversions): Likewise.
191 * semantics.c (finish_stmt_expr_expr): Pass type directly to
192 build_special_member_call.
193 * tree.c (copy_base_binfos): Adjust.
194 (make_binfo): Likewise.
195 * typeck.c (build_modify_expr): Pass type directly to
196 build_special_member_call.
197 * typeck2.c (process_init_constructor): Check a binfo exists.
198 (build_m_component_ref): Allow accessing an incomplete type.
199 (build_functional_cast): Pass type directly to
200 build_special_member_call.
202 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
205 * config-lang.in (gtfiles): Add typeck2.c.
206 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
208 * cp-tree.h: Declare complete_type_check_abstract.
209 * typeck2.c (pat_calc_hash, pat_compare,
210 complete_type_check_abstract): New functions.
211 (abstract_virtuals_error): If the type is abstract, register the
212 declaration within abstract_pending_vars for further checks.
213 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
214 * decl.c (cp_finish_decl): Do not strip array types.
215 (create_array_type_for_decl): Check for abstractness of the element
217 (complete_vars): Call complete_type_check_abstract.
218 * class.c (finish_struct): Prepare a list of virtual functions for
219 template types, and call complete_vars on it to check for abstractness.
221 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
223 PR tree-optimization/14107
224 * decl.c (finish_function): Remove temporary band-aid.
226 2004-07-11 Mark Mitchell <mark@codesourcery.com>
228 * call.c (build_operator_new_call): Avoid using push_to_top_level.
229 (build_new_op): Adjust call to lookup_function_nonclass.
230 * name-lookup.c (identifier_type_value): Adjust call to
232 (lookup_name_real): Add block_p parameter.
233 (lookup_name_nonclass): Adjust call to lookup_name_real.
234 (lookup_function_nonclass): Likewise.
235 (lookup_name): Likewise.
236 * name-lookup.h (lookup_name_real): Change prototype.
237 (lookup_name_nonclass): Likewise.
238 * parser.c (cp_parser_lookup_name): Likewise.
240 * cp-tree.h (saved_scope): Make old_bindings a vector.
241 (unuse_fields): Remove.
242 * name-lookup.h (cxx_saved_binding): Define it.
243 * class.c (pushclass): Don't use unuse_fields.
244 * name-lookup.c (cxx_saved_binding_make): Remove.
245 (store_binding): Add new bindings to a vector, using an
246 accumulator style, rather than adding them to a list.
247 (store_bindings): Adjust accordingly.
248 (store_class_bindings): Likewise.
249 (push_to_top_level): Likewise.
250 (pop_from_top_level): Likewise.
251 * optimize.c (maybe_clone_body): Must push_to_top_level and
252 pop_from_top_level calls outside of loop.
253 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
254 calls here from cp_parser_late_parsing_default_args.
255 (cp_parser_save_default_args): Record the class type in which the
256 function is declared.
257 (cp_parser_late_parsing_default_args): Do not call
258 push_nested_class/pop_nested_class.
259 * search.c (dfs_unuse_fields): Remove.
260 (unuse_fields): Remove.
262 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
264 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
265 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
266 * cp-tree.h (poplevel): Declare.
268 * decl.c (set_block): Remove.
270 2004-07-10 Mike Stump <mrs@apple.com>
272 * decl2.c (import_export_class): Never export/import vtables
273 with inline key functions.
275 2004-07-09 Steven Bosscher <stevenb@suse.de>
277 * typeck.c (c_expand_asm_operands): Remove.
279 2004-07-09 Mike Stump <mrs@apple.com>
281 * typeck.c (build_class_member_access_expr): Skip null deref
282 warning when we don't dereference it.
284 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
288 * class.c (check_field_decls): Improve -Weffc++ warning: do not
289 warn for pointers to functions/members, or for classes without
292 2004-07-08 Mark Mitchell <mark@codesourcery.com>
294 * name-lookup.h (struct cp_binding_level): Update documentation
297 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
300 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
301 returning CALL_EXPR, and non-reference return type.
303 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
305 * name-lookup.c (push_binding): Use VEC_reserve.
307 2004-07-08 Richard Henderson <rth@redhat.com>
309 * cp-tree.h (expand_eh_spec_block): Remove.
311 2004-07-07 Mark Mitchell <mark@codesourcery.com>
313 * cp-tree.h (saved_scope): Remove x_previous_class_type and
314 x_previous_class_values; add x_previous_class_level.
315 (previous_class_type): Remove.
316 (previous_class_values): Remove.
317 (previous_class_level): New macro.
318 * class.c (pushclass): Restore the identifier cache more
320 (invalidate_class_lookup_cache): Use vector for class_shadowed and
321 previous_class_values.
322 * decl.c (poplevel): Likewise.
323 * name-lookup.c (cxx_binding_init): New function.
324 (cxx_binding_make): Use it.
325 (push_binding): For a binding in a class level, use a vector of
326 cp_class_binding nodes.
327 (push_binding_level): New function.
328 (begin_scope): Use it.
329 (leave_scope): Do not put class binding levels on the free list.
330 (print_binding_level): Adjust for the fact that class_shadowed is
332 (poplevel_class): Likewise.
333 (clear_identifier_class_values): Likewise.
334 (push_class_level_binding): Likewise.
335 (set_class_shadows): Remove.
336 (store_binding): New function.
337 (store_class_bindings): New function.
338 (push_to_top_level): Use store_class_bindings as appropriate.
339 (pop_from_top_level): Use previous_class_level, not
341 * name-lookup.h (cp_class_binding): New type.
342 (cp_binding_level): Use a vector object for class_shadowed.
343 (push_binding_level): Declare.
344 (set_class_shadows): Remove.
346 2004-07-07 Andrew Pinski <apinski@apple.com>
348 * class.c (instantiate_type): BUFFER_REF is dead.
349 * lex.c (init_operators): IN_EXPR is dead.
351 2004-07-07 Jason Merrill <jason@redhat.com>
354 * call.c (build_new_op): Give overload warnings for built-in
357 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
360 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
363 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
365 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
366 * class.c (build_primary_vtable, check_bases,
367 determine_primary_base, finish_struct_bits,
368 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
369 get_basefndecls, warn_hidden, walk_subobject_offsets,
370 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
371 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
372 finish_struct_1, get_vfield_name, contains_empty_class_p,
373 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
374 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
375 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
377 * decl.c (xref_basetypes): Likewise.
378 * dump.c (cp_dump_tree): Likewise.
379 * error.c (dump_expr): Likewise.
380 * init.c (sort_mem_initializers, expand_member_init,
381 push_base_cleanups): Likewise.
382 * method.c (do_build_copy_constructor, do_build_assign_reg,
383 synthesize_exception_spec): Likewise.
384 * name-lookup.c (arg_assoc_class):
385 * pt.c (instantiate_class_template, tsubst,
386 get_template_base_recursive):
387 * ptree.c (cxx_print_type):
388 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
389 * search.c (lookup_base_r, dynamic_cast_base_recurse,
390 dfs_access_in_type, access_in_type, lookup_field_queue_p,
391 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
392 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
393 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
394 binfo_for_vtable, copied_binfo, original_binfo): Likewise
395 * tree.c (copy_base_binfos, make_binfo): Likewise.
396 * typeck.c (commmon_base_type): Likewise
397 * typeck2.c (process_init_constructor): Likewise
399 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
401 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
403 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
406 * pt.c (convert_nontype_argument): Disallow conversions between
407 different enumeration types.
409 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
411 * cp-tree.h (BINFO_MARKED): Remove.
412 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
413 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
414 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
415 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
416 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
417 (mark_primary_bases, determine_primary_base, base_derived_from,
418 dfs_find_final_overrider, dfs_find_final_overrider_q,
419 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
420 dfs_modify_vtables, walk_subobject_offsets,
421 layout_nonempty_base_or_field, build_base_field,
422 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
423 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
424 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
425 build_ctor_vtbl_group, accumulate_vtble_inits,
426 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
427 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
428 add_vcall_offset_vtbl_entries_1): Likewise.
429 * decl.c (xref_basetypes): Incomming virtual base indicated by
431 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
432 * init.c (finish_init_stmts, sort_mem_initializers,
433 emit_mem_initializers, build_vtble_address, expand_member_init,
434 push_base_cleanups): Likewise.
435 * method.c (do_build_copy_constructor): Likewise.
436 * pt.c (instantiate_class_template,
437 get_template_base_recursive): Likewise.
438 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
439 get_pseudo_ti_desc): Likewise.
440 * search.c (lookup_base_r, dynamic_cast_base_recurse,
441 binfo_from_vbase, binfo_via_virtual, copied_binfo,
442 original_binfo): Likewise.
443 * semantics.c (finish_base_specifier): Virtualness is indicated
445 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
447 2004-07-06 Mark Mitchell <mark@codesourcery.com>
450 2004-06-24 Jason Merrill <jason@redhat.com>
452 * decl.c (grokparms): Give the PARM_DECL reference type if the
453 parameter is passed by invisible reference.
455 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
457 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
458 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
459 * pt.c (check_instantiated_args, unify): Likewise.
461 2004-07-05 Phil Edwards <phil@codesourcery.com>
463 * Make-lang.in (check-c++, lang_checks): Add some comments.
465 2004-07-05 Zack Weinberg <zack@codesourcery.com>
467 * cp-mudflap.c: Delete file.
468 * Makefile.in: Remove all references to cp-mudflap.o.
470 2004-07-05 Zack Weinberg <zack@codesourcery.com>
472 * decl.c (cxx_init_decl_processing): Call
473 build_common_tree_nodes before creating the global NAMESPACE_DECL.
475 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
478 * call.c (build_operator_new_call): Look only at global scope.
480 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
482 * call.c (enforce_access): Expect TREE_BINFO.
483 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
484 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
485 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
487 (BINFO_LANG_ELTS): Remove.
488 (BINFO_LANG_SLOTS): New.
489 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
490 (CLASSTYPE_TEMPLATE_INFO): Adjust.
491 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
492 * search.c (lookup_member): Check TREE_BINFO.
493 * semantics.c (perform_or_defer_access_check): Likewise.
494 (check_accessibility_of_qualified_id): Check
495 deferred_access_no_check.
496 * tree.c (make_binfo): Use make_tree_binfo.
498 2004-07-04 Mark Mitchell <mark@codesourcery.com>
500 * method.c (implicitly_declare_fn): Set linkage of generated
503 2004-07-04 Richard Henderson <rth@redhat.com>
505 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
507 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
510 * name-lookup.c (push_class_level_binding): Don't pass a
511 TREE_LIST of ambiguous names to check_template_shadow as it
512 only handles declarations. Instead, pull the declaration
515 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
518 * pt.c (check_explicit_specialization): Clarify error message.
520 2004-07-02 Richard Henderson <rth@redhat.com>
522 * tree.c (cp_unsave_r): Update remap_save_expr call.
524 2004-07-02 Mark Mitchell <mark@codesourcery.com>
527 * mangle.c (write_template_arg): Correct mangling.
530 * decl.c (grokdeclarator): Robustify.
532 2004-07-01 Richard Henderson <rth@redhat.com>
534 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
535 * method.c (synthesize_method): Don't clear_last_expr.
536 * name-lookup.c (maybe_push_cleanup_level): Likewise.
538 2004-07-01 Nick Clifton <nickc@redhat.com>
540 * decl2.c (import_export_class): Invoke the
541 import_export_class field in the gcc_target structure if it is not
544 2004-06-30 Richard Henderson (rth@redhat.com>
546 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
547 * method.c (use_thunk): Likewise.
549 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
551 * call.c (build_over_call), typeck.c (build_function_call): Call
552 check_function_arguments instead of check_function_format.
554 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
556 * call.c (build_over_call), typeck.c (build_function_call): Update
557 calls to check_function_format.
559 2004-06-30 Richard Henderson <rth@redhat.com>
561 * call.c (build_over_call): Use __builtin_memcpy for copying
562 CLASS_AS_BASE rather than funny casting.
564 2004-06-30 Richard Henderson <rth@redhat.com>
566 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
567 TYPE_SIZE_UNIT of full_type.
569 2004-06-30 Per Bothner <per@bothner.com>
571 Conditionally compile support for --enable-mapped_location.
572 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
573 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
574 adjustments - which I don't understand.
575 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
576 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
577 (print_instantiation_partial_context): Use expand_location.
578 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
579 * name-lookup.c: Likewise.
580 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
581 * name-lookup.c: Use input_line macro.
582 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
583 (cp_parser_statement): Rename locaal variable statement_locus to
584 statement_location and use SET_EXPR_LOCATION macro.
585 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
586 * tree.c (cp_walk_subtrees): Likewise.
588 2004-06-29 Per Bothner <per@bothner.com>
590 * tree.c (build_min_nt, build_min, build_min_non_dep):
591 Don't set TREE_COMPLEXITY from input_line.
593 2004-06-29 Paul Brook <paul@codesourcery.com>
595 * init.c: Include target.h.
596 (get_cookie_size): Remove and replace with target hook.
598 (build_new_1): Store the element size in the cookie.
600 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
603 * parser.c (cp_parser_template_declaration_after_export): Disable
604 access checks here ...
605 (cp_parser_class_specifier): ... not here.
607 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
609 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
610 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
611 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
614 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
616 * cp-tree.h (struct deferred_access): Move to ...
617 * semantics.c (struct deferred_access): ... here. Adjust.
618 (deferred_access_stack): Make a VEC(deferred_access),
619 (deferred_access_free_list): Remove.
620 (deferred_access_no_check): New.
621 (push_deferring_access_checks, resume_deferring_access_checks,
622 stop_deferring_access_checks, pop_deferring_access_checks,
623 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
624 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
626 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
629 * call.c (build_temp): Declare.
630 (check_constructor_callable): New.
631 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
632 CONSTRUCTOR_CALLABLE.
633 (convert_like_real, initialize_reference): Use
634 check_constructor_callable.
635 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
636 (LOOKUP_*): Renumber.
638 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
640 * friend.c (add_friend): Only perform access checks when context
642 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
643 * parser.c (cp_parser_class_specifier): Disable access checks here
644 when parsing the body of a templated class.
645 * semantics.c (perform_or_defer_access_checks): Reorder to allow
646 NULL binfos when not checking access.
648 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
650 Use vector API for vbase list.
651 * cp-tree.h: Include vec.h
652 (DEF_VEC_P (tree)): New type.
653 (struct lang_type_class): Change vbase's member type.
654 (binfo_for_vbase): Declare.
655 * class.c (determine_primary_base, base_derived_from,
656 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
657 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
658 build_vtbl_initializer): Adjust.
659 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
661 * init.c (sort_mem_initializers, expand_member_init,
662 push_base_cleanups): Adjust.
663 * method.c (do_build_copy_constructor): Adjust.
664 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
665 (binfo_for_vbase): New.
666 * tree.c (copy_base_binfos): Adjust.
668 2004-06-28 Mark Mitchell <mark@codesourcery.com>
670 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
672 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
675 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
676 paranthesis in case of pointers to array members.
677 * error.c (dump_type_prefix): Likewise.
678 (dump_type_suffix): Maybe issue a whitespace when printing
681 2004-06-27 Mark Mitchell <mark@codesourcery.com>
684 * parser.c (cp_parser_set_decl_spec_type): Refine test for
685 redefinition of built-in types.
687 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
689 * error.c (pp_template_argument_list_start): Remove.
690 (pp_template_argument_list_end): Likewise.
691 (pp_separate_with_comma): Use pp_cxx_separate_with.
692 (reinit_global_formatting_buffer): Remove.
693 (pp_non_consecutive_character): Likewise.
694 (dump_scope): Use pp_cxx_colon_colon.
695 (dump_template_parameter): Use pp_cxx_identifier,
696 pp_cxx_tree_identifier and pp_cxx_whitespace.
697 (dump_templat_bindings): Replace use of pp_string with sequence
698 of pp_cxx_whitespace and pp_equal.
699 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
700 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
702 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
703 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
704 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
705 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
706 pp_cxx_right_bracket, pp_cxx_identifier throughout,
707 (dump_decl): Likewise.
708 (dump_template_decl): Likewise.
709 (dump_function_decl): Likewise. Set padding as appropriate.
710 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
712 (dump_exception_spec): Likewise.
713 (dump_function_name): Use pp_cxx_tree_identifier and
715 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
716 pp_cxx_end_template_argument_list.
717 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
718 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
719 pp_cxx_whitespace throughout.
720 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
722 (dump_unary_op): Likewise.
723 (reinit_cxx_pp): New function.
724 (type_as_string); Use it.
725 (expr_as_string): Likewise.
726 (decl_as_string); Likewise.
727 (context_as_string): Likewise.
728 (lang_decl_name): Likewise.
729 (decl_to_string): Likewise.
730 (expr_to_string): Likewise.
731 (parm_to_string): Likewise.
732 (type_to_string): Likewise.
733 (args_to_string): Likewise.
734 (cv_to_string): Likewise.
736 2004-06-26 Mark Mitchell <mark@codesourcery.com>
738 * cp-tree.h (cp_cv_quals): New type.
739 (cp_declarator): Use it instead of "tree" as appropriate.
740 (grok_method_quals): Adjust prototype.
741 (grokclassfn): Likewise.
742 (do_friend): Likewise.
743 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
744 (grokdeclarator): Likewise.
745 * decl2.c (grok_method_quals): Likewise.
746 (grokclassfn): Likewise.
747 * friend.c (do_friend): Likewise.
748 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
749 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
750 (make_pointer_declarator): Likewise.
751 (make_reference_declarator): Likewise.
752 (make_ptrmem_declarator): Likewise.
753 (cp_parser_ptr_operator): Likewise.
754 (cp_parser_cv_qualifier_seq_opt): Likewise.
755 (cp_parser_cv_qualifier_opt): Remove.
756 (cp_parser_new_declarator_opt): Adjust call to
757 cp_parser_ptr_operator.
758 (cp_parser_conversion_declaration_opt): Likewise.
759 (cp_parser_declarator): Use cp_cv_quals, not tree.
760 (cp_parser_direct_declarator): Likewise.
762 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
764 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
765 Rename DECL_STMT to DECL_EXPR.
766 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
767 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
768 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
770 2004-06-26 Jan Hubicka <jh@suse.cz>
773 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
774 reachability analysis.
776 2004-06-25 Mark Mitchell <mark@codesourcery.com>
778 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
781 2004-06-25 Paul Brook <paul@codesourcery.com>
783 * decl2.c (get_guard): Call targetm.cxx.guard_type.
784 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
786 2004-06-24 Mark Mitchell <mark@codesourcery.com>
788 * decl.c (grokdeclarator): Restore error messages about __thread.
789 * parser.c (cp_parser_decl_specifier_seq): Likewise.
791 2004-06-24 Jason Merrill <jason@redhat.com>
794 * decl.c (grokparms): Give the PARM_DECL reference type if the
795 parameter is passed by invisible reference.
797 2004-06-24 Andreas Schwab <schwab@suse.de>
799 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
801 2004-06-23 Mark Mitchell <mark@codesourcery.com>
803 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
804 (cp/decl.o): Likewise.
805 (cp/decl2.o): Likewise.
807 (cp/semantics.o): Likewise.
808 * config-lang.in (gtfiles): Do not reference cp/lex.h.
809 * class.c: Do not include lex.h.
810 (add_implicitly_declared_members): Do not use
811 adding_implicit_members.
812 (check_bases_and_members): Do not talk about grok_x_components.
813 * cp/cp-tree.h (adding_implicit_members): Remove.
814 (cp_storage_class): New type.
815 (cp_decl_spec): Likewise.
816 (cp_decl_specifier_seq): Likewise.
817 (cp_parameter_declarator): Use it for the decl_specifiers field.
818 (check_tag_decl): Adjust prototype.
819 (shadow_tag): Likewise.
820 (groktypename): Likewise.
821 (start_decl): Likewise.
822 (start_function): Likewise.
823 (start_method): Likewise.
824 (grok_x_components): Remove.
825 (grokfield): Adjust prototype.
826 (grokbitfield): Likewise.
827 (finish_member_class_template): Remove.
828 * decl.c: Do not include lex.h.
829 (adding_implicit_members): Do not define.
830 (check_tag_decl): Do not use trees to represent decl-specifiers.
831 (shadow_tag): Likewise.
832 (groktypename): Likewise.
833 (start_decl): Likewise.
834 (grokvardecl): Likewise.
835 (grokdeclarator): Likewise.
836 (grokparms): Likewise.
837 (start_function): Likewise.
838 (start_method): Likewise.
839 * decl.h (grokdeclarator): Adjust prototype.
840 * decl2.c: Do not include lex.h.
841 (grok_x_components): Remove.
842 (grokfield): Do not use trees to represent decl-specifiers.
843 (grokbitfield): Likewise.
844 * lex.c: Do not include lex.h.
846 * parser.c: Include target.h.
847 (clear_decl_specs): New function.
848 (cp_parser_translation_unit): Do not use trees to represent
850 (cp_parser_postfix_expression): Likewise.
851 (cp_parser_new_type_id): Likewise.
852 (cp_parser_condition): Likewise.
853 (cp_parser_simple_declaration): Likewise.
854 (cp_parser_decl_specifier_seq): Likewise.
855 (cp_parser_function_specifier_opt): Likewise.
856 (cp_parser_conversion_type_id): Likewise.
857 (cp_parser_template_parameter): Likewise.
858 (cp_parser_explicit_instantiation): Likewise.
859 (cp_parser_type_specifier): Likewise.
860 (cp_parser_simple_type_specifier): Likewise.
861 (cp_parser_init_declarator): Likewise.
862 (cp_parser_type_id): Likewise.
863 (cp_parser_type_specifier_seq): Likewise.
864 (cp_parser_parameter_declaration): Likewise.
865 (cp_parser_member_declaration): Likewise.
866 (cp_parser_exception_declaration): Likewise.
867 (cp_parser_function_definition_from_specifiers_and_declarator):
869 (cp_parser_single_declaration): Likewise.
870 (cp_parser_save_member_function_body): Likewise.
871 (cp_parser_friend_p): Likewise.
872 (cp_parser_set_storage_class): New function.
873 (cp_parser_set_decl_spec_type): Likewise.
874 * pt.c: Do not include lex.h.
875 * semantics.c: Likewise.
876 (finish_member_class_template): Remove.
878 2004-06-23 Roger Sayle <roger@eyesopen.com>
880 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
881 longer take both "args" and "convert_args" as arguments.
882 (build_op_delete_call): Update call to build_cxx_call.
883 (build_over_call): Likewise, update call to build_cxx_call.
884 * cp-tree.h (build_cxx_call): Update funtion prototype.
885 * typeck.c (build_function_call): Don't call expand_tree_builtin.
886 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
887 (throw_bad_typeid): Likewise.
888 (build_dynamic_cast_1): Likewise.
890 2004-06-22 Richard Henderson <rth@redhat.com>
892 * class.c (build_vfn_ref): Take a pointer not object. Build
894 (cp_fold_obj_type_ref): New.
895 * call.c (build_over_call): Update build_vfn_ref call.
896 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
897 * cp-tree.h (cp_fold_obj_type_ref): Declare.
899 2004-06-21 Jason Merrill <jason@redhat.com>
902 * cp-gimplify.c (cp_gimplify_init_expr): Look through
905 2004-06-21 Mark Mitchell <mark@codesourcery.com>
907 * cp-tree.def (NEW_EXPR): Add a fourth slot.
908 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
909 (TREE_PARMLIST): Likewise.
910 (CALL_DECLARATOR_PARMS): Likewise.
911 (CALL_DECLARATOR_QUALS): Likewise.
912 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
913 (cp_declarator_kind): New type.
914 (cp_parameter_declarator): Likewise.
915 (cp_declarator): Likewise.
916 (cp_error_declarator): Likewise.
917 (no_parameters): Likewise.
918 (groktypename): Change prototype.
919 (start_decl): Likewise.
920 (start_handler_parms): Likewise.
921 (get_scope_of_declarator): Likewise.
922 (start_function): Likewise.
923 (start_preparsed_function): New function.
924 (start_function): Change prototype.
925 (start_method): Likewise.
926 (grokfield): Likewise.
927 (grokbitfield): Likewise.
928 (build_new): Likewise.
929 (make_pointer_declarator): Remove.
930 (make_reference_declarator): Likewise.
931 (make_call_declarator): Likewise.
932 (set_quals_and_spec): Likewise.
933 (process_template_parm): Change prototype.
934 (begin_function_definition): Remove.
935 (finish_parmlist): Remove.
936 * decl.c (groktypename): Do not use trees to represent
938 (start_decl): Likewise.
939 (start_handler_parms): Remove.
940 (get_scope_of_declarator): Reimplement.
941 (grokdeclarator): Do not use trees to represent declarators.
942 (grokparms): Likewise.
943 (start_function): Likewise.
944 (start_method): Likewise.
945 (build_void_list_mode): Do not use TREE_PARMLIST.
946 * decl.h (grokdeclarator): Change prototype.
947 * decl2.c (grok_method_quals): Robustify.
948 (grok_x_components): Do not use trees to represent declarators.
949 (grokfield): Likewise.
950 (grokbitfield): Likewise.
951 (start_objects): Build FUNCTION_DECLs, not declarators.
952 (start_static_storage_duration_function): Likewise.
953 * init.c (build_new): Simplify.
954 * lex.c (make_pointer_declarator): Remove.
955 (make_reference_declarator): Likewise.
956 (make_call_declarator): Likewise.
957 (set_quals_and_spec): Likewise.
958 * method.c (use_thunk): Use start_preparsed_function.
959 (synthesize_method): Likewise.
960 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
961 * optimize.c (maybe_clone_body): Use start_preparsed_function.
962 * parser.c (cp_error_declarator): New variable.
963 (declarator_obstack): Likewise.
964 (alloc_declarator): New function.
965 (make_declarator): Likewise.
966 (make_id_declarator): Likewise.
967 (make_pointer_declarator): Likewise.
968 (make_reference_declarator): Likewise.
969 (make_ptrmem_declarator): Likewise.
970 (make_call_declarator): Likewise.
971 (make_array_declarator): Likewise.
972 (no_parameters): New variable.
973 (make_parameter_declarator): Likewise.
974 (cp_parser_check_for_definition_in_return_type): Do not use trees
975 to represent declarators.
976 (cp_parser_translation_unit): Likewise.
977 (cp_parser_new_expression): Likewise.
978 (cp_parser_new_type_id): Likewise.
979 (cp_parser_new_declarator_opt): Likewise.
980 (cp_parser_direct_new_declarator): Likewise.
981 (cp_parser_condition): Likewise.
982 (cp_parser_declaration_statement): Likewise.
983 (cp_parser_declaration): Likewise.
984 (cp_parser_conversion_type_id): Likewise.
985 (cp_parser_conversion_declarator_opt): Likewise.
986 (cp_parser_template_parameter_list): Likewise.
987 (cp_parser_template_parameter): Likewise.
988 (cp_parser_explicit_instantiation): Likewise.
989 (cp_parser_init_declarator): Likewise.
990 (cp_parser_declarator): Likewise.
991 (cp_parser_direct_declarator): Likewise.
992 (cp_parser_type_id): Likewise.
993 (cp_parser_parameter_declaration_clause): Likewise.
994 (cp_parser_parameter_declaration_list): Likewise.
995 (cp_parser_parameter_declaration): Likewise.
996 (cp_parser_member_declaration): Likewise.
997 (cp_parser_exception_declaration): Likewise.
998 (cp_parser_check_declarator_template_parameters): Likewise.
999 (cp_parser_function_definition_from_specifiers_and_declarator):
1001 (cp_parser_save_member_function_body): Likewise.
1002 * pt.c (process_template_parm): Add is_non_type parameter.
1003 (convert_template_argument): Adjust call to groktypename.
1004 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1005 (tsubst): Do not expect declarators.
1006 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1008 (instantiate_decl): Use start_preparsed_function.
1009 * semantics.c (begin_function_definition): Remove.
1010 (finish_parmlist): Remove.
1011 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1014 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1016 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1017 (build_new_method_call): Likewise.
1018 * decl.c (local_variable_p_walkfn): Don't walk into types.
1019 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1020 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1021 * init.c (buld_new): Add new operand for ARRAY_REF.
1022 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1023 (do_build_assign_ref): Likewise.
1024 * parser.c (cp_parser_direct_new_declarator): Add new operands
1026 (cp_parser_direct_declarator): Likewise.
1027 * pt.c (tsubst): Likewise.
1028 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1030 * semantics.c (finish_non_static_data_member): Add new operand
1032 * typeck.c (build_class_member_access_expr): Likewise.
1033 (build_class_member_access_expr, finish_class_member_access_expr):
1035 (build_ptrmemfunc_access_expr): Likewise.
1036 (build_array_ref): Add new operands for ARRAY_REF.
1037 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1038 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1040 2004-06-21 Richard Henderson <rth@redhat.com>
1042 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1043 * parser.c (cp_parser_jump_statement): Update commentary.
1044 * pt.c (tsubst_expr): Use RETURN_EXPR.
1045 * semantics.c (finish_return_stmt): Likewise.
1046 (finalize_nrv_r): Likewise.
1047 * typeck.c, typeck2.c: Update file start commentary.
1049 2004-06-21 Richard Henderson <rth@redhat.com>
1051 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1053 2004-06-20 Richard Henderson <rth@redhat.com>
1055 * cp-tree.h (add_decl_stmt): Declare.
1056 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1057 * semantics.c (maybe_cleanup_point_expr): New.
1058 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1059 finish_for_expr, finish_switch_cond): Use it.
1060 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1062 2004-06-20 Richard Henderson <rth@redhat.com>
1064 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1065 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1066 (cp_gimplify_expr): Call it.
1067 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1068 (cp_genericize): New.
1069 * decl.c (finish_function): Call it.
1070 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1071 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1072 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1073 (cp_genericize): Declare.
1074 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1075 * dump.c (cp_dump_tree): Likewise.
1076 * semantics.c (push_cleanup): Move from c-semantics.c.
1078 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1080 * cp-lang.c (has_c_linkage): Implement.
1082 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1083 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1084 (builtin_function_1): Don't call make_decl_rtl.
1085 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1086 (grokvardecl): Don't call mangle_decl.
1087 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1088 DECL_ASSEMBLER_NAME.
1089 * method.c (set_mangled_name_for_decl): Delete.
1090 * name-lookup.c (pushdecl): When a local extern shadows a
1091 file-scope declaration of the same object, give both DECLs the
1093 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1094 on DECL_ASSEMBLER_NAME.
1096 2004-06-19 Richard Henderson <rth@redhat.com>
1098 * cp-gimplify.c: Remove unnecessary prototypes.
1099 (cp_gimplify_stmt): Merge into ...
1100 (cp_gimplify_expr): ... here. Move to end of file. Handle
1101 stmts_are_full_exprs_p frobbing.
1102 * cp-tree.h (cp_gimplify_stmt): Remove.
1103 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1104 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1106 2004-06-18 Richard Henderson <rth@redhat.com>
1109 * semantics.c (begin_cond): New.
1110 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1111 Assume that non-template decls go land before the conditional.
1112 (simplify_loop_decl_cond): Likewise.
1113 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1114 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1115 begin_switch_stmt, finish_switch_cond): Update to match.
1117 2004-06-17 Jason Merrill <jason@redhat.com>
1120 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1121 (finish_stmt_expr_expr): Update type after conversions.
1122 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1123 Handle void initializer.
1124 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1126 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1128 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1129 * cp-tree.h (defer_fn): Delete.
1130 * decl2.c (defer_fn): Delete.
1131 (finish_file): Simplify deferred_fns loops; check that
1132 only used inline functions get into deferred_fns.
1133 (mark_used): Inline previous contents of defer_fn.
1135 2004-06-16 Richard Henderson <rth@redhat.com>
1137 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1138 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1139 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1140 of CTOR_INITIALIZER ...
1141 (pp_cxx_statement): ... here.
1142 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1143 (finish_function): Use alloc_stmt_list to zap entire function.
1144 * parser.c (cp_parser_compound_statement): Update commentary.
1145 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1146 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1147 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1149 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1151 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1153 2004-06-16 Richard Henderson <rth@redhat.com>
1155 * parser.c (cp_parser_labeled_statement): Update commentary.
1156 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1157 * tree.c (mark_local_for_remap_r): Likewise.
1159 2004-06-16 Richard Henderson <rth@redhat.com>
1161 * parser.c (cp_parser_asm_definition): Update commentary.
1162 * pt.c (tsubst_expr): Use ASM_EXPR.
1163 * semantics.c (finish_asm_stmt): Likewise.
1165 2004-06-16 Richard Henderson <rth@redhat.com>
1167 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1168 * parser.c (cp_parser_statement): Update commentary.
1169 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1170 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1171 * tree.c (mark_local_for_remap_r): Likewise.
1173 2004-06-16 Richard Henderson <rth@redhat.com>
1176 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1177 statement in FOR_INIT_STMT for templates.
1179 2004-06-15 Richard Henderson <rth@redhat.com>
1181 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1182 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1183 (genericize_try_block): Use gimplify_stmt.
1184 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1185 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1186 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1187 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1188 (cp_tree_chain_matters_p): Remove.
1189 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1190 (COMPOUND_STMT_BODY_BLOCK): New.
1191 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1192 (EXPR_STMT_STMT_EXPR_RESULT): New.
1193 (building_stmt_tree): Check cur_stmt_list.
1194 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1195 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1196 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1197 (cp_finish_decl): Use push_cleanup.
1198 (start_function, finish_function): Use statement lists.
1199 (finish_stmt): Do nothing.
1200 * except.c (begin_eh_spec_block): Use statement lists.
1201 (check_handlers_1, check_handlers): Likewise.
1202 * init.c (construct_virtual_base): Don't add extra compound stmts.
1203 (build_vec_init): Likewise.
1204 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1205 * name-lookup.h (struct cp_binding_level): Add statement_list.
1206 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1207 (cp_parser_labeled_statement, cp_parser_expression_statement,
1208 cp_parser_statement_seq_opt): Likewise.
1209 (cp_parser_compound_statement): Likewise. Take bool for try block.
1210 (cp_parser_selection_statement): Tidy if processing.
1211 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1212 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1213 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1214 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1215 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1216 (finish_cond): New, rewritten from FINISH_COND.
1217 (simplify_loop_decl_cond): New.
1218 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1219 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1220 begin_else_clause, finish_else_clause, finish_if_stmt,
1221 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1222 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1223 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1224 finish_switch_cond, finish_switch_stmt, begin_try_block,
1225 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1226 finish_handler_sequence, finish_function_handler_sequence,
1227 begin_handler, finish_handler_parms, finish_handler,
1228 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1229 using statement lists.
1230 (begin_compound_stmt): Replace has_no_scope argument with flags.
1231 Update all callers. Use statement lists.
1232 (finish_compound_stmt): Likewise.
1233 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1234 (current_scope_stmt_stack): Remove.
1235 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1236 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1237 Rewrite with statement lists.
1239 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1241 * parser.c: Change all assignments of c_lex_string_translate
1242 to true and false to 1 and 0.
1243 (cp_lexer_read_token): Convert type of the translated string.
1244 (cp_parser_skip_to_closing_parentheses): Preserve original
1245 value of c_lex_string_translate, and set it to -1 while
1247 (cp_parser_cache_group): Likewise.
1248 (cp_parser_cache_group_1): Renamed.
1249 (cp_parser_asm_operand_list): Remove redundant setting of
1250 c_lex_string_translate.
1251 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1252 Handle chained strings.
1254 2004-06-12 Andrew Pinski <apinski@apple.com>
1258 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1260 * cp-tree.h: Fix typo.
1262 * cp-tree.h: Include cgraph.h
1263 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1264 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1266 2004-06-12 Jason Merrill <jason@redhat.com>
1268 PR tree-optimization/14107
1269 * decl.c (finish_function): Warn about no return in all functions.
1271 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1273 * cp-tree.h (struct language_function): Remove cannot_inline.
1274 * decl.c (save_function_data): cannot_inline is no more.
1275 (cxx_push_function_context): Likewise.
1276 * decl2.c (start_objects, start_static_storage_duration_function):
1277 Reset DECL_INLINE, set DECL_UNINLINABLE.
1279 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1282 * search.c (lookup_field): Propagate the ambiguity list.
1283 (lookup_fnfields): Likewise.
1285 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1288 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1289 template keyword to disambiguate.
1291 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1294 * decl.c (grokdeclarator): Ignore pointer-to-members when
1295 computing template depth.
1298 * name-lookup.c (pushtag): Do not try to put class declarations in
1299 explicit specialization scopes.
1301 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1303 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1305 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1308 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1309 bindings for undeclared built-ins.
1311 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1313 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1314 appear at the correct location.
1316 2004-06-10 Jason Merrill <jason@redhat.com>
1320 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1321 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1322 TREE_TYPE for non-dependent names.
1323 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1324 unknown_type_node as its TREE_TYPE.
1325 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1326 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1327 (dump_expr) <SCOPE_REF case>: Likewise.
1329 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1332 * parser.c (cp_parser_direct_declarator): Robustify.
1335 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1336 constants in non-dependent contexts.
1340 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1343 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1346 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1349 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1353 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1354 * lex.c (handle_pragma_interface): Deprecate.
1355 (handle_pragma_implementation): Likewise.
1357 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1359 * g++spec.c (lang_specific_driver): Remove check for -lm
1360 and -lmath when check it see if it was the math library.
1362 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1365 * parser.c (cp_parser_direct_declarator): Reject constructor named
1366 as qualified template-id.
1368 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1371 * lex.c (handle_pragma_interface): Deprecate.
1372 (handle_pragma_implementation): Likewise.
1374 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1377 * parser.c (cp_parser_iteration_statement): Fix typo in error
1381 * pt.c (tsubst_default_argument): Do not defer access checks
1382 while substituting into the default argument.
1385 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1386 constant in a non-dependent context.
1389 * except.c (build_throw): Ensure that temp_expr has been
1392 2004-06-06 Roger Sayle <roger@eyesopen.com>
1394 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1396 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1399 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1400 'typename', and accept 'template'.
1402 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1403 Jan Hubicka <jh@suse.cz>
1406 * method.c (use_think): Do not mark thunk as referenced.
1408 2004-06-03 Matt Austern <austern@apple.com>
1411 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1412 is nonzero, and if we see a noninline definition of a key method,
1413 make the vtables nonweak.
1415 2004-06-02 Matt Austern <austern@apple.com>
1417 * cp-tree.h (instantiate_decl): new boolean parameter,
1418 undefined_ok. Current behavior is equivalent to its being 0.
1419 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1420 * pt.c (mark_decl_instantiated): Unconditionally make
1421 instantiations explicit unconditionally
1422 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1423 since mark_decl_instantiated now does it.
1424 (instantiate_class_member): New. Instantiate a member of an
1425 explicitly instantiated class template.
1426 (do_type_instantiation): Explicitly instantiate members of an
1427 explicitly instantiated class template.
1428 (instantiate_decl): if undefined_ok is nonzero, and if we're
1429 trying to explicitly instantiated a template with no definition,
1430 change it to an implicit instantiation.
1431 (instantiate_pending_templates): Add new argument to instantiate_decl.
1432 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1434 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1436 * cp-tree.h: Fix typo.
1438 * cp-tree.h: Include cgraph.h
1439 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1440 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1442 2004-06-01 Jason Merrill <jason@redhat.com>
1445 * call.c (call_builtin_trap): Remove type parm.
1446 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1447 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1449 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1452 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1453 TREE_TYPE for non-dependent names.
1454 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1455 unknown_type_node as its TREE_TYPE.
1456 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1457 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1458 (dump_expr) <SCOPE_REF case>: Likewise.
1460 2004-06-01 Richard Henderson <rth@redhat.com>
1461 Andrew Pinski <pinskia@physics.uc.edu>
1463 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1464 * parser.c (struct cp_parser): Remove in_offsetof.
1465 (cp_parser_new): Don't set it.
1466 (cp_parser_unary_expression): Don't check it.
1467 (cp_parser_postfix_open_square_expression): Split out from ...
1468 (cp_parser_postfix_expression): ... here.
1469 (cp_parser_postfix_dot_deref_expression): Likewise.
1470 (cp_parser_builtin_offsetof): New.
1471 (cp_parser_primary_expression): Use it.
1473 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1476 * parser.c (cp_parser_postfix_expression): Allow subscript
1477 operator in offsetof.
1479 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1482 * friend.c (add_friend): Do not try to perform access checks for
1483 functions from dependent classes.
1485 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1487 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1488 (pp_cxx_begin_template_argument_list): Turn into a function.
1489 (pp_cxx_end_template_argument_list): Likewise.
1490 (pp_cxx_separate_with): Define.
1491 (pp_cxx_unqualified_id): Tidy.
1492 (pp_cxx_primary_expression): Likewise.
1493 (pp_cxx_postfix_expression): Likewise.
1494 (pp_cxx_expression): Likewise.
1495 (pp_cxx_simple_type_specifier): Likewise.
1496 (pp_cxx_type_specifier_seq): Likewise.
1497 (pp_cxx_parameter_declaration_clause): Likewise.
1498 (pp_cxx_exception_specification): Likewise.
1499 (pp_cxx_direct_declarator): Likewise.
1500 (pp_cxx_type_id): Likewise.
1501 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1503 (pp_cxx_left_paren): Likewise.
1504 (pp_cxx_right_paren): Likewise.
1505 (pp_cxx_left_brace): Likewise.
1506 (pp_cxx_right_brace): Likewise.
1507 (pp_cxx_left_bracket): Likewise.
1508 (pp_cxx_right_bracket): Likewise.
1509 (pp_cxx_dot): Likewise.
1510 (pp_cxx_identifier): Likewise.
1511 (pp_cxx_tree_identifier): Likewise.
1512 (pp_cxx_ampersand): New macro.
1513 (pp_cxx_star): Likewise.
1514 (pp_cxx_arrow): Likewise.
1515 (pp_cxx_semicolon): Likewise.
1516 (pp_cxx_complement): Likewise.
1517 (pp_cxx_begin_template_argument_list): Declaree.
1518 (pp_cxx_end_template_argument_list): Likewise.
1519 (pp_cxx_colon_colon): likewise.
1521 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1523 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1526 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1528 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1529 typeck.c: Fix comment formatting.
1531 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1533 * cp-lang.c (cp_expand_decl): Remove.
1534 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1536 2004-05-30 Andreas Jaeger <aj@suse.de>
1538 * lang-specs.h: Add missing initializers for .ii.
1540 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1542 * decl.c (cp_make_fname_decl): Free return value from
1545 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1548 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1550 * init.c (build_new): Likewise.
1553 * name-lookup.c (arg_assoc): Robustify.
1556 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1557 when determining the scope to use for a pointer to member.
1558 (lookup_anon_field): Give it external linkage.
1559 * cp-tree.h (lookup_anon_field): Declare it.
1560 * expr.c (cplus_expand_constant): Use it.
1562 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1565 * parser.c (cp_parser_simple_type_specifier): Call
1566 maybe_note_name_used_in_class.
1568 2004-05-28 Tom Marshall <tmarshall@real.com>
1571 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1572 the class has friends.
1574 2004-05-27 Adam Nemet <anemet@lnxw.com>
1577 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1578 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1580 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1582 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1583 if it might be needed.
1584 * pt.c (mark_decl_instantiated): Only call defer_fn if
1585 the function actually needs processing in finish_file.
1586 * decl2.c (finish_file): Add check that elements in
1587 deferred_fns_used are really needed there. Remove unnecessary
1588 test of DECL_SAVED_TREE.
1590 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1592 * Make-lang.in: No need to specify $(LIBCPP).
1594 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1597 * parser.c (cp_parser_class_head): Robustify.
1600 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1602 (cp_parser_constructor_declarator_p): Treat attributes
1606 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1607 base classes in templates.
1609 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1612 * pt.c (instantiate_template): Robustify.
1614 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1617 * decl.c (xref_tag): Issue errors about redeclaring template
1618 classes as non-template classes.
1620 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1623 * name-lookup.c (supplement_binding): Allow redefinitions of
1627 * parser.c (cp_parser_template_argument): Robustify.
1629 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1631 * class.c (alter_access): Use %E format specifier to print an
1632 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1633 (push_lang_context): Likewise.
1634 * decl.c (lookup_label): Likewise.
1635 (grokdeclarator): Likewise.
1636 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1637 * pt.c (do_type_instantiation): Likewise.
1638 * tree.c (handle_java_interface_attribute): Likewise.
1639 (handle_com_interface_attribute): Likewise.
1640 (handle_init_priority_attribute): Likewise.
1642 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1646 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1647 recognized as overloaded functions.
1649 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1652 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1653 layout conflicts for unions.
1656 * typeck.c (build_x_unary_op): Instantiate template class
1657 specializations before looking for "operator &".
1660 * typeck.c (complete_type): Layout non-dependent array types, even
1664 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1667 2004-05-22 Roger Sayle <roger@eyesopen.com>
1669 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1670 returning when TREE_TYPE is error_mark_node.
1671 * typeck.c (require_complete_type): Return error_mark_node if
1672 value's type is an error_mark_node.
1674 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1676 * optimize.c (calls_setjmp_r): Remove.
1677 (calls_setjmp_p): Remove.
1678 * cp-tree.c (calls_setjmp_p): Remove.
1679 * decl.c (finish_function): Do not call calls_setjmp_p.
1681 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1683 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1684 * decl2.c (maybe_make_one_only): Likewise.
1685 * method.c (use_thunk): Likewise.
1687 2004-05-18 Jason Merrill <jason@redhat.com>
1689 * class.c (build_base_path): Tidy a bit.
1691 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1693 * name-lookup.c (struct scope_binding): New.
1694 (EMPTY_SCOPE_BINDING): New.
1695 (lookup_using_namespace): Take a scope_binding instead of a
1697 (qualified_lookup_using_namespace): Likewise.
1698 (cxx_binding_clear): Delete.
1699 (do_nonmember_using_decl): Use a scope_binding instead of a
1701 (lookup_tag): Don't call select_decl.
1702 (ambiguous_decl): Don't return anything (and change callers to match).
1703 Take a scope_binding as the second parameter.
1704 (lookup_namespace_name): Use a scope_binding instead of a
1706 (unqualified_namespace_lookup): Likewise.
1707 (lookup_qualified_name): Likewise.
1708 (select_decl): Take a scope_binding instead of a cxx_binding.
1709 Use macros rather than hand-coding tests for type-ness.
1711 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1713 * cp-gimplify.c: Rename from cp-simplify.c.
1714 * Make-lang.in, optimize.c: Update.
1716 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1718 Merge from tree-ssa-20020619-branch. See
1719 ChangeLog.tree-ssa for details.
1721 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1722 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1723 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1724 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1726 * cp-mudflap.c: New file.
1727 * cp-simplify.c:: New file.
1729 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1732 * decl2.c (check_classfn): For member templates, compare also the
1733 template parameters to match the declaration.
1734 * cp-tree.h: Adjust declaration of check_classfn.
1735 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1736 * friend.c (do_friend): Likewise.
1737 * pt.c (tsubst_friend_function): Likewise.
1739 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1741 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1742 Instead, dig into the representation type to find the array bound.
1744 2004-04-30 Jason Merrill <jason@redhat.com>
1746 Refer to base members using COMPONENT_REFs where possible.
1747 * class.c (build_simple_base_path): New fn.
1748 (build_base_path): Use it for non-virtual base references.
1749 (layout_class_type): Change base fields to their real type
1750 after layout is done.
1751 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1752 * cp-lang.c (cxx_get_alias_set): Use it.
1754 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1756 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1759 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1762 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1763 used in integral constant expressions.
1765 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1767 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1770 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1772 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1773 * decl.c (reshape_init): Use it.
1774 * init.c (perform_member_init): Remove redundant condition.
1775 (build_aggr_init): Adjust to handle brace-enclosed initializers
1777 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1779 * parser.c (cp_parser_initializer_clause): Do not set
1780 TREE_HAS_CONSTRUCTOR on the initializer.
1781 * rtti.c (tinfo_base_init): Likewise.
1782 (generic_initializer): Likewise.
1783 (ptr_initializer): Likewise.
1784 (ptm_initializer): Likewise.
1785 (class_initializer): Likewise.
1786 (get_pseudo_ti_init): Likewise.
1787 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1789 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1791 * name-lookup.c (anonymous_namespace_name): Make static.
1793 2004-04-19 Roger Sayle <roger@eyesopen.com>
1796 * class.c (build_base_path): Call fold whilst building the NULL
1797 pointer check expression trees.
1799 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1801 * init.c (build_new_1): Don't use type size argument for Java
1802 _Jv_AllocObject call.
1804 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1806 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1807 declaration and definition.
1809 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1812 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1813 than ASM_OUTPUT_DEF.
1815 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1817 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1818 current_function_decl == NULL.
1820 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1823 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1826 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1828 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1830 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1831 or TREE_SIDE_EFFECTS of a type.
1833 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1836 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1837 cv-qualifier unification.
1838 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1840 2004-04-02 Jan Hubicka <jh@suse.cz>
1842 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1843 * cp-tree.h (cp_update_decl_after_saving): Declare.
1844 * tree.c (cp_update_decl_after_saving): Define.
1846 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1849 * typeck.c (get_delta_difference): Call fold before returning the
1852 2004-04-01 Richard Henderson <rth@redhat.com>
1855 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1856 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1858 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1861 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1863 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1865 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1867 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1869 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1870 * class.c (check_bitfield_decl): Likewise.
1871 * cvt.c (type_promotes_to): Likewise.
1872 * decl.c (finish_enum): Likewise.
1873 * mangle.c (write_builtin_type): Likewise.
1874 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1875 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1876 (build_binary_op): Likewise.
1878 2004-03-31 Jan Hubicka <jh@suse.cz>
1880 * tree.h (optimize_function): Kill prototype.
1881 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1882 * semantics.c (expand_body): Kill.
1884 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1887 * decl.c (start_decl_1): Do not decide whether or not to create a
1888 new cleanup level until after the type has been completed.
1891 * pt.c (tsubst_default_argument): Clear current_function_decl.
1893 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1895 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1897 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1899 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1900 is null, just print the literal name and return.
1902 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1904 * cxx-pretty-print.c: Fix comment typos.
1906 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1908 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1911 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1913 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1914 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1917 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1919 PR 12267, 12391, 12560, 13129, 14114, 14133
1920 * cp-lang.c (c_reset_state): Delete.
1921 (push_file_scope, pop_file_scope): New stubs.
1922 * parser.c (c_parse_file): Call sorry() here if called more than once.
1924 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1926 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1929 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1931 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1933 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1935 * error.c (enum pad): Remove.
1936 (dump_qualifiers): Likewise.
1937 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1938 (dump_aggr_type): Likewise.
1939 (dump_type_suffix): Likewise.
1940 (dump_simple_decl): Likewise.
1941 (dump_function_decl): Likewise.
1942 (cv_to_string): Likewise.
1943 (dump_type_prefix): Likewise. Adjust return void.
1944 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1946 (pp_cxx_template_keyword_if_needed): Document.
1947 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1948 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1949 MUST_NOT_THROW_EXPR.
1951 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1954 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1955 templates, if their type is non-dependent.
1957 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1959 * call.c (build_op_delete_call): Do not forget the placement
1960 arguments when iterating through mutiple delete operators.
1962 * cp-tree.h (svaed_scope): Remove last_parms.
1963 (NEW_DELETE_OPNAME_P): New macro.
1964 (last_function_parms): Remove.
1965 (do_friend): Adjust prototype.
1966 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1967 using last_function_parms.
1968 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1969 using last_function_parms.
1970 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1971 for class-specific operator new and operator delete.
1972 (grok_op_properties): Do not look for allocation functions with
1974 (start_function): Use DECL_ARGUMENTS instead of
1975 last_function_parms.
1976 * decl.h (last_function_parms): Do not declare.
1977 * decl2.c (grokclassfn): Do not use last_function_parms.
1978 * friend.c (do_friend): Remove parmdecls parameter.
1979 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1980 (pop_from_top_level): Do not restore it.
1981 * pt.c (check_explicit_specialization): Do not adjust
1982 last_function_parms.
1984 * name-lookup.c (do_local_using_decl): Create a local binding for
1985 types brought in via using declarations.
1987 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1988 function declarations correctly.
1990 * semantics.c (finish_id_expression): Correct handling of
1991 conversion operators to dependent types.
1993 * typeck.c (lookup_destructor): Allow the use of destructors from
1996 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1998 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1999 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2000 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2001 the field is named TEMPLATE_TYPE_PARM_INDEX.
2003 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2006 * parser.c (cp_parser_functional_cast): A cast to anything
2007 but integral or enumaration type is not an integral constant
2009 * pt.c (value_dependent_expression_p): Handle cast expressions
2010 without operands (such as "int()").
2012 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2014 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2015 cv-qualification between the type named by the
2016 pseudo-destructor-name and the object-type.
2018 * search.c (accessible_base_p): Handle non-proper bases.
2020 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2021 refers to a single overloaded function, set the type of the
2023 * tree.c (lvalue_type): Simplify.
2024 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2026 (build_unary_op): Handle OVERLOADs with known types.
2028 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2031 * parser.c (cp_parser_postfix_expression): Handle the use of
2032 "typename" in non-dependent contexts. Convert appropriately when
2033 when using a qualified name after "->" or ".".
2035 * call.c (conditional_conversion): Honor the requirement that some
2036 conversions refer to the original object.
2038 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2040 * call.c (build_conditional_expr): Do not call force_rvalue for
2041 operands of void_type when the conditional expression itself has
2043 * name-lookup.c (pushdecl): Don't consider a declaration of a
2044 function named "main" to be an overload of a type named "main".
2045 * parser.c (cp_parser_template_name): Perform name lookup when the
2046 template name is proceeded by "template" if the qualifying scope
2048 * typeck.c (composite_pointer_type_r): Correctly handle
2049 pointer-to-member types.
2050 (build_const_cast): Likewise.
2052 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2054 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2055 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2056 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2057 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2058 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2059 (TYPEOF_TYPE_EXPR): New macro.
2060 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2061 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2062 * pt.c (tsubst): Likewise.
2063 * semantics.c (finish_typeof): Likewise.
2064 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2065 and TEMPLATE_TYPE_PARM.
2066 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2067 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2069 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2072 * cp-tree.h (build_new_op): Change prototype.
2073 (build_x_binary_op): Likewise.
2074 * call.c (build_new_op): Add overloaded_p parameter.
2075 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2076 * parser.c (cp_parser_binary_expression): Note that uses of
2077 overloaded operators prevents an expression from being considered
2078 an integral constant.
2079 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2081 * semantics.c (finish_call_expr): Likewise.
2082 * typeck.c (rationalize_conditional_expr): Likewise.
2083 (build_x_indirect_ref): Likewise.
2084 (build_x_binary_op): Likewise.
2085 (build_x_unary_op): Likewise.
2086 (build_x_compound_expr): Likewise.
2087 (build_modify_expr): Likewise.
2088 * typeck2.c (build_x_arrow): Likewise.
2090 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2092 * cp-lang.c, ptree.c: Update copyright.
2094 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2097 * parser.c (cp_parser_non_integral_constant_expression): Encode
2098 more of the idiom that surrounded calls to this function within
2100 (cp_parser_primary_expression): Adjust accordingly.
2101 (cp_parser_postfix_expression): Likewise.
2102 (cp_parser_unary_expression): Likewise.
2103 (cp_parser_cast_expression): Likewise.
2104 (cp_parser_assignment_expression): Likewise.
2105 (cp_parser_expression): Likewise.
2106 (cp_parser_new_expression): Note that new-expressions are not
2107 allowed in integral constant expressions.
2108 (cp_parser_delete_expression): Likewise.
2110 2004-03-12 Matt Austern <austern@apple.com>
2112 * decl2.c (maybe_make_one_only): Look at
2113 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2114 to make an explicit instantiation weak.
2115 * method.c (use_thunk): Make sure we call comdat_linkage
2117 * pt.c (do_type_instantiation): On systems where weak symbols
2118 don't go in a static archive's TOC, explicit instantiation of a
2119 class must imply *explicit* instantiation of its memeber.
2121 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2123 * call.c, cp-tree.h, pt.c: Fix comment typos.
2125 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2128 * decl.c (xref_tag): Disregard non-type declarations when
2129 looking up a tagged type.
2131 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2134 * call.c (convert_like_real): Build a const qualified temporary,
2135 when testing ctor access.
2137 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2139 * call.c (initialize_reference): Fix typo.
2141 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2144 * pt.c (determine_specialization): For member templates, match also
2148 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2150 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2152 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2155 * call.c (initialize_reference): Handle initializers that are
2156 class-member access expressions applies to rvalues.
2158 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2161 * name-lookup.c (supplement_binding): Ignore functions that are
2162 marked DECL_ANTICIPATED.
2164 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2167 * class.c (check_field_decls): Complain about non-static data
2168 members of reference type in unions. Propagate
2169 CLASSTYPE_REF_FIELDS_NEED_INIT and
2170 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2172 * init.c (perform_member_init): Complain about mbmers with const
2173 type that are not explicitly initialized.
2175 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2177 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2178 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2179 (lang_identifier): Remove implicit_decl and error_locus.
2180 (IDENTIFIER_IMPLICIT_DECL): Remove.
2181 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2182 (IDENTIFIER_ERROR_LOCUS): Likewise.
2183 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2184 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2185 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2186 (implicitly_declare): Remove.
2187 * decl.c (warn_extern_redeclared_static): Remove check of
2188 IDENTIFIER_IMPLICIT_DECL.
2189 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2190 (implicitly_declare): Remove.
2191 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2192 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2193 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2194 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2195 in the innermost scope, rather than at namespace scope.
2196 * name-lookup.c (push_local_binding): Give it external linkage.
2197 (pushdecl): Remove dead code.
2198 * name-lookup.h (push_local_binding): Declare it.
2199 * ptree.c (cxx_print_identifier): Don't print
2200 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2201 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2202 not IDENTIFIER_ERROR_LOCUS.
2203 * typeck.c (build_function_call): Remove dead code.
2205 2004-03-08 Jason Merrill <jason@redhat.com>
2208 * decl.c (xref_tag): Remove attribute handling.
2209 * cp-tree.h: Adjust prototype.
2210 * decl.c, parser.c, rtti.c: Adjust callers.
2211 * parser.c (cp_parser_class_head): Pass back attributes in the
2213 (cp_parser_class_specifier): Adjust.
2215 2004-03-08 Matt Austern <austern@apple.com>
2218 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2219 as static, to static_decls array.
2221 2004-03-05 Jason Merrill <jason@redhat.com>
2223 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2225 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2227 * decl.c (grokfndecl): Update old incorrect comment.
2228 (grokvardecl): Diagnose C++ variables of type with no linkage.
2230 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2233 * pt.c (build_non_dependent_expr): Do not create a
2234 NON_DEPENDENT_EXPR for a THROW_EXPR.
2236 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2239 * error.c (dump_expr): Handle THROW_EXPR.
2241 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2244 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2245 lookup if ordinary name-lookup finds a non-function.
2246 * pt.c (tsubst_copy_and_build): Likewise.
2249 * parser.c (cp_parser_late_parsing_default_args): Check that there
2250 are no extra tokens after the end of the default-argument
2253 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2256 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2257 having C++ linkage for name-mangling purposes.
2260 * parser.c (cp_parser_direct_declarator): Recognize constructor
2261 declarators that use a template-id to name the class being
2265 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2266 (tsubst_expr): Do not call tsubst_copy, even when
2267 processing_template_decl.
2269 2004-03-01 Jeff Law <law@redhat.com>
2271 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2274 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2277 * name-lookup.h (push_scope): Change prototype.
2278 * name-lookup.c (push_scope): Do not reenter the current class
2280 * decl.c (grokfndecl): Check return code from push_scope before
2282 * decl2.c (check_classfn): Likewise.
2283 * parser.c (cp_parser_conversion_function_id): Likewise.
2284 (cp_parser_init_declarator): Likewise.
2285 (cp_parser_direct_declarator): Likewise.
2286 (cp_parser_class_specifier): Likewise.
2287 (cp_parser_class_head): Likewise.
2288 (cp_parser_lookup_name): Likewise.
2289 (cp_parser_constructor_declarator_p): Likewise.
2290 * pt.c (instantiate_class_template): Likewise.
2291 (resolve_typename_type): Likewise.
2293 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2296 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2300 * class.c (update_vtable_entry_for_fn): Do not go through
2301 covariance machinery if the type returned by an overrider is the
2302 same as the original.
2304 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2306 * call.c: Fix a comment typo.
2308 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2310 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2312 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2315 * parser.c (cp_parser_parameter_declaration_list): Commit
2316 to fewer tentative parses.
2318 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2321 * pt.c (dependent_type_p_r): A template template parameter is a
2324 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2327 * mangle.c (write_template_arg_literal): Don't rely on identity for
2330 2004-02-24 Jason Merrill <jason@redhat.com>
2332 * tree.c (build_exception_variant): Use check_qualified_type.
2334 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2335 Kazu Hirata <kazu@cs.umass.edu>
2337 * decl.c (cxx_init_decl_processing): Don't check
2338 flag_writable_strings.
2340 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2343 * typeck.c (maybe_warn_about_returning_address_of_location):
2344 Change check for VAR_DECL to use DECL_P instead.
2346 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2349 * cvt.c (build_expr_type_conversion): Type must be complete before
2350 looking up for conversions.
2352 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2355 * name-lookup.c (arg_assoc_class): Don't look into template
2356 arguments if it is not a primary template.
2358 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2361 * method.c (use_thunk): Always clone function argument tree.
2363 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2366 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2369 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2370 for all type variants.
2372 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2375 * decl.c (duplicate_decls): Return error_mark_node for invalid
2377 * name-lookup.c (push_namespace): Ignore the return value from
2379 * pt.c (push_template_decl_real): Robustify.
2382 * name-lookup.c (push_class_level_binding): Do not complain about
2383 adding a binding for a member whose name is the same as the
2384 enclosing class if the member is located in a base class of the
2387 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2390 * parser.c (cp_parser_new_expression): Parse an ill-formed
2391 direct-new-declarator after a parenthesized type-id to emit good
2394 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2396 * cp-tree.def, cvt.c: Update copyright.
2398 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2401 * cp-tree.h (abi_version_at_least): Remove.
2402 * mangle.c: Include flags.h.
2404 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2407 * call.c (build_conditional_expr): Handle conversions between
2408 class types which result in differently cv-qualified type
2412 * class.c (delete_duplicate_fields_1): Remove.
2413 (delete_duplicate_fields): Likewise.
2414 (finish_struct_anon): Remove check for members with the same name
2415 as their enclosing class.
2416 (check_field_decls): Do not call duplicate_fields.
2417 * decl.c (grokdeclarator): Remove check for static data members
2418 with the same name as their enclosing class.
2419 * name-lookup.c (push_class_level_binding): Check for members with
2420 the same name as their enclosing class.
2422 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2425 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2427 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2430 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2431 has full set of arguments.
2433 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2436 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2438 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2441 * cp-tree.h (delete_sanity): Change prototype.
2442 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2443 Remove dead code. Adjust code to warn about deleting an array.
2444 * typekc.c (decay_conversion): Use build_address and build_nop.
2447 * search.c (accessible_p): Do not check access in thunks.
2450 * call.c (build_conditional_expr): Call force_rvalue on the
2451 non-void operand in the case that one result is a throw-expression
2452 and the other is not.
2454 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2457 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2458 the type name and look ahead for ::~, and bail out early with a
2459 better error message if the parse is going to fail.
2461 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2463 * call.c (conversion_kind): New type.
2464 (conversion_rank): Likewise.
2465 (conversion): Likewise.
2466 (CONVERSION_RANK): New macro.
2467 (conversion_obstack): New variable.
2468 (obstack_initialized): Likewise.
2469 (z_candidate): Change type of convs and second_conv.
2470 (candidate_warning): New type.
2471 (IDENTITY_RANK): Remove.
2472 (EXACT_RANK): Likewise.
2473 (PROMO_RANK): Likewise.
2474 (STD_RANK): Likewise.
2475 (PBOOL_RANK): Likewise.
2476 (USER_RANK): Likewise.
2477 (ELLIPSIS_RANK): Likewise.
2478 (BAD_RANK): Likewise.
2479 (ICS_RANK): Likewise.
2480 (ICS_STD_RANK): Likewise.
2481 (ICS_USER_FLAG): Likewise.
2482 (ICS_ELLIPSIS_FLAG): Likewise.
2483 (ICS_THIS_FLAG): Likewise.
2484 (ICS_BAD_FLAG): Likewise.
2485 (NEED_TEMPORARY_P): Likewise.
2486 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2487 (USER_CONV_CAND): Likewise.
2488 (USER_CONV_FN): Likewise.
2489 (conversion_obstack_alloc): New function.
2490 (alloc_conversion): Likewise.
2491 (validate_conversion_obstack): Likewise.
2492 (alloc_conversions): Likewise.
2493 (build_conv): Adjust to deal with new conversion data structures.
2494 (build_identity_conv): New function.
2495 (build_ambiguous_conv): Likewise.
2496 (standard_conversion): Adjust to deal with new conversion data
2498 (convert_class_to_reference): Likewise.
2499 (direct_reference_binding): Likewise.
2500 (reference_binding): Likewise.
2501 (implicit_conversion): Likewise.
2502 (add_candidate): Likewise.
2503 (add_function_candidate): Likewise.
2504 (add_conv_candidate): Likewise.
2505 (build_builtin_candidate): Likewise.
2506 (print_z_candidate): Likewise.
2507 (merge_conversion_sequences): Likewise.
2508 (build_user_type_conversion_1): Likewise.
2509 (build_user_type_conversion): Likewise.
2510 (build_new_function_call): Likewise.
2511 (build_object_call): Likewise.
2512 (conditional_conversion): Likewise.
2513 (build_conditional_expr): Likewise.
2514 (build_new_op): Likewise.
2515 (build_op_delete_call): Likewise.
2516 (convert_like_real): Likewise.
2517 (build_over_call): Likewise.
2518 (build_new_method_call): Likewise.
2519 (is_subseq): Likewise.
2520 (maybe_handle_implicit_object): Likewise.
2521 (maybe_handle_ref_bind): Likewise.
2522 (compare_ics): Likewise.
2523 (source_type): Likewise.
2524 (add_warning): Likewise.
2526 (can_convert_arg): Likewise.
2527 (can_convert_arg_bad): Likewise.
2528 (perform_implicit_conversion): Likewise.
2529 (perform_direct_initialization_if_possible): Likewise.
2530 (initialize_reference): Likewise.
2531 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2532 * cp-tree.def (WRAPPER): Likewise.
2533 (IDENTITY_CONV): Remove.
2534 (LVALUE_CONV): Likewise.
2535 (QUAL_CONV): Likewise.
2536 (STD_CONV): Likewise.
2537 (PTR_CONV): Likewise.
2538 (PMEM_CONV): Likewise.
2539 (BASE_CONV): Likewise.
2540 (REF_BIND): Likewise.
2541 (USER_CONV): Likewise.
2542 (AMBIG_CONV): Likewise.
2543 (RVALUE_CONV): Likewise.
2544 * cp-tree.h (tree_wrapper): Remove.
2545 (WRAPPER_ZC): Remove.
2546 (lang_tree_node): Remove wrapper.
2547 (LOOKUP_SPECULATIVELY): Remove.
2548 (build_op_delete_call): Adjust prototype.
2549 (validate_conversion_obstack): Declare.
2550 (build_zc_wrapper): Remove.
2551 * cvt.c (convert_to_reference): Remove dead code.
2552 (ocp_convert): Likewise.
2553 * decl.c (redeclaration_error_message): Correct handling of
2555 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2556 (cp_tree_node_structure): Remove WRAPPER case.
2557 * decl2.c (finish_file): Call validate_conversion_obstack.
2558 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2559 (build_op_delete_call): Likewise.
2560 (build_x_delete): Likewise.
2561 (build_delete): Adjust call to build_op_delete_call.
2562 * pt.c (tsubst_friend_declaration): Adjust code to determine
2563 whether or not a friend template is a definition.
2564 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2565 * tree.c (build_zc_wrapper): Remove.
2567 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2569 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2570 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2571 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2572 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2574 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2576 * typeck.c (lookup_destructor): Fix typo in error message.
2578 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2580 * call.c, parser.c, tree.c: Fix comment typos.
2582 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2585 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2586 * decl.c (duplicate_decls, start_function): Likewise.
2588 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2590 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2591 * parser.c (free_parser_stacks): Delete.
2593 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2595 * rtti.c: Update copyright.
2597 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2600 * decl.c (require_complete_types_for_parms): Do not insert
2601 error_mark_node in the parameter list.
2603 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2606 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2607 error when terminator can not be found.
2609 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2611 Make-lang.in (po-generated): Delete.
2613 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2615 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2616 targetm.calls.promote_prototypes.
2618 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2622 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2624 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2625 (handle_pragma_implementation): Likewise.
2627 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2630 * typeck.c (lookup_destructor): Tweak error message.
2632 2004-02-05 Jan Hubicka <jh@suse.cz>
2634 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2637 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2640 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2641 code, only emits the diagnostic now. Added lookup of the identifier
2642 and support for qualified ids.
2643 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2644 Parse an (invalid) type name as id-expression within a declarator.
2645 (cp_parser_simple_declaration): Use it.
2646 (cp_parser_member_declaration): Likewise.
2647 (cp_parser_make_typename_type): New function. Handle errors through
2648 cp_parser_diagnose_invalid_typename.
2649 (cp_parser_elaborated_type_specifier): Use it.
2651 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2654 * call.c (convert_like_real): Use "converting" rather than
2655 "argument" as the descriptive keyword to
2656 dubious_conversion_warnings.
2657 * typeck.c (convert_for_assignment): Do not call
2658 dubious_conversion_warnings.
2660 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2663 * init.c (build_delete): Emit a more informative error message in
2664 case of an incomplete type, and on the correct source line.
2666 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2668 * error.c, search.c: Update copyright.
2670 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2673 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2674 linkage for the typeinfo name string.
2676 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2679 * cp-tree.h (fold_non_dependent_expr): New function.
2680 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2681 (cp_parser_template_argument): Use fold_non_dependent_expr.
2682 (cp_parser_direct_declarator): Likewise.
2683 * pt.c (fold_non_dependent_expr): New function.
2684 (convert_nontype_argument): Use it.
2685 (tsubst_qualified_id): Simplify.
2686 (tsubst_copy_and_build): Likewise.
2688 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2690 * decl.c (cxx_push_function_context): Do not set
2691 current_function_is_thunk.
2692 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2695 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2698 * pt.c (more_specialized_class): Increase processing_template_decl
2699 while partial ordering.
2701 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2704 * decl.c (start_function): Do not call pushdecl for any
2705 instantiation or specialization of a primary template.
2707 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2710 * parser.c (cp_parser_class_name): Robustify.
2713 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2716 * semantics.c (finish_id_expression): Do not return an
2717 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2719 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2722 * pt.c (build_non_dependent_expr): Do not build
2723 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2726 * semantics.c (finish_id_expression): Do not return an
2727 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2730 * parser.c (cp_parser_simple_declaration): When skipping to the
2731 end of the statement swallow the terminating semicolon.
2733 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2736 * init.c (build_offset_ref): Improve error recovery for invalid
2737 uses of non-static member functions.
2740 * cp-tree.h (cp_build_type_attribute_variant): New function.
2741 * class.c (build_clone): Use cp_build_type_attribute_variant.
2742 * decl.c (duplicate_decls): Likewise.
2743 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2744 (tsubst_function_type): Likewise.
2745 * tree.c (build_exception_variant): Check attributes before
2746 concluding that two types are the same.
2747 (cp_build_type-attribute_variant): New method.
2748 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2751 * call.c (convert_class_to_reference): Keep better track of
2752 pedantically invalid user-defined conversions.
2754 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2757 * pt.c (tsubst_qualified_id): Improved error message when a type
2758 is expected but not found.
2760 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2762 * class.c: Fix comment typos.
2764 * error.c: Likewise.
2765 * parser.c: Likewise.
2767 * search.c: Likewise.
2768 * typeck.c: Likewise.
2770 2004-01-30 Richard Henderson <rth@redhat.com>
2773 * method.c (use_thunk): Don't force_target_expr for void thunks.
2774 * tree.c (build_target_expr_with_type): Assert non-void type.
2775 (force_target_expr): Likewise.
2777 2004-01-30 Michael Matz <matz@suse.de>
2779 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2781 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2785 * decl.c (grokdeclarator): Check immediatly type completeness for
2786 non-dependent types.
2788 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2791 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2792 a sizeof expression.block
2794 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2797 * mangle.c (write_encoding): Correct encoding of member template
2800 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2802 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2803 template name as it was `<::' (digraph typo).
2804 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2805 (cp_parser_id_expression): Use it.
2806 (cp_parser_nested_name_specifier_opt): Likewise.
2807 (cp_parser_template_name): Likewise.
2808 (cp_parser_class_name): Likewise.
2809 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2811 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2814 * typeck.c (merge_types): Do not merge attributes into
2818 * parser.c (cp_parser_direct_declarator): Do not prevent
2819 backtracking inside a parenthesized declarator.
2820 (cp_parser_parameter_declaration): Fix typo in comment.
2822 2004-01-28 Jan Hubicka <jh@suse.cz>
2824 * semantics.c (expand_body) Do emit_associated_thunks before
2827 2004-01-27 Devang Patel <dpatel@apple.com>
2829 * name-lookup.c: Include "debug.h"
2830 (do_namespace_alias): Invoke debug_hooks to emit debug info
2831 for namespace alias.
2832 (do_local_using_decl): Invoke debug_hooks to emit debug info
2834 (do_class_using_decl): Same.
2835 (do_toplevel_using_decl): Same.
2836 (do_using_directive): Same.
2837 (cp_emit_debug_info_for_using): New function.
2838 * Make-lang.in (cp/parser.o): Depend on debug.h
2839 (cp/name-lookup.o): Same.
2841 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2843 * cp-tree.h (language_function, lang_type_header): Use
2845 * name-lookup.h (cp_binding_level): Likewise.
2847 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2850 * semantics.c (finish_for_expr): Check for unresolved overloaded
2853 * class.c (add_method): Just check processing_template_decl to
2854 determine whether or not we are within a template.
2855 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2856 * init.c (decl_constant_value): Check the type of the declaration,
2858 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2859 (push_to_top_level): ... this.
2860 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2861 * pt.c (push_template_decl_real): Reorder condition for speed.
2862 (convert_template_argument): Use dependency-checking functions in
2863 place of uses_template_parms.
2864 (lookup_template_class): Avoid calling uses_template_parms more
2866 (uses_template_parms): Reimplement, using dependency-checking
2868 (instantiate_class_template): Use push_to_top_level, not
2869 maybe_push_to_top_level.
2870 (type_unification_real): Simplify.
2871 (type_dependent_expression_p): Handle OFFSET_REFs and
2873 (any_dependent_template_arguments_p): Handle multiple levels of
2875 * semantics.c (expand_or_defer_fn): Do not check
2876 uses_template_parms for template instantiations.
2877 * typeck.c (comptypes): Avoid calling cp_type_quals.
2879 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2882 * call.c (build_over_call): Do not convert arguments when
2883 processing a template.
2884 * pt.c (build_non_dependent_expr): Do not build a
2885 NON_DEPENDENT_EXPR for arithmetic constants.
2887 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2890 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2891 returns a TYPE_DECL. no further lookup is required.
2892 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2893 is invalid. Rework to give better diagnostics.
2895 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2898 * pt.c (instantiate_class_template): Add an error_mark_node
2900 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2902 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2905 * decl.c (finish_function): Move the call to
2906 finish_fname_decls below the call to
2907 finish_eh_spec_block.
2909 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2911 * optimize.c, typeck2.c: Update copyright.
2913 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2915 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2916 init.c, mangle.c, typeck.c: Update copyright.
2918 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2920 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2922 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2924 * Make-lang.in: Replace $(docdir) with doc.
2925 (c++.info, c++.srcinfo): Dummy entry.
2926 (c++.man, c++.srcman): New rules.
2927 (c++.install-man): Revamp rule.
2929 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2931 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2932 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2933 immediate $(shell) instead of deferred backquote.
2935 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2938 * parser.c (cp_parser_postfix_expression): When encountering
2939 incomplete type on left-hand side of "->" or ".", treat the entire
2940 expression as erroneous.
2943 * call.c (build_field_call): Remove.
2944 (n_build_method_call): Likewise.
2945 (build_method_call): Likewise.
2946 (build_new_method_call): Do not call build_field_call.
2947 * class.c (n_build_method_call): Remove.
2948 (print_class_statistics): Do not print it.
2949 * cp-tree.h (build_method_call): Remove declaration.
2950 (finish_object_call_expr): Likewise.
2951 (build_new_1): Do not use build_method_call.
2952 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2953 when the function appearing on the right-hand-side of "." or "->"
2954 is not actually a function.
2955 * pt.c (tsubst_copy_and_build): Likewise.
2956 * semantics.c (finish_object_call_expr): Remove.
2958 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2961 * pt.c (tsubst): Use finish_typeof.
2963 2004-01-18 Jason Merrill <jason@redhat.com>
2966 * except.c (build_throw): In a template, set
2967 current_function_returns_abnormally.
2969 2004-01-17 Fred Fish <fnf@intrinsity.com>
2972 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2973 except don't call array_type_nelts() with a VECTOR_TYPE.
2975 2004-01-16 Jan Hubicka <jh@suse.cz>
2977 * mangle.c (write_mangled_name): Remove inline modifier.
2979 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2982 * decl.c (compute_array_index_type): Fix grammar in comment.
2983 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2986 * call.c (name_as_c_string): Print conversion operator names
2990 * call.c (initialize_reference): Pass -1 for inner parameter to
2993 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2996 * parser.c (cp_parser_base_specifier): Check for an invalid
2997 keyword `typename' and emit an user-friendly error message.
2999 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3002 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3003 (handle_pragma_implementation): Likewise.
3005 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3008 * typeck.c (build_class_member_access_expr): Allow to access members
3009 of the currently open class.
3010 (finish_class_member_access_expr): Likewise.
3012 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3015 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3016 name by value, instead of computing them.
3017 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3018 arguments. Pass them to validate_nonmember_using_decl.
3019 * name-lookup.h (do_local_using_decl): Adjust.
3020 (do_toplevel_using_decl): Likewise.
3021 * parser.c (cp_parser_using_declaration): Likewise.
3022 * pt.c (tsubst_expr): Likewise.
3024 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3028 * name-lookup.c (qualified_lookup_using_namespace): Search
3029 strongly-associated namespaces first, and only then try other
3032 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3034 * Make-lang.in (c++.srcextra): Dummy entry.
3036 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3039 * parser.c (cp_parser_template_name): Don't try to parse a
3040 conversion-function-id, as it cannot be a template-name.
3041 (cp_parser_simple_type_specifier): Check for invalid template-ids
3042 even after a built-in type.
3044 2004-01-14 Jan Hubicka <jh@suse.cz>
3047 * pt.c (instantiate_decl): Do not increase function_depth.
3049 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3053 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3054 attributes and discard.
3055 * decl.c (xref_tag): Don't overwite existing attributes with
3058 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3061 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3062 is no destructor while looking up a BIT_NOT_EXPR.
3064 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3066 * cxxfilt.c: Remove unused file.
3068 2004-01-14 Jan Hubicka <jh@suse.cz>
3070 Partial fix to PR c++/12850
3071 * decl2.c (mark_used): Do not proactively instantiate templates
3072 when compiling in unit-at-a-time or not optimizing.
3073 * optimize.c (maybe_clone_body): Do not increase function depth.
3075 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3078 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3080 2004-01-12 Steven Bosscher <stevenb@suse.de>
3083 * parser.c (cp_parser_member_declaration): Any non-type is also
3084 not a class or a function.
3086 2004-01-12 Jason Merrill <jason@redhat.com>
3089 * class.c (build_base_path): Do not mark vtable references as
3091 (build_vtbl_ref_1): Likewise.
3093 2004-01-12 Richard Henderson <rth@redhat.com>
3096 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3097 (store_init_value): Use it.
3098 * decl.c (check_initializer): Expect full initialization code
3099 from store_init_value.
3100 * init.c (expand_aggr_init_1): Likewise.
3101 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3103 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3105 * class.c (layout_class_type): For non-POD class types, also copy
3106 the DECL_SIZE and DECL_MODE of fields to the base class type.
3108 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3111 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3112 calling regenerate_decl_from_template.
3114 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3117 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3118 decl-specifier occurring along with a class definition.
3120 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3122 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3123 clauses to comments describing declares_class_or_enum.
3124 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3127 2004-01-12 Jan Hubicka <jh@suse.cz>
3129 * pt.c (for_each_template_parm): Do not check for duplicates.
3130 (for_each_template_parm): Use walk_tree duplicate checking code.
3132 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3135 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3136 is error_mark_node, don't add any more decl_specs.
3137 (cp_parser_init_declarator): After committing to a declaration, if
3138 the decl_specifiers start with error_mark_node, issue an error and
3139 change the type to "int".
3141 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3144 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3146 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3150 * pt.c (tsubst): Substitution must fail if we are attempting to
3151 create an array with element type that is an abstract class type.
3152 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3153 before calling abstract_virtuals_error.
3155 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3157 * name-lookup.c (qualified_lookup_using_namespace): Consider
3158 strong using directives even if we've already found a binding.
3160 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3162 * cp-tree.h (cxx_expand_expr): Change prototype.
3163 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3165 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3168 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3169 looking into them recursively. They can be there because of the
3170 new __offsetof__ extension.
3172 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3174 * parser.c (cp_parser_save_member_function_body): Mark the
3177 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3180 * class.c (build_clone): Copy type attributes from the original
3181 function to the clone.
3184 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3185 references as constant.
3188 * parser.c (cp_parser_explicit_instantiation): Improve error
3190 (cp_parser_require): Improve indication of the error location.
3193 * parser.c (cp_parser_class_head): Reorder logic to check for
3194 invalid qualification.
3196 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3199 * name-lookup.c (lookup_using_namespace): Remove spacesp
3201 (unqualified_namespace_lookup): Likewise.
3202 (lookup_qualified_name): Adjust accordingly.
3203 (lookup_name_real): Likewise.
3204 (lookup_arg_dependent): Do not eliminate the namespace of the
3205 functions found by unqualified name lookup unless that is the
3208 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3210 * semantics.c (push_deferring_access_checks): Fix format.
3211 (resume_deferring_access_checks): Likewise.
3212 (stop_deferring_access_checks): Likewise.
3213 (pop_deferring_access_checks): Likewise.
3214 (get_deferred_access_checks): Likewise.
3215 (pop_to_parent_deferring_access_checks): Likewise.
3216 (perform_deferred_access_checks): Likewise.
3217 (perform_or_defer_access_check): Likewise.
3219 2004-01-04 Richard Henderson <rth@redhat.com>
3221 * call.c (build_over_call): Don't create a save_expr of an
3222 aggregate, but rather its address.
3224 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3227 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3228 an offsetof expression.
3230 * parser.c (cp_parser_parameter_declaration): Fix comment.
3233 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3234 (reference_binding): Set it when appropriate.
3235 (build_temp): New function, split out from ...
3236 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3237 (initialize_reference): Likewise.
3240 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3241 (cp_parser_new): Initialize it.
3242 (cp_parser_postfix_expression): Set it.
3243 (cp_parser_sizeof_operand): Likewise.
3244 (cp_parser_parameteR_declaration): Do not commit early to tenative
3245 parsers when in_type_id_in_expr_p is set.
3247 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3250 * parser.c (cp_parser_template_argument): Don't call
3251 make_unbound_class_template directly.
3252 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3253 UNBOUND_CLASS_TEMPLATE tree node.
3255 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3258 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3260 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3263 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3264 (DECL_FUNCTION_TEMPLATE_P): Use it.
3265 (DECL_CLASS_TEMPLATE_P): Likewise.
3266 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3267 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3268 (cp_parser_template_name): Likewise.
3269 (cp_parser_elaborated_type_specifier): Likewise.
3270 (cp_parser_namespace_name): Likewise.
3271 (cp_parser_class_name): Likewise.
3272 (cp_parser_lookup_name_simple): Likewise.
3274 See ChangeLog.3 for earlier changes.