1 2004-07-14 Mark Mitchell <mark@codesourcery.com>
3 * cp-tree.h (IDENTIFIER_VALUE): Remove.
4 (BINFO_PUSHDECLS_MARKED): Likewise.
5 (maybe_inject_for_scope_var): Likewise.
6 (push_class_decls): Likewise.
7 * name-lookup.h (push_class_binding): Remove.
8 (innermost_non_namespace_value): New function.
9 (outer_binding): Likewise.
10 * class.c (add_method): Push bindings before adding to
12 (restore_class_cache): Do not restore class_shadowed.
13 (pushclass): Do not add USING_DECLs. Do not call
15 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
16 * decl.c (pushdecl): Use outer_binding.
17 (poplevel): Set the scope for an out-of-scope for-loop declaration
19 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
20 * name-lookup.c (new_class_binding): New function.
21 (push_binding): Use it.
22 (pushdecl): Use innermost_non_namespace_value.
23 (maybe_inject_for_scope_var): Remove.
24 (push_class_binding): Remove.
25 (set_inherited_value_binding_p): New function.
26 (get_class_binding): New function.
27 (push_class_level_binding): Assert that the current_class_type is
29 (outer_binding): New function.
30 (innermost_non_namespace_value): Likewise.
31 (lookup_name_real): Use outer_binding.
32 (lookup_name_current_level): Ignore out-of-scope variables.
33 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
34 (lookup_template_class): Likewise.
35 * search.c (dfs_push_type_decls): Remove.
36 (dfs_push_decls): Likewise.
37 (setup_class_bindings): Likewise.
38 (lookup_field_1): Handle USING_DECLs from dependent scopes.
39 (marked_pushdecls_p): Remove.
40 (unmarked_pushdecls_p): Remove.
41 (marked_identifiers): Remove.
42 (setup_class_bindings): Remove.
43 (dfs_push_type_decls): Remove.
44 (dfs_push_decls): Remove.
45 (push_class_decls): Remove.
47 2004-07-13 Mark Mitchell <mark@codesourcery.com>
51 * decl.c (grokvardecl): Make declspecs parameter const.
52 (grokdeclarator): Likewise. Adjust accordingly.
53 * decl.h (grokdeclarator): Adjust declaration.
54 * parser.c (cp_parser_init_declarator): Do not clear
55 decl_specifiers->attributes.
57 * cp-tree.h (lang_identifier): Remove class_value.
58 (IDENTIFIER_CLASS_VALUE): Remove.
59 (pop_class_decls): Likewise.
60 (init_search_processing): Likewise.
61 * class.c (handle_using_decl): Use lookup_member, not
62 IDENTIFIER_CLASS_VALUE.
63 (restore_class_cache): New function, split out from ...
64 (pushclass): ... here. Do not call clear_identifier_class_values.
65 (invalidate_class_lookup_cache): Do not clear
66 IDENTIFIER_CLASS_VALUE.
67 (popclass): Do not call pop_class_decls.
68 (maybe_note_name_used_in_class): Do not save names looked up after
69 the class is complete. Use lookup_member, not
70 IDENTIFIER_CLASS_VALUE.
71 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
72 * decl.c (cxx_init_decl_processing): Do not call
73 init_search_processing.
74 * method.c (do_build_copy_constructor): Remove unnecessary code.
75 (do_build_assign_ref): Likewise.
76 * name-lookup.c (pushdecl): Use lookup_member, not
77 IDENTIFIER_CLASS_VALUE.
78 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
80 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
81 (push_class_binding): Do not set it.
82 (clear_identifier_class_values): Remove.
83 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
84 (store_binding): Do not save it.
85 (pop_from_top_level): Do not restore it.
86 * name-lookup.h (cxx_saved_binding): Remove class_value.
87 (clear_identifier_class_values): Remove.
88 * ptree.c (cxx_print_identifier): Do not print
89 IDENTIFIER_CLASS_VALUE.
90 * search.c (search_obstack): Remove.
91 (push_stack_level): Remove.
92 (pop_stack_level): Remove.
93 (search_level): Remove.
94 (search_stack): Remove.
95 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
96 (setup_class_bindings): Use IDENTIFIER_MARKED, not
97 IDENTIFIER_CLASS_VALUE.
98 (marked_identifiers): New variable.
99 (push_class_decls): Clear IDENTIFIER_MARKED.
100 (pop_class_decls): Don't call pop_search_level.
101 (init_search_processing): Remove.
103 2004-07-12 Mark Mitchell <mark@codesourcery.com>
105 * cp-tree.h (get_aggr_typedef): Remove.
106 * init.c (get_aggr_typedef): Likewise.
108 * name-lookup.c (push_class_level_binding): Simplify.
110 2004-07-12 Andrew Pinski <apinski@apple.com>
114 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
116 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
119 2004-07-12 Eric Christopher <echristo@redhat.com>
121 * parser.c (cp_parser_class_head): Remove unused variable.
123 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
125 * decl.c (grok_op_properties): Reject [de-]allocation functions
126 declared in a namespace, or declared as static.
128 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
130 * cp-tree.h (make_binfo): Remove.
131 * decl.c (xref_basetypes): Use make_tree_binfo directly.
132 * tree.h (copy_base_binfos): Likewise.
133 (make_binfo): Remove.
135 * call.c (build_user_type_conversion_1, build_new_op,
136 check_constructor_callable, build_temp,
137 perform_direct_initialization_of_possible): Pass type directly to
138 lookup_fnfields & build_special_member_call.
139 (build_special_member_call): Accept a type, and complete it.
140 * class.c (finish_stuct_bits): Copy the BINFOs here.
141 * cvt.c (ocp_convert): Pass type directly to
142 build_special_member_call.
143 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
144 (xref_basetypes): Allocate the binfo here. Adjust.
145 * init.c (build_init, build_new_1): Pass type directly to
146 build_special_member_call.
147 * lex.c (cxx_make_type): Do not allocate binfo here.
148 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
149 * parser.c (cp_parser_class_head): Always call xref_basetypes.
150 * pt.c (instantiate_class_template): Likewise. Inhibit access
151 checking for template friends.
152 * ptree.c (cxx_print_type): Adjust record printing.
153 * search.c (lookup_base): When taking a type, complete it before
155 (lookup_member): Delay completing a type.
156 (push_class_decls): Don't walk an incomplete type.
157 (lookup_conversions): Likewise.
158 * semantics.c (finish_stmt_expr_expr): Pass type directly to
159 build_special_member_call.
160 * tree.c (copy_base_binfos): Adjust.
161 (make_binfo): Likewise.
162 * typeck.c (build_modify_expr): Pass type directly to
163 build_special_member_call.
164 * typeck2.c (process_init_constructor): Check a binfo exists.
165 (build_m_component_ref): Allow accessing an incomplete type.
166 (build_functional_cast): Pass type directly to
167 build_special_member_call.
169 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
172 * config-lang.in (gtfiles): Add typeck2.c.
173 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
175 * cp-tree.h: Declare complete_type_check_abstract.
176 * typeck2.c (pat_calc_hash, pat_compare,
177 complete_type_check_abstract): New functions.
178 (abstract_virtuals_error): If the type is abstract, register the
179 declaration within abstract_pending_vars for further checks.
180 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
181 * decl.c (cp_finish_decl): Do not strip array types.
182 (create_array_type_for_decl): Check for abstractness of the element
184 (complete_vars): Call complete_type_check_abstract.
185 * class.c (finish_struct): Prepare a list of virtual functions for
186 template types, and call complete_vars on it to check for abstractness.
188 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
190 PR tree-optimization/14107
191 * decl.c (finish_function): Remove temporary band-aid.
193 2004-07-11 Mark Mitchell <mark@codesourcery.com>
195 * call.c (build_operator_new_call): Avoid using push_to_top_level.
196 (build_new_op): Adjust call to lookup_function_nonclass.
197 * name-lookup.c (identifier_type_value): Adjust call to
199 (lookup_name_real): Add block_p parameter.
200 (lookup_name_nonclass): Adjust call to lookup_name_real.
201 (lookup_function_nonclass): Likewise.
202 (lookup_name): Likewise.
203 * name-lookup.h (lookup_name_real): Change prototype.
204 (lookup_name_nonclass): Likewise.
205 * parser.c (cp_parser_lookup_name): Likewise.
207 * cp-tree.h (saved_scope): Make old_bindings a vector.
208 (unuse_fields): Remove.
209 * name-lookup.h (cxx_saved_binding): Define it.
210 * class.c (pushclass): Don't use unuse_fields.
211 * name-lookup.c (cxx_saved_binding_make): Remove.
212 (store_binding): Add new bindings to a vector, using an
213 accumulator style, rather than adding them to a list.
214 (store_bindings): Adjust accordingly.
215 (store_class_bindings): Likewise.
216 (push_to_top_level): Likewise.
217 (pop_from_top_level): Likewise.
218 * optimize.c (maybe_clone_body): Must push_to_top_level and
219 pop_from_top_level calls outside of loop.
220 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
221 calls here from cp_parser_late_parsing_default_args.
222 (cp_parser_save_default_args): Record the class type in which the
223 function is declared.
224 (cp_parser_late_parsing_default_args): Do not call
225 push_nested_class/pop_nested_class.
226 * search.c (dfs_unuse_fields): Remove.
227 (unuse_fields): Remove.
229 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
231 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
232 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
233 * cp-tree.h (poplevel): Declare.
235 * decl.c (set_block): Remove.
237 2004-07-10 Mike Stump <mrs@apple.com>
239 * decl2.c (import_export_class): Never export/import vtables
240 with inline key functions.
242 2004-07-09 Steven Bosscher <stevenb@suse.de>
244 * typeck.c (c_expand_asm_operands): Remove.
246 2004-07-09 Mike Stump <mrs@apple.com>
248 * typeck.c (build_class_member_access_expr): Skip null deref
249 warning when we don't dereference it.
251 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
255 * class.c (check_field_decls): Improve -Weffc++ warning: do not
256 warn for pointers to functions/members, or for classes without
259 2004-07-08 Mark Mitchell <mark@codesourcery.com>
261 * name-lookup.h (struct cp_binding_level): Update documentation
264 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
267 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
268 returning CALL_EXPR, and non-reference return type.
270 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
272 * name-lookup.c (push_binding): Use VEC_reserve.
274 2004-07-08 Richard Henderson <rth@redhat.com>
276 * cp-tree.h (expand_eh_spec_block): Remove.
278 2004-07-07 Mark Mitchell <mark@codesourcery.com>
280 * cp-tree.h (saved_scope): Remove x_previous_class_type and
281 x_previous_class_values; add x_previous_class_level.
282 (previous_class_type): Remove.
283 (previous_class_values): Remove.
284 (previous_class_level): New macro.
285 * class.c (pushclass): Restore the identifier cache more
287 (invalidate_class_lookup_cache): Use vector for class_shadowed and
288 previous_class_values.
289 * decl.c (poplevel): Likewise.
290 * name-lookup.c (cxx_binding_init): New function.
291 (cxx_binding_make): Use it.
292 (push_binding): For a binding in a class level, use a vector of
293 cp_class_binding nodes.
294 (push_binding_level): New function.
295 (begin_scope): Use it.
296 (leave_scope): Do not put class binding levels on the free list.
297 (print_binding_level): Adjust for the fact that class_shadowed is
299 (poplevel_class): Likewise.
300 (clear_identifier_class_values): Likewise.
301 (push_class_level_binding): Likewise.
302 (set_class_shadows): Remove.
303 (store_binding): New function.
304 (store_class_bindings): New function.
305 (push_to_top_level): Use store_class_bindings as appropriate.
306 (pop_from_top_level): Use previous_class_level, not
308 * name-lookup.h (cp_class_binding): New type.
309 (cp_binding_level): Use a vector object for class_shadowed.
310 (push_binding_level): Declare.
311 (set_class_shadows): Remove.
313 2004-07-07 Andrew Pinski <apinski@apple.com>
315 * class.c (instantiate_type): BUFFER_REF is dead.
316 * lex.c (init_operators): IN_EXPR is dead.
318 2004-07-07 Jason Merrill <jason@redhat.com>
321 * call.c (build_new_op): Give overload warnings for built-in
324 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
327 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
330 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
332 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
333 * class.c (build_primary_vtable, check_bases,
334 determine_primary_base, finish_struct_bits,
335 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
336 get_basefndecls, warn_hidden, walk_subobject_offsets,
337 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
338 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
339 finish_struct_1, get_vfield_name, contains_empty_class_p,
340 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
341 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
342 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
344 * decl.c (xref_basetypes): Likewise.
345 * dump.c (cp_dump_tree): Likewise.
346 * error.c (dump_expr): Likewise.
347 * init.c (sort_mem_initializers, expand_member_init,
348 push_base_cleanups): Likewise.
349 * method.c (do_build_copy_constructor, do_build_assign_reg,
350 synthesize_exception_spec): Likewise.
351 * name-lookup.c (arg_assoc_class):
352 * pt.c (instantiate_class_template, tsubst,
353 get_template_base_recursive):
354 * ptree.c (cxx_print_type):
355 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
356 * search.c (lookup_base_r, dynamic_cast_base_recurse,
357 dfs_access_in_type, access_in_type, lookup_field_queue_p,
358 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
359 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
360 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
361 binfo_for_vtable, copied_binfo, original_binfo): Likewise
362 * tree.c (copy_base_binfos, make_binfo): Likewise.
363 * typeck.c (commmon_base_type): Likewise
364 * typeck2.c (process_init_constructor): Likewise
366 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
368 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
370 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
373 * pt.c (convert_nontype_argument): Disallow conversions between
374 different enumeration types.
376 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
378 * cp-tree.h (BINFO_MARKED): Remove.
379 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
380 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
381 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
382 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
383 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
384 (mark_primary_bases, determine_primary_base, base_derived_from,
385 dfs_find_final_overrider, dfs_find_final_overrider_q,
386 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
387 dfs_modify_vtables, walk_subobject_offsets,
388 layout_nonempty_base_or_field, build_base_field,
389 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
390 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
391 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
392 build_ctor_vtbl_group, accumulate_vtble_inits,
393 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
394 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
395 add_vcall_offset_vtbl_entries_1): Likewise.
396 * decl.c (xref_basetypes): Incomming virtual base indicated by
398 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
399 * init.c (finish_init_stmts, sort_mem_initializers,
400 emit_mem_initializers, build_vtble_address, expand_member_init,
401 push_base_cleanups): Likewise.
402 * method.c (do_build_copy_constructor): Likewise.
403 * pt.c (instantiate_class_template,
404 get_template_base_recursive): Likewise.
405 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
406 get_pseudo_ti_desc): Likewise.
407 * search.c (lookup_base_r, dynamic_cast_base_recurse,
408 binfo_from_vbase, binfo_via_virtual, copied_binfo,
409 original_binfo): Likewise.
410 * semantics.c (finish_base_specifier): Virtualness is indicated
412 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
414 2004-07-06 Mark Mitchell <mark@codesourcery.com>
417 2004-06-24 Jason Merrill <jason@redhat.com>
419 * decl.c (grokparms): Give the PARM_DECL reference type if the
420 parameter is passed by invisible reference.
422 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
424 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
425 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
426 * pt.c (check_instantiated_args, unify): Likewise.
428 2004-07-05 Phil Edwards <phil@codesourcery.com>
430 * Make-lang.in (check-c++, lang_checks): Add some comments.
432 2004-07-05 Zack Weinberg <zack@codesourcery.com>
434 * cp-mudflap.c: Delete file.
435 * Makefile.in: Remove all references to cp-mudflap.o.
437 2004-07-05 Zack Weinberg <zack@codesourcery.com>
439 * decl.c (cxx_init_decl_processing): Call
440 build_common_tree_nodes before creating the global NAMESPACE_DECL.
442 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
445 * call.c (build_operator_new_call): Look only at global scope.
447 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
449 * call.c (enforce_access): Expect TREE_BINFO.
450 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
451 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
452 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
454 (BINFO_LANG_ELTS): Remove.
455 (BINFO_LANG_SLOTS): New.
456 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
457 (CLASSTYPE_TEMPLATE_INFO): Adjust.
458 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
459 * search.c (lookup_member): Check TREE_BINFO.
460 * semantics.c (perform_or_defer_access_check): Likewise.
461 (check_accessibility_of_qualified_id): Check
462 deferred_access_no_check.
463 * tree.c (make_binfo): Use make_tree_binfo.
465 2004-07-04 Mark Mitchell <mark@codesourcery.com>
467 * method.c (implicitly_declare_fn): Set linkage of generated
470 2004-07-04 Richard Henderson <rth@redhat.com>
472 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
474 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
477 * name-lookup.c (push_class_level_binding): Don't pass a
478 TREE_LIST of ambiguous names to check_template_shadow as it
479 only handles declarations. Instead, pull the declaration
482 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
485 * pt.c (check_explicit_specialization): Clarify error message.
487 2004-07-02 Richard Henderson <rth@redhat.com>
489 * tree.c (cp_unsave_r): Update remap_save_expr call.
491 2004-07-02 Mark Mitchell <mark@codesourcery.com>
494 * mangle.c (write_template_arg): Correct mangling.
497 * decl.c (grokdeclarator): Robustify.
499 2004-07-01 Richard Henderson <rth@redhat.com>
501 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
502 * method.c (synthesize_method): Don't clear_last_expr.
503 * name-lookup.c (maybe_push_cleanup_level): Likewise.
505 2004-07-01 Nick Clifton <nickc@redhat.com>
507 * decl2.c (import_export_class): Invoke the
508 import_export_class field in the gcc_target structure if it is not
511 2004-06-30 Richard Henderson (rth@redhat.com>
513 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
514 * method.c (use_thunk): Likewise.
516 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
518 * call.c (build_over_call), typeck.c (build_function_call): Call
519 check_function_arguments instead of check_function_format.
521 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
523 * call.c (build_over_call), typeck.c (build_function_call): Update
524 calls to check_function_format.
526 2004-06-30 Richard Henderson <rth@redhat.com>
528 * call.c (build_over_call): Use __builtin_memcpy for copying
529 CLASS_AS_BASE rather than funny casting.
531 2004-06-30 Richard Henderson <rth@redhat.com>
533 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
534 TYPE_SIZE_UNIT of full_type.
536 2004-06-30 Per Bothner <per@bothner.com>
538 Conditionally compile support for --enable-mapped_location.
539 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
540 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
541 adjustments - which I don't understand.
542 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
543 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
544 (print_instantiation_partial_context): Use expand_location.
545 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
546 * name-lookup.c: Likewise.
547 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
548 * name-lookup.c: Use input_line macro.
549 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
550 (cp_parser_statement): Rename locaal variable statement_locus to
551 statement_location and use SET_EXPR_LOCATION macro.
552 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
553 * tree.c (cp_walk_subtrees): Likewise.
555 2004-06-29 Per Bothner <per@bothner.com>
557 * tree.c (build_min_nt, build_min, build_min_non_dep):
558 Don't set TREE_COMPLEXITY from input_line.
560 2004-06-29 Paul Brook <paul@codesourcery.com>
562 * init.c: Include target.h.
563 (get_cookie_size): Remove and replace with target hook.
565 (build_new_1): Store the element size in the cookie.
567 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
570 * parser.c (cp_parser_template_declaration_after_export): Disable
571 access checks here ...
572 (cp_parser_class_specifier): ... not here.
574 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
576 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
577 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
578 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
581 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
583 * cp-tree.h (struct deferred_access): Move to ...
584 * semantics.c (struct deferred_access): ... here. Adjust.
585 (deferred_access_stack): Make a VEC(deferred_access),
586 (deferred_access_free_list): Remove.
587 (deferred_access_no_check): New.
588 (push_deferring_access_checks, resume_deferring_access_checks,
589 stop_deferring_access_checks, pop_deferring_access_checks,
590 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
591 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
593 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
596 * call.c (build_temp): Declare.
597 (check_constructor_callable): New.
598 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
599 CONSTRUCTOR_CALLABLE.
600 (convert_like_real, initialize_reference): Use
601 check_constructor_callable.
602 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
603 (LOOKUP_*): Renumber.
605 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
607 * friend.c (add_friend): Only perform access checks when context
609 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
610 * parser.c (cp_parser_class_specifier): Disable access checks here
611 when parsing the body of a templated class.
612 * semantics.c (perform_or_defer_access_checks): Reorder to allow
613 NULL binfos when not checking access.
615 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
617 Use vector API for vbase list.
618 * cp-tree.h: Include vec.h
619 (DEF_VEC_P (tree)): New type.
620 (struct lang_type_class): Change vbase's member type.
621 (binfo_for_vbase): Declare.
622 * class.c (determine_primary_base, base_derived_from,
623 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
624 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
625 build_vtbl_initializer): Adjust.
626 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
628 * init.c (sort_mem_initializers, expand_member_init,
629 push_base_cleanups): Adjust.
630 * method.c (do_build_copy_constructor): Adjust.
631 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
632 (binfo_for_vbase): New.
633 * tree.c (copy_base_binfos): Adjust.
635 2004-06-28 Mark Mitchell <mark@codesourcery.com>
637 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
639 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
642 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
643 paranthesis in case of pointers to array members.
644 * error.c (dump_type_prefix): Likewise.
645 (dump_type_suffix): Maybe issue a whitespace when printing
648 2004-06-27 Mark Mitchell <mark@codesourcery.com>
651 * parser.c (cp_parser_set_decl_spec_type): Refine test for
652 redefinition of built-in types.
654 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
656 * error.c (pp_template_argument_list_start): Remove.
657 (pp_template_argument_list_end): Likewise.
658 (pp_separate_with_comma): Use pp_cxx_separate_with.
659 (reinit_global_formatting_buffer): Remove.
660 (pp_non_consecutive_character): Likewise.
661 (dump_scope): Use pp_cxx_colon_colon.
662 (dump_template_parameter): Use pp_cxx_identifier,
663 pp_cxx_tree_identifier and pp_cxx_whitespace.
664 (dump_templat_bindings): Replace use of pp_string with sequence
665 of pp_cxx_whitespace and pp_equal.
666 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
667 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
669 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
670 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
671 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
672 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
673 pp_cxx_right_bracket, pp_cxx_identifier throughout,
674 (dump_decl): Likewise.
675 (dump_template_decl): Likewise.
676 (dump_function_decl): Likewise. Set padding as appropriate.
677 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
679 (dump_exception_spec): Likewise.
680 (dump_function_name): Use pp_cxx_tree_identifier and
682 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
683 pp_cxx_end_template_argument_list.
684 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
685 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
686 pp_cxx_whitespace throughout.
687 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
689 (dump_unary_op): Likewise.
690 (reinit_cxx_pp): New function.
691 (type_as_string); Use it.
692 (expr_as_string): Likewise.
693 (decl_as_string); Likewise.
694 (context_as_string): Likewise.
695 (lang_decl_name): Likewise.
696 (decl_to_string): Likewise.
697 (expr_to_string): Likewise.
698 (parm_to_string): Likewise.
699 (type_to_string): Likewise.
700 (args_to_string): Likewise.
701 (cv_to_string): Likewise.
703 2004-06-26 Mark Mitchell <mark@codesourcery.com>
705 * cp-tree.h (cp_cv_quals): New type.
706 (cp_declarator): Use it instead of "tree" as appropriate.
707 (grok_method_quals): Adjust prototype.
708 (grokclassfn): Likewise.
709 (do_friend): Likewise.
710 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
711 (grokdeclarator): Likewise.
712 * decl2.c (grok_method_quals): Likewise.
713 (grokclassfn): Likewise.
714 * friend.c (do_friend): Likewise.
715 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
716 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
717 (make_pointer_declarator): Likewise.
718 (make_reference_declarator): Likewise.
719 (make_ptrmem_declarator): Likewise.
720 (cp_parser_ptr_operator): Likewise.
721 (cp_parser_cv_qualifier_seq_opt): Likewise.
722 (cp_parser_cv_qualifier_opt): Remove.
723 (cp_parser_new_declarator_opt): Adjust call to
724 cp_parser_ptr_operator.
725 (cp_parser_conversion_declaration_opt): Likewise.
726 (cp_parser_declarator): Use cp_cv_quals, not tree.
727 (cp_parser_direct_declarator): Likewise.
729 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
731 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
732 Rename DECL_STMT to DECL_EXPR.
733 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
734 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
735 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
737 2004-06-26 Jan Hubicka <jh@suse.cz>
740 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
741 reachability analysis.
743 2004-06-25 Mark Mitchell <mark@codesourcery.com>
745 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
748 2004-06-25 Paul Brook <paul@codesourcery.com>
750 * decl2.c (get_guard): Call targetm.cxx.guard_type.
751 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
753 2004-06-24 Mark Mitchell <mark@codesourcery.com>
755 * decl.c (grokdeclarator): Restore error messages about __thread.
756 * parser.c (cp_parser_decl_specifier_seq): Likewise.
758 2004-06-24 Jason Merrill <jason@redhat.com>
761 * decl.c (grokparms): Give the PARM_DECL reference type if the
762 parameter is passed by invisible reference.
764 2004-06-24 Andreas Schwab <schwab@suse.de>
766 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
768 2004-06-23 Mark Mitchell <mark@codesourcery.com>
770 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
771 (cp/decl.o): Likewise.
772 (cp/decl2.o): Likewise.
774 (cp/semantics.o): Likewise.
775 * config-lang.in (gtfiles): Do not reference cp/lex.h.
776 * class.c: Do not include lex.h.
777 (add_implicitly_declared_members): Do not use
778 adding_implicit_members.
779 (check_bases_and_members): Do not talk about grok_x_components.
780 * cp/cp-tree.h (adding_implicit_members): Remove.
781 (cp_storage_class): New type.
782 (cp_decl_spec): Likewise.
783 (cp_decl_specifier_seq): Likewise.
784 (cp_parameter_declarator): Use it for the decl_specifiers field.
785 (check_tag_decl): Adjust prototype.
786 (shadow_tag): Likewise.
787 (groktypename): Likewise.
788 (start_decl): Likewise.
789 (start_function): Likewise.
790 (start_method): Likewise.
791 (grok_x_components): Remove.
792 (grokfield): Adjust prototype.
793 (grokbitfield): Likewise.
794 (finish_member_class_template): Remove.
795 * decl.c: Do not include lex.h.
796 (adding_implicit_members): Do not define.
797 (check_tag_decl): Do not use trees to represent decl-specifiers.
798 (shadow_tag): Likewise.
799 (groktypename): Likewise.
800 (start_decl): Likewise.
801 (grokvardecl): Likewise.
802 (grokdeclarator): Likewise.
803 (grokparms): Likewise.
804 (start_function): Likewise.
805 (start_method): Likewise.
806 * decl.h (grokdeclarator): Adjust prototype.
807 * decl2.c: Do not include lex.h.
808 (grok_x_components): Remove.
809 (grokfield): Do not use trees to represent decl-specifiers.
810 (grokbitfield): Likewise.
811 * lex.c: Do not include lex.h.
813 * parser.c: Include target.h.
814 (clear_decl_specs): New function.
815 (cp_parser_translation_unit): Do not use trees to represent
817 (cp_parser_postfix_expression): Likewise.
818 (cp_parser_new_type_id): Likewise.
819 (cp_parser_condition): Likewise.
820 (cp_parser_simple_declaration): Likewise.
821 (cp_parser_decl_specifier_seq): Likewise.
822 (cp_parser_function_specifier_opt): Likewise.
823 (cp_parser_conversion_type_id): Likewise.
824 (cp_parser_template_parameter): Likewise.
825 (cp_parser_explicit_instantiation): Likewise.
826 (cp_parser_type_specifier): Likewise.
827 (cp_parser_simple_type_specifier): Likewise.
828 (cp_parser_init_declarator): Likewise.
829 (cp_parser_type_id): Likewise.
830 (cp_parser_type_specifier_seq): Likewise.
831 (cp_parser_parameter_declaration): Likewise.
832 (cp_parser_member_declaration): Likewise.
833 (cp_parser_exception_declaration): Likewise.
834 (cp_parser_function_definition_from_specifiers_and_declarator):
836 (cp_parser_single_declaration): Likewise.
837 (cp_parser_save_member_function_body): Likewise.
838 (cp_parser_friend_p): Likewise.
839 (cp_parser_set_storage_class): New function.
840 (cp_parser_set_decl_spec_type): Likewise.
841 * pt.c: Do not include lex.h.
842 * semantics.c: Likewise.
843 (finish_member_class_template): Remove.
845 2004-06-23 Roger Sayle <roger@eyesopen.com>
847 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
848 longer take both "args" and "convert_args" as arguments.
849 (build_op_delete_call): Update call to build_cxx_call.
850 (build_over_call): Likewise, update call to build_cxx_call.
851 * cp-tree.h (build_cxx_call): Update funtion prototype.
852 * typeck.c (build_function_call): Don't call expand_tree_builtin.
853 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
854 (throw_bad_typeid): Likewise.
855 (build_dynamic_cast_1): Likewise.
857 2004-06-22 Richard Henderson <rth@redhat.com>
859 * class.c (build_vfn_ref): Take a pointer not object. Build
861 (cp_fold_obj_type_ref): New.
862 * call.c (build_over_call): Update build_vfn_ref call.
863 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
864 * cp-tree.h (cp_fold_obj_type_ref): Declare.
866 2004-06-21 Jason Merrill <jason@redhat.com>
869 * cp-gimplify.c (cp_gimplify_init_expr): Look through
872 2004-06-21 Mark Mitchell <mark@codesourcery.com>
874 * cp-tree.def (NEW_EXPR): Add a fourth slot.
875 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
876 (TREE_PARMLIST): Likewise.
877 (CALL_DECLARATOR_PARMS): Likewise.
878 (CALL_DECLARATOR_QUALS): Likewise.
879 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
880 (cp_declarator_kind): New type.
881 (cp_parameter_declarator): Likewise.
882 (cp_declarator): Likewise.
883 (cp_error_declarator): Likewise.
884 (no_parameters): Likewise.
885 (groktypename): Change prototype.
886 (start_decl): Likewise.
887 (start_handler_parms): Likewise.
888 (get_scope_of_declarator): Likewise.
889 (start_function): Likewise.
890 (start_preparsed_function): New function.
891 (start_function): Change prototype.
892 (start_method): Likewise.
893 (grokfield): Likewise.
894 (grokbitfield): Likewise.
895 (build_new): Likewise.
896 (make_pointer_declarator): Remove.
897 (make_reference_declarator): Likewise.
898 (make_call_declarator): Likewise.
899 (set_quals_and_spec): Likewise.
900 (process_template_parm): Change prototype.
901 (begin_function_definition): Remove.
902 (finish_parmlist): Remove.
903 * decl.c (groktypename): Do not use trees to represent
905 (start_decl): Likewise.
906 (start_handler_parms): Remove.
907 (get_scope_of_declarator): Reimplement.
908 (grokdeclarator): Do not use trees to represent declarators.
909 (grokparms): Likewise.
910 (start_function): Likewise.
911 (start_method): Likewise.
912 (build_void_list_mode): Do not use TREE_PARMLIST.
913 * decl.h (grokdeclarator): Change prototype.
914 * decl2.c (grok_method_quals): Robustify.
915 (grok_x_components): Do not use trees to represent declarators.
916 (grokfield): Likewise.
917 (grokbitfield): Likewise.
918 (start_objects): Build FUNCTION_DECLs, not declarators.
919 (start_static_storage_duration_function): Likewise.
920 * init.c (build_new): Simplify.
921 * lex.c (make_pointer_declarator): Remove.
922 (make_reference_declarator): Likewise.
923 (make_call_declarator): Likewise.
924 (set_quals_and_spec): Likewise.
925 * method.c (use_thunk): Use start_preparsed_function.
926 (synthesize_method): Likewise.
927 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
928 * optimize.c (maybe_clone_body): Use start_preparsed_function.
929 * parser.c (cp_error_declarator): New variable.
930 (declarator_obstack): Likewise.
931 (alloc_declarator): New function.
932 (make_declarator): Likewise.
933 (make_id_declarator): Likewise.
934 (make_pointer_declarator): Likewise.
935 (make_reference_declarator): Likewise.
936 (make_ptrmem_declarator): Likewise.
937 (make_call_declarator): Likewise.
938 (make_array_declarator): Likewise.
939 (no_parameters): New variable.
940 (make_parameter_declarator): Likewise.
941 (cp_parser_check_for_definition_in_return_type): Do not use trees
942 to represent declarators.
943 (cp_parser_translation_unit): Likewise.
944 (cp_parser_new_expression): Likewise.
945 (cp_parser_new_type_id): Likewise.
946 (cp_parser_new_declarator_opt): Likewise.
947 (cp_parser_direct_new_declarator): Likewise.
948 (cp_parser_condition): Likewise.
949 (cp_parser_declaration_statement): Likewise.
950 (cp_parser_declaration): Likewise.
951 (cp_parser_conversion_type_id): Likewise.
952 (cp_parser_conversion_declarator_opt): Likewise.
953 (cp_parser_template_parameter_list): Likewise.
954 (cp_parser_template_parameter): Likewise.
955 (cp_parser_explicit_instantiation): Likewise.
956 (cp_parser_init_declarator): Likewise.
957 (cp_parser_declarator): Likewise.
958 (cp_parser_direct_declarator): Likewise.
959 (cp_parser_type_id): Likewise.
960 (cp_parser_parameter_declaration_clause): Likewise.
961 (cp_parser_parameter_declaration_list): Likewise.
962 (cp_parser_parameter_declaration): Likewise.
963 (cp_parser_member_declaration): Likewise.
964 (cp_parser_exception_declaration): Likewise.
965 (cp_parser_check_declarator_template_parameters): Likewise.
966 (cp_parser_function_definition_from_specifiers_and_declarator):
968 (cp_parser_save_member_function_body): Likewise.
969 * pt.c (process_template_parm): Add is_non_type parameter.
970 (convert_template_argument): Adjust call to groktypename.
971 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
972 (tsubst): Do not expect declarators.
973 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
975 (instantiate_decl): Use start_preparsed_function.
976 * semantics.c (begin_function_definition): Remove.
977 (finish_parmlist): Remove.
978 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
981 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
983 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
984 (build_new_method_call): Likewise.
985 * decl.c (local_variable_p_walkfn): Don't walk into types.
986 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
987 (build_anon_union_vars): Add new operand for COMPONENT_REF.
988 * init.c (buld_new): Add new operand for ARRAY_REF.
989 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
990 (do_build_assign_ref): Likewise.
991 * parser.c (cp_parser_direct_new_declarator): Add new operands
993 (cp_parser_direct_declarator): Likewise.
994 * pt.c (tsubst): Likewise.
995 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
997 * semantics.c (finish_non_static_data_member): Add new operand
999 * typeck.c (build_class_member_access_expr): Likewise.
1000 (build_class_member_access_expr, finish_class_member_access_expr):
1002 (build_ptrmemfunc_access_expr): Likewise.
1003 (build_array_ref): Add new operands for ARRAY_REF.
1004 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1005 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1007 2004-06-21 Richard Henderson <rth@redhat.com>
1009 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1010 * parser.c (cp_parser_jump_statement): Update commentary.
1011 * pt.c (tsubst_expr): Use RETURN_EXPR.
1012 * semantics.c (finish_return_stmt): Likewise.
1013 (finalize_nrv_r): Likewise.
1014 * typeck.c, typeck2.c: Update file start commentary.
1016 2004-06-21 Richard Henderson <rth@redhat.com>
1018 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1020 2004-06-20 Richard Henderson <rth@redhat.com>
1022 * cp-tree.h (add_decl_stmt): Declare.
1023 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1024 * semantics.c (maybe_cleanup_point_expr): New.
1025 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1026 finish_for_expr, finish_switch_cond): Use it.
1027 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1029 2004-06-20 Richard Henderson <rth@redhat.com>
1031 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1032 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1033 (cp_gimplify_expr): Call it.
1034 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1035 (cp_genericize): New.
1036 * decl.c (finish_function): Call it.
1037 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1038 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1039 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1040 (cp_genericize): Declare.
1041 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1042 * dump.c (cp_dump_tree): Likewise.
1043 * semantics.c (push_cleanup): Move from c-semantics.c.
1045 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1047 * cp-lang.c (has_c_linkage): Implement.
1049 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1050 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1051 (builtin_function_1): Don't call make_decl_rtl.
1052 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1053 (grokvardecl): Don't call mangle_decl.
1054 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1055 DECL_ASSEMBLER_NAME.
1056 * method.c (set_mangled_name_for_decl): Delete.
1057 * name-lookup.c (pushdecl): When a local extern shadows a
1058 file-scope declaration of the same object, give both DECLs the
1060 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1061 on DECL_ASSEMBLER_NAME.
1063 2004-06-19 Richard Henderson <rth@redhat.com>
1065 * cp-gimplify.c: Remove unnecessary prototypes.
1066 (cp_gimplify_stmt): Merge into ...
1067 (cp_gimplify_expr): ... here. Move to end of file. Handle
1068 stmts_are_full_exprs_p frobbing.
1069 * cp-tree.h (cp_gimplify_stmt): Remove.
1070 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1071 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1073 2004-06-18 Richard Henderson <rth@redhat.com>
1076 * semantics.c (begin_cond): New.
1077 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1078 Assume that non-template decls go land before the conditional.
1079 (simplify_loop_decl_cond): Likewise.
1080 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1081 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1082 begin_switch_stmt, finish_switch_cond): Update to match.
1084 2004-06-17 Jason Merrill <jason@redhat.com>
1087 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1088 (finish_stmt_expr_expr): Update type after conversions.
1089 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1090 Handle void initializer.
1091 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1093 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1095 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1096 * cp-tree.h (defer_fn): Delete.
1097 * decl2.c (defer_fn): Delete.
1098 (finish_file): Simplify deferred_fns loops; check that
1099 only used inline functions get into deferred_fns.
1100 (mark_used): Inline previous contents of defer_fn.
1102 2004-06-16 Richard Henderson <rth@redhat.com>
1104 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1105 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1106 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1107 of CTOR_INITIALIZER ...
1108 (pp_cxx_statement): ... here.
1109 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1110 (finish_function): Use alloc_stmt_list to zap entire function.
1111 * parser.c (cp_parser_compound_statement): Update commentary.
1112 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1113 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1114 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1116 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1118 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1120 2004-06-16 Richard Henderson <rth@redhat.com>
1122 * parser.c (cp_parser_labeled_statement): Update commentary.
1123 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1124 * tree.c (mark_local_for_remap_r): Likewise.
1126 2004-06-16 Richard Henderson <rth@redhat.com>
1128 * parser.c (cp_parser_asm_definition): Update commentary.
1129 * pt.c (tsubst_expr): Use ASM_EXPR.
1130 * semantics.c (finish_asm_stmt): Likewise.
1132 2004-06-16 Richard Henderson <rth@redhat.com>
1134 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1135 * parser.c (cp_parser_statement): Update commentary.
1136 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1137 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1138 * tree.c (mark_local_for_remap_r): Likewise.
1140 2004-06-16 Richard Henderson <rth@redhat.com>
1143 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1144 statement in FOR_INIT_STMT for templates.
1146 2004-06-15 Richard Henderson <rth@redhat.com>
1148 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1149 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1150 (genericize_try_block): Use gimplify_stmt.
1151 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1152 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1153 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1154 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1155 (cp_tree_chain_matters_p): Remove.
1156 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1157 (COMPOUND_STMT_BODY_BLOCK): New.
1158 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1159 (EXPR_STMT_STMT_EXPR_RESULT): New.
1160 (building_stmt_tree): Check cur_stmt_list.
1161 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1162 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1163 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1164 (cp_finish_decl): Use push_cleanup.
1165 (start_function, finish_function): Use statement lists.
1166 (finish_stmt): Do nothing.
1167 * except.c (begin_eh_spec_block): Use statement lists.
1168 (check_handlers_1, check_handlers): Likewise.
1169 * init.c (construct_virtual_base): Don't add extra compound stmts.
1170 (build_vec_init): Likewise.
1171 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1172 * name-lookup.h (struct cp_binding_level): Add statement_list.
1173 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1174 (cp_parser_labeled_statement, cp_parser_expression_statement,
1175 cp_parser_statement_seq_opt): Likewise.
1176 (cp_parser_compound_statement): Likewise. Take bool for try block.
1177 (cp_parser_selection_statement): Tidy if processing.
1178 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1179 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1180 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1181 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1182 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1183 (finish_cond): New, rewritten from FINISH_COND.
1184 (simplify_loop_decl_cond): New.
1185 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1186 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1187 begin_else_clause, finish_else_clause, finish_if_stmt,
1188 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1189 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1190 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1191 finish_switch_cond, finish_switch_stmt, begin_try_block,
1192 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1193 finish_handler_sequence, finish_function_handler_sequence,
1194 begin_handler, finish_handler_parms, finish_handler,
1195 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1196 using statement lists.
1197 (begin_compound_stmt): Replace has_no_scope argument with flags.
1198 Update all callers. Use statement lists.
1199 (finish_compound_stmt): Likewise.
1200 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1201 (current_scope_stmt_stack): Remove.
1202 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1203 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1204 Rewrite with statement lists.
1206 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1208 * parser.c: Change all assignments of c_lex_string_translate
1209 to true and false to 1 and 0.
1210 (cp_lexer_read_token): Convert type of the translated string.
1211 (cp_parser_skip_to_closing_parentheses): Preserve original
1212 value of c_lex_string_translate, and set it to -1 while
1214 (cp_parser_cache_group): Likewise.
1215 (cp_parser_cache_group_1): Renamed.
1216 (cp_parser_asm_operand_list): Remove redundant setting of
1217 c_lex_string_translate.
1218 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1219 Handle chained strings.
1221 2004-06-12 Andrew Pinski <apinski@apple.com>
1225 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1227 * cp-tree.h: Fix typo.
1229 * cp-tree.h: Include cgraph.h
1230 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1231 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1233 2004-06-12 Jason Merrill <jason@redhat.com>
1235 PR tree-optimization/14107
1236 * decl.c (finish_function): Warn about no return in all functions.
1238 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1240 * cp-tree.h (struct language_function): Remove cannot_inline.
1241 * decl.c (save_function_data): cannot_inline is no more.
1242 (cxx_push_function_context): Likewise.
1243 * decl2.c (start_objects, start_static_storage_duration_function):
1244 Reset DECL_INLINE, set DECL_UNINLINABLE.
1246 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1249 * search.c (lookup_field): Propagate the ambiguity list.
1250 (lookup_fnfields): Likewise.
1252 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1255 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1256 template keyword to disambiguate.
1258 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1261 * decl.c (grokdeclarator): Ignore pointer-to-members when
1262 computing template depth.
1265 * name-lookup.c (pushtag): Do not try to put class declarations in
1266 explicit specialization scopes.
1268 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1270 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1272 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1275 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1276 bindings for undeclared built-ins.
1278 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1280 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1281 appear at the correct location.
1283 2004-06-10 Jason Merrill <jason@redhat.com>
1287 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1288 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1289 TREE_TYPE for non-dependent names.
1290 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1291 unknown_type_node as its TREE_TYPE.
1292 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1293 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1294 (dump_expr) <SCOPE_REF case>: Likewise.
1296 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1299 * parser.c (cp_parser_direct_declarator): Robustify.
1302 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1303 constants in non-dependent contexts.
1307 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1310 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1313 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1316 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1320 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1321 * lex.c (handle_pragma_interface): Deprecate.
1322 (handle_pragma_implementation): Likewise.
1324 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1326 * g++spec.c (lang_specific_driver): Remove check for -lm
1327 and -lmath when check it see if it was the math library.
1329 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1332 * parser.c (cp_parser_direct_declarator): Reject constructor named
1333 as qualified template-id.
1335 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1338 * lex.c (handle_pragma_interface): Deprecate.
1339 (handle_pragma_implementation): Likewise.
1341 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1344 * parser.c (cp_parser_iteration_statement): Fix typo in error
1348 * pt.c (tsubst_default_argument): Do not defer access checks
1349 while substituting into the default argument.
1352 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1353 constant in a non-dependent context.
1356 * except.c (build_throw): Ensure that temp_expr has been
1359 2004-06-06 Roger Sayle <roger@eyesopen.com>
1361 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1363 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1366 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1367 'typename', and accept 'template'.
1369 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1370 Jan Hubicka <jh@suse.cz>
1373 * method.c (use_think): Do not mark thunk as referenced.
1375 2004-06-03 Matt Austern <austern@apple.com>
1378 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1379 is nonzero, and if we see a noninline definition of a key method,
1380 make the vtables nonweak.
1382 2004-06-02 Matt Austern <austern@apple.com>
1384 * cp-tree.h (instantiate_decl): new boolean parameter,
1385 undefined_ok. Current behavior is equivalent to its being 0.
1386 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1387 * pt.c (mark_decl_instantiated): Unconditionally make
1388 instantiations explicit unconditionally
1389 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1390 since mark_decl_instantiated now does it.
1391 (instantiate_class_member): New. Instantiate a member of an
1392 explicitly instantiated class template.
1393 (do_type_instantiation): Explicitly instantiate members of an
1394 explicitly instantiated class template.
1395 (instantiate_decl): if undefined_ok is nonzero, and if we're
1396 trying to explicitly instantiated a template with no definition,
1397 change it to an implicit instantiation.
1398 (instantiate_pending_templates): Add new argument to instantiate_decl.
1399 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1401 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1403 * cp-tree.h: Fix typo.
1405 * cp-tree.h: Include cgraph.h
1406 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1407 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1409 2004-06-01 Jason Merrill <jason@redhat.com>
1412 * call.c (call_builtin_trap): Remove type parm.
1413 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1414 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1416 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1419 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1420 TREE_TYPE for non-dependent names.
1421 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1422 unknown_type_node as its TREE_TYPE.
1423 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1424 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1425 (dump_expr) <SCOPE_REF case>: Likewise.
1427 2004-06-01 Richard Henderson <rth@redhat.com>
1428 Andrew Pinski <pinskia@physics.uc.edu>
1430 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1431 * parser.c (struct cp_parser): Remove in_offsetof.
1432 (cp_parser_new): Don't set it.
1433 (cp_parser_unary_expression): Don't check it.
1434 (cp_parser_postfix_open_square_expression): Split out from ...
1435 (cp_parser_postfix_expression): ... here.
1436 (cp_parser_postfix_dot_deref_expression): Likewise.
1437 (cp_parser_builtin_offsetof): New.
1438 (cp_parser_primary_expression): Use it.
1440 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1443 * parser.c (cp_parser_postfix_expression): Allow subscript
1444 operator in offsetof.
1446 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1449 * friend.c (add_friend): Do not try to perform access checks for
1450 functions from dependent classes.
1452 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1454 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1455 (pp_cxx_begin_template_argument_list): Turn into a function.
1456 (pp_cxx_end_template_argument_list): Likewise.
1457 (pp_cxx_separate_with): Define.
1458 (pp_cxx_unqualified_id): Tidy.
1459 (pp_cxx_primary_expression): Likewise.
1460 (pp_cxx_postfix_expression): Likewise.
1461 (pp_cxx_expression): Likewise.
1462 (pp_cxx_simple_type_specifier): Likewise.
1463 (pp_cxx_type_specifier_seq): Likewise.
1464 (pp_cxx_parameter_declaration_clause): Likewise.
1465 (pp_cxx_exception_specification): Likewise.
1466 (pp_cxx_direct_declarator): Likewise.
1467 (pp_cxx_type_id): Likewise.
1468 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1470 (pp_cxx_left_paren): Likewise.
1471 (pp_cxx_right_paren): Likewise.
1472 (pp_cxx_left_brace): Likewise.
1473 (pp_cxx_right_brace): Likewise.
1474 (pp_cxx_left_bracket): Likewise.
1475 (pp_cxx_right_bracket): Likewise.
1476 (pp_cxx_dot): Likewise.
1477 (pp_cxx_identifier): Likewise.
1478 (pp_cxx_tree_identifier): Likewise.
1479 (pp_cxx_ampersand): New macro.
1480 (pp_cxx_star): Likewise.
1481 (pp_cxx_arrow): Likewise.
1482 (pp_cxx_semicolon): Likewise.
1483 (pp_cxx_complement): Likewise.
1484 (pp_cxx_begin_template_argument_list): Declaree.
1485 (pp_cxx_end_template_argument_list): Likewise.
1486 (pp_cxx_colon_colon): likewise.
1488 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1490 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1493 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1495 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1496 typeck.c: Fix comment formatting.
1498 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1500 * cp-lang.c (cp_expand_decl): Remove.
1501 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1503 2004-05-30 Andreas Jaeger <aj@suse.de>
1505 * lang-specs.h: Add missing initializers for .ii.
1507 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1509 * decl.c (cp_make_fname_decl): Free return value from
1512 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1515 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1517 * init.c (build_new): Likewise.
1520 * name-lookup.c (arg_assoc): Robustify.
1523 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1524 when determining the scope to use for a pointer to member.
1525 (lookup_anon_field): Give it external linkage.
1526 * cp-tree.h (lookup_anon_field): Declare it.
1527 * expr.c (cplus_expand_constant): Use it.
1529 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1532 * parser.c (cp_parser_simple_type_specifier): Call
1533 maybe_note_name_used_in_class.
1535 2004-05-28 Tom Marshall <tmarshall@real.com>
1538 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1539 the class has friends.
1541 2004-05-27 Adam Nemet <anemet@lnxw.com>
1544 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1545 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1547 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1549 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1550 if it might be needed.
1551 * pt.c (mark_decl_instantiated): Only call defer_fn if
1552 the function actually needs processing in finish_file.
1553 * decl2.c (finish_file): Add check that elements in
1554 deferred_fns_used are really needed there. Remove unnecessary
1555 test of DECL_SAVED_TREE.
1557 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1559 * Make-lang.in: No need to specify $(LIBCPP).
1561 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1564 * parser.c (cp_parser_class_head): Robustify.
1567 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1569 (cp_parser_constructor_declarator_p): Treat attributes
1573 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1574 base classes in templates.
1576 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1579 * pt.c (instantiate_template): Robustify.
1581 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1584 * decl.c (xref_tag): Issue errors about redeclaring template
1585 classes as non-template classes.
1587 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1590 * name-lookup.c (supplement_binding): Allow redefinitions of
1594 * parser.c (cp_parser_template_argument): Robustify.
1596 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1598 * class.c (alter_access): Use %E format specifier to print an
1599 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1600 (push_lang_context): Likewise.
1601 * decl.c (lookup_label): Likewise.
1602 (grokdeclarator): Likewise.
1603 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1604 * pt.c (do_type_instantiation): Likewise.
1605 * tree.c (handle_java_interface_attribute): Likewise.
1606 (handle_com_interface_attribute): Likewise.
1607 (handle_init_priority_attribute): Likewise.
1609 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1613 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1614 recognized as overloaded functions.
1616 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1619 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1620 layout conflicts for unions.
1623 * typeck.c (build_x_unary_op): Instantiate template class
1624 specializations before looking for "operator &".
1627 * typeck.c (complete_type): Layout non-dependent array types, even
1631 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1634 2004-05-22 Roger Sayle <roger@eyesopen.com>
1636 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1637 returning when TREE_TYPE is error_mark_node.
1638 * typeck.c (require_complete_type): Return error_mark_node if
1639 value's type is an error_mark_node.
1641 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1643 * optimize.c (calls_setjmp_r): Remove.
1644 (calls_setjmp_p): Remove.
1645 * cp-tree.c (calls_setjmp_p): Remove.
1646 * decl.c (finish_function): Do not call calls_setjmp_p.
1648 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1650 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1651 * decl2.c (maybe_make_one_only): Likewise.
1652 * method.c (use_thunk): Likewise.
1654 2004-05-18 Jason Merrill <jason@redhat.com>
1656 * class.c (build_base_path): Tidy a bit.
1658 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1660 * name-lookup.c (struct scope_binding): New.
1661 (EMPTY_SCOPE_BINDING): New.
1662 (lookup_using_namespace): Take a scope_binding instead of a
1664 (qualified_lookup_using_namespace): Likewise.
1665 (cxx_binding_clear): Delete.
1666 (do_nonmember_using_decl): Use a scope_binding instead of a
1668 (lookup_tag): Don't call select_decl.
1669 (ambiguous_decl): Don't return anything (and change callers to match).
1670 Take a scope_binding as the second parameter.
1671 (lookup_namespace_name): Use a scope_binding instead of a
1673 (unqualified_namespace_lookup): Likewise.
1674 (lookup_qualified_name): Likewise.
1675 (select_decl): Take a scope_binding instead of a cxx_binding.
1676 Use macros rather than hand-coding tests for type-ness.
1678 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1680 * cp-gimplify.c: Rename from cp-simplify.c.
1681 * Make-lang.in, optimize.c: Update.
1683 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1685 Merge from tree-ssa-20020619-branch. See
1686 ChangeLog.tree-ssa for details.
1688 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1689 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1690 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1691 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1693 * cp-mudflap.c: New file.
1694 * cp-simplify.c:: New file.
1696 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1699 * decl2.c (check_classfn): For member templates, compare also the
1700 template parameters to match the declaration.
1701 * cp-tree.h: Adjust declaration of check_classfn.
1702 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1703 * friend.c (do_friend): Likewise.
1704 * pt.c (tsubst_friend_function): Likewise.
1706 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1708 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1709 Instead, dig into the representation type to find the array bound.
1711 2004-04-30 Jason Merrill <jason@redhat.com>
1713 Refer to base members using COMPONENT_REFs where possible.
1714 * class.c (build_simple_base_path): New fn.
1715 (build_base_path): Use it for non-virtual base references.
1716 (layout_class_type): Change base fields to their real type
1717 after layout is done.
1718 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1719 * cp-lang.c (cxx_get_alias_set): Use it.
1721 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1723 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1726 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1729 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1730 used in integral constant expressions.
1732 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1734 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1737 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1739 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1740 * decl.c (reshape_init): Use it.
1741 * init.c (perform_member_init): Remove redundant condition.
1742 (build_aggr_init): Adjust to handle brace-enclosed initializers
1744 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1746 * parser.c (cp_parser_initializer_clause): Do not set
1747 TREE_HAS_CONSTRUCTOR on the initializer.
1748 * rtti.c (tinfo_base_init): Likewise.
1749 (generic_initializer): Likewise.
1750 (ptr_initializer): Likewise.
1751 (ptm_initializer): Likewise.
1752 (class_initializer): Likewise.
1753 (get_pseudo_ti_init): Likewise.
1754 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1756 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1758 * name-lookup.c (anonymous_namespace_name): Make static.
1760 2004-04-19 Roger Sayle <roger@eyesopen.com>
1763 * class.c (build_base_path): Call fold whilst building the NULL
1764 pointer check expression trees.
1766 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1768 * init.c (build_new_1): Don't use type size argument for Java
1769 _Jv_AllocObject call.
1771 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1773 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1774 declaration and definition.
1776 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1779 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1780 than ASM_OUTPUT_DEF.
1782 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1784 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1785 current_function_decl == NULL.
1787 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1790 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1793 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1795 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1797 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1798 or TREE_SIDE_EFFECTS of a type.
1800 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1803 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1804 cv-qualifier unification.
1805 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1807 2004-04-02 Jan Hubicka <jh@suse.cz>
1809 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1810 * cp-tree.h (cp_update_decl_after_saving): Declare.
1811 * tree.c (cp_update_decl_after_saving): Define.
1813 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1816 * typeck.c (get_delta_difference): Call fold before returning the
1819 2004-04-01 Richard Henderson <rth@redhat.com>
1822 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1823 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1825 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1828 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1830 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1832 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1834 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1836 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1837 * class.c (check_bitfield_decl): Likewise.
1838 * cvt.c (type_promotes_to): Likewise.
1839 * decl.c (finish_enum): Likewise.
1840 * mangle.c (write_builtin_type): Likewise.
1841 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1842 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1843 (build_binary_op): Likewise.
1845 2004-03-31 Jan Hubicka <jh@suse.cz>
1847 * tree.h (optimize_function): Kill prototype.
1848 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1849 * semantics.c (expand_body): Kill.
1851 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1854 * decl.c (start_decl_1): Do not decide whether or not to create a
1855 new cleanup level until after the type has been completed.
1858 * pt.c (tsubst_default_argument): Clear current_function_decl.
1860 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1862 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1864 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1866 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1867 is null, just print the literal name and return.
1869 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1871 * cxx-pretty-print.c: Fix comment typos.
1873 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1875 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1878 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1880 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1881 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1884 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1886 PR 12267, 12391, 12560, 13129, 14114, 14133
1887 * cp-lang.c (c_reset_state): Delete.
1888 (push_file_scope, pop_file_scope): New stubs.
1889 * parser.c (c_parse_file): Call sorry() here if called more than once.
1891 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1893 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1896 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1898 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1900 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1902 * error.c (enum pad): Remove.
1903 (dump_qualifiers): Likewise.
1904 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1905 (dump_aggr_type): Likewise.
1906 (dump_type_suffix): Likewise.
1907 (dump_simple_decl): Likewise.
1908 (dump_function_decl): Likewise.
1909 (cv_to_string): Likewise.
1910 (dump_type_prefix): Likewise. Adjust return void.
1911 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1913 (pp_cxx_template_keyword_if_needed): Document.
1914 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1915 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1916 MUST_NOT_THROW_EXPR.
1918 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1921 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1922 templates, if their type is non-dependent.
1924 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1926 * call.c (build_op_delete_call): Do not forget the placement
1927 arguments when iterating through mutiple delete operators.
1929 * cp-tree.h (svaed_scope): Remove last_parms.
1930 (NEW_DELETE_OPNAME_P): New macro.
1931 (last_function_parms): Remove.
1932 (do_friend): Adjust prototype.
1933 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1934 using last_function_parms.
1935 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1936 using last_function_parms.
1937 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1938 for class-specific operator new and operator delete.
1939 (grok_op_properties): Do not look for allocation functions with
1941 (start_function): Use DECL_ARGUMENTS instead of
1942 last_function_parms.
1943 * decl.h (last_function_parms): Do not declare.
1944 * decl2.c (grokclassfn): Do not use last_function_parms.
1945 * friend.c (do_friend): Remove parmdecls parameter.
1946 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1947 (pop_from_top_level): Do not restore it.
1948 * pt.c (check_explicit_specialization): Do not adjust
1949 last_function_parms.
1951 * name-lookup.c (do_local_using_decl): Create a local binding for
1952 types brought in via using declarations.
1954 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1955 function declarations correctly.
1957 * semantics.c (finish_id_expression): Correct handling of
1958 conversion operators to dependent types.
1960 * typeck.c (lookup_destructor): Allow the use of destructors from
1963 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1965 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1966 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1967 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1968 the field is named TEMPLATE_TYPE_PARM_INDEX.
1970 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1973 * parser.c (cp_parser_functional_cast): A cast to anything
1974 but integral or enumaration type is not an integral constant
1976 * pt.c (value_dependent_expression_p): Handle cast expressions
1977 without operands (such as "int()").
1979 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1981 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1982 cv-qualification between the type named by the
1983 pseudo-destructor-name and the object-type.
1985 * search.c (accessible_base_p): Handle non-proper bases.
1987 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1988 refers to a single overloaded function, set the type of the
1990 * tree.c (lvalue_type): Simplify.
1991 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1993 (build_unary_op): Handle OVERLOADs with known types.
1995 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1998 * parser.c (cp_parser_postfix_expression): Handle the use of
1999 "typename" in non-dependent contexts. Convert appropriately when
2000 when using a qualified name after "->" or ".".
2002 * call.c (conditional_conversion): Honor the requirement that some
2003 conversions refer to the original object.
2005 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2007 * call.c (build_conditional_expr): Do not call force_rvalue for
2008 operands of void_type when the conditional expression itself has
2010 * name-lookup.c (pushdecl): Don't consider a declaration of a
2011 function named "main" to be an overload of a type named "main".
2012 * parser.c (cp_parser_template_name): Perform name lookup when the
2013 template name is proceeded by "template" if the qualifying scope
2015 * typeck.c (composite_pointer_type_r): Correctly handle
2016 pointer-to-member types.
2017 (build_const_cast): Likewise.
2019 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2021 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2022 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2023 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2024 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2025 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2026 (TYPEOF_TYPE_EXPR): New macro.
2027 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2028 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2029 * pt.c (tsubst): Likewise.
2030 * semantics.c (finish_typeof): Likewise.
2031 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2032 and TEMPLATE_TYPE_PARM.
2033 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2034 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2036 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2039 * cp-tree.h (build_new_op): Change prototype.
2040 (build_x_binary_op): Likewise.
2041 * call.c (build_new_op): Add overloaded_p parameter.
2042 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2043 * parser.c (cp_parser_binary_expression): Note that uses of
2044 overloaded operators prevents an expression from being considered
2045 an integral constant.
2046 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2048 * semantics.c (finish_call_expr): Likewise.
2049 * typeck.c (rationalize_conditional_expr): Likewise.
2050 (build_x_indirect_ref): Likewise.
2051 (build_x_binary_op): Likewise.
2052 (build_x_unary_op): Likewise.
2053 (build_x_compound_expr): Likewise.
2054 (build_modify_expr): Likewise.
2055 * typeck2.c (build_x_arrow): Likewise.
2057 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2059 * cp-lang.c, ptree.c: Update copyright.
2061 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2064 * parser.c (cp_parser_non_integral_constant_expression): Encode
2065 more of the idiom that surrounded calls to this function within
2067 (cp_parser_primary_expression): Adjust accordingly.
2068 (cp_parser_postfix_expression): Likewise.
2069 (cp_parser_unary_expression): Likewise.
2070 (cp_parser_cast_expression): Likewise.
2071 (cp_parser_assignment_expression): Likewise.
2072 (cp_parser_expression): Likewise.
2073 (cp_parser_new_expression): Note that new-expressions are not
2074 allowed in integral constant expressions.
2075 (cp_parser_delete_expression): Likewise.
2077 2004-03-12 Matt Austern <austern@apple.com>
2079 * decl2.c (maybe_make_one_only): Look at
2080 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2081 to make an explicit instantiation weak.
2082 * method.c (use_thunk): Make sure we call comdat_linkage
2084 * pt.c (do_type_instantiation): On systems where weak symbols
2085 don't go in a static archive's TOC, explicit instantiation of a
2086 class must imply *explicit* instantiation of its memeber.
2088 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2090 * call.c, cp-tree.h, pt.c: Fix comment typos.
2092 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2095 * decl.c (xref_tag): Disregard non-type declarations when
2096 looking up a tagged type.
2098 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2101 * call.c (convert_like_real): Build a const qualified temporary,
2102 when testing ctor access.
2104 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2106 * call.c (initialize_reference): Fix typo.
2108 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2111 * pt.c (determine_specialization): For member templates, match also
2115 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2117 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2119 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2122 * call.c (initialize_reference): Handle initializers that are
2123 class-member access expressions applies to rvalues.
2125 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2128 * name-lookup.c (supplement_binding): Ignore functions that are
2129 marked DECL_ANTICIPATED.
2131 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2134 * class.c (check_field_decls): Complain about non-static data
2135 members of reference type in unions. Propagate
2136 CLASSTYPE_REF_FIELDS_NEED_INIT and
2137 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2139 * init.c (perform_member_init): Complain about mbmers with const
2140 type that are not explicitly initialized.
2142 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2144 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2145 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2146 (lang_identifier): Remove implicit_decl and error_locus.
2147 (IDENTIFIER_IMPLICIT_DECL): Remove.
2148 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2149 (IDENTIFIER_ERROR_LOCUS): Likewise.
2150 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2151 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2152 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2153 (implicitly_declare): Remove.
2154 * decl.c (warn_extern_redeclared_static): Remove check of
2155 IDENTIFIER_IMPLICIT_DECL.
2156 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2157 (implicitly_declare): Remove.
2158 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2159 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2160 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2161 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2162 in the innermost scope, rather than at namespace scope.
2163 * name-lookup.c (push_local_binding): Give it external linkage.
2164 (pushdecl): Remove dead code.
2165 * name-lookup.h (push_local_binding): Declare it.
2166 * ptree.c (cxx_print_identifier): Don't print
2167 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2168 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2169 not IDENTIFIER_ERROR_LOCUS.
2170 * typeck.c (build_function_call): Remove dead code.
2172 2004-03-08 Jason Merrill <jason@redhat.com>
2175 * decl.c (xref_tag): Remove attribute handling.
2176 * cp-tree.h: Adjust prototype.
2177 * decl.c, parser.c, rtti.c: Adjust callers.
2178 * parser.c (cp_parser_class_head): Pass back attributes in the
2180 (cp_parser_class_specifier): Adjust.
2182 2004-03-08 Matt Austern <austern@apple.com>
2185 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2186 as static, to static_decls array.
2188 2004-03-05 Jason Merrill <jason@redhat.com>
2190 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2192 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2194 * decl.c (grokfndecl): Update old incorrect comment.
2195 (grokvardecl): Diagnose C++ variables of type with no linkage.
2197 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2200 * pt.c (build_non_dependent_expr): Do not create a
2201 NON_DEPENDENT_EXPR for a THROW_EXPR.
2203 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2206 * error.c (dump_expr): Handle THROW_EXPR.
2208 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2211 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2212 lookup if ordinary name-lookup finds a non-function.
2213 * pt.c (tsubst_copy_and_build): Likewise.
2216 * parser.c (cp_parser_late_parsing_default_args): Check that there
2217 are no extra tokens after the end of the default-argument
2220 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2223 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2224 having C++ linkage for name-mangling purposes.
2227 * parser.c (cp_parser_direct_declarator): Recognize constructor
2228 declarators that use a template-id to name the class being
2232 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2233 (tsubst_expr): Do not call tsubst_copy, even when
2234 processing_template_decl.
2236 2004-03-01 Jeff Law <law@redhat.com>
2238 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2241 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2244 * name-lookup.h (push_scope): Change prototype.
2245 * name-lookup.c (push_scope): Do not reenter the current class
2247 * decl.c (grokfndecl): Check return code from push_scope before
2249 * decl2.c (check_classfn): Likewise.
2250 * parser.c (cp_parser_conversion_function_id): Likewise.
2251 (cp_parser_init_declarator): Likewise.
2252 (cp_parser_direct_declarator): Likewise.
2253 (cp_parser_class_specifier): Likewise.
2254 (cp_parser_class_head): Likewise.
2255 (cp_parser_lookup_name): Likewise.
2256 (cp_parser_constructor_declarator_p): Likewise.
2257 * pt.c (instantiate_class_template): Likewise.
2258 (resolve_typename_type): Likewise.
2260 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2263 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2267 * class.c (update_vtable_entry_for_fn): Do not go through
2268 covariance machinery if the type returned by an overrider is the
2269 same as the original.
2271 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2273 * call.c: Fix a comment typo.
2275 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2277 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2279 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2282 * parser.c (cp_parser_parameter_declaration_list): Commit
2283 to fewer tentative parses.
2285 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2288 * pt.c (dependent_type_p_r): A template template parameter is a
2291 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2294 * mangle.c (write_template_arg_literal): Don't rely on identity for
2297 2004-02-24 Jason Merrill <jason@redhat.com>
2299 * tree.c (build_exception_variant): Use check_qualified_type.
2301 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2302 Kazu Hirata <kazu@cs.umass.edu>
2304 * decl.c (cxx_init_decl_processing): Don't check
2305 flag_writable_strings.
2307 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2310 * typeck.c (maybe_warn_about_returning_address_of_location):
2311 Change check for VAR_DECL to use DECL_P instead.
2313 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2316 * cvt.c (build_expr_type_conversion): Type must be complete before
2317 looking up for conversions.
2319 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2322 * name-lookup.c (arg_assoc_class): Don't look into template
2323 arguments if it is not a primary template.
2325 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2328 * method.c (use_thunk): Always clone function argument tree.
2330 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2333 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2336 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2337 for all type variants.
2339 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2342 * decl.c (duplicate_decls): Return error_mark_node for invalid
2344 * name-lookup.c (push_namespace): Ignore the return value from
2346 * pt.c (push_template_decl_real): Robustify.
2349 * name-lookup.c (push_class_level_binding): Do not complain about
2350 adding a binding for a member whose name is the same as the
2351 enclosing class if the member is located in a base class of the
2354 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2357 * parser.c (cp_parser_new_expression): Parse an ill-formed
2358 direct-new-declarator after a parenthesized type-id to emit good
2361 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2363 * cp-tree.def, cvt.c: Update copyright.
2365 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2368 * cp-tree.h (abi_version_at_least): Remove.
2369 * mangle.c: Include flags.h.
2371 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2374 * call.c (build_conditional_expr): Handle conversions between
2375 class types which result in differently cv-qualified type
2379 * class.c (delete_duplicate_fields_1): Remove.
2380 (delete_duplicate_fields): Likewise.
2381 (finish_struct_anon): Remove check for members with the same name
2382 as their enclosing class.
2383 (check_field_decls): Do not call duplicate_fields.
2384 * decl.c (grokdeclarator): Remove check for static data members
2385 with the same name as their enclosing class.
2386 * name-lookup.c (push_class_level_binding): Check for members with
2387 the same name as their enclosing class.
2389 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2392 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2394 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2397 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2398 has full set of arguments.
2400 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2403 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2405 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2408 * cp-tree.h (delete_sanity): Change prototype.
2409 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2410 Remove dead code. Adjust code to warn about deleting an array.
2411 * typekc.c (decay_conversion): Use build_address and build_nop.
2414 * search.c (accessible_p): Do not check access in thunks.
2417 * call.c (build_conditional_expr): Call force_rvalue on the
2418 non-void operand in the case that one result is a throw-expression
2419 and the other is not.
2421 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2424 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2425 the type name and look ahead for ::~, and bail out early with a
2426 better error message if the parse is going to fail.
2428 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2430 * call.c (conversion_kind): New type.
2431 (conversion_rank): Likewise.
2432 (conversion): Likewise.
2433 (CONVERSION_RANK): New macro.
2434 (conversion_obstack): New variable.
2435 (obstack_initialized): Likewise.
2436 (z_candidate): Change type of convs and second_conv.
2437 (candidate_warning): New type.
2438 (IDENTITY_RANK): Remove.
2439 (EXACT_RANK): Likewise.
2440 (PROMO_RANK): Likewise.
2441 (STD_RANK): Likewise.
2442 (PBOOL_RANK): Likewise.
2443 (USER_RANK): Likewise.
2444 (ELLIPSIS_RANK): Likewise.
2445 (BAD_RANK): Likewise.
2446 (ICS_RANK): Likewise.
2447 (ICS_STD_RANK): Likewise.
2448 (ICS_USER_FLAG): Likewise.
2449 (ICS_ELLIPSIS_FLAG): Likewise.
2450 (ICS_THIS_FLAG): Likewise.
2451 (ICS_BAD_FLAG): Likewise.
2452 (NEED_TEMPORARY_P): Likewise.
2453 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2454 (USER_CONV_CAND): Likewise.
2455 (USER_CONV_FN): Likewise.
2456 (conversion_obstack_alloc): New function.
2457 (alloc_conversion): Likewise.
2458 (validate_conversion_obstack): Likewise.
2459 (alloc_conversions): Likewise.
2460 (build_conv): Adjust to deal with new conversion data structures.
2461 (build_identity_conv): New function.
2462 (build_ambiguous_conv): Likewise.
2463 (standard_conversion): Adjust to deal with new conversion data
2465 (convert_class_to_reference): Likewise.
2466 (direct_reference_binding): Likewise.
2467 (reference_binding): Likewise.
2468 (implicit_conversion): Likewise.
2469 (add_candidate): Likewise.
2470 (add_function_candidate): Likewise.
2471 (add_conv_candidate): Likewise.
2472 (build_builtin_candidate): Likewise.
2473 (print_z_candidate): Likewise.
2474 (merge_conversion_sequences): Likewise.
2475 (build_user_type_conversion_1): Likewise.
2476 (build_user_type_conversion): Likewise.
2477 (build_new_function_call): Likewise.
2478 (build_object_call): Likewise.
2479 (conditional_conversion): Likewise.
2480 (build_conditional_expr): Likewise.
2481 (build_new_op): Likewise.
2482 (build_op_delete_call): Likewise.
2483 (convert_like_real): Likewise.
2484 (build_over_call): Likewise.
2485 (build_new_method_call): Likewise.
2486 (is_subseq): Likewise.
2487 (maybe_handle_implicit_object): Likewise.
2488 (maybe_handle_ref_bind): Likewise.
2489 (compare_ics): Likewise.
2490 (source_type): Likewise.
2491 (add_warning): Likewise.
2493 (can_convert_arg): Likewise.
2494 (can_convert_arg_bad): Likewise.
2495 (perform_implicit_conversion): Likewise.
2496 (perform_direct_initialization_if_possible): Likewise.
2497 (initialize_reference): Likewise.
2498 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2499 * cp-tree.def (WRAPPER): Likewise.
2500 (IDENTITY_CONV): Remove.
2501 (LVALUE_CONV): Likewise.
2502 (QUAL_CONV): Likewise.
2503 (STD_CONV): Likewise.
2504 (PTR_CONV): Likewise.
2505 (PMEM_CONV): Likewise.
2506 (BASE_CONV): Likewise.
2507 (REF_BIND): Likewise.
2508 (USER_CONV): Likewise.
2509 (AMBIG_CONV): Likewise.
2510 (RVALUE_CONV): Likewise.
2511 * cp-tree.h (tree_wrapper): Remove.
2512 (WRAPPER_ZC): Remove.
2513 (lang_tree_node): Remove wrapper.
2514 (LOOKUP_SPECULATIVELY): Remove.
2515 (build_op_delete_call): Adjust prototype.
2516 (validate_conversion_obstack): Declare.
2517 (build_zc_wrapper): Remove.
2518 * cvt.c (convert_to_reference): Remove dead code.
2519 (ocp_convert): Likewise.
2520 * decl.c (redeclaration_error_message): Correct handling of
2522 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2523 (cp_tree_node_structure): Remove WRAPPER case.
2524 * decl2.c (finish_file): Call validate_conversion_obstack.
2525 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2526 (build_op_delete_call): Likewise.
2527 (build_x_delete): Likewise.
2528 (build_delete): Adjust call to build_op_delete_call.
2529 * pt.c (tsubst_friend_declaration): Adjust code to determine
2530 whether or not a friend template is a definition.
2531 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2532 * tree.c (build_zc_wrapper): Remove.
2534 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2536 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2537 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2538 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2539 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2541 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2543 * typeck.c (lookup_destructor): Fix typo in error message.
2545 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2547 * call.c, parser.c, tree.c: Fix comment typos.
2549 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2552 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2553 * decl.c (duplicate_decls, start_function): Likewise.
2555 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2557 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2558 * parser.c (free_parser_stacks): Delete.
2560 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2562 * rtti.c: Update copyright.
2564 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2567 * decl.c (require_complete_types_for_parms): Do not insert
2568 error_mark_node in the parameter list.
2570 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2573 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2574 error when terminator can not be found.
2576 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2578 Make-lang.in (po-generated): Delete.
2580 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2582 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2583 targetm.calls.promote_prototypes.
2585 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2589 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2591 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2592 (handle_pragma_implementation): Likewise.
2594 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2597 * typeck.c (lookup_destructor): Tweak error message.
2599 2004-02-05 Jan Hubicka <jh@suse.cz>
2601 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2604 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2607 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2608 code, only emits the diagnostic now. Added lookup of the identifier
2609 and support for qualified ids.
2610 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2611 Parse an (invalid) type name as id-expression within a declarator.
2612 (cp_parser_simple_declaration): Use it.
2613 (cp_parser_member_declaration): Likewise.
2614 (cp_parser_make_typename_type): New function. Handle errors through
2615 cp_parser_diagnose_invalid_typename.
2616 (cp_parser_elaborated_type_specifier): Use it.
2618 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2621 * call.c (convert_like_real): Use "converting" rather than
2622 "argument" as the descriptive keyword to
2623 dubious_conversion_warnings.
2624 * typeck.c (convert_for_assignment): Do not call
2625 dubious_conversion_warnings.
2627 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2630 * init.c (build_delete): Emit a more informative error message in
2631 case of an incomplete type, and on the correct source line.
2633 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2635 * error.c, search.c: Update copyright.
2637 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2640 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2641 linkage for the typeinfo name string.
2643 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2646 * cp-tree.h (fold_non_dependent_expr): New function.
2647 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2648 (cp_parser_template_argument): Use fold_non_dependent_expr.
2649 (cp_parser_direct_declarator): Likewise.
2650 * pt.c (fold_non_dependent_expr): New function.
2651 (convert_nontype_argument): Use it.
2652 (tsubst_qualified_id): Simplify.
2653 (tsubst_copy_and_build): Likewise.
2655 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2657 * decl.c (cxx_push_function_context): Do not set
2658 current_function_is_thunk.
2659 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2662 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2665 * pt.c (more_specialized_class): Increase processing_template_decl
2666 while partial ordering.
2668 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2671 * decl.c (start_function): Do not call pushdecl for any
2672 instantiation or specialization of a primary template.
2674 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2677 * parser.c (cp_parser_class_name): Robustify.
2680 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2683 * semantics.c (finish_id_expression): Do not return an
2684 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2686 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2689 * pt.c (build_non_dependent_expr): Do not build
2690 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2693 * semantics.c (finish_id_expression): Do not return an
2694 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2697 * parser.c (cp_parser_simple_declaration): When skipping to the
2698 end of the statement swallow the terminating semicolon.
2700 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2703 * init.c (build_offset_ref): Improve error recovery for invalid
2704 uses of non-static member functions.
2707 * cp-tree.h (cp_build_type_attribute_variant): New function.
2708 * class.c (build_clone): Use cp_build_type_attribute_variant.
2709 * decl.c (duplicate_decls): Likewise.
2710 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2711 (tsubst_function_type): Likewise.
2712 * tree.c (build_exception_variant): Check attributes before
2713 concluding that two types are the same.
2714 (cp_build_type-attribute_variant): New method.
2715 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2718 * call.c (convert_class_to_reference): Keep better track of
2719 pedantically invalid user-defined conversions.
2721 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2724 * pt.c (tsubst_qualified_id): Improved error message when a type
2725 is expected but not found.
2727 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2729 * class.c: Fix comment typos.
2731 * error.c: Likewise.
2732 * parser.c: Likewise.
2734 * search.c: Likewise.
2735 * typeck.c: Likewise.
2737 2004-01-30 Richard Henderson <rth@redhat.com>
2740 * method.c (use_thunk): Don't force_target_expr for void thunks.
2741 * tree.c (build_target_expr_with_type): Assert non-void type.
2742 (force_target_expr): Likewise.
2744 2004-01-30 Michael Matz <matz@suse.de>
2746 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2748 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2752 * decl.c (grokdeclarator): Check immediatly type completeness for
2753 non-dependent types.
2755 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2758 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2759 a sizeof expression.block
2761 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2764 * mangle.c (write_encoding): Correct encoding of member template
2767 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2769 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2770 template name as it was `<::' (digraph typo).
2771 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2772 (cp_parser_id_expression): Use it.
2773 (cp_parser_nested_name_specifier_opt): Likewise.
2774 (cp_parser_template_name): Likewise.
2775 (cp_parser_class_name): Likewise.
2776 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2778 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2781 * typeck.c (merge_types): Do not merge attributes into
2785 * parser.c (cp_parser_direct_declarator): Do not prevent
2786 backtracking inside a parenthesized declarator.
2787 (cp_parser_parameter_declaration): Fix typo in comment.
2789 2004-01-28 Jan Hubicka <jh@suse.cz>
2791 * semantics.c (expand_body) Do emit_associated_thunks before
2794 2004-01-27 Devang Patel <dpatel@apple.com>
2796 * name-lookup.c: Include "debug.h"
2797 (do_namespace_alias): Invoke debug_hooks to emit debug info
2798 for namespace alias.
2799 (do_local_using_decl): Invoke debug_hooks to emit debug info
2801 (do_class_using_decl): Same.
2802 (do_toplevel_using_decl): Same.
2803 (do_using_directive): Same.
2804 (cp_emit_debug_info_for_using): New function.
2805 * Make-lang.in (cp/parser.o): Depend on debug.h
2806 (cp/name-lookup.o): Same.
2808 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2810 * cp-tree.h (language_function, lang_type_header): Use
2812 * name-lookup.h (cp_binding_level): Likewise.
2814 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2817 * semantics.c (finish_for_expr): Check for unresolved overloaded
2820 * class.c (add_method): Just check processing_template_decl to
2821 determine whether or not we are within a template.
2822 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2823 * init.c (decl_constant_value): Check the type of the declaration,
2825 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2826 (push_to_top_level): ... this.
2827 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2828 * pt.c (push_template_decl_real): Reorder condition for speed.
2829 (convert_template_argument): Use dependency-checking functions in
2830 place of uses_template_parms.
2831 (lookup_template_class): Avoid calling uses_template_parms more
2833 (uses_template_parms): Reimplement, using dependency-checking
2835 (instantiate_class_template): Use push_to_top_level, not
2836 maybe_push_to_top_level.
2837 (type_unification_real): Simplify.
2838 (type_dependent_expression_p): Handle OFFSET_REFs and
2840 (any_dependent_template_arguments_p): Handle multiple levels of
2842 * semantics.c (expand_or_defer_fn): Do not check
2843 uses_template_parms for template instantiations.
2844 * typeck.c (comptypes): Avoid calling cp_type_quals.
2846 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2849 * call.c (build_over_call): Do not convert arguments when
2850 processing a template.
2851 * pt.c (build_non_dependent_expr): Do not build a
2852 NON_DEPENDENT_EXPR for arithmetic constants.
2854 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2857 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2858 returns a TYPE_DECL. no further lookup is required.
2859 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2860 is invalid. Rework to give better diagnostics.
2862 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2865 * pt.c (instantiate_class_template): Add an error_mark_node
2867 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2869 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2872 * decl.c (finish_function): Move the call to
2873 finish_fname_decls below the call to
2874 finish_eh_spec_block.
2876 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2878 * optimize.c, typeck2.c: Update copyright.
2880 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2882 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2883 init.c, mangle.c, typeck.c: Update copyright.
2885 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2887 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2889 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2891 * Make-lang.in: Replace $(docdir) with doc.
2892 (c++.info, c++.srcinfo): Dummy entry.
2893 (c++.man, c++.srcman): New rules.
2894 (c++.install-man): Revamp rule.
2896 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2898 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2899 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2900 immediate $(shell) instead of deferred backquote.
2902 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2905 * parser.c (cp_parser_postfix_expression): When encountering
2906 incomplete type on left-hand side of "->" or ".", treat the entire
2907 expression as erroneous.
2910 * call.c (build_field_call): Remove.
2911 (n_build_method_call): Likewise.
2912 (build_method_call): Likewise.
2913 (build_new_method_call): Do not call build_field_call.
2914 * class.c (n_build_method_call): Remove.
2915 (print_class_statistics): Do not print it.
2916 * cp-tree.h (build_method_call): Remove declaration.
2917 (finish_object_call_expr): Likewise.
2918 (build_new_1): Do not use build_method_call.
2919 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2920 when the function appearing on the right-hand-side of "." or "->"
2921 is not actually a function.
2922 * pt.c (tsubst_copy_and_build): Likewise.
2923 * semantics.c (finish_object_call_expr): Remove.
2925 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2928 * pt.c (tsubst): Use finish_typeof.
2930 2004-01-18 Jason Merrill <jason@redhat.com>
2933 * except.c (build_throw): In a template, set
2934 current_function_returns_abnormally.
2936 2004-01-17 Fred Fish <fnf@intrinsity.com>
2939 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2940 except don't call array_type_nelts() with a VECTOR_TYPE.
2942 2004-01-16 Jan Hubicka <jh@suse.cz>
2944 * mangle.c (write_mangled_name): Remove inline modifier.
2946 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2949 * decl.c (compute_array_index_type): Fix grammar in comment.
2950 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2953 * call.c (name_as_c_string): Print conversion operator names
2957 * call.c (initialize_reference): Pass -1 for inner parameter to
2960 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2963 * parser.c (cp_parser_base_specifier): Check for an invalid
2964 keyword `typename' and emit an user-friendly error message.
2966 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2969 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2970 (handle_pragma_implementation): Likewise.
2972 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2975 * typeck.c (build_class_member_access_expr): Allow to access members
2976 of the currently open class.
2977 (finish_class_member_access_expr): Likewise.
2979 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2982 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2983 name by value, instead of computing them.
2984 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2985 arguments. Pass them to validate_nonmember_using_decl.
2986 * name-lookup.h (do_local_using_decl): Adjust.
2987 (do_toplevel_using_decl): Likewise.
2988 * parser.c (cp_parser_using_declaration): Likewise.
2989 * pt.c (tsubst_expr): Likewise.
2991 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2995 * name-lookup.c (qualified_lookup_using_namespace): Search
2996 strongly-associated namespaces first, and only then try other
2999 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3001 * Make-lang.in (c++.srcextra): Dummy entry.
3003 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3006 * parser.c (cp_parser_template_name): Don't try to parse a
3007 conversion-function-id, as it cannot be a template-name.
3008 (cp_parser_simple_type_specifier): Check for invalid template-ids
3009 even after a built-in type.
3011 2004-01-14 Jan Hubicka <jh@suse.cz>
3014 * pt.c (instantiate_decl): Do not increase function_depth.
3016 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3020 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3021 attributes and discard.
3022 * decl.c (xref_tag): Don't overwite existing attributes with
3025 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3028 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3029 is no destructor while looking up a BIT_NOT_EXPR.
3031 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3033 * cxxfilt.c: Remove unused file.
3035 2004-01-14 Jan Hubicka <jh@suse.cz>
3037 Partial fix to PR c++/12850
3038 * decl2.c (mark_used): Do not proactively instantiate templates
3039 when compiling in unit-at-a-time or not optimizing.
3040 * optimize.c (maybe_clone_body): Do not increase function depth.
3042 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3045 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3047 2004-01-12 Steven Bosscher <stevenb@suse.de>
3050 * parser.c (cp_parser_member_declaration): Any non-type is also
3051 not a class or a function.
3053 2004-01-12 Jason Merrill <jason@redhat.com>
3056 * class.c (build_base_path): Do not mark vtable references as
3058 (build_vtbl_ref_1): Likewise.
3060 2004-01-12 Richard Henderson <rth@redhat.com>
3063 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3064 (store_init_value): Use it.
3065 * decl.c (check_initializer): Expect full initialization code
3066 from store_init_value.
3067 * init.c (expand_aggr_init_1): Likewise.
3068 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3070 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3072 * class.c (layout_class_type): For non-POD class types, also copy
3073 the DECL_SIZE and DECL_MODE of fields to the base class type.
3075 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3078 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3079 calling regenerate_decl_from_template.
3081 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3084 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3085 decl-specifier occurring along with a class definition.
3087 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3089 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3090 clauses to comments describing declares_class_or_enum.
3091 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3094 2004-01-12 Jan Hubicka <jh@suse.cz>
3096 * pt.c (for_each_template_parm): Do not check for duplicates.
3097 (for_each_template_parm): Use walk_tree duplicate checking code.
3099 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3102 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3103 is error_mark_node, don't add any more decl_specs.
3104 (cp_parser_init_declarator): After committing to a declaration, if
3105 the decl_specifiers start with error_mark_node, issue an error and
3106 change the type to "int".
3108 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3111 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3113 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3117 * pt.c (tsubst): Substitution must fail if we are attempting to
3118 create an array with element type that is an abstract class type.
3119 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3120 before calling abstract_virtuals_error.
3122 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3124 * name-lookup.c (qualified_lookup_using_namespace): Consider
3125 strong using directives even if we've already found a binding.
3127 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3129 * cp-tree.h (cxx_expand_expr): Change prototype.
3130 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3132 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3135 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3136 looking into them recursively. They can be there because of the
3137 new __offsetof__ extension.
3139 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3141 * parser.c (cp_parser_save_member_function_body): Mark the
3144 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3147 * class.c (build_clone): Copy type attributes from the original
3148 function to the clone.
3151 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3152 references as constant.
3155 * parser.c (cp_parser_explicit_instantiation): Improve error
3157 (cp_parser_require): Improve indication of the error location.
3160 * parser.c (cp_parser_class_head): Reorder logic to check for
3161 invalid qualification.
3163 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3166 * name-lookup.c (lookup_using_namespace): Remove spacesp
3168 (unqualified_namespace_lookup): Likewise.
3169 (lookup_qualified_name): Adjust accordingly.
3170 (lookup_name_real): Likewise.
3171 (lookup_arg_dependent): Do not eliminate the namespace of the
3172 functions found by unqualified name lookup unless that is the
3175 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3177 * semantics.c (push_deferring_access_checks): Fix format.
3178 (resume_deferring_access_checks): Likewise.
3179 (stop_deferring_access_checks): Likewise.
3180 (pop_deferring_access_checks): Likewise.
3181 (get_deferred_access_checks): Likewise.
3182 (pop_to_parent_deferring_access_checks): Likewise.
3183 (perform_deferred_access_checks): Likewise.
3184 (perform_or_defer_access_check): Likewise.
3186 2004-01-04 Richard Henderson <rth@redhat.com>
3188 * call.c (build_over_call): Don't create a save_expr of an
3189 aggregate, but rather its address.
3191 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3194 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3195 an offsetof expression.
3197 * parser.c (cp_parser_parameter_declaration): Fix comment.
3200 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3201 (reference_binding): Set it when appropriate.
3202 (build_temp): New function, split out from ...
3203 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3204 (initialize_reference): Likewise.
3207 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3208 (cp_parser_new): Initialize it.
3209 (cp_parser_postfix_expression): Set it.
3210 (cp_parser_sizeof_operand): Likewise.
3211 (cp_parser_parameteR_declaration): Do not commit early to tenative
3212 parsers when in_type_id_in_expr_p is set.
3214 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3217 * parser.c (cp_parser_template_argument): Don't call
3218 make_unbound_class_template directly.
3219 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3220 UNBOUND_CLASS_TEMPLATE tree node.
3222 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3225 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3227 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3230 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3231 (DECL_FUNCTION_TEMPLATE_P): Use it.
3232 (DECL_CLASS_TEMPLATE_P): Likewise.
3233 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3234 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3235 (cp_parser_template_name): Likewise.
3236 (cp_parser_elaborated_type_specifier): Likewise.
3237 (cp_parser_namespace_name): Likewise.
3238 (cp_parser_class_name): Likewise.
3239 (cp_parser_lookup_name_simple): Likewise.
3241 See ChangeLog.3 for earlier changes.