OSDN Git Service

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