OSDN Git Service

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