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