OSDN Git Service

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