OSDN Git Service

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