1 2004-07-16 Mark Mitchell <mark@codesourcery.com>
3 * class.c (finish_struct_methods): Remove unncessary code.
4 (add_implicitly_declared_members): Create declarations for default
5 constructors and copy constructors lazily.
6 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
8 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
9 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
10 * decl2.c (check_classfn): Robustify.
11 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
12 (locate_ctor): Handle lazy default constructors.
13 (locate_copy): Handle lazy copy constructors.
14 (implicitly_declare_fn): Make sure we're looking at the
15 TYPE_MAIN_VARIANT for a class before creating functions. Don't
16 set TYPE_HAS_CONSTRUCTOR.
17 (lazily_declare_fn): New function.
18 * name-lookup.c (constructor_name_full): Simplify.
19 * search.c (lookup_fnfields_1): Lazily create methods, as
21 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
23 2004-07-16 Steven Bosscher <stevenb@suse.de>
25 * cp-tree.h (struct lang_type): Don't have three GTY options on a
28 2004-07-16 Richard Henderson <rth@redhat.com>
30 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
31 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
32 * tree.c (cp_copy_res_decl_for_inlining): Remove.
34 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
36 * class.c (finish_struct_bits): Use for loop.
37 (propagate_binfo_offsets): Do primary binfo outside of loop.
40 * dump.c (cp_dump_tree): Don't dump the bases if there's no
43 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
45 2004-07-15 Mark Mitchell <mark@codesourcery.com>
47 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
48 has_abstract_assign_ref. Make methods a VEC(tree) *.
49 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
50 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
51 (CLASSTYPE_DESTRUCTORS): Likewise.
52 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
53 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
54 (add_method): Change prototoype.
55 * class.c (add_method): Remove error_p parameter. Adjust for
56 changes to CLASSTYPE_METHOD_VEC.
57 (handle_using_decl): Adjust call to add_method.
58 (maybe_warn_about_overly_private_class): Adjust for
59 changes to CLASSTYPE_METHOD_VEC.
60 (resort_type_method_vec): Likewise.
61 (finish_struct_methods): Likewise.
62 (check_for_override): Likewise.
63 (warn_hidden): Likewise.
64 (add_implicitly_declared_members): Defer creation of assignment
65 operators. Adjust call to add_method.
66 (clone_function_decl): Adjust call to add_method.
67 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
68 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
69 * decl.c (grok_special_member_properties): Don't set
70 TYPE_HAS_ABSTRACT_ASSIGN_REF.
71 * decl2.c (check_classfn): Adjust for
72 changes to CLASSTYPE_METHOD_VEC.
73 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
74 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
75 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
76 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
78 * pt.c (check_explicit_specialization): Adjust for
79 changes to CLASSTYPE_METHOD_VEC.
80 (instantiate_class_template): Do not set
81 TYPE_HAS_ABSTRACT_ASSIGN_REF.
82 * ptree.c (cxx_print_type): Don't try to print
84 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
85 * search.c (lookup_field_r): Adjust for
86 changes to CLASSTYPE_METHOD_VEC.
87 (lookup_fnfields): Likewise.
88 (lookup_conversion_operator): Likewise.
89 (lookup_fnfields_1): Likewise. Create assignment operators
91 (look_for_overrides_here): Adjust for
92 changes to CLASSTYPE_METHOD_VEC.
93 (add_conversions): Likewise.
94 * semantics.c (finish_member_declaration): Adjust call to add_method.
96 2004-07-15 Jason Merrill <jason@redhat.com>
98 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
99 references and pointers are compatible.
101 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
103 * decl.c (xref_basetypes): Refactor.
104 * tree.c (copy_base_binfos): Replace with ...
105 (copy_binfo): ... this. Deep copy the given binfo, (not the just
106 bases of the given base).
107 * cp-tree.h (copy_base_binfo): Remove.
108 (copy_binfo): Declare.
110 2004-07-15 Mark Mitchell <mark@codesourcery.com>
112 * name-lookup.c (set_inherited_value_binding_p): Add class_type
114 (get_class_binding): Adjust.
115 (push_class_level_binding): Don't use set_inherited_value_binding_p.
117 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
119 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
120 * decl.c (xref_basetypes): Set it here.
122 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
123 Don't check for incomplete base.
124 (get_vfield_name): Simplify while loop.
125 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
127 2004-07-14 Mark Mitchell <mark@codesourcery.com>
129 * lex.c (cxx_make_type): Remove call to get_pointer_type.
131 * cp-tree.h (IDENTIFIER_VALUE): Remove.
132 (BINFO_PUSHDECLS_MARKED): Likewise.
133 (maybe_inject_for_scope_var): Likewise.
134 (push_class_decls): Likewise.
135 * name-lookup.h (push_class_binding): Remove.
136 (innermost_non_namespace_value): New function.
137 (outer_binding): Likewise.
138 * class.c (add_method): Push bindings before adding to
140 (restore_class_cache): Do not restore class_shadowed.
141 (pushclass): Do not add USING_DECLs. Do not call
143 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
144 * decl.c (pushdecl): Use outer_binding.
145 (poplevel): Set the scope for an out-of-scope for-loop declaration
147 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
148 * name-lookup.c (new_class_binding): New function.
149 (push_binding): Use it.
150 (pushdecl): Use innermost_non_namespace_value.
151 (maybe_inject_for_scope_var): Remove.
152 (push_class_binding): Remove.
153 (set_inherited_value_binding_p): New function.
154 (get_class_binding): New function.
155 (push_class_level_binding): Assert that the current_class_type is
157 (outer_binding): New function.
158 (innermost_non_namespace_value): Likewise.
159 (lookup_name_real): Use outer_binding.
160 (lookup_name_current_level): Ignore out-of-scope variables.
161 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
162 (lookup_template_class): Likewise.
163 * search.c (dfs_push_type_decls): Remove.
164 (dfs_push_decls): Likewise.
165 (setup_class_bindings): Likewise.
166 (lookup_field_1): Handle USING_DECLs from dependent scopes.
167 (marked_pushdecls_p): Remove.
168 (unmarked_pushdecls_p): Remove.
169 (marked_identifiers): Remove.
170 (setup_class_bindings): Remove.
171 (dfs_push_type_decls): Remove.
172 (dfs_push_decls): Remove.
173 (push_class_decls): Remove.
175 2004-07-13 Mark Mitchell <mark@codesourcery.com>
179 * decl.c (grokvardecl): Make declspecs parameter const.
180 (grokdeclarator): Likewise. Adjust accordingly.
181 * decl.h (grokdeclarator): Adjust declaration.
182 * parser.c (cp_parser_init_declarator): Do not clear
183 decl_specifiers->attributes.
185 * cp-tree.h (lang_identifier): Remove class_value.
186 (IDENTIFIER_CLASS_VALUE): Remove.
187 (pop_class_decls): Likewise.
188 (init_search_processing): Likewise.
189 * class.c (handle_using_decl): Use lookup_member, not
190 IDENTIFIER_CLASS_VALUE.
191 (restore_class_cache): New function, split out from ...
192 (pushclass): ... here. Do not call clear_identifier_class_values.
193 (invalidate_class_lookup_cache): Do not clear
194 IDENTIFIER_CLASS_VALUE.
195 (popclass): Do not call pop_class_decls.
196 (maybe_note_name_used_in_class): Do not save names looked up after
197 the class is complete. Use lookup_member, not
198 IDENTIFIER_CLASS_VALUE.
199 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
200 * decl.c (cxx_init_decl_processing): Do not call
201 init_search_processing.
202 * method.c (do_build_copy_constructor): Remove unnecessary code.
203 (do_build_assign_ref): Likewise.
204 * name-lookup.c (pushdecl): Use lookup_member, not
205 IDENTIFIER_CLASS_VALUE.
206 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
208 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
209 (push_class_binding): Do not set it.
210 (clear_identifier_class_values): Remove.
211 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
212 (store_binding): Do not save it.
213 (pop_from_top_level): Do not restore it.
214 * name-lookup.h (cxx_saved_binding): Remove class_value.
215 (clear_identifier_class_values): Remove.
216 * ptree.c (cxx_print_identifier): Do not print
217 IDENTIFIER_CLASS_VALUE.
218 * search.c (search_obstack): Remove.
219 (push_stack_level): Remove.
220 (pop_stack_level): Remove.
221 (search_level): Remove.
222 (search_stack): Remove.
223 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
224 (setup_class_bindings): Use IDENTIFIER_MARKED, not
225 IDENTIFIER_CLASS_VALUE.
226 (marked_identifiers): New variable.
227 (push_class_decls): Clear IDENTIFIER_MARKED.
228 (pop_class_decls): Don't call pop_search_level.
229 (init_search_processing): Remove.
231 2004-07-12 Mark Mitchell <mark@codesourcery.com>
233 * cp-tree.h (get_aggr_typedef): Remove.
234 * init.c (get_aggr_typedef): Likewise.
236 * name-lookup.c (push_class_level_binding): Simplify.
238 2004-07-12 Andrew Pinski <apinski@apple.com>
242 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
244 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
247 2004-07-12 Eric Christopher <echristo@redhat.com>
249 * parser.c (cp_parser_class_head): Remove unused variable.
251 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
253 * decl.c (grok_op_properties): Reject [de-]allocation functions
254 declared in a namespace, or declared as static.
256 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
258 * cp-tree.h (make_binfo): Remove.
259 * decl.c (xref_basetypes): Use make_tree_binfo directly.
260 * tree.h (copy_base_binfos): Likewise.
261 (make_binfo): Remove.
263 * call.c (build_user_type_conversion_1, build_new_op,
264 check_constructor_callable, build_temp,
265 perform_direct_initialization_of_possible): Pass type directly to
266 lookup_fnfields & build_special_member_call.
267 (build_special_member_call): Accept a type, and complete it.
268 * class.c (finish_stuct_bits): Copy the BINFOs here.
269 * cvt.c (ocp_convert): Pass type directly to
270 build_special_member_call.
271 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
272 (xref_basetypes): Allocate the binfo here. Adjust.
273 * init.c (build_init, build_new_1): Pass type directly to
274 build_special_member_call.
275 * lex.c (cxx_make_type): Do not allocate binfo here.
276 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
277 * parser.c (cp_parser_class_head): Always call xref_basetypes.
278 * pt.c (instantiate_class_template): Likewise. Inhibit access
279 checking for template friends.
280 * ptree.c (cxx_print_type): Adjust record printing.
281 * search.c (lookup_base): When taking a type, complete it before
283 (lookup_member): Delay completing a type.
284 (push_class_decls): Don't walk an incomplete type.
285 (lookup_conversions): Likewise.
286 * semantics.c (finish_stmt_expr_expr): Pass type directly to
287 build_special_member_call.
288 * tree.c (copy_base_binfos): Adjust.
289 (make_binfo): Likewise.
290 * typeck.c (build_modify_expr): Pass type directly to
291 build_special_member_call.
292 * typeck2.c (process_init_constructor): Check a binfo exists.
293 (build_m_component_ref): Allow accessing an incomplete type.
294 (build_functional_cast): Pass type directly to
295 build_special_member_call.
297 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
300 * config-lang.in (gtfiles): Add typeck2.c.
301 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
303 * cp-tree.h: Declare complete_type_check_abstract.
304 * typeck2.c (pat_calc_hash, pat_compare,
305 complete_type_check_abstract): New functions.
306 (abstract_virtuals_error): If the type is abstract, register the
307 declaration within abstract_pending_vars for further checks.
308 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
309 * decl.c (cp_finish_decl): Do not strip array types.
310 (create_array_type_for_decl): Check for abstractness of the element
312 (complete_vars): Call complete_type_check_abstract.
313 * class.c (finish_struct): Prepare a list of virtual functions for
314 template types, and call complete_vars on it to check for abstractness.
316 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
318 PR tree-optimization/14107
319 * decl.c (finish_function): Remove temporary band-aid.
321 2004-07-11 Mark Mitchell <mark@codesourcery.com>
323 * call.c (build_operator_new_call): Avoid using push_to_top_level.
324 (build_new_op): Adjust call to lookup_function_nonclass.
325 * name-lookup.c (identifier_type_value): Adjust call to
327 (lookup_name_real): Add block_p parameter.
328 (lookup_name_nonclass): Adjust call to lookup_name_real.
329 (lookup_function_nonclass): Likewise.
330 (lookup_name): Likewise.
331 * name-lookup.h (lookup_name_real): Change prototype.
332 (lookup_name_nonclass): Likewise.
333 * parser.c (cp_parser_lookup_name): Likewise.
335 * cp-tree.h (saved_scope): Make old_bindings a vector.
336 (unuse_fields): Remove.
337 * name-lookup.h (cxx_saved_binding): Define it.
338 * class.c (pushclass): Don't use unuse_fields.
339 * name-lookup.c (cxx_saved_binding_make): Remove.
340 (store_binding): Add new bindings to a vector, using an
341 accumulator style, rather than adding them to a list.
342 (store_bindings): Adjust accordingly.
343 (store_class_bindings): Likewise.
344 (push_to_top_level): Likewise.
345 (pop_from_top_level): Likewise.
346 * optimize.c (maybe_clone_body): Must push_to_top_level and
347 pop_from_top_level calls outside of loop.
348 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
349 calls here from cp_parser_late_parsing_default_args.
350 (cp_parser_save_default_args): Record the class type in which the
351 function is declared.
352 (cp_parser_late_parsing_default_args): Do not call
353 push_nested_class/pop_nested_class.
354 * search.c (dfs_unuse_fields): Remove.
355 (unuse_fields): Remove.
357 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
359 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
360 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
361 * cp-tree.h (poplevel): Declare.
363 * decl.c (set_block): Remove.
365 2004-07-10 Mike Stump <mrs@apple.com>
367 * decl2.c (import_export_class): Never export/import vtables
368 with inline key functions.
370 2004-07-09 Steven Bosscher <stevenb@suse.de>
372 * typeck.c (c_expand_asm_operands): Remove.
374 2004-07-09 Mike Stump <mrs@apple.com>
376 * typeck.c (build_class_member_access_expr): Skip null deref
377 warning when we don't dereference it.
379 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
383 * class.c (check_field_decls): Improve -Weffc++ warning: do not
384 warn for pointers to functions/members, or for classes without
387 2004-07-08 Mark Mitchell <mark@codesourcery.com>
389 * name-lookup.h (struct cp_binding_level): Update documentation
392 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
395 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
396 returning CALL_EXPR, and non-reference return type.
398 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
400 * name-lookup.c (push_binding): Use VEC_reserve.
402 2004-07-08 Richard Henderson <rth@redhat.com>
404 * cp-tree.h (expand_eh_spec_block): Remove.
406 2004-07-07 Mark Mitchell <mark@codesourcery.com>
408 * cp-tree.h (saved_scope): Remove x_previous_class_type and
409 x_previous_class_values; add x_previous_class_level.
410 (previous_class_type): Remove.
411 (previous_class_values): Remove.
412 (previous_class_level): New macro.
413 * class.c (pushclass): Restore the identifier cache more
415 (invalidate_class_lookup_cache): Use vector for class_shadowed and
416 previous_class_values.
417 * decl.c (poplevel): Likewise.
418 * name-lookup.c (cxx_binding_init): New function.
419 (cxx_binding_make): Use it.
420 (push_binding): For a binding in a class level, use a vector of
421 cp_class_binding nodes.
422 (push_binding_level): New function.
423 (begin_scope): Use it.
424 (leave_scope): Do not put class binding levels on the free list.
425 (print_binding_level): Adjust for the fact that class_shadowed is
427 (poplevel_class): Likewise.
428 (clear_identifier_class_values): Likewise.
429 (push_class_level_binding): Likewise.
430 (set_class_shadows): Remove.
431 (store_binding): New function.
432 (store_class_bindings): New function.
433 (push_to_top_level): Use store_class_bindings as appropriate.
434 (pop_from_top_level): Use previous_class_level, not
436 * name-lookup.h (cp_class_binding): New type.
437 (cp_binding_level): Use a vector object for class_shadowed.
438 (push_binding_level): Declare.
439 (set_class_shadows): Remove.
441 2004-07-07 Andrew Pinski <apinski@apple.com>
443 * class.c (instantiate_type): BUFFER_REF is dead.
444 * lex.c (init_operators): IN_EXPR is dead.
446 2004-07-07 Jason Merrill <jason@redhat.com>
449 * call.c (build_new_op): Give overload warnings for built-in
452 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
455 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
458 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
460 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
461 * class.c (build_primary_vtable, check_bases,
462 determine_primary_base, finish_struct_bits,
463 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
464 get_basefndecls, warn_hidden, walk_subobject_offsets,
465 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
466 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
467 finish_struct_1, get_vfield_name, contains_empty_class_p,
468 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
469 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
470 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
472 * decl.c (xref_basetypes): Likewise.
473 * dump.c (cp_dump_tree): Likewise.
474 * error.c (dump_expr): Likewise.
475 * init.c (sort_mem_initializers, expand_member_init,
476 push_base_cleanups): Likewise.
477 * method.c (do_build_copy_constructor, do_build_assign_reg,
478 synthesize_exception_spec): Likewise.
479 * name-lookup.c (arg_assoc_class): Likewise.
480 * pt.c (instantiate_class_template, tsubst,
481 get_template_base_recursive): Likewise.
482 * ptree.c (cxx_print_type): Likewise.
483 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
484 * search.c (lookup_base_r, dynamic_cast_base_recurse,
485 dfs_access_in_type, access_in_type, lookup_field_queue_p,
486 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
487 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
488 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
489 binfo_for_vtable, copied_binfo, original_binfo): Likewise
490 * tree.c (copy_base_binfos, make_binfo): Likewise.
491 * typeck.c (commmon_base_type): Likewise
492 * typeck2.c (process_init_constructor): Likewise
494 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
496 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
498 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
501 * pt.c (convert_nontype_argument): Disallow conversions between
502 different enumeration types.
504 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
506 * cp-tree.h (BINFO_MARKED): Remove.
507 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
508 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
509 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
510 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
511 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
512 (mark_primary_bases, determine_primary_base, base_derived_from,
513 dfs_find_final_overrider, dfs_find_final_overrider_q,
514 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
515 dfs_modify_vtables, walk_subobject_offsets,
516 layout_nonempty_base_or_field, build_base_field,
517 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
518 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
519 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
520 build_ctor_vtbl_group, accumulate_vtble_inits,
521 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
522 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
523 add_vcall_offset_vtbl_entries_1): Likewise.
524 * decl.c (xref_basetypes): Incomming virtual base indicated by
526 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
527 * init.c (finish_init_stmts, sort_mem_initializers,
528 emit_mem_initializers, build_vtble_address, expand_member_init,
529 push_base_cleanups): Likewise.
530 * method.c (do_build_copy_constructor): Likewise.
531 * pt.c (instantiate_class_template,
532 get_template_base_recursive): Likewise.
533 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
534 get_pseudo_ti_desc): Likewise.
535 * search.c (lookup_base_r, dynamic_cast_base_recurse,
536 binfo_from_vbase, binfo_via_virtual, copied_binfo,
537 original_binfo): Likewise.
538 * semantics.c (finish_base_specifier): Virtualness is indicated
540 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
542 2004-07-06 Mark Mitchell <mark@codesourcery.com>
545 2004-06-24 Jason Merrill <jason@redhat.com>
547 * decl.c (grokparms): Give the PARM_DECL reference type if the
548 parameter is passed by invisible reference.
550 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
552 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
553 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
554 * pt.c (check_instantiated_args, unify): Likewise.
556 2004-07-05 Phil Edwards <phil@codesourcery.com>
558 * Make-lang.in (check-c++, lang_checks): Add some comments.
560 2004-07-05 Zack Weinberg <zack@codesourcery.com>
562 * cp-mudflap.c: Delete file.
563 * Makefile.in: Remove all references to cp-mudflap.o.
565 2004-07-05 Zack Weinberg <zack@codesourcery.com>
567 * decl.c (cxx_init_decl_processing): Call
568 build_common_tree_nodes before creating the global NAMESPACE_DECL.
570 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
573 * call.c (build_operator_new_call): Look only at global scope.
575 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
577 * call.c (enforce_access): Expect TREE_BINFO.
578 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
579 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
580 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
582 (BINFO_LANG_ELTS): Remove.
583 (BINFO_LANG_SLOTS): New.
584 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
585 (CLASSTYPE_TEMPLATE_INFO): Adjust.
586 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
587 * search.c (lookup_member): Check TREE_BINFO.
588 * semantics.c (perform_or_defer_access_check): Likewise.
589 (check_accessibility_of_qualified_id): Check
590 deferred_access_no_check.
591 * tree.c (make_binfo): Use make_tree_binfo.
593 2004-07-04 Mark Mitchell <mark@codesourcery.com>
595 * method.c (implicitly_declare_fn): Set linkage of generated
598 2004-07-04 Richard Henderson <rth@redhat.com>
600 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
602 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
605 * name-lookup.c (push_class_level_binding): Don't pass a
606 TREE_LIST of ambiguous names to check_template_shadow as it
607 only handles declarations. Instead, pull the declaration
610 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
613 * pt.c (check_explicit_specialization): Clarify error message.
615 2004-07-02 Richard Henderson <rth@redhat.com>
617 * tree.c (cp_unsave_r): Update remap_save_expr call.
619 2004-07-02 Mark Mitchell <mark@codesourcery.com>
622 * mangle.c (write_template_arg): Correct mangling.
625 * decl.c (grokdeclarator): Robustify.
627 2004-07-01 Richard Henderson <rth@redhat.com>
629 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
630 * method.c (synthesize_method): Don't clear_last_expr.
631 * name-lookup.c (maybe_push_cleanup_level): Likewise.
633 2004-07-01 Nick Clifton <nickc@redhat.com>
635 * decl2.c (import_export_class): Invoke the
636 import_export_class field in the gcc_target structure if it is not
639 2004-06-30 Richard Henderson (rth@redhat.com>
641 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
642 * method.c (use_thunk): Likewise.
644 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
646 * call.c (build_over_call), typeck.c (build_function_call): Call
647 check_function_arguments instead of check_function_format.
649 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
651 * call.c (build_over_call), typeck.c (build_function_call): Update
652 calls to check_function_format.
654 2004-06-30 Richard Henderson <rth@redhat.com>
656 * call.c (build_over_call): Use __builtin_memcpy for copying
657 CLASS_AS_BASE rather than funny casting.
659 2004-06-30 Richard Henderson <rth@redhat.com>
661 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
662 TYPE_SIZE_UNIT of full_type.
664 2004-06-30 Per Bothner <per@bothner.com>
666 Conditionally compile support for --enable-mapped_location.
667 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
668 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
669 adjustments - which I don't understand.
670 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
671 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
672 (print_instantiation_partial_context): Use expand_location.
673 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
674 * name-lookup.c: Likewise.
675 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
676 * name-lookup.c: Use input_line macro.
677 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
678 (cp_parser_statement): Rename locaal variable statement_locus to
679 statement_location and use SET_EXPR_LOCATION macro.
680 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
681 * tree.c (cp_walk_subtrees): Likewise.
683 2004-06-29 Per Bothner <per@bothner.com>
685 * tree.c (build_min_nt, build_min, build_min_non_dep):
686 Don't set TREE_COMPLEXITY from input_line.
688 2004-06-29 Paul Brook <paul@codesourcery.com>
690 * init.c: Include target.h.
691 (get_cookie_size): Remove and replace with target hook.
693 (build_new_1): Store the element size in the cookie.
695 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
698 * parser.c (cp_parser_template_declaration_after_export): Disable
699 access checks here ...
700 (cp_parser_class_specifier): ... not here.
702 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
704 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
705 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
706 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
709 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
711 * cp-tree.h (struct deferred_access): Move to ...
712 * semantics.c (struct deferred_access): ... here. Adjust.
713 (deferred_access_stack): Make a VEC(deferred_access),
714 (deferred_access_free_list): Remove.
715 (deferred_access_no_check): New.
716 (push_deferring_access_checks, resume_deferring_access_checks,
717 stop_deferring_access_checks, pop_deferring_access_checks,
718 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
719 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
721 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
724 * call.c (build_temp): Declare.
725 (check_constructor_callable): New.
726 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
727 CONSTRUCTOR_CALLABLE.
728 (convert_like_real, initialize_reference): Use
729 check_constructor_callable.
730 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
731 (LOOKUP_*): Renumber.
733 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
735 * friend.c (add_friend): Only perform access checks when context
737 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
738 * parser.c (cp_parser_class_specifier): Disable access checks here
739 when parsing the body of a templated class.
740 * semantics.c (perform_or_defer_access_checks): Reorder to allow
741 NULL binfos when not checking access.
743 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
745 Use vector API for vbase list.
746 * cp-tree.h: Include vec.h
747 (DEF_VEC_P (tree)): New type.
748 (struct lang_type_class): Change vbase's member type.
749 (binfo_for_vbase): Declare.
750 * class.c (determine_primary_base, base_derived_from,
751 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
752 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
753 build_vtbl_initializer): Adjust.
754 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
756 * init.c (sort_mem_initializers, expand_member_init,
757 push_base_cleanups): Adjust.
758 * method.c (do_build_copy_constructor): Adjust.
759 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
760 (binfo_for_vbase): New.
761 * tree.c (copy_base_binfos): Adjust.
763 2004-06-28 Mark Mitchell <mark@codesourcery.com>
765 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
767 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
770 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
771 paranthesis in case of pointers to array members.
772 * error.c (dump_type_prefix): Likewise.
773 (dump_type_suffix): Maybe issue a whitespace when printing
776 2004-06-27 Mark Mitchell <mark@codesourcery.com>
779 * parser.c (cp_parser_set_decl_spec_type): Refine test for
780 redefinition of built-in types.
782 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
784 * error.c (pp_template_argument_list_start): Remove.
785 (pp_template_argument_list_end): Likewise.
786 (pp_separate_with_comma): Use pp_cxx_separate_with.
787 (reinit_global_formatting_buffer): Remove.
788 (pp_non_consecutive_character): Likewise.
789 (dump_scope): Use pp_cxx_colon_colon.
790 (dump_template_parameter): Use pp_cxx_identifier,
791 pp_cxx_tree_identifier and pp_cxx_whitespace.
792 (dump_templat_bindings): Replace use of pp_string with sequence
793 of pp_cxx_whitespace and pp_equal.
794 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
795 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
797 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
798 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
799 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
800 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
801 pp_cxx_right_bracket, pp_cxx_identifier throughout,
802 (dump_decl): Likewise.
803 (dump_template_decl): Likewise.
804 (dump_function_decl): Likewise. Set padding as appropriate.
805 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
807 (dump_exception_spec): Likewise.
808 (dump_function_name): Use pp_cxx_tree_identifier and
810 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
811 pp_cxx_end_template_argument_list.
812 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
813 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
814 pp_cxx_whitespace throughout.
815 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
817 (dump_unary_op): Likewise.
818 (reinit_cxx_pp): New function.
819 (type_as_string); Use it.
820 (expr_as_string): Likewise.
821 (decl_as_string); Likewise.
822 (context_as_string): Likewise.
823 (lang_decl_name): Likewise.
824 (decl_to_string): Likewise.
825 (expr_to_string): Likewise.
826 (parm_to_string): Likewise.
827 (type_to_string): Likewise.
828 (args_to_string): Likewise.
829 (cv_to_string): Likewise.
831 2004-06-26 Mark Mitchell <mark@codesourcery.com>
833 * cp-tree.h (cp_cv_quals): New type.
834 (cp_declarator): Use it instead of "tree" as appropriate.
835 (grok_method_quals): Adjust prototype.
836 (grokclassfn): Likewise.
837 (do_friend): Likewise.
838 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
839 (grokdeclarator): Likewise.
840 * decl2.c (grok_method_quals): Likewise.
841 (grokclassfn): Likewise.
842 * friend.c (do_friend): Likewise.
843 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
844 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
845 (make_pointer_declarator): Likewise.
846 (make_reference_declarator): Likewise.
847 (make_ptrmem_declarator): Likewise.
848 (cp_parser_ptr_operator): Likewise.
849 (cp_parser_cv_qualifier_seq_opt): Likewise.
850 (cp_parser_cv_qualifier_opt): Remove.
851 (cp_parser_new_declarator_opt): Adjust call to
852 cp_parser_ptr_operator.
853 (cp_parser_conversion_declaration_opt): Likewise.
854 (cp_parser_declarator): Use cp_cv_quals, not tree.
855 (cp_parser_direct_declarator): Likewise.
857 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
859 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
860 Rename DECL_STMT to DECL_EXPR.
861 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
862 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
863 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
865 2004-06-26 Jan Hubicka <jh@suse.cz>
868 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
869 reachability analysis.
871 2004-06-25 Mark Mitchell <mark@codesourcery.com>
873 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
876 2004-06-25 Paul Brook <paul@codesourcery.com>
878 * decl2.c (get_guard): Call targetm.cxx.guard_type.
879 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
881 2004-06-24 Mark Mitchell <mark@codesourcery.com>
883 * decl.c (grokdeclarator): Restore error messages about __thread.
884 * parser.c (cp_parser_decl_specifier_seq): Likewise.
886 2004-06-24 Jason Merrill <jason@redhat.com>
889 * decl.c (grokparms): Give the PARM_DECL reference type if the
890 parameter is passed by invisible reference.
892 2004-06-24 Andreas Schwab <schwab@suse.de>
894 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
896 2004-06-23 Mark Mitchell <mark@codesourcery.com>
898 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
899 (cp/decl.o): Likewise.
900 (cp/decl2.o): Likewise.
902 (cp/semantics.o): Likewise.
903 * config-lang.in (gtfiles): Do not reference cp/lex.h.
904 * class.c: Do not include lex.h.
905 (add_implicitly_declared_members): Do not use
906 adding_implicit_members.
907 (check_bases_and_members): Do not talk about grok_x_components.
908 * cp/cp-tree.h (adding_implicit_members): Remove.
909 (cp_storage_class): New type.
910 (cp_decl_spec): Likewise.
911 (cp_decl_specifier_seq): Likewise.
912 (cp_parameter_declarator): Use it for the decl_specifiers field.
913 (check_tag_decl): Adjust prototype.
914 (shadow_tag): Likewise.
915 (groktypename): Likewise.
916 (start_decl): Likewise.
917 (start_function): Likewise.
918 (start_method): Likewise.
919 (grok_x_components): Remove.
920 (grokfield): Adjust prototype.
921 (grokbitfield): Likewise.
922 (finish_member_class_template): Remove.
923 * decl.c: Do not include lex.h.
924 (adding_implicit_members): Do not define.
925 (check_tag_decl): Do not use trees to represent decl-specifiers.
926 (shadow_tag): Likewise.
927 (groktypename): Likewise.
928 (start_decl): Likewise.
929 (grokvardecl): Likewise.
930 (grokdeclarator): Likewise.
931 (grokparms): Likewise.
932 (start_function): Likewise.
933 (start_method): Likewise.
934 * decl.h (grokdeclarator): Adjust prototype.
935 * decl2.c: Do not include lex.h.
936 (grok_x_components): Remove.
937 (grokfield): Do not use trees to represent decl-specifiers.
938 (grokbitfield): Likewise.
939 * lex.c: Do not include lex.h.
941 * parser.c: Include target.h.
942 (clear_decl_specs): New function.
943 (cp_parser_translation_unit): Do not use trees to represent
945 (cp_parser_postfix_expression): Likewise.
946 (cp_parser_new_type_id): Likewise.
947 (cp_parser_condition): Likewise.
948 (cp_parser_simple_declaration): Likewise.
949 (cp_parser_decl_specifier_seq): Likewise.
950 (cp_parser_function_specifier_opt): Likewise.
951 (cp_parser_conversion_type_id): Likewise.
952 (cp_parser_template_parameter): Likewise.
953 (cp_parser_explicit_instantiation): Likewise.
954 (cp_parser_type_specifier): Likewise.
955 (cp_parser_simple_type_specifier): Likewise.
956 (cp_parser_init_declarator): Likewise.
957 (cp_parser_type_id): Likewise.
958 (cp_parser_type_specifier_seq): Likewise.
959 (cp_parser_parameter_declaration): Likewise.
960 (cp_parser_member_declaration): Likewise.
961 (cp_parser_exception_declaration): Likewise.
962 (cp_parser_function_definition_from_specifiers_and_declarator):
964 (cp_parser_single_declaration): Likewise.
965 (cp_parser_save_member_function_body): Likewise.
966 (cp_parser_friend_p): Likewise.
967 (cp_parser_set_storage_class): New function.
968 (cp_parser_set_decl_spec_type): Likewise.
969 * pt.c: Do not include lex.h.
970 * semantics.c: Likewise.
971 (finish_member_class_template): Remove.
973 2004-06-23 Roger Sayle <roger@eyesopen.com>
975 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
976 longer take both "args" and "convert_args" as arguments.
977 (build_op_delete_call): Update call to build_cxx_call.
978 (build_over_call): Likewise, update call to build_cxx_call.
979 * cp-tree.h (build_cxx_call): Update funtion prototype.
980 * typeck.c (build_function_call): Don't call expand_tree_builtin.
981 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
982 (throw_bad_typeid): Likewise.
983 (build_dynamic_cast_1): Likewise.
985 2004-06-22 Richard Henderson <rth@redhat.com>
987 * class.c (build_vfn_ref): Take a pointer not object. Build
989 (cp_fold_obj_type_ref): New.
990 * call.c (build_over_call): Update build_vfn_ref call.
991 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
992 * cp-tree.h (cp_fold_obj_type_ref): Declare.
994 2004-06-21 Jason Merrill <jason@redhat.com>
997 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1000 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1002 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1003 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1004 (TREE_PARMLIST): Likewise.
1005 (CALL_DECLARATOR_PARMS): Likewise.
1006 (CALL_DECLARATOR_QUALS): Likewise.
1007 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1008 (cp_declarator_kind): New type.
1009 (cp_parameter_declarator): Likewise.
1010 (cp_declarator): Likewise.
1011 (cp_error_declarator): Likewise.
1012 (no_parameters): Likewise.
1013 (groktypename): Change prototype.
1014 (start_decl): Likewise.
1015 (start_handler_parms): Likewise.
1016 (get_scope_of_declarator): Likewise.
1017 (start_function): Likewise.
1018 (start_preparsed_function): New function.
1019 (start_function): Change prototype.
1020 (start_method): Likewise.
1021 (grokfield): Likewise.
1022 (grokbitfield): Likewise.
1023 (build_new): Likewise.
1024 (make_pointer_declarator): Remove.
1025 (make_reference_declarator): Likewise.
1026 (make_call_declarator): Likewise.
1027 (set_quals_and_spec): Likewise.
1028 (process_template_parm): Change prototype.
1029 (begin_function_definition): Remove.
1030 (finish_parmlist): Remove.
1031 * decl.c (groktypename): Do not use trees to represent
1033 (start_decl): Likewise.
1034 (start_handler_parms): Remove.
1035 (get_scope_of_declarator): Reimplement.
1036 (grokdeclarator): Do not use trees to represent declarators.
1037 (grokparms): Likewise.
1038 (start_function): Likewise.
1039 (start_method): Likewise.
1040 (build_void_list_mode): Do not use TREE_PARMLIST.
1041 * decl.h (grokdeclarator): Change prototype.
1042 * decl2.c (grok_method_quals): Robustify.
1043 (grok_x_components): Do not use trees to represent declarators.
1044 (grokfield): Likewise.
1045 (grokbitfield): Likewise.
1046 (start_objects): Build FUNCTION_DECLs, not declarators.
1047 (start_static_storage_duration_function): Likewise.
1048 * init.c (build_new): Simplify.
1049 * lex.c (make_pointer_declarator): Remove.
1050 (make_reference_declarator): Likewise.
1051 (make_call_declarator): Likewise.
1052 (set_quals_and_spec): Likewise.
1053 * method.c (use_thunk): Use start_preparsed_function.
1054 (synthesize_method): Likewise.
1055 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1056 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1057 * parser.c (cp_error_declarator): New variable.
1058 (declarator_obstack): Likewise.
1059 (alloc_declarator): New function.
1060 (make_declarator): Likewise.
1061 (make_id_declarator): Likewise.
1062 (make_pointer_declarator): Likewise.
1063 (make_reference_declarator): Likewise.
1064 (make_ptrmem_declarator): Likewise.
1065 (make_call_declarator): Likewise.
1066 (make_array_declarator): Likewise.
1067 (no_parameters): New variable.
1068 (make_parameter_declarator): Likewise.
1069 (cp_parser_check_for_definition_in_return_type): Do not use trees
1070 to represent declarators.
1071 (cp_parser_translation_unit): Likewise.
1072 (cp_parser_new_expression): Likewise.
1073 (cp_parser_new_type_id): Likewise.
1074 (cp_parser_new_declarator_opt): Likewise.
1075 (cp_parser_direct_new_declarator): Likewise.
1076 (cp_parser_condition): Likewise.
1077 (cp_parser_declaration_statement): Likewise.
1078 (cp_parser_declaration): Likewise.
1079 (cp_parser_conversion_type_id): Likewise.
1080 (cp_parser_conversion_declarator_opt): Likewise.
1081 (cp_parser_template_parameter_list): Likewise.
1082 (cp_parser_template_parameter): Likewise.
1083 (cp_parser_explicit_instantiation): Likewise.
1084 (cp_parser_init_declarator): Likewise.
1085 (cp_parser_declarator): Likewise.
1086 (cp_parser_direct_declarator): Likewise.
1087 (cp_parser_type_id): Likewise.
1088 (cp_parser_parameter_declaration_clause): Likewise.
1089 (cp_parser_parameter_declaration_list): Likewise.
1090 (cp_parser_parameter_declaration): Likewise.
1091 (cp_parser_member_declaration): Likewise.
1092 (cp_parser_exception_declaration): Likewise.
1093 (cp_parser_check_declarator_template_parameters): Likewise.
1094 (cp_parser_function_definition_from_specifiers_and_declarator):
1096 (cp_parser_save_member_function_body): Likewise.
1097 * pt.c (process_template_parm): Add is_non_type parameter.
1098 (convert_template_argument): Adjust call to groktypename.
1099 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1100 (tsubst): Do not expect declarators.
1101 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1103 (instantiate_decl): Use start_preparsed_function.
1104 * semantics.c (begin_function_definition): Remove.
1105 (finish_parmlist): Remove.
1106 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1109 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1111 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1112 (build_new_method_call): Likewise.
1113 * decl.c (local_variable_p_walkfn): Don't walk into types.
1114 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1115 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1116 * init.c (buld_new): Add new operand for ARRAY_REF.
1117 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1118 (do_build_assign_ref): Likewise.
1119 * parser.c (cp_parser_direct_new_declarator): Add new operands
1121 (cp_parser_direct_declarator): Likewise.
1122 * pt.c (tsubst): Likewise.
1123 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1125 * semantics.c (finish_non_static_data_member): Add new operand
1127 * typeck.c (build_class_member_access_expr): Likewise.
1128 (build_class_member_access_expr, finish_class_member_access_expr):
1130 (build_ptrmemfunc_access_expr): Likewise.
1131 (build_array_ref): Add new operands for ARRAY_REF.
1132 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1133 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1135 2004-06-21 Richard Henderson <rth@redhat.com>
1137 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1138 * parser.c (cp_parser_jump_statement): Update commentary.
1139 * pt.c (tsubst_expr): Use RETURN_EXPR.
1140 * semantics.c (finish_return_stmt): Likewise.
1141 (finalize_nrv_r): Likewise.
1142 * typeck.c, typeck2.c: Update file start commentary.
1144 2004-06-21 Richard Henderson <rth@redhat.com>
1146 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1148 2004-06-20 Richard Henderson <rth@redhat.com>
1150 * cp-tree.h (add_decl_stmt): Declare.
1151 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1152 * semantics.c (maybe_cleanup_point_expr): New.
1153 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1154 finish_for_expr, finish_switch_cond): Use it.
1155 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1157 2004-06-20 Richard Henderson <rth@redhat.com>
1159 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1160 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1161 (cp_gimplify_expr): Call it.
1162 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1163 (cp_genericize): New.
1164 * decl.c (finish_function): Call it.
1165 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1166 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1167 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1168 (cp_genericize): Declare.
1169 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1170 * dump.c (cp_dump_tree): Likewise.
1171 * semantics.c (push_cleanup): Move from c-semantics.c.
1173 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1175 * cp-lang.c (has_c_linkage): Implement.
1177 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1178 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1179 (builtin_function_1): Don't call make_decl_rtl.
1180 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1181 (grokvardecl): Don't call mangle_decl.
1182 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1183 DECL_ASSEMBLER_NAME.
1184 * method.c (set_mangled_name_for_decl): Delete.
1185 * name-lookup.c (pushdecl): When a local extern shadows a
1186 file-scope declaration of the same object, give both DECLs the
1188 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1189 on DECL_ASSEMBLER_NAME.
1191 2004-06-19 Richard Henderson <rth@redhat.com>
1193 * cp-gimplify.c: Remove unnecessary prototypes.
1194 (cp_gimplify_stmt): Merge into ...
1195 (cp_gimplify_expr): ... here. Move to end of file. Handle
1196 stmts_are_full_exprs_p frobbing.
1197 * cp-tree.h (cp_gimplify_stmt): Remove.
1198 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1199 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1201 2004-06-18 Richard Henderson <rth@redhat.com>
1204 * semantics.c (begin_cond): New.
1205 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1206 Assume that non-template decls go land before the conditional.
1207 (simplify_loop_decl_cond): Likewise.
1208 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1209 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1210 begin_switch_stmt, finish_switch_cond): Update to match.
1212 2004-06-17 Jason Merrill <jason@redhat.com>
1215 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1216 (finish_stmt_expr_expr): Update type after conversions.
1217 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1218 Handle void initializer.
1219 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1221 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1223 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1224 * cp-tree.h (defer_fn): Delete.
1225 * decl2.c (defer_fn): Delete.
1226 (finish_file): Simplify deferred_fns loops; check that
1227 only used inline functions get into deferred_fns.
1228 (mark_used): Inline previous contents of defer_fn.
1230 2004-06-16 Richard Henderson <rth@redhat.com>
1232 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1233 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1234 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1235 of CTOR_INITIALIZER ...
1236 (pp_cxx_statement): ... here.
1237 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1238 (finish_function): Use alloc_stmt_list to zap entire function.
1239 * parser.c (cp_parser_compound_statement): Update commentary.
1240 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1241 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1242 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1244 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1246 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1248 2004-06-16 Richard Henderson <rth@redhat.com>
1250 * parser.c (cp_parser_labeled_statement): Update commentary.
1251 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1252 * tree.c (mark_local_for_remap_r): Likewise.
1254 2004-06-16 Richard Henderson <rth@redhat.com>
1256 * parser.c (cp_parser_asm_definition): Update commentary.
1257 * pt.c (tsubst_expr): Use ASM_EXPR.
1258 * semantics.c (finish_asm_stmt): Likewise.
1260 2004-06-16 Richard Henderson <rth@redhat.com>
1262 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1263 * parser.c (cp_parser_statement): Update commentary.
1264 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1265 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1266 * tree.c (mark_local_for_remap_r): Likewise.
1268 2004-06-16 Richard Henderson <rth@redhat.com>
1271 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1272 statement in FOR_INIT_STMT for templates.
1274 2004-06-15 Richard Henderson <rth@redhat.com>
1276 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1277 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1278 (genericize_try_block): Use gimplify_stmt.
1279 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1280 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1281 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1282 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1283 (cp_tree_chain_matters_p): Remove.
1284 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1285 (COMPOUND_STMT_BODY_BLOCK): New.
1286 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1287 (EXPR_STMT_STMT_EXPR_RESULT): New.
1288 (building_stmt_tree): Check cur_stmt_list.
1289 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1290 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1291 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1292 (cp_finish_decl): Use push_cleanup.
1293 (start_function, finish_function): Use statement lists.
1294 (finish_stmt): Do nothing.
1295 * except.c (begin_eh_spec_block): Use statement lists.
1296 (check_handlers_1, check_handlers): Likewise.
1297 * init.c (construct_virtual_base): Don't add extra compound stmts.
1298 (build_vec_init): Likewise.
1299 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1300 * name-lookup.h (struct cp_binding_level): Add statement_list.
1301 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1302 (cp_parser_labeled_statement, cp_parser_expression_statement,
1303 cp_parser_statement_seq_opt): Likewise.
1304 (cp_parser_compound_statement): Likewise. Take bool for try block.
1305 (cp_parser_selection_statement): Tidy if processing.
1306 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1307 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1308 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1309 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1310 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1311 (finish_cond): New, rewritten from FINISH_COND.
1312 (simplify_loop_decl_cond): New.
1313 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1314 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1315 begin_else_clause, finish_else_clause, finish_if_stmt,
1316 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1317 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1318 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1319 finish_switch_cond, finish_switch_stmt, begin_try_block,
1320 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1321 finish_handler_sequence, finish_function_handler_sequence,
1322 begin_handler, finish_handler_parms, finish_handler,
1323 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1324 using statement lists.
1325 (begin_compound_stmt): Replace has_no_scope argument with flags.
1326 Update all callers. Use statement lists.
1327 (finish_compound_stmt): Likewise.
1328 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1329 (current_scope_stmt_stack): Remove.
1330 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1331 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1332 Rewrite with statement lists.
1334 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1336 * parser.c: Change all assignments of c_lex_string_translate
1337 to true and false to 1 and 0.
1338 (cp_lexer_read_token): Convert type of the translated string.
1339 (cp_parser_skip_to_closing_parentheses): Preserve original
1340 value of c_lex_string_translate, and set it to -1 while
1342 (cp_parser_cache_group): Likewise.
1343 (cp_parser_cache_group_1): Renamed.
1344 (cp_parser_asm_operand_list): Remove redundant setting of
1345 c_lex_string_translate.
1346 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1347 Handle chained strings.
1349 2004-06-12 Andrew Pinski <apinski@apple.com>
1353 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1355 * cp-tree.h: Fix typo.
1357 * cp-tree.h: Include cgraph.h
1358 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1359 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1361 2004-06-12 Jason Merrill <jason@redhat.com>
1363 PR tree-optimization/14107
1364 * decl.c (finish_function): Warn about no return in all functions.
1366 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1368 * cp-tree.h (struct language_function): Remove cannot_inline.
1369 * decl.c (save_function_data): cannot_inline is no more.
1370 (cxx_push_function_context): Likewise.
1371 * decl2.c (start_objects, start_static_storage_duration_function):
1372 Reset DECL_INLINE, set DECL_UNINLINABLE.
1374 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1377 * search.c (lookup_field): Propagate the ambiguity list.
1378 (lookup_fnfields): Likewise.
1380 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1383 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1384 template keyword to disambiguate.
1386 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1389 * decl.c (grokdeclarator): Ignore pointer-to-members when
1390 computing template depth.
1393 * name-lookup.c (pushtag): Do not try to put class declarations in
1394 explicit specialization scopes.
1396 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1398 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1400 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1403 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1404 bindings for undeclared built-ins.
1406 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1408 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1409 appear at the correct location.
1411 2004-06-10 Jason Merrill <jason@redhat.com>
1415 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1416 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1417 TREE_TYPE for non-dependent names.
1418 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1419 unknown_type_node as its TREE_TYPE.
1420 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1421 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1422 (dump_expr) <SCOPE_REF case>: Likewise.
1424 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1427 * parser.c (cp_parser_direct_declarator): Robustify.
1430 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1431 constants in non-dependent contexts.
1435 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1438 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1441 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1444 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1448 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1449 * lex.c (handle_pragma_interface): Deprecate.
1450 (handle_pragma_implementation): Likewise.
1452 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1454 * g++spec.c (lang_specific_driver): Remove check for -lm
1455 and -lmath when check it see if it was the math library.
1457 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1460 * parser.c (cp_parser_direct_declarator): Reject constructor named
1461 as qualified template-id.
1463 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1466 * lex.c (handle_pragma_interface): Deprecate.
1467 (handle_pragma_implementation): Likewise.
1469 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1472 * parser.c (cp_parser_iteration_statement): Fix typo in error
1476 * pt.c (tsubst_default_argument): Do not defer access checks
1477 while substituting into the default argument.
1480 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1481 constant in a non-dependent context.
1484 * except.c (build_throw): Ensure that temp_expr has been
1487 2004-06-06 Roger Sayle <roger@eyesopen.com>
1489 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1491 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1494 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1495 'typename', and accept 'template'.
1497 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1498 Jan Hubicka <jh@suse.cz>
1501 * method.c (use_think): Do not mark thunk as referenced.
1503 2004-06-03 Matt Austern <austern@apple.com>
1506 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1507 is nonzero, and if we see a noninline definition of a key method,
1508 make the vtables nonweak.
1510 2004-06-02 Matt Austern <austern@apple.com>
1512 * cp-tree.h (instantiate_decl): new boolean parameter,
1513 undefined_ok. Current behavior is equivalent to its being 0.
1514 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1515 * pt.c (mark_decl_instantiated): Unconditionally make
1516 instantiations explicit unconditionally
1517 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1518 since mark_decl_instantiated now does it.
1519 (instantiate_class_member): New. Instantiate a member of an
1520 explicitly instantiated class template.
1521 (do_type_instantiation): Explicitly instantiate members of an
1522 explicitly instantiated class template.
1523 (instantiate_decl): if undefined_ok is nonzero, and if we're
1524 trying to explicitly instantiated a template with no definition,
1525 change it to an implicit instantiation.
1526 (instantiate_pending_templates): Add new argument to instantiate_decl.
1527 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1529 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1531 * cp-tree.h: Fix typo.
1533 * cp-tree.h: Include cgraph.h
1534 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1535 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1537 2004-06-01 Jason Merrill <jason@redhat.com>
1540 * call.c (call_builtin_trap): Remove type parm.
1541 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1542 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1544 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1547 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1548 TREE_TYPE for non-dependent names.
1549 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1550 unknown_type_node as its TREE_TYPE.
1551 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1552 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1553 (dump_expr) <SCOPE_REF case>: Likewise.
1555 2004-06-01 Richard Henderson <rth@redhat.com>
1556 Andrew Pinski <pinskia@physics.uc.edu>
1558 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1559 * parser.c (struct cp_parser): Remove in_offsetof.
1560 (cp_parser_new): Don't set it.
1561 (cp_parser_unary_expression): Don't check it.
1562 (cp_parser_postfix_open_square_expression): Split out from ...
1563 (cp_parser_postfix_expression): ... here.
1564 (cp_parser_postfix_dot_deref_expression): Likewise.
1565 (cp_parser_builtin_offsetof): New.
1566 (cp_parser_primary_expression): Use it.
1568 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1571 * parser.c (cp_parser_postfix_expression): Allow subscript
1572 operator in offsetof.
1574 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1577 * friend.c (add_friend): Do not try to perform access checks for
1578 functions from dependent classes.
1580 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1582 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1583 (pp_cxx_begin_template_argument_list): Turn into a function.
1584 (pp_cxx_end_template_argument_list): Likewise.
1585 (pp_cxx_separate_with): Define.
1586 (pp_cxx_unqualified_id): Tidy.
1587 (pp_cxx_primary_expression): Likewise.
1588 (pp_cxx_postfix_expression): Likewise.
1589 (pp_cxx_expression): Likewise.
1590 (pp_cxx_simple_type_specifier): Likewise.
1591 (pp_cxx_type_specifier_seq): Likewise.
1592 (pp_cxx_parameter_declaration_clause): Likewise.
1593 (pp_cxx_exception_specification): Likewise.
1594 (pp_cxx_direct_declarator): Likewise.
1595 (pp_cxx_type_id): Likewise.
1596 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1598 (pp_cxx_left_paren): Likewise.
1599 (pp_cxx_right_paren): Likewise.
1600 (pp_cxx_left_brace): Likewise.
1601 (pp_cxx_right_brace): Likewise.
1602 (pp_cxx_left_bracket): Likewise.
1603 (pp_cxx_right_bracket): Likewise.
1604 (pp_cxx_dot): Likewise.
1605 (pp_cxx_identifier): Likewise.
1606 (pp_cxx_tree_identifier): Likewise.
1607 (pp_cxx_ampersand): New macro.
1608 (pp_cxx_star): Likewise.
1609 (pp_cxx_arrow): Likewise.
1610 (pp_cxx_semicolon): Likewise.
1611 (pp_cxx_complement): Likewise.
1612 (pp_cxx_begin_template_argument_list): Declaree.
1613 (pp_cxx_end_template_argument_list): Likewise.
1614 (pp_cxx_colon_colon): likewise.
1616 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1618 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1621 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1623 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1624 typeck.c: Fix comment formatting.
1626 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1628 * cp-lang.c (cp_expand_decl): Remove.
1629 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1631 2004-05-30 Andreas Jaeger <aj@suse.de>
1633 * lang-specs.h: Add missing initializers for .ii.
1635 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1637 * decl.c (cp_make_fname_decl): Free return value from
1640 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1643 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1645 * init.c (build_new): Likewise.
1648 * name-lookup.c (arg_assoc): Robustify.
1651 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1652 when determining the scope to use for a pointer to member.
1653 (lookup_anon_field): Give it external linkage.
1654 * cp-tree.h (lookup_anon_field): Declare it.
1655 * expr.c (cplus_expand_constant): Use it.
1657 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1660 * parser.c (cp_parser_simple_type_specifier): Call
1661 maybe_note_name_used_in_class.
1663 2004-05-28 Tom Marshall <tmarshall@real.com>
1666 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1667 the class has friends.
1669 2004-05-27 Adam Nemet <anemet@lnxw.com>
1672 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1673 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1675 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1677 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1678 if it might be needed.
1679 * pt.c (mark_decl_instantiated): Only call defer_fn if
1680 the function actually needs processing in finish_file.
1681 * decl2.c (finish_file): Add check that elements in
1682 deferred_fns_used are really needed there. Remove unnecessary
1683 test of DECL_SAVED_TREE.
1685 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1687 * Make-lang.in: No need to specify $(LIBCPP).
1689 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1692 * parser.c (cp_parser_class_head): Robustify.
1695 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1697 (cp_parser_constructor_declarator_p): Treat attributes
1701 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1702 base classes in templates.
1704 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1707 * pt.c (instantiate_template): Robustify.
1709 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1712 * decl.c (xref_tag): Issue errors about redeclaring template
1713 classes as non-template classes.
1715 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1718 * name-lookup.c (supplement_binding): Allow redefinitions of
1722 * parser.c (cp_parser_template_argument): Robustify.
1724 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1726 * class.c (alter_access): Use %E format specifier to print an
1727 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1728 (push_lang_context): Likewise.
1729 * decl.c (lookup_label): Likewise.
1730 (grokdeclarator): Likewise.
1731 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1732 * pt.c (do_type_instantiation): Likewise.
1733 * tree.c (handle_java_interface_attribute): Likewise.
1734 (handle_com_interface_attribute): Likewise.
1735 (handle_init_priority_attribute): Likewise.
1737 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1741 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1742 recognized as overloaded functions.
1744 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1747 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1748 layout conflicts for unions.
1751 * typeck.c (build_x_unary_op): Instantiate template class
1752 specializations before looking for "operator &".
1755 * typeck.c (complete_type): Layout non-dependent array types, even
1759 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1762 2004-05-22 Roger Sayle <roger@eyesopen.com>
1764 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1765 returning when TREE_TYPE is error_mark_node.
1766 * typeck.c (require_complete_type): Return error_mark_node if
1767 value's type is an error_mark_node.
1769 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1771 * optimize.c (calls_setjmp_r): Remove.
1772 (calls_setjmp_p): Remove.
1773 * cp-tree.c (calls_setjmp_p): Remove.
1774 * decl.c (finish_function): Do not call calls_setjmp_p.
1776 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1778 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1779 * decl2.c (maybe_make_one_only): Likewise.
1780 * method.c (use_thunk): Likewise.
1782 2004-05-18 Jason Merrill <jason@redhat.com>
1784 * class.c (build_base_path): Tidy a bit.
1786 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1788 * name-lookup.c (struct scope_binding): New.
1789 (EMPTY_SCOPE_BINDING): New.
1790 (lookup_using_namespace): Take a scope_binding instead of a
1792 (qualified_lookup_using_namespace): Likewise.
1793 (cxx_binding_clear): Delete.
1794 (do_nonmember_using_decl): Use a scope_binding instead of a
1796 (lookup_tag): Don't call select_decl.
1797 (ambiguous_decl): Don't return anything (and change callers to match).
1798 Take a scope_binding as the second parameter.
1799 (lookup_namespace_name): Use a scope_binding instead of a
1801 (unqualified_namespace_lookup): Likewise.
1802 (lookup_qualified_name): Likewise.
1803 (select_decl): Take a scope_binding instead of a cxx_binding.
1804 Use macros rather than hand-coding tests for type-ness.
1806 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1808 * cp-gimplify.c: Rename from cp-simplify.c.
1809 * Make-lang.in, optimize.c: Update.
1811 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1813 Merge from tree-ssa-20020619-branch. See
1814 ChangeLog.tree-ssa for details.
1816 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1817 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1818 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1819 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1821 * cp-mudflap.c: New file.
1822 * cp-simplify.c:: New file.
1824 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1827 * decl2.c (check_classfn): For member templates, compare also the
1828 template parameters to match the declaration.
1829 * cp-tree.h: Adjust declaration of check_classfn.
1830 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1831 * friend.c (do_friend): Likewise.
1832 * pt.c (tsubst_friend_function): Likewise.
1834 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1836 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1837 Instead, dig into the representation type to find the array bound.
1839 2004-04-30 Jason Merrill <jason@redhat.com>
1841 Refer to base members using COMPONENT_REFs where possible.
1842 * class.c (build_simple_base_path): New fn.
1843 (build_base_path): Use it for non-virtual base references.
1844 (layout_class_type): Change base fields to their real type
1845 after layout is done.
1846 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1847 * cp-lang.c (cxx_get_alias_set): Use it.
1849 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1851 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1854 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1857 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1858 used in integral constant expressions.
1860 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1862 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1865 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1867 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1868 * decl.c (reshape_init): Use it.
1869 * init.c (perform_member_init): Remove redundant condition.
1870 (build_aggr_init): Adjust to handle brace-enclosed initializers
1872 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1874 * parser.c (cp_parser_initializer_clause): Do not set
1875 TREE_HAS_CONSTRUCTOR on the initializer.
1876 * rtti.c (tinfo_base_init): Likewise.
1877 (generic_initializer): Likewise.
1878 (ptr_initializer): Likewise.
1879 (ptm_initializer): Likewise.
1880 (class_initializer): Likewise.
1881 (get_pseudo_ti_init): Likewise.
1882 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1884 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1886 * name-lookup.c (anonymous_namespace_name): Make static.
1888 2004-04-19 Roger Sayle <roger@eyesopen.com>
1891 * class.c (build_base_path): Call fold whilst building the NULL
1892 pointer check expression trees.
1894 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1896 * init.c (build_new_1): Don't use type size argument for Java
1897 _Jv_AllocObject call.
1899 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1901 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1902 declaration and definition.
1904 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1907 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1908 than ASM_OUTPUT_DEF.
1910 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1912 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1913 current_function_decl == NULL.
1915 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1918 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1921 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1923 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1925 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1926 or TREE_SIDE_EFFECTS of a type.
1928 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1931 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1932 cv-qualifier unification.
1933 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1935 2004-04-02 Jan Hubicka <jh@suse.cz>
1937 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1938 * cp-tree.h (cp_update_decl_after_saving): Declare.
1939 * tree.c (cp_update_decl_after_saving): Define.
1941 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1944 * typeck.c (get_delta_difference): Call fold before returning the
1947 2004-04-01 Richard Henderson <rth@redhat.com>
1950 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1951 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1953 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1956 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1958 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1960 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1962 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1964 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1965 * class.c (check_bitfield_decl): Likewise.
1966 * cvt.c (type_promotes_to): Likewise.
1967 * decl.c (finish_enum): Likewise.
1968 * mangle.c (write_builtin_type): Likewise.
1969 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1970 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1971 (build_binary_op): Likewise.
1973 2004-03-31 Jan Hubicka <jh@suse.cz>
1975 * tree.h (optimize_function): Kill prototype.
1976 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1977 * semantics.c (expand_body): Kill.
1979 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1982 * decl.c (start_decl_1): Do not decide whether or not to create a
1983 new cleanup level until after the type has been completed.
1986 * pt.c (tsubst_default_argument): Clear current_function_decl.
1988 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1990 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1992 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1994 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1995 is null, just print the literal name and return.
1997 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1999 * cxx-pretty-print.c: Fix comment typos.
2001 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2003 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2006 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2008 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2009 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2012 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2014 PR 12267, 12391, 12560, 13129, 14114, 14133
2015 * cp-lang.c (c_reset_state): Delete.
2016 (push_file_scope, pop_file_scope): New stubs.
2017 * parser.c (c_parse_file): Call sorry() here if called more than once.
2019 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2021 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2024 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2026 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2028 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2030 * error.c (enum pad): Remove.
2031 (dump_qualifiers): Likewise.
2032 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2033 (dump_aggr_type): Likewise.
2034 (dump_type_suffix): Likewise.
2035 (dump_simple_decl): Likewise.
2036 (dump_function_decl): Likewise.
2037 (cv_to_string): Likewise.
2038 (dump_type_prefix): Likewise. Adjust return void.
2039 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2041 (pp_cxx_template_keyword_if_needed): Document.
2042 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2043 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2044 MUST_NOT_THROW_EXPR.
2046 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2049 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2050 templates, if their type is non-dependent.
2052 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2054 * call.c (build_op_delete_call): Do not forget the placement
2055 arguments when iterating through mutiple delete operators.
2057 * cp-tree.h (svaed_scope): Remove last_parms.
2058 (NEW_DELETE_OPNAME_P): New macro.
2059 (last_function_parms): Remove.
2060 (do_friend): Adjust prototype.
2061 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2062 using last_function_parms.
2063 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2064 using last_function_parms.
2065 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2066 for class-specific operator new and operator delete.
2067 (grok_op_properties): Do not look for allocation functions with
2069 (start_function): Use DECL_ARGUMENTS instead of
2070 last_function_parms.
2071 * decl.h (last_function_parms): Do not declare.
2072 * decl2.c (grokclassfn): Do not use last_function_parms.
2073 * friend.c (do_friend): Remove parmdecls parameter.
2074 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2075 (pop_from_top_level): Do not restore it.
2076 * pt.c (check_explicit_specialization): Do not adjust
2077 last_function_parms.
2079 * name-lookup.c (do_local_using_decl): Create a local binding for
2080 types brought in via using declarations.
2082 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2083 function declarations correctly.
2085 * semantics.c (finish_id_expression): Correct handling of
2086 conversion operators to dependent types.
2088 * typeck.c (lookup_destructor): Allow the use of destructors from
2091 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2093 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2094 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2095 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2096 the field is named TEMPLATE_TYPE_PARM_INDEX.
2098 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2101 * parser.c (cp_parser_functional_cast): A cast to anything
2102 but integral or enumaration type is not an integral constant
2104 * pt.c (value_dependent_expression_p): Handle cast expressions
2105 without operands (such as "int()").
2107 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2109 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2110 cv-qualification between the type named by the
2111 pseudo-destructor-name and the object-type.
2113 * search.c (accessible_base_p): Handle non-proper bases.
2115 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2116 refers to a single overloaded function, set the type of the
2118 * tree.c (lvalue_type): Simplify.
2119 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2121 (build_unary_op): Handle OVERLOADs with known types.
2123 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2126 * parser.c (cp_parser_postfix_expression): Handle the use of
2127 "typename" in non-dependent contexts. Convert appropriately when
2128 when using a qualified name after "->" or ".".
2130 * call.c (conditional_conversion): Honor the requirement that some
2131 conversions refer to the original object.
2133 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2135 * call.c (build_conditional_expr): Do not call force_rvalue for
2136 operands of void_type when the conditional expression itself has
2138 * name-lookup.c (pushdecl): Don't consider a declaration of a
2139 function named "main" to be an overload of a type named "main".
2140 * parser.c (cp_parser_template_name): Perform name lookup when the
2141 template name is proceeded by "template" if the qualifying scope
2143 * typeck.c (composite_pointer_type_r): Correctly handle
2144 pointer-to-member types.
2145 (build_const_cast): Likewise.
2147 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2149 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2150 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2151 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2152 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2153 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2154 (TYPEOF_TYPE_EXPR): New macro.
2155 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2156 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2157 * pt.c (tsubst): Likewise.
2158 * semantics.c (finish_typeof): Likewise.
2159 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2160 and TEMPLATE_TYPE_PARM.
2161 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2162 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2164 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2167 * cp-tree.h (build_new_op): Change prototype.
2168 (build_x_binary_op): Likewise.
2169 * call.c (build_new_op): Add overloaded_p parameter.
2170 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2171 * parser.c (cp_parser_binary_expression): Note that uses of
2172 overloaded operators prevents an expression from being considered
2173 an integral constant.
2174 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2176 * semantics.c (finish_call_expr): Likewise.
2177 * typeck.c (rationalize_conditional_expr): Likewise.
2178 (build_x_indirect_ref): Likewise.
2179 (build_x_binary_op): Likewise.
2180 (build_x_unary_op): Likewise.
2181 (build_x_compound_expr): Likewise.
2182 (build_modify_expr): Likewise.
2183 * typeck2.c (build_x_arrow): Likewise.
2185 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2187 * cp-lang.c, ptree.c: Update copyright.
2189 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2192 * parser.c (cp_parser_non_integral_constant_expression): Encode
2193 more of the idiom that surrounded calls to this function within
2195 (cp_parser_primary_expression): Adjust accordingly.
2196 (cp_parser_postfix_expression): Likewise.
2197 (cp_parser_unary_expression): Likewise.
2198 (cp_parser_cast_expression): Likewise.
2199 (cp_parser_assignment_expression): Likewise.
2200 (cp_parser_expression): Likewise.
2201 (cp_parser_new_expression): Note that new-expressions are not
2202 allowed in integral constant expressions.
2203 (cp_parser_delete_expression): Likewise.
2205 2004-03-12 Matt Austern <austern@apple.com>
2207 * decl2.c (maybe_make_one_only): Look at
2208 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2209 to make an explicit instantiation weak.
2210 * method.c (use_thunk): Make sure we call comdat_linkage
2212 * pt.c (do_type_instantiation): On systems where weak symbols
2213 don't go in a static archive's TOC, explicit instantiation of a
2214 class must imply *explicit* instantiation of its memeber.
2216 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2218 * call.c, cp-tree.h, pt.c: Fix comment typos.
2220 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2223 * decl.c (xref_tag): Disregard non-type declarations when
2224 looking up a tagged type.
2226 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2229 * call.c (convert_like_real): Build a const qualified temporary,
2230 when testing ctor access.
2232 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2234 * call.c (initialize_reference): Fix typo.
2236 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2239 * pt.c (determine_specialization): For member templates, match also
2243 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2245 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2247 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2250 * call.c (initialize_reference): Handle initializers that are
2251 class-member access expressions applies to rvalues.
2253 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2256 * name-lookup.c (supplement_binding): Ignore functions that are
2257 marked DECL_ANTICIPATED.
2259 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2262 * class.c (check_field_decls): Complain about non-static data
2263 members of reference type in unions. Propagate
2264 CLASSTYPE_REF_FIELDS_NEED_INIT and
2265 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2267 * init.c (perform_member_init): Complain about mbmers with const
2268 type that are not explicitly initialized.
2270 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2272 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2273 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2274 (lang_identifier): Remove implicit_decl and error_locus.
2275 (IDENTIFIER_IMPLICIT_DECL): Remove.
2276 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2277 (IDENTIFIER_ERROR_LOCUS): Likewise.
2278 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2279 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2280 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2281 (implicitly_declare): Remove.
2282 * decl.c (warn_extern_redeclared_static): Remove check of
2283 IDENTIFIER_IMPLICIT_DECL.
2284 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2285 (implicitly_declare): Remove.
2286 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2287 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2288 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2289 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2290 in the innermost scope, rather than at namespace scope.
2291 * name-lookup.c (push_local_binding): Give it external linkage.
2292 (pushdecl): Remove dead code.
2293 * name-lookup.h (push_local_binding): Declare it.
2294 * ptree.c (cxx_print_identifier): Don't print
2295 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2296 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2297 not IDENTIFIER_ERROR_LOCUS.
2298 * typeck.c (build_function_call): Remove dead code.
2300 2004-03-08 Jason Merrill <jason@redhat.com>
2303 * decl.c (xref_tag): Remove attribute handling.
2304 * cp-tree.h: Adjust prototype.
2305 * decl.c, parser.c, rtti.c: Adjust callers.
2306 * parser.c (cp_parser_class_head): Pass back attributes in the
2308 (cp_parser_class_specifier): Adjust.
2310 2004-03-08 Matt Austern <austern@apple.com>
2313 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2314 as static, to static_decls array.
2316 2004-03-05 Jason Merrill <jason@redhat.com>
2318 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2320 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2322 * decl.c (grokfndecl): Update old incorrect comment.
2323 (grokvardecl): Diagnose C++ variables of type with no linkage.
2325 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2328 * pt.c (build_non_dependent_expr): Do not create a
2329 NON_DEPENDENT_EXPR for a THROW_EXPR.
2331 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2334 * error.c (dump_expr): Handle THROW_EXPR.
2336 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2339 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2340 lookup if ordinary name-lookup finds a non-function.
2341 * pt.c (tsubst_copy_and_build): Likewise.
2344 * parser.c (cp_parser_late_parsing_default_args): Check that there
2345 are no extra tokens after the end of the default-argument
2348 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2351 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2352 having C++ linkage for name-mangling purposes.
2355 * parser.c (cp_parser_direct_declarator): Recognize constructor
2356 declarators that use a template-id to name the class being
2360 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2361 (tsubst_expr): Do not call tsubst_copy, even when
2362 processing_template_decl.
2364 2004-03-01 Jeff Law <law@redhat.com>
2366 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2369 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2372 * name-lookup.h (push_scope): Change prototype.
2373 * name-lookup.c (push_scope): Do not reenter the current class
2375 * decl.c (grokfndecl): Check return code from push_scope before
2377 * decl2.c (check_classfn): Likewise.
2378 * parser.c (cp_parser_conversion_function_id): Likewise.
2379 (cp_parser_init_declarator): Likewise.
2380 (cp_parser_direct_declarator): Likewise.
2381 (cp_parser_class_specifier): Likewise.
2382 (cp_parser_class_head): Likewise.
2383 (cp_parser_lookup_name): Likewise.
2384 (cp_parser_constructor_declarator_p): Likewise.
2385 * pt.c (instantiate_class_template): Likewise.
2386 (resolve_typename_type): Likewise.
2388 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2391 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2395 * class.c (update_vtable_entry_for_fn): Do not go through
2396 covariance machinery if the type returned by an overrider is the
2397 same as the original.
2399 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2401 * call.c: Fix a comment typo.
2403 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2405 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2407 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2410 * parser.c (cp_parser_parameter_declaration_list): Commit
2411 to fewer tentative parses.
2413 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2416 * pt.c (dependent_type_p_r): A template template parameter is a
2419 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2422 * mangle.c (write_template_arg_literal): Don't rely on identity for
2425 2004-02-24 Jason Merrill <jason@redhat.com>
2427 * tree.c (build_exception_variant): Use check_qualified_type.
2429 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2430 Kazu Hirata <kazu@cs.umass.edu>
2432 * decl.c (cxx_init_decl_processing): Don't check
2433 flag_writable_strings.
2435 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2438 * typeck.c (maybe_warn_about_returning_address_of_location):
2439 Change check for VAR_DECL to use DECL_P instead.
2441 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2444 * cvt.c (build_expr_type_conversion): Type must be complete before
2445 looking up for conversions.
2447 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2450 * name-lookup.c (arg_assoc_class): Don't look into template
2451 arguments if it is not a primary template.
2453 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2456 * method.c (use_thunk): Always clone function argument tree.
2458 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2461 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2464 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2465 for all type variants.
2467 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2470 * decl.c (duplicate_decls): Return error_mark_node for invalid
2472 * name-lookup.c (push_namespace): Ignore the return value from
2474 * pt.c (push_template_decl_real): Robustify.
2477 * name-lookup.c (push_class_level_binding): Do not complain about
2478 adding a binding for a member whose name is the same as the
2479 enclosing class if the member is located in a base class of the
2482 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2485 * parser.c (cp_parser_new_expression): Parse an ill-formed
2486 direct-new-declarator after a parenthesized type-id to emit good
2489 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2491 * cp-tree.def, cvt.c: Update copyright.
2493 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2496 * cp-tree.h (abi_version_at_least): Remove.
2497 * mangle.c: Include flags.h.
2499 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2502 * call.c (build_conditional_expr): Handle conversions between
2503 class types which result in differently cv-qualified type
2507 * class.c (delete_duplicate_fields_1): Remove.
2508 (delete_duplicate_fields): Likewise.
2509 (finish_struct_anon): Remove check for members with the same name
2510 as their enclosing class.
2511 (check_field_decls): Do not call duplicate_fields.
2512 * decl.c (grokdeclarator): Remove check for static data members
2513 with the same name as their enclosing class.
2514 * name-lookup.c (push_class_level_binding): Check for members with
2515 the same name as their enclosing class.
2517 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2520 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2522 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2525 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2526 has full set of arguments.
2528 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2531 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2533 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2536 * cp-tree.h (delete_sanity): Change prototype.
2537 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2538 Remove dead code. Adjust code to warn about deleting an array.
2539 * typekc.c (decay_conversion): Use build_address and build_nop.
2542 * search.c (accessible_p): Do not check access in thunks.
2545 * call.c (build_conditional_expr): Call force_rvalue on the
2546 non-void operand in the case that one result is a throw-expression
2547 and the other is not.
2549 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2552 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2553 the type name and look ahead for ::~, and bail out early with a
2554 better error message if the parse is going to fail.
2556 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2558 * call.c (conversion_kind): New type.
2559 (conversion_rank): Likewise.
2560 (conversion): Likewise.
2561 (CONVERSION_RANK): New macro.
2562 (conversion_obstack): New variable.
2563 (obstack_initialized): Likewise.
2564 (z_candidate): Change type of convs and second_conv.
2565 (candidate_warning): New type.
2566 (IDENTITY_RANK): Remove.
2567 (EXACT_RANK): Likewise.
2568 (PROMO_RANK): Likewise.
2569 (STD_RANK): Likewise.
2570 (PBOOL_RANK): Likewise.
2571 (USER_RANK): Likewise.
2572 (ELLIPSIS_RANK): Likewise.
2573 (BAD_RANK): Likewise.
2574 (ICS_RANK): Likewise.
2575 (ICS_STD_RANK): Likewise.
2576 (ICS_USER_FLAG): Likewise.
2577 (ICS_ELLIPSIS_FLAG): Likewise.
2578 (ICS_THIS_FLAG): Likewise.
2579 (ICS_BAD_FLAG): Likewise.
2580 (NEED_TEMPORARY_P): Likewise.
2581 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2582 (USER_CONV_CAND): Likewise.
2583 (USER_CONV_FN): Likewise.
2584 (conversion_obstack_alloc): New function.
2585 (alloc_conversion): Likewise.
2586 (validate_conversion_obstack): Likewise.
2587 (alloc_conversions): Likewise.
2588 (build_conv): Adjust to deal with new conversion data structures.
2589 (build_identity_conv): New function.
2590 (build_ambiguous_conv): Likewise.
2591 (standard_conversion): Adjust to deal with new conversion data
2593 (convert_class_to_reference): Likewise.
2594 (direct_reference_binding): Likewise.
2595 (reference_binding): Likewise.
2596 (implicit_conversion): Likewise.
2597 (add_candidate): Likewise.
2598 (add_function_candidate): Likewise.
2599 (add_conv_candidate): Likewise.
2600 (build_builtin_candidate): Likewise.
2601 (print_z_candidate): Likewise.
2602 (merge_conversion_sequences): Likewise.
2603 (build_user_type_conversion_1): Likewise.
2604 (build_user_type_conversion): Likewise.
2605 (build_new_function_call): Likewise.
2606 (build_object_call): Likewise.
2607 (conditional_conversion): Likewise.
2608 (build_conditional_expr): Likewise.
2609 (build_new_op): Likewise.
2610 (build_op_delete_call): Likewise.
2611 (convert_like_real): Likewise.
2612 (build_over_call): Likewise.
2613 (build_new_method_call): Likewise.
2614 (is_subseq): Likewise.
2615 (maybe_handle_implicit_object): Likewise.
2616 (maybe_handle_ref_bind): Likewise.
2617 (compare_ics): Likewise.
2618 (source_type): Likewise.
2619 (add_warning): Likewise.
2621 (can_convert_arg): Likewise.
2622 (can_convert_arg_bad): Likewise.
2623 (perform_implicit_conversion): Likewise.
2624 (perform_direct_initialization_if_possible): Likewise.
2625 (initialize_reference): Likewise.
2626 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2627 * cp-tree.def (WRAPPER): Likewise.
2628 (IDENTITY_CONV): Remove.
2629 (LVALUE_CONV): Likewise.
2630 (QUAL_CONV): Likewise.
2631 (STD_CONV): Likewise.
2632 (PTR_CONV): Likewise.
2633 (PMEM_CONV): Likewise.
2634 (BASE_CONV): Likewise.
2635 (REF_BIND): Likewise.
2636 (USER_CONV): Likewise.
2637 (AMBIG_CONV): Likewise.
2638 (RVALUE_CONV): Likewise.
2639 * cp-tree.h (tree_wrapper): Remove.
2640 (WRAPPER_ZC): Remove.
2641 (lang_tree_node): Remove wrapper.
2642 (LOOKUP_SPECULATIVELY): Remove.
2643 (build_op_delete_call): Adjust prototype.
2644 (validate_conversion_obstack): Declare.
2645 (build_zc_wrapper): Remove.
2646 * cvt.c (convert_to_reference): Remove dead code.
2647 (ocp_convert): Likewise.
2648 * decl.c (redeclaration_error_message): Correct handling of
2650 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2651 (cp_tree_node_structure): Remove WRAPPER case.
2652 * decl2.c (finish_file): Call validate_conversion_obstack.
2653 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2654 (build_op_delete_call): Likewise.
2655 (build_x_delete): Likewise.
2656 (build_delete): Adjust call to build_op_delete_call.
2657 * pt.c (tsubst_friend_declaration): Adjust code to determine
2658 whether or not a friend template is a definition.
2659 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2660 * tree.c (build_zc_wrapper): Remove.
2662 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2664 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2665 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2666 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2667 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2669 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2671 * typeck.c (lookup_destructor): Fix typo in error message.
2673 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2675 * call.c, parser.c, tree.c: Fix comment typos.
2677 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2680 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2681 * decl.c (duplicate_decls, start_function): Likewise.
2683 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2685 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2686 * parser.c (free_parser_stacks): Delete.
2688 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2690 * rtti.c: Update copyright.
2692 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2695 * decl.c (require_complete_types_for_parms): Do not insert
2696 error_mark_node in the parameter list.
2698 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2701 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2702 error when terminator can not be found.
2704 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2706 Make-lang.in (po-generated): Delete.
2708 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2710 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2711 targetm.calls.promote_prototypes.
2713 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2717 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2719 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2720 (handle_pragma_implementation): Likewise.
2722 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2725 * typeck.c (lookup_destructor): Tweak error message.
2727 2004-02-05 Jan Hubicka <jh@suse.cz>
2729 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2732 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2735 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2736 code, only emits the diagnostic now. Added lookup of the identifier
2737 and support for qualified ids.
2738 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2739 Parse an (invalid) type name as id-expression within a declarator.
2740 (cp_parser_simple_declaration): Use it.
2741 (cp_parser_member_declaration): Likewise.
2742 (cp_parser_make_typename_type): New function. Handle errors through
2743 cp_parser_diagnose_invalid_typename.
2744 (cp_parser_elaborated_type_specifier): Use it.
2746 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2749 * call.c (convert_like_real): Use "converting" rather than
2750 "argument" as the descriptive keyword to
2751 dubious_conversion_warnings.
2752 * typeck.c (convert_for_assignment): Do not call
2753 dubious_conversion_warnings.
2755 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2758 * init.c (build_delete): Emit a more informative error message in
2759 case of an incomplete type, and on the correct source line.
2761 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2763 * error.c, search.c: Update copyright.
2765 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2768 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2769 linkage for the typeinfo name string.
2771 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2774 * cp-tree.h (fold_non_dependent_expr): New function.
2775 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2776 (cp_parser_template_argument): Use fold_non_dependent_expr.
2777 (cp_parser_direct_declarator): Likewise.
2778 * pt.c (fold_non_dependent_expr): New function.
2779 (convert_nontype_argument): Use it.
2780 (tsubst_qualified_id): Simplify.
2781 (tsubst_copy_and_build): Likewise.
2783 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2785 * decl.c (cxx_push_function_context): Do not set
2786 current_function_is_thunk.
2787 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2790 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2793 * pt.c (more_specialized_class): Increase processing_template_decl
2794 while partial ordering.
2796 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2799 * decl.c (start_function): Do not call pushdecl for any
2800 instantiation or specialization of a primary template.
2802 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2805 * parser.c (cp_parser_class_name): Robustify.
2808 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2811 * semantics.c (finish_id_expression): Do not return an
2812 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2814 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2817 * pt.c (build_non_dependent_expr): Do not build
2818 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2821 * semantics.c (finish_id_expression): Do not return an
2822 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2825 * parser.c (cp_parser_simple_declaration): When skipping to the
2826 end of the statement swallow the terminating semicolon.
2828 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2831 * init.c (build_offset_ref): Improve error recovery for invalid
2832 uses of non-static member functions.
2835 * cp-tree.h (cp_build_type_attribute_variant): New function.
2836 * class.c (build_clone): Use cp_build_type_attribute_variant.
2837 * decl.c (duplicate_decls): Likewise.
2838 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2839 (tsubst_function_type): Likewise.
2840 * tree.c (build_exception_variant): Check attributes before
2841 concluding that two types are the same.
2842 (cp_build_type-attribute_variant): New method.
2843 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2846 * call.c (convert_class_to_reference): Keep better track of
2847 pedantically invalid user-defined conversions.
2849 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2852 * pt.c (tsubst_qualified_id): Improved error message when a type
2853 is expected but not found.
2855 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2857 * class.c: Fix comment typos.
2859 * error.c: Likewise.
2860 * parser.c: Likewise.
2862 * search.c: Likewise.
2863 * typeck.c: Likewise.
2865 2004-01-30 Richard Henderson <rth@redhat.com>
2868 * method.c (use_thunk): Don't force_target_expr for void thunks.
2869 * tree.c (build_target_expr_with_type): Assert non-void type.
2870 (force_target_expr): Likewise.
2872 2004-01-30 Michael Matz <matz@suse.de>
2874 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2876 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2880 * decl.c (grokdeclarator): Check immediatly type completeness for
2881 non-dependent types.
2883 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2886 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2887 a sizeof expression.block
2889 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2892 * mangle.c (write_encoding): Correct encoding of member template
2895 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2897 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2898 template name as it was `<::' (digraph typo).
2899 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2900 (cp_parser_id_expression): Use it.
2901 (cp_parser_nested_name_specifier_opt): Likewise.
2902 (cp_parser_template_name): Likewise.
2903 (cp_parser_class_name): Likewise.
2904 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2906 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2909 * typeck.c (merge_types): Do not merge attributes into
2913 * parser.c (cp_parser_direct_declarator): Do not prevent
2914 backtracking inside a parenthesized declarator.
2915 (cp_parser_parameter_declaration): Fix typo in comment.
2917 2004-01-28 Jan Hubicka <jh@suse.cz>
2919 * semantics.c (expand_body) Do emit_associated_thunks before
2922 2004-01-27 Devang Patel <dpatel@apple.com>
2924 * name-lookup.c: Include "debug.h"
2925 (do_namespace_alias): Invoke debug_hooks to emit debug info
2926 for namespace alias.
2927 (do_local_using_decl): Invoke debug_hooks to emit debug info
2929 (do_class_using_decl): Same.
2930 (do_toplevel_using_decl): Same.
2931 (do_using_directive): Same.
2932 (cp_emit_debug_info_for_using): New function.
2933 * Make-lang.in (cp/parser.o): Depend on debug.h
2934 (cp/name-lookup.o): Same.
2936 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2938 * cp-tree.h (language_function, lang_type_header): Use
2940 * name-lookup.h (cp_binding_level): Likewise.
2942 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2945 * semantics.c (finish_for_expr): Check for unresolved overloaded
2948 * class.c (add_method): Just check processing_template_decl to
2949 determine whether or not we are within a template.
2950 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2951 * init.c (decl_constant_value): Check the type of the declaration,
2953 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2954 (push_to_top_level): ... this.
2955 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2956 * pt.c (push_template_decl_real): Reorder condition for speed.
2957 (convert_template_argument): Use dependency-checking functions in
2958 place of uses_template_parms.
2959 (lookup_template_class): Avoid calling uses_template_parms more
2961 (uses_template_parms): Reimplement, using dependency-checking
2963 (instantiate_class_template): Use push_to_top_level, not
2964 maybe_push_to_top_level.
2965 (type_unification_real): Simplify.
2966 (type_dependent_expression_p): Handle OFFSET_REFs and
2968 (any_dependent_template_arguments_p): Handle multiple levels of
2970 * semantics.c (expand_or_defer_fn): Do not check
2971 uses_template_parms for template instantiations.
2972 * typeck.c (comptypes): Avoid calling cp_type_quals.
2974 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2977 * call.c (build_over_call): Do not convert arguments when
2978 processing a template.
2979 * pt.c (build_non_dependent_expr): Do not build a
2980 NON_DEPENDENT_EXPR for arithmetic constants.
2982 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2985 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2986 returns a TYPE_DECL. no further lookup is required.
2987 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2988 is invalid. Rework to give better diagnostics.
2990 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2993 * pt.c (instantiate_class_template): Add an error_mark_node
2995 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2997 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3000 * decl.c (finish_function): Move the call to
3001 finish_fname_decls below the call to
3002 finish_eh_spec_block.
3004 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3006 * optimize.c, typeck2.c: Update copyright.
3008 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3010 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3011 init.c, mangle.c, typeck.c: Update copyright.
3013 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3015 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3017 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3019 * Make-lang.in: Replace $(docdir) with doc.
3020 (c++.info, c++.srcinfo): Dummy entry.
3021 (c++.man, c++.srcman): New rules.
3022 (c++.install-man): Revamp rule.
3024 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3026 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3027 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3028 immediate $(shell) instead of deferred backquote.
3030 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3033 * parser.c (cp_parser_postfix_expression): When encountering
3034 incomplete type on left-hand side of "->" or ".", treat the entire
3035 expression as erroneous.
3038 * call.c (build_field_call): Remove.
3039 (n_build_method_call): Likewise.
3040 (build_method_call): Likewise.
3041 (build_new_method_call): Do not call build_field_call.
3042 * class.c (n_build_method_call): Remove.
3043 (print_class_statistics): Do not print it.
3044 * cp-tree.h (build_method_call): Remove declaration.
3045 (finish_object_call_expr): Likewise.
3046 (build_new_1): Do not use build_method_call.
3047 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3048 when the function appearing on the right-hand-side of "." or "->"
3049 is not actually a function.
3050 * pt.c (tsubst_copy_and_build): Likewise.
3051 * semantics.c (finish_object_call_expr): Remove.
3053 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3056 * pt.c (tsubst): Use finish_typeof.
3058 2004-01-18 Jason Merrill <jason@redhat.com>
3061 * except.c (build_throw): In a template, set
3062 current_function_returns_abnormally.
3064 2004-01-17 Fred Fish <fnf@intrinsity.com>
3067 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3068 except don't call array_type_nelts() with a VECTOR_TYPE.
3070 2004-01-16 Jan Hubicka <jh@suse.cz>
3072 * mangle.c (write_mangled_name): Remove inline modifier.
3074 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3077 * decl.c (compute_array_index_type): Fix grammar in comment.
3078 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3081 * call.c (name_as_c_string): Print conversion operator names
3085 * call.c (initialize_reference): Pass -1 for inner parameter to
3088 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3091 * parser.c (cp_parser_base_specifier): Check for an invalid
3092 keyword `typename' and emit an user-friendly error message.
3094 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3097 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3098 (handle_pragma_implementation): Likewise.
3100 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3103 * typeck.c (build_class_member_access_expr): Allow to access members
3104 of the currently open class.
3105 (finish_class_member_access_expr): Likewise.
3107 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3110 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3111 name by value, instead of computing them.
3112 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3113 arguments. Pass them to validate_nonmember_using_decl.
3114 * name-lookup.h (do_local_using_decl): Adjust.
3115 (do_toplevel_using_decl): Likewise.
3116 * parser.c (cp_parser_using_declaration): Likewise.
3117 * pt.c (tsubst_expr): Likewise.
3119 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3123 * name-lookup.c (qualified_lookup_using_namespace): Search
3124 strongly-associated namespaces first, and only then try other
3127 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3129 * Make-lang.in (c++.srcextra): Dummy entry.
3131 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3134 * parser.c (cp_parser_template_name): Don't try to parse a
3135 conversion-function-id, as it cannot be a template-name.
3136 (cp_parser_simple_type_specifier): Check for invalid template-ids
3137 even after a built-in type.
3139 2004-01-14 Jan Hubicka <jh@suse.cz>
3142 * pt.c (instantiate_decl): Do not increase function_depth.
3144 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3148 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3149 attributes and discard.
3150 * decl.c (xref_tag): Don't overwite existing attributes with
3153 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3156 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3157 is no destructor while looking up a BIT_NOT_EXPR.
3159 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3161 * cxxfilt.c: Remove unused file.
3163 2004-01-14 Jan Hubicka <jh@suse.cz>
3165 Partial fix to PR c++/12850
3166 * decl2.c (mark_used): Do not proactively instantiate templates
3167 when compiling in unit-at-a-time or not optimizing.
3168 * optimize.c (maybe_clone_body): Do not increase function depth.
3170 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3173 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3175 2004-01-12 Steven Bosscher <stevenb@suse.de>
3178 * parser.c (cp_parser_member_declaration): Any non-type is also
3179 not a class or a function.
3181 2004-01-12 Jason Merrill <jason@redhat.com>
3184 * class.c (build_base_path): Do not mark vtable references as
3186 (build_vtbl_ref_1): Likewise.
3188 2004-01-12 Richard Henderson <rth@redhat.com>
3191 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3192 (store_init_value): Use it.
3193 * decl.c (check_initializer): Expect full initialization code
3194 from store_init_value.
3195 * init.c (expand_aggr_init_1): Likewise.
3196 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3198 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3200 * class.c (layout_class_type): For non-POD class types, also copy
3201 the DECL_SIZE and DECL_MODE of fields to the base class type.
3203 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3206 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3207 calling regenerate_decl_from_template.
3209 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3212 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3213 decl-specifier occurring along with a class definition.
3215 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3217 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3218 clauses to comments describing declares_class_or_enum.
3219 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3222 2004-01-12 Jan Hubicka <jh@suse.cz>
3224 * pt.c (for_each_template_parm): Do not check for duplicates.
3225 (for_each_template_parm): Use walk_tree duplicate checking code.
3227 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3230 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3231 is error_mark_node, don't add any more decl_specs.
3232 (cp_parser_init_declarator): After committing to a declaration, if
3233 the decl_specifiers start with error_mark_node, issue an error and
3234 change the type to "int".
3236 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3239 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3241 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3245 * pt.c (tsubst): Substitution must fail if we are attempting to
3246 create an array with element type that is an abstract class type.
3247 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3248 before calling abstract_virtuals_error.
3250 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3252 * name-lookup.c (qualified_lookup_using_namespace): Consider
3253 strong using directives even if we've already found a binding.
3255 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3257 * cp-tree.h (cxx_expand_expr): Change prototype.
3258 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3260 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3263 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3264 looking into them recursively. They can be there because of the
3265 new __offsetof__ extension.
3267 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3269 * parser.c (cp_parser_save_member_function_body): Mark the
3272 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3275 * class.c (build_clone): Copy type attributes from the original
3276 function to the clone.
3279 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3280 references as constant.
3283 * parser.c (cp_parser_explicit_instantiation): Improve error
3285 (cp_parser_require): Improve indication of the error location.
3288 * parser.c (cp_parser_class_head): Reorder logic to check for
3289 invalid qualification.
3291 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3294 * name-lookup.c (lookup_using_namespace): Remove spacesp
3296 (unqualified_namespace_lookup): Likewise.
3297 (lookup_qualified_name): Adjust accordingly.
3298 (lookup_name_real): Likewise.
3299 (lookup_arg_dependent): Do not eliminate the namespace of the
3300 functions found by unqualified name lookup unless that is the
3303 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3305 * semantics.c (push_deferring_access_checks): Fix format.
3306 (resume_deferring_access_checks): Likewise.
3307 (stop_deferring_access_checks): Likewise.
3308 (pop_deferring_access_checks): Likewise.
3309 (get_deferred_access_checks): Likewise.
3310 (pop_to_parent_deferring_access_checks): Likewise.
3311 (perform_deferred_access_checks): Likewise.
3312 (perform_or_defer_access_check): Likewise.
3314 2004-01-04 Richard Henderson <rth@redhat.com>
3316 * call.c (build_over_call): Don't create a save_expr of an
3317 aggregate, but rather its address.
3319 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3322 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3323 an offsetof expression.
3325 * parser.c (cp_parser_parameter_declaration): Fix comment.
3328 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3329 (reference_binding): Set it when appropriate.
3330 (build_temp): New function, split out from ...
3331 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3332 (initialize_reference): Likewise.
3335 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3336 (cp_parser_new): Initialize it.
3337 (cp_parser_postfix_expression): Set it.
3338 (cp_parser_sizeof_operand): Likewise.
3339 (cp_parser_parameteR_declaration): Do not commit early to tenative
3340 parsers when in_type_id_in_expr_p is set.
3342 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3345 * parser.c (cp_parser_template_argument): Don't call
3346 make_unbound_class_template directly.
3347 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3348 UNBOUND_CLASS_TEMPLATE tree node.
3350 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3353 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3355 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3358 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3359 (DECL_FUNCTION_TEMPLATE_P): Use it.
3360 (DECL_CLASS_TEMPLATE_P): Likewise.
3361 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3362 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3363 (cp_parser_template_name): Likewise.
3364 (cp_parser_elaborated_type_specifier): Likewise.
3365 (cp_parser_namespace_name): Likewise.
3366 (cp_parser_class_name): Likewise.
3367 (cp_parser_lookup_name_simple): Likewise.
3369 See ChangeLog.3 for earlier changes.