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