OSDN Git Service

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