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