OSDN Git Service

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