OSDN Git Service

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