OSDN Git Service

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