OSDN Git Service

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