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