OSDN Git Service

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