OSDN Git Service

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