OSDN Git Service

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