OSDN Git Service

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