OSDN Git Service

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