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