OSDN Git Service

703941bad9b5e37ce6ec4ff80a168877aef1b19a
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
2
3         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4         Don't check for incomplete base.
5         (get_vfield_name): Simplify while loop.
6         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
7
8 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
9
10         * lex.c (cxx_make_type): Remove call to get_pointer_type.
11         (set_inherited_value_binding_p): Add class_type parameter.
12         (get_class_binding): Adjust.
13         (push_class_level_binding): Don't use set_inherited_value_binding_p.
14
15         * cp-tree.h (IDENTIFIER_VALUE): Remove.
16         (BINFO_PUSHDECLS_MARKED): Likewise.
17         (maybe_inject_for_scope_var): Likewise.
18         (push_class_decls): Likewise.
19         * name-lookup.h (push_class_binding): Remove.
20         (innermost_non_namespace_value): New function.
21         (outer_binding): Likewise.
22         * class.c (add_method): Push bindings before adding to
23         TYPE_METHODS.
24         (restore_class_cache): Do not restore class_shadowed.
25         (pushclass): Do not add USING_DECLs.  Do not call
26         push_class_decls.
27         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
28         * decl.c (pushdecl): Use outer_binding.
29         (poplevel): Set the scope for an out-of-scope for-loop declaration
30         appropriately.
31         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
32         * name-lookup.c (new_class_binding): New function.
33         (push_binding): Use it.
34         (pushdecl): Use innermost_non_namespace_value.
35         (maybe_inject_for_scope_var): Remove.
36         (push_class_binding): Remove.
37         (set_inherited_value_binding_p): New function.
38         (get_class_binding): New function.
39         (push_class_level_binding): Assert that the current_class_type is
40         being defined.
41         (outer_binding): New function.
42         (innermost_non_namespace_value): Likewise.
43         (lookup_name_real): Use outer_binding.
44         (lookup_name_current_level): Ignore out-of-scope variables.
45         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
46         (lookup_template_class): Likewise.
47         * search.c (dfs_push_type_decls): Remove.
48         (dfs_push_decls): Likewise.
49         (setup_class_bindings): Likewise.
50         (lookup_field_1): Handle USING_DECLs from dependent scopes.
51         (marked_pushdecls_p): Remove.
52         (unmarked_pushdecls_p): Remove.
53         (marked_identifiers): Remove.
54         (setup_class_bindings): Remove.
55         (dfs_push_type_decls): Remove.
56         (dfs_push_decls): Remove.
57         (push_class_decls): Remove.
58         
59 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
60
61         PR c++/16518
62         PR c++/16337
63         * decl.c (grokvardecl): Make declspecs parameter const.
64         (grokdeclarator): Likewise.  Adjust accordingly.
65         * decl.h (grokdeclarator): Adjust declaration.
66         * parser.c (cp_parser_init_declarator): Do not clear
67         decl_specifiers->attributes.
68
69         * cp-tree.h (lang_identifier): Remove class_value.
70         (IDENTIFIER_CLASS_VALUE): Remove.
71         (pop_class_decls): Likewise.
72         (init_search_processing): Likewise.
73         * class.c (handle_using_decl): Use lookup_member, not
74         IDENTIFIER_CLASS_VALUE.
75         (restore_class_cache): New function, split out from ...
76         (pushclass): ... here.  Do not call clear_identifier_class_values.
77         (invalidate_class_lookup_cache): Do not clear
78         IDENTIFIER_CLASS_VALUE.
79         (popclass): Do not call pop_class_decls.
80         (maybe_note_name_used_in_class): Do not save names looked up after
81         the class is complete.  Use lookup_member, not
82         IDENTIFIER_CLASS_VALUE.
83         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
84         * decl.c (cxx_init_decl_processing): Do not call
85         init_search_processing.
86         * method.c (do_build_copy_constructor): Remove unnecessary code.
87         (do_build_assign_ref): Likewise.
88         * name-lookup.c (pushdecl): Use lookup_member, not
89         IDENTIFIER_CLASS_VALUE.
90         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
91         type_shadowed list.
92         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
93         (push_class_binding): Do not set it.
94         (clear_identifier_class_values): Remove.
95         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
96         (store_binding): Do not save it.
97         (pop_from_top_level): Do not restore it.
98         * name-lookup.h (cxx_saved_binding): Remove class_value.
99         (clear_identifier_class_values): Remove.
100         * ptree.c (cxx_print_identifier): Do not print
101         IDENTIFIER_CLASS_VALUE.
102         * search.c (search_obstack): Remove.
103         (push_stack_level): Remove.
104         (pop_stack_level): Remove.
105         (search_level): Remove.
106         (search_stack): Remove.
107         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
108         (setup_class_bindings): Use IDENTIFIER_MARKED, not
109         IDENTIFIER_CLASS_VALUE.
110         (marked_identifiers): New variable.
111         (push_class_decls): Clear IDENTIFIER_MARKED.
112         (pop_class_decls): Don't call pop_search_level.
113         (init_search_processing): Remove.
114
115 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
116
117         * cp-tree.h (get_aggr_typedef): Remove.
118         * init.c (get_aggr_typedef): Likewise.
119
120         * name-lookup.c (push_class_level_binding): Simplify.
121
122 2004-07-12  Andrew Pinski  <apinski@apple.com>
123
124         PR c++/16475
125         Revert:
126         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
127                 PR c++/16276
128                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
129                 is not public.
130
131 2004-07-12  Eric Christopher  <echristo@redhat.com>
132
133         * parser.c (cp_parser_class_head): Remove unused variable.
134
135 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
136
137         * decl.c (grok_op_properties): Reject [de-]allocation functions
138         declared in a namespace, or declared as static.
139
140 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
141
142         * cp-tree.h (make_binfo): Remove.
143         * decl.c (xref_basetypes): Use make_tree_binfo directly.
144         * tree.h (copy_base_binfos): Likewise.
145         (make_binfo): Remove.
146
147         * call.c (build_user_type_conversion_1, build_new_op,
148         check_constructor_callable, build_temp,
149         perform_direct_initialization_of_possible): Pass type directly to
150         lookup_fnfields & build_special_member_call.
151         (build_special_member_call): Accept a type, and complete it.
152         * class.c (finish_stuct_bits): Copy the BINFOs here.
153         * cvt.c (ocp_convert): Pass type directly to
154         build_special_member_call.
155         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
156         (xref_basetypes): Allocate the binfo here. Adjust.
157         * init.c (build_init, build_new_1): Pass type directly to
158         build_special_member_call.
159         * lex.c (cxx_make_type): Do not allocate binfo here.
160         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
161         * parser.c (cp_parser_class_head): Always call xref_basetypes.
162         * pt.c (instantiate_class_template): Likewise. Inhibit access
163         checking for template friends.
164         * ptree.c (cxx_print_type): Adjust record printing.
165         * search.c (lookup_base): When taking a type, complete it before
166         looking for a binfo.
167         (lookup_member): Delay completing a type.
168         (push_class_decls): Don't walk an incomplete type.
169         (lookup_conversions): Likewise.
170         * semantics.c (finish_stmt_expr_expr): Pass type directly to
171         build_special_member_call.
172         * tree.c (copy_base_binfos): Adjust.
173         (make_binfo): Likewise.
174         * typeck.c (build_modify_expr): Pass type directly to
175         build_special_member_call.
176         * typeck2.c (process_init_constructor): Check a binfo exists.
177         (build_m_component_ref): Allow accessing an incomplete type.
178         (build_functional_cast): Pass type directly to
179         build_special_member_call.
180
181 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
182
183         PR c++/2204
184         * config-lang.in (gtfiles): Add typeck2.c.
185         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
186         gt-cp-typeck2.h.
187         * cp-tree.h: Declare complete_type_check_abstract.
188         * typeck2.c (pat_calc_hash, pat_compare,
189         complete_type_check_abstract): New functions.
190         (abstract_virtuals_error): If the type is abstract, register the
191         declaration within abstract_pending_vars for further checks.
192         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
193         * decl.c (cp_finish_decl): Do not strip array types.
194         (create_array_type_for_decl): Check for abstractness of the element
195         type.
196         (complete_vars): Call complete_type_check_abstract.
197         * class.c (finish_struct): Prepare a list of virtual functions for
198         template types, and call complete_vars on it to check for abstractness.
199
200 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
201
202         PR tree-optimization/14107
203         * decl.c (finish_function): Remove temporary band-aid.
204
205 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
206
207         * call.c (build_operator_new_call): Avoid using push_to_top_level.
208         (build_new_op): Adjust call to lookup_function_nonclass.
209         * name-lookup.c (identifier_type_value): Adjust call to
210         lookup_name_real.
211         (lookup_name_real): Add block_p parameter.
212         (lookup_name_nonclass): Adjust call to lookup_name_real.
213         (lookup_function_nonclass): Likewise.
214         (lookup_name): Likewise.
215         * name-lookup.h (lookup_name_real): Change prototype.
216         (lookup_name_nonclass): Likewise.
217         * parser.c (cp_parser_lookup_name): Likewise.
218
219         * cp-tree.h (saved_scope): Make old_bindings a vector.
220         (unuse_fields): Remove.
221         * name-lookup.h (cxx_saved_binding): Define it.
222         * class.c (pushclass): Don't use unuse_fields.
223         * name-lookup.c (cxx_saved_binding_make): Remove.
224         (store_binding): Add new bindings to a vector, using an
225         accumulator style, rather than adding them to a list.
226         (store_bindings): Adjust accordingly.
227         (store_class_bindings): Likewise.
228         (push_to_top_level): Likewise.
229         (pop_from_top_level): Likewise.
230         * optimize.c (maybe_clone_body): Must push_to_top_level and
231         pop_from_top_level calls outside of loop.
232         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
233         calls here from cp_parser_late_parsing_default_args.
234         (cp_parser_save_default_args): Record the class type in which the
235         function is declared.
236         (cp_parser_late_parsing_default_args): Do not call
237         push_nested_class/pop_nested_class.
238         * search.c (dfs_unuse_fields): Remove.
239         (unuse_fields): Remove.
240
241 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
242
243         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
244         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
245         * cp-tree.h (poplevel): Declare.
246         (set_block): Remove.
247         * decl.c (set_block): Remove.
248
249 2004-07-10  Mike Stump  <mrs@apple.com>
250
251         * decl2.c (import_export_class): Never export/import vtables
252         with inline key functions.
253
254 2004-07-09  Steven Bosscher  <stevenb@suse.de>
255
256         * typeck.c (c_expand_asm_operands): Remove.
257
258 2004-07-09  Mike Stump  <mrs@apple.com>
259
260         * typeck.c (build_class_member_access_expr): Skip null deref
261         warning when we don't dereference it.
262
263 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
264
265         PR c++/8211
266         PR c++/16165
267         * class.c (check_field_decls): Improve -Weffc++ warning: do not
268         warn for pointers to functions/members, or for classes without
269         destructors.
270
271 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
272
273         * name-lookup.h (struct cp_binding_level): Update documentation
274         for class_shadowed.
275
276 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
277
278         PR c++/16169
279         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
280         returning CALL_EXPR, and non-reference return type.
281
282 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
283
284         * name-lookup.c (push_binding): Use VEC_reserve.
285
286 2004-07-08  Richard Henderson  <rth@redhat.com>
287
288         * cp-tree.h (expand_eh_spec_block): Remove.
289
290 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
291
292         * cp-tree.h (saved_scope): Remove x_previous_class_type and
293         x_previous_class_values; add x_previous_class_level.
294         (previous_class_type): Remove.
295         (previous_class_values): Remove.
296         (previous_class_level): New macro.
297         * class.c (pushclass): Restore the identifier cache more
298         expeditiously.
299         (invalidate_class_lookup_cache): Use vector for class_shadowed and
300         previous_class_values.
301         * decl.c (poplevel): Likewise.
302         * name-lookup.c (cxx_binding_init): New function.
303         (cxx_binding_make): Use it.
304         (push_binding): For a binding in a class level, use a vector of
305         cp_class_binding nodes.
306         (push_binding_level): New function.
307         (begin_scope): Use it.
308         (leave_scope): Do not put class binding levels on the free list.
309         (print_binding_level): Adjust for the fact that class_shadowed is
310         a vector.
311         (poplevel_class): Likewise.
312         (clear_identifier_class_values): Likewise.
313         (push_class_level_binding): Likewise.
314         (set_class_shadows): Remove.
315         (store_binding): New function.
316         (store_class_bindings): New function.
317         (push_to_top_level): Use store_class_bindings as appropriate.
318         (pop_from_top_level): Use previous_class_level, not
319         previous_class_type.
320         * name-lookup.h (cp_class_binding): New type.
321         (cp_binding_level): Use a vector object for class_shadowed.
322         (push_binding_level): Declare.
323         (set_class_shadows): Remove.
324
325 2004-07-07  Andrew Pinski  <apinski@apple.com>
326
327         * class.c (instantiate_type): BUFFER_REF is dead.
328         * lex.c (init_operators): IN_EXPR is dead.
329
330 2004-07-07  Jason Merrill  <jason@redhat.com>
331
332         PR c++/16334
333         * call.c (build_new_op): Give overload warnings for built-in
334         candidates.
335
336 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
337
338         PR c++/16276
339         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
340         is not public.
341
342 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
343
344         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
345         * class.c (build_primary_vtable, check_bases,
346         determine_primary_base, finish_struct_bits,
347         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
348         get_basefndecls, warn_hidden, walk_subobject_offsets,
349         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
350         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
351         finish_struct_1, get_vfield_name, contains_empty_class_p,
352         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
353         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
354         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
355         BINFO macros.
356         * decl.c (xref_basetypes): Likewise.
357         * dump.c (cp_dump_tree): Likewise.
358         * error.c (dump_expr): Likewise.
359         * init.c (sort_mem_initializers, expand_member_init,
360         push_base_cleanups): Likewise.
361         * method.c (do_build_copy_constructor, do_build_assign_reg,
362         synthesize_exception_spec): Likewise.
363         * name-lookup.c (arg_assoc_class):
364         * pt.c (instantiate_class_template, tsubst,
365         get_template_base_recursive):
366         * ptree.c (cxx_print_type):
367         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
368         * search.c (lookup_base_r, dynamic_cast_base_recurse,
369         dfs_access_in_type, access_in_type, lookup_field_queue_p,
370         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
371         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
372         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
373         binfo_for_vtable, copied_binfo, original_binfo): Likewise
374         * tree.c (copy_base_binfos, make_binfo): Likewise.
375         * typeck.c (commmon_base_type): Likewise
376         * typeck2.c (process_init_constructor): Likewise
377
378 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
379
380         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
381
382 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
383
384         PR c++/3671
385         * pt.c (convert_nontype_argument): Disallow conversions between
386         different enumeration types.
387
388 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
389
390         * cp-tree.h (BINFO_MARKED): Remove.
391         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
392         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
393         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
394         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
395         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
396         (mark_primary_bases, determine_primary_base, base_derived_from,
397         dfs_find_final_overrider, dfs_find_final_overrider_q,
398         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
399         dfs_modify_vtables, walk_subobject_offsets,
400         layout_nonempty_base_or_field, build_base_field,
401         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
402         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
403         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
404         build_ctor_vtbl_group, accumulate_vtble_inits,
405         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
406         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
407         add_vcall_offset_vtbl_entries_1): Likewise.
408         * decl.c (xref_basetypes): Incomming virtual base indicated by
409         TREE_TYPE. Adjust.
410         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
411         * init.c (finish_init_stmts, sort_mem_initializers,
412         emit_mem_initializers, build_vtble_address, expand_member_init,
413         push_base_cleanups): Likewise.
414         * method.c (do_build_copy_constructor): Likewise.
415         * pt.c (instantiate_class_template,
416         get_template_base_recursive): Likewise.
417         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
418         get_pseudo_ti_desc): Likewise.
419         * search.c (lookup_base_r, dynamic_cast_base_recurse,
420         binfo_from_vbase, binfo_via_virtual, copied_binfo,
421         original_binfo): Likewise.
422         * semantics.c (finish_base_specifier): Virtualness is indicated
423         by TREE_TYPE.
424         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
425
426 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
427
428         Revert:
429         2004-06-24  Jason Merrill  <jason@redhat.com>
430         PR c++/16115
431         * decl.c (grokparms): Give the PARM_DECL reference type if the
432         parameter is passed by invisible reference.
433
434 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
435
436         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
437         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
438         * pt.c (check_instantiated_args, unify): Likewise.
439
440 2004-07-05  Phil Edwards  <phil@codesourcery.com>
441
442         * Make-lang.in (check-c++, lang_checks):  Add some comments.
443
444 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
445
446         * cp-mudflap.c: Delete file.
447         * Makefile.in: Remove all references to cp-mudflap.o.
448
449 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
450
451         * decl.c (cxx_init_decl_processing): Call
452         build_common_tree_nodes before creating the global NAMESPACE_DECL.
453
454 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
455
456         PR c++/2518
457         * call.c (build_operator_new_call): Look only at global scope.
458
459 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
460
461         * call.c (enforce_access): Expect TREE_BINFO.
462         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
463         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
464         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
465         Adjust.
466         (BINFO_LANG_ELTS): Remove.
467         (BINFO_LANG_SLOTS): New.
468         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
469         (CLASSTYPE_TEMPLATE_INFO): Adjust.
470         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
471         * search.c (lookup_member): Check TREE_BINFO.
472         * semantics.c (perform_or_defer_access_check): Likewise.
473         (check_accessibility_of_qualified_id): Check
474         deferred_access_no_check.
475         * tree.c (make_binfo): Use make_tree_binfo.
476
477 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
478
479         * method.c (implicitly_declare_fn): Set linkage of generated
480         functions.
481
482 2004-07-04  Richard Henderson  <rth@redhat.com>
483
484         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
485
486 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
487
488         PR c++/3761
489         * name-lookup.c (push_class_level_binding): Don't pass a
490         TREE_LIST of ambiguous names to check_template_shadow as it
491         only handles declarations. Instead, pull the declaration
492         out and pass that.
493
494 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
495
496         PR c++/14971
497         * pt.c (check_explicit_specialization): Clarify error message.
498
499 2004-07-02  Richard Henderson  <rth@redhat.com>
500
501         * tree.c (cp_unsave_r): Update remap_save_expr call.
502
503 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
504
505         PR c++/16240
506         * mangle.c (write_template_arg): Correct mangling.
507
508         PR c++/16297
509         * decl.c (grokdeclarator): Robustify.
510
511 2004-07-01  Richard Henderson  <rth@redhat.com>
512
513         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
514         * method.c (synthesize_method): Don't clear_last_expr.
515         * name-lookup.c (maybe_push_cleanup_level): Likewise.
516
517 2004-07-01  Nick Clifton  <nickc@redhat.com>
518
519         * decl2.c (import_export_class): Invoke the
520         import_export_class field in the gcc_target structure if it is not
521         empty.
522
523 2004-06-30  Richard Henderson  (rth@redhat.com>
524
525         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
526         * method.c (use_thunk): Likewise.
527
528 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
529
530         * call.c (build_over_call), typeck.c (build_function_call): Call
531         check_function_arguments instead of check_function_format.
532
533 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
534
535         * call.c (build_over_call), typeck.c (build_function_call): Update
536         calls to check_function_format.
537
538 2004-06-30  Richard Henderson  <rth@redhat.com>
539
540         * call.c (build_over_call): Use __builtin_memcpy for copying
541         CLASS_AS_BASE rather than funny casting.
542
543 2004-06-30  Richard Henderson  <rth@redhat.com>
544
545         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
546         TYPE_SIZE_UNIT of full_type.
547
548 2004-06-30  Per Bothner  <per@bothner.com>
549
550         Conditionally compile support for --enable-mapped_location.
551         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
552         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
553         adjustments - which I don't understand.
554         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
555         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
556         (print_instantiation_partial_context):  Use expand_location.
557         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
558         * name-lookup.c:  Likewise.
559         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
560         * name-lookup.c:  Use input_line macro.
561         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
562         (cp_parser_statement):  Rename locaal variable statement_locus to
563         statement_location and use SET_EXPR_LOCATION macro.
564         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
565         * tree.c (cp_walk_subtrees):  Likewise.
566
567 2004-06-29  Per Bothner  <per@bothner.com>
568
569         * tree.c (build_min_nt, build_min, build_min_non_dep):
570         Don't set TREE_COMPLEXITY from input_line.
571
572 2004-06-29  Paul Brook  <paul@codesourcery.com>
573
574         * init.c: Include target.h.
575         (get_cookie_size): Remove and replace with target hook.
576         Update callers.
577         (build_new_1): Store the element size in the cookie.
578
579 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
580
581         PR c++/16260
582         * parser.c (cp_parser_template_declaration_after_export): Disable
583         access checks here ...
584         (cp_parser_class_specifier): ... not here.
585
586 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
587
588         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
589         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
590         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
591         TREE_CHECK macro.
592
593 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
594
595         * cp-tree.h (struct deferred_access): Move to ...
596         * semantics.c (struct deferred_access): ... here. Adjust.
597         (deferred_access_stack): Make a VEC(deferred_access),
598         (deferred_access_free_list): Remove.
599         (deferred_access_no_check): New.
600         (push_deferring_access_checks, resume_deferring_access_checks,
601         stop_deferring_access_checks, pop_deferring_access_checks,
602         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
603         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
604
605 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
606
607         PR c++/16174
608         * call.c (build_temp): Declare.
609         (check_constructor_callable): New.
610         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
611         CONSTRUCTOR_CALLABLE.
612         (convert_like_real, initialize_reference): Use
613         check_constructor_callable.
614         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
615         (LOOKUP_*): Renumber.
616
617 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
618
619         * friend.c (add_friend): Only perform access checks when context
620         is a class.
621         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
622         * parser.c (cp_parser_class_specifier): Disable access checks here
623         when parsing the body of a templated class.
624         * semantics.c (perform_or_defer_access_checks): Reorder to allow
625         NULL binfos when not checking access.
626
627 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
628
629         Use vector API for vbase list.
630         * cp-tree.h: Include vec.h
631         (DEF_VEC_P (tree)): New type.
632         (struct lang_type_class): Change vbase's member type.
633         (binfo_for_vbase): Declare.
634         * class.c (determine_primary_base, base_derived_from,
635         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
636         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
637         build_vtbl_initializer): Adjust.
638         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
639         vbases.
640         * init.c (sort_mem_initializers, expand_member_init,
641         push_base_cleanups): Adjust.
642         * method.c (do_build_copy_constructor): Adjust.
643         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
644         (binfo_for_vbase): New.
645         * tree.c (copy_base_binfos): Adjust.
646
647 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
648
649         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
650
651 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
652
653         PR c++/14123
654         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
655         paranthesis in case of pointers to array members.
656         * error.c (dump_type_prefix): Likewise.
657         (dump_type_suffix): Maybe issue a whitespace when printing
658         ARRAY_TYPE.
659
660 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
661
662         PR c++/16193
663         * parser.c (cp_parser_set_decl_spec_type): Refine test for
664         redefinition of built-in types.
665
666 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
667
668         * error.c (pp_template_argument_list_start): Remove.
669         (pp_template_argument_list_end): Likewise.
670         (pp_separate_with_comma): Use pp_cxx_separate_with.
671         (reinit_global_formatting_buffer): Remove.
672         (pp_non_consecutive_character): Likewise.
673         (dump_scope): Use pp_cxx_colon_colon.
674         (dump_template_parameter): Use pp_cxx_identifier,
675         pp_cxx_tree_identifier and pp_cxx_whitespace.
676         (dump_templat_bindings): Replace use of pp_string with sequence
677         of pp_cxx_whitespace and pp_equal.
678         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
679         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
680         padding here.
681         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
682         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
683         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
684         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
685         pp_cxx_right_bracket, pp_cxx_identifier throughout,
686         (dump_decl): Likewise.
687         (dump_template_decl): Likewise.
688         (dump_function_decl): Likewise.  Set padding as appropriate.
689         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
690         pp_cxx_right_paren.
691         (dump_exception_spec): Likewise.
692         (dump_function_name): Use pp_cxx_tree_identifier and
693         pp_cxx_identifier.
694         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
695         pp_cxx_end_template_argument_list.
696         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
697         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
698         pp_cxx_whitespace throughout.
699         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
700         pp_cxx_right_paren.
701         (dump_unary_op): Likewise.
702         (reinit_cxx_pp): New function.
703         (type_as_string); Use it.
704         (expr_as_string): Likewise.
705         (decl_as_string); Likewise.
706         (context_as_string): Likewise.
707         (lang_decl_name): Likewise.
708         (decl_to_string): Likewise.
709         (expr_to_string): Likewise.
710         (parm_to_string): Likewise.
711         (type_to_string): Likewise.
712         (args_to_string): Likewise.
713         (cv_to_string): Likewise.
714
715 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
716
717         * cp-tree.h (cp_cv_quals): New type.
718         (cp_declarator): Use it instead of "tree" as appropriate.
719         (grok_method_quals): Adjust prototype.
720         (grokclassfn): Likewise.
721         (do_friend): Likewise.
722         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
723         (grokdeclarator): Likewise.
724         * decl2.c (grok_method_quals): Likewise.
725         (grokclassfn): Likewise.
726         * friend.c (do_friend): Likewise.
727         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
728         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
729         (make_pointer_declarator): Likewise.
730         (make_reference_declarator): Likewise.
731         (make_ptrmem_declarator): Likewise.
732         (cp_parser_ptr_operator): Likewise.
733         (cp_parser_cv_qualifier_seq_opt): Likewise.
734         (cp_parser_cv_qualifier_opt): Remove.
735         (cp_parser_new_declarator_opt): Adjust call to
736         cp_parser_ptr_operator.
737         (cp_parser_conversion_declaration_opt): Likewise.
738         (cp_parser_declarator): Use cp_cv_quals, not tree.
739         (cp_parser_direct_declarator): Likewise.
740
741 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
742
743         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
744         Rename DECL_STMT to DECL_EXPR.
745         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
746         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
747         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
748
749 2004-06-26  Jan Hubicka  <jh@suse.cz>
750
751         PR C++/14865
752         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
753         reachability analysis.
754
755 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
756
757         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
758         2004-06-23 change.
759
760 2004-06-25  Paul Brook  <paul@codesourcery.com>
761
762         * decl2.c (get_guard): Call targetm.cxx.guard_type.
763         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
764
765 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
766
767         * decl.c (grokdeclarator): Restore error messages about __thread.
768         * parser.c (cp_parser_decl_specifier_seq): Likewise.
769
770 2004-06-24  Jason Merrill  <jason@redhat.com>
771
772         PR c++/16115
773         * decl.c (grokparms): Give the PARM_DECL reference type if the
774         parameter is passed by invisible reference.
775
776 2004-06-24  Andreas Schwab  <schwab@suse.de>
777
778         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
779
780 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
781
782         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
783         (cp/decl.o): Likewise.
784         (cp/decl2.o): Likewise.
785         (cp/pt.o): Likewise.
786         (cp/semantics.o): Likewise.
787         * config-lang.in (gtfiles): Do not reference cp/lex.h.
788         * class.c: Do not include lex.h.
789         (add_implicitly_declared_members): Do not use
790         adding_implicit_members.
791         (check_bases_and_members): Do not talk about grok_x_components.
792         * cp/cp-tree.h (adding_implicit_members): Remove.
793         (cp_storage_class): New type.
794         (cp_decl_spec): Likewise.
795         (cp_decl_specifier_seq): Likewise.
796         (cp_parameter_declarator): Use it for the decl_specifiers field.
797         (check_tag_decl): Adjust prototype.
798         (shadow_tag): Likewise.
799         (groktypename): Likewise.
800         (start_decl): Likewise.
801         (start_function): Likewise.
802         (start_method): Likewise.
803         (grok_x_components): Remove.
804         (grokfield): Adjust prototype.
805         (grokbitfield): Likewise.
806         (finish_member_class_template): Remove.
807         * decl.c: Do not include lex.h.
808         (adding_implicit_members): Do not define.
809         (check_tag_decl): Do not use trees to represent decl-specifiers.
810         (shadow_tag): Likewise.
811         (groktypename): Likewise.
812         (start_decl): Likewise.
813         (grokvardecl): Likewise.
814         (grokdeclarator): Likewise.
815         (grokparms): Likewise.
816         (start_function): Likewise.
817         (start_method): Likewise.
818         * decl.h (grokdeclarator): Adjust prototype.
819         * decl2.c: Do not include lex.h.
820         (grok_x_components): Remove.
821         (grokfield): Do not use trees to represent decl-specifiers.
822         (grokbitfield): Likewise.
823         * lex.c: Do not include lex.h.
824         * lex.h: Remove.
825         * parser.c: Include target.h.
826         (clear_decl_specs): New function.
827         (cp_parser_translation_unit): Do not use trees to represent
828         decl-specifiers.
829         (cp_parser_postfix_expression): Likewise.
830         (cp_parser_new_type_id): Likewise.
831         (cp_parser_condition): Likewise.
832         (cp_parser_simple_declaration): Likewise.
833         (cp_parser_decl_specifier_seq): Likewise.
834         (cp_parser_function_specifier_opt): Likewise.
835         (cp_parser_conversion_type_id): Likewise.
836         (cp_parser_template_parameter): Likewise.
837         (cp_parser_explicit_instantiation): Likewise.
838         (cp_parser_type_specifier): Likewise.
839         (cp_parser_simple_type_specifier): Likewise.
840         (cp_parser_init_declarator): Likewise.
841         (cp_parser_type_id): Likewise.
842         (cp_parser_type_specifier_seq): Likewise.
843         (cp_parser_parameter_declaration): Likewise.
844         (cp_parser_member_declaration): Likewise.
845         (cp_parser_exception_declaration): Likewise.
846         (cp_parser_function_definition_from_specifiers_and_declarator):
847         Likewise.
848         (cp_parser_single_declaration): Likewise.
849         (cp_parser_save_member_function_body): Likewise.
850         (cp_parser_friend_p): Likewise.
851         (cp_parser_set_storage_class): New function.
852         (cp_parser_set_decl_spec_type): Likewise.
853         * pt.c: Do not include lex.h.
854         * semantics.c: Likewise.
855         (finish_member_class_template): Remove.
856
857 2004-06-23  Roger Sayle  <roger@eyesopen.com>
858
859         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
860         longer take both "args" and "convert_args" as arguments.
861         (build_op_delete_call): Update call to build_cxx_call.
862         (build_over_call): Likewise, update call to build_cxx_call.
863         * cp-tree.h (build_cxx_call): Update funtion prototype.
864         * typeck.c (build_function_call): Don't call expand_tree_builtin.
865         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
866         (throw_bad_typeid): Likewise.
867         (build_dynamic_cast_1): Likewise.
868
869 2004-06-22  Richard Henderson  <rth@redhat.com>
870
871         * class.c (build_vfn_ref): Take a pointer not object.  Build
872         an OBJ_TYPE_REF.
873         (cp_fold_obj_type_ref): New.
874         * call.c (build_over_call): Update build_vfn_ref call.
875         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
876         * cp-tree.h (cp_fold_obj_type_ref): Declare.
877
878 2004-06-21  Jason Merrill  <jason@redhat.com>
879
880         PR c++/16112
881         * cp-gimplify.c (cp_gimplify_init_expr): Look through
882         CLEANUP_POINT_EXPR.
883
884 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
885
886         * cp-tree.def (NEW_EXPR): Add a fourth slot.
887         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
888         (TREE_PARMLIST): Likewise.
889         (CALL_DECLARATOR_PARMS): Likewise.
890         (CALL_DECLARATOR_QUALS): Likewise.
891         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
892         (cp_declarator_kind): New type.
893         (cp_parameter_declarator): Likewise.
894         (cp_declarator): Likewise.
895         (cp_error_declarator): Likewise.
896         (no_parameters): Likewise.
897         (groktypename): Change prototype.
898         (start_decl): Likewise.
899         (start_handler_parms): Likewise.
900         (get_scope_of_declarator): Likewise.
901         (start_function): Likewise.
902         (start_preparsed_function): New function.
903         (start_function): Change prototype.
904         (start_method): Likewise.
905         (grokfield): Likewise.
906         (grokbitfield): Likewise.
907         (build_new): Likewise.
908         (make_pointer_declarator): Remove.
909         (make_reference_declarator): Likewise.
910         (make_call_declarator): Likewise.
911         (set_quals_and_spec): Likewise.
912         (process_template_parm): Change prototype.
913         (begin_function_definition): Remove.
914         (finish_parmlist): Remove.
915         * decl.c (groktypename): Do not use trees to represent
916         declarators.
917         (start_decl): Likewise.
918         (start_handler_parms): Remove.
919         (get_scope_of_declarator): Reimplement.
920         (grokdeclarator): Do not use trees to represent declarators.
921         (grokparms): Likewise.
922         (start_function): Likewise.
923         (start_method): Likewise.
924         (build_void_list_mode): Do not use TREE_PARMLIST.
925         * decl.h (grokdeclarator): Change prototype.
926         * decl2.c (grok_method_quals): Robustify.
927         (grok_x_components): Do not use trees to represent declarators.
928         (grokfield): Likewise.
929         (grokbitfield): Likewise.
930         (start_objects): Build FUNCTION_DECLs, not declarators.
931         (start_static_storage_duration_function): Likewise.
932         * init.c (build_new): Simplify.
933         * lex.c (make_pointer_declarator): Remove.
934         (make_reference_declarator): Likewise.
935         (make_call_declarator): Likewise.
936         (set_quals_and_spec): Likewise.
937         * method.c (use_thunk): Use start_preparsed_function.
938         (synthesize_method): Likewise.
939         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
940         * optimize.c (maybe_clone_body): Use start_preparsed_function.
941         * parser.c (cp_error_declarator): New variable.
942         (declarator_obstack): Likewise.
943         (alloc_declarator): New function.
944         (make_declarator): Likewise.
945         (make_id_declarator): Likewise.
946         (make_pointer_declarator): Likewise.
947         (make_reference_declarator): Likewise.
948         (make_ptrmem_declarator): Likewise.
949         (make_call_declarator): Likewise.
950         (make_array_declarator): Likewise.
951         (no_parameters): New variable.
952         (make_parameter_declarator): Likewise.
953         (cp_parser_check_for_definition_in_return_type): Do not use trees
954         to represent declarators.
955         (cp_parser_translation_unit): Likewise.
956         (cp_parser_new_expression): Likewise.
957         (cp_parser_new_type_id): Likewise.
958         (cp_parser_new_declarator_opt): Likewise.
959         (cp_parser_direct_new_declarator): Likewise.
960         (cp_parser_condition): Likewise.
961         (cp_parser_declaration_statement): Likewise.
962         (cp_parser_declaration): Likewise.
963         (cp_parser_conversion_type_id): Likewise.
964         (cp_parser_conversion_declarator_opt): Likewise.
965         (cp_parser_template_parameter_list): Likewise.
966         (cp_parser_template_parameter): Likewise.
967         (cp_parser_explicit_instantiation): Likewise.
968         (cp_parser_init_declarator): Likewise.
969         (cp_parser_declarator): Likewise.
970         (cp_parser_direct_declarator): Likewise.
971         (cp_parser_type_id): Likewise.
972         (cp_parser_parameter_declaration_clause): Likewise.
973         (cp_parser_parameter_declaration_list): Likewise.
974         (cp_parser_parameter_declaration): Likewise.
975         (cp_parser_member_declaration): Likewise.
976         (cp_parser_exception_declaration): Likewise.
977         (cp_parser_check_declarator_template_parameters): Likewise.
978         (cp_parser_function_definition_from_specifiers_and_declarator):
979         Likewise.
980         (cp_parser_save_member_function_body): Likewise.
981         * pt.c (process_template_parm): Add is_non_type parameter.
982         (convert_template_argument): Adjust call to groktypename.
983         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
984         (tsubst): Do not expect declarators.
985         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
986         argument.
987         (instantiate_decl): Use start_preparsed_function.
988         * semantics.c (begin_function_definition): Remove.
989         (finish_parmlist): Remove.
990         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
991         declarators.
992
993 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
994
995         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
996         (build_new_method_call): Likewise.
997         * decl.c (local_variable_p_walkfn): Don't walk into types.
998         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
999         (build_anon_union_vars): Add new operand for COMPONENT_REF.
1000         * init.c (buld_new): Add new operand for ARRAY_REF.
1001         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1002         (do_build_assign_ref): Likewise.
1003         * parser.c (cp_parser_direct_new_declarator): Add new operands
1004         for ARRAY_REF.
1005         (cp_parser_direct_declarator): Likewise.
1006         * pt.c (tsubst): Likewise.
1007         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1008         for COMPONENT_REF.
1009         * semantics.c (finish_non_static_data_member): Add new operand
1010         for COMPONENT_REF.
1011         * typeck.c (build_class_member_access_expr): Likewise.
1012         (build_class_member_access_expr, finish_class_member_access_expr):
1013         Likewise.
1014         (build_ptrmemfunc_access_expr): Likewise.
1015         (build_array_ref): Add new operands for ARRAY_REF.
1016         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1017         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1018
1019 2004-06-21  Richard Henderson  <rth@redhat.com>
1020
1021         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1022         * parser.c (cp_parser_jump_statement): Update commentary.
1023         * pt.c (tsubst_expr): Use RETURN_EXPR.
1024         * semantics.c (finish_return_stmt): Likewise.
1025         (finalize_nrv_r): Likewise.
1026         * typeck.c, typeck2.c: Update file start commentary.
1027
1028 2004-06-21  Richard Henderson  <rth@redhat.com>
1029
1030         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1031
1032 2004-06-20  Richard Henderson  <rth@redhat.com>
1033
1034         * cp-tree.h (add_decl_stmt): Declare.
1035         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1036         * semantics.c (maybe_cleanup_point_expr): New.
1037         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1038         finish_for_expr, finish_switch_cond): Use it.
1039         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
1040
1041 2004-06-20  Richard Henderson  <rth@redhat.com>
1042
1043         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1044         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1045         (cp_gimplify_expr): Call it.
1046         (gimplify_cleanup_stmt): Move from c-gimplify.c.
1047         (cp_genericize): New.
1048         * decl.c (finish_function): Call it.
1049         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1050         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1051         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1052         (cp_genericize): Declare.
1053         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1054         * dump.c (cp_dump_tree): Likewise.
1055         * semantics.c (push_cleanup): Move from c-semantics.c.
1056
1057 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
1058
1059         * cp-lang.c (has_c_linkage): Implement.
1060
1061         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1062         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1063         (builtin_function_1): Don't call make_decl_rtl.
1064         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1065         (grokvardecl): Don't call mangle_decl.
1066         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1067         DECL_ASSEMBLER_NAME.
1068         * method.c (set_mangled_name_for_decl): Delete.
1069         * name-lookup.c (pushdecl): When a local extern shadows a
1070         file-scope declaration of the same object, give both DECLs the
1071         same DECL_UID.
1072         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1073         on DECL_ASSEMBLER_NAME.
1074
1075 2004-06-19  Richard Henderson  <rth@redhat.com>
1076
1077         * cp-gimplify.c: Remove unnecessary prototypes.
1078         (cp_gimplify_stmt): Merge into ...
1079         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
1080         stmts_are_full_exprs_p frobbing.
1081         * cp-tree.h (cp_gimplify_stmt): Remove.
1082         * pt.c (tsubst_expr): Merge prep_stmt and unify.
1083         * tree.c (init_tree): Don't set lang_gimplify_stmt.
1084
1085 2004-06-18  Richard Henderson  <rth@redhat.com>
1086
1087         PR c++/16034
1088         * semantics.c (begin_cond): New.
1089         (finish_cond): Rewrite to handle template DECL_STMTs specially.
1090         Assume that non-template decls go land before the conditional.
1091         (simplify_loop_decl_cond): Likewise.
1092         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1093         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1094         begin_switch_stmt, finish_switch_cond): Update to match.
1095
1096 2004-06-17  Jason Merrill  <jason@redhat.com>
1097
1098         PR c++/16015
1099         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1100         (finish_stmt_expr_expr): Update type after conversions.
1101         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1102         Handle void initializer.
1103         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1104
1105 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
1106
1107         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1108         * cp-tree.h (defer_fn): Delete.
1109         * decl2.c (defer_fn): Delete.
1110         (finish_file): Simplify deferred_fns loops; check that
1111         only used inline functions get into deferred_fns.
1112         (mark_used): Inline previous contents of defer_fn.
1113
1114 2004-06-16  Richard Henderson  <rth@redhat.com>
1115
1116         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1117         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1118         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1119         of CTOR_INITIALIZER ...
1120         (pp_cxx_statement): ... here.
1121         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1122         (finish_function): Use alloc_stmt_list to zap entire function.
1123         * parser.c (cp_parser_compound_statement): Update commentary.
1124         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1125         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1126         (finish_stmt_expr): Don't look through COMPOUND_STMT.
1127
1128 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
1129
1130         * pt.c (mark_decl_instantiated): Don't call defer_fn.
1131
1132 2004-06-16  Richard Henderson  <rth@redhat.com>
1133
1134         * parser.c (cp_parser_labeled_statement): Update commentary.
1135         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1136         * tree.c (mark_local_for_remap_r): Likewise.
1137
1138 2004-06-16  Richard Henderson  <rth@redhat.com>
1139
1140         * parser.c (cp_parser_asm_definition): Update commentary.
1141         * pt.c (tsubst_expr): Use ASM_EXPR.
1142         * semantics.c (finish_asm_stmt): Likewise.
1143
1144 2004-06-16  Richard Henderson  <rth@redhat.com>
1145
1146         * decl.c (finish_destructor_body): Use LABEL_EXPR.
1147         * parser.c (cp_parser_statement): Update commentary.
1148         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1149         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1150         * tree.c (mark_local_for_remap_r): Likewise.
1151
1152 2004-06-16  Richard Henderson  <rth@redhat.com>
1153
1154         PR c++/16012
1155         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1156         statement in FOR_INIT_STMT for templates.
1157
1158 2004-06-15  Richard Henderson  <rth@redhat.com>
1159
1160         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1161         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1162         (genericize_try_block): Use gimplify_stmt.
1163         (genericize_catch_block, genericize_eh_spec_block): Likewise.
1164         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1165         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1166         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1167         (cp_tree_chain_matters_p): Remove.
1168         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1169         (COMPOUND_STMT_BODY_BLOCK): New.
1170         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1171         (EXPR_STMT_STMT_EXPR_RESULT): New.
1172         (building_stmt_tree): Check cur_stmt_list.
1173         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1174         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1175         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1176         (cp_finish_decl): Use push_cleanup.
1177         (start_function, finish_function): Use statement lists.
1178         (finish_stmt): Do nothing.
1179         * except.c (begin_eh_spec_block): Use statement lists.
1180         (check_handlers_1, check_handlers): Likewise.
1181         * init.c (construct_virtual_base): Don't add extra compound stmts.
1182         (build_vec_init): Likewise.
1183         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1184         * name-lookup.h (struct cp_binding_level): Add statement_list.
1185         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1186         (cp_parser_labeled_statement, cp_parser_expression_statement,
1187         cp_parser_statement_seq_opt): Likewise.
1188         (cp_parser_compound_statement): Likewise.  Take bool for try block.
1189         (cp_parser_selection_statement): Tidy if processing.
1190         (cp_parser_already_scoped_statement): Rewrite to do what it says.
1191         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1192         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
1193         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1194         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1195         (finish_cond): New, rewritten from FINISH_COND.
1196         (simplify_loop_decl_cond): New.
1197         (finish_expr_stmt): Avoid nested EXPR_STMTs.
1198         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1199         begin_else_clause, finish_else_clause, finish_if_stmt,
1200         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1201         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1202         finish_for_cond, finish_for_stmt, begin_switch_stmt,
1203         finish_switch_cond, finish_switch_stmt, begin_try_block,
1204         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1205         finish_handler_sequence, finish_function_handler_sequence,
1206         begin_handler, finish_handler_parms, finish_handler,
1207         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1208         using statement lists.
1209         (begin_compound_stmt): Replace has_no_scope argument with flags.
1210         Update all callers.  Use statement lists.
1211         (finish_compound_stmt): Likewise.
1212         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1213         (current_scope_stmt_stack): Remove.
1214         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1215         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1216         Rewrite with statement lists.
1217
1218 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
1219
1220         * parser.c: Change all assignments of c_lex_string_translate
1221         to true and false to 1 and 0.
1222         (cp_lexer_read_token): Convert type of the translated string.
1223         (cp_parser_skip_to_closing_parentheses): Preserve original
1224         value of c_lex_string_translate, and set it to -1 while
1225         running.
1226         (cp_parser_cache_group): Likewise.
1227         (cp_parser_cache_group_1): Renamed.
1228         (cp_parser_asm_operand_list): Remove redundant setting of
1229         c_lex_string_translate.
1230         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1231         Handle chained strings.
1232
1233 2004-06-12  Andrew Pinski  <apinski@apple.com>
1234
1235         PR c++/14639
1236         Revert:
1237         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
1238
1239                 * cp-tree.h: Fix typo.
1240
1241                 * cp-tree.h: Include cgraph.h
1242                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1243                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1244
1245 2004-06-12  Jason Merrill  <jason@redhat.com>
1246
1247         PR tree-optimization/14107
1248         * decl.c (finish_function): Warn about no return in all functions.
1249
1250 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
1251
1252         * cp-tree.h (struct language_function): Remove cannot_inline.
1253         * decl.c (save_function_data): cannot_inline is no more.
1254         (cxx_push_function_context): Likewise.
1255         * decl2.c (start_objects, start_static_storage_duration_function):
1256         Reset DECL_INLINE, set DECL_UNINLINABLE.
1257
1258 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1259
1260         PR c++/15967
1261         * search.c (lookup_field): Propagate the ambiguity list.
1262         (lookup_fnfields): Likewise.
1263
1264 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1265
1266         PR c++/15947
1267         * parser.c (cp_parser_template_name): Ctors/dtors never need a
1268         template keyword to disambiguate.
1269
1270 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
1271
1272         PR c++/15096
1273         * decl.c (grokdeclarator): Ignore pointer-to-members when
1274         computing template depth.
1275
1276         PR c++/14930
1277         * name-lookup.c (pushtag): Do not try to put class declarations in
1278         explicit specialization scopes.
1279
1280 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
1281
1282         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1283
1284 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
1285
1286         PR c++/15862
1287         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1288         bindings for undeclared built-ins.
1289
1290 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1291
1292         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1293         appear at the correct location.
1294
1295 2004-06-10  Jason Merrill  <jason@redhat.com>
1296
1297         PR c++/15875
1298         Revert:
1299         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1300         * init.c (build_offset_ref): Build SCOPE_REF with non-null
1301         TREE_TYPE for non-dependent names.
1302         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1303         unknown_type_node as its TREE_TYPE.
1304         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1305         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1306         (dump_expr) <SCOPE_REF case>: Likewise.
1307
1308 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
1309
1310         PR c++/15227
1311         * parser.c (cp_parser_direct_declarator): Robustify.
1312
1313         PR c++/15877
1314         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1315         constants in non-dependent contexts.
1316
1317         PR c++/14211
1318         PR c++/15076
1319         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1320         necessary.
1321
1322 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
1323
1324         PR c++/14791
1325         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1326         specially.
1327
1328 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
1329
1330         Revert:
1331         PR c++/15815
1332         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
1333         * lex.c (handle_pragma_interface): Deprecate.
1334         (handle_pragma_implementation): Likewise.
1335
1336 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
1337
1338         * g++spec.c (lang_specific_driver): Remove check for -lm
1339         and -lmath when check it see if it was the math library.
1340
1341 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1342
1343         PR c++/7841
1344         * parser.c (cp_parser_direct_declarator): Reject constructor named
1345         as qualified template-id.
1346
1347 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
1348
1349         PR c++/15815
1350         * lex.c (handle_pragma_interface): Deprecate.
1351         (handle_pragma_implementation): Likewise.
1352
1353 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
1354
1355         PR c++/15766
1356         * parser.c (cp_parser_iteration_statement): Fix typo in error
1357         message.
1358
1359         PR c++/14777
1360         * pt.c (tsubst_default_argument): Do not defer access checks
1361         while substituting into the default argument.
1362
1363         PR c++/15554
1364         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1365         constant in a non-dependent context.
1366
1367         PR c++/15057
1368         * except.c (build_throw): Ensure that temp_expr has been
1369         initialized.
1370
1371 2004-06-06  Roger Sayle  <roger@eyesopen.com>
1372
1373         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1374
1375 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1376
1377         PR c++/15503
1378         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1379         'typename', and accept 'template'.
1380
1381 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
1382             Jan Hubicka  <jh@suse.cz>
1383
1384         PR c++/14639
1385         * method.c (use_think): Do not mark thunk as referenced.
1386
1387 2004-06-03  Matt Austern  <austern@apple.com>
1388
1389         PR c++/15428
1390         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1391         is nonzero, and if we see a noninline definition of a key method,
1392         make the vtables nonweak.
1393
1394 2004-06-02  Matt Austern  <austern@apple.com>
1395
1396         * cp-tree.h (instantiate_decl): new boolean parameter,
1397         undefined_ok. Current behavior is equivalent to its being 0.
1398         * decl2.c (mark_used): Add new argument when calling instantiate_decl
1399         * pt.c (mark_decl_instantiated): Unconditionally make
1400         instantiations explicit unconditionally
1401         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1402         since mark_decl_instantiated now does it.
1403         (instantiate_class_member): New.  Instantiate a member of an
1404         explicitly instantiated class template.
1405         (do_type_instantiation): Explicitly instantiate members of an
1406         explicitly instantiated class template.
1407         (instantiate_decl): if undefined_ok is nonzero, and if we're
1408         trying to explicitly instantiated a template with no definition,
1409         change it to an implicit instantiation.
1410         (instantiate_pending_templates): Add new argument to instantiate_decl.
1411         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1412
1413 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
1414
1415         * cp-tree.h: Fix typo.
1416
1417         * cp-tree.h: Include cgraph.h
1418         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1419         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1420
1421 2004-06-01  Jason Merrill  <jason@redhat.com>
1422
1423         PR c++/15142
1424         * call.c (call_builtin_trap): Remove type parm.
1425         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1426         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1427
1428 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1429
1430         PR c++/13092
1431         * init.c (build_offset_ref): Build SCOPE_REF with non-null
1432         TREE_TYPE for non-dependent names.
1433         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1434         unknown_type_node as its TREE_TYPE.
1435         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1436         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1437         (dump_expr) <SCOPE_REF case>: Likewise.
1438
1439 2004-06-01  Richard Henderson  <rth@redhat.com>
1440             Andrew Pinski  <pinskia@physics.uc.edu>
1441
1442         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1443         * parser.c (struct cp_parser): Remove in_offsetof.
1444         (cp_parser_new): Don't set it.
1445         (cp_parser_unary_expression): Don't check it.
1446         (cp_parser_postfix_open_square_expression): Split out from ...
1447         (cp_parser_postfix_expression): ... here.
1448         (cp_parser_postfix_dot_deref_expression): Likewise.
1449         (cp_parser_builtin_offsetof): New.
1450         (cp_parser_primary_expression): Use it.
1451
1452 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1453
1454         PR c++/14932
1455         * parser.c (cp_parser_postfix_expression): Allow subscript
1456         operator in offsetof.
1457
1458 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
1459
1460         PR c++/15701
1461         * friend.c (add_friend): Do not try to perform access checks for
1462         functions from dependent classes.
1463
1464 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1465
1466         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1467         (pp_cxx_begin_template_argument_list): Turn into a function.
1468         (pp_cxx_end_template_argument_list): Likewise.
1469         (pp_cxx_separate_with): Define.
1470         (pp_cxx_unqualified_id): Tidy.
1471         (pp_cxx_primary_expression): Likewise.
1472         (pp_cxx_postfix_expression): Likewise.
1473         (pp_cxx_expression): Likewise.
1474         (pp_cxx_simple_type_specifier): Likewise.
1475         (pp_cxx_type_specifier_seq): Likewise.
1476         (pp_cxx_parameter_declaration_clause): Likewise.
1477         (pp_cxx_exception_specification): Likewise.
1478         (pp_cxx_direct_declarator): Likewise.
1479         (pp_cxx_type_id): Likewise.
1480         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1481         cxx-pretty-print.c.
1482         (pp_cxx_left_paren): Likewise.
1483         (pp_cxx_right_paren): Likewise.
1484         (pp_cxx_left_brace): Likewise.
1485         (pp_cxx_right_brace): Likewise.
1486         (pp_cxx_left_bracket): Likewise.
1487         (pp_cxx_right_bracket): Likewise.
1488         (pp_cxx_dot): Likewise.
1489         (pp_cxx_identifier): Likewise.
1490         (pp_cxx_tree_identifier): Likewise.
1491         (pp_cxx_ampersand): New macro.
1492         (pp_cxx_star): Likewise.
1493         (pp_cxx_arrow): Likewise.
1494         (pp_cxx_semicolon): Likewise.
1495         (pp_cxx_complement): Likewise.
1496         (pp_cxx_begin_template_argument_list): Declaree.
1497         (pp_cxx_end_template_argument_list): Likewise.
1498         (pp_cxx_colon_colon): likewise.
1499
1500 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
1501
1502         * parser.c (cp_parser_simple_type_specifier): Explicitly test
1503         against NULL_TREE.
1504
1505 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
1506
1507         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1508         typeck.c: Fix comment formatting.
1509
1510 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
1511
1512         * cp-lang.c (cp_expand_decl): Remove.
1513         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1514
1515 2004-05-30  Andreas Jaeger  <aj@suse.de>
1516
1517         * lang-specs.h: Add missing initializers for .ii.
1518
1519 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
1520
1521         * decl.c (cp_make_fname_decl): Free return value from
1522         fname_as_string.
1523
1524 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
1525
1526         PR c++/15083
1527         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1528         even in a templat.e
1529         * init.c (build_new): Likewise.
1530
1531         PR c++/15640
1532         * name-lookup.c (arg_assoc): Robustify.
1533
1534         PR c++/15471
1535         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1536         when determining the scope to use for a pointer to member.
1537         (lookup_anon_field): Give it external linkage.
1538         * cp-tree.h (lookup_anon_field): Declare it.
1539         * expr.c (cplus_expand_constant): Use it.
1540
1541 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
1542
1543         PR c++/14668
1544         * parser.c (cp_parser_simple_type_specifier): Call
1545         maybe_note_name_used_in_class.
1546
1547 2004-05-28  Tom Marshall  <tmarshall@real.com>
1548
1549         PR c++/15214
1550         * class.c (finish_struct_1): Warn only if the dtor is non-private or
1551         the class has friends.
1552
1553 2004-05-27  Adam Nemet  <anemet@lnxw.com>
1554
1555         PR c++/12883
1556         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1557         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1558
1559 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
1560
1561         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1562         if it might be needed.
1563         * pt.c (mark_decl_instantiated): Only call defer_fn if
1564         the function actually needs processing in finish_file.
1565         * decl2.c (finish_file): Add check that elements in
1566         deferred_fns_used are really needed there.  Remove unnecessary
1567         test of DECL_SAVED_TREE.
1568
1569 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
1570
1571         * Make-lang.in: No need to specify $(LIBCPP).
1572
1573 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
1574
1575         PR c++/15044
1576         * parser.c (cp_parser_class_head): Robustify.
1577
1578         PR c++/15317
1579         * parser.c (cp_parser_decl_specifier_seq): Correct error in
1580         comment.
1581         (cp_parser_constructor_declarator_p): Treat attributes
1582         as decl-specifiers.
1583
1584         PR c++/15329
1585         * typeck.c (build_unary_op): Do not attempt to resolve casts to
1586         base classes in templates.
1587
1588 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
1589
1590         PR c++/15165
1591         * pt.c (instantiate_template): Robustify.
1592
1593 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
1594
1595         PR c++/15025
1596         * decl.c (xref_tag): Issue errors about redeclaring template
1597         classes as non-template classes.
1598
1599 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
1600
1601         PR c++/14821
1602         * name-lookup.c (supplement_binding): Allow redefinitions of
1603         namespace aliases.
1604
1605         PR c++/14883
1606         * parser.c (cp_parser_template_argument): Robustify.
1607
1608 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1609
1610         * class.c (alter_access): Use %E format specifier to print an
1611         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
1612         (push_lang_context): Likewise.
1613         * decl.c (lookup_label): Likewise.
1614         (grokdeclarator): Likewise.
1615         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1616         * pt.c (do_type_instantiation): Likewise.
1617         * tree.c (handle_java_interface_attribute): Likewise.
1618         (handle_com_interface_attribute): Likewise.
1619         (handle_init_priority_attribute): Likewise.
1620
1621 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
1622
1623         PR c++/15285
1624         PR c++/15299
1625         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1626         recognized as overloaded functions.
1627
1628 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
1629
1630         PR c++/15507
1631         * class.c (layout_nonempty_base_or_field): Do not try to avoid
1632         layout conflicts for unions.
1633
1634         PR c++/15542
1635         * typeck.c (build_x_unary_op): Instantiate template class
1636         specializations before looking for "operator &".
1637
1638         PR c++/15427
1639         * typeck.c (complete_type): Layout non-dependent array types, even
1640         in templates.
1641
1642         PR c++/15287
1643         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1644         template.
1645
1646 2004-05-22  Roger Sayle  <roger@eyesopen.com>
1647
1648         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1649         returning when TREE_TYPE is error_mark_node.
1650         * typeck.c (require_complete_type): Return error_mark_node if
1651         value's type is an error_mark_node.
1652
1653 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
1654
1655         * optimize.c (calls_setjmp_r): Remove.
1656         (calls_setjmp_p): Remove.
1657         * cp-tree.c (calls_setjmp_p): Remove.
1658         * decl.c (finish_function): Do not call calls_setjmp_p.
1659
1660 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
1661
1662         * decl.c (cp_finish_decl): Use mark_decl_referenced.
1663         * decl2.c (maybe_make_one_only): Likewise.
1664         * method.c (use_thunk): Likewise.
1665
1666 2004-05-18  Jason Merrill  <jason@redhat.com>
1667
1668         * class.c (build_base_path): Tidy a bit.
1669
1670 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
1671
1672         * name-lookup.c (struct scope_binding): New.
1673         (EMPTY_SCOPE_BINDING): New.
1674         (lookup_using_namespace): Take a scope_binding instead of a
1675         cxx_binding.
1676         (qualified_lookup_using_namespace): Likewise.
1677         (cxx_binding_clear): Delete.
1678         (do_nonmember_using_decl): Use a scope_binding instead of a
1679         cxx_binding.
1680         (lookup_tag): Don't call select_decl.
1681         (ambiguous_decl): Don't return anything (and change callers to match).
1682         Take a scope_binding as the second parameter.
1683         (lookup_namespace_name): Use a scope_binding instead of a
1684         cxx_binding.
1685         (unqualified_namespace_lookup): Likewise.
1686         (lookup_qualified_name): Likewise.
1687         (select_decl): Take a scope_binding instead of a cxx_binding.
1688         Use macros rather than hand-coding tests for type-ness.
1689
1690 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1691
1692         * cp-gimplify.c: Rename from cp-simplify.c.
1693         * Make-lang.in, optimize.c: Update.
1694
1695 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1696
1697         Merge from tree-ssa-20020619-branch.  See
1698         ChangeLog.tree-ssa for details.
1699
1700         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1701         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1702         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1703         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1704         Merged.
1705         * cp-mudflap.c: New file.
1706         * cp-simplify.c:: New file.
1707
1708 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1709
1710         PR c++/14389
1711         * decl2.c (check_classfn): For member templates, compare also the
1712         template parameters to match the declaration.
1713         * cp-tree.h: Adjust declaration of check_classfn.
1714         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1715         * friend.c (do_friend): Likewise.
1716         * pt.c (tsubst_friend_function): Likewise.
1717
1718 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
1719
1720         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1721         Instead, dig into the representation type to find the array bound.
1722
1723 2004-04-30  Jason Merrill  <jason@redhat.com>
1724
1725         Refer to base members using COMPONENT_REFs where possible.
1726         * class.c (build_simple_base_path): New fn.
1727         (build_base_path): Use it for non-virtual base references.
1728         (layout_class_type): Change base fields to their real type
1729         after layout is done.
1730         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1731         * cp-lang.c (cxx_get_alias_set): Use it.
1732
1733 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
1734
1735         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1736         comment typos.
1737
1738 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1739
1740         PR c++/15064
1741         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1742         used in integral constant expressions.
1743
1744 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
1745
1746         * init.c (build_aggr_init): Fix accidental use of C99 construct in
1747         previous change.
1748
1749         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1750         braced initializer.
1751         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1752         * decl.c (reshape_init): Use it.
1753         * init.c (perform_member_init): Remove redundant condition.
1754         (build_aggr_init): Adjust to handle brace-enclosed initializers
1755         correctly.
1756         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1757
1758         * parser.c (cp_parser_initializer_clause): Do not set
1759         TREE_HAS_CONSTRUCTOR on the initializer.
1760         * rtti.c (tinfo_base_init): Likewise.
1761         (generic_initializer): Likewise.
1762         (ptr_initializer): Likewise.
1763         (ptm_initializer): Likewise.
1764         (class_initializer): Likewise.
1765         (get_pseudo_ti_init): Likewise.
1766         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1767
1768 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
1769
1770         * name-lookup.c (anonymous_namespace_name): Make static.
1771
1772 2004-04-19  Roger Sayle  <roger@eyesopen.com>
1773
1774         PR middle-end/14531
1775         * class.c (build_base_path): Call fold whilst building the NULL
1776         pointer check expression trees.
1777
1778 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
1779
1780         * init.c (build_new_1): Don't use type size argument for Java
1781         _Jv_AllocObject call.
1782
1783 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
1784
1785         * method.c (make_alias_for_thunk): Remove preprocessor guard on
1786         declaration and definition.
1787
1788 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
1789
1790         PR c++/14808
1791         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1792         than ASM_OUTPUT_DEF.
1793
1794 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
1795
1796         * decl2.c (mark_used): Don't segfault if cfun != NULL but
1797         current_function_decl == NULL.
1798
1799 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
1800
1801         PR c++/3518
1802         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1803         level.
1804
1805 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1806
1807         * init.c (decl_constant_value): Don't look at DECL_INITIAL
1808         of PARM_DECL.
1809         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1810         or TREE_SIDE_EFFECTS of a type.
1811
1812 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
1813
1814         PR c++/14007
1815         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1816         cv-qualifier unification.
1817         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1818
1819 2004-04-02  Jan Hubicka  <jh@suse.cz>
1820
1821         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1822         * cp-tree.h (cp_update_decl_after_saving): Declare.
1823         * tree.c (cp_update_decl_after_saving): Define.
1824
1825 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
1826
1827         PR c++/14803
1828         * typeck.c (get_delta_difference): Call fold before returning the
1829         value.
1830
1831 2004-04-01  Richard Henderson  <rth@redhat.com>
1832
1833         PR c++/14804
1834         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1835         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1836
1837 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
1838
1839         PR c++/14810
1840         * name-lookup.c (maybe_push_cleanup_level): Robustify.
1841
1842 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1843
1844         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1845
1846 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1847
1848         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1849         * class.c (check_bitfield_decl): Likewise.
1850         * cvt.c (type_promotes_to): Likewise.
1851         * decl.c (finish_enum): Likewise.
1852         * mangle.c (write_builtin_type): Likewise.
1853         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1854         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1855         (build_binary_op): Likewise.
1856
1857 2004-03-31  Jan Hubicka  <jh@suse.cz>
1858
1859         * tree.h (optimize_function): Kill prototype.
1860         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1861         * semantics.c (expand_body): Kill.
1862
1863 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
1864
1865         PR c++/14724
1866         * decl.c (start_decl_1): Do not decide whether or not to create a
1867         new cleanup level until after the type has been completed.
1868
1869         PR c++/14763
1870         * pt.c (tsubst_default_argument): Clear current_function_decl.
1871
1872 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
1873
1874         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1875
1876 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
1877
1878         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1879         is null, just print the literal name and return.
1880
1881 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
1882
1883         * cxx-pretty-print.c: Fix comment typos.
1884
1885 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
1886
1887         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1888         Update copyright.
1889
1890 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
1891
1892         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1893         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1894         target hook.
1895
1896 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
1897
1898         PR 12267, 12391, 12560, 13129, 14114, 14133
1899         * cp-lang.c (c_reset_state): Delete.
1900         (push_file_scope, pop_file_scope): New stubs.
1901         * parser.c (c_parse_file): Call sorry() here if called more than once.
1902
1903 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1904
1905         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1906         for INTEGER_CST.
1907
1908 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1909
1910         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1911
1912 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1913
1914         * error.c (enum pad): Remove.
1915         (dump_qualifiers): Likewise.
1916         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1917         (dump_aggr_type): Likewise.
1918         (dump_type_suffix): Likewise.
1919         (dump_simple_decl): Likewise.
1920         (dump_function_decl): Likewise.
1921         (cv_to_string): Likewise.
1922         (dump_type_prefix): Likewise.  Adjust return void.
1923         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1924         cxx_pretty_print.h.
1925         (pp_cxx_template_keyword_if_needed): Document.
1926         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
1927         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1928         MUST_NOT_THROW_EXPR.
1929
1930 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
1931
1932         PR c++/14616
1933         * decl.c (cp_finish_decl): Compute the size of arrays declared in
1934         templates, if their type is non-dependent.
1935
1936 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
1937
1938         * call.c (build_op_delete_call): Do not forget the placement
1939         arguments when iterating through mutiple delete operators.
1940
1941         * cp-tree.h (svaed_scope): Remove last_parms.
1942         (NEW_DELETE_OPNAME_P): New macro.
1943         (last_function_parms): Remove.
1944         (do_friend): Adjust prototype.
1945         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1946         using last_function_parms.
1947         (grokfndecl): Take the PARM_DECLs as an argument, rather than
1948         using last_function_parms.
1949         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
1950         for class-specific operator new and operator delete.
1951         (grok_op_properties): Do not look for allocation functions with
1952         METHOD_TYPEs.
1953         (start_function): Use DECL_ARGUMENTS instead of
1954         last_function_parms.
1955         * decl.h (last_function_parms): Do not declare.
1956         * decl2.c (grokclassfn): Do not use last_function_parms.
1957         * friend.c (do_friend): Remove parmdecls parameter.
1958         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1959         (pop_from_top_level): Do not restore it.
1960         * pt.c (check_explicit_specialization): Do not adjust
1961         last_function_parms.
1962
1963         * name-lookup.c (do_local_using_decl): Create a local binding for
1964         types brought in via using declarations.
1965
1966         * name-lookup.c (lookup_arg_dependent): Handle block-scope
1967         function declarations correctly.
1968
1969         * semantics.c (finish_id_expression): Correct handling of
1970         conversion operators to dependent types.
1971
1972         * typeck.c (lookup_destructor): Allow the use of destructors from
1973         base classes.
1974
1975 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1976
1977         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1978         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1979         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1980         the field is named TEMPLATE_TYPE_PARM_INDEX.
1981
1982 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1983
1984         PR c++/14545
1985         * parser.c (cp_parser_functional_cast): A cast to anything
1986         but integral or enumaration type is not an integral constant
1987         expression.
1988         * pt.c (value_dependent_expression_p): Handle cast expressions
1989         without operands (such as "int()").
1990
1991 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
1992
1993         * semantics.c (finish_pseudo_destructor_expr): Allow differing
1994         cv-qualification between the type named by the
1995         pseudo-destructor-name and the object-type.
1996
1997         * search.c (accessible_base_p): Handle non-proper bases.
1998
1999         * name-lookup.c (do_nonmember_using_decl): If a using declaration
2000         refers to a single overloaded function, set the type of the
2001         function.
2002         * tree.c (lvalue_type): Simplify.
2003         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2004         unknown type.
2005         (build_unary_op): Handle OVERLOADs with known types.
2006
2007         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2008         function templates.
2009
2010         * parser.c (cp_parser_postfix_expression): Handle the use of
2011         "typename" in non-dependent contexts.  Convert appropriately when
2012         when using a qualified name after "->" or ".".
2013
2014         * call.c (conditional_conversion): Honor the requirement that some
2015         conversions refer to the original object.
2016
2017 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
2018
2019         * call.c (build_conditional_expr): Do not call force_rvalue for
2020         operands of void_type when the conditional expression itself has
2021         void type.
2022         * name-lookup.c (pushdecl): Don't consider a declaration of a
2023         function named "main" to be an overload of a type named "main".
2024         * parser.c (cp_parser_template_name): Perform name lookup when the
2025         template name is proceeded by "template" if the qualifying scope
2026         is non-dependent.
2027         * typeck.c (composite_pointer_type_r): Correctly handle
2028         pointer-to-member types.
2029         (build_const_cast): Likewise.
2030
2031 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2032
2033         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2034         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2035         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2036         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2037         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2038         (TYPEOF_TYPE_EXPR): New macro.
2039         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2040         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2041         * pt.c (tsubst): Likewise.
2042         * semantics.c (finish_typeof): Likewise.
2043         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2044         and TEMPLATE_TYPE_PARM.
2045         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2046         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2047
2048 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
2049
2050         PR c++/14586
2051         * cp-tree.h (build_new_op): Change prototype.
2052         (build_x_binary_op): Likewise.
2053         * call.c (build_new_op): Add overloaded_p parameter.
2054         * decl2.c (grok_array_decl): Adjust call to build_new_op.
2055         * parser.c (cp_parser_binary_expression): Note that uses of
2056         overloaded operators prevents an expression from being considered
2057         an integral constant.
2058         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2059         build_x_binary_op.
2060         * semantics.c (finish_call_expr): Likewise.
2061         * typeck.c (rationalize_conditional_expr): Likewise.
2062         (build_x_indirect_ref): Likewise.
2063         (build_x_binary_op): Likewise.
2064         (build_x_unary_op): Likewise.
2065         (build_x_compound_expr): Likewise.
2066         (build_modify_expr): Likewise.
2067         * typeck2.c (build_x_arrow): Likewise.
2068
2069 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
2070
2071         * cp-lang.c, ptree.c: Update copyright.
2072
2073 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
2074
2075         PR c++/14550
2076         * parser.c (cp_parser_non_integral_constant_expression): Encode
2077         more of the idiom that surrounded calls to this function within
2078         the function itself
2079         (cp_parser_primary_expression): Adjust accordingly.
2080         (cp_parser_postfix_expression): Likewise.
2081         (cp_parser_unary_expression): Likewise.
2082         (cp_parser_cast_expression): Likewise.
2083         (cp_parser_assignment_expression): Likewise.
2084         (cp_parser_expression): Likewise.
2085         (cp_parser_new_expression): Note that new-expressions are not
2086         allowed in integral constant expressions.
2087         (cp_parser_delete_expression): Likewise.
2088
2089 2004-03-12  Matt Austern  <austern@apple.com>
2090
2091         * decl2.c (maybe_make_one_only): Look at
2092         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2093         to make an explicit instantiation weak.
2094         * method.c (use_thunk): Make sure we call comdat_linkage
2095         when appropriate.
2096         * pt.c (do_type_instantiation): On systems where weak symbols
2097         don't go in a static archive's TOC, explicit instantiation of a
2098         class must imply *explicit* instantiation of its memeber.
2099
2100 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
2101
2102         * call.c, cp-tree.h, pt.c: Fix comment typos.
2103
2104 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
2105
2106         PR c++/14510
2107         * decl.c (xref_tag): Disregard non-type declarations when
2108         looking up a tagged type.
2109
2110 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
2111
2112         PR c++/14397
2113         * call.c (convert_like_real): Build a const qualified temporary,
2114         when testing ctor access.
2115
2116 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
2117
2118         * call.c (initialize_reference): Fix typo.
2119
2120 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2121
2122         PR c++/14409
2123         * pt.c (determine_specialization): For member templates, match also
2124         constness.
2125
2126         PR c++/14448
2127         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2128         non-dependent.
2129         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2130
2131 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
2132
2133         PR c++/14230
2134         * call.c (initialize_reference): Handle initializers that are
2135         class-member access expressions applies to rvalues.
2136
2137 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
2138
2139         PR c++/14432
2140         * name-lookup.c (supplement_binding): Ignore functions that are
2141         marked DECL_ANTICIPATED.
2142
2143 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
2144
2145         PR c++/14401
2146         * class.c (check_field_decls): Complain about non-static data
2147         members of reference type in unions.  Propagate
2148         CLASSTYPE_REF_FIELDS_NEED_INIT and
2149         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2150         data members.
2151         * init.c (perform_member_init): Complain about mbmers with const
2152         type that are not explicitly initialized.
2153
2154 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
2155
2156         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2157         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2158         (lang_identifier): Remove implicit_decl and error_locus.
2159         (IDENTIFIER_IMPLICIT_DECL): Remove.
2160         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2161         (IDENTIFIER_ERROR_LOCUS): Likewise.
2162         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2163         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2164         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2165         (implicitly_declare): Remove.
2166         * decl.c (warn_extern_redeclared_static): Remove check of
2167         IDENTIFIER_IMPLICIT_DECL.
2168         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2169         (implicitly_declare): Remove.
2170         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2171         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2172         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2173         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2174         in the innermost scope, rather than at namespace scope.
2175         * name-lookup.c (push_local_binding): Give it external linkage.
2176         (pushdecl): Remove dead code.
2177         * name-lookup.h (push_local_binding): Declare it.
2178         * ptree.c (cxx_print_identifier): Don't print
2179         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2180         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2181         not IDENTIFIER_ERROR_LOCUS.
2182         * typeck.c (build_function_call): Remove dead code.
2183
2184 2004-03-08  Jason Merrill  <jason@redhat.com>
2185
2186         PR c++/13170
2187         * decl.c (xref_tag): Remove attribute handling.
2188         * cp-tree.h: Adjust prototype.
2189         * decl.c, parser.c, rtti.c: Adjust callers.
2190         * parser.c (cp_parser_class_head): Pass back attributes in the
2191         class head.
2192         (cp_parser_class_specifier): Adjust.
2193
2194 2004-03-08  Matt Austern  <austern@apple.com>
2195
2196         PR debug/14079
2197         * name-lookup.c (add_decl_to_level): Add extern variables, as well
2198         as static, to static_decls array.
2199
2200 2004-03-05  Jason Merrill  <jason@redhat.com>
2201
2202         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2203
2204 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
2205
2206         * decl.c (grokfndecl): Update old incorrect comment.
2207         (grokvardecl): Diagnose C++ variables of type with no linkage.
2208
2209 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
2210
2211         PR c++/14369
2212         * pt.c (build_non_dependent_expr): Do not create a
2213         NON_DEPENDENT_EXPR for a THROW_EXPR.
2214
2215 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2216
2217         PR c++/14369
2218         * error.c (dump_expr): Handle THROW_EXPR.
2219
2220 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
2221
2222         PR c++/14360
2223         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2224         lookup if ordinary name-lookup finds a non-function.
2225         * pt.c (tsubst_copy_and_build): Likewise.
2226
2227         PR c++/14361
2228         * parser.c (cp_parser_late_parsing_default_args): Check that there
2229         are no extra tokens after the end of the default-argument
2230         expression.
2231
2232 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
2233
2234         PR c++/14324
2235         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2236         having C++ linkage for name-mangling purposes.
2237
2238         PR c++/14260
2239         * parser.c (cp_parser_direct_declarator): Recognize constructor
2240         declarators that use a template-id to name the class being
2241         constructed.
2242
2243         PR c++/14337
2244         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2245         (tsubst_expr): Do not call tsubst_copy, even when
2246         processing_template_decl.
2247
2248 2004-03-01  Jeff Law  <law@redhat.com>
2249
2250         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2251         the proper type.
2252
2253 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
2254
2255         PR c++/14138
2256         * name-lookup.h (push_scope): Change prototype.
2257         * name-lookup.c (push_scope): Do not reenter the current class
2258         scope.
2259         * decl.c (grokfndecl): Check return code from push_scope before
2260         calling pop_scope.
2261         * decl2.c (check_classfn): Likewise.
2262         * parser.c (cp_parser_conversion_function_id): Likewise.
2263         (cp_parser_init_declarator): Likewise.
2264         (cp_parser_direct_declarator): Likewise.
2265         (cp_parser_class_specifier): Likewise.
2266         (cp_parser_class_head): Likewise.
2267         (cp_parser_lookup_name): Likewise.
2268         (cp_parser_constructor_declarator_p): Likewise.
2269         * pt.c (instantiate_class_template): Likewise.
2270         (resolve_typename_type): Likewise.
2271
2272 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
2273
2274         PR c++/14267
2275         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2276         extension.
2277
2278         PR debug/12103
2279         * class.c (update_vtable_entry_for_fn): Do not go through
2280         covariance machinery if the type returned by an overrider is the
2281         same as the original.
2282
2283 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
2284
2285         * call.c: Fix a comment typo.
2286
2287 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
2288
2289         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2290
2291 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
2292
2293         PR c++/14278
2294         * parser.c (cp_parser_parameter_declaration_list): Commit
2295         to fewer tentative parses.
2296
2297 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2298
2299         PR c++/14284
2300         * pt.c (dependent_type_p_r): A template template parameter is a
2301         dependent type.
2302
2303 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2304
2305         PR c++/14246
2306         * mangle.c (write_template_arg_literal): Don't rely on identity for
2307         boolean constants.
2308
2309 2004-02-24  Jason Merrill  <jason@redhat.com>
2310
2311         * tree.c (build_exception_variant): Use check_qualified_type.
2312
2313 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
2314             Kazu Hirata  <kazu@cs.umass.edu>
2315
2316         * decl.c (cxx_init_decl_processing): Don't check
2317         flag_writable_strings.
2318
2319 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
2320
2321         PR c++/14156
2322         * typeck.c (maybe_warn_about_returning_address_of_location):
2323         Change check for VAR_DECL to use DECL_P instead.
2324
2325 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2326
2327         PR c++/14250
2328         * cvt.c (build_expr_type_conversion): Type must be complete before
2329         looking up for conversions.
2330
2331 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2332
2333         PR c++/14143
2334         * name-lookup.c (arg_assoc_class): Don't look into template
2335         arguments if it is not a primary template.
2336
2337 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2338
2339         PR c++/12007
2340         * method.c (use_thunk): Always clone function argument tree.
2341
2342 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
2343
2344         PR c++/14199
2345         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2346
2347         PR c++/14173
2348         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2349         for all type variants.
2350
2351 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
2352
2353         PR c++/13927
2354         * decl.c (duplicate_decls): Return error_mark_node for invalid
2355         redeclarations.
2356         * name-lookup.c (push_namespace): Ignore the return value from
2357         pushdecl.
2358         * pt.c (push_template_decl_real): Robustify.
2359
2360         PR c++/14186
2361         * name-lookup.c (push_class_level_binding): Do not complain about
2362         adding a binding for a member whose name is the same as the
2363         enclosing class if the member is located in a base class of the
2364         current class.
2365
2366 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2367
2368         PR c++/14181
2369         * parser.c (cp_parser_new_expression): Parse an ill-formed
2370         direct-new-declarator after a parenthesized type-id to emit good
2371         diagnostic.
2372
2373 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
2374
2375         * cp-tree.def, cvt.c: Update copyright.
2376
2377 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
2378
2379         PR c++/11326
2380         * cp-tree.h (abi_version_at_least): Remove.
2381         * mangle.c: Include flags.h.
2382
2383 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
2384
2385         PR c++/13971
2386         * call.c (build_conditional_expr): Handle conversions between
2387         class types which result in differently cv-qualified type
2388         variants.
2389
2390         PR c++/14086
2391         * class.c (delete_duplicate_fields_1): Remove.
2392         (delete_duplicate_fields): Likewise.
2393         (finish_struct_anon): Remove check for members with the same name
2394         as their enclosing class.
2395         (check_field_decls): Do not call duplicate_fields.
2396         * decl.c (grokdeclarator): Remove check for static data members
2397         with the same name as their enclosing class.
2398         * name-lookup.c (push_class_level_binding): Check for members with
2399         the same name as their enclosing class.
2400
2401 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2402
2403         PR c++/14085
2404         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2405
2406 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2407
2408         PR c++/13635
2409         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2410         has full set of arguments.
2411
2412 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2413
2414         PR c++/13927
2415         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2416
2417 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
2418
2419         PR c++/14122
2420         * cp-tree.h (delete_sanity): Change prototype.
2421         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2422         Remove dead code.  Adjust code to warn about deleting an array.
2423         * typekc.c (decay_conversion): Use build_address and build_nop.
2424
2425         PR c++/14108
2426         * search.c (accessible_p): Do not check access in thunks.
2427
2428         PR c++/14083
2429         * call.c (build_conditional_expr): Call force_rvalue on the
2430         non-void operand in the case that one result is a throw-expression
2431         and the other is not.
2432
2433 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
2434
2435         PR c++/9851
2436         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2437         the type name and look ahead for ::~, and bail out early with a
2438         better error message if the parse is going to fail.
2439
2440 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
2441
2442         * call.c (conversion_kind): New type.
2443         (conversion_rank): Likewise.
2444         (conversion): Likewise.
2445         (CONVERSION_RANK): New macro.
2446         (conversion_obstack): New variable.
2447         (obstack_initialized): Likewise.
2448         (z_candidate): Change type of convs and second_conv.
2449         (candidate_warning): New type.
2450         (IDENTITY_RANK): Remove.
2451         (EXACT_RANK): Likewise.
2452         (PROMO_RANK): Likewise.
2453         (STD_RANK): Likewise.
2454         (PBOOL_RANK): Likewise.
2455         (USER_RANK): Likewise.
2456         (ELLIPSIS_RANK): Likewise.
2457         (BAD_RANK): Likewise.
2458         (ICS_RANK): Likewise.
2459         (ICS_STD_RANK): Likewise.
2460         (ICS_USER_FLAG): Likewise.
2461         (ICS_ELLIPSIS_FLAG): Likewise.
2462         (ICS_THIS_FLAG): Likewise.
2463         (ICS_BAD_FLAG): Likewise.
2464         (NEED_TEMPORARY_P): Likewise.
2465         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2466         (USER_CONV_CAND): Likewise.
2467         (USER_CONV_FN): Likewise.
2468         (conversion_obstack_alloc): New function.
2469         (alloc_conversion): Likewise.
2470         (validate_conversion_obstack): Likewise.
2471         (alloc_conversions): Likewise.
2472         (build_conv): Adjust to deal with new conversion data structures.
2473         (build_identity_conv): New function.
2474         (build_ambiguous_conv): Likewise.
2475         (standard_conversion): Adjust to deal with new conversion data
2476         structures.
2477         (convert_class_to_reference): Likewise.
2478         (direct_reference_binding): Likewise.
2479         (reference_binding): Likewise.
2480         (implicit_conversion): Likewise.
2481         (add_candidate): Likewise.
2482         (add_function_candidate): Likewise.
2483         (add_conv_candidate): Likewise.
2484         (build_builtin_candidate): Likewise.
2485         (print_z_candidate): Likewise.
2486         (merge_conversion_sequences): Likewise.
2487         (build_user_type_conversion_1): Likewise.
2488         (build_user_type_conversion): Likewise.
2489         (build_new_function_call): Likewise.
2490         (build_object_call): Likewise.
2491         (conditional_conversion): Likewise.
2492         (build_conditional_expr): Likewise.
2493         (build_new_op): Likewise.
2494         (build_op_delete_call): Likewise.
2495         (convert_like_real): Likewise.
2496         (build_over_call): Likewise.
2497         (build_new_method_call): Likewise.
2498         (is_subseq): Likewise.
2499         (maybe_handle_implicit_object): Likewise.
2500         (maybe_handle_ref_bind): Likewise.
2501         (compare_ics): Likewise.
2502         (source_type): Likewise.
2503         (add_warning): Likewise.
2504         (joust): Likewise.
2505         (can_convert_arg): Likewise.
2506         (can_convert_arg_bad): Likewise.
2507         (perform_implicit_conversion): Likewise.
2508         (perform_direct_initialization_if_possible): Likewise.
2509         (initialize_reference): Likewise.
2510         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2511         * cp-tree.def (WRAPPER): Likewise.
2512         (IDENTITY_CONV): Remove.
2513         (LVALUE_CONV): Likewise.
2514         (QUAL_CONV): Likewise.
2515         (STD_CONV): Likewise.
2516         (PTR_CONV): Likewise.
2517         (PMEM_CONV): Likewise.
2518         (BASE_CONV): Likewise.
2519         (REF_BIND): Likewise.
2520         (USER_CONV): Likewise.
2521         (AMBIG_CONV): Likewise.
2522         (RVALUE_CONV): Likewise.
2523         * cp-tree.h (tree_wrapper): Remove.
2524         (WRAPPER_ZC): Remove.
2525         (lang_tree_node): Remove wrapper.
2526         (LOOKUP_SPECULATIVELY): Remove.
2527         (build_op_delete_call): Adjust prototype.
2528         (validate_conversion_obstack): Declare.
2529         (build_zc_wrapper): Remove.
2530         * cvt.c (convert_to_reference): Remove dead code.
2531         (ocp_convert): Likewise.
2532         * decl.c (redeclaration_error_message): Correct handling of
2533         templates.
2534         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2535         (cp_tree_node_structure): Remove WRAPPER case.
2536         * decl2.c (finish_file): Call validate_conversion_obstack.
2537         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2538         (build_op_delete_call): Likewise.
2539         (build_x_delete): Likewise.
2540         (build_delete): Adjust call to build_op_delete_call.
2541         * pt.c (tsubst_friend_declaration): Adjust code to determine
2542         whether or not a friend template is a definition.
2543         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2544         * tree.c (build_zc_wrapper): Remove.
2545
2546 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
2547
2548         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2549         * cp-tree.h: Don't declare cxx_builtin_type_decls.
2550         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2551         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2552
2553 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
2554
2555         * typeck.c (lookup_destructor): Fix typo in error message.
2556
2557 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
2558
2559         * call.c, parser.c, tree.c: Fix comment typos.
2560
2561 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
2562
2563         Bug 13856
2564         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2565         * decl.c (duplicate_decls, start_function): Likewise.
2566
2567 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
2568
2569         * name-lookup.c (pushdecl): Issue shadow warnings directly.
2570         * parser.c (free_parser_stacks): Delete.
2571
2572 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
2573
2574         * rtti.c: Update copyright.
2575
2576 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2577
2578         PR c++/14033
2579         * decl.c (require_complete_types_for_parms): Do not insert
2580         error_mark_node in the parameter list.
2581
2582 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2583
2584         PR c++/14028
2585         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2586         error when terminator can not be found.
2587
2588 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
2589
2590         Make-lang.in (po-generated):  Delete.
2591
2592 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
2593
2594         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2595         targetm.calls.promote_prototypes.
2596
2597 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2598
2599         PR middle-end/13750
2600         Revert:
2601         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
2602         PR pch/13361
2603         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2604         (handle_pragma_implementation): Likewise.
2605
2606 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
2607
2608         PR c++/13714
2609         * typeck.c (lookup_destructor): Tweak error message.
2610
2611 2004-02-05  Jan Hubicka  <jh@suse.cz>
2612
2613         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
2614         functions.
2615
2616 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2617
2618         PR c++/14008
2619         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2620         code, only emits the diagnostic now. Added lookup of the identifier
2621         and support for qualified ids.
2622         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2623         Parse an (invalid) type name as id-expression within a declarator.
2624         (cp_parser_simple_declaration): Use it.
2625         (cp_parser_member_declaration): Likewise.
2626         (cp_parser_make_typename_type): New function. Handle errors through
2627         cp_parser_diagnose_invalid_typename.
2628         (cp_parser_elaborated_type_specifier): Use it.
2629
2630 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
2631
2632         PR c++/13932
2633         * call.c (convert_like_real): Use "converting" rather than
2634         "argument" as the descriptive keyword to
2635         dubious_conversion_warnings.
2636         * typeck.c (convert_for_assignment): Do not call
2637         dubious_conversion_warnings.
2638
2639 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2640
2641         PR c++/13086
2642         * init.c (build_delete): Emit a more informative error message in
2643         case of an incomplete type, and on the correct source line.
2644
2645 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
2646
2647         * error.c, search.c: Update copyright.
2648
2649 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
2650
2651         PR c++/9941
2652         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2653         linkage for the typeinfo name string.
2654
2655 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
2656
2657         PR c++/13969
2658         * cp-tree.h (fold_non_dependent_expr): New function.
2659         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2660         (cp_parser_template_argument): Use fold_non_dependent_expr.
2661         (cp_parser_direct_declarator): Likewise.
2662         * pt.c (fold_non_dependent_expr): New function.
2663         (convert_nontype_argument): Use it.
2664         (tsubst_qualified_id): Simplify.
2665         (tsubst_copy_and_build): Likewise.
2666
2667 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
2668
2669         * decl.c (cxx_push_function_context): Do not set
2670         current_function_is_thunk.
2671         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2672         actual function.
2673
2674 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2675
2676         PR c++/13997
2677         * pt.c (more_specialized_class): Increase processing_template_decl
2678         while partial ordering.
2679
2680 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
2681
2682         PR c++/13925
2683         * decl.c (start_function): Do not call pushdecl for any
2684         instantiation or specialization of a primary template.
2685
2686 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
2687
2688         PR c++/13950
2689         * parser.c (cp_parser_class_name): Robustify.
2690
2691         PR c++/13970
2692         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2693
2694         PR c++/14002
2695         * semantics.c (finish_id_expression): Do not return an
2696         IDENTIFIER_NODE when lookup finds a PARM_DECL.
2697
2698 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
2699
2700         PR c++/13978
2701         * pt.c (build_non_dependent_expr): Do not build
2702         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2703
2704         PR c++/13968
2705         * semantics.c (finish_id_expression): Do not return an
2706         IDENTIFIER_NODE when lookup finds a VAR_DECL.
2707
2708         PR c++/13975
2709         * parser.c (cp_parser_simple_declaration): When skipping to the
2710         end of the statement swallow the terminating semicolon.
2711
2712 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
2713
2714         PR c++/13113
2715         * init.c (build_offset_ref): Improve error recovery for invalid
2716         uses of non-static member functions.
2717
2718         PR c++/13854
2719         * cp-tree.h (cp_build_type_attribute_variant): New function.
2720         * class.c (build_clone): Use cp_build_type_attribute_variant.
2721         * decl.c (duplicate_decls): Likewise.
2722         * pt.c (copy_default_args_to_explicit_spec): Likewise.
2723         (tsubst_function_type): Likewise.
2724         * tree.c (build_exception_variant): Check attributes before
2725         concluding that two types are the same.
2726         (cp_build_type-attribute_variant): New method.
2727         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2728
2729         PR c++/13907
2730         * call.c (convert_class_to_reference): Keep better track of
2731         pedantically invalid user-defined conversions.
2732
2733 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2734
2735         PR c++/13957
2736         * pt.c (tsubst_qualified_id): Improved error message when a type
2737         is expected but not found.
2738
2739 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
2740
2741         * class.c: Fix comment typos.
2742         * decl.c: Likewise.
2743         * error.c: Likewise.
2744         * parser.c: Likewise.
2745         * pt.c: Likewise.
2746         * search.c: Likewise.
2747         * typeck.c: Likewise.
2748
2749 2004-01-30  Richard Henderson  <rth@redhat.com>
2750
2751         PR c++/13693
2752         * method.c (use_thunk): Don't force_target_expr for void thunks.
2753         * tree.c (build_target_expr_with_type): Assert non-void type.
2754         (force_target_expr): Likewise.
2755
2756 2004-01-30  Michael Matz  <matz@suse.de>
2757
2758         * parser.c (cp_parser_labeled_statement): Accept case ranges.
2759
2760 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2761
2762         DR206
2763         PR c++/13813
2764         * decl.c (grokdeclarator): Check immediatly type completeness for
2765         non-dependent types.
2766
2767 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2768
2769         PR c++/13683
2770         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2771         a sizeof expression.block
2772
2773 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
2774
2775         PR c++/13883
2776         * mangle.c (write_encoding): Correct encoding of member template
2777         constructors.
2778
2779 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2780
2781         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2782         template name as it was `<::' (digraph typo).
2783         (cp_parser_nth_token_starts_template_argument_list_p): New function.
2784         (cp_parser_id_expression): Use it.
2785         (cp_parser_nested_name_specifier_opt): Likewise.
2786         (cp_parser_template_name): Likewise.
2787         (cp_parser_class_name): Likewise.
2788         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2789
2790 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
2791
2792         PR c++/13791
2793         * typeck.c (merge_types): Do not merge attributes into
2794         TYPENAME_TYPEs.
2795
2796         PR c++/13736
2797         * parser.c (cp_parser_direct_declarator): Do not prevent
2798         backtracking inside a parenthesized declarator.
2799         (cp_parser_parameter_declaration): Fix typo in comment.
2800
2801 2004-01-28  Jan Hubicka  <jh@suse.cz>
2802
2803         * semantics.c (expand_body)  Do emit_associated_thunks before
2804         expansion.
2805
2806 2004-01-27  Devang Patel  <dpatel@apple.com>
2807
2808         * name-lookup.c: Include "debug.h"
2809         (do_namespace_alias): Invoke debug_hooks to emit debug info
2810         for namespace alias.
2811         (do_local_using_decl): Invoke debug_hooks to emit debug info
2812         for using decl.
2813         (do_class_using_decl): Same.
2814         (do_toplevel_using_decl): Same.
2815         (do_using_directive): Same.
2816         (cp_emit_debug_info_for_using): New function.
2817         * Make-lang.in (cp/parser.o): Depend on debug.h
2818         (cp/name-lookup.o): Same.
2819
2820 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2821
2822         * cp-tree.h (language_function, lang_type_header): Use
2823         BOOL_BITFIELD.
2824         * name-lookup.h (cp_binding_level): Likewise.
2825
2826 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
2827
2828         PR c++/13663
2829         * semantics.c (finish_for_expr): Check for unresolved overloaded
2830         functions.
2831
2832         * class.c (add_method): Just check processing_template_decl to
2833         determine whether or not we are within a template.
2834         * decl2.c (maybe_retrofit_in_chrg): Likewise.
2835         * init.c (decl_constant_value): Check the type of the declaration,
2836         not TREE_READONLY.
2837         * name-lookup.c (maybe_push_to_top_level): Rename to ...
2838         (push_to_top_level): ... this.
2839         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2840         * pt.c (push_template_decl_real): Reorder condition for speed.
2841         (convert_template_argument): Use dependency-checking functions in
2842         place of uses_template_parms.
2843         (lookup_template_class): Avoid calling uses_template_parms more
2844         than once.
2845         (uses_template_parms): Reimplement, using dependency-checking
2846         functions.
2847         (instantiate_class_template): Use push_to_top_level, not
2848         maybe_push_to_top_level.
2849         (type_unification_real): Simplify.
2850         (type_dependent_expression_p): Handle OFFSET_REFs and
2851         TEMPLATE_DECLs.
2852         (any_dependent_template_arguments_p): Handle multiple levels of
2853         template argument.
2854         * semantics.c (expand_or_defer_fn): Do not check
2855         uses_template_parms for template instantiations.
2856         * typeck.c (comptypes): Avoid calling cp_type_quals.
2857
2858 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
2859
2860         PR c++/13833
2861         * call.c (build_over_call): Do not convert arguments when
2862         processing a template.
2863         * pt.c (build_non_dependent_expr): Do not build a
2864         NON_DEPENDENT_EXPR for arithmetic constants.
2865
2866 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2867
2868         PR c++/13810
2869         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2870         returns a TYPE_DECL. no further lookup is required.
2871         * semantics.c (check_template_template_default_arg): A TYPE_DECL
2872         is invalid. Rework to give better diagnostics.
2873
2874 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2875
2876         PR c++/13797
2877         * pt.c (instantiate_class_template): Add an error_mark_node
2878         check.
2879         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2880
2881 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
2882
2883         PR c++/13701
2884         * decl.c (finish_function): Move the call to
2885         finish_fname_decls below the call to
2886         finish_eh_spec_block.
2887
2888 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
2889
2890         * optimize.c, typeck2.c: Update copyright.
2891
2892 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
2893
2894         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2895         init.c, mangle.c, typeck.c: Update copyright.
2896
2897 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2898
2899         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2900
2901 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2902
2903         * Make-lang.in: Replace $(docdir) with doc.
2904         (c++.info, c++.srcinfo): Dummy entry.
2905         (c++.man, c++.srcman): New rules.
2906         (c++.install-man): Revamp rule.
2907
2908 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2909
2910         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2911         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2912         immediate $(shell) instead of deferred backquote.
2913
2914 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
2915
2916         PR c++/13651
2917         * parser.c (cp_parser_postfix_expression): When encountering
2918         incomplete type on left-hand side of "->" or ".", treat the entire
2919         expression as erroneous.
2920
2921         PR c++/13592
2922         * call.c (build_field_call): Remove.
2923         (n_build_method_call): Likewise.
2924         (build_method_call): Likewise.
2925         (build_new_method_call): Do not call build_field_call.
2926         * class.c (n_build_method_call): Remove.
2927         (print_class_statistics): Do not print it.
2928         * cp-tree.h (build_method_call): Remove declaration.
2929         (finish_object_call_expr): Likewise.
2930         (build_new_1): Do not use build_method_call.
2931         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2932         when the function appearing on the right-hand-side of "." or "->"
2933         is not actually a function.
2934         * pt.c (tsubst_copy_and_build): Likewise.
2935         * semantics.c (finish_object_call_expr): Remove.
2936
2937 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
2938
2939         PR c++/13710
2940         * pt.c (tsubst): Use finish_typeof.
2941
2942 2004-01-18  Jason Merrill  <jason@redhat.com>
2943
2944         PR c++/11725
2945         * except.c (build_throw): In a template, set
2946         current_function_returns_abnormally.
2947
2948 2004-01-17  Fred Fish  <fnf@intrinsity.com>
2949
2950         PR c++/11895
2951         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2952         except don't call array_type_nelts() with a VECTOR_TYPE.
2953
2954 2004-01-16  Jan Hubicka  <jh@suse.cz>
2955
2956         * mangle.c (write_mangled_name): Remove inline modifier.
2957
2958 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
2959
2960         PR c++/13574
2961         * decl.c (compute_array_index_type): Fix grammar in comment.
2962         * init.c (build_zero_init): Handle zero-sized arrays correctly.
2963
2964         PR c++/13178
2965         * call.c (name_as_c_string): Print conversion operator names
2966         correctly.
2967
2968         PR c++/13478
2969         * call.c (initialize_reference): Pass -1 for inner parameter to
2970         convert_like_real.
2971
2972 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2973
2974         PR c++/13407
2975         * parser.c (cp_parser_base_specifier): Check for an invalid
2976         keyword `typename' and emit an user-friendly error message.
2977
2978 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
2979
2980         PR pch/13361
2981         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2982         (handle_pragma_implementation): Likewise.
2983
2984 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2985
2986         PR c++/9259
2987         * typeck.c (build_class_member_access_expr): Allow to access members
2988         of the currently open class.
2989         (finish_class_member_access_expr): Likewise.
2990
2991 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
2992
2993         PR c++/13659
2994         * name-lookup.c (validate_nonmember_using_decl): Take scope and
2995         name by value, instead of computing them.
2996         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2997         arguments.  Pass them to validate_nonmember_using_decl.
2998         * name-lookup.h (do_local_using_decl): Adjust.
2999         (do_toplevel_using_decl): Likewise.
3000         * parser.c (cp_parser_using_declaration): Likewise.
3001         * pt.c (tsubst_expr): Likewise.
3002
3003 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
3004
3005         PR c++/13594
3006         PR c++/13658
3007         * name-lookup.c (qualified_lookup_using_namespace): Search
3008         strongly-associated namespaces first, and only then try other
3009         namespaces.
3010
3011 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
3012
3013         * Make-lang.in (c++.srcextra): Dummy entry.
3014
3015 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3016
3017         PR c++/8856
3018         * parser.c (cp_parser_template_name): Don't try to parse a
3019         conversion-function-id, as it cannot be a template-name.
3020         (cp_parser_simple_type_specifier): Check for invalid template-ids
3021         even after a built-in type.
3022
3023 2004-01-14  Jan Hubicka  <jh@suse.cz>
3024
3025         PR c++/12850
3026         * pt.c (instantiate_decl):  Do not increase function_depth.
3027
3028 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
3029
3030         PR c++/9021
3031         PR c++/11005
3032         * parser.c (cp_parser_elaborated_type_specifier): Warn about
3033         attributes and discard.
3034         * decl.c (xref_tag): Don't overwite existing attributes with
3035         NULL_TREE.
3036
3037 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3038
3039         PR c++/12335
3040         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3041         is no destructor while looking up a BIT_NOT_EXPR.
3042
3043 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
3044
3045         * cxxfilt.c: Remove unused file.
3046
3047 2004-01-14  Jan Hubicka  <jh@suse.cz>
3048
3049         Partial fix to PR c++/12850
3050         * decl2.c (mark_used): Do not proactively instantiate templates
3051         when compiling in unit-at-a-time or not optimizing.
3052         * optimize.c (maybe_clone_body): Do not increase function depth.
3053
3054 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3055
3056         PR c++/13474
3057         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3058
3059 2004-01-12  Steven Bosscher  <stevenb@suse.de>
3060
3061         PR c++/13558
3062         * parser.c (cp_parser_member_declaration): Any non-type is also
3063         not a class or a function.
3064
3065 2004-01-12  Jason Merrill  <jason@redhat.com>
3066
3067         PR c++/12815
3068         * class.c (build_base_path): Do not mark vtable references as
3069         TREE_CONSTANT.
3070         (build_vtbl_ref_1): Likewise.
3071
3072 2004-01-12  Richard Henderson  <rth@redhat.com>
3073
3074         PR opt/10776
3075         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3076         (store_init_value): Use it.
3077         * decl.c (check_initializer): Expect full initialization code
3078         from store_init_value.
3079         * init.c (expand_aggr_init_1): Likewise.
3080         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3081
3082 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
3083
3084         * class.c (layout_class_type): For non-POD class types, also copy
3085         the DECL_SIZE and DECL_MODE of fields to the base class type.
3086
3087 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3088
3089         PR c++/13289
3090         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3091         calling regenerate_decl_from_template.
3092
3093 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
3094
3095         PR c++/4100
3096         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3097         decl-specifier occurring along with a class definition.
3098
3099 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
3100
3101         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3102         clauses to comments describing declares_class_or_enum.
3103         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3104         false.
3105
3106 2004-01-12  Jan Hubicka  <jh@suse.cz>
3107
3108         * pt.c (for_each_template_parm): Do not check for duplicates.
3109         (for_each_template_parm): Use walk_tree duplicate checking code.
3110
3111 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
3112
3113         PR c++/3478
3114         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3115         is error_mark_node, don't add any more decl_specs.
3116         (cp_parser_init_declarator): After committing to a declaration, if
3117         the decl_specifiers start with error_mark_node, issue an error and
3118         change the type to "int".
3119
3120 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
3121
3122         PR bootstrap/7817
3123         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3124
3125 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3126
3127         DR 337
3128         PR c++/9256
3129         * pt.c (tsubst): Substitution must fail if we are attempting to
3130         create an array with element type that is an abstract class type.
3131         * decl.c (cp_finish_decl): Strip pointers and array types recursively
3132         before calling abstract_virtuals_error.
3133
3134 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
3135
3136         * name-lookup.c (qualified_lookup_using_namespace): Consider
3137         strong using directives even if we've already found a binding.
3138
3139 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
3140
3141         * cp-tree.h (cxx_expand_expr): Change prototype.
3142         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3143
3144 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3145
3146         PR c++/12573
3147         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3148         looking into them recursively. They can be there because of the
3149         new __offsetof__ extension.
3150
3151 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
3152
3153         * parser.c (cp_parser_save_member_function_body): Mark the
3154         definition static.
3155
3156 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
3157
3158         PR c++/13057
3159         * class.c (build_clone): Copy type attributes from the original
3160         function to the clone.
3161
3162         PR c++/12815
3163         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3164         references as constant.
3165
3166         PR c++/12132
3167         * parser.c (cp_parser_explicit_instantiation): Improve error
3168         recovery.
3169         (cp_parser_require): Improve indication of the error location.
3170
3171         PR c++/13451
3172         * parser.c (cp_parser_class_head): Reorder logic to check for
3173         invalid qualification.
3174
3175 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
3176
3177         PR c++/13157
3178         * name-lookup.c (lookup_using_namespace): Remove spacesp
3179         parameter.
3180         (unqualified_namespace_lookup): Likewise.
3181         (lookup_qualified_name): Adjust accordingly.
3182         (lookup_name_real): Likewise.
3183         (lookup_arg_dependent): Do not eliminate the namespace of the
3184         functions found by unqualified name lookup unless that is the
3185         current namespace.
3186
3187 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
3188
3189         * semantics.c (push_deferring_access_checks): Fix format.
3190         (resume_deferring_access_checks): Likewise.
3191         (stop_deferring_access_checks): Likewise.
3192         (pop_deferring_access_checks): Likewise.
3193         (get_deferred_access_checks): Likewise.
3194         (pop_to_parent_deferring_access_checks): Likewise.
3195         (perform_deferred_access_checks): Likewise.
3196         (perform_or_defer_access_check): Likewise.
3197
3198 2004-01-04  Richard Henderson  <rth@redhat.com>
3199
3200         * call.c (build_over_call): Don't create a save_expr of an
3201         aggregate, but rather its address.
3202
3203 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
3204
3205         PR c++/13529
3206         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3207         an offsetof expression.
3208
3209         * parser.c (cp_parser_parameter_declaration): Fix comment.
3210
3211         PR c++/12226
3212         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3213         (reference_binding): Set it when appropriate.
3214         (build_temp): New function, split out from ...
3215         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
3216         (initialize_reference): Likewise.
3217
3218         PR c++/13536
3219         * parser.c (cp_parser): Add in_type_id_in_expr_p.
3220         (cp_parser_new): Initialize it.
3221         (cp_parser_postfix_expression): Set it.
3222         (cp_parser_sizeof_operand): Likewise.
3223         (cp_parser_parameteR_declaration): Do not commit early to tenative
3224         parsers when in_type_id_in_expr_p is set.
3225
3226 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3227
3228         PR c++/13094
3229         * parser.c (cp_parser_template_argument): Don't call
3230         make_unbound_class_template directly.
3231         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3232         UNBOUND_CLASS_TEMPLATE tree node.
3233
3234 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
3235
3236         PR target/12729
3237         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3238
3239 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3240
3241         PR c++/13520
3242         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3243         (DECL_FUNCTION_TEMPLATE_P): Use it.
3244         (DECL_CLASS_TEMPLATE_P): Likewise.
3245         * parser.c (cp_parser_lookup_name): Add is_template parameter.
3246         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3247         (cp_parser_template_name): Likewise.
3248         (cp_parser_elaborated_type_specifier): Likewise.
3249         (cp_parser_namespace_name): Likewise.
3250         (cp_parser_class_name): Likewise.
3251         (cp_parser_lookup_name_simple): Likewise.
3252
3253 See ChangeLog.3 for earlier changes.