OSDN Git Service

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