OSDN Git Service

2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2005-05-24  Andrew Pinski  <pinskia@physics.uc.edu>
2
3         PR C++/21645
4         * optimize.c (update_cloned_parm): Copy the TYPE also from the
5         original one.
6
7 2005-05-19  Jakub Jelinek  <jakub@redhat.com>
8
9         PR c++/21495
10         * decl.c (grokdeclarator): Fix "storage class specified for"
11         error reporting.
12
13 2005-05-19  Kazu Hirata  <kazu@cs.umass.edu>
14
15         * parser.c: Fix comment typos.
16
17 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
18
19         * Make-lang.in (cc1plus-dummy): New.
20         (cc1plus-checksum.c): New.
21         (cc1plus-checksum.o): New.
22         (cc1plus): Add cc1plus-checksum.o.
23
24 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
25
26         PR C++/19664
27         * decl2.c (determine_visibility): Don't set visibility to
28         hidden if it has been set explicitly by user.
29
30 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
31             Mike Stump  <mrs@apple.com>
32
33         Yet more Objective-C++...
34         
35         * cp-objcp-common.h (cxx_get_alias_set): Move from
36         here...
37         (cxx_warn_unused_global_decl): Likewise.
38         (cp_expr_size): Likewise.
39         (cp_tree_size): Likewise.
40         (cp_var_mod_type_p): Likewise.
41         (cxx_initialize_diagnostics): Likewise.
42         (cxx_types_compatible_p): Likewise.
43         * cp-tree.h: to here.
44         (do_poplevel): Add.
45         * lex.c (D_OBJC): Add.
46         (init_reswords): Add.
47         * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
48         * parser.c: Add c-common.h include.
49         * pt.c: Add c-common.h and cp-objcp-common.h includes.
50         (template_args_equal): Use objc_comptypes as well.
51         (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
52         * semantics.c (do_poplevel): Remove static.
53
54         * decl.c (objc_mark_locals_volatile): Don't change decls that are
55         already ok.
56         * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
57         Objective C++ early enough.
58         * lex.c (struct resword reswords): Add Objective-C++ support.
59         * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
60         (cp_parser_objc_message_receiver): Add.
61         (cp_parser_objc_message_args): Likewise.
62         (cp_parser_objc_message_expression): Likewise.
63         (cp_parser_objc_encode_expression): Likewise.
64         (cp_parser_objc_defs_expression): Likewise.
65         (cp_parser_objc_protocol_expression): Likewise.
66         (cp_parser_objc_selector_expression): Likewise.
67         (cp_parser_objc_expression): Likewise.
68         (cp_parser_objc_visibility_spec): Likewise.
69         (cp_parser_objc_method_type): Likewise.
70         (cp_parser_objc_protocol_qualifiers): Likewise.
71         (cp_parser_objc_typename): Likewise.
72         (cp_parser_objc_selector_p): Likewise.
73         (cp_parser_objc_selector): Likewise.
74         (cp_parser_objc_method_keyword_params): Likewise.
75         (cp_parser_objc_method_tail_params_opt): Likewise.
76         (cp_parser_objc_interstitial_code): Likewise.
77         (cp_parser_objc_method_signature): Likewise.
78         (cp_parser_objc_method_prototype_list): Likewise.
79         (cp_parser_objc_method_definition_list): Likewise.
80         (cp_parser_objc_class_ivars): Likewise.
81         (cp_parser_objc_identifier_list): Likewise.
82         (cp_parser_objc_alias_declaration): Likewise.
83         (cp_parser_objc_class_declaration): Likewise.
84         (cp_parser_objc_protocol_declaration): Likewise.
85         (cp_parser_objc_protocol_refs_opt): Likewise.
86         (cp_parser_objc_superclass_or_category): Likewise.
87         (cp_parser_objc_class_interface): Likewise.
88         (cp_parser_objc_class_implementation): Likewise.
89         (cp_parser_objc_end_implementation): Likewise.
90         (cp_parser_objc_declaration): Likewise.
91         (cp_parser_objc_try_catch_finally_statement): Likewise.
92         (cp_parser_objc_synchronized_statement): Likewise.
93         (cp_parser_objc_throw_statement): Likewise.
94         (cp_parser_objc_statement): Likewise.
95         (cp_parser_primary_expression): Add Objective-C++.
96         (cp_parser_statement): Likewise.
97         (cp_parser_declaration): Likewise.
98         (cp_parser_simple_type_specifier): Likewise.
99         (cp_parser_type_name): Likewise.
100         (cp_parser_parameter_declaration_list): Likewise.
101         (cp_parser_member_declaration) Likewise.
102         * tree.c: Include debug.h.
103         * typeck.c (composite_pointer_type): Add Objective-C++ support.
104         (finish_class_member_access_expr): Likewise.
105         (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
106         (build_modify_expr): Allow objc to generate write barriers.
107
108         * Make-lang.in (cp/tree.o): Add debug.h.
109         * tree.c (lvalue_p_1, case CONST_DECL): Add.
110
111 2005-05-18  Jan Hubicka  <jh@suse.cz>
112
113         * method.c: Include tree-pass.h
114         (use_thunk): Lower body before expanding.
115
116 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
117
118         PR c++/21454
119         * decl.c (maybe_deduce_size_from_array_init): Call
120         cp_apply_type_quals_to_decl after completing array type.
121
122 2005-05-16  Richard Henderson  <rth@redhat.com>
123
124         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
125         (build_library_fn): ... here.
126
127 2005-05-12  Ian Lance Taylor  <ian@airs.com>
128
129         * cp-tree.h (cp_stmt_codes): Don't define.
130         (statement_code_p): Declare.
131         (STATEMENT_CODE_P): Define.
132         * lex.c (statement_code_p): Define.
133         (cxx_init): Use actual codes in stmt_codes initializer, not
134         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
135         than using INIT_STATEMENT_CODES.
136
137 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
138
139         * typeck.c (build_unary_op): Do not resort to address arithmetic
140         when taking the address of a COMPONENT_REF.
141         
142 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
143
144         * class.c (vtbl_init_data_s): Change the type of fns to
145         VEC(tree,gc)*.
146         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
147         Use VEC instead of VARRAY.
148
149 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
150
151         * mangle.c: Remove a reference to the MIPS -mint64 option.
152
153 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
154
155         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
156         VARRAY.
157         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
158         * name-lookup.h (cp_binding_level): Change the type of
159         static_decls to VEC(tree,gc)*.
160
161         * mangle.c (globals): Change the type of substitutions to
162         VEC(tree,gc)*.
163         (dump_substitution_candidates, add_substitution,
164         find_substitution, finish_mangling, init_mangle): Use VEC
165         instead of VARRAY.
166
167 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
168
169         * decl2.c (spew_debug): Remove.
170
171         * decl2.c (ssdf_decls, start_static_storage_duration_function,
172         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
173
174         * decl2.c (pending_statics, note_vague_linkage_var,
175         cp_finish_file): Use VEC instead of VARRAY.
176         (pending_statics_used): Remove.
177
178 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
179
180         * decl2.c (deferred_fns, note_vague_linkage_fn,
181         cp_finish_file): Use VEC instead of VARRAY.
182
183 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
184
185         PR c++/21352
186         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
187
188 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
189
190         * pt.c: Fix a comment typo.
191
192 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
193
194         * cp-tree.h (language_function): Change the type of
195         x_local_names to VEC.
196         * decl.c (push_local_name): Adjust uses of local_names.
197
198 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
199
200         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
201
202 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
203
204         * class.c (local_classes, init_class_processing): Use VEC
205         instead of VARRAY.
206         * cp-tree.h (local_classes): Likewise.
207         * mangle.c (discriminator_for_local_entity): Likewise.
208         * name-lookup.c (pushtag): Likewise.
209
210         * class.c (current_lang_depth, push_lang_context,
211         pop_lang_context): Use VEC instead of VARRAY.
212         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
213         VARRAY.
214         * name-lookup.c (push_to_top_level): Use VEC instead of
215         VARRAY.
216
217 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
218
219         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
220         for BUILT_IN_MD built-ins.
221
222 2005-05-02  Michael Matz  <matz@suse.de>
223
224         PR c++/19542
225         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
226         common frontend.
227         (null_node): Remove.
228         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
229
230 2005-04-25  Ian Lance Taylor  <ian@airs.com>
231
232         * cp-tree.def: Add EXPR_STMT.
233         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
234         (EXPR_STMT_EXPR): Define.
235         * cp-gimplify.c: Include "flags.h".
236         (gimplify_expr_stmt): New static function.
237         (cp_gimplify_expr): Handle EXPR_STMT.
238         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
239         rather than pp_expression.
240         (pp_cxx_statement): Handle EXPR_STMT.
241         * dump.c (cp_dump_tree): Handle EXPR_STMT.
242         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
243         initializer.
244
245 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
246
247         PR C++/21188
248         * rtti.c (ifnonnull): Cast the zero comparison operand
249         to the correct type.
250
251 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
252
253         PR middle-end/20991
254         * class.c: Include cgraph.h.
255         (cp_fold_obj_type_ref): Set node->local.vtable_method.
256         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
257
258 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
259
260         * mangle.c (write_builtin_type): Handle integer types which are
261         not one of the shared integer type nodes and emit a "vendor
262         extended builtin type" with an encoding in the form of "u5int96".
263
264 2005-04-24  Ian Lance Taylor  <ian@airs.com>
265
266         * cp-tree.def (USING_STMT): Change class to tcc_statement.
267         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
268         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
269         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
270
271 2005-04-23  DJ Delorie  <dj@redhat.com>
272
273         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
274         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
275         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
276         callers.
277
278 2005-04-22  Per Bothner  <per@bothner.com>
279
280         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
281         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
282
283 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
284
285         PR c++/21087
286         * name-lookup.c (push_overloaded_decl): Do not overload with
287         non-duplicate anticipated built-in.
288
289 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
290
291         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
292         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
293
294 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
295
296         * cp-tree.h: Adjust for new VEC API.
297         Define VEC(tree_pair_s,gc).
298         (struct save_scope): Adjust.
299         (struct lang_type_class): Adjust.
300         (unemitted_tinfo_decls): Adjust.
301         * class.c (add_method, resort_type_method_vec,
302         finish_struct_methods, struct find_final_overrider_data,
303         dfs_find_final_overrider_pre, find_final_overrider,
304         get_vcall_index, warn_hidden, walk_subobject_offsets,
305         check_methods, fixup_inline_methods, end_of_class,
306         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
307         add_vcall_offset): Adjust.
308         * decl.c (xref_basetypes, finish_method): Adjust.
309         * decl2.c (check_classfn): Adjust.
310         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
311         * method.c (do_build_copy_constructor): Adjust.
312         * name-lookup.c (new_class_binding, store_binding, 
313         store_bindings, store_class_bindings): Adjust.
314         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
315         VEC(cp_class_binding,gc).
316         (struct cp_binding_level): Adjust.
317         * parser.c: Define VEC(cp_token_position,heap).
318         (struct cp_lexer): Adjust.
319         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
320         cp_lexer_save_tokens): Adjust.
321         * pt.c (retrieve_specialization,
322         check_explicit_specialization): Adjust.
323         * rtti.c (unemitted_tinfo_decls): Adjust.
324         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
325         get_pseudo_ti_desc): Adjust.
326         * search.c (dfs_access_in_type, lookup_conversion_operator,
327         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
328         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
329         * semantics.c: Define VEC(deferred_access,gc).
330         (push_deferring_access_checks): Adjust.
331         * typeck2.c (abstract_virtuals_error): Adjust.
332
333 2005-04-20  Ian Lance Taylor  <ian@airs.com>
334
335         * cp-tree.def: Add STMT_EXPR.
336         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
337         (STMT_EXPR_STMT): Define.
338         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
339         STMT_EXPR.
340         (pp_cxx_expression): Likewise.
341         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
342         * dump.c (cp_dump_tree): Handle STMT_EXPR.
343
344 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
345
346         * decl.c (expand_static_init): Call build2 and build3 instead
347         of build.
348
349         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
350
351 2005-04-17  Ian Lance Taylor  <ian@airs.com>
352
353         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
354         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
355         ARROW_EXPR.
356         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
357         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
358         ALIGNOF_EXPR.
359         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
360         c_sizeof_or_alignof_type for change in parameter type.
361
362 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
363
364         PR c++/21025
365         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
366         which sizeof/alignof is dependent, rather than just whether we are
367         processing_template_decl.
368         
369 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
370
371         * cp-tree.h (LOOKUP_GLOBAL): Remove.
372         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
373         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
374         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
375         their values.
376
377 2005-04-15  Richard Henderson  <rth@redhat.com>
378
379         PR middle-end/14311
380         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
381
382 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
383
384         * cp-tree.h (lang_type_class): Remove redefined.  Move
385         java_interface into where redefined was.  Increment the width
386         of dummy.
387         (TYPE_REDEFINED): Remove.
388
389 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
390
391         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
392         CLASSTYPE_TEMPLATE_LEVEL): Remove.
393
394 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
395
396         * decl2.c (determine_visibility): Don't use export_class_data.
397         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
398         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY. 
399
400 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
401
402         * cp-tree.h (cxx_alignof): Remove.
403
404         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
405
406         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
407         CONV_STATIC_CAST): Remove.
408
409         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
410
411         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
412
413         * cp-tree.h (cp_deprecated): Remove.
414
415 2005-04-08  Ian Lance Taylor  <ian@airs.com>
416
417         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
418         CONTINUE_STMT, SWITCH_STMT.
419         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
420         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
421         (WHILE_COND, WHILE_BODY): Define.
422         (DO_COND, DO_BODY): Define.
423         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
424         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
425         * cp-gimplify.c (enum bc_t): Define.
426         (struct cp_gimplify_ctx, ctxp): Define.
427         (push_context, pop_context): New static functions.
428         (begin_bc_block, finish_bc_block): New static functions.
429         (build_bc_goto): New static function.
430         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
431         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
432         (gimplify_switch_stmt): Likewise.
433         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
434         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
435         (cp_genericize): Call push_context and pop_context.
436         * semantics.c (finish_break_stmt): Just call build_stmt
437         (BREAK_STMT) rather than build_break_stmt.
438         (finish_continue_stmt): Corresponding change.
439         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
440         parameters.
441         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
442         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
443         * dump.c (cp_dump_tree): Likewise.
444
445 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
446
447         PR c++/20905
448         * parser.c (cp_parser_type_specifier_seq): Add is_condition
449         parameter.
450         (cp_parser_new_type_id): Pass it.
451         (cp_parser_condition): Likewise.
452         (cp_parser_conversion_type_id): Likewise.
453         (cp_parser_type_id): Likewise.
454         (cp_parser_type_specifier_seq): In a condition, do not allow
455         invalid type-specifier combinations.
456         (cp_parser_exception_declaration): Adjust call to
457         cp_parser_type_specifier_seq. 
458
459         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
460         * cp-tree.h (struct tinst_level): Add in_system_header_p.
461         (TINST_IN_SYSTEM_HEADER_P): New macro.
462         (make_tinst_level): Remove.
463         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
464         the instantiated class.
465         (push_tinst_level): Do not use make_tinst_level.  Set
466         TINST_IN_SYSTEM_HEADER_P.
467         (pop_tinst_level): Likewise.
468         (instantiate_class_template): Set in_system_header.
469         (instantiate_pending_templates): Likewise.
470         * tree.c (make_tinst_level): Remove.
471
472 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
473
474         * decl.c (start_decl): Apply pending #pragma weak regardless of
475         scope.
476
477 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
478
479         PR c++/20212
480         * pt.c (regenerate_decl_from_template): Copy attributes for
481         parameters from the pattern to the instantiation.
482
483 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
484
485         PR c++/20734
486         * cp-tree.def (OFFSET_REF): Correct comments.
487         * init.c (build_offset_ref): Remove misleading comment.
488         * typeck.c (build_unary_op): Handle pointer-to-member creation
489         here, rather than ...
490         (unary_complex_lvalue): ... here.
491
492 2005-04-06  Jason Merrill  <jason@redhat.com>
493
494         PR c++/19312
495         * tree.c (stabilize_init): Don't bother trying to stabilize
496         something with no side-effects.
497
498 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
499
500         PR c++/20763
501         * decl.c (grokdeclarator): Correct attribute handling.
502
503 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
504
505         PR c++/19159
506         * decl2.c (import_export_decl): Use non-COMDAT external linkage
507         for virtual tables, typeinfo, etc. that will be emitted in only
508         one translation unit on systems without weak symbols.
509
510 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
511
512         PR c++/20679
513         * parser.c (cp_parser_template_name): Fix thinko.
514
515 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
516
517         PR c++/20746
518         * method.c (use_thunk): Protect covariant pointer return
519         adjustments from NULL pointers.
520
521 2005-04-04  Jan Hubicka  <jh@suse.cz>
522
523         * decl2.c (finish_objects): Revert my previous patch.
524         (cp_finish_file): Likewise.
525
526 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
527
528         * pt.c: Fix comment typos.
529
530 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
531
532         PR c++/20723
533         * pt.c (more_specialized_fn): Member functions are unordered wrt
534         non-members.  Conversion operators are unordered wrt other
535         functions.
536
537 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
538
539         * call.c (add_template_candidates_real): Remove length parameter
540         from fn_type_unification call.
541         * class.c (resolve_address_of_overloaded_function): Likewise
542         * cp-tree.h (fn_type_unification): Remove length parameter.
543         * pt.c (get_bindings_overload): Remove.
544         (get_bindings_real): Rename to ...
545         (get_bindings): ... here.  Remove length and strict
546         parameters. Change return type flag to boolean.  Remove original
547         forwarding function.
548         (determine_specialization): Adjust get_bindings call.
549         (fn_type_unification): Remove length parameter.  Adjust.
550         (type_unification_real): Remove length parameter.  Adjust.
551         (resolve_overloaded_unification): Adjust get_bindings call.
552         (try_one_overload): Simplify confusing cascaded if control flow.
553         (unify): Remove length paramter from type_unification_real call.
554         (most_specialized_instantiation): Adjust get_bindings calls.
555         (most_specialized): Likewise.
556
557 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
558
559         PR c++/19203, implement DR 214
560         * call.c (joust): Use more_specialized_fn.
561         * cp-tree.h (DEDUCE_ORDER): Remove.
562         (more_specialized): Replace with ...
563         (more_specialized_fn): ... this.
564         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
565         case.
566         (type_unification_real): Remove DEDUCE_ORDER case.
567         (more_specialized): Replace with ...
568         (more_specialized_fn): ... this.  Implement DR 214.
569         (most_specialized_instantiation): Use get_bindings_real directly.
570
571 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
572
573         PR c++/18644
574         * call.c (build_new_op): Remove check for -Wsynth.
575
576 2005-03-31  Jan Hubicka  <jh@suse.cz>
577
578         * decl2.c (finish_objects): Mark ctor as needed.
579         (cp_finish_file): Output variables only in nonunit-at-a-time.
580
581 2005-03-29  Richard Henderson  <rth@redhat.com>
582
583         PR c/20519
584         * decl.c (cp_complete_array_type): Rename from complete_array_type.
585         Use the new complete_array_type in c-common.c.  Update all callers.
586         * cp-tree.h (cp_complete_array_type): Update to match.
587
588 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
589
590         * typeck.c (build_static_cast_1): Allow scalar_cast between
591         any integral, floating, or enumeration type.
592
593 2005-03-24  Steven Bosscher  <stevenb@suse.de>
594
595         * typeck.c (comptypes): First determine if the types are compatible
596         from a target-independent point of view.  Check target attributes
597         last.
598
599         * class.c (build_base_path):
600         (build_vbase_offset_vtbl_entries):
601         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
602         * error.c (dump_expr): Likewise.
603         * init.c (build_zero_init, expand_cleanup_for_base,
604         build_vec_delete_1): Likewise.
605         * mangle.c (write_integer_cst): Likewise.
606         * method.c (thunk_adjust): Likewise.
607         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
608         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
609         * typeck.c (build_ptrmemfunc_access_expr,
610         (get_member_function_from_ptrfunc): Likewise.
611
612 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
613
614         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
615
616 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
617
618         * cp-tree.h (perform_integral_promotions): Remove.
619         (default_conversion): Add.
620
621 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
622
623         * parser.c (cp_parser_warn_min_max): New function.
624         (cp_parser_binary_expression): Use it.
625         (cp_parser_assignment_operator_opt): Likewise.
626         (cp_parser_operator): Likewise.
627
628 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
629
630         PR c++/19980
631         * decl.c (start_preparsed_function): Robustify.
632
633 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
634
635         PR c++/20499
636         * parser.c (cp_parser_class_head): Return NULL_TREE when
637         encountering a redefinition.
638
639 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
640
641         PR c++/20465
642         PR c++/20381
643         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
644         template.
645
646 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
647
648         PR c++/20461
649         PR c++/20536
650         * init.c (emit_mem_initializers): Don't crash on undefined
651         types.
652
653 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
654
655         PR c++/20147
656         * semantics.c (finish_stmt_expr_expr): Return immediately
657         if error_operand_p (expr).
658
659 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
660
661         * cp-tree.h (lvalue_or_else, lvalue_p): New.
662         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
663
664 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
665
666         PR c++/20240
667         * decl.c (decls_match): Compare context of VAR_DECL.
668
669 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
670
671         PR c++/20333
672         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
673         Check the return value of cp_parser_nested_name_specifier.
674
675 2005-03-18  Dale Johannesen <dalej@apple.com>
676
677         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
678
679 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
680
681         PR c++/20463
682         * parser.c (cp_parser_diagnose_invalid_type_name):
683         Check TYPE_BINFO (current_class_type) before attempting
684         to emit inform messages.
685
686 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
687
688         PR c++/19966
689         * cp-tree.h (grok_op_properties): Change return type to void.
690         * decl.c (grok_op_properties): Return early - don't check the
691         arity - in case of a static member or an operator that cannot
692         be non-member; tidy a bit.
693
694 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
695
696         PR c++/20186
697         * pt.c (contains_dependent_cast_p): Remove.
698         (fold_non_dependent_expr): Don't use it.
699         (value_dependent_expression_p): Use a switch statement.
700         reference_exprs can be dependent.
701
702 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
703
704         PR c++/4403
705         PR c++/9783, DR433
706         * name-lookup.c (pushtag): Skip template parameter scope when
707         scope is ts_global.  Don't push tag into template parameter
708         scope.
709         * pt.c (instantiate_class_template): Reorder friend class
710         template substitution to handle non-dependent friend class
711         that hasn't been previously declared.
712
713 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
714
715         Friend class name lookup 5/n
716         PR c++/1016
717         * cp-tree.h (pushtag): Adjust declaration.
718         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
719         lookup_name fails.
720         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
721         (start_enum): Adjust call to pushtag.
722         * name-lookup.c (ambiguous_decl): Ignore hidden names.
723         (qualify_lookup): Change return type to bool.
724         (hidden_name_p): New function.
725         (lookup_namespace_name, unqualified_namespace_lookup,
726         lookup_name_real): Use it.
727         (lookup_type_scope): Update comments.
728         (maybe_process_template_type_declaration): Change parameter name
729         from globalize to is_friend.
730         (pushtag): Change globalize parameter of type int to tag_scope.
731         Hide name if introduced by friend declaration.
732         * name-lookup.h (hidden_name_p): Add declaration.
733         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
734         here.
735         * pt.c (push_template_decl_real): Make hidden class template
736         visible.
737         (lookup_template_class, instantiate_class_template): Adjust call
738         to pushtag.
739         * semantics.c (begin_class_definition): Likewise.
740         * rtti.c (init_rtti_processing, build_dynamic_cast_1, 
741         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
742         ts_global.
743
744 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
745
746         PR c++/20157
747         * pt.c (determine_specialization): Reject non-specializations. 
748
749 2005-03-11  Per Bothner  <per@bothner.com>
750
751         * cp-tree.h (struct cp_declarator): New id_loc field.
752         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
753         location using c_lex_with_flags, instead of input_location.
754         (cp_parser_direct_declarator): Set declarator's id_loc from
755         cp_token's id_loc.
756
757 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
758
759         PR c++/18384, c++/18327
760         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
761         and index.  Convert max_index to size_type_node if it isn't
762         host_integerp (, 1).
763
764 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
765
766         PR c++/20208
767         * pt.c (tsubst_decl): Apply array-to-pointer and
768         function-to-pointer conversions to function arguments.
769         (regenerate_decl_from_template): Likewise.
770
771 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
772
773         PR c++/16859    
774         * decl.c (complete_array_type): In pedantic mode, return
775         3 for an empty initializer list as the initializer for an
776         array of unknown bound (8.5.1/4).
777         (maybe_deduce_size_from_array_init): Fix final test to use
778         the above.
779
780 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
781
782         PR c++/20186
783         * pt.c (contains_dependent_cast_p): New.
784         (fold_non_dependent_expr): Call it.
785
786 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
787
788         PR c++/20142
789         * cp-tree.h (target_type): Remove.
790         * decl.c (layout_var_decl): Remove #if 0'd code.
791         (cp_finish_decl): Remove dead code.
792         * init.c (build_vec_init): When determining whether or not the
793         element type has an asignment operator, look through all array
794         dimensions. 
795         * typeck.c (target_type): Remove.
796
797 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
798
799         * class.c (finish_struct_1): Do not warn about non-virtual
800         destructors in Java classes.
801
802 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
803
804         PR c++/19311
805         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
806         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
807         for OFFSET_TYPE.
808         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
809         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
810         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
811         template.
812
813 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
814
815         * name-lookup.c (push_overloaded_decl): Don't error if the new
816         decl matches the old one.
817         * decl.c (redeclaration_error_message): Likewise.
818
819 2005-03-01  Per Bothner  <per@bothner.com>
820
821         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
822         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
823
824 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
825
826         PR c++/20232
827         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
828         covariancy. 
829
830         * cp-tree.g (THUNK_TARGET): Expand comment.
831         * method.c (use_thunk): Make sure we also use the target, if that
832         is a thunk.
833
834 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
835
836         PR c++/20206
837         * decl.c (cxx_comdat_group): Put thunks for
838         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
839         comdat group as the thunk target.
840
841 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
842
843         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
844         parser.c: Fix comment typo(s).
845
846 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
847
848         PR c++/20175
849         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
850         initializes a char/wchar_t array.
851
852 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
853
854         PR c++/19878
855         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
856         with internal linkage.
857
858 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
859
860         * decl.c (grokvardecl): Don't exempt anonymous types from having
861         linkage for variables that have linkage other than "C".
862
863 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
864
865         * cp-objcp-common.h, error.c: Update copyright.
866
867 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
868
869         PR c++/20073
870         * decl.c (start_decl_1): Don't clear TREE_READONLY.
871         (cp_finish_decl): Likewise.
872         (complete_vars): Call cp_apply_type_quals_to_decl.
873         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
874         cases where that's not valid.
875
876         PR c++/19991
877         * init.c (integral_constant_value): Iterate if the value of a decl
878         is itself a constant.
879
880         PR c++/20152
881         * parser.c (cp_parser_class_head): Check for redefintions here.
882         * semantics.c (begin_class_definition): Not here.
883         
884         PR c++/20153
885         * decl2.c (build_anon_union_vars): Add type parameter.
886         (finish_anon_union): Pass it.
887
888         PR c++/20148
889         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
890         Handle STATEMENT_LIST.
891
892         PR c++/19883
893         * parser.c (cp_parser_direct_declarator): Always complain about
894         non-constant array bounds when in a function scope.
895         * semantics.c (finish_id_expression): Do not mark dependent names
896         as non-constant. 
897
898 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
899         
900         PR c++/19076
901         PR c++/6628
902         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
903         * decl.c (grokdeclarator): Pedwarn about qualifying a function
904         type. 
905         Add qualifiers when declaring a typedef of a function type.
906         Member function pointers pick up the qualifiers of the typedef
907         used to declare them.
908         Don't complain about creating cv-qualified function types.
909         Complain about qualified function typedefs that are used to
910         declare non-static member functions or free functions.
911         Use cp_apply_type_quals_to_decl.
912         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
913         (grokclassfn): Use cp_apply_type_quals_to_decl.
914         * error.c (dump_type_suffix): Print qualifiers for function
915         types. 
916         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
917         (tsubst): When substituting a function type into a member
918         pointer type, pass along the qualifiers.
919         (unify): Unify member pointers to member function pointers.
920         * tree.c (cp_build_qualified_type_real): Function types may be
921         qualified. This includes restrict qualifiers.
922         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
923         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
924         added to function types.
925
926 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
927
928         PR 18785
929         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
930         c_common_to_target_charset.  Delete bogus comment.
931
932 2005-02-18  Richard Henderson  <rth@redhat.com>
933
934         PR libstdc++/10606
935         * except.c (do_get_exception_ptr): New.
936         (expand_start_catch_block): Use it.
937
938 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
939
940         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
941         if type is not error_mark_node.
942
943 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
944
945         PR c++/19508
946         * decl2.c (grokfield): Do not apply attributes to template parameters
947         as they are ignored by tsubst anyway.
948
949 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
950
951         PR c++/19813
952         * decl.c (start_decl_1): Clear TREE_READONLY flag if
953         its type has TYPE_NEEDS_CONSTRUCTING.
954         (complete_vars): Likewise.
955
956 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
957
958         PR c++/20028
959         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
960         template along with TYPE_SIZE.
961
962         PR c++/20022
963         * semantics.c (perform_deferred_access_checks): Use
964         get_deferred_access_checks to get the top of the stack.
965
966 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
967
968         PR c++/17788
969         * class.c (add_implicitly_declared_members, check_field_decl)
970         (check_field_decls, check_bases): Remove arguments, tests and
971         assignments of cant_have_default_ctor-related variables.
972
973 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
974
975         * decl2.c (mark_used): Set the source location of the used decl to
976         the current input location here...
977         * method.c (synthesize_method): ... not here.  Set input_location
978         from the decl instead.
979
980 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
981
982         PR c++/19608
983         * parser.c (cp_parser_late_parsing_for_member): Use
984         current_function_decl as scope to push to and from.
985
986         PR c++/19884
987         * pt.c (check_explicit_specialization): Make sure namespace
988         binding lookup found an overloaded function.
989         (lookup_template_function): Just assert FNS is an overloaded
990         function.
991
992         PR c++/19895
993         * decl.c (grokdeclarator): Check for error mark node in ptrmem
994         construction.
995
996 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
997
998         PR c++/17816
999         * decl.c (redeclaration_error_message): Report redefinition of
1000         pure virtual function.
1001
1002 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1003
1004         PR c++/19891
1005         * class.c (build_simple_base_path): Build the component_ref
1006         directly.
1007         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1008         rather than using lookup_base.
1009         * search.c (dfs_walk_once): Add non-recursive assert check.
1010         * typeck.c (build_class_member_access_expr): It is possible for
1011         the member type to be both const and volatile.
1012
1013 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1014
1015         PR c++/14479
1016         PR c++/19487
1017         * pt.c (maybe_check_template_type): Remove.
1018         * cp-tree.h (maybe_check_template_type): Remove prototype.
1019         * name-lookup.c (maybe_process_template_type_declaration): Don't
1020         use maybe_check_template_type.
1021
1022 2005-02-11  Richard Henderson  <rth@redhat.com>
1023
1024         PR c++/19632
1025         * pt.c (get_mostly_instantiated_function_type): Save and restore
1026         flag_access_control instead of push/pop_access_scope.
1027
1028 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
1029
1030         PR c++/19755
1031         * decl.c (reshape_init): Issue warnings about missing braces.
1032
1033 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
1034
1035         * cp-tree.def, except.c, ptree.c: Update copyright.
1036
1037 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
1038
1039         PR c++/19811
1040         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1041         attempting name lookup.
1042
1043         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1044
1045         PR c++/19787
1046         * call.c (initialize_reference): Robustify.
1047
1048         PR ++/19732
1049         * decl.c (grokdeclarator): Check for invalid use of destructor
1050         names.
1051
1052         PR c++/19762
1053         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1054         names with invalid types.
1055
1056         PR c++/19826
1057         * parser.c (cp_parser_direct_declarator): Allow type-dependent
1058         expressions as array bounds.
1059
1060         PR c++/19739
1061         * parser.c (cp_parser_attributes_list): Allow empty lists.
1062
1063 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
1064
1065         PR c++/19733
1066         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1067         (check_bases): Give warnings about a base class with a
1068         non-virtual destructor, even if it is implicit.
1069         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1070         (maybe_warn_about_overly_private_class): Don't use
1071         TYPE_HAS_DESTRUCTOR.
1072         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1073         (check_for_override): Give it external linkage.
1074         (add_implicitly_declared_members): Generate destructors lazily.
1075         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1076         TYPE_HAS_DESTRUCTOR.
1077         (check_bases_and_members): Call check_methods before
1078         check_field_decls.
1079         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1080         TYPE_HAS_DESTRUCTOR.
1081         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1082         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1083         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1084         (lang_type_class): Add lazy_destructor.
1085         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1086         (CLASSTYPE_DESTRUCTORS): Robustify.
1087         (TYPE_HAS_DESTRUCTOR): Remove.
1088         (check_for_override): Declare.
1089         (build_vbase_delete): Remove.
1090         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1091         expressions.
1092         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1093         * except.c (dtor_nothrow): Lazily create destructors if necessary.
1094         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1095         * init.c (build_delete): Lazily create destructors, if necessary.
1096         (build_vbase_delete): Remove.
1097         * method.c (locate_dtor): Simplify.
1098         (implicitly_declare_fn): Add support for destructors.
1099         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1100         necessary.
1101         * pt.c (check_explicit_specialization): Don't use
1102         TYPE_HAS_DESTRUCTOR.
1103         (instantiate_class_template): Likewise.
1104         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1105         * rtti.c (emit_support_tinfos): Robustify.
1106         * search.c (lookup_fnfields_1): Lazily create destructors.
1107         * typeck.c (build_class_member_access_expr): Remove
1108         PSEUDO_DTOR_EXPR handling.
1109         (lookup_destructor): Likewise.
1110
1111 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
1112
1113         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1114         copyright.
1115
1116 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
1117
1118         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1119         on boolean variables.
1120         (cp_lexer_stop_debugging): Likewise.
1121
1122 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1123
1124         PR c++/17401
1125         * parser.c (cp_parser_pure_specifier): Emit a specific error
1126         message with an invalid pure specifier.
1127         * decl2.c (grok_function_init): Remove.
1128         (grokfield): An initializer for a method is a always a pure
1129         specifier.
1130
1131 2005-02-02  Matt Austern  <austern@apple.com>
1132
1133         PR c++/19628
1134         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1135         * parser.c (cp_parser_postfix_expression): Accept function call in
1136         constant expression if builtin_valid_in_constant_expr_p is true
1137         for that function.
1138         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1139         * semantics.c (finish_id_expression): Accept function call in constant
1140         expression if builtin_valid_in_constant_expr_p is true for that
1141         function.
1142         * tree.c (builtin_valid_in_constant_expr_p): New.
1143
1144 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1145
1146         PR c++/17413
1147         * pt.c (check_instantiated_args): Improve error message.
1148         Fix logic when to print its second part.
1149
1150 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1151
1152         * cp-tree.h (complete_type_or_else): Remove macro.
1153         (complete_type_or_diagnostic): Rename to complete_type_or_else
1154         and remove last argument.
1155         * typeck.c (complete_type_or_diagnostic): Rename to
1156         complete_type_or_else and remove last argument.
1157
1158 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1159
1160         * cp-tree.h (commonparms): Remove prototype.
1161         (convert_arguments): Likewise.
1162         (PFN_FROM_PTRMEMFUNC): Remove.
1163         * typeck.c (commonparms): Make static.
1164         (convert_arguments): Add prototype. Make static.
1165         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1166
1167 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1168
1169         * parser.c (cp_parser_primary_expression): Don't complain about
1170         floating-point literals in integral constant expressions when
1171         !pedantic.
1172
1173 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
1174
1175         * parser.c (cp_parser_template_id): Revert comment patch too.
1176
1177         PR c++/18757
1178         PR c++/19366
1179         PR c++/19499
1180         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1181         Issue an error when creating the template id.
1182         * pt.c (fn_type_unification): Return early if the explicit
1183         template arg list is an error_mark_node.
1184
1185 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1186
1187         * decl.c (build_enumerator): Do not issue duplicate error messages
1188         about invalid enumeration constants.
1189         * parser.c (cp_parser_non_integral_constant_expression): Always
1190         set parser->non_integral_constant_expression_p.
1191         (cp_parser_primary_expression): Add cast_p parameter.  Issue
1192         errors about invalid uses of floating-point literals in
1193         cast-expressions.
1194         (cp_parser_postfix_expression): Add cast_p parameter.
1195         (cp_parser_open_square_expression): Pass it.
1196         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1197         (cp_parser_unary_expression): Likewise.
1198         (cp_parser_new_placement): Pass it.
1199         (cp_parser_direct_new_declarator): Likewise.
1200         (cp_parser_new_initializer): Likewise.
1201         (cp_parser_cast_expression): Add cast_p parameter.
1202         (cp_parser_binary_expression): Likewise.
1203         (cp_parser_question_colon_clause): Likewise.
1204         (cp_parser_assignment_expression): Likewise.
1205         (cp_parser_expression): Likewise.
1206         (cp_parser_constant_expression): If an integral constant
1207         expression is invalid, return error_mark_node.
1208         (cp_parser_expression_statement): Pass cast_p.
1209         (cp_parser_condition): Likewise.
1210         (cp_parser_iteration_statement): Likewise.
1211         (cp_parser_jump_statement): Likewise.
1212         (cp_parser_mem_initializer): Likewise.
1213         (cp_parser_template_argument): Likewise.
1214         (cp_parser_parameter_declaration): Likewise.
1215         (cp_parser_initializer): Likewise.
1216         (cp_parser_throw_expression): Likewise.
1217         (cp_parser_attribute_list): Likewise.
1218         (cp_parser_simple_cast_expression): Likewise.
1219         (cp_parser_functional_cast): Likewise.
1220         (cp_parser_late_parsing_default_args): Likewise.
1221         (cp_parser_sizeof_operand): Save/restore
1222         non_integral_constant_expression_p.
1223
1224 2005-01-31  Mike Stump  <mrs@apple.com>
1225
1226         * parser.c (cp_lexer_new_main): Get the first token, first, before
1227         doing anything.
1228
1229 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1230
1231         * decl.c (start_decl): Add missing parentheses.
1232
1233 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
1234
1235         PR c++/19555
1236         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1237         * decl.c (duplicate_decls): Do not discard
1238         DECL_IMPLICIT_INSTANTIATION when merging declarations.
1239         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1240         variables that do not have DECL_USE_TEMPLATE.
1241
1242         PR c++/19395
1243         * decl.c (grokdeclarator): Refactor code so that qualified names
1244         are never allowed as the declarator in a typedef.
1245
1246         PR c++/19367
1247         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1248         builtin declarations.
1249
1250         PR c++/19457
1251         * call.c (convert_like_real): Inline call to
1252         dubious_conversion_warnings here.
1253         * cp-tree.h (dubious_conversion_warnings): Remove.
1254         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1255         setting TREE_NEGATED_INT.
1256         * typeck.c (dubious_conversion_warnings): Remove.
1257
1258         PR c++/19349
1259         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1260         memory.
1261
1262 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
1263
1264         PR c++/19253
1265         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1266         tentative parses.
1267
1268         PR c++/19667
1269         * pt.c (redeclare_class_template): Robustify.
1270
1271 2005-01-27  Steven Bosscher  <stevenb@suse.de>
1272
1273         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1274         instead of SWITCH_EXPR ones.
1275         * pt.c (tsubst_expr): Likewise.
1276         * semantics.c (begin_switch_stmt, finish_switch_cond,
1277         finish_switch_stmt): Likewise.
1278
1279 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
1280
1281         PR c++/18370
1282         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1283
1284 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
1285
1286         * class.c (abort_fndecl_addr): New variable.
1287         (build_vtbl_initializer): If we have a pure virtual function
1288         share the abort function's address.
1289         Include gt-cp-class.h at the end.
1290         * config-lang.in (gtfiles): Add cp/class.c.
1291
1292 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1293
1294         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1295         (pp_cxx_function_definition): Make static.
1296         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1297         (pp_cxx_function_definition): Likewise.
1298
1299 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1300
1301         * name-lookup.c (print_binding_level): Make static.
1302         (constructor_name_full): Make static inline.
1303         (current_decl_namespace): Make static.
1304         * name-lookup.h (constructor_name_full): Remove prototype.
1305         (print_binding_level): Likewise.
1306         (current_decl_namespace): Likewise.
1307
1308 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1309
1310         * decl.h (debug_bindings_indentation): Remove.
1311
1312 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
1313
1314         * typeck.c: Fix a comment typo.
1315
1316 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1317
1318         PR c++/19208
1319         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1320         at least once.
1321         (tsubst): Use fold_decl_constant_value in place of a bare call to
1322         integral_constant_value.
1323
1324 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
1325
1326         * typeck.c (more_qualified_p): Remove.
1327         * cp-tree.h: Remove the corresponding prototype.
1328
1329 2005-01-19  Matt Austern  <austern@apple.com>
1330
1331         * typeck.c (comptypes): Handle return code from objc_comptypes
1332         correctly.
1333
1334 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
1335
1336         * cp-tree.h, name-lookup.h: Remove unused prototypes.
1337
1338 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1339
1340         PR c++/19375
1341         * semantics.c (finish_id_expression): Disable access checking for
1342         already lookuped FIELD_DECL.
1343
1344 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1345
1346         * decl.c (delete_block): Remove.
1347         * cp-tree.h: Remove the corresponding prototype.
1348
1349         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1350         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1351         Remove.
1352         * cp-tree.h: Remove the corresponding prototypes.
1353
1354         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1355         cp_update_decl_after_saving, name_p): Remove.
1356         * cp-tree.h: Remove the corresponding prototypes.
1357
1358 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
1359
1360         PR c/19472
1361         * semantics.c (finish_asm_stmt): Strip nops off
1362         input memory operands.
1363
1364 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1365
1366         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1367         typeck2.c: Update copyright.
1368
1369 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
1370
1371         * class.c (get_enclosing_class): Remove.
1372         * cp-tree.h: Remove the corresponding prototypes.
1373
1374         * cvt.c (convert_lvalue): Remove.
1375         * cp-tree.h: Remove the corresponding prototype.
1376
1377         * pt.c (tinst_for_decl): Remove.
1378         * cp-tree.h: Remove the corresponding prototypes.
1379
1380         * tree.c (hash_chainon): Remove.
1381         * cp-tree.h: Remove the corresponding prototypes.
1382
1383 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
1384
1385         PR c++/19263
1386         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1387         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1388
1389 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1390
1391         * Make-lang.in (cp-warn): Don't append $(WERROR).
1392
1393 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
1394
1395         * cp-tree.h: Fix a comment typo.
1396
1397 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
1398
1399         PR c++/19298
1400         * pt.c (tsubst_qualified_id): Call convert_from_reference.
1401
1402 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
1403
1404         PR c++/19244
1405         * class.c (add_implicitly_declared_members): Remove dead code.
1406         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
1407         DECL_CONSTRUCTOR_P.
1408         (grokdeclarator): Adjust calls to grokfndecl.
1409         * method.c (implicitly_declare_fn): Improve documentation.
1410         * parser.c (cp_parser_direct_declarator): Do not consider a
1411         function to be a constructor if the containing class was
1412         originally anonymous.
1413
1414 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1415
1416         PR c++/17154
1417         * search.c (lookup_field_1): Handle using declaration in
1418         class template partial specialization.
1419
1420 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1421
1422         PR c++/19258
1423         * pt.c (push_access_scope): Handle friend defined in class.
1424         (pop_access_scope): Likewise.
1425
1426 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1427
1428         PR c++/19270
1429         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1430         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1431         array-new handling code.  Use build_x_binary_op.
1432
1433 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
1434
1435         PR c++/19030
1436         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1437         * name-lookup.h (push_scope): Return pushed scope, not flag.
1438         * name-lookup.c (push_scope): Return scope that should be popped,
1439         not a flag.
1440         * decl.c (start_decl): Adjust.
1441         (grokfndecl): Adjust scope push and pop.
1442         * decl2.c (check_classfn): Likewise.
1443         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1444         cp_parser_init_declarator, cp_parser_direct_declarator,
1445         cp_parser_class_specifier, cp_parser_class_head,
1446         cp_parser_lookup_name,
1447         cp_parser_constructor_declarator_p): Likewise.
1448         * pt.c (instantiate_class_template,
1449         resolve_typename_type): Likewise.
1450
1451 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
1452
1453         PR c++/14136
1454         * parser.c (cp_parser_unqualified_id): Do not issue error message
1455         for typedef-name as destructor declarator when performing an
1456         uncommitted tentative parse.
1457
1458 2005-01-01  Steven Bosscher  <stevenb@suse.de>
1459
1460         PR middle-end/17544
1461         * decl.c (finish_function): Fix comment.  Annotate the compiler
1462         generated return with the current file name and line 0.
1463
1464 2004-12-31  Richard Henderson  <rth@redhat.com>
1465
1466         PR middle-end/17799
1467         * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1468         * class.c (build_vtable): Don't conditionallize setting it
1469         based on DWARF2_DEBUG.
1470         (layout_class_type): Set DECL_IGNORED_P.
1471         * decl2.c (get_guard): Likewise.
1472         * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1473         * tree.c (build_local_temp): Likewise.
1474
1475 2004-12-30  Mark Mitchell  <mark@codesourcery.com>
1476
1477         * cp-tree.h (cp_declarator): Split "name" field into
1478         qualifying_scope and unqualified_name.
1479         * decl.c (get_scope_of_declarator): Adjust accordingly.
1480         (grokdeclarator): Likewise.
1481         * decl2.c (grokfield): Likewise, and adjust call to
1482         do_class_using_decl.
1483         * name-lookup.c (do_class_using_decl): Split "decl" into
1484         "scope" and "name".  Remove unnecessary code.
1485         * name-lookup.h (do_class_using_decl): Adjust declaration.
1486         * parser.c (make_id_declarator): Split "id" into qualifying_scope
1487         and unqualified_name.
1488         (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1489         (cp_parser_direct_declarator): Adjust to handle the fact that
1490         cp_parser_declarator_id no longer returns a SCOPE_REF.
1491         (cp_parser_direct_declarator): Likewise.
1492         (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1493         names.
1494         (cp_parser_member_declaration): Adjust call to make_id_declarator.
1495         (cp_parser_check_declarator_template_parameters): Do not expect a
1496         SCOPE_REF.
1497
1498         * decl.c (duplicate_decls): Call ggc_free on declarations we will
1499         not be needing any longer.
1500
1501         PR c++/19190
1502         * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1503
1504 2004-12-28  Richard Henderson  <rth@redhat.com>
1505
1506         PR inline-asm/15740
1507         * semantics.c (finish_asm_stmt): Resolve asm names.  Validate input
1508         constraints.  Mark memory inputs addressable.
1509
1510 2004-12-27  Jason Merrill  <jason@redhat.com>
1511
1512         * decl.c (expand_static_init): Don't use shortcut if
1513         targetm.relaxed_ordering.
1514
1515 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
1516
1517         PR c++/19149
1518         * decl.c (check_tag_decl): Robustify.
1519
1520 2004-12-23  Mark Mitchell  <mark@codesourcery.com>
1521
1522         PR c++/17595
1523         * parser.c (cp_parser_error): Issue better messages about
1524         #pragma in locations where it is not permitted.
1525
1526         PR c++/17413
1527         * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1528
1529         * cvt.c (convert_to_void): Fix typo in comment.
1530
1531 2004-12-23  Alexandre Oliva  <aoliva@redhat.com>
1532
1533         PR c++/18962
1534         * pt.c (check_explicit_specialization): Use the argument list from
1535         the definition in a template function specialization definition.
1536
1537 2004-12-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1538
1539         PR c++/18733
1540         * pt.c (check_explicit_specialization): Use special logic to validate
1541         befriended specializations.
1542
1543 2004-12-22  Mark Mitchell  <mark@codesourcery.com>
1544
1545         * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1546
1547         PR c++/18464
1548         * call.c (build_this): In templates, do not bother with
1549         build_unary_op.
1550         * typeck.c (unary_complex_lvalue): In a template, always refuse
1551         simplifications.
1552
1553         PR c++/18492
1554         * cp-gimplify.c (cp_genericize): Relax assertion.
1555
1556         PR c++/11224
1557         * cvt.c (convert_to_void): Warn about unused values.
1558
1559         PR c++/18257
1560         * rtti.c (emit_support_tinfos): On systems without weak symbols,
1561         emit the runtime library type-info objects as non-COMDAT.
1562
1563 2004-12-21  Mark Mitchell  <mark@codesourcery.com>
1564
1565         PR c++/18378
1566         * call.c (convert_like_real): Do not permit the use of a copy
1567         constructor to copy a packed field.
1568
1569         PR c++/19063
1570         * decl.c (grokdeclarator): Return error_mark_node, not
1571         void_type_node, to indicate errors.
1572         * parser.c (cp_parser_template_parameter_list): Robustify.
1573         (cp_parser_template_parameter): Likewise.
1574
1575         PR c++/19034
1576         * tree.c (cp_tree_equal): Handle OVERLOAD.
1577
1578 2004-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1579
1580         * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1581         * name-lookup.c (pushdecl_class_level): Likewise.
1582
1583 2004-12-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1584
1585         * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1586
1587 2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
1588
1589         PR c++/18984
1590         * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1591         check to see if contains the pointer.  Insert the statement before
1592         returning.
1593
1594 2004-12-21  Nathan Sidwell  <nathan@codesourcery.com>
1595
1596         PR c++/14075
1597         * decl.c (check_initializer): Check string initializer of array is
1598         not parenthesized.
1599         * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1600         * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1601         * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1602
1603         * cp-tree.def (TEMPLATE_TYPE_PARM,
1604         BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1605         for better code efficiency.
1606         * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1607         (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1608         (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1609         INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1610         CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1611         TYPE_PTROBV_P): Likewise.
1612
1613         PR c++/18975
1614         * method.c (do_build_copy_constructor): Refactor. Don't const
1615         qualify a mutable field.
1616         (do_build_assign_ref): Likewise.
1617
1618 2004-12-20  Matt Austern <austern@apple.com>
1619
1620         PR c++/19044
1621         * decl.c (make_rtl_for_nonlocal_decl): Use
1622         set_builtin_user_assembler_name.
1623
1624 2004-12-19  Mark Mitchell  <mark@codesourcery.com>
1625
1626         * cp-tree.h (note_decl_for_pch): New function.
1627         * class.c (build_clone): Call note_decl_for_pch.
1628         * semantics.c (finish_member_declaration): Likewise.
1629         (note_decl_for_pch): New function.
1630
1631 2004-12-17  Steven Bosscher  <stevenb@suse.de>
1632
1633         * init.c (build_zero_init): max_index is the number of
1634         elements, minus 1.
1635
1636 2004-12-17  Nathan Sidwell  <nathan@codesourcery.com>
1637
1638         PR c++/18721
1639         * class.c (add_method): Do not push conversion operators into a
1640         binding level.
1641
1642         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1643         * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1644
1645 2004-12-16  Nathan Sidwell  <nathan@codesourcery.com>
1646
1647         PR c++/18905
1648         * cp-tree.h (integral_constant_value): Declare.
1649         * call.c (null_ptr_cst_p): Use integral_constant_value, not
1650         decl_constant_value.
1651         (convert_like_real): Likewise.
1652         * class.c (check_bitfield_decl): Likewise.
1653         * cvt.c (ocp_convert): Likewise.
1654         (convert): Remove unnecessary decl_constant_value call.
1655         * decl.c (compute_array_index_type): Use integral_constant_value,
1656         not decl_constant_value.
1657         (build_enumerator): Likewise.
1658         * decl2.c (grokfield): Likewise.
1659         * init.c (decl_constant_value): Simplify.
1660         (integral_constant_value): New.
1661         * pt.c (fold_decl_constant_value): Use integral_constant_value,
1662         remove subsequent check.
1663         (tsubst): Use integral_constant_value, not decl_constant_value.
1664         (tsubst_copy, unify): Likewise.
1665         * typeck.c (decay_conversion): Likewise.
1666         (build_compound_expr): Remove unnecessary decl_constant_value
1667         calls.
1668         (build_static_cast_1, build_reinterpret_cast_1):
1669         (convert_for_assignment): Remove comment about not calling
1670         decl_constant_value.
1671
1672 2004-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1673
1674         PR c++/18825
1675         * pt.c (instantiate_class_template): Set input_location for
1676         friend function.
1677         (tsubst_friend_function): Don't set input_location here.
1678         Make sure the context is complete if necessary.
1679
1680 2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>
1681
1682         PR c++/18981
1683         * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1684         flag setting.
1685
1686 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1687
1688         PR c++/18738
1689         * decl.c (make_typename_type): Do not handle namespace-scoped
1690         names here.
1691         (tag_name): Handle typename_type.
1692         (check_elaborated_type_specifier): Handle typenames.
1693         * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1694         comment.
1695         (cp_parser_elaborated_type_specifier): Use
1696         cp_parser_diagnose_invalid_type_name.
1697
1698 2004-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
1699
1700         PR c++/18965
1701         * init.c (build_zero_init): If the max_index is 0, there is no
1702         need to create a RANGE_EXPR.
1703
1704 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1705
1706         PR c++/18793
1707         * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1708
1709 2004-12-14  Nathan Sidwell  <nathan@codesourcery.com>
1710
1711         PR c++/18949
1712         * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1713         REFERENCE_REF_P is dereferencing a reference type.
1714         * typeck.c (build_static_cast): Convert from reference even in a
1715         template.
1716         (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1717
1718 2004-12-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1719
1720         * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1721         (cp_parser_name_lookup_error): Use it.
1722         (cp_parser_check_for_invalid_template_id): Likewise.
1723         (cp_parser_skip_to_closing_parenthesis): Likewise.
1724         (cp_parser_nested_name_specifier_opt): Likewise.
1725         (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1726         (cp_parser_parameter_declaration_list): Likewise.
1727         (cp_parser_parameter_declaration): Likewise.
1728         (cp_parser_template_name): Let cp_parser_simulate_error perform
1729         the checking.
1730         (cp_parser_committed_to_tentative_parse): Remove.
1731
1732 2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
1733
1734         PR c++/18968
1735         * class.c (build_base_path): Convert the zero constant to the correct
1736         type when comparing.
1737
1738 2004-12-13  Mark Mitchell  <mark@codesourcery.com>
1739
1740         PR c++/18925
1741         * class.c (layout_class_type): Determine the visibility of static
1742         data members.
1743
1744 2004-12-12  Roger Sayle  <roger@eyesopen.com>
1745
1746         PR middle-end/12454
1747         * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1748         condition is a constant and the unexecuted clause is empty.
1749
1750 2004-12-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1751
1752         PR c++/18731
1753         * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1754
1755 2004-12-09  Matt Austern  <austern@apple.com>
1756
1757         PR c++/18514
1758         * name-lookup.c (do_nonmember_using_decl): A real function
1759         declaration takes precedence over an anticipated declaration.
1760
1761 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1762
1763         * parser.c (cp_parser_member_declaration): Fix comment typo.
1764
1765 2004-12-09  Alexandre Oliva  <aoliva@redhat.com>
1766
1767         PR c++/18757
1768         * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1769         if parsing failed.
1770
1771 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1772
1773         PR c++/18073
1774         * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1775
1776 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
1777
1778         PR c++/16681
1779         * init.c (build_zero_init): Build a RANGE_EXPR for an array
1780         initializer.
1781
1782 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
1783
1784         * typeck.c: Remove DOS line endings.
1785
1786 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1787
1788         PR c++/18100
1789         * decl.c (lookup_and_check_tag): Diagnose nested class with
1790         the same name as enclosing class.
1791
1792 2004-12-08  Nathan Sidwell  <nathan@codesourcery.com>
1793
1794         PR c++/18803
1795         * cp-tree.h (REFERENCE_REF_P): New.
1796         (CPTI_TYPE_INFO_TYPE): Rename to ...
1797         (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1798         (CPTI_TYPE_INFO_REF_TYPE): Remove.
1799         (type_info_type_node): Rename to ...
1800         (const_type_info_type_node): ... here.
1801         (type_info_ref_type): Remove.
1802         * call.c (build_user_type_conversion): Reformat.
1803         (resolve_args): Do not convert_from_reference.
1804         (build_object_call): Call convert_from_reference.
1805         (prep_operand): Do not convert_from_reference.
1806         (build_new_method_call): Likewise.
1807         * class.c (build_vfield_ref): Likewise.
1808         * cvt.c (convert_to_reference): Likewise.
1809         (convert_from_reference): Build INDIRECT_REF here, not with
1810         build_indirect_ref.
1811         (convert_force): Do not convert_from_reference.
1812         (build_expr_type_conversion): Likewise.
1813         * decl.c (grok_reference_init): Likewise.
1814         * decl2.c (delete_sanity): Likewise.
1815         * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1816         * init.c (build_dtor_call): Do not convert_from_reference.
1817         * parser.c (cp_parser_template_argument): Unwrap indirected
1818         reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1819         * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1820         convert_from_reference, if indicated.
1821         <case CALL_EXPR>: Do not convert_from_reference.
1822         <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1823         (tsubst_initializer_list): Do not convert_from_reference.
1824         * rtti.c (init_rtti_processing): Adjust node creation.
1825         (throw_bad_typeid): Use const_type_info_type_node.
1826         Do not convert_from_reference.
1827         (typeid_ok_p): Use const_type_info_type_node.
1828         (build_typeid, get_typeid): Always return type_info typed node.
1829         (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1830         * semantics.c (finish_stmt_expr_expr): Do not
1831         convert_from_reference.
1832         (finish_id_expression): Convert_from_reference as appropriate.
1833         * typeck.c (decay_conversion): Do not convert_from_reference.
1834         (finish_class_member_access_expr): Likewise.
1835         (build_indirect_ref): Use POINTER_TYPE_P.
1836         (convert_arguments): Do not convert_from_reference.
1837         (build_modify_expr): Likewise.
1838         (convert_for_initialization): Likewise.
1839         * typeck2.c (build_x_arrow): Likewise.
1840
1841 2004-12-07  Ziemowit Laski  <zlaski@apple.com>
1842
1843         * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1844         field to 'objc_info'.
1845
1846 2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
1847
1848         * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1849
1850 2004-12-07  Roger Sayle  <roger@eyesopen.com>
1851
1852         * name-lookup.c (leave_scope): We only need to update
1853         class_binding_level when leaving a class scope.
1854
1855 2004-12-06  Ziemowit Laski  <zlaski@apple.com>
1856
1857         * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1858
1859 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1860
1861         PR c++/17011, c++/17971
1862         * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1863         invalid field.
1864         (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1865         error_mark_node after member substitution.
1866         * semantics.c (finish_id_expression): Call
1867         finish_non_static_data_member for non-dependent FIELD_DECL.
1868
1869 2004-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1870
1871         PR c++/18782
1872         * decl.c (grokdeclarator): Make sure class in pointer to member is
1873         not a namespace.
1874
1875 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1876
1877         PR c++/18318
1878         * parser.c (cp_parser_new_type_id): Move array size expression
1879         checks from here ...
1880         * init.c (build_new): ... to here.
1881
1882 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1883
1884         PR c++/18758
1885         * parser.c (cp_parser_class_head): Return NULL_TREE when
1886         push_template_decl fails.  Update comment.
1887
1888 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1889
1890         PR c++/15664, c++/18276
1891         * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize.  Correctly
1892         tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1893
1894 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1895
1896         PR c++/18123
1897         * parser.c (cp_parser_type_specifier): Catch template declaration
1898         of enum.
1899
1900 2004-12-01  Matt Austern  <austern@apple.com>
1901
1902         * name-lookup.c (namespace_binding): Omit alias check for global
1903         namespace.
1904
1905 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
1906
1907         PR c++/18729
1908         * parser.c (cp_parser_class_name): Check decl's type is not
1909         error_mark_node.
1910
1911         PR c++/17431
1912         * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1913         derived to base conversion when checking constructor
1914         accessibility.
1915         (implicit_conversion): Pass FLAGS to standard_conversion.
1916         (check_constructir_callable): Disallow conversion functions.
1917
1918 2004-11-30  Kazu Hirata  <kazu@cs.umass.edu>
1919
1920         * parser.c: Fix comment typos.
1921
1922 2004-11-27  Mark Mitchell  <mark@codesourcery.com>
1923
1924         PR c++/18368
1925         * parser.c (cp_parser_check_for_definition_in_return_type): Take
1926         the defined type as a parameter, and inform the user about the
1927         possibility of a missing semicolon.
1928         (cp_parser_explicit_instantiation): Adjust call to
1929         cp_parser_check_for_definition_in_return_type.
1930         (cp_parser_init_declarator): Likewise.
1931         (cp_parser_member_declaration): Likewise.
1932
1933         PR c++/18674
1934         * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1935         typename from comments.
1936         * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1937         (TYPENAME_IS_CLASS_P): Likewise.
1938         (make_typename_type): Change prototype.
1939         * decl.c (struct_typename_info): New type.
1940         (typename_compare): Expect the second argument to be a
1941         typename_info, not a tree.
1942         (build_typename_type): Add tag_type parameter.  Do not create a
1943         new type until necessary.
1944         (make_typename_type): Add tag_type parameter.
1945         * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1946         appropriate.
1947         * friend.c (make_friend_class): Adjust call to make_typename_type.
1948         * parser.c (cp_parser_make_typename_type): Likewise.
1949         (cp_parser_primary_expression): Adjust call to
1950         cp_parser_lookup_name.
1951         (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1952         (cp_parser_class_or_namespace_name): Likewise.
1953         (cp_parser_postfix_expression): Adjust calls to
1954         make_typename_type.
1955         (cp_parser_mem_initializer_id): Adjust calls to
1956         cp_parser_class_name.
1957         (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1958         (cp_parser_template_name): Likewise.
1959         (cp_parser_template_argument): Likewise.
1960         (cp_parser_type_name): Adjust call to cp_parser_class_name.
1961         (cp_parser_elaborated_type_specifier): Adjust calls to
1962         make_typename_type and cp_parser_lookup_name.
1963         (cp_parser_namespace_name): Likewise.
1964         (cp_parser_class_name): Replace type_p parameter with tag_type.
1965         Adjust calls to make_typename_type and cp_parser_lookup_name.
1966         (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1967         (cp_parser_base_specifier): Likewise.
1968         (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1969         Adjust calls to make_typename_type and lookup_qualified_name.
1970         (cp_parser_lookup_name_simple): Adjust call to
1971         cp_parser_lookup_name.
1972         (cp_parser_constructor_declarator_p): Adjust call to
1973         cp_parser_class_name.
1974         * pt.c (convert_template_argument): Adjust all to
1975         make_typename_type.
1976         (tsubst_decl): Do not pre-substitute the type of the declaration.
1977         (tsubst): Hand off declarations more quickly.  Adjust call to
1978         make_typename_type.
1979
1980         PR c++/18512
1981         * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1982
1983 2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
1984
1985         PR c/7544
1986         * Make-lang.in (cp/decl2.o): Update dependencies.
1987         * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1988
1989 2004-11-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1990
1991         PR c++/18652
1992         * name-lookup.c (pushtag): Change return type to tree.
1993         * cp-tree.h (pushtag): Adjust declaration.
1994         * decl.c (xref_tag, start_enum): Use return value of pushtag.
1995         * pt.c (push_template_decl_real): Return immediately if
1996         pushdecl_namespace_level returns error_mark_node.
1997
1998 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
1999
2000         * pt.c: Fix a comment typo.
2001
2002 2004-11-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2003
2004         Friend class name lookup 4/n
2005         * class.c (pushclass): Don't call cxx_remember_type_decls.
2006         * cp-tree.h (clear_anon_tags): Remove declaration.
2007         * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2008         * name-lookup.c (binding_entry_free, binding_table_free): Comment
2009         out functions.
2010         (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2011         binding_table_remove_anonymous_types, cxx_remember_type_decls,
2012         bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2013         lookup_tag_reverse): Remove
2014         (begin_scope, leave_scope, kept_level_p, print_binding_level):
2015         Don't use type_decls field in cp_binding_level.
2016         (maybe_process_template_type_declaration, pushtag): Set
2017         CLASSTYPE_NESTED_UTDS directly.
2018         * name-lookup.h (binding_table_remove_anonymous_types,
2019         cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2020         declaration.
2021         (cp_binding_level): Remove type_decls field.
2022
2023 2004-11-26  Kazu Hirata  <kazu@cs.umass.edu>
2024
2025         * typeck.c: Fix a comment typo.
2026
2027 2004-11-25  Mark Mitchell  <mark@codesourcery.com>
2028
2029         PR c++/18445
2030         * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2031         unknown_type as non matching.  Tidy up.
2032         * pt.c (build_non_dependent_expr): Do not build a
2033         NON_DEPENDENT_EXPR for a VAR_DECL.
2034
2035         PR c++/18001
2036         * cp-tree.h (lvalue_or_else): Remove declaration.
2037         * tree.c (lvalue_or_else): Remove.
2038         * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2039         (build_modify_expr): Likewise.
2040
2041         PR c++/18625
2042         * decl.c (duplicate_decls): Return error_mark_node on error, as
2043         specified.
2044
2045         PR c++/18466
2046         * decl.c (grokvardecl): Keep track of whether or not a there was
2047         explicit qualification.
2048         * name-lookup.c (set_decl_namespace): Complain about explicit
2049         qualification of a name within its own namespace.
2050
2051         PR c++/18545
2052         * typeck.c (check_return_expr): Robustify.
2053
2054 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2055
2056         Friend class name lookup 3/n, PR c++/3332
2057         * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2058         (lookup_type_scope): Don't deal with name from user declaration
2059         specially.
2060         * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2061         * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2062         pop_inner_scope.
2063
2064 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2065
2066         Friend class name lookup 2/n, PR c++/14513, c++/15410
2067         * name-lookup.c (lookup_name_real): Simplify.
2068         (lookup_type_scope): Add SCOPE parameter.  Handle friend class
2069         lookup.
2070         * name-lookup.h (tag_scope): New enum type.
2071         (lookup_type_scope): Adjust declaration.
2072         * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2073         Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2074         (start_enum): Likewise.  Add assertion test that NAME is
2075         IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
2076         case of error.
2077         * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2078         * parser.c (cp_parser_elaborated_type_specifier,
2079         cp_parser_class_head): Adjust call to xref_tag.
2080         * pt.c (lookup_template_class, instantiate_class_template):
2081         Likewise.
2082         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2083         tinfo_base_init, emit_support_tinfos): Likewise.
2084
2085 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2086
2087         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2088
2089 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
2090
2091         PR c++/17473
2092         * name-lookup.c (supplement_binding): Do not allow typedefs to be
2093         redefined in class scope.
2094
2095         PR c++/18285
2096         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2097         redefinitions of builtin types other that "bool" or "wchar_t".
2098
2099 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2100
2101         * decl.c (cxx_init_decl_processing): Don't clear
2102         flag_inline_functions.
2103
2104 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
2105
2106         * pt.c (tsubst_function_type): Do not permit function types which
2107         return arrays or functions.
2108
2109         PR c++/18586
2110         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2111
2112         PR c++/18530
2113         * cp-tree.h (CTOR_NAME): Remove.
2114         (DTOR_NAME): Remove.
2115         * decl.c (initialize_predefined_identifiers): Add spaces to the
2116         end of constructor and destructor names.
2117
2118 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2119
2120         PR c++/8929
2121         * decl.c (start_decl): Check for invalid specialization headers.
2122
2123 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
2124
2125         PR c++/16882
2126
2127         * call.c (standard_conversion): Move check for conversions between
2128         vector pointers...
2129         * typeck.c (ptr_reasonably_similar): ... here.
2130
2131 2004-11-23  Ben Elliston  <bje@au.ibm.com>
2132
2133         * cp-tree.h (context_as_string): Remove extern.
2134         * error.c (context_as_string): Remove.
2135
2136         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2137         * lex.c (cp_type_qual_from_rid): Remove.
2138
2139         * cp-tree.h (do_poplevel): Remove extern.
2140         (check_multiple_declarators): Likewise.
2141         * semantics.c (do_poplevel): Make static.
2142         (check_multiple_declarators): Remove.
2143
2144         * cp-tree.h (check_final_overrider): Remove extern.
2145         * search.c (check_final_overrider): Make static.
2146
2147         * cp-tree.h (build_artificial_parm): Remove extern.
2148         * decl2.c (build_artificial_parm): Make static.
2149
2150 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2151
2152         PR c++/18354
2153         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2154         Make sure the result is always a rvalue.
2155
2156 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2157
2158         * decl.c (start_preparsed_function): Call check_function_type even
2159         in templates.
2160         (require_complete_types_for_parms): Skip dependent types.
2161         (check_function_type): Likewise.
2162
2163 2004-11-16  Steven Bosscher  <stevenb@suse.de>
2164
2165         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2166         * search.c: Don't include it.
2167
2168 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
2169
2170         * cp-gimplify.c: Include pointer-set.h
2171         (cp_genericize_r): Use pointer_sets instead of a hashtable.
2172         Also instert the new statement for CLEANUP_STMT.
2173         (cp_genericize): Use pointer_sets instead of a hashtable.
2174         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2175
2176 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2177
2178         Friend class name lookup 1/n, PR c++/18471
2179         * decl.c (lookup_and_check_tag): New function.
2180         (xref_tag, start_enum): Use it.
2181         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2182         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
2183         location.
2184         * name-lookup.c (lookup_name_current_level): Rename to ...
2185         (lookup_name_innermost_nonclass_level): ... this.
2186         (lookup_type_scope): New function.
2187         * name-lookup.h (lookup_name_current_level): Rename to ...
2188         (lookup_name_innermost_nonclass_level): ... this.
2189         (lookup_type_scope): Add declaration.
2190
2191 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2192
2193         PR c++/17344
2194         * pt.c (coerce_template_parms): Only emit error message about
2195         invalid template argument when TF_ERROR.
2196
2197 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
2198
2199         PR c++/18389
2200         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
2201         error_mark_node to indicate errors.
2202
2203         PR c++/18429
2204         * parser.c (cp_parser_direct_declarator): Disallow non-constant
2205         array bounds when not inside a function.
2206
2207         PR c++/18436
2208         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2209         unqualified name resolves to a member function.
2210
2211         PR c++/18407
2212         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2213         derived class correctly.
2214
2215         * decl2.c (import_export_decl): Fix typo in comment.
2216         * tree.c (pod_type_p): Likewise.
2217
2218 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
2219
2220         * typeck.c (cxx_mark_addressable): Add braces around the first if.
2221
2222 2004-11-10  Adam Nemet  <anemet@lnxw.com>
2223
2224         PR middle-end/18160
2225         * typeck.c (cxx_mark_addressable): Issue an error if address of an
2226         explicit register variable is requested.
2227
2228 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
2229
2230         PR c++/18143
2231         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2232         (struct lang_decl_flags): Add thunk_p flag.
2233         (struct lang_decl): Remove separate fixed_offset. Place
2234         cloned_function and fixed_offset into union.
2235         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2236         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2237         (THUNK_FIXED_OFFSET): Adjust.
2238         * method.c (make_thunk): Adjust.
2239
2240 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
2241
2242         PR c++/18369
2243         * init.c (build_new_1): Handle parenthesized type-ids that name an
2244         array type.  Tidy.
2245
2246 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2247
2248         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2249         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2250         quoting in diagnostics.
2251         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2252         quoting in printf format.
2253         * decl.c (duplicate_decls, start_decl): Use %qD instead of
2254         unquoted %D.
2255
2256 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
2257
2258         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2259         search.c, typeck2.c: Fix comment formatting.
2260
2261 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
2262
2263         PR tree-optimization/18184
2264         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2265         of different modes or alias-all flags as equivalent.
2266         * typeck.c (comptypes): Likewise.
2267
2268 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2269
2270         DR 49, 100
2271         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2272         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2273         TYPE_REFFN_P): Document.
2274         (fold_decl_constant_value): New prototype.
2275         * pt.c (convert_nontype_argument_function): Rewrite and extract
2276         parts into...
2277         (fold_decl_constant_value, convert_nontype_argument_function): New.
2278         (lookup_template_class): Add comment about useless double call.
2279         * mangle.c (write_expression): Strip conversions before lowering
2280         pointer to members.
2281         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2282         enum to enum conversion.
2283
2284 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
2285
2286         PR c++/18124
2287         * parser.c (cp_parser_type_parameter): Robustify.
2288
2289         PR c++/18155
2290         * parser.c (cp_parser_single_declaration): Disallow template
2291         typedefs.
2292
2293         PR c++/18177
2294         * typeck.c (build_const_cast): Use error_operand_p.
2295
2296 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
2297
2298         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2299         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2300         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2301         from cp-lang.c.
2302         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2303         from cp-lang.c.
2304         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2305
2306 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
2307
2308         PR c++/18064
2309         * search.c (check_final_overrider): Deprecate gnu covariant extension.
2310
2311 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2312
2313         Convert diagnostics to use quoting flag q 9/n
2314         * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2315         get_delta_difference):  Use new quotation style.
2316         * repo.c (reopen_repo_file_for_write): Likewise.
2317         * pt.c (do_type_instantiation): Likewise.
2318         * parser.c (cp_parser_diagnose_invalid_type_name):
2319         * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2320         * error.c (cp_print_error_function,
2321         print_instantiation_full_context): Likewise.
2322         * decl.c (define_label, grok_reference_init,
2323         maybe_deduce_size_from_array_init, revert_static_member_fn):
2324         * decl2.c (check_classfn): Likewise.
2325         * class.c (add_method, check_field_decls, layout_class_type,
2326         resolve_address_of_overloaded_function): Likewise.
2327         * call.c (build_x_va_arg, build_over_call): Likewise.
2328
2329 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2330
2331         Convert diagnostics to use quoting flag q 8/n
2332         * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2333         convert_to_reference, ocp_convert, convert_to_void
2334         cp_convert_to_pointer): Use new quotation style.
2335
2336 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
2337
2338         PR c++/15172
2339         * typeck2.c (store_init_value): Use split_nonconstant_init even
2340         for types that require construction.
2341
2342 1004-10-28  Matt Austern  <austern@apple.com>
2343
2344         PR c++/17542
2345         * cp-tree.h (class_key_or_enum_as_string): Declare.
2346         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2347         and remove static qualifier.
2348         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2349         union/enum declaration.
2350
2351 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
2352
2353         * pt.c: Fix a comment typo.
2354
2355 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
2356
2357         * typeck.c (composite_pointer_type): Remove comment about DR 195.
2358         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2359         warning when being pedantic.
2360         (build_reinterpet_cast, build_c_cast): Adjust.
2361
2362 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
2363
2364         PR c++/17695
2365         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2366         appear in a constructor/destructor that will be cloned.
2367
2368 1004-10-28  Matt Austern  <austern@apple.com>
2369
2370         PR c++/14124
2371         * decl.c (finish_enum): Handle packed attribute.
2372         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2373
2374 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
2375
2376         PR c++/17132
2377         * pt.c (instantiate_class_template): Increment
2378         processing_template_decl when substituting into a member class
2379         template.
2380
2381 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
2382
2383         PR c++/17435
2384         * call.c (convert_like_real): Fix formatting.
2385         (initialize_reference): When binding a temporary to a base class,
2386         ensure that the nominal copy made is to the derived class, not the
2387         base class.
2388
2389         PR c++/18140
2390         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2391         include ">>".
2392
2393 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2394
2395         * decl.c (bad_specifiers): Move the q after the %.
2396
2397 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2398
2399         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2400         the %.
2401
2402 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
2403
2404         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2405         * search.c (current_scope): Fix prototype.
2406
2407         PR c++/18093
2408         * search.c (current_scope): Return the innermost non-block scope,
2409         not the innermost non-block, non-namespace scope.
2410         (at_namespace_scope_p): Adjust accordingly.
2411         (dfs_accessible_post): Do not pass namespaces to is_friend.
2412         (dfs_walk_once_accessible_r): Likewise.
2413         * decl.c (grokvardecl): Adjust call to current_scope.
2414         (build_enumerator): Likewise.
2415         * parser.c (cp_parser_using_declaration): Likewise.
2416         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2417         current_scope.
2418         (cp_parser_class_head): Adjust call to current_scope.
2419         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2420         alias.
2421
2422         PR c++/18020
2423         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2424         their underlying values.
2425
2426         PR c++/18161
2427         * typeck.c (build_binary_op): Honor build_type, even when in a
2428         template.
2429
2430 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
2431
2432         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2433         padding token checking.
2434
2435 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
2436
2437         PR c++/18121
2438         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2439         layout_type as it is already done by create_array_type_for_decl.
2440
2441 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
2442
2443         PR c++/18095
2444         * parser.c (eof_token): Make const, correctly initialize rid and
2445         location fields.
2446         (struct cp_lexer): Replace buffer_end pointer with buffer_length
2447         count. Adjust.
2448         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
2449         zero it out.
2450         (cp_lexer_new_from_tokens): Adjust.
2451         (cp_lexer_grow_buffer): Remove.
2452         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2453         cp_lexer_purge_token): Add const casts.
2454
2455 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
2456
2457         PR c++/18073
2458         PR c++/10841
2459         * cp-tree.h (convert_to_base): Change prototype.
2460         (build_ptrmemfunc): Likewise.
2461         (convert_ptrmem): New function.
2462         * call.c (struct conversion): Adjust documentation for base_p.
2463         (standard_conversion): Set base_p for ck_pmem conversions as
2464         appropriate.
2465         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2466         conversions.
2467         * class.c (convert_to_base): Handle both pointers and objects.
2468         Add nonnull parameter.
2469         (build_vfield_ref): Adjust call to convert_to_base.
2470         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2471         (convert_force): Likewise.
2472         * typeck.c (build_unary_op): Likewise.
2473         (convert_ptrmem): New function.
2474         (build_static_cast_1): Use it.
2475         (build_reinterpret_cast): Allow conversions to vector types.
2476         (get_delta_difference): Add c_cast_p parameter.
2477         (build_ptrmemfunc): Likewise.  Adjust calls to
2478         get_delta_difference.
2479
2480 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
2481
2482         PR c++/13560
2483         * error.c (cp_error_at): Output the context as it might be
2484         different file as the other location.
2485
2486 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
2487
2488         * typeck.c: Fix a comment typo.
2489
2490 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2491
2492         PR c++/13495
2493         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2494         * cp-tree.h (make_unbound_class_template): Adjust prototype.
2495         * parser.c (cp_parser_lookup_name): Adjust call to
2496         make_unbound_class_template.
2497         (cp_parser_single_declaration): Handle member class of class
2498         template as template friend parsing correctly.
2499         * friend.c (is_friend): Call is_specialization_of_friend for
2500         template friend class.
2501         (make_friend_class): Handle member class of class template as
2502         template friend.
2503         * pt.c (is_specialization_of_friend): Likewise.
2504         (instantiate_class_template): Likewise.
2505         (tsubst): Adjust call to make_unbound_class_template.
2506
2507 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2508
2509         * typeck.c (composite_pointer_type): Add comment about DR 195
2510         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2511         Allow function pointer conversions that DR195 suggests.
2512         (build_reinterpret_cast, build_c_cast): Update
2513         build_reinterpret_cast_1 calls.
2514
2515 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
2516
2517         * call.c, typeck.c: Fix comment typos.
2518
2519 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2520
2521         * parser.c (cp_token_position): New typedef. Define VEC thereof.
2522         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2523         next_token and last_token cp_token_position. Make saved_tokens a
2524         VEC(cp_token_position).
2525         (eof_token): New static variable.
2526         (CP_SAVED_TOKENS_SIZE): Rename to ...
2527         (CP_SAVED_TOKEN_STACK): ... here.
2528         (cp_lexer_new_main): Adjust main lexer creation and buffer
2529         filling.
2530         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2531         to the parent buffer.  Do not append eof token.
2532         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2533         stack.
2534         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2535         (cp_lexer_token_position, cp_lexer_token_at): New.
2536         (cp_lexer_saving_tokens): Adjust. Make inline.
2537         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2538         (cp_lexer_peek_token_emit_debug_info): Fold into ...
2539         (cp_lexer_peek_token): ... here.
2540         (cp_lexer_peek_nth_token): Don't peek past EOF.
2541         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2542         EOF.
2543         (cp_lexer_purge_token): Adjust eof setting.
2544         (cp_lexer_purge_tokens_after): Likewise.
2545         (cp_lexer_save_tokens): Push next_token directly.
2546         (cp_lexer_commit_tokens): Adjust.
2547         (cp_lexer_rollback_tokens): Pop next_token directly.
2548         (cp_parser_check_for_invalid_template_id): Adjust token purging.
2549         (cp_parser_translation_unit): Do not consume the EOF.
2550         (cp_parser_nested_name_specifier_opt): Adjust token purging.
2551         (cp_parser_template_id, cp_parser_template_name): Likewise.
2552
2553 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
2554
2555         PR c++/14035
2556         * call.c (struct conversion): Add base_p.
2557         (convert_like): Add c_cast_p argument.
2558         (convert_like_with_conversion): Likewise.
2559         (build_conv): Clear base_p.
2560         (standard_conversion): Set it, for derived-to-base conversions.
2561         (convert_like_real): Add c_cast_p parameter.  Handle pointer
2562         conversions directly rather than relying on ocp_convert.
2563         (perform_direct_initialization_if_possible): Add c_cast_p
2564         parameter.
2565         * cp-tree.h (perform_direct_initialization_if_possible): Change
2566         prototype.
2567         (convert_member_func_to_ptr): New function.
2568         * typeck.c (check_for_casting_away_constness): Add diag_fn
2569         parameter.
2570         (build_static_cast_1): New function, split out from ...
2571         (build_static_cast): ... here.  Use build_static_cast_1.
2572         (build_reinterpret_cast_1): New function, split out from ...
2573         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
2574         (build_const_cast_1): New function, split out from ...
2575         (build_const_cast): ... here.  Use build_const_cast_1.
2576         (build_c_cast): Rewrite to use build_const_cast_1,
2577         build_static_cast_1, and build_reinterpret_cast_1.
2578         (convert_member_func_to_ptr): New function.
2579
2580 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
2581
2582         PR c++/18047
2583         * parser.c (enum cp_parser_prec): Give relational expressions
2584         a higher precedence than equality expressions.
2585
2586 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
2587
2588         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2589         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2590         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2591         (enum base_access): Reorganize.
2592         (accessible_base_p, accessible_p): Add consider_local_p parameter.
2593         * call.c (standard_conversion): Update comment about
2594         DERIVED_FROM_P.
2595         (enforce_access): Adjust accessible_p call.
2596         (build_over_call): Adjust accessible_base_p call.
2597         * class.c (convert_to_base): Adjust lookup_base call.
2598         (build_vtbl_ref_1): Likewise.
2599         (warn_about_ambiguous_bases): Likewise. Add early exit.
2600         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2601         * search.c (accessible_base_p): Add consider_local_p parameter.
2602         (lookup_base): Pass consider_local_p to accessible_base_p call.
2603         (friend_accessible_p): Check whether scope is a class member.
2604         Remove unnecessary class template check.
2605         (accessible_p): Add consider_local_p parameter. Use it.
2606         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2607         * tree.c (maybe_dummy_object): Likewise.
2608         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2609         (build_class_member_access_expr): Adjust lookup_base call.
2610         * typeck2.c (binfo_or_else): Likewise.
2611         * rtti.c (build_dynamic_cast_1): Access can consider friendship
2612         and current scope.
2613
2614 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2615
2616         PR c++/17743
2617         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2618
2619 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2620
2621         PR c++/10479
2622         * parser.c (cp_parser_parenthesized_expression_list): Fold
2623         non-dependent expressions in attribute lists.
2624
2625 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
2626
2627         PR c++/17042
2628         * decl.c (declare_global_var): Use the return value from pushdecl.
2629
2630         PR c++/14667
2631         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2632         type names if we have already found a valid type.
2633         (cp_parser_member_declaration): Likewise.
2634
2635         PR c++/17916
2636         * parser.c (cp_parser_member_specification_opt): Handle
2637         CPP_PRAGMA.
2638
2639 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2640
2641         * dump.c, g++spec.c, repo.c: Update copyright.
2642
2643 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2644
2645         * decl.c: Fix a comment typo.
2646
2647 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2648
2649         PR c++/16301
2650         * name-lookup.c (parse_using_directive): If we have a
2651         error_mark_node, do not set the decl namespace associations
2652         on it.
2653
2654 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
2655
2656         PR c++/17976
2657         * decl.c (cp_finish_decl): Do not call expand_static_init more
2658         than once for a single variable.
2659
2660 2004-10-14  Matt Austern  <austern@apple.com>
2661
2662         * Make-lang.in (pt.o): depends on pointer-set.h
2663         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2664         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2665         (for_each_template_parm): Convert from htab_t to pointer_set_t.
2666         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2667
2668 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2669
2670         PR c++/17661
2671         * semantics.c (finish_for_expr): Convert expression to void
2672         so that we don't create temporaries for a?b:c.
2673
2674 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
2675
2676         * search.c: Fix a comment typo.
2677
2678 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2679
2680         * class.c (dfs_modify_vtables): Simplify condition. Return
2681         dfs_skip_bases as appropriate.
2682         (modify_all_vtables): Walk in pre-order.
2683         * search.c (dfs_walk_all, dfs_walk_once_r,
2684         dfs_walk_once_accessible_r): Assert post order function never
2685         returns dfs_skip_bases.
2686
2687         * search.c (struct lookup_base_data_s): New.
2688         (lookup_base_r): Replace with ...
2689         (dfs_lookup_base): ... this.
2690         (lookup_base): Use dfs_walk_all.
2691
2692 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
2693
2694         * search.c: Fix comment typos.
2695
2696 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
2697
2698         PR c++/15786
2699         * parser.c (cp_parser_declarator): Add member_p parameter.
2700         (cp_parser_condition): Adjust calls to cp_parser_declarator.
2701         (cp_parser_explicit_instantiation): Likewise.
2702         (cp_parser_init_declarator): Likewise.
2703         (cp_parser_direct_declarator): Add member_p parameter.  Do not
2704         parse tentatively when parsing the parameters to a member.
2705         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2706         (cp_parser_parameter_declaration): Likewise.
2707         (cp_parser_member_declaration): Likewise.
2708         (cp_parser_exception_declaration): Likewise.
2709
2710         PR c++/17936
2711         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2712         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2713         for members of partial or explicit specializations.
2714
2715         PR c++/17929
2716         * decl2.c (finish_anon_union): Robustify.
2717
2718 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
2719
2720         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2721         (dcast_base_hint): ... here.
2722         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2723         * search.c (struct dcast_data_s): New.
2724         (dynamic_cast_base_recurse): Remove. Replace with ...
2725         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2726         (get_dynamic_cast_base_type): Rename to ...
2727         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
2728         (accessible_r): Remove.
2729         (dfs_accessible_post): New, broken out of accessible_r.
2730         (accessible_p): Use dfs_walk_once_accessible.
2731         (dfs_walk_once_accessible_r): New. From accessible_r.
2732         (dfs_walk_once_accessible): New. From acessible_p.
2733
2734         * cp-tree.h (SAME_BINFO_TYPE_P): New.
2735         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2736         binfo types.
2737         (convert_to_base_statically, determine_primary_bases,
2738         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2739         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2740         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2741         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2742         * init.c (expand_member_init): Likewise.
2743         * search.c (lookup_base_r, dynamic_cast_base_recurse,
2744         binfo_via_virtual, copied_binfo, binfo_for_vbase,
2745         original_binfo): Likewise.
2746         * tree.c (copy_binfo): Likewise.
2747
2748 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
2749
2750         * semantics.c: Fix comment typos.
2751
2752 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2753
2754         PR c++/17554
2755         part of c++/17657
2756         middle-end/17703
2757         * semantics.c (maybe_cleanup_point_expr): Call
2758         fold_build_cleanup_point_expr.
2759         (maybe_cleanup_point_expr_void): New function.
2760         (add_decl_expr): Call maybe_cleanup_point_expr_void.
2761         (finish_expr_stmt): Likewise.
2762         (finish_return_stmt): Likewise.
2763         (finish_for_expr): Likewise.
2764         (finish_asm_stmt): Likewise.
2765         * typeck.c (condition_conversion): Call
2766         fold_build_cleanup_point_expr.
2767
2768 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2769
2770         PR c++/17907
2771         * semantics.c (add_decl_expr): If the decl has a size which
2772         has side effects then the decl expression needs a cleanup point.
2773
2774 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
2775
2776         PR c++/17393
2777         * decl.c (grokdeclarator): Robustify error-recovery on invalid
2778         declarations.
2779
2780 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2781
2782         Convert diagnostics to use quoting flag q 7/n
2783         * typeck.c (composite_pointer_type_r, composite_pointer_type,
2784         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2785         string_conv_p, build_class_member_access_expr,
2786         build_class_member_access_expr, lookup_destructor,
2787         finish_class_member_access_expr, build_indirect_ref,
2788         get_member_function_from_ptrfunc, build_function_call,
2789         convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2790         check_for_casting_away_constness, build_static_cast,
2791         build_reinterpret_cast, build_const_cast, build_c_cast,
2792         build_modify_expr, get_delta_difference, build_ptrmemfunc,
2793         dubious_conversion_warnings, convert_for_assignment,
2794         convert_for_initialization,
2795         maybe_warn_about_returning_address_of_local, check_return_expr):
2796         Use quoting marks.
2797
2798         * typeck2.c (error_not_base_type, readonly_error,
2799         abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2800         store_init_value, digest_init, build_x_arrow,
2801         build_m_component_ref, require_complete_eh_spec_types): Likewise.
2802
2803         * tree.c (cp_build_qualified_type_real,
2804         handle_java_interface_attribute, handle_init_priority_attribute):
2805         Likewise.
2806
2807         * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2808         finish_pseudo_destructor_expr,
2809         check_template_template_default_arg, begin_class_definition,
2810         finish_base_specifier, qualified_name_lookup_error,
2811         finish_id_expression, finish_typeof): Likewise.
2812
2813         * search.c (lookup_base, check_final_overrider,
2814         look_for_overrides_r): Likewise.
2815
2816         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2817
2818 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
2819
2820         PR c++/17867
2821         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2822         constructor.
2823
2824         PR c++/17670
2825         * init.c (build_new): Correct comments.
2826         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2827         the non-array case.
2828
2829         PR c++/17821
2830         * parser.c (cp_parser_postfix_dot_deref_expression): If the
2831         pseduo-destructor-name production does not work, fall back to the
2832         ordinary production.
2833
2834         PR c++/17826
2835         * tree.c (cp_tree_equal): Handle a BASELINK.
2836
2837         PR c++/17524
2838         * cp-tree.h (check_var_type): New function.
2839         * decl.c (check_var_type): New function, split out from ...
2840         (grokdeclarator): ... here.
2841         * pt.c (tsubst_decl): Use check_var_type.
2842
2843         PR c++/17685
2844         * decl.c (grokdeclarator): Disallow declarations of operators as
2845         non-functions.
2846
2847 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2848
2849         PR c++/17868
2850         * error.c (dump_expr): Add missing case for RDIV_EXPR.
2851
2852 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
2853
2854         * pt.c, search.c: Fix comment typos.
2855
2856 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
2857
2858         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2859         unmarkedp): Remove.
2860         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2861         * class.c (struct find_final_overrider_data): Remove most_derived,
2862         vpath_list and vpath fields.  Add path field.
2863         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2864         (dfs_find_final_overrider): Rename to ...
2865         (dfs_find_final_overrider_pre): ... here. Adjust.
2866         (dfs_find_final_overrider_post): Adjust.
2867         (dfs_find_final_overrider_q): Fold into
2868         dfs_find_final_overrider_pre.
2869         (find_final_overrider): Adjust dfs searching.
2870         (dfs_modify_vtables): Don't mark binfo here.
2871         (modify_all_vtables): Use dfs_walk_once.
2872         (build_vtt_inits): Likwise. Use dfs_walk_all.
2873         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2874         Return dfs_skip_bases as appropriate.
2875         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2876         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2877         appropriate. Don't mark binfo here.
2878         (initialize_vtbl_ptrs): Use dfs_walk_once.
2879         * search.c (struct vbase_info): Remove unused struct.
2880         (access_in_type): Use dfs_walk_once.
2881         (dfs_access_in_type): Don't mark binfo here.
2882         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2883         Fold into ...
2884         (accessible_r): ... here. New. Specialize dfs_walk_once.
2885         (accessible_p): Use accessible_r.
2886         (lookup_field_queue_p): Remove. Fold into ...
2887         (lookup_field_r): ... here. Adjust.
2888         (lookup_member): Use dfs_walk_all.
2889         (dfs_walk_real, dfs_walk): Replace with ...
2890         (dfs_walk_all, dfs_walk_once): ... these.
2891         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2892         (dfs_unmark, unmarkedp, markedp): Remove.
2893         (dfs_get_pure_virtuals): Don't mark binfo here.
2894         (get_pure_virtuals): Use dfs_walk_once.
2895         (dfs_debug_unmarked_p): Remove. Fold into ...
2896         (dfs_debug_mark): ... here.
2897         (note_debug_info_needed): Use dfs_walk_all.
2898
2899 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2900
2901         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2902         CLEANUP_POINT_EXPR to get the asm expression.
2903
2904 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
2905
2906         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2907         (DECL_MEMBER_TEMPLATE_P): New macro.
2908         (is_member_template): Remove.
2909         (class_method_index_for_fn): New function.
2910         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2911         * class.c (finish_struct_methods): Remove out-of-date comment.
2912         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2913         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2914         class_method_index_for_fn.
2915         * pt.c (is_member_template): Remove.
2916         (is_member_template_class): Likewise.
2917         (optimize_specialization_lookup_p): New function.
2918         (retrieve_specialization): Optimize lookups for members that are
2919         not member templates.
2920         (register_specialization): Adjust accordingly.
2921         (build_template_decl): Add member_template_p parameter.  Set
2922         DECL_MEMBER_TEMPLATE_P.
2923         (process_partial_specialization): Adjust call to
2924         retrieve_specialization.
2925         (push_template_decl_real): Determine whether the template is a
2926         member template.
2927         (lookup_template_class): Use retrieve_specialization.
2928         (tsubst_decl): Adjust call to retrieve_specialization.
2929         (tsubst_exception_specification): New function.
2930         (tsubst): Use it.
2931         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2932         (instantiate_template): Adjust call to retrieve_specialization.
2933         (regenerate_decl_from_template): Do not actually generate a new
2934         DECL.
2935         (instantiate_decl): Adjust call to retrieve_specialization.
2936         (class_method_index_for_fn): New method.
2937
2938 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2939
2940         * parser.c (cp_parser_asm_definition): Look passed the
2941         CLEANUP_POINT_EXPR to get the asm expression.
2942
2943 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
2944
2945         PR c++/17368
2946         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2947         also.
2948
2949 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2950
2951         Convert diagnostics to use quoting flag q 6/n
2952         * pt.c (finish_member_template_decl, check_specialization_scope,
2953         maybe_process_partial_specialization, determine_specialization,
2954         check_explicit_specialization, maybe_check_template_type,
2955         process_partial_specialization, check_default_tmpl_args,
2956         push_template_decl_real, redeclare_class_template,
2957         convert_nontype_argument, coerce_template_parms,
2958         lookup_template_class, push_tinst_level,
2959         instantiate_class_template, tsubst_arg_types,
2960         tsubst_function_type, tsubst, tsubst_qualified_id,
2961         tsubst_copy_and_build, check_instantiated_args,
2962         do_decl_instantiation, do_type_instantiation,
2963         invalid_nontype_parm_type_p, check_specialization_namespace,
2964         convert_template_argument, determine_specialization,
2965         check_template_shadow, tsubst_decl
2966         instantiate_pending_templates): Use quoting marks.
2967
2968 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
2969
2970         PR c++/17829
2971         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2972         unqualified lookup finds a member function.
2973
2974 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2975
2976         Convert diagnostics to use quoting flag q 5/n
2977         * parser.c (cp_parser_name_lookup_error,
2978         cp_parser_diagnose_invalid_type_name,
2979         cp_parser_primary_expression, cp_parser_unqualified_id,
2980         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2981         cp_parser_jump_statement, cp_parser_simple_declaration,
2982         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2983         cp_parser_type_parameter, cp_parser_template_id,
2984         cp_parser_template_name, cp_parser_direct_declarator,
2985         cp_parser_parameter_declaration_list, cp_parser_class_head,
2986         cp_parser_base_specifier, cp_parser_lookup_name,
2987         cp_parser_late_parsing_default_args,
2988         cp_parser_optional_template_keyword
2989         cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2990         cp_parser_check_access_in_redeclaration): Use quoting marks.
2991
2992         * name-lookup.c (supplement_binding, pushdecl,
2993         check_for_out_of_scope_variable, validate_nonmember_using_decl,
2994         do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2995         push_namespace, do_namespace_alias, do_using_directive,
2996         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2997
2998         * method.c (use_thunk): Likewise.
2999
3000         * lex.c (unqualified_name_lookup_error,
3001         unqualified_fn_lookup_error): Likewise.
3002
3003 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3004
3005         Convert diagnostics to use quoting flag q 4/n
3006         * except.c (decl_is_java_type, build_throw,
3007         is_admissible_throw_operand, check_handlers_1, check_handlers):
3008         Use quoting formats.
3009         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3010         * init.c (sort_mem_initializers, emit_mem_initializers,
3011         member_init_ok_or_else, expand_member_init, is_aggr_type,
3012         build_offset_ref, build_java_class_ref): Likewise.
3013
3014 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3015
3016         Convert diagnostics to use quoting flag q 3/n
3017         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3018         redeclaration_error_message, lookup_label, check_goto,
3019         make_typename_type, make_unbound_class_template,
3020         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3021         grok_reference_init, layout_var_decl, maybe_commonize_var,
3022         check_for_uninitialized_const_var, reshape_init_array,
3023         reshape_init, check_initializer, cp_finish_decl,
3024         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3025         check_static_variable_definition, compute_array_index_type,
3026         create_array_type_for_decl, check_special_function_return_type,
3027         grokdeclarator, check_default_argument, grokparms,
3028         grok_ctor_properties, grok_op_properties,
3029         check_elaborated_type_specifier, xref_tag, finish_enum,
3030         build_enumerator, check_function_type, start_preparsed_function,
3031         store_parm_decls): Use quoting formats.
3032         * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3033         check_java_method, check_classfn, finish_static_data_member_decl,
3034         grokfield, grokbitfield, grok_function_init,
3035         build_anon_union_vars, coerce_new_type, coerce_delete_type,
3036         check_default_args): Likewise.
3037         * parser.c (cp_parser_decl_specifier_seq): Likewise.
3038
3039 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3040
3041         Convert diagnostics to use quoting flag q 2/n
3042         * class.c (build_base_path, add_method, alter_access,
3043         handle_using_decl, check_bases,
3044         maybe_warn_about_overly_private_class, find_final_overrider,
3045         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3046         check_bitfield_decl, check_field_decls, layout_empty_base,
3047         build_base_field, check_methods, layout_virtual_bases,
3048         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3049         resolve_address_of_overloaded_function, instantiate_type,
3050         note_name_declared_in_class): Use format flag "q" for quoting.
3051
3052 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3053
3054         Convert diagnostics to use quoting flag q 1/n
3055         * error.c (locate_error): Ignore quoting flag q.
3056         * call.c (build_user_type_conversion_1, build_operator_new_call,
3057         build_object_call, op_error, build_conditional_expr,
3058         build_new_op, build_op_delete_call, enforce_access,
3059         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3060         convert_default_arg, build_over_call, build_new_method_call,
3061         joust, perform_implicit_conversion, initialize_reference): Use the
3062         quoting flag q.
3063
3064 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
3065
3066         PR c++/17797
3067         * typeck.c (build_reinterpret_cast): Return if the inner type
3068         is error_mark_node.
3069
3070 2004-10-01  Jan Hubicka  <jh@suse.cz>
3071
3072         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3073
3074 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3075
3076         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3077         turning operator_code and fixed_offset into bitfields.
3078
3079 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
3080
3081         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3082
3083 2004-09-29  Jason Merrill  <jason@redhat.com>
3084
3085         PR tree-optimization/17697
3086         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3087
3088 2004-09-28  Jason Merrill  <jason@redhat.com>
3089
3090         PR middle-end/17525
3091         * class.c (build_base_field): Set TYPE_MODE.
3092
3093 2004-09-28  Roger Sayle  <roger@eyesopen.com>
3094
3095         PR driver/17537
3096         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3097         than -lc and -lm, may require linking against libstc++.
3098
3099 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
3100
3101         * tree.c: Fix a comment typo.
3102
3103 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
3104
3105         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3106         (struct secondary_vptr_vtt_init_data_s): New.
3107         (build_vtt_inits): Adjust dfs_walkers.
3108         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3109         secondary_vptr_vtt_init_data_s structure. Adjust.
3110         (dfs_ctor_vtable_bases_queue_p): Remove.
3111         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3112
3113         * pt.c (struct get_template_base_data_s): Remove.
3114         (get_template_base_r): Fold into get_template_base.
3115         (get_template_base): Walk base binfos directly in inheritance
3116         graph order.
3117
3118 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
3119
3120         PR c++/17642
3121         * cp-tree.h (fold_if_not_in_template): New function.
3122         * call.c (build_conditional_expr): Use fold_if_not_in_template.
3123         (build_cxx_call): Likewise.
3124         * cvt.c (convert_to_complex): Likewise.
3125         (ocp_convert): Likewise.
3126         (convert): Likewise.
3127         (convert_force): Likewise.
3128         * decl.c (compute_array_index_type): Clear
3129         processing_template_decl while folding array bounds.
3130         * pt.c (convert_nontype_argument): Clear
3131         processing_template_decl while processing non-type argument
3132         initialization.
3133         * tree.c (fold_if_not_in_template): New function.
3134         * typeck.c (build_class_member_access_expr): Use
3135         fold_if_not_in_template.
3136         (build_array_ref): Likewise.
3137         (build_binary_op): Likewise.  Do not try to optimize computations
3138         when processing templates.
3139         (cp_pointer_int_sum): Use fold_if_not_in_template.
3140         (pointer_diff): Likewise.
3141         (build_unary_op): Likewise.
3142         (build_reinterpret_cast): Likewise.
3143         (get_delta_difference): Likewise.
3144         (expand_ptrmemfunc_cst): Likewise.
3145         (dubious_conversion_warnings): Likewise.
3146
3147 2004-09-27  Matt Austern  <austern@apple.com>
3148
3149         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3150         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3151         tokens that come from headers that are implicitly extern "C".
3152         (struct cp_parser): new one-bit field, implicit_extern_c.
3153         (cp_parser_new): Set parser's implicit_extern_c to false.
3154         (cp_parser_translation_unit): Pop lang context if we were in a
3155         header that was implicitly extern "C".
3156         (cp_parser_declaration_seq_opt): Push/pop lang context as
3157         required by the token's and parser's implicit_extern_c.
3158
3159 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
3160
3161         PR c++/17585
3162         * cp-tree.h (shared_member_p): Declare.
3163         * search.c (shared_member_p): Give it external linkage.
3164         * semantics.c (finish_qualified_id_expr): Use it.
3165         (finish_id_expression): Likewise.
3166
3167         PR c++/17585
3168         * semantics.c (finish_id_expression): Do not add "this->" to
3169         static member functions.
3170
3171 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
3172
3173         PR c++/17681
3174         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3175
3176         * class.c (struct count_depth_data): Remove.
3177         (dfs_depth_post, dfs_depth_q): Remove.
3178         (find_final_overrider): Use number of vbase classes as depth
3179         bound.
3180
3181         * cp-tree.h (types_overlap_p): Remove.
3182         * search.c (struct overlap_info): Remove.
3183         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3184
3185         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3186         (get_template_base_recursive): Remove. Replace with ...
3187         (get_template_base_r): ... this.
3188         (struct get_template_base_data_s): New.
3189         (get_template_base): Use get_template_base_r via dfs_walk.  Always
3190         return NULL on failure.
3191         (unify): Remove error_mark_node check from get_template_base result.
3192
3193 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
3194
3195         * parser.c (cp_parser_expression_stack): Clarify why it is
3196         an array of NUM_PREC_VALUES elements.
3197         (cp_parser_binary_expression): Clarify why we do not need to
3198         handle stack overflow.
3199
3200 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
3201
3202         PR c++/16889
3203         * search.c (lookup_field_queue_p): Correct check for hidden base.
3204
3205         * search.c (bfs_walk): Remove.
3206         (lookup_member): Use dfs_walk_real.
3207         (dfs_walk_real): Move and adjust documentation from bfs_walk.
3208
3209 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
3210
3211         * decl.c (grokfndecl): If ::main is found not to return int,
3212         correct it after issuing a diagnostic.
3213         (grokdeclarator): If the incoming type was error_mark_node, do
3214         not complain about declaring something with no type.
3215         (start_function): Change check for ::main not returning int to
3216         an assertion, as grokfndecl now catches this when the user did it.
3217         * init.c (perform_member_init, sort_mem_initializers)
3218         (emit_mem_initializers): Make most diagnostics be issued on
3219         the line of current_function_decl, not whatever the current
3220         input line is.
3221         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3222         definition and declaration with #ifdef ENABLE_CHECKING.
3223         Avoid unnecessary use of fprintf.
3224         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3225         definitions to avoid warnings.
3226         (cp_lexer_new_main): Add assertion that first token is not a
3227         padding token.
3228         (cp_lexer_new_from_token_array): Fold into ...
3229         (cp_lexer_new_from_tokens): ... here.  Add assertion that
3230         first token is not a padding token.
3231         (cp_lexer_set_source_position_from_token): Move nearer to callers.
3232         Remove unused lexer argument.
3233         (cp_lexer_peek_token): Just print debugging report (if enabled)
3234         and return lexer->next_token.
3235         (cp_lexer_skip_purged_tokens): Delete.
3236         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3237         inline, simplify bodies.
3238         (cp_lexer_peek_nth_token): Add debugging report a la
3239         cp_lexer_peek_token.
3240         (cp_lexer_consume_token): Correct commentary.  Advance over
3241         purged tokens here.  Set current source position here, from
3242         token to be returned.  Avoid unnecessary use of fprintf.
3243         (cp_lexer_purge_token): Advance next_token pointer over this and
3244         subsequent purged tokens.
3245         (cp_parser_error): Adjust source position to that of the
3246         peeked token.
3247         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3248         (cp_parser_string_literal): Remove some excessive cleverness.
3249         (cp_parser_enum_specifier): Call start_enum before consuming
3250         the opening brace.
3251         (cp_parser_member_declaration): Make the "extra semicolon"
3252         diagnostic consistently-worded with the other place this is
3253         diagnosed.  Explicitly set the diagnostic location to the
3254         location of the offending semicolon.
3255         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3256         in diagnostics.  Do not use cp_parser_require.  Set location
3257         of diagnostics about improper use of '>>' to location of
3258         offending token.
3259         (cp_parser_late_parsing_for_member):
3260         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3261         (cp_parser_late_parsing_default_args): Likewise.  Manually
3262         move some logic outside the loop.
3263
3264 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
3265
3266         PR c++/17618
3267         * cvt.c (cp_convert_to_pointer): Return early when the type is
3268         an error_mark_node.
3269
3270 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3271
3272         PR c++/13989
3273         PR c++/9844
3274         * decl.c (grokfndecl): Add new argument "attrlist", use it
3275         to call cplus_decl_attributes.
3276         (start_function): Remove call to cplus_decl_attributes.
3277         * cvt.c (ocp_convert): Add support to use type conversion
3278         function to vector type.
3279         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3280         to the parsed type.
3281
3282 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
3283
3284         PR c++/17596
3285
3286         * parser.c (cp_parser_token_tree_map_node,
3287         cp_parser_pm_expression, cp_parser_additive_expression,
3288         cp_parser_multiplicative_expression, cp_parser_shift_expression,
3289         cp_parser_relational_expression, cp_parser_equality_expression,
3290         cp_parser_and_expression, cp_parser_exclusive_or_expression,
3291         cp_parser_inclusive_or_expression,
3292         cp_parser_logical_and_expression,
3293         cp_parser_logical_or_expression): Removed.
3294         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3295         binops, binops_by_token): New.
3296         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3297         (cp_parser_new): Initialize binops_by_token.
3298         (cp_parser_binary_expression): Rewritten.
3299         (N_CP_TTYPES): New.
3300
3301 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
3302
3303         * parser.c: Fix a comment typo.
3304
3305 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
3306
3307         PR c++/17620
3308         * decl.c (xref_basetypes): Look through typedefs before checking
3309         for duplicate base.
3310
3311 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3312
3313         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3314         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3315         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3316         (init_rtti_processing): Initialize it to something realistic.
3317         (get_tinfo_decl): Adjust pushing the new decl.
3318
3319         * cp-tree.h (struct lang_type_class): Remove marked flags, add
3320         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
3321         (TYPE_MARKED_P): New.
3322         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3323         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3324         CLEAR_CLASSTYPE_MARKED_N): Remove.
3325         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3326         CLEAR_CLASSTYPE_MARKED_*): Remove.
3327         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3328         shaped and repeated base properties.
3329         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3330         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3331         class_hint_flags): Remove.
3332         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3333         CLASSTYPE_DIAMOND_SHAPED_P.
3334
3335 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
3336
3337         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3338         cp-objcp-common.h.
3339         (objcp_tsubst_copy_and_build): Reformat function signature.
3340         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3341         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3342
3343 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
3344
3345         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3346         Don't handle CPP_PRAGMA tokens specially.
3347         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
3348         purge the token; do clear token->value after processing.  Add
3349         assertion at beginning that token->value is nonzero.
3350         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3351         CPP_PRAGMA as a full statement or declaration in its own right.
3352
3353 2004-09-21  Matt Austern  <austern@apple.com>
3354
3355         PR c++/15049
3356         * decl.c (grokvardecl): Accept declarations of global variables
3357         using anonymous types.
3358
3359 2004-09-21  Roger Sayle  <roger@eyesopen.com>
3360
3361         PR c++/7503
3362         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
3363         if either operand has side-effects.
3364         * typeck.c (rationalize_conditional_expr): Assert that neither
3365         operand of MIN_EXPR or MAX_EXPR has side-effects.
3366         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
3367         Check that the "lhs" is a valid lvalue, i.e. that neither operand
3368         of a MIN_EXPR or MAX_EXPR has a side-effect.
3369
3370 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
3371
3372         * cp-tree.h (struct lang_type_header): Remove
3373         uses_multiple_inheritance field.
3374         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3375         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3376         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3377         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3378         (TYPE_CONTAINS_VPTR_P): Likewise.
3379         * call.c (add_template_candidate_real): Use
3380         CLASSTYPE_VBASECLASSES.
3381         (build_special_member_call): Likewise.
3382         * class.c (finish_struct_bits): Remove
3383         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3384         bookkeeping.
3385         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3386         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3387         bookkeeping.
3388         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3389         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3390         Likewise.
3391         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3392         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3393         bookkeeping.
3394         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3395         * decl2.c (maybe_retrofit_in_chrg): Likewise.
3396         * init.c (expand_member, push_base_cleanups): Likewise.
3397         * pt.c (instantiate_class_template): Remove
3398         TYPE_USES_MULTIPLE_INHERITANCE,
3399         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3400         bookkeeping.
3401         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3402         check.
3403         * typeck2.c (process_init_constructor): Replace some sorrys with
3404         asserts.
3405
3406 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
3407
3408         * decl.c (reshape_init_array): Initialize max_index_cst to fix
3409         bootstrap failure.
3410
3411 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
3412
3413         PR c++/17530
3414         * pt.c (tsubst): Fix parentheses to accomodate emacs.
3415         (tsubst_baselink): If we get a single function, mark it as used.
3416
3417 2004-09-20  Matt Austern <austern@apple.com>
3418             Zack Weinberg  <zack@codesourcery.com>
3419
3420         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3421         Apply lbasename to input_filename before passing to get_fileinfo.
3422         * semantics.c (begin_class_definition): Likewise.
3423         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3424         correct filename.  Rename variables to be less confusing.
3425         (handle_pragma_implementation): Likewise.  Disable "appears
3426         after file is included" diagnostic.
3427
3428         * parser.c (struct cp_token): Add in_system_header fiag.
3429         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3430         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3431         (CPP_NONE, cp_lexer_read_token): Delete.
3432         (struct cp_lexer): Remove first_token, string_tokens,
3433         main_lexer_p fields.  Clarify comments.
3434         (struct cp_token_cache): Now just a pair of pointers.
3435         (CP_LEXER_BUFFER_SIZE): New #define.
3436         (CPP_PURGED): New fake token type.
3437         (cp_lexer_new_from_token_array, cp_lexer_destroy)
3438         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3439         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3440         New functions.
3441         (cp_lexer_new_from_tokens): Now a simple wrapper around
3442         cp_lexer_new_from_token_array.
3443         (cp_lexer_set_source_position_from_token): Also update
3444         in_system_header.
3445         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3446         Don't wrap round.
3447         (cp_lexer_token_difference): Dont handle wrapping round.
3448         (cp_lexer_new_main): Enable pragma deferral and raw strings,
3449         read the entire translation unit through c_lex_with_flags into
3450         this lexer's buffer, then turn raw strings back off again.
3451         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3452         (cp_lexer_get_preprocessor_token): No need to handle not being
3453         the main lexer.  Set token->in_system_header too.
3454         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
3455         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
3456         (cp_lexer_peek_nth_token): Likewise.
3457         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3458         the other tokens down.
3459         (cp_lexer_purge_tokens_after): Likewise.
3460         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3461         about there being no tokens.
3462         (cp_lexer_print_token): Revise to give useful information on
3463         all tokens.
3464         (struct cp_parser): Add field translate_strings_p.
3465         (cp_parser_new): Initialize it.
3466         (cp_parser_translation_unit): Destroy the lexer when done.
3467         (cp_parser_parameter_declaration): Restructure saving of
3468         default arguments.
3469         (cp_parser_save_member_function_body): Likewise.
3470         (cp_parser_check_for_invalid_template_id)
3471         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3472         Adjust calls to cp_lexer_advance_token.
3473         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3474         No need to fiddle c_lex_string_translate.
3475         (cp_parser_primary_expression, cp_parser_linkage_specification)
3476         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3477         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3478         Use cp_parser_string_literal.
3479         (cp_parser_attribute_list): Save and restore
3480         parser->translate_strings_p, not c_lex_string_translate.
3481         (cp_parser_cache_group): Delete.
3482         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
3483         not take a cache argument.
3484
3485 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3486
3487         PR c++/14179
3488         * decl.c (reshape_init): Extract array handling into...
3489         (reshape_init_array): New function. Use integers instead of trees
3490         for indices. Handle out-of-range designated initializers.
3491
3492 2004-09-20  Steven Bosscher  <stevenb@suse.de>
3493
3494         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3495         to null_node.
3496
3497 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
3498
3499         * decl2.c (determine_visibility): Allow class visibility
3500         directives to override targetm.cxx.export_class_data.
3501
3502 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
3503
3504         * call.c, semantics.c: Follow spelling conventions.
3505         * class.c: Fix a comment typo.
3506
3507 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
3508
3509         PR pch/13361
3510         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3511         (handle_pragma_implementation): Likewise.
3512
3513 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3514             Zack Weinberg  <zack@codesourcery.com>
3515
3516         * cp-tree.def: Use tree_code_class enumeration constants
3517         instead of code letters.
3518         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3519         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3520         Update for new tree-class enumeration constants.
3521
3522 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
3523
3524         PR c++/16002
3525         * parser.c (cp_parser_simple_declaration): Commit to tentative
3526         parses after seeing a decl-specifier.
3527         (cp_parser_simple_declaration): Eliminate spurious message.
3528         (cp_parser_init_declarator): Adjust error message.
3529
3530         PR c++/16029
3531         * lex.c (unqualified_name_lookup_error): Mark the dummy
3532         declaration as used.
3533
3534         PR c++/17501
3535         * parser.c (cp_parser_nested_name_specifier): Do not resolve
3536         typename types if the user explicitly said "typename".
3537
3538 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
3539
3540         * error.c (dump_decl): Make sure there is lang_specific info before
3541         checking for DTOR and CTOR decls.
3542
3543 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3544
3545         * class.c (copy_virtuals): Remove.
3546         (build_primary_vtable): Use copy_list directly.
3547         (build_secondary_vtable): Likewise.
3548         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3549         (create_vtable_ptr): Likewise.
3550
3551 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
3552
3553         * search.c: Follow spelling conventions.
3554
3555 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3556
3557         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3558         VEC(tree).
3559         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3560         comments.
3561         * call.c (build_new_method_call): Don't confirm a pure virtual is
3562         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
3563         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3564         (fixup_inline_methods, finish_struct): Likewise.
3565         * decl.c (finish_method): Likewise.
3566         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3567         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3568         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3569         vector to avoid repeating the list in error messages.
3570
3571 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
3572
3573         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3574         * cp-tree.h (cxx_comdat_group): Declare.
3575         * decl.c (cxx_comdat_group): New function.
3576
3577 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3578
3579         * search.c (get_pure_virtuals): Remove unused variables.
3580
3581         * cp-tree.h (struct lang_decl_flags): Remove
3582         needs_final_overrider.
3583         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3584         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3585         * class.c (finish_struct_bits): Correct comment about
3586         CLASSTYPE_PURE_VIRTUALS.
3587         * search.c (get_pure_virtuals): Remove useless loop.
3588
3589 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
3590
3591         PR c++/17324
3592         * mangle.c (partially_mangled_name): New variable.
3593         (partially_mangled_name_len): Likewise.
3594         (save_partially_mangled_name): New function.
3595         (restore_partially_mangled_name): Likewise.
3596         (write_encoding): Save and restore partially mangled names around
3597         calls to get_mostly_instantiated_function_type.
3598         (write_unqualified_name): Likewise.
3599
3600 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3601
3602         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3603
3604 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
3605
3606         PR c++/16162
3607         * parser.c (cp_parser_id_expression): Correct value for
3608         is_declarator.
3609         (cp_parser_nested_name_specifier_opt): Look through typenames as
3610         necessary.
3611         (cp_parser_template_name): Honor check_dependency_p.
3612
3613         PR c++/16716
3614         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3615         Robustify.
3616
3617         PR c++/17327
3618         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
3619         gcc_unreacable.
3620
3621 2004-09-12  Richard Henderson  <rth@redhat.com>
3622
3623         PR c++/16254
3624         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3625         * typeck.c (condition_conversion): Likewise.
3626
3627 2004-09-11  Richard Henderson  <rth@redhat.com>
3628
3629         PR c++/17404
3630         * pt.c (cur_stmt_expr): Move from tsubst_expr.
3631         (tsubst_expr) <case STMT_EXPR>: Move ...
3632         (tsubst_copy_and_build): ... here.
3633
3634 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
3635
3636         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3637         comment explaining them moved to c-common.h.
3638         * lex.c (interface_only, interface_unknown, extract_interface_info):
3639         Delete definitions.
3640         (cxx_finish): Don't reset interface_unknown.
3641         (handle_pragma_interface): Don't set interface_only and
3642         interface_unknown; just the like-named fields in finfo.
3643         (handle_pragma_implementation): Adjust comment.
3644         * decl2.c (cp_finish_file): Don't reset interface_only and
3645         interface_unknown.
3646         * method.c (synthesize_method): Don't reset interface_unknown or
3647         call extract_interface_info.
3648         * pt.c (pop_tinst_level): Don't call extract_interface_info.
3649         * decl.c (start_cleanup_fn): Don't save or restore interface_only
3650         and interface_unknown.
3651         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3652         and use the result instead of the interface_only/interface_unknown
3653         globals.
3654         (start_preparsed_function): Likewise.
3655         * lex.c (cxx_make_type): Likewise.
3656         * semantics.c (begin_class_definition): Likewise.
3657         (expand_body): Don't call extract_interface_info.
3658
3659 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3660
3661         * decl.c (objc_mark_locals_volatile): Make description of
3662         routine more descriptive; only mark VAR_DECLs at each
3663         binding level.
3664
3665 2004-09-10  Richard Henderson  <rth@redhat.com>
3666
3667         PR c++/17386
3668         * call.c (build_vfield_ref): Move...
3669         * class.c (build_vfield_ref): ... here.  Convert datum to the
3670         primary base containing the vptr.
3671         (make_new_vtable): Simplify build_primary_vtable arguments.
3672         (finish_struct_1): Do not duplicate TYPE_VFIELD.
3673         * typeck.c (build_class_member_access_expr): Don't warn for
3674         null object access to base fields.
3675
3676 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3677
3678         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3679         New functions, to be called from ObjC++.
3680
3681 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
3682
3683         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3684         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3685         comment typos.
3686
3687 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3688
3689         * typeck.c (build_c_cast): Preserve the cast if casting
3690         to and from an Objective-C type.
3691
3692 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3693
3694         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3695         * typeck.c: Include c-common.h.
3696         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3697         return the result if nonnegative.
3698
3699 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
3700
3701         * decl2.c (import_export_class)
3702         * lex.c (handle_pragma_interface):
3703         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3704
3705 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3706
3707         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3708         * semantics.c: Include c-common.h.
3709         (finish_compound_stmt): Call objc_clear_super_receiver().
3710
3711 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3712
3713         * cp-tree.h (do_poplevel): New prototype.
3714         * semantics.c (do_poplevel): Make externally visible.
3715
3716 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
3717
3718         * cp-tree.h (tree_pair_s): Define a GC'd vector.
3719         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3720         * semantics.c (deferred_access): Likewise.
3721
3722 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
3723
3724         * semantics.c (expand_body): Assert that we are not nested.
3725
3726 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
3727
3728         * decl.c (build_enumerator): Use add_double and int_fits_type_p
3729         instead of cp_build_binary_op, to avoid creating short-lived trees.
3730         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3731         lookahead instead of backtracking.  Move some code to avoid a
3732         conditional branch.
3733         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3734         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3735         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3736         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3737
3738 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3739
3740         * decl.c (grok_declarator): Remove a redundant semicolon.
3741
3742         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3743         Correct comments describing function parameters.
3744
3745 2004-09-03  Matt Austern  <austern@apple.com>
3746         Compile speed improvement.
3747         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3748         Otherwise define a stub macro that expands to nothing.
3749         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
3750         define a stub macro that expands to 0.
3751         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3752         (cp_lexer_stop_debugging): Likewise.
3753         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
3754         define a stub macro that expands to NULL.
3755         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3756         (cp_lexer_new_from_tokens): Likewise.
3757
3758 2004-09-03  Jan Hubicka  <jh@suse.cz>
3759
3760         * decl.c (finish_function): Clean out pointers we no longer need.
3761
3762 2004-09-03  Jan Beulich  <jbeulich@novell.com>
3763
3764         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3765         than "-lm".
3766
3767 2004-09-02  Paul Brook  <paul@codesourcery.com>
3768
3769         * decl2.c (determine_visibility): Only check data visibility
3770         for VAR_DECLS.
3771
3772 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
3773
3774         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3775         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3776         * decl2.c (determine_visibility): Honor
3777         TARGET_CXX_EXPORT_CLASS_DATA.
3778
3779         * class.c (key_method): Rename to ...
3780         (determine_key_method): ... this.
3781         (finish_struct_1): Adjust accordingly.
3782         * cp-tree.h (key_method): Declare.
3783         * decl2.c (maybe_emit_vtables): Determine the key method here if
3784         it has not already been done.
3785
3786 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
3787
3788         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3789         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3790         (cp/cp-decl.c): Do not depend on gtype-cp.h.
3791         (cp/cp-objcp-common.o): New target.
3792         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3793         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3794         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3795         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3796         respectively.
3797         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3798         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3799         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3800         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3801         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3802         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3803         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3804         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3805         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3806         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3807         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3808         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3809         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3810         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3811         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3812         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3813         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3814         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3815         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3816         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3817         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3818         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3819         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3820         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3821         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3822         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3823         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3824         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3825         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3826         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3827         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3828         hooks to cp-objcp-common.h.
3829         (finish_file): New function.
3830         * cp-objcp-common.c: New file.
3831         * cp-objcp-common.h: New file.
3832         * cp-tree.h (cp_finish_file): New prototype.
3833         * decl.c: Do not include gtype-cp.h.
3834         * decl2.c (finish_file): Rename to cp_finish_file.
3835
3836 2004-08-31  Richard Henderson  <rth@redhat.com>
3837
3838         PR c++/17221
3839         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3840         (tsubst_copy_and_build): ... here.
3841
3842 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
3843
3844         * cp-tree.h (initialize_artificial_var): Declare.
3845         * decl.c (initialize_artifical_var): New function.
3846         * class.c (initialize_array): Remove.
3847         (initialize_vtable): Use initialize_artificial_var.
3848         (build_vtt): Likewise.
3849         (build_ctor_vtbl_group): Likewise.
3850
3851 2004-08-30  Richard Henderson  <rth@redhat.com>
3852
3853         * class.c (build_base_path): Use build_address directly.
3854         * typeck.c (build_unary_op): Don't lower &a.b to pointer
3855         arithmetic directly.
3856         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3857         means !initializer_constant_valid_p.
3858
3859 2004-08-30  Richard Henderson  <rth@redhat.com>
3860
3861         * class.c (fixed_type_or_null): Use get_base_address before
3862         assuming an ADDR_EXPR is non-null.
3863
3864 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3865
3866         * name-lookup.c (pop_binding, pushdecl,
3867         set_identifier_type_value_with_scope, push_overloaded_decl,
3868         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3869         * parser.c (cp_parser_diagnose_invalid_type_name,
3870         cp_parser_postfix_expression, cp_parser_unary_expression,
3871         cp_parser_check_declarator_template_para): Likewise.
3872         * pt.c (push_inline_template_parms_recursive,
3873         check_explicit_specialization, convert_nontype_argument,
3874         coerce_template_template_parms, uses_template_parms,
3875         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3876         tsubst_expr, instantiate_template,
3877         maybe_adjust_types_for_deduction, type_unification_real,
3878         resolve_overloaded_unification, template_decl_level,
3879         type_dependent_expression_p): Likewise.
3880         * search.c (lookup_base_r): Likewise.
3881         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3882         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3883         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3884         * typeck.c (common_type, get_member_function_from_ptrfunc,
3885         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3886         * typeck2.c (cxx_incomplete_type_diagnostic,
3887         split_nonconstant_init_1, store_init_value,
3888         process_init_constructor): Likewise.
3889
3890 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3891
3892         * call.c (check_dtor_name): Replace abort with gcc_assert or
3893         gcc_unreachable.
3894         (build_call, add_builtin_candidate, build_new_op,
3895         convert_like_real, build_over_call, in_charge_arg_for_name,
3896         source_type, joust): Likewise.
3897         * class.c (build_simple_base_path, get_vcall_index,
3898         finish_struct_1, instantiate_type, get_enclosing_class,
3899         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3900         * cp-gimplify.c (cp_genericize): Likewise.
3901         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3902         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3903         * decl.c (poplevel, make_unbound_class_template, reshape_init,
3904         check_special_function_return_type, grokdeclarator,
3905         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3906         finish_function): Likewise.
3907         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3908         * error.c (dump_global_iord, dump_decl, dump_template_decl,
3909         language_to_string): Likewise.
3910         * except.c (choose_personality_routine): Likewise.
3911         * friend.c (do_friend): Likewise.
3912         * g++spec.c (lang_specific_driver): Likewise.
3913         * init.c (build_zero_init, expand_default_init, build_new_1,
3914         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3915         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3916         * mangle.c (add_substitution, write_unscoped_name,
3917         write_template_prefix, write_identifier,
3918         write_special_name_destructor, write_type, write_builtin_type,
3919         write_expression, write_template_param,
3920         write_java_integer_type_codes): Likewise.
3921         * method.c (implicitly_declare_fn): Likewise.
3922
3923 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3924
3925         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3926         (BINFO_INDIRECT_PRIMARY_P): Remove.
3927         * class.c (determine_primary_base): Rename to ...
3928         (determine_primary_bases): ... here.  Set all primary bases.
3929         (set_primary_base): Remove.
3930         (mark_primary_bases): Remove.
3931         (build_simple_base_path, walk_subobject_offsets,
3932         propagate_binfo_offsets, end_of_class): Adjust.
3933         (layout_class_type): Rename determine_primary_base call.
3934         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3935         to type_as_string.
3936         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3937         build_rtti_vtbl_entries): Adjust.
3938         * init.c (build_vtbl_address): Adjust.
3939
3940         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3941
3942 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
3943
3944         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3945         CXX_AND_OBJCXX_OBJS.
3946         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3947         separately on the link line.
3948
3949 2004-08-28  Jason Merrill  <jason@redhat.com>
3950
3951         * decl.c (expand_static_init): Avoid bogus warnings.
3952
3953 2004-08-27  Jason Merrill  <jason@redhat.com>
3954
3955         PR c++/16851
3956         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3957
3958         PR c++/13684
3959         * decl.c (expand_static_init): Use thread-safety API.
3960         (register_dtor_fn): Return the call, don't expand it.
3961         * tree.c (add_stmt_to_compound): New fn.
3962         (stabilize_call): Use it.
3963
3964 2004-08-27  Richard Henderson  <rth@redhat.com>
3965
3966         * cp-tree.def (OFFSETOF_EXPR): New.
3967         * parser.c (cp_parser_builtin_offsetof): Either built an
3968         OFFSETOF_EXPR, or call fold_offsetof immediately.
3969         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3970
3971 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
3972
3973         * call.c (validate_conversion_obstack): Replace
3974         my_friendly_assert with gcc_assert or gcc_unreachable.
3975         (direct_reference_binding, merge_conversion_sequences,
3976         build_user_type_conversion_1, perform_overload_resolution,
3977         build_op_delete_call, enforce_access, call_builtin_trap,
3978         build_over_call, build_special_member_call, build_new_method_call,
3979         initialize_reference): Likewise.
3980         * class.c (build_base_path, build_primary_vtable, alter_access,
3981         check_bases, update_vtable_entry_for_fn, layout_empty_base,
3982         clone_function_decl, adjust_clone_args,
3983         type_requires_array_cookie, include_empty_classes,
3984         finish_struct_1, resolve_address_of_overloaded_function,
3985         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3986         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3987         accumulate_vtbl_inits, build_vtbl_initializer,
3988         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3989         * cvt.c (build_up_reference, convert_to_reference): Likewise.
3990         * decl.c (poplevel, duplicate_decls, make_typename_type,
3991         cxx_init_decl_processing, reshape_init, check_initializer,
3992         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3993         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3994         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3995         xref_basetypes, start_preparsed_function, save_function_data,
3996         finish_function, finish_method, maybe_register_incomplete_var,
3997         complete_vars): Likewise.
3998         * decl2.c (grok_array_decl, check_member_template,
3999         check_classfn, finish_static_data_member_decl, coerce_new_type,
4000         coerce_delete_type, import_export_class, decl_needed_p,
4001         determine_visibility, import_export_decl, build_cleanup,
4002         start_static_initialization_or_destructi, do_static_destruction,
4003         prune_vars_needing_no_initialization,
4004         build_offset_ref_call_from_tree): Likewise.
4005         * error.c (dump_decl, dump_expr): Likewise.
4006         * init.c (finish_init_stmts, build_zero_init,
4007         expand_virtual_init, expand_default_init, expand_aggr_init_1,
4008         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
4009         Likewise.
4010         * mangle.c (write_method_parms, write_template_args,
4011         write_expression, write_template_arg): Likewise.
4012         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
4013         * name-lookup.c (pop_binding, begin_scope, leave_scope,
4014         resume_scope, push_using_decl, validate_nonmember_using_decl,
4015         is_ancestor, poplevel_class, set_inherited_value_binding_p,
4016         push_class_level_binding, do_class_using_decl, push_namespace,
4017         pop_namespace, add_using_namespace, ambiguous_decl,
4018         lookup_namespace_name, lookup_type_current_level,
4019         maybe_process_template_type_declaration): Likewise.
4020         * parser.c (cp_lexer_peek_nth_token,
4021         cp_parser_parse_and_diagnose_invalid_typ,
4022         cp_parser_translation_unit, cp_parser_template_id,
4023         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
4024         * pt.c (push_access_scope, finish_member_template_decl,
4025         push_inline_template_parms_recursive, add_outermost_template_args,
4026         get_innermost_template_args, begin_explicit_instantiation,
4027         end_explicit_instantiation, retrieve_specialization,
4028         is_specialization_of, is_specialization_of_friend,
4029         register_specialization, check_explicit_specialization,
4030         comp_template_parms, process_template_parm,
4031         process_partial_specialization, convert_nontype_argument,
4032         coerce_template_template_parms, coerce_template_parms,
4033         mangle_class_name_for_template, lookup_template_function,
4034         lookup_template_class, instantiate_class_template, tsubst_decl,
4035         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
4036         instantiate_template, fn_type_unification, type_unification_real,
4037         get_template_base, regenerate_decl_from_template,
4038         template_for_substitution, instantiate_decl,
4039         get_mostly_instantiated_function_type, dependent_scope_ref_p,
4040         value_dependent_expression_p, resolve_typename_type): Likewise.
4041         * repo.c (repo_emit_p): Likewise.
4042         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
4043         create_tinfo_types, emit_tinfo_decl): Likewise.
4044         * search.c (lookup_base_r, lookup_base, lookup_field_1,
4045         dfs_access_in_type, build_baselink, lookup_member,
4046         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
4047         * semantics.c (perform_or_defer_access_check,
4048         finish_non_static_data_member, finish_stmt_expr_expr,
4049         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
4050         finish_template_template_parm, finish_member_declaration,
4051         emit_associated_thunks): Likewise.
4052         * tree.c (build_target_expr_with_type, force_target_expr,
4053         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
4054         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
4055         cxx_sizeof_or_alignof_type, perform_integral_promotions,
4056         build_class_member_access_expr, finish_class_member_access_expr,
4057         build_ptrmemfunc_access_expr, build_unary_op,
4058         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
4059         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
4060         * typeck2.c (complete_type_check_abstract,
4061         abstract_virtuals_error, process_init_constructor,
4062         add_exception_specifier): Likewise.
4063
4064 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
4065
4066         * class.c (build_vtbl_initializer): Use ssize_int.
4067         * decl.c (complete_array_type): Likewise.
4068         * method.c (finish_thunk): Likewise.
4069         * search.c (get_dynamic_base_type): Likewise.
4070
4071 2004-08-26  Richard Henderson  <rth@redhat.com>
4072
4073         * cp-tree.h (DECL_FIELD_IS_BASE): New.
4074         * class.c (build_base_field): Set it.
4075         (build_simple_base_path): Use it.
4076         (fixed_type_or_null): Don't consider base fields definitive.
4077
4078 2004-08-25  Roger Sayle  <roger@eyesopen.com>
4079
4080         PR middle-end/16693
4081         PR tree-optimization/16372
4082         * decl.c (finish_enum): Make the precision of the enumerated type
4083         the same width as the underlying integer type.
4084
4085 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
4086
4087         PR c++/17155
4088         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
4089         functions.
4090
4091         * mangle.c (get_identifier_nocopy): Add cast.
4092
4093         * cp-tree.h (mangle_type): Remove.
4094         * mangle.c (globals): GTY it.
4095         (mangle_obstack): New variable.
4096         (name_obstack): Likewise.
4097         (name_base): Likewise.
4098         (write_char): Adjust accordingly.
4099         (write_chars): Likewise.
4100         (write_string): Likewise.
4101         (start_mangling): Initialize G.substitutions only one.  Add
4102         ident_p parameter.
4103         (finish_mangling): Use VARRAY_CLEAR to reclaim
4104         storage in G.substitutions.  Use obstack_finish.
4105         (init_mangle): Adjust for changes to variable names above.
4106         Initialize G.substitutions.
4107         (mangle_decl_string): Adjust call to start_mangling.
4108         (get_identifier_nocopy): New function.
4109         (mangle_decl): Use it.
4110         (mangle_type_string): Adjust call to start_mangling.
4111         (mangle_special_for_type): Likewise.
4112         (mangle_vtt_for_type): Likewise.
4113         (mangle_ctor_vtbl_for_type): Likewise.
4114         (mangle_thunk): Likewise.
4115         (mangle_guard_variable): Likewise.
4116         (mangle_ref_init_variable): Likewise.
4117
4118 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4119
4120         PR c++/14428
4121         * pt.c (redeclare_class_template): Check the type of non-type and
4122         template template parameter.
4123
4124 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4125
4126         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4127         (build_user_type_conversion_1, convert_like_real,
4128         build_java_interface_fn_ref, build_special_member_call): Likewise.
4129         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4130         * cp-gimplify.c (cp_gimplify_expr): Likewise.
4131         * cvt.c (cp_convert_to_pointer): Likewise.
4132         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4133         * decl2.c (start_static_initialization_or_destruction,
4134         generate_ctor_or_dtor_function): Likewise.
4135         * except.c (build_throw): Likewise.
4136         * mangle.c (write_integer_cst): Likewise.
4137         * method.c (finish_thunk): Likewise.
4138         * rtti.c (build_headof, get_tinfo_decl_dynamic,
4139         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4140         get_pseudo_ti_init): Likewise.
4141         * search.c (get_dynamic_cast_base_type): Likewise.
4142
4143 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
4144
4145         * class.c, search.c: Remove references to DWARF_DEBUG.
4146
4147 2004-08-25  Adam Nemet  <anemet@lnxw.com>
4148
4149         * repo.c (extract_string): Reset backquote after one character.
4150         (get_base_filename): Fix indentation.
4151
4152 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4153
4154         * decl.c (cxx_init_decl_processing): Adjust
4155         build_common_tree_nodes call.
4156
4157 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4158
4159         PR c++/16889
4160         * (is_subobject_of_p): Resurrect & optimize.
4161         (lookup_field_r): Use it.
4162
4163 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4164
4165         PR c++/16706
4166         * search.c (friend_accessible_p): Increment processing_template_decl
4167         when deal with TEMPLATE_DECL of SCOPE.
4168
4169 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4170
4171         PR c++/17149
4172         * semantics.c (check_accessibility_of_qualified_id): Defer check
4173         if qualifying_type is a template parameter.
4174
4175 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
4176
4177         PR c++/17163
4178         * pt.c (instantiate_decl): Do not try to apply
4179         DECL_DECLARED_INLINED_P to a VAR_DECL.
4180
4181         * search.c (build_baselink): Fix typo in comment.
4182
4183 2004-08-22 Andrew Pinski  <apinski@apple.com>
4184
4185         Revert:
4186         2004-08-22  Andrew Pinski  <apinski@apple.com>
4187         PR c++/14029
4188         * typeck.c (build_unary_op): Use &a.b if the folded lowered
4189         expression is not constant.
4190
4191 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4192
4193         * name-lookup.c (pushdecl): Rename build_type_copy call.
4194         * tree.c (cp_build_qualified_type_real,
4195         build_exception_variant, handle_java_interface_attribute): Likewise.
4196
4197 2004-08-22  Andrew Pinski  <apinski@apple.com>
4198
4199         PR c++/14029
4200         * typeck.c (build_unary_op): Use &a.b if the folded lowered
4201         expression is not constant.
4202
4203 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
4204
4205         PR c++/17121
4206         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4207
4208 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4209
4210         PR c++/17120
4211         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4212         MODOP_EXPR.
4213
4214 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4215
4216         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4217         before calling comp_template_args.
4218
4219 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4220
4221         * class.c (build_vtbl_initializer): Use build_int_cst for
4222         negative size types.
4223         * decl.c (complete_array_type): Likewise.
4224         * method.c (finish_thunk): Likewise.
4225
4226 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
4227
4228         * tree.c: Remove unused mark_local_for_remap_r.
4229
4230 2004-08-19  Eric Christopher  <echristo@redhat.com>
4231
4232         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4233         * tree.c (cxx_unsave_expr_now): Delete.
4234         (cp_unsave_r): Ditto.
4235
4236 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
4237
4238         PR c++/15890
4239         * pt.c (push_template_decl_real): Disallow template allocation
4240         functions with fewer than two parameters.
4241
4242 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4243
4244         * cp-tree.h (build_shared_int_cst): Remove.
4245         * tree.c (shared_int_cache): Remove.
4246         (build_shared_int_cst): Remove.
4247         * class.c (finish_struct_1): Use build_int_cst.
4248
4249 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4250
4251         * decl.c (finish_enum): Do not copy value node early, copy
4252         later.
4253         * lex.c (cxx_init): Force null_node to be unique.
4254
4255 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
4256
4257         PR c++/17041
4258         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4259         from input for MODOP_EXPR.
4260
4261 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
4262
4263         * pt.c (dependent_template_p): Fix typo in commment.
4264
4265         PR c++/17068
4266         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4267         dependent.
4268
4269 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
4270
4271         PR c++/16246
4272         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
4273         arguments have the same type as the corresponding parameter.
4274
4275         PR c++/16215
4276         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4277         is set use it for diagnostic purposes.
4278         (cp_parser_pseudo_destructor_name): Remove special-case error
4279         message.
4280
4281         PR c++/15871
4282         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4283
4284         PR c++/16965
4285         * cp-tree.h (qualified_name_lookup_error): Add parameter.
4286         * name-lookup.c (do_class_using_decl): Restrict set of entities
4287         passed to cp_emit_debug_info_for_using more carefully.
4288         (lookup_qualified_name): Allow lookup_member to return sets of
4289         ambiguous entries.
4290         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4291         (cp_parser_primary_expression): Handle ambiguous lookups.
4292         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4293         (cp_parser_template_argument): Likewise.
4294         (cp_parser_elaborate_type_specifier): Likewise.
4295         (cp_parser_namespace_name): Likewise.
4296         (cp_parser_class_name): Likewise.
4297         (cp_parser_lookup_name_simple): Likewise.
4298         * pt.c (tsubst_qualified_id): Handle ambiguous results.
4299         (tsubst_expr): Likewise.
4300         * semantics.c (qualified_name_lookup_error): Add decl paramter.
4301         For ambiguous lookups, print candidates.
4302
4303 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4304
4305         PR c++/6749
4306         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
4307         return anything.
4308         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4309         * decl2.c (finish_file): Adjust call to
4310         instantiate_pending_templates.
4311
4312 2004-08-15  Roger Sayle  <roger@eyesopen.com>
4313
4314         * call.c (build_vfield_ref, build_call, build_conditional_expr,
4315         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4316         build_java_interface_fn_ref, build_special_member_call,
4317         build_new_method_call, initialize_reference): Replace calls to
4318         build with calls to buildN.
4319         * class.c (build_base_path, convert_to_base_statically,
4320         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4321         build_vtbl_initializer): Likewise.
4322         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4323         gimplify_if_stmt, cp_genericize_r): Likewise.
4324         * cvt.c (convert_to_void): Likewise.
4325         * decl.c (check_initializer, finish_constructor_body,
4326         finish_destructor_body): Likewise.
4327         * error.c (dump_expr): Likewise.
4328         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4329         Likewise.
4330         * init.c (perform_member_init, expand_virtual_init,
4331         expand_cleanup_for_base, build_init, expand_default_init,
4332         build_offset_ref, decl_constant_value, build_new, build_new_1,
4333         build_vec_delete_1, build_vec_init, build_delete,
4334         push_base_cleanups, build_vec_delete): Likewise.
4335         * mangle.c (write_integer_cst): Likewise.
4336         * method.c (thunk_adjust, do_build_copy_constructor,
4337         do_build_assign_ref): Likewise.
4338         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4339         unify, build_non_dependent_expr): Likewise.
4340         * rtti.c (build_headof, build_typeid, ifnonnull,
4341         build_dyanmic_cast_1, tinfo_base_init): Likewise.
4342         * semantics.c (begin_compound_stmt, finish_call_expr,
4343         finish_pseudo_destructor_expr, finish_id_expression,
4344         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4345         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4346         array_type_nelts_total, stabilize_call): Likewise.
4347         * typeck.c (decay_conversion, build_class_member_access_expr,
4348         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4349         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4350         build_x_unary_op, build_unary_op, unary_complex_lvalue,
4351         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4352         check_return_expr): Likewise.
4353         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4354         split_nonconstant_init, store_init_value, build_m_component_ref):
4355         Likewise.
4356
4357 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4358
4359         * call.c (convert_class_to_reference,
4360         build_user_type_conversion_1, convert_like_real,
4361         build_java_interface_fn_ref, build_special_member_call): Use
4362         build_int_cst.
4363         * class.c (build_vtbl_initializer): Likewise.
4364         * cp-gimplify.c (cp_gimplify_expr): Likewise.
4365         * cvt.c (cp_convert_to_pointer): Likewise.
4366         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4367         * decl2.c (start_static_initialization_or_destruction,
4368         generate_ctor_or_dtor_function): Likewise.
4369         * except.c (build_throw): Likewise.
4370         * lex.c (cxx_init): Likewise.
4371         * mangle.c (write_integer_cst): Likewise.
4372         * rtti.c (build_headof, get_tinfo_decl_dynamic,
4373         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4374         get_pseudo_ti_init): Likewise.
4375         * search.c (get_dynamic_cast_base_type): Likewise.
4376         * tree.c (build_shared_int_cst): Likewise.
4377
4378 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
4379
4380         PR c++/16273
4381         * class.c (count_depth_data): New type.
4382         (dfs_depth_post): New function.
4383         (dfs_depth_q): Likewise.
4384         (find_final_overrider_data_s): Change type of vpath.
4385         Add vpath_list.
4386         (dfs_find_final_overrider_1): New function.
4387         (dfs_find_final_overrider): Use it.
4388         (dfs_find_final_overrider_q): Adjust use of vpath.
4389         (dfs_find_final_overrider_post): Likewise.
4390         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
4391         vpath_list.
4392
4393 2004-08-12 Jan Beulich <jbeulich@novell.com>
4394
4395         * parser.c (cp_parser_asm_definition): Properly consume scope operator
4396         tokens preceding the clobbers. Don't check for scope operator
4397         following inputs. Simplify inputs handling to match that now used for
4398         clobbers.
4399
4400 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4401
4402         PR c++/16698
4403         * except.c (build_throw): Allocate cleanup_type and the function
4404         for __cxa_throw separately.
4405
4406         PR c++/16853
4407         * call.c (standard_conversion): Do not accept conversions between
4408         pointers to members if the class types are unrelated.
4409
4410         PR c++/16618
4411         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4412         char &" instead of just "char &".
4413
4414         PR c++/16870
4415         * pt.c (tsubst): Just return the unknown_type_node.
4416
4417 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4418
4419         PR c++/16964
4420         * parser.c (cp_parser_class_specifier): Robustify.
4421
4422         PR c++/16904
4423         * pt.c (tsubst_copy_and_build): Complain about invalid
4424         qualification.
4425
4426         PR c++/16929
4427         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4428         current_class_ref while tsubsting.
4429
4430 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
4431
4432         PR c++/16971
4433         * parser.c (cp_parser_init_declarator): Robustify.
4434
4435 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
4436
4437         * typeck2.c (process_init_constructor): Guard the missing field warning
4438         with warn_missing_field_initializers rather than extra_warnings.
4439
4440 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
4441
4442         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4443
4444 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
4445
4446         * decl.c (start_preparsed_function): Move determine_visibility
4447         call.
4448         * decl2.c (determine_visibility): Incorporate dllexport testing.
4449
4450 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
4451
4452         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4453         means that libstdc++ is needed.
4454
4455 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4456
4457         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4458
4459 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
4460
4461         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4462         than passing it as a parameter to rest_of_decl_compilation.
4463         * decl2.c (grokfield): Use set_user_assembler_name.
4464
4465 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4466
4467         * decl.c (complete_array_type): Don't gratuitously copy
4468         maxindex. Its type is always set.
4469
4470 2004-08-04  Paul Brook  <paul@codesourcery.com>
4471
4472         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4473         * cp-tree.h (struct language_function): Rename x_dtor_label to
4474         x_cdtor_label.
4475         (dtor_label): Rename ...
4476         (cdtor_label): ... to this.
4477         * decl.c (begin_constructor_body): Remove.
4478         (check_special_function_return_type): Maybe change the return type.
4479         (grokdeclarator): Pass the class type.
4480         (start_preparsed_function): Constructors may need a return label.
4481         (finish_constructor_body, finish_destructor_body): Set the return
4482         value.
4483         (begin_function_body): Don't call begin_constructor_body.
4484         (finish_function): Don't warn for constructors or destructors.
4485         (implicitly_declare_fn): Maybe change the return type.
4486         * optimize.c: Include target.h.
4487         (maybe_clone_body): Remap the function result.
4488         * semantics.c: Include target.h.
4489         (finish_return_stmt): Maybe jump to return label for constructors.
4490
4491 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
4492
4493         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4494         (check_field_decls): Or here.
4495         (check_methods): Or here.
4496         (initialize_array): Don't mess with DECL_CONTEXT.
4497         * cp-tree.h (start_decl): Adjust prototype.
4498         (determine_visibility): New function.
4499         * decl.c (duplicate_decls): Remove checks for hidden "operator
4500         new".
4501         (build_library_fn_1): Give all library functions default
4502         visibility.
4503         (start_decl): Add pop_scope_p parameter.  Tidy.
4504         (cp_finish_decl): Do not pop scopes here.  Call
4505         determine_visibility for variable definitions.
4506         (start_preparsed_function): Call determine_visibility.
4507         * decl2.c (determine_visibility): New function.
4508         * method.c (use_thunk): Fix formatting.
4509         * parser.c (cp_parser_condition): Adjust calls to start_decl.
4510         (cp_parser_init_declarator): Likewise.
4511         * pt.c (instantiate_decl): Always call pop_nested_class.
4512         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4513         (tinfo_base_init): Likewise.
4514
4515 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
4516
4517         PR c++/16707
4518         * name-lookup.c (validate_nonmember_using_decl): Robustify.
4519
4520 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
4521
4522         PR c++/16224
4523         * name-lookup.c (decl_namespace): Remove.
4524         (current_decl_namespace): Use decl_namespace_context instead of
4525         decl_namespace.
4526         (push_decl_namespace): Likewise.
4527         (arg_assoc_class): Likewise.
4528         (arg_assoc_type): Likewise.
4529         * pt.c (check_specialization_namespace): New function.
4530         (maybe_process_partial_specialization): Use it.
4531         (register_specialization): Likewise.
4532
4533         PR c++/16489
4534         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4535         * call.c (null_ptr_cst_p): Handle variables with constant
4536         initializers.
4537         * pt.c (convert_nontype_argument): Use
4538         DECL_INTEGRAL_CONSTANT_VAR_P.
4539         * semantics.c (finish_id_expression): Likewise.
4540
4541         PR c++/16529
4542         * decl.c (duplicate_decls): Reject duplicate namespace
4543         declarations.
4544
4545         PR c++/16810
4546         * typeck.c (build_ptrmemfunc): Loosen assertion.
4547
4548 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4549
4550         * call.c (z_candidate::template_decl): Rename from template.
4551         (add_template_candidate_real): Adjust member reference.
4552         (joust): Likewise.
4553
4554 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
4555
4556         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4557         (lang_decl_flags): Narrow the width of "languages".  Add
4558         repo_available_p.
4559         (DECL_NEEDED_P): Remove.
4560         (FOR_EACH_CLONE): New macro.
4561         (DECL_REPO_AVAILABLE_P): Likewise.
4562         (DECL_TINFO_P): Likewise.
4563         (set_linkage_according_to_type): Declare.
4564         (import_export_vtable): Remove.
4565         (import_export_tinfo): Likewise.
4566         (mark_needed): New function.
4567         (decl_needed_p): Likewise.
4568         (note_vauge_linkage_fn): Likewise.
4569         (init_repo): Change prototype.
4570         (repo_template_used): Remove.
4571         (repo_template_instantiated): Likewise.
4572         (repo_emit_p): New function.
4573         (repo_export_class_p): Likewise.
4574         (no_linkage_check): Change prototype.
4575         * class.c (set_linkage_according_to_type): New function.
4576         (build_vtable): Use it.  Do not call import_export_vtable.  Set
4577         DECL_IGNORED_P if appropriate.
4578         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4579         (make_rtL_for_nonlocal_decls): Check for template instantiations
4580         explicitly.
4581         (grokfndecl): Adjust call to no_linkage_check.
4582         (set_linkage_for_static_data_member): New function.
4583         (grokvardecl): Use it.  Adjust call to no_linkage_check.
4584         (grokdeclarator): Use set_linkage_for_static_data_member.
4585         * decl2.c (note_vague_linkage_fn): New function.
4586         (note_vague_linkage_var): Likewise.
4587         (finish_static_data_member_decl): Use it.
4588         (import_export_vtable): Remove.
4589         (import_export_class): Use repo_export_class_p.
4590         (var_finalized_p): Simplify.
4591         (maybe_emit_vtables): Simplify.
4592         (mark_needed): New function.
4593         (decl_needed_p): Likewise.
4594         (import_export_decl): Add documentation and consistency checks.
4595         Use repo_emit_p.  Handle virtual tables and RTTI information
4596         here.
4597         (import_export_tinfo): Remove.
4598         (write_out_vars): Call import_export_decl.
4599         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4600         whenever one is.
4601         (finish_file): Use decl_needed_p.  Do not call import_export_decl
4602         for undefined static data members.  Do not warn about undefined
4603         inlines when using a repository.
4604         (mark_used): Use note_vague_linkage_fn.  Always defer template
4605         instantiations.
4606         * lex.c (cxx_init): Adjust call to init_repo.  Always set
4607         flag_unit_at_a-time.
4608         * method.c (synthesize_method): Remove unncessary
4609         import_export_decl call.
4610         (implicitly_declare_fn): Use set_linkage_according_to_type.
4611         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4612         * pt.c (instantiate_class_template): Don't redundantly add classes
4613         to keyed_classes.  Don't call repo_template_used.
4614         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4615         templates with internal linkage.
4616         (check_instantiated_args): Adjust call to no_linkage_check.
4617         (instantiate_template): Use FOR_EACH_CLONE.
4618         (mark_definable): New function.
4619         (mark_decl_instantiated): Use it.
4620         (do_decl_instantiation): Adjust tests for explicit instantiation
4621         after "extern template".
4622         (instantiate_class_member): Do not use repo_template_instantiated.
4623         (do_type_instantiation): Simplify.
4624         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
4625         Simplify.
4626         * repo.c (repo_get_id): Remove.
4627         (original_repo): Remove.
4628         (IDENTIFIER_REPO_USED): Remove.
4629         (IDENTIFIER_REPO_CHOSEN): Remove.
4630         Remove all #if 0'd code.
4631         (repo_template_used): Remove.
4632         (repo_template_instantiated): Remove.
4633         (temporary_obstack_initialized_p): New variable.
4634         (init_repo): Register with lang_post_pch_load.  Avoid creating
4635         identifiers unnecessarily.  Don't use original_repo.  Close the
4636         file here.
4637         (reopen_repo_file_for_write): Not here.
4638         (finish_repo): Always write out a new repository file.
4639         (repo_emit_p): New function.
4640         (repo_export_class_p): Likewise.
4641         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4642         (involves_incomplete_p): New function.
4643         (tinfo_base_init): Use it.
4644         (ptr_initializer): Remove non_public_ptr parameter.
4645         (ptm_initializer): Likewise.
4646         (get_pseudo_ti_init): Likewise.
4647         (unemitted_tinfo_decl_p): Remove.
4648         (emit_tinfo_decl): Use import_export_decl.
4649         * semantics.c (expand_body): Move updates of static_ctors and
4650         static_dtors to ...
4651         (expand_or_defer_fn): ... here.
4652         * tree.c (no_linkage_check): Add relaxed_p parameter.
4653
4654 2004-07-28  Eric Christopher  <echristo@redhat.com>
4655
4656         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4657
4658 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
4659
4660         * cp-tree.h (struct tree_pair_s): New.
4661         (typedef tree_pair_p): New.
4662         (DEF_VEC_O(tree_pair_s)): New.
4663         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4664         (CLASSTYPE_VCALL_INDICES): Update documentation.
4665         * class.c (get_vcall_index): Adjust.
4666         (add_vcall_offset): Adjust.
4667
4668 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
4669
4670         * pt.c, typeck.c: Remove spurious carriage returns.
4671
4672 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4673
4674         PR c++/14429
4675         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4676         when the type of ARG is not dependent.
4677
4678 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
4679
4680         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4681         (lang_specific_driver): If the C++ or math library options don't
4682         start with '-l', don't count them as added libraries.
4683
4684 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
4685
4686         * decl.c (xref_basetypes): Adjust base access vector creation.
4687         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4688         access accesses.
4689         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4690
4691 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
4692             Brian Ryner  <bryner@brianryner.com>
4693
4694         PR c++/15000
4695         PR c++/9283
4696         * class.c (check_field_decls): Apply hidden visibility if
4697         -fvisibility-inlines-hidden and inlined unless otherwise specified
4698         (build_vtable): Set vtable visibility to class visibility.
4699         (check_field_decls): Default static member visibility to class
4700         visibility.
4701         (check_methods): Default method visibility to class visibility.
4702         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4703         CLASSTYPE_VISIBILITY_SPECIFIED macro.
4704         * decl.c (duplicate_decls): New logic for merging definition decls
4705         with declaration decls. Added ignore & warning when non default
4706         applied to global operator new or delete.
4707         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4708         wherever VISIBILITY was changed
4709         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4710         visibility.
4711         (tinfo_base_init): Set typeinfo name visibility to class visibility.
4712
4713 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4714
4715         * decl.c: Rename all identifiers named `class' to `cl'.
4716         * cp-tree.h: Likewise.
4717
4718 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4719
4720         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4721         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4722         * name-lookup.c (binding_entry_make): Use GGC_NEW.
4723         (binding_table_construct): Use GGC_CNEWVEC.
4724         (binding_table_new): Use GGC_NEW.
4725         (cxx_binding_make): Likewise.
4726         (begin_scope): Likewise.
4727         (push_to_top_level): Use GCC_CNEW.
4728         * parser.c (cp_token_cache_new): Likewise.
4729         (cp_token_cache_push_token): Likewise.
4730         (cp_lexer_new_main): Likewise.
4731         (cp_lexer_new_from_tokens): Likewise.
4732         (cp_parser_context_new): Likewise.
4733         (cp_parser_new): Likewise.
4734         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4735         * lex.c (cxx_make_type): Use GGC_CNEW.
4736         (retrofit_lang_decl): Use GGC_NEWVAR.
4737         (cxx_dup_lang_specific_decl): Likewise.
4738         (copy_lang_type): Likewise.
4739         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4740         (save_function_data): Likewise.
4741         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4742         (cxx_push_function_context): Likewise.
4743
4744 2004-07-25  Richard Henderson  <rth@redhat.com>
4745
4746         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4747         DECL_IGNORED_P on RESULT_DECL.
4748         * semantics.c (finalize_nrv): Copy them too.
4749
4750 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
4751
4752         * search.c (lookup_conversion_operator): Avoid two loops.
4753         (add_conversions): Remove.
4754         (check_hidden_convs, split_conversions,
4755         lookup_conversions_r):  New.
4756         (lookup_conversions): Use lookup_conversions_r.
4757
4758 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
4759
4760         * pt.c (get_template_base): Check type is completable.
4761
4762 2004-07-21  Eric Christopher  <echristo@redhat.com>
4763
4764         * decl.c (poplevel): Inline unused variable checking.
4765         Change formatting.
4766
4767 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
4768
4769         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4770         integer vectors.
4771
4772 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4773
4774         PR c++/14497
4775         * pt.c (check_explicit_specialization): Remove extension to accept
4776         specializations without template headers. Fall-through to normal
4777         processing.
4778
4779 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4780
4781         PR c++/509
4782         * pt.c (determine_specialization): New parameter template_count.
4783         Disambiguate between member templates and member functions counting
4784         the template headers.
4785         (check_explicit_specialization): Update caller.
4786         (tsubst_friend_function): Likewise.
4787
4788 2004-07-20  Steven Bosscher  <stevenb@suse.de>
4789
4790         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4791         * cp-tree.h (tinst_level_t): New tree type.
4792         (union lang_tree_node): Handle it.
4793         (TINST_LOCATION): New accessor macro.
4794         (make_tinst_level): New prototype.
4795         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4796         * decl.c (cp_tree_node_structure): Likewise.
4797         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4798         (print_instantiation_partial_context): Likewise.
4799         * pt.c (pop_tinst_level): Likewise.
4800          (push_tinst_level): Use make_tinst_level.
4801         * tree.c (make_tinst_level): New function.
4802         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4803
4804 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
4805
4806         * parser.c (cp_parser_simple_type_specifier): Fix typo.
4807
4808         PR c++/16637
4809         * parser.c (cp_parser_simple_type_specifier): Do not record usage
4810         of globally-qualified names.
4811
4812 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4813
4814         PR c++/16175
4815         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4816         cv qualifier.
4817
4818 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4819
4820         PR c++/16623
4821         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4822         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4823         * class.c (add_implicitly_declared_members): Use
4824         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4825         * method.c (lazily_declare_fn): Clear
4826         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4827         * search.c (lookup_fnfields_1): Check it.
4828
4829 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4830
4831         * cp-tree.h (vec_binfo_member): Remove.
4832         * tree.c (vec_binfo_member): Remove.
4833
4834         * cp-tree.h (struct lang_type_class): Remove vfields field.
4835         (CLASSTYPE_VFIELDS): Remove.
4836         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4837         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4838         handling.
4839         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4840         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4841         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4842
4843 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4844
4845         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4846         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4847         Moved to common.
4848         (BINFO_LANG_SLOTS): Remove.
4849         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4850         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4851         * class.c (check_bases): Adjust BINFO accessors.
4852         (determine_primary_base, finish_struct_bits,
4853         maybe_warn_about_overly_private_class, warn_hidden,
4854         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4855         warn_about_ambiguous_bases, get_vfield_name,
4856         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4857         add_vcall_offset_vtbl_entries_r): Likewise.
4858         * dump.c (cp_dump_tree): Likewise.
4859         * init.c (sort_mem_initializers, expand_member_init, build_delete,
4860         push_base_cleanups): Likewise.
4861         * method.c (do_build_copy_constructor, do_build_assign_ref,
4862         synthesize_exception_spec): Likewise.
4863         name-lookup.c (arg_assoc_class): Likewise.
4864         * pt.c (instantiate_class_template,
4865         get_template_base_recursive): Likewise.
4866         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4867         * typeck2.c (process_init_constructor): Likewise.
4868         * search.c (lookup_base_r, dynamic_cast_base_recurse,
4869         dfs_access_in_type, dfs_walk_real, look_for_overrides,
4870         types_overlap_p, copied_binfo, original_binfo): Likewise.
4871         (binfo_for_vtable): Remove
4872
4873 2004-07-20  Steven Bosscher  <stevenb@suse.de>
4874
4875         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4876         thunk_alias, and the access and virtual_offset fields.
4877         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4878         * decl.c (finish_case_label): Update c_add_case_node call.
4879
4880 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4881
4882         Revert patch for PR c++/16623.
4883
4884 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
4885
4886         * except.c: Remove two spurious carriage returns.
4887
4888 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4889
4890         PR c++/16623
4891         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4892         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4893         * class.c (add_implicitly_declared_members): Use
4894         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4895         * method.c (lazily_declare_fn): Clear
4896         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4897         * search.c (lookup_fnfields_1): Check it.
4898
4899 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
4900
4901         * class.c (add_method): Delay adding the slot until the end.
4902         (determine_primary_base): Adjust VEC_iterate invokation.
4903         (resort_type_method_vec, finish_struct_methods, warn_hidden,
4904         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4905         build_vtbl_initializer): Likewise.
4906         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4907         build_vbase_delete): Likewise.
4908         * method.c (do_build_copy_constructor): Likewise.
4909         * name-lookup.c (new_class_binding, print_binding_level,
4910         poplevel_class, store_class_bindings, push_to_top_level,
4911         pop_from_top_level): Likewise.
4912         * pt.c (check_explicit_specialization): Likewise.
4913         * search.c (lookup_conversion_operator, lookup_fnfields_1,
4914         get_pure_virtuals, add_conversions, dfs_check_overlap,
4915         binfo_for_vbase): Likewise.
4916
4917 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4918
4919         PR c++/12170
4920         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4921         innermost set of template arguments during deduction.  Simplify.
4922
4923 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
4924
4925         * typeck.c (build_modify_expr, build_x_modify_expr): Set
4926         TREE_NO_WARNING on assignments with an operator other than '='.
4927
4928 2004-07-10  Steven Bosscher  <stevenb@suse.de>
4929             Joseph S. Myers  <jsm@polyomino.org.uk>
4930
4931         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4932         * decl2.c (grokfield): Don't check current_class_depth via
4933         unused TREE_COMPLEXITY.
4934         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4935         to avoid the missing parentheses warning.
4936         Don't set C_SET_EXP_ORIGINAL_CODE.
4937
4938 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
4939
4940         * tree.c (no_linkage_helper): Remove.
4941         (no_linkage_check): Don't use walk_tree_without_duplicates.
4942
4943         * mangle.c (write_expression): Issue a sorry for zero-operand
4944         functional casts.
4945
4946 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4947
4948         PR c++/13092
4949         * init.c (build_offset_ref): Build SCOPE_REF with non-null
4950         TREE_TYPE for non-dependent names.
4951         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4952         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4953         unknown_type_node as its TREE_TYPE.
4954         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4955         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4956         (dump_expr) <SCOPE_REF case>: Likewise.
4957
4958 2004-07-17  Jason Merrill  <jason@redhat.com>
4959
4960         PR c++/16115
4961         * call.c (type_passed_as): Make the invisible reference type
4962         __restrict.
4963         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4964         cp_genericize_r.  Handle invisible reference lowering.
4965         (is_invisiref_parm): New fn.
4966         (cp_genericize): Adjust the types of invisible reference parms.
4967         Don't repeat the walk for clones.
4968         * decl.c (store_parm_decls): Don't generate any code for clones.
4969
4970 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
4971
4972         * cp-tree.h (builtin_function): Declare.
4973
4974 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
4975
4976         * class.c (finish_struct_methods): Remove unncessary code.
4977         (add_implicitly_declared_members): Create declarations for default
4978         constructors and copy constructors lazily.
4979         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
4980         lazy_copy_ctor.
4981         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
4982         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
4983         * decl2.c (check_classfn): Robustify.
4984         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
4985         (locate_ctor): Handle lazy default constructors.
4986         (locate_copy): Handle lazy copy constructors.
4987         (implicitly_declare_fn): Make sure we're looking at the
4988         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
4989         set TYPE_HAS_CONSTRUCTOR.
4990         (lazily_declare_fn): New function.
4991         * name-lookup.c (constructor_name_full): Simplify.
4992         * search.c (lookup_fnfields_1): Lazily create methods, as
4993         necessary.
4994         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
4995
4996 2004-07-16  Steven Bosscher  <stevenb@suse.de>
4997
4998         * cp-tree.h (struct lang_type): Don't have three GTY options on a
4999         single bit GTY desc.
5000
5001 2004-07-16  Richard Henderson  <rth@redhat.com>
5002
5003         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
5004         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
5005         * tree.c (cp_copy_res_decl_for_inlining): Remove.
5006
5007 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
5008
5009         * class.c (finish_struct_bits): Use for loop.
5010         (propagate_binfo_offsets): Do primary binfo outside of loop.
5011
5012         PR c++/16583
5013         * dump.c (cp_dump_tree): Don't dump the bases if there's no
5014         binfo.
5015
5016         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
5017
5018 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
5019
5020         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
5021         has_abstract_assign_ref.  Make methods a VEC(tree) *.
5022         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
5023         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
5024         (CLASSTYPE_DESTRUCTORS): Likewise.
5025         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
5026         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5027         (add_method): Change prototoype.
5028         * class.c (add_method): Remove error_p parameter.  Adjust for
5029         changes to CLASSTYPE_METHOD_VEC.
5030         (handle_using_decl): Adjust call to add_method.
5031         (maybe_warn_about_overly_private_class): Adjust for
5032         changes to CLASSTYPE_METHOD_VEC.
5033         (resort_type_method_vec): Likewise.
5034         (finish_struct_methods): Likewise.
5035         (check_for_override): Likewise.
5036         (warn_hidden): Likewise.
5037         (add_implicitly_declared_members): Defer creation of assignment
5038         operators.  Adjust call to add_method.
5039         (clone_function_decl): Adjust call to add_method.
5040         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
5041         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
5042         * decl.c (grok_special_member_properties): Don't set
5043         TYPE_HAS_ABSTRACT_ASSIGN_REF.
5044         * decl2.c (check_classfn): Adjust for
5045         changes to CLASSTYPE_METHOD_VEC.
5046         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
5047         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
5048         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
5049         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
5050         cp_finish_decl.
5051         * pt.c (check_explicit_specialization): Adjust for
5052         changes to CLASSTYPE_METHOD_VEC.
5053         (instantiate_class_template): Do not set
5054         TYPE_HAS_ABSTRACT_ASSIGN_REF.
5055         * ptree.c (cxx_print_type): Don't try to print
5056         CLASSTYPE_METHOD_VEC.
5057         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
5058         * search.c (lookup_field_r): Adjust for
5059         changes to CLASSTYPE_METHOD_VEC.
5060         (lookup_fnfields): Likewise.
5061         (lookup_conversion_operator): Likewise.
5062         (lookup_fnfields_1): Likewise.  Create assignment operators
5063         lazily.
5064         (look_for_overrides_here): Adjust for
5065         changes to CLASSTYPE_METHOD_VEC.
5066         (add_conversions): Likewise.
5067         * semantics.c (finish_member_declaration): Adjust call to add_method.
5068
5069 2004-07-15  Jason Merrill  <jason@redhat.com>
5070
5071         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
5072         references and pointers are compatible.
5073
5074 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
5075
5076         * decl.c (xref_basetypes): Refactor.
5077         * tree.c (copy_base_binfos): Replace with ...
5078         (copy_binfo): ... this. Deep copy the given binfo, (not the just
5079         bases of the given base).
5080         * cp-tree.h (copy_base_binfo): Remove.
5081         (copy_binfo): Declare.
5082
5083 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
5084
5085         * name-lookup.c (set_inherited_value_binding_p): Add class_type
5086         parameter.
5087         (get_class_binding): Adjust.
5088         (push_class_level_binding): Don't use set_inherited_value_binding_p.
5089
5090 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
5091
5092         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
5093         * decl.c (xref_basetypes): Set it here.
5094
5095         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
5096         Don't check for incomplete base.
5097         (get_vfield_name): Simplify while loop.
5098         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
5099
5100 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
5101
5102         * lex.c (cxx_make_type): Remove call to get_pointer_type.
5103
5104         * cp-tree.h (IDENTIFIER_VALUE): Remove.
5105         (BINFO_PUSHDECLS_MARKED): Likewise.
5106         (maybe_inject_for_scope_var): Likewise.
5107         (push_class_decls): Likewise.
5108         * name-lookup.h (push_class_binding): Remove.
5109         (innermost_non_namespace_value): New function.
5110         (outer_binding): Likewise.
5111         * class.c (add_method): Push bindings before adding to
5112         TYPE_METHODS.
5113         (restore_class_cache): Do not restore class_shadowed.
5114         (pushclass): Do not add USING_DECLs.  Do not call
5115         push_class_decls.
5116         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
5117         * decl.c (pushdecl): Use outer_binding.
5118         (poplevel): Set the scope for an out-of-scope for-loop declaration
5119         appropriately.
5120         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5121         * name-lookup.c (new_class_binding): New function.
5122         (push_binding): Use it.
5123         (pushdecl): Use innermost_non_namespace_value.
5124         (maybe_inject_for_scope_var): Remove.
5125         (push_class_binding): Remove.
5126         (set_inherited_value_binding_p): New function.
5127         (get_class_binding): New function.
5128         (push_class_level_binding): Assert that the current_class_type is
5129         being defined.
5130         (outer_binding): New function.
5131         (innermost_non_namespace_value): Likewise.
5132         (lookup_name_real): Use outer_binding.
5133         (lookup_name_current_level): Ignore out-of-scope variables.
5134         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5135         (lookup_template_class): Likewise.
5136         * search.c (dfs_push_type_decls): Remove.
5137         (dfs_push_decls): Likewise.
5138         (setup_class_bindings): Likewise.
5139         (lookup_field_1): Handle USING_DECLs from dependent scopes.
5140         (marked_pushdecls_p): Remove.
5141         (unmarked_pushdecls_p): Remove.
5142         (marked_identifiers): Remove.
5143         (setup_class_bindings): Remove.
5144         (dfs_push_type_decls): Remove.
5145         (dfs_push_decls): Remove.
5146         (push_class_decls): Remove.
5147
5148 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
5149
5150         PR c++/16518
5151         PR c++/16337
5152         * decl.c (grokvardecl): Make declspecs parameter const.
5153         (grokdeclarator): Likewise.  Adjust accordingly.
5154         * decl.h (grokdeclarator): Adjust declaration.
5155         * parser.c (cp_parser_init_declarator): Do not clear
5156         decl_specifiers->attributes.
5157
5158         * cp-tree.h (lang_identifier): Remove class_value.
5159         (IDENTIFIER_CLASS_VALUE): Remove.
5160         (pop_class_decls): Likewise.
5161         (init_search_processing): Likewise.
5162         * class.c (handle_using_decl): Use lookup_member, not
5163         IDENTIFIER_CLASS_VALUE.
5164         (restore_class_cache): New function, split out from ...
5165         (pushclass): ... here.  Do not call clear_identifier_class_values.
5166         (invalidate_class_lookup_cache): Do not clear
5167         IDENTIFIER_CLASS_VALUE.
5168         (popclass): Do not call pop_class_decls.
5169         (maybe_note_name_used_in_class): Do not save names looked up after
5170         the class is complete.  Use lookup_member, not
5171         IDENTIFIER_CLASS_VALUE.
5172         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5173         * decl.c (cxx_init_decl_processing): Do not call
5174         init_search_processing.
5175         * method.c (do_build_copy_constructor): Remove unnecessary code.
5176         (do_build_assign_ref): Likewise.
5177         * name-lookup.c (pushdecl): Use lookup_member, not
5178         IDENTIFIER_CLASS_VALUE.
5179         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5180         type_shadowed list.
5181         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5182         (push_class_binding): Do not set it.
5183         (clear_identifier_class_values): Remove.
5184         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5185         (store_binding): Do not save it.
5186         (pop_from_top_level): Do not restore it.
5187         * name-lookup.h (cxx_saved_binding): Remove class_value.
5188         (clear_identifier_class_values): Remove.
5189         * ptree.c (cxx_print_identifier): Do not print
5190         IDENTIFIER_CLASS_VALUE.
5191         * search.c (search_obstack): Remove.
5192         (push_stack_level): Remove.
5193         (pop_stack_level): Remove.
5194         (search_level): Remove.
5195         (search_stack): Remove.
5196         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5197         (setup_class_bindings): Use IDENTIFIER_MARKED, not
5198         IDENTIFIER_CLASS_VALUE.
5199         (marked_identifiers): New variable.
5200         (push_class_decls): Clear IDENTIFIER_MARKED.
5201         (pop_class_decls): Don't call pop_search_level.
5202         (init_search_processing): Remove.
5203
5204 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
5205
5206         * cp-tree.h (get_aggr_typedef): Remove.
5207         * init.c (get_aggr_typedef): Likewise.
5208
5209         * name-lookup.c (push_class_level_binding): Simplify.
5210
5211 2004-07-12  Andrew Pinski  <apinski@apple.com>
5212
5213         PR c++/16475
5214         Revert:
5215         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
5216                 PR c++/16276
5217                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5218                 is not public.
5219
5220 2004-07-12  Eric Christopher  <echristo@redhat.com>
5221
5222         * parser.c (cp_parser_class_head): Remove unused variable.
5223
5224 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5225
5226         * decl.c (grok_op_properties): Reject [de-]allocation functions
5227         declared in a namespace, or declared as static.
5228
5229 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
5230
5231         * cp-tree.h (make_binfo): Remove.
5232         * decl.c (xref_basetypes): Use make_tree_binfo directly.
5233         * tree.h (copy_base_binfos): Likewise.
5234         (make_binfo): Remove.
5235
5236         * call.c (build_user_type_conversion_1, build_new_op,
5237         check_constructor_callable, build_temp,
5238         perform_direct_initialization_of_possible): Pass type directly to
5239         lookup_fnfields & build_special_member_call.
5240         (build_special_member_call): Accept a type, and complete it.
5241         * class.c (finish_stuct_bits): Copy the BINFOs here.
5242         * cvt.c (ocp_convert): Pass type directly to
5243         build_special_member_call.
5244         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5245         (xref_basetypes): Allocate the binfo here. Adjust.
5246         * init.c (build_init, build_new_1): Pass type directly to
5247         build_special_member_call.
5248         * lex.c (cxx_make_type): Do not allocate binfo here.
5249         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5250         * parser.c (cp_parser_class_head): Always call xref_basetypes.
5251         * pt.c (instantiate_class_template): Likewise. Inhibit access
5252         checking for template friends.
5253         * ptree.c (cxx_print_type): Adjust record printing.
5254         * search.c (lookup_base): When taking a type, complete it before
5255         looking for a binfo.
5256         (lookup_member): Delay completing a type.
5257         (push_class_decls): Don't walk an incomplete type.
5258         (lookup_conversions): Likewise.
5259         * semantics.c (finish_stmt_expr_expr): Pass type directly to
5260         build_special_member_call.
5261         * tree.c (copy_base_binfos): Adjust.
5262         (make_binfo): Likewise.
5263         * typeck.c (build_modify_expr): Pass type directly to
5264         build_special_member_call.
5265         * typeck2.c (process_init_constructor): Check a binfo exists.
5266         (build_m_component_ref): Allow accessing an incomplete type.
5267         (build_functional_cast): Pass type directly to
5268         build_special_member_call.
5269
5270 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5271
5272         PR c++/2204
5273         * config-lang.in (gtfiles): Add typeck2.c.
5274         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5275         gt-cp-typeck2.h.
5276         * cp-tree.h: Declare complete_type_check_abstract.
5277         * typeck2.c (pat_calc_hash, pat_compare,
5278         complete_type_check_abstract): New functions.
5279         (abstract_virtuals_error): If the type is abstract, register the
5280         declaration within abstract_pending_vars for further checks.
5281         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5282         * decl.c (cp_finish_decl): Do not strip array types.
5283         (create_array_type_for_decl): Check for abstractness of the element
5284         type.
5285         (complete_vars): Call complete_type_check_abstract.
5286         * class.c (finish_struct): Prepare a list of virtual functions for
5287         template types, and call complete_vars on it to check for abstractness.
5288
5289 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
5290
5291         PR tree-optimization/14107
5292         * decl.c (finish_function): Remove temporary band-aid.
5293
5294 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
5295
5296         * call.c (build_operator_new_call): Avoid using push_to_top_level.
5297         (build_new_op): Adjust call to lookup_function_nonclass.
5298         * name-lookup.c (identifier_type_value): Adjust call to
5299         lookup_name_real.
5300         (lookup_name_real): Add block_p parameter.
5301         (lookup_name_nonclass): Adjust call to lookup_name_real.
5302         (lookup_function_nonclass): Likewise.
5303         (lookup_name): Likewise.
5304         * name-lookup.h (lookup_name_real): Change prototype.
5305         (lookup_name_nonclass): Likewise.
5306         * parser.c (cp_parser_lookup_name): Likewise.
5307
5308         * cp-tree.h (saved_scope): Make old_bindings a vector.
5309         (unuse_fields): Remove.
5310         * name-lookup.h (cxx_saved_binding): Define it.
5311         * class.c (pushclass): Don't use unuse_fields.
5312         * name-lookup.c (cxx_saved_binding_make): Remove.
5313         (store_binding): Add new bindings to a vector, using an
5314         accumulator style, rather than adding them to a list.
5315         (store_bindings): Adjust accordingly.
5316         (store_class_bindings): Likewise.
5317         (push_to_top_level): Likewise.
5318         (pop_from_top_level): Likewise.
5319         * optimize.c (maybe_clone_body): Must push_to_top_level and
5320         pop_from_top_level calls outside of loop.
5321         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5322         calls here from cp_parser_late_parsing_default_args.
5323         (cp_parser_save_default_args): Record the class type in which the
5324         function is declared.
5325         (cp_parser_late_parsing_default_args): Do not call
5326         push_nested_class/pop_nested_class.
5327         * search.c (dfs_unuse_fields): Remove.
5328         (unuse_fields): Remove.
5329
5330 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5331
5332         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5333         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5334         * cp-tree.h (poplevel): Declare.
5335         (set_block): Remove.
5336         * decl.c (set_block): Remove.
5337
5338 2004-07-10  Mike Stump  <mrs@apple.com>
5339
5340         * decl2.c (import_export_class): Never export/import vtables
5341         with inline key functions.
5342
5343 2004-07-09  Steven Bosscher  <stevenb@suse.de>
5344
5345         * typeck.c (c_expand_asm_operands): Remove.
5346
5347 2004-07-09  Mike Stump  <mrs@apple.com>
5348
5349         * typeck.c (build_class_member_access_expr): Skip null deref
5350         warning when we don't dereference it.
5351
5352 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5353
5354         PR c++/8211
5355         PR c++/16165
5356         * class.c (check_field_decls): Improve -Weffc++ warning: do not
5357         warn for pointers to functions/members, or for classes without
5358         destructors.
5359
5360 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
5361
5362         * name-lookup.h (struct cp_binding_level): Update documentation
5363         for class_shadowed.
5364
5365 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5366
5367         PR c++/16169
5368         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5369         returning CALL_EXPR, and non-reference return type.
5370
5371 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
5372
5373         * name-lookup.c (push_binding): Use VEC_reserve.
5374
5375 2004-07-08  Richard Henderson  <rth@redhat.com>
5376
5377         * cp-tree.h (expand_eh_spec_block): Remove.
5378
5379 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
5380
5381         * cp-tree.h (saved_scope): Remove x_previous_class_type and
5382         x_previous_class_values; add x_previous_class_level.
5383         (previous_class_type): Remove.
5384         (previous_class_values): Remove.
5385         (previous_class_level): New macro.
5386         * class.c (pushclass): Restore the identifier cache more
5387         expeditiously.
5388         (invalidate_class_lookup_cache): Use vector for class_shadowed and
5389         previous_class_values.
5390         * decl.c (poplevel): Likewise.
5391         * name-lookup.c (cxx_binding_init): New function.
5392         (cxx_binding_make): Use it.
5393         (push_binding): For a binding in a class level, use a vector of
5394         cp_class_binding nodes.
5395         (push_binding_level): New function.
5396         (begin_scope): Use it.
5397         (leave_scope): Do not put class binding levels on the free list.
5398         (print_binding_level): Adjust for the fact that class_shadowed is
5399         a vector.
5400         (poplevel_class): Likewise.
5401         (clear_identifier_class_values): Likewise.
5402         (push_class_level_binding): Likewise.
5403         (set_class_shadows): Remove.
5404         (store_binding): New function.
5405         (store_class_bindings): New function.
5406         (push_to_top_level): Use store_class_bindings as appropriate.
5407         (pop_from_top_level): Use previous_class_level, not
5408         previous_class_type.
5409         * name-lookup.h (cp_class_binding): New type.
5410         (cp_binding_level): Use a vector object for class_shadowed.
5411         (push_binding_level): Declare.
5412         (set_class_shadows): Remove.
5413
5414 2004-07-07  Andrew Pinski  <apinski@apple.com>
5415
5416         * class.c (instantiate_type): BUFFER_REF is dead.
5417         * lex.c (init_operators): IN_EXPR is dead.
5418
5419 2004-07-07  Jason Merrill  <jason@redhat.com>
5420
5421         PR c++/16334
5422         * call.c (build_new_op): Give overload warnings for built-in
5423         candidates.
5424
5425 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
5426
5427         PR c++/16276
5428         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5429         is not public.
5430
5431 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5432
5433         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5434         * class.c (build_primary_vtable, check_bases,
5435         determine_primary_base, finish_struct_bits,
5436         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5437         get_basefndecls, warn_hidden, walk_subobject_offsets,
5438         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5439         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5440         finish_struct_1, get_vfield_name, contains_empty_class_p,
5441         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5442         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5443         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5444         BINFO macros.
5445         * decl.c (xref_basetypes): Likewise.
5446         * dump.c (cp_dump_tree): Likewise.
5447         * error.c (dump_expr): Likewise.
5448         * init.c (sort_mem_initializers, expand_member_init,
5449         push_base_cleanups): Likewise.
5450         * method.c (do_build_copy_constructor, do_build_assign_reg,
5451         synthesize_exception_spec): Likewise.
5452         * name-lookup.c (arg_assoc_class): Likewise.
5453         * pt.c (instantiate_class_template, tsubst,
5454         get_template_base_recursive): Likewise.
5455         * ptree.c (cxx_print_type): Likewise.
5456         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5457         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5458         dfs_access_in_type, access_in_type, lookup_field_queue_p,
5459         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5460         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5461         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5462         binfo_for_vtable, copied_binfo, original_binfo): Likewise
5463         * tree.c (copy_base_binfos, make_binfo): Likewise.
5464         * typeck.c (commmon_base_type): Likewise
5465         * typeck2.c (process_init_constructor): Likewise
5466
5467 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
5468
5469         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5470
5471 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5472
5473         PR c++/3671
5474         * pt.c (convert_nontype_argument): Disallow conversions between
5475         different enumeration types.
5476
5477 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5478
5479         * cp-tree.h (BINFO_MARKED): Remove.
5480         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5481         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5482         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5483         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5484         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5485         (mark_primary_bases, determine_primary_base, base_derived_from,
5486         dfs_find_final_overrider, dfs_find_final_overrider_q,
5487         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5488         dfs_modify_vtables, walk_subobject_offsets,
5489         layout_nonempty_base_or_field, build_base_field,
5490         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5491         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5492         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5493         build_ctor_vtbl_group, accumulate_vtble_inits,
5494         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5495         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5496         add_vcall_offset_vtbl_entries_1): Likewise.
5497         * decl.c (xref_basetypes): Incomming virtual base indicated by
5498         TREE_TYPE. Adjust.
5499         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5500         * init.c (finish_init_stmts, sort_mem_initializers,
5501         emit_mem_initializers, build_vtble_address, expand_member_init,
5502         push_base_cleanups): Likewise.
5503         * method.c (do_build_copy_constructor): Likewise.
5504         * pt.c (instantiate_class_template,
5505         get_template_base_recursive): Likewise.
5506         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5507         get_pseudo_ti_desc): Likewise.
5508         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5509         binfo_from_vbase, binfo_via_virtual, copied_binfo,
5510         original_binfo): Likewise.
5511         * semantics.c (finish_base_specifier): Virtualness is indicated
5512         by TREE_TYPE.
5513         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5514
5515 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
5516
5517         Revert:
5518         2004-06-24  Jason Merrill  <jason@redhat.com>
5519         PR c++/16115
5520         * decl.c (grokparms): Give the PARM_DECL reference type if the
5521         parameter is passed by invisible reference.
5522
5523 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5524
5525         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5526         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5527         * pt.c (check_instantiated_args, unify): Likewise.
5528
5529 2004-07-05  Phil Edwards  <phil@codesourcery.com>
5530
5531         * Make-lang.in (check-c++, lang_checks):  Add some comments.
5532
5533 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5534
5535         * cp-mudflap.c: Delete file.
5536         * Makefile.in: Remove all references to cp-mudflap.o.
5537
5538 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5539
5540         * decl.c (cxx_init_decl_processing): Call
5541         build_common_tree_nodes before creating the global NAMESPACE_DECL.
5542
5543 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5544
5545         PR c++/2518
5546         * call.c (build_operator_new_call): Look only at global scope.
5547
5548 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5549
5550         * call.c (enforce_access): Expect TREE_BINFO.
5551         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5552         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5553         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5554         Adjust.
5555         (BINFO_LANG_ELTS): Remove.
5556         (BINFO_LANG_SLOTS): New.
5557         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5558         (CLASSTYPE_TEMPLATE_INFO): Adjust.
5559         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5560         * search.c (lookup_member): Check TREE_BINFO.
5561         * semantics.c (perform_or_defer_access_check): Likewise.
5562         (check_accessibility_of_qualified_id): Check
5563         deferred_access_no_check.
5564         * tree.c (make_binfo): Use make_tree_binfo.
5565
5566 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
5567
5568         * method.c (implicitly_declare_fn): Set linkage of generated
5569         functions.
5570
5571 2004-07-04  Richard Henderson  <rth@redhat.com>
5572
5573         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5574
5575 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
5576
5577         PR c++/3761
5578         * name-lookup.c (push_class_level_binding): Don't pass a
5579         TREE_LIST of ambiguous names to check_template_shadow as it
5580         only handles declarations. Instead, pull the declaration
5581         out and pass that.
5582
5583 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5584
5585         PR c++/14971
5586         * pt.c (check_explicit_specialization): Clarify error message.
5587
5588 2004-07-02  Richard Henderson  <rth@redhat.com>
5589
5590         * tree.c (cp_unsave_r): Update remap_save_expr call.
5591
5592 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
5593
5594         PR c++/16240
5595         * mangle.c (write_template_arg): Correct mangling.
5596
5597         PR c++/16297
5598         * decl.c (grokdeclarator): Robustify.
5599
5600 2004-07-01  Richard Henderson  <rth@redhat.com>
5601
5602         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5603         * method.c (synthesize_method): Don't clear_last_expr.
5604         * name-lookup.c (maybe_push_cleanup_level): Likewise.
5605
5606 2004-07-01  Nick Clifton  <nickc@redhat.com>
5607
5608         * decl2.c (import_export_class): Invoke the
5609         import_export_class field in the gcc_target structure if it is not
5610         empty.
5611
5612 2004-06-30  Richard Henderson  (rth@redhat.com>
5613
5614         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5615         * method.c (use_thunk): Likewise.
5616
5617 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5618
5619         * call.c (build_over_call), typeck.c (build_function_call): Call
5620         check_function_arguments instead of check_function_format.
5621
5622 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5623
5624         * call.c (build_over_call), typeck.c (build_function_call): Update
5625         calls to check_function_format.
5626
5627 2004-06-30  Richard Henderson  <rth@redhat.com>
5628
5629         * call.c (build_over_call): Use __builtin_memcpy for copying
5630         CLASS_AS_BASE rather than funny casting.
5631
5632 2004-06-30  Richard Henderson  <rth@redhat.com>
5633
5634         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5635         TYPE_SIZE_UNIT of full_type.
5636
5637 2004-06-30  Per Bothner  <per@bothner.com>
5638
5639         Conditionally compile support for --enable-mapped_location.
5640         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
5641         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
5642         adjustments - which I don't understand.
5643         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
5644         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
5645         (print_instantiation_partial_context):  Use expand_location.
5646         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
5647         * name-lookup.c:  Likewise.
5648         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
5649         * name-lookup.c:  Use input_line macro.
5650         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
5651         (cp_parser_statement):  Rename locaal variable statement_locus to
5652         statement_location and use SET_EXPR_LOCATION macro.
5653         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
5654         * tree.c (cp_walk_subtrees):  Likewise.
5655
5656 2004-06-29  Per Bothner  <per@bothner.com>
5657
5658         * tree.c (build_min_nt, build_min, build_min_non_dep):
5659         Don't set TREE_COMPLEXITY from input_line.
5660
5661 2004-06-29  Paul Brook  <paul@codesourcery.com>
5662
5663         * init.c: Include target.h.
5664         (get_cookie_size): Remove and replace with target hook.
5665         Update callers.
5666         (build_new_1): Store the element size in the cookie.
5667
5668 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
5669
5670         PR c++/16260
5671         * parser.c (cp_parser_template_declaration_after_export): Disable
5672         access checks here ...
5673         (cp_parser_class_specifier): ... not here.
5674
5675 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5676
5677         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5678         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5679         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5680         TREE_CHECK macro.
5681
5682 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5683
5684         * cp-tree.h (struct deferred_access): Move to ...
5685         * semantics.c (struct deferred_access): ... here. Adjust.
5686         (deferred_access_stack): Make a VEC(deferred_access),
5687         (deferred_access_free_list): Remove.
5688         (deferred_access_no_check): New.
5689         (push_deferring_access_checks, resume_deferring_access_checks,
5690         stop_deferring_access_checks, pop_deferring_access_checks,
5691         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5692         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5693
5694 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5695
5696         PR c++/16174
5697         * call.c (build_temp): Declare.
5698         (check_constructor_callable): New.
5699         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5700         CONSTRUCTOR_CALLABLE.
5701         (convert_like_real, initialize_reference): Use
5702         check_constructor_callable.
5703         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5704         (LOOKUP_*): Renumber.
5705
5706 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5707
5708         * friend.c (add_friend): Only perform access checks when context
5709         is a class.
5710         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5711         * parser.c (cp_parser_class_specifier): Disable access checks here
5712         when parsing the body of a templated class.
5713         * semantics.c (perform_or_defer_access_checks): Reorder to allow
5714         NULL binfos when not checking access.
5715
5716 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5717
5718         Use vector API for vbase list.
5719         * cp-tree.h: Include vec.h
5720         (DEF_VEC_P (tree)): New type.
5721         (struct lang_type_class): Change vbase's member type.
5722         (binfo_for_vbase): Declare.
5723         * class.c (determine_primary_base, base_derived_from,
5724         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5725         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5726         build_vtbl_initializer): Adjust.
5727         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5728         vbases.
5729         * init.c (sort_mem_initializers, expand_member_init,
5730         push_base_cleanups): Adjust.
5731         * method.c (do_build_copy_constructor): Adjust.
5732         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5733         (binfo_for_vbase): New.
5734         * tree.c (copy_base_binfos): Adjust.
5735
5736 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
5737
5738         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5739
5740 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5741
5742         PR c++/14123
5743         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5744         paranthesis in case of pointers to array members.
5745         * error.c (dump_type_prefix): Likewise.
5746         (dump_type_suffix): Maybe issue a whitespace when printing
5747         ARRAY_TYPE.
5748
5749 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
5750
5751         PR c++/16193
5752         * parser.c (cp_parser_set_decl_spec_type): Refine test for
5753         redefinition of built-in types.
5754
5755 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5756
5757         * error.c (pp_template_argument_list_start): Remove.
5758         (pp_template_argument_list_end): Likewise.
5759         (pp_separate_with_comma): Use pp_cxx_separate_with.
5760         (reinit_global_formatting_buffer): Remove.
5761         (pp_non_consecutive_character): Likewise.
5762         (dump_scope): Use pp_cxx_colon_colon.
5763         (dump_template_parameter): Use pp_cxx_identifier,
5764         pp_cxx_tree_identifier and pp_cxx_whitespace.
5765         (dump_templat_bindings): Replace use of pp_string with sequence
5766         of pp_cxx_whitespace and pp_equal.
5767         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5768         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
5769         padding here.
5770         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5771         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
5772         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5773         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5774         pp_cxx_right_bracket, pp_cxx_identifier throughout,
5775         (dump_decl): Likewise.
5776         (dump_template_decl): Likewise.
5777         (dump_function_decl): Likewise.  Set padding as appropriate.
5778         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5779         pp_cxx_right_paren.
5780         (dump_exception_spec): Likewise.
5781         (dump_function_name): Use pp_cxx_tree_identifier and
5782         pp_cxx_identifier.
5783         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5784         pp_cxx_end_template_argument_list.
5785         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5786         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5787         pp_cxx_whitespace throughout.
5788         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5789         pp_cxx_right_paren.
5790         (dump_unary_op): Likewise.
5791         (reinit_cxx_pp): New function.
5792         (type_as_string); Use it.
5793         (expr_as_string): Likewise.
5794         (decl_as_string); Likewise.
5795         (context_as_string): Likewise.
5796         (lang_decl_name): Likewise.
5797         (decl_to_string): Likewise.
5798         (expr_to_string): Likewise.
5799         (parm_to_string): Likewise.
5800         (type_to_string): Likewise.
5801         (args_to_string): Likewise.
5802         (cv_to_string): Likewise.
5803
5804 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
5805
5806         * cp-tree.h (cp_cv_quals): New type.
5807         (cp_declarator): Use it instead of "tree" as appropriate.
5808         (grok_method_quals): Adjust prototype.
5809         (grokclassfn): Likewise.
5810         (do_friend): Likewise.
5811         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5812         (grokdeclarator): Likewise.
5813         * decl2.c (grok_method_quals): Likewise.
5814         (grokclassfn): Likewise.
5815         * friend.c (do_friend): Likewise.
5816         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5817         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5818         (make_pointer_declarator): Likewise.
5819         (make_reference_declarator): Likewise.
5820         (make_ptrmem_declarator): Likewise.
5821         (cp_parser_ptr_operator): Likewise.
5822         (cp_parser_cv_qualifier_seq_opt): Likewise.
5823         (cp_parser_cv_qualifier_opt): Remove.
5824         (cp_parser_new_declarator_opt): Adjust call to
5825         cp_parser_ptr_operator.
5826         (cp_parser_conversion_declaration_opt): Likewise.
5827         (cp_parser_declarator): Use cp_cv_quals, not tree.
5828         (cp_parser_direct_declarator): Likewise.
5829
5830 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5831
5832         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5833         Rename DECL_STMT to DECL_EXPR.
5834         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5835         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5836         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5837
5838 2004-06-26  Jan Hubicka  <jh@suse.cz>
5839
5840         PR C++/14865
5841         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
5842         reachability analysis.
5843
5844 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
5845
5846         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5847         2004-06-23 change.
5848
5849 2004-06-25  Paul Brook  <paul@codesourcery.com>
5850
5851         * decl2.c (get_guard): Call targetm.cxx.guard_type.
5852         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5853
5854 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
5855
5856         * decl.c (grokdeclarator): Restore error messages about __thread.
5857         * parser.c (cp_parser_decl_specifier_seq): Likewise.
5858
5859 2004-06-24  Jason Merrill  <jason@redhat.com>
5860
5861         PR c++/16115
5862         * decl.c (grokparms): Give the PARM_DECL reference type if the
5863         parameter is passed by invisible reference.
5864
5865 2004-06-24  Andreas Schwab  <schwab@suse.de>
5866
5867         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5868
5869 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
5870
5871         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5872         (cp/decl.o): Likewise.
5873         (cp/decl2.o): Likewise.
5874         (cp/pt.o): Likewise.
5875         (cp/semantics.o): Likewise.
5876         * config-lang.in (gtfiles): Do not reference cp/lex.h.
5877         * class.c: Do not include lex.h.
5878         (add_implicitly_declared_members): Do not use
5879         adding_implicit_members.
5880         (check_bases_and_members): Do not talk about grok_x_components.
5881         * cp/cp-tree.h (adding_implicit_members): Remove.
5882         (cp_storage_class): New type.
5883         (cp_decl_spec): Likewise.
5884         (cp_decl_specifier_seq): Likewise.
5885         (cp_parameter_declarator): Use it for the decl_specifiers field.
5886         (check_tag_decl): Adjust prototype.
5887         (shadow_tag): Likewise.
5888         (groktypename): Likewise.
5889         (start_decl): Likewise.
5890         (start_function): Likewise.
5891         (start_method): Likewise.
5892         (grok_x_components): Remove.
5893         (grokfield): Adjust prototype.
5894         (grokbitfield): Likewise.
5895         (finish_member_class_template): Remove.
5896         * decl.c: Do not include lex.h.
5897         (adding_implicit_members): Do not define.
5898         (check_tag_decl): Do not use trees to represent decl-specifiers.
5899         (shadow_tag): Likewise.
5900         (groktypename): Likewise.
5901         (start_decl): Likewise.
5902         (grokvardecl): Likewise.
5903         (grokdeclarator): Likewise.
5904         (grokparms): Likewise.
5905         (start_function): Likewise.
5906         (start_method): Likewise.
5907         * decl.h (grokdeclarator): Adjust prototype.
5908         * decl2.c: Do not include lex.h.
5909         (grok_x_components): Remove.
5910         (grokfield): Do not use trees to represent decl-specifiers.
5911         (grokbitfield): Likewise.
5912         * lex.c: Do not include lex.h.
5913         * lex.h: Remove.
5914         * parser.c: Include target.h.
5915         (clear_decl_specs): New function.
5916         (cp_parser_translation_unit): Do not use trees to represent
5917         decl-specifiers.
5918         (cp_parser_postfix_expression): Likewise.
5919         (cp_parser_new_type_id): Likewise.
5920         (cp_parser_condition): Likewise.
5921         (cp_parser_simple_declaration): Likewise.
5922         (cp_parser_decl_specifier_seq): Likewise.
5923         (cp_parser_function_specifier_opt): Likewise.
5924         (cp_parser_conversion_type_id): Likewise.
5925         (cp_parser_template_parameter): Likewise.
5926         (cp_parser_explicit_instantiation): Likewise.
5927         (cp_parser_type_specifier): Likewise.
5928         (cp_parser_simple_type_specifier): Likewise.
5929         (cp_parser_init_declarator): Likewise.
5930         (cp_parser_type_id): Likewise.
5931         (cp_parser_type_specifier_seq): Likewise.
5932         (cp_parser_parameter_declaration): Likewise.
5933         (cp_parser_member_declaration): Likewise.
5934         (cp_parser_exception_declaration): Likewise.
5935         (cp_parser_function_definition_from_specifiers_and_declarator):
5936         Likewise.
5937         (cp_parser_single_declaration): Likewise.
5938         (cp_parser_save_member_function_body): Likewise.
5939         (cp_parser_friend_p): Likewise.
5940         (cp_parser_set_storage_class): New function.
5941         (cp_parser_set_decl_spec_type): Likewise.
5942         * pt.c: Do not include lex.h.
5943         * semantics.c: Likewise.
5944         (finish_member_class_template): Remove.
5945
5946 2004-06-23  Roger Sayle  <roger@eyesopen.com>
5947
5948         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
5949         longer take both "args" and "convert_args" as arguments.
5950         (build_op_delete_call): Update call to build_cxx_call.
5951         (build_over_call): Likewise, update call to build_cxx_call.
5952         * cp-tree.h (build_cxx_call): Update funtion prototype.
5953         * typeck.c (build_function_call): Don't call expand_tree_builtin.
5954         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5955         (throw_bad_typeid): Likewise.
5956         (build_dynamic_cast_1): Likewise.
5957
5958 2004-06-22  Richard Henderson  <rth@redhat.com>
5959
5960         * class.c (build_vfn_ref): Take a pointer not object.  Build
5961         an OBJ_TYPE_REF.
5962         (cp_fold_obj_type_ref): New.
5963         * call.c (build_over_call): Update build_vfn_ref call.
5964         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5965         * cp-tree.h (cp_fold_obj_type_ref): Declare.
5966
5967 2004-06-21  Jason Merrill  <jason@redhat.com>
5968
5969         PR c++/16112
5970         * cp-gimplify.c (cp_gimplify_init_expr): Look through
5971         CLEANUP_POINT_EXPR.
5972
5973 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
5974
5975         * cp-tree.def (NEW_EXPR): Add a fourth slot.
5976         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
5977         (TREE_PARMLIST): Likewise.
5978         (CALL_DECLARATOR_PARMS): Likewise.
5979         (CALL_DECLARATOR_QUALS): Likewise.
5980         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5981         (cp_declarator_kind): New type.
5982         (cp_parameter_declarator): Likewise.
5983         (cp_declarator): Likewise.
5984         (cp_error_declarator): Likewise.
5985         (no_parameters): Likewise.
5986         (groktypename): Change prototype.
5987         (start_decl): Likewise.
5988         (start_handler_parms): Likewise.
5989         (get_scope_of_declarator): Likewise.
5990         (start_function): Likewise.
5991         (start_preparsed_function): New function.
5992         (start_function): Change prototype.
5993         (start_method): Likewise.
5994         (grokfield): Likewise.
5995         (grokbitfield): Likewise.
5996         (build_new): Likewise.
5997         (make_pointer_declarator): Remove.
5998         (make_reference_declarator): Likewise.
5999         (make_call_declarator): Likewise.
6000         (set_quals_and_spec): Likewise.
6001         (process_template_parm): Change prototype.
6002         (begin_function_definition): Remove.
6003         (finish_parmlist): Remove.
6004         * decl.c (groktypename): Do not use trees to represent
6005         declarators.
6006         (start_decl): Likewise.
6007         (start_handler_parms): Remove.
6008         (get_scope_of_declarator): Reimplement.
6009         (grokdeclarator): Do not use trees to represent declarators.
6010         (grokparms): Likewise.
6011         (start_function): Likewise.
6012         (start_method): Likewise.
6013         (build_void_list_mode): Do not use TREE_PARMLIST.
6014         * decl.h (grokdeclarator): Change prototype.
6015         * decl2.c (grok_method_quals): Robustify.
6016         (grok_x_components): Do not use trees to represent declarators.
6017         (grokfield): Likewise.
6018         (grokbitfield): Likewise.
6019         (start_objects): Build FUNCTION_DECLs, not declarators.
6020         (start_static_storage_duration_function): Likewise.
6021         * init.c (build_new): Simplify.
6022         * lex.c (make_pointer_declarator): Remove.
6023         (make_reference_declarator): Likewise.
6024         (make_call_declarator): Likewise.
6025         (set_quals_and_spec): Likewise.
6026         * method.c (use_thunk): Use start_preparsed_function.
6027         (synthesize_method): Likewise.
6028         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
6029         * optimize.c (maybe_clone_body): Use start_preparsed_function.
6030         * parser.c (cp_error_declarator): New variable.
6031         (declarator_obstack): Likewise.
6032         (alloc_declarator): New function.
6033         (make_declarator): Likewise.
6034         (make_id_declarator): Likewise.
6035         (make_pointer_declarator): Likewise.
6036         (make_reference_declarator): Likewise.
6037         (make_ptrmem_declarator): Likewise.
6038         (make_call_declarator): Likewise.
6039         (make_array_declarator): Likewise.
6040         (no_parameters): New variable.
6041         (make_parameter_declarator): Likewise.
6042         (cp_parser_check_for_definition_in_return_type): Do not use trees
6043         to represent declarators.
6044         (cp_parser_translation_unit): Likewise.
6045         (cp_parser_new_expression): Likewise.
6046         (cp_parser_new_type_id): Likewise.
6047         (cp_parser_new_declarator_opt): Likewise.
6048         (cp_parser_direct_new_declarator): Likewise.
6049         (cp_parser_condition): Likewise.
6050         (cp_parser_declaration_statement): Likewise.
6051         (cp_parser_declaration): Likewise.
6052         (cp_parser_conversion_type_id): Likewise.
6053         (cp_parser_conversion_declarator_opt): Likewise.
6054         (cp_parser_template_parameter_list): Likewise.
6055         (cp_parser_template_parameter): Likewise.
6056         (cp_parser_explicit_instantiation): Likewise.
6057         (cp_parser_init_declarator): Likewise.
6058         (cp_parser_declarator): Likewise.
6059         (cp_parser_direct_declarator): Likewise.
6060         (cp_parser_type_id): Likewise.
6061         (cp_parser_parameter_declaration_clause): Likewise.
6062         (cp_parser_parameter_declaration_list): Likewise.
6063         (cp_parser_parameter_declaration): Likewise.
6064         (cp_parser_member_declaration): Likewise.
6065         (cp_parser_exception_declaration): Likewise.
6066         (cp_parser_check_declarator_template_parameters): Likewise.
6067         (cp_parser_function_definition_from_specifiers_and_declarator):
6068         Likewise.
6069         (cp_parser_save_member_function_body): Likewise.
6070         * pt.c (process_template_parm): Add is_non_type parameter.
6071         (convert_template_argument): Adjust call to groktypename.
6072         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
6073         (tsubst): Do not expect declarators.
6074         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
6075         argument.
6076         (instantiate_decl): Use start_preparsed_function.
6077         * semantics.c (begin_function_definition): Remove.
6078         (finish_parmlist): Remove.
6079         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
6080         declarators.
6081
6082 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6083
6084         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
6085         (build_new_method_call): Likewise.
6086         * decl.c (local_variable_p_walkfn): Don't walk into types.
6087         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
6088         (build_anon_union_vars): Add new operand for COMPONENT_REF.
6089         * init.c (buld_new): Add new operand for ARRAY_REF.
6090         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
6091         (do_build_assign_ref): Likewise.
6092         * parser.c (cp_parser_direct_new_declarator): Add new operands
6093         for ARRAY_REF.
6094         (cp_parser_direct_declarator): Likewise.
6095         * pt.c (tsubst): Likewise.
6096         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
6097         for COMPONENT_REF.
6098         * semantics.c (finish_non_static_data_member): Add new operand
6099         for COMPONENT_REF.
6100         * typeck.c (build_class_member_access_expr): Likewise.
6101         (build_class_member_access_expr, finish_class_member_access_expr):
6102         Likewise.
6103         (build_ptrmemfunc_access_expr): Likewise.
6104         (build_array_ref): Add new operands for ARRAY_REF.
6105         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
6106         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
6107
6108 2004-06-21  Richard Henderson  <rth@redhat.com>
6109
6110         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
6111         * parser.c (cp_parser_jump_statement): Update commentary.
6112         * pt.c (tsubst_expr): Use RETURN_EXPR.
6113         * semantics.c (finish_return_stmt): Likewise.
6114         (finalize_nrv_r): Likewise.
6115         * typeck.c, typeck2.c: Update file start commentary.
6116
6117 2004-06-21  Richard Henderson  <rth@redhat.com>
6118
6119         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
6120
6121 2004-06-20  Richard Henderson  <rth@redhat.com>
6122
6123         * cp-tree.h (add_decl_stmt): Declare.
6124         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6125         * semantics.c (maybe_cleanup_point_expr): New.
6126         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6127         finish_for_expr, finish_switch_cond): Use it.
6128         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
6129
6130 2004-06-20  Richard Henderson  <rth@redhat.com>
6131
6132         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6133         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6134         (cp_gimplify_expr): Call it.
6135         (gimplify_cleanup_stmt): Move from c-gimplify.c.
6136         (cp_genericize): New.
6137         * decl.c (finish_function): Call it.
6138         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6139         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6140         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6141         (cp_genericize): Declare.
6142         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6143         * dump.c (cp_dump_tree): Likewise.
6144         * semantics.c (push_cleanup): Move from c-semantics.c.
6145
6146 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
6147
6148         * cp-lang.c (has_c_linkage): Implement.
6149
6150         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6151         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6152         (builtin_function_1): Don't call make_decl_rtl.
6153         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6154         (grokvardecl): Don't call mangle_decl.
6155         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6156         DECL_ASSEMBLER_NAME.
6157         * method.c (set_mangled_name_for_decl): Delete.
6158         * name-lookup.c (pushdecl): When a local extern shadows a
6159         file-scope declaration of the same object, give both DECLs the
6160         same DECL_UID.
6161         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6162         on DECL_ASSEMBLER_NAME.
6163
6164 2004-06-19  Richard Henderson  <rth@redhat.com>
6165
6166         * cp-gimplify.c: Remove unnecessary prototypes.
6167         (cp_gimplify_stmt): Merge into ...
6168         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
6169         stmts_are_full_exprs_p frobbing.
6170         * cp-tree.h (cp_gimplify_stmt): Remove.
6171         * pt.c (tsubst_expr): Merge prep_stmt and unify.
6172         * tree.c (init_tree): Don't set lang_gimplify_stmt.
6173
6174 2004-06-18  Richard Henderson  <rth@redhat.com>
6175
6176         PR c++/16034
6177         * semantics.c (begin_cond): New.
6178         (finish_cond): Rewrite to handle template DECL_STMTs specially.
6179         Assume that non-template decls go land before the conditional.
6180         (simplify_loop_decl_cond): Likewise.
6181         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6182         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6183         begin_switch_stmt, finish_switch_cond): Update to match.
6184
6185 2004-06-17  Jason Merrill  <jason@redhat.com>
6186
6187         PR c++/16015
6188         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6189         (finish_stmt_expr_expr): Update type after conversions.
6190         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6191         Handle void initializer.
6192         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6193
6194 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
6195
6196         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6197         * cp-tree.h (defer_fn): Delete.
6198         * decl2.c (defer_fn): Delete.
6199         (finish_file): Simplify deferred_fns loops; check that
6200         only used inline functions get into deferred_fns.
6201         (mark_used): Inline previous contents of defer_fn.
6202
6203 2004-06-16  Richard Henderson  <rth@redhat.com>
6204
6205         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6206         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6207         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6208         of CTOR_INITIALIZER ...
6209         (pp_cxx_statement): ... here.
6210         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6211         (finish_function): Use alloc_stmt_list to zap entire function.
6212         * parser.c (cp_parser_compound_statement): Update commentary.
6213         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6214         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6215         (finish_stmt_expr): Don't look through COMPOUND_STMT.
6216
6217 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
6218
6219         * pt.c (mark_decl_instantiated): Don't call defer_fn.
6220
6221 2004-06-16  Richard Henderson  <rth@redhat.com>
6222
6223         * parser.c (cp_parser_labeled_statement): Update commentary.
6224         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6225         * tree.c (mark_local_for_remap_r): Likewise.
6226
6227 2004-06-16  Richard Henderson  <rth@redhat.com>
6228
6229         * parser.c (cp_parser_asm_definition): Update commentary.
6230         * pt.c (tsubst_expr): Use ASM_EXPR.
6231         * semantics.c (finish_asm_stmt): Likewise.
6232
6233 2004-06-16  Richard Henderson  <rth@redhat.com>
6234
6235         * decl.c (finish_destructor_body): Use LABEL_EXPR.
6236         * parser.c (cp_parser_statement): Update commentary.
6237         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6238         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6239         * tree.c (mark_local_for_remap_r): Likewise.
6240
6241 2004-06-16  Richard Henderson  <rth@redhat.com>
6242
6243         PR c++/16012
6244         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6245         statement in FOR_INIT_STMT for templates.
6246
6247 2004-06-15  Richard Henderson  <rth@redhat.com>
6248
6249         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6250         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6251         (genericize_try_block): Use gimplify_stmt.
6252         (genericize_catch_block, genericize_eh_spec_block): Likewise.
6253         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6254         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6255         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6256         (cp_tree_chain_matters_p): Remove.
6257         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6258         (COMPOUND_STMT_BODY_BLOCK): New.
6259         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6260         (EXPR_STMT_STMT_EXPR_RESULT): New.
6261         (building_stmt_tree): Check cur_stmt_list.
6262         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6263         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6264         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6265         (cp_finish_decl): Use push_cleanup.
6266         (start_function, finish_function): Use statement lists.
6267         (finish_stmt): Do nothing.
6268         * except.c (begin_eh_spec_block): Use statement lists.
6269         (check_handlers_1, check_handlers): Likewise.
6270         * init.c (construct_virtual_base): Don't add extra compound stmts.
6271         (build_vec_init): Likewise.
6272         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6273         * name-lookup.h (struct cp_binding_level): Add statement_list.
6274         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6275         (cp_parser_labeled_statement, cp_parser_expression_statement,
6276         cp_parser_statement_seq_opt): Likewise.
6277         (cp_parser_compound_statement): Likewise.  Take bool for try block.
6278         (cp_parser_selection_statement): Tidy if processing.
6279         (cp_parser_already_scoped_statement): Rewrite to do what it says.
6280         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6281         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
6282         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6283         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6284         (finish_cond): New, rewritten from FINISH_COND.
6285         (simplify_loop_decl_cond): New.
6286         (finish_expr_stmt): Avoid nested EXPR_STMTs.
6287         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6288         begin_else_clause, finish_else_clause, finish_if_stmt,
6289         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6290         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6291         finish_for_cond, finish_for_stmt, begin_switch_stmt,
6292         finish_switch_cond, finish_switch_stmt, begin_try_block,
6293         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6294         finish_handler_sequence, finish_function_handler_sequence,
6295         begin_handler, finish_handler_parms, finish_handler,
6296         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6297         using statement lists.
6298         (begin_compound_stmt): Replace has_no_scope argument with flags.
6299         Update all callers.  Use statement lists.
6300         (finish_compound_stmt): Likewise.
6301         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6302         (current_scope_stmt_stack): Remove.
6303         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6304         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6305         Rewrite with statement lists.
6306
6307 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
6308
6309         * parser.c: Change all assignments of c_lex_string_translate
6310         to true and false to 1 and 0.
6311         (cp_lexer_read_token): Convert type of the translated string.
6312         (cp_parser_skip_to_closing_parentheses): Preserve original
6313         value of c_lex_string_translate, and set it to -1 while
6314         running.
6315         (cp_parser_cache_group): Likewise.
6316         (cp_parser_cache_group_1): Renamed.
6317         (cp_parser_asm_operand_list): Remove redundant setting of
6318         c_lex_string_translate.
6319         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6320         Handle chained strings.
6321
6322 2004-06-12  Andrew Pinski  <apinski@apple.com>
6323
6324         PR c++/14639
6325         Revert:
6326         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6327
6328                 * cp-tree.h: Fix typo.
6329
6330                 * cp-tree.h: Include cgraph.h
6331                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6332                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6333
6334 2004-06-12  Jason Merrill  <jason@redhat.com>
6335
6336         PR tree-optimization/14107
6337         * decl.c (finish_function): Warn about no return in all functions.
6338
6339 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
6340
6341         * cp-tree.h (struct language_function): Remove cannot_inline.
6342         * decl.c (save_function_data): cannot_inline is no more.
6343         (cxx_push_function_context): Likewise.
6344         * decl2.c (start_objects, start_static_storage_duration_function):
6345         Reset DECL_INLINE, set DECL_UNINLINABLE.
6346
6347 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6348
6349         PR c++/15967
6350         * search.c (lookup_field): Propagate the ambiguity list.
6351         (lookup_fnfields): Likewise.
6352
6353 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6354
6355         PR c++/15947
6356         * parser.c (cp_parser_template_name): Ctors/dtors never need a
6357         template keyword to disambiguate.
6358
6359 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
6360
6361         PR c++/15096
6362         * decl.c (grokdeclarator): Ignore pointer-to-members when
6363         computing template depth.
6364
6365         PR c++/14930
6366         * name-lookup.c (pushtag): Do not try to put class declarations in
6367         explicit specialization scopes.
6368
6369 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
6370
6371         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6372
6373 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
6374
6375         PR c++/15862
6376         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6377         bindings for undeclared built-ins.
6378
6379 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6380
6381         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6382         appear at the correct location.
6383
6384 2004-06-10  Jason Merrill  <jason@redhat.com>
6385
6386         PR c++/15875
6387         Revert:
6388         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6389         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6390         TREE_TYPE for non-dependent names.
6391         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6392         unknown_type_node as its TREE_TYPE.
6393         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6394         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6395         (dump_expr) <SCOPE_REF case>: Likewise.
6396
6397 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
6398
6399         PR c++/15227
6400         * parser.c (cp_parser_direct_declarator): Robustify.
6401
6402         PR c++/15877
6403         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6404         constants in non-dependent contexts.
6405
6406         PR c++/14211
6407         PR c++/15076
6408         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6409         necessary.
6410
6411 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
6412
6413         PR c++/14791
6414         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6415         specially.
6416
6417 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
6418
6419         Revert:
6420         PR c++/15815
6421         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6422         * lex.c (handle_pragma_interface): Deprecate.
6423         (handle_pragma_implementation): Likewise.
6424
6425 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
6426
6427         * g++spec.c (lang_specific_driver): Remove check for -lm
6428         and -lmath when check it see if it was the math library.
6429
6430 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6431
6432         PR c++/7841
6433         * parser.c (cp_parser_direct_declarator): Reject constructor named
6434         as qualified template-id.
6435
6436 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6437
6438         PR c++/15815
6439         * lex.c (handle_pragma_interface): Deprecate.
6440         (handle_pragma_implementation): Likewise.
6441
6442 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6443
6444         PR c++/15766
6445         * parser.c (cp_parser_iteration_statement): Fix typo in error
6446         message.
6447
6448         PR c++/14777
6449         * pt.c (tsubst_default_argument): Do not defer access checks
6450         while substituting into the default argument.
6451
6452         PR c++/15554
6453         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6454         constant in a non-dependent context.
6455
6456         PR c++/15057
6457         * except.c (build_throw): Ensure that temp_expr has been
6458         initialized.
6459
6460 2004-06-06  Roger Sayle  <roger@eyesopen.com>
6461
6462         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6463
6464 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6465
6466         PR c++/15503
6467         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6468         'typename', and accept 'template'.
6469
6470 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
6471             Jan Hubicka  <jh@suse.cz>
6472
6473         PR c++/14639
6474         * method.c (use_think): Do not mark thunk as referenced.
6475
6476 2004-06-03  Matt Austern  <austern@apple.com>
6477
6478         PR c++/15428
6479         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6480         is nonzero, and if we see a noninline definition of a key method,
6481         make the vtables nonweak.
6482
6483 2004-06-02  Matt Austern  <austern@apple.com>
6484
6485         * cp-tree.h (instantiate_decl): new boolean parameter,
6486         undefined_ok. Current behavior is equivalent to its being 0.
6487         * decl2.c (mark_used): Add new argument when calling instantiate_decl
6488         * pt.c (mark_decl_instantiated): Unconditionally make
6489         instantiations explicit unconditionally
6490         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6491         since mark_decl_instantiated now does it.
6492         (instantiate_class_member): New.  Instantiate a member of an
6493         explicitly instantiated class template.
6494         (do_type_instantiation): Explicitly instantiate members of an
6495         explicitly instantiated class template.
6496         (instantiate_decl): if undefined_ok is nonzero, and if we're
6497         trying to explicitly instantiated a template with no definition,
6498         change it to an implicit instantiation.
6499         (instantiate_pending_templates): Add new argument to instantiate_decl.
6500         * tree.c (cp_cannot_inline_tree_fn): Likewise.
6501
6502 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6503
6504         * cp-tree.h: Fix typo.
6505
6506         * cp-tree.h: Include cgraph.h
6507         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6508         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6509
6510 2004-06-01  Jason Merrill  <jason@redhat.com>
6511
6512         PR c++/15142
6513         * call.c (call_builtin_trap): Remove type parm.
6514         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6515         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6516
6517 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6518
6519         PR c++/13092
6520         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6521         TREE_TYPE for non-dependent names.
6522         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6523         unknown_type_node as its TREE_TYPE.
6524         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6525         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6526         (dump_expr) <SCOPE_REF case>: Likewise.
6527
6528 2004-06-01  Richard Henderson  <rth@redhat.com>
6529             Andrew Pinski  <pinskia@physics.uc.edu>
6530
6531         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6532         * parser.c (struct cp_parser): Remove in_offsetof.
6533         (cp_parser_new): Don't set it.
6534         (cp_parser_unary_expression): Don't check it.
6535         (cp_parser_postfix_open_square_expression): Split out from ...
6536         (cp_parser_postfix_expression): ... here.
6537         (cp_parser_postfix_dot_deref_expression): Likewise.
6538         (cp_parser_builtin_offsetof): New.
6539         (cp_parser_primary_expression): Use it.
6540
6541 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6542
6543         PR c++/14932
6544         * parser.c (cp_parser_postfix_expression): Allow subscript
6545         operator in offsetof.
6546
6547 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
6548
6549         PR c++/15701
6550         * friend.c (add_friend): Do not try to perform access checks for
6551         functions from dependent classes.
6552
6553 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6554
6555         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6556         (pp_cxx_begin_template_argument_list): Turn into a function.
6557         (pp_cxx_end_template_argument_list): Likewise.
6558         (pp_cxx_separate_with): Define.
6559         (pp_cxx_unqualified_id): Tidy.
6560         (pp_cxx_primary_expression): Likewise.
6561         (pp_cxx_postfix_expression): Likewise.
6562         (pp_cxx_expression): Likewise.
6563         (pp_cxx_simple_type_specifier): Likewise.
6564         (pp_cxx_type_specifier_seq): Likewise.
6565         (pp_cxx_parameter_declaration_clause): Likewise.
6566         (pp_cxx_exception_specification): Likewise.
6567         (pp_cxx_direct_declarator): Likewise.
6568         (pp_cxx_type_id): Likewise.
6569         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6570         cxx-pretty-print.c.
6571         (pp_cxx_left_paren): Likewise.
6572         (pp_cxx_right_paren): Likewise.
6573         (pp_cxx_left_brace): Likewise.
6574         (pp_cxx_right_brace): Likewise.
6575         (pp_cxx_left_bracket): Likewise.
6576         (pp_cxx_right_bracket): Likewise.
6577         (pp_cxx_dot): Likewise.
6578         (pp_cxx_identifier): Likewise.
6579         (pp_cxx_tree_identifier): Likewise.
6580         (pp_cxx_ampersand): New macro.
6581         (pp_cxx_star): Likewise.
6582         (pp_cxx_arrow): Likewise.
6583         (pp_cxx_semicolon): Likewise.
6584         (pp_cxx_complement): Likewise.
6585         (pp_cxx_begin_template_argument_list): Declaree.
6586         (pp_cxx_end_template_argument_list): Likewise.
6587         (pp_cxx_colon_colon): likewise.
6588
6589 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
6590
6591         * parser.c (cp_parser_simple_type_specifier): Explicitly test
6592         against NULL_TREE.
6593
6594 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
6595
6596         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6597         typeck.c: Fix comment formatting.
6598
6599 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
6600
6601         * cp-lang.c (cp_expand_decl): Remove.
6602         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6603
6604 2004-05-30  Andreas Jaeger  <aj@suse.de>
6605
6606         * lang-specs.h: Add missing initializers for .ii.
6607
6608 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
6609
6610         * decl.c (cp_make_fname_decl): Free return value from
6611         fname_as_string.
6612
6613 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6614
6615         PR c++/15083
6616         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6617         even in a templat.e
6618         * init.c (build_new): Likewise.
6619
6620         PR c++/15640
6621         * name-lookup.c (arg_assoc): Robustify.
6622
6623         PR c++/15471
6624         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6625         when determining the scope to use for a pointer to member.
6626         (lookup_anon_field): Give it external linkage.
6627         * cp-tree.h (lookup_anon_field): Declare it.
6628         * expr.c (cplus_expand_constant): Use it.
6629
6630 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6631
6632         PR c++/14668
6633         * parser.c (cp_parser_simple_type_specifier): Call
6634         maybe_note_name_used_in_class.
6635
6636 2004-05-28  Tom Marshall  <tmarshall@real.com>
6637
6638         PR c++/15214
6639         * class.c (finish_struct_1): Warn only if the dtor is non-private or
6640         the class has friends.
6641
6642 2004-05-27  Adam Nemet  <anemet@lnxw.com>
6643
6644         PR c++/12883
6645         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6646         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6647
6648 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
6649
6650         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6651         if it might be needed.
6652         * pt.c (mark_decl_instantiated): Only call defer_fn if
6653         the function actually needs processing in finish_file.
6654         * decl2.c (finish_file): Add check that elements in
6655         deferred_fns_used are really needed there.  Remove unnecessary
6656         test of DECL_SAVED_TREE.
6657
6658 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6659
6660         * Make-lang.in: No need to specify $(LIBCPP).
6661
6662 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6663
6664         PR c++/15044
6665         * parser.c (cp_parser_class_head): Robustify.
6666
6667         PR c++/15317
6668         * parser.c (cp_parser_decl_specifier_seq): Correct error in
6669         comment.
6670         (cp_parser_constructor_declarator_p): Treat attributes
6671         as decl-specifiers.
6672
6673         PR c++/15329
6674         * typeck.c (build_unary_op): Do not attempt to resolve casts to
6675         base classes in templates.
6676
6677 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6678
6679         PR c++/15165
6680         * pt.c (instantiate_template): Robustify.
6681
6682 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6683
6684         PR c++/15025
6685         * decl.c (xref_tag): Issue errors about redeclaring template
6686         classes as non-template classes.
6687
6688 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6689
6690         PR c++/14821
6691         * name-lookup.c (supplement_binding): Allow redefinitions of
6692         namespace aliases.
6693
6694         PR c++/14883
6695         * parser.c (cp_parser_template_argument): Robustify.
6696
6697 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6698
6699         * class.c (alter_access): Use %E format specifier to print an
6700         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
6701         (push_lang_context): Likewise.
6702         * decl.c (lookup_label): Likewise.
6703         (grokdeclarator): Likewise.
6704         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6705         * pt.c (do_type_instantiation): Likewise.
6706         * tree.c (handle_java_interface_attribute): Likewise.
6707         (handle_com_interface_attribute): Likewise.
6708         (handle_init_priority_attribute): Likewise.
6709
6710 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6711
6712         PR c++/15285
6713         PR c++/15299
6714         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6715         recognized as overloaded functions.
6716
6717 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6718
6719         PR c++/15507
6720         * class.c (layout_nonempty_base_or_field): Do not try to avoid
6721         layout conflicts for unions.
6722
6723         PR c++/15542
6724         * typeck.c (build_x_unary_op): Instantiate template class
6725         specializations before looking for "operator &".
6726
6727         PR c++/15427
6728         * typeck.c (complete_type): Layout non-dependent array types, even
6729         in templates.
6730
6731         PR c++/15287
6732         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6733         template.
6734
6735 2004-05-22  Roger Sayle  <roger@eyesopen.com>
6736
6737         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6738         returning when TREE_TYPE is error_mark_node.
6739         * typeck.c (require_complete_type): Return error_mark_node if
6740         value's type is an error_mark_node.
6741
6742 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
6743
6744         * optimize.c (calls_setjmp_r): Remove.
6745         (calls_setjmp_p): Remove.
6746         * cp-tree.c (calls_setjmp_p): Remove.
6747         * decl.c (finish_function): Do not call calls_setjmp_p.
6748
6749 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
6750
6751         * decl.c (cp_finish_decl): Use mark_decl_referenced.
6752         * decl2.c (maybe_make_one_only): Likewise.
6753         * method.c (use_thunk): Likewise.
6754
6755 2004-05-18  Jason Merrill  <jason@redhat.com>
6756
6757         * class.c (build_base_path): Tidy a bit.
6758
6759 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
6760
6761         * name-lookup.c (struct scope_binding): New.
6762         (EMPTY_SCOPE_BINDING): New.
6763         (lookup_using_namespace): Take a scope_binding instead of a
6764         cxx_binding.
6765         (qualified_lookup_using_namespace): Likewise.
6766         (cxx_binding_clear): Delete.
6767         (do_nonmember_using_decl): Use a scope_binding instead of a
6768         cxx_binding.
6769         (lookup_tag): Don't call select_decl.
6770         (ambiguous_decl): Don't return anything (and change callers to match).
6771         Take a scope_binding as the second parameter.
6772         (lookup_namespace_name): Use a scope_binding instead of a
6773         cxx_binding.
6774         (unqualified_namespace_lookup): Likewise.
6775         (lookup_qualified_name): Likewise.
6776         (select_decl): Take a scope_binding instead of a cxx_binding.
6777         Use macros rather than hand-coding tests for type-ness.
6778
6779 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6780
6781         * cp-gimplify.c: Rename from cp-simplify.c.
6782         * Make-lang.in, optimize.c: Update.
6783
6784 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6785
6786         Merge from tree-ssa-20020619-branch.  See
6787         ChangeLog.tree-ssa for details.
6788
6789         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6790         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6791         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6792         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6793         Merged.
6794         * cp-mudflap.c: New file.
6795         * cp-simplify.c:: New file.
6796
6797 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6798
6799         PR c++/14389
6800         * decl2.c (check_classfn): For member templates, compare also the
6801         template parameters to match the declaration.
6802         * cp-tree.h: Adjust declaration of check_classfn.
6803         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6804         * friend.c (do_friend): Likewise.
6805         * pt.c (tsubst_friend_function): Likewise.
6806
6807 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
6808
6809         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6810         Instead, dig into the representation type to find the array bound.
6811
6812 2004-04-30  Jason Merrill  <jason@redhat.com>
6813
6814         Refer to base members using COMPONENT_REFs where possible.
6815         * class.c (build_simple_base_path): New fn.
6816         (build_base_path): Use it for non-virtual base references.
6817         (layout_class_type): Change base fields to their real type
6818         after layout is done.
6819         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6820         * cp-lang.c (cxx_get_alias_set): Use it.
6821
6822 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
6823
6824         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6825         comment typos.
6826
6827 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6828
6829         PR c++/15064
6830         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6831         used in integral constant expressions.
6832
6833 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
6834
6835         * init.c (build_aggr_init): Fix accidental use of C99 construct in
6836         previous change.
6837
6838         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6839         braced initializer.
6840         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6841         * decl.c (reshape_init): Use it.
6842         * init.c (perform_member_init): Remove redundant condition.
6843         (build_aggr_init): Adjust to handle brace-enclosed initializers
6844         correctly.
6845         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6846
6847         * parser.c (cp_parser_initializer_clause): Do not set
6848         TREE_HAS_CONSTRUCTOR on the initializer.
6849         * rtti.c (tinfo_base_init): Likewise.
6850         (generic_initializer): Likewise.
6851         (ptr_initializer): Likewise.
6852         (ptm_initializer): Likewise.
6853         (class_initializer): Likewise.
6854         (get_pseudo_ti_init): Likewise.
6855         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6856
6857 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
6858
6859         * name-lookup.c (anonymous_namespace_name): Make static.
6860
6861 2004-04-19  Roger Sayle  <roger@eyesopen.com>
6862
6863         PR middle-end/14531
6864         * class.c (build_base_path): Call fold whilst building the NULL
6865         pointer check expression trees.
6866
6867 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6868
6869         * init.c (build_new_1): Don't use type size argument for Java
6870         _Jv_AllocObject call.
6871
6872 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
6873
6874         * method.c (make_alias_for_thunk): Remove preprocessor guard on
6875         declaration and definition.
6876
6877 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
6878
6879         PR c++/14808
6880         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6881         than ASM_OUTPUT_DEF.
6882
6883 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6884
6885         * decl2.c (mark_used): Don't segfault if cfun != NULL but
6886         current_function_decl == NULL.
6887
6888 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
6889
6890         PR c++/3518
6891         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6892         level.
6893
6894 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6895
6896         * init.c (decl_constant_value): Don't look at DECL_INITIAL
6897         of PARM_DECL.
6898         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6899         or TREE_SIDE_EFFECTS of a type.
6900
6901 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
6902
6903         PR c++/14007
6904         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6905         cv-qualifier unification.
6906         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6907
6908 2004-04-02  Jan Hubicka  <jh@suse.cz>
6909
6910         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6911         * cp-tree.h (cp_update_decl_after_saving): Declare.
6912         * tree.c (cp_update_decl_after_saving): Define.
6913
6914 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
6915
6916         PR c++/14803
6917         * typeck.c (get_delta_difference): Call fold before returning the
6918         value.
6919
6920 2004-04-01  Richard Henderson  <rth@redhat.com>
6921
6922         PR c++/14804
6923         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6924         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6925
6926 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
6927
6928         PR c++/14810
6929         * name-lookup.c (maybe_push_cleanup_level): Robustify.
6930
6931 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6932
6933         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6934
6935 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6936
6937         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6938         * class.c (check_bitfield_decl): Likewise.
6939         * cvt.c (type_promotes_to): Likewise.
6940         * decl.c (finish_enum): Likewise.
6941         * mangle.c (write_builtin_type): Likewise.
6942         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6943         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6944         (build_binary_op): Likewise.
6945
6946 2004-03-31  Jan Hubicka  <jh@suse.cz>
6947
6948         * tree.h (optimize_function): Kill prototype.
6949         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6950         * semantics.c (expand_body): Kill.
6951
6952 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
6953
6954         PR c++/14724
6955         * decl.c (start_decl_1): Do not decide whether or not to create a
6956         new cleanup level until after the type has been completed.
6957
6958         PR c++/14763
6959         * pt.c (tsubst_default_argument): Clear current_function_decl.
6960
6961 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6962
6963         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6964
6965 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
6966
6967         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
6968         is null, just print the literal name and return.
6969
6970 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
6971
6972         * cxx-pretty-print.c: Fix comment typos.
6973
6974 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
6975
6976         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
6977         Update copyright.
6978
6979 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
6980
6981         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
6982         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
6983         target hook.
6984
6985 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
6986
6987         PR 12267, 12391, 12560, 13129, 14114, 14133
6988         * cp-lang.c (c_reset_state): Delete.
6989         (push_file_scope, pop_file_scope): New stubs.
6990         * parser.c (c_parse_file): Call sorry() here if called more than once.
6991
6992 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6993
6994         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
6995         for INTEGER_CST.
6996
6997 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6998
6999         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
7000
7001 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7002
7003         * error.c (enum pad): Remove.
7004         (dump_qualifiers): Likewise.
7005         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
7006         (dump_aggr_type): Likewise.
7007         (dump_type_suffix): Likewise.
7008         (dump_simple_decl): Likewise.
7009         (dump_function_decl): Likewise.
7010         (cv_to_string): Likewise.
7011         (dump_type_prefix): Likewise.  Adjust return void.
7012         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
7013         cxx_pretty_print.h.
7014         (pp_cxx_template_keyword_if_needed): Document.
7015         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
7016         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
7017         MUST_NOT_THROW_EXPR.
7018
7019 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
7020
7021         PR c++/14616
7022         * decl.c (cp_finish_decl): Compute the size of arrays declared in
7023         templates, if their type is non-dependent.
7024
7025 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
7026
7027         * call.c (build_op_delete_call): Do not forget the placement
7028         arguments when iterating through mutiple delete operators.
7029
7030         * cp-tree.h (svaed_scope): Remove last_parms.
7031         (NEW_DELETE_OPNAME_P): New macro.
7032         (last_function_parms): Remove.
7033         (do_friend): Adjust prototype.
7034         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
7035         using last_function_parms.
7036         (grokfndecl): Take the PARM_DECLs as an argument, rather than
7037         using last_function_parms.
7038         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
7039         for class-specific operator new and operator delete.
7040         (grok_op_properties): Do not look for allocation functions with
7041         METHOD_TYPEs.
7042         (start_function): Use DECL_ARGUMENTS instead of
7043         last_function_parms.
7044         * decl.h (last_function_parms): Do not declare.
7045         * decl2.c (grokclassfn): Do not use last_function_parms.
7046         * friend.c (do_friend): Remove parmdecls parameter.
7047         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
7048         (pop_from_top_level): Do not restore it.
7049         * pt.c (check_explicit_specialization): Do not adjust
7050         last_function_parms.
7051
7052         * name-lookup.c (do_local_using_decl): Create a local binding for
7053         types brought in via using declarations.
7054
7055         * name-lookup.c (lookup_arg_dependent): Handle block-scope
7056         function declarations correctly.
7057
7058         * semantics.c (finish_id_expression): Correct handling of
7059         conversion operators to dependent types.
7060
7061         * typeck.c (lookup_destructor): Allow the use of destructors from
7062         base classes.
7063
7064 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7065
7066         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
7067         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
7068         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
7069         the field is named TEMPLATE_TYPE_PARM_INDEX.
7070
7071 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7072
7073         PR c++/14545
7074         * parser.c (cp_parser_functional_cast): A cast to anything
7075         but integral or enumaration type is not an integral constant
7076         expression.
7077         * pt.c (value_dependent_expression_p): Handle cast expressions
7078         without operands (such as "int()").
7079
7080 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
7081
7082         * semantics.c (finish_pseudo_destructor_expr): Allow differing
7083         cv-qualification between the type named by the
7084         pseudo-destructor-name and the object-type.
7085
7086         * search.c (accessible_base_p): Handle non-proper bases.
7087
7088         * name-lookup.c (do_nonmember_using_decl): If a using declaration
7089         refers to a single overloaded function, set the type of the
7090         function.
7091         * tree.c (lvalue_type): Simplify.
7092         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
7093         unknown type.
7094         (build_unary_op): Handle OVERLOADs with known types.
7095
7096         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
7097         function templates.
7098
7099         * parser.c (cp_parser_postfix_expression): Handle the use of
7100         "typename" in non-dependent contexts.  Convert appropriately when
7101         when using a qualified name after "->" or ".".
7102
7103         * call.c (conditional_conversion): Honor the requirement that some
7104         conversions refer to the original object.
7105
7106 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
7107
7108         * call.c (build_conditional_expr): Do not call force_rvalue for
7109         operands of void_type when the conditional expression itself has
7110         void type.
7111         * name-lookup.c (pushdecl): Don't consider a declaration of a
7112         function named "main" to be an overload of a type named "main".
7113         * parser.c (cp_parser_template_name): Perform name lookup when the
7114         template name is proceeded by "template" if the qualifying scope
7115         is non-dependent.
7116         * typeck.c (composite_pointer_type_r): Correctly handle
7117         pointer-to-member types.
7118         (build_const_cast): Likewise.
7119
7120 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7121
7122         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7123         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7124         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7125         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7126         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7127         (TYPEOF_TYPE_EXPR): New macro.
7128         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7129         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7130         * pt.c (tsubst): Likewise.
7131         * semantics.c (finish_typeof): Likewise.
7132         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7133         and TEMPLATE_TYPE_PARM.
7134         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7135         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7136
7137 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
7138
7139         PR c++/14586
7140         * cp-tree.h (build_new_op): Change prototype.
7141         (build_x_binary_op): Likewise.
7142         * call.c (build_new_op): Add overloaded_p parameter.
7143         * decl2.c (grok_array_decl): Adjust call to build_new_op.
7144         * parser.c (cp_parser_binary_expression): Note that uses of
7145         overloaded operators prevents an expression from being considered
7146         an integral constant.
7147         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7148         build_x_binary_op.
7149         * semantics.c (finish_call_expr): Likewise.
7150         * typeck.c (rationalize_conditional_expr): Likewise.
7151         (build_x_indirect_ref): Likewise.
7152         (build_x_binary_op): Likewise.
7153         (build_x_unary_op): Likewise.
7154         (build_x_compound_expr): Likewise.
7155         (build_modify_expr): Likewise.
7156         * typeck2.c (build_x_arrow): Likewise.
7157
7158 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
7159
7160         * cp-lang.c, ptree.c: Update copyright.
7161
7162 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
7163
7164         PR c++/14550
7165         * parser.c (cp_parser_non_integral_constant_expression): Encode
7166         more of the idiom that surrounded calls to this function within
7167         the function itself
7168         (cp_parser_primary_expression): Adjust accordingly.
7169         (cp_parser_postfix_expression): Likewise.
7170         (cp_parser_unary_expression): Likewise.
7171         (cp_parser_cast_expression): Likewise.
7172         (cp_parser_assignment_expression): Likewise.
7173         (cp_parser_expression): Likewise.
7174         (cp_parser_new_expression): Note that new-expressions are not
7175         allowed in integral constant expressions.
7176         (cp_parser_delete_expression): Likewise.
7177
7178 2004-03-12  Matt Austern  <austern@apple.com>
7179
7180         * decl2.c (maybe_make_one_only): Look at
7181         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7182         to make an explicit instantiation weak.
7183         * method.c (use_thunk): Make sure we call comdat_linkage
7184         when appropriate.
7185         * pt.c (do_type_instantiation): On systems where weak symbols
7186         don't go in a static archive's TOC, explicit instantiation of a
7187         class must imply *explicit* instantiation of its memeber.
7188
7189 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
7190
7191         * call.c, cp-tree.h, pt.c: Fix comment typos.
7192
7193 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
7194
7195         PR c++/14510
7196         * decl.c (xref_tag): Disregard non-type declarations when
7197         looking up a tagged type.
7198
7199 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
7200
7201         PR c++/14397
7202         * call.c (convert_like_real): Build a const qualified temporary,
7203         when testing ctor access.
7204
7205 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7206
7207         * call.c (initialize_reference): Fix typo.
7208
7209 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7210
7211         PR c++/14409
7212         * pt.c (determine_specialization): For member templates, match also
7213         constness.
7214
7215         PR c++/14448
7216         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7217         non-dependent.
7218         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7219
7220 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7221
7222         PR c++/14230
7223         * call.c (initialize_reference): Handle initializers that are
7224         class-member access expressions applies to rvalues.
7225
7226 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7227
7228         PR c++/14432
7229         * name-lookup.c (supplement_binding): Ignore functions that are
7230         marked DECL_ANTICIPATED.
7231
7232 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7233
7234         PR c++/14401
7235         * class.c (check_field_decls): Complain about non-static data
7236         members of reference type in unions.  Propagate
7237         CLASSTYPE_REF_FIELDS_NEED_INIT and
7238         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7239         data members.
7240         * init.c (perform_member_init): Complain about mbmers with const
7241         type that are not explicitly initialized.
7242
7243 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7244
7245         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7246         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7247         (lang_identifier): Remove implicit_decl and error_locus.
7248         (IDENTIFIER_IMPLICIT_DECL): Remove.
7249         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7250         (IDENTIFIER_ERROR_LOCUS): Likewise.
7251         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7252         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7253         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7254         (implicitly_declare): Remove.
7255         * decl.c (warn_extern_redeclared_static): Remove check of
7256         IDENTIFIER_IMPLICIT_DECL.
7257         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7258         (implicitly_declare): Remove.
7259         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7260         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7261         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7262         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7263         in the innermost scope, rather than at namespace scope.
7264         * name-lookup.c (push_local_binding): Give it external linkage.
7265         (pushdecl): Remove dead code.
7266         * name-lookup.h (push_local_binding): Declare it.
7267         * ptree.c (cxx_print_identifier): Don't print
7268         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7269         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7270         not IDENTIFIER_ERROR_LOCUS.
7271         * typeck.c (build_function_call): Remove dead code.
7272
7273 2004-03-08  Jason Merrill  <jason@redhat.com>
7274
7275         PR c++/13170
7276         * decl.c (xref_tag): Remove attribute handling.
7277         * cp-tree.h: Adjust prototype.
7278         * decl.c, parser.c, rtti.c: Adjust callers.
7279         * parser.c (cp_parser_class_head): Pass back attributes in the
7280         class head.
7281         (cp_parser_class_specifier): Adjust.
7282
7283 2004-03-08  Matt Austern  <austern@apple.com>
7284
7285         PR debug/14079
7286         * name-lookup.c (add_decl_to_level): Add extern variables, as well
7287         as static, to static_decls array.
7288
7289 2004-03-05  Jason Merrill  <jason@redhat.com>
7290
7291         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7292
7293 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
7294
7295         * decl.c (grokfndecl): Update old incorrect comment.
7296         (grokvardecl): Diagnose C++ variables of type with no linkage.
7297
7298 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7299
7300         PR c++/14369
7301         * pt.c (build_non_dependent_expr): Do not create a
7302         NON_DEPENDENT_EXPR for a THROW_EXPR.
7303
7304 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7305
7306         PR c++/14369
7307         * error.c (dump_expr): Handle THROW_EXPR.
7308
7309 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7310
7311         PR c++/14360
7312         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7313         lookup if ordinary name-lookup finds a non-function.
7314         * pt.c (tsubst_copy_and_build): Likewise.
7315
7316         PR c++/14361
7317         * parser.c (cp_parser_late_parsing_default_args): Check that there
7318         are no extra tokens after the end of the default-argument
7319         expression.
7320
7321 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7322
7323         PR c++/14324
7324         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7325         having C++ linkage for name-mangling purposes.
7326
7327         PR c++/14260
7328         * parser.c (cp_parser_direct_declarator): Recognize constructor
7329         declarators that use a template-id to name the class being
7330         constructed.
7331
7332         PR c++/14337
7333         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7334         (tsubst_expr): Do not call tsubst_copy, even when
7335         processing_template_decl.
7336
7337 2004-03-01  Jeff Law  <law@redhat.com>
7338
7339         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7340         the proper type.
7341
7342 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7343
7344         PR c++/14138
7345         * name-lookup.h (push_scope): Change prototype.
7346         * name-lookup.c (push_scope): Do not reenter the current class
7347         scope.
7348         * decl.c (grokfndecl): Check return code from push_scope before
7349         calling pop_scope.
7350         * decl2.c (check_classfn): Likewise.
7351         * parser.c (cp_parser_conversion_function_id): Likewise.
7352         (cp_parser_init_declarator): Likewise.
7353         (cp_parser_direct_declarator): Likewise.
7354         (cp_parser_class_specifier): Likewise.
7355         (cp_parser_class_head): Likewise.
7356         (cp_parser_lookup_name): Likewise.
7357         (cp_parser_constructor_declarator_p): Likewise.
7358         * pt.c (instantiate_class_template): Likewise.
7359         (resolve_typename_type): Likewise.
7360
7361 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7362
7363         PR c++/14267
7364         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7365         extension.
7366
7367         PR debug/12103
7368         * class.c (update_vtable_entry_for_fn): Do not go through
7369         covariance machinery if the type returned by an overrider is the
7370         same as the original.
7371
7372 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
7373
7374         * call.c: Fix a comment typo.
7375
7376 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
7377
7378         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7379
7380 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
7381
7382         PR c++/14278
7383         * parser.c (cp_parser_parameter_declaration_list): Commit
7384         to fewer tentative parses.
7385
7386 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7387
7388         PR c++/14284
7389         * pt.c (dependent_type_p_r): A template template parameter is a
7390         dependent type.
7391
7392 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7393
7394         PR c++/14246
7395         * mangle.c (write_template_arg_literal): Don't rely on identity for
7396         boolean constants.
7397
7398 2004-02-24  Jason Merrill  <jason@redhat.com>
7399
7400         * tree.c (build_exception_variant): Use check_qualified_type.
7401
7402 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
7403             Kazu Hirata  <kazu@cs.umass.edu>
7404
7405         * decl.c (cxx_init_decl_processing): Don't check
7406         flag_writable_strings.
7407
7408 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
7409
7410         PR c++/14156
7411         * typeck.c (maybe_warn_about_returning_address_of_location):
7412         Change check for VAR_DECL to use DECL_P instead.
7413
7414 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7415
7416         PR c++/14250
7417         * cvt.c (build_expr_type_conversion): Type must be complete before
7418         looking up for conversions.
7419
7420 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7421
7422         PR c++/14143
7423         * name-lookup.c (arg_assoc_class): Don't look into template
7424         arguments if it is not a primary template.
7425
7426 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7427
7428         PR c++/12007
7429         * method.c (use_thunk): Always clone function argument tree.
7430
7431 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
7432
7433         PR c++/14199
7434         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7435
7436         PR c++/14173
7437         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7438         for all type variants.
7439
7440 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
7441
7442         PR c++/13927
7443         * decl.c (duplicate_decls): Return error_mark_node for invalid
7444         redeclarations.
7445         * name-lookup.c (push_namespace): Ignore the return value from
7446         pushdecl.
7447         * pt.c (push_template_decl_real): Robustify.
7448
7449         PR c++/14186
7450         * name-lookup.c (push_class_level_binding): Do not complain about
7451         adding a binding for a member whose name is the same as the
7452         enclosing class if the member is located in a base class of the
7453         current class.
7454
7455 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7456
7457         PR c++/14181
7458         * parser.c (cp_parser_new_expression): Parse an ill-formed
7459         direct-new-declarator after a parenthesized type-id to emit good
7460         diagnostic.
7461
7462 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
7463
7464         * cp-tree.def, cvt.c: Update copyright.
7465
7466 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
7467
7468         PR c++/11326
7469         * cp-tree.h (abi_version_at_least): Remove.
7470         * mangle.c: Include flags.h.
7471
7472 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
7473
7474         PR c++/13971
7475         * call.c (build_conditional_expr): Handle conversions between
7476         class types which result in differently cv-qualified type
7477         variants.
7478
7479         PR c++/14086
7480         * class.c (delete_duplicate_fields_1): Remove.
7481         (delete_duplicate_fields): Likewise.
7482         (finish_struct_anon): Remove check for members with the same name
7483         as their enclosing class.
7484         (check_field_decls): Do not call duplicate_fields.
7485         * decl.c (grokdeclarator): Remove check for static data members
7486         with the same name as their enclosing class.
7487         * name-lookup.c (push_class_level_binding): Check for members with
7488         the same name as their enclosing class.
7489
7490 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7491
7492         PR c++/14085
7493         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7494
7495 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7496
7497         PR c++/13635
7498         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7499         has full set of arguments.
7500
7501 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7502
7503         PR c++/13927
7504         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7505
7506 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
7507
7508         PR c++/14122
7509         * cp-tree.h (delete_sanity): Change prototype.
7510         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7511         Remove dead code.  Adjust code to warn about deleting an array.
7512         * typekc.c (decay_conversion): Use build_address and build_nop.
7513
7514         PR c++/14108
7515         * search.c (accessible_p): Do not check access in thunks.
7516
7517         PR c++/14083
7518         * call.c (build_conditional_expr): Call force_rvalue on the
7519         non-void operand in the case that one result is a throw-expression
7520         and the other is not.
7521
7522 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
7523
7524         PR c++/9851
7525         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7526         the type name and look ahead for ::~, and bail out early with a
7527         better error message if the parse is going to fail.
7528
7529 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
7530
7531         * call.c (conversion_kind): New type.
7532         (conversion_rank): Likewise.
7533         (conversion): Likewise.
7534         (CONVERSION_RANK): New macro.
7535         (conversion_obstack): New variable.
7536         (obstack_initialized): Likewise.
7537         (z_candidate): Change type of convs and second_conv.
7538         (candidate_warning): New type.
7539         (IDENTITY_RANK): Remove.
7540         (EXACT_RANK): Likewise.
7541         (PROMO_RANK): Likewise.
7542         (STD_RANK): Likewise.
7543         (PBOOL_RANK): Likewise.
7544         (USER_RANK): Likewise.
7545         (ELLIPSIS_RANK): Likewise.
7546         (BAD_RANK): Likewise.
7547         (ICS_RANK): Likewise.
7548         (ICS_STD_RANK): Likewise.
7549         (ICS_USER_FLAG): Likewise.
7550         (ICS_ELLIPSIS_FLAG): Likewise.
7551         (ICS_THIS_FLAG): Likewise.
7552         (ICS_BAD_FLAG): Likewise.
7553         (NEED_TEMPORARY_P): Likewise.
7554         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7555         (USER_CONV_CAND): Likewise.
7556         (USER_CONV_FN): Likewise.
7557         (conversion_obstack_alloc): New function.
7558         (alloc_conversion): Likewise.
7559         (validate_conversion_obstack): Likewise.
7560         (alloc_conversions): Likewise.
7561         (build_conv): Adjust to deal with new conversion data structures.
7562         (build_identity_conv): New function.
7563         (build_ambiguous_conv): Likewise.
7564         (standard_conversion): Adjust to deal with new conversion data
7565         structures.
7566         (convert_class_to_reference): Likewise.
7567         (direct_reference_binding): Likewise.
7568         (reference_binding): Likewise.
7569         (implicit_conversion): Likewise.
7570         (add_candidate): Likewise.
7571         (add_function_candidate): Likewise.
7572         (add_conv_candidate): Likewise.
7573         (build_builtin_candidate): Likewise.
7574         (print_z_candidate): Likewise.
7575         (merge_conversion_sequences): Likewise.
7576         (build_user_type_conversion_1): Likewise.
7577         (build_user_type_conversion): Likewise.
7578         (build_new_function_call): Likewise.
7579         (build_object_call): Likewise.
7580         (conditional_conversion): Likewise.
7581         (build_conditional_expr): Likewise.
7582         (build_new_op): Likewise.
7583         (build_op_delete_call): Likewise.
7584         (convert_like_real): Likewise.
7585         (build_over_call): Likewise.
7586         (build_new_method_call): Likewise.
7587         (is_subseq): Likewise.
7588         (maybe_handle_implicit_object): Likewise.
7589         (maybe_handle_ref_bind): Likewise.
7590         (compare_ics): Likewise.
7591         (source_type): Likewise.
7592         (add_warning): Likewise.
7593         (joust): Likewise.
7594         (can_convert_arg): Likewise.
7595         (can_convert_arg_bad): Likewise.
7596         (perform_implicit_conversion): Likewise.
7597         (perform_direct_initialization_if_possible): Likewise.
7598         (initialize_reference): Likewise.
7599         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7600         * cp-tree.def (WRAPPER): Likewise.
7601         (IDENTITY_CONV): Remove.
7602         (LVALUE_CONV): Likewise.
7603         (QUAL_CONV): Likewise.
7604         (STD_CONV): Likewise.
7605         (PTR_CONV): Likewise.
7606         (PMEM_CONV): Likewise.
7607         (BASE_CONV): Likewise.
7608         (REF_BIND): Likewise.
7609         (USER_CONV): Likewise.
7610         (AMBIG_CONV): Likewise.
7611         (RVALUE_CONV): Likewise.
7612         * cp-tree.h (tree_wrapper): Remove.
7613         (WRAPPER_ZC): Remove.
7614         (lang_tree_node): Remove wrapper.
7615         (LOOKUP_SPECULATIVELY): Remove.
7616         (build_op_delete_call): Adjust prototype.
7617         (validate_conversion_obstack): Declare.
7618         (build_zc_wrapper): Remove.
7619         * cvt.c (convert_to_reference): Remove dead code.
7620         (ocp_convert): Likewise.
7621         * decl.c (redeclaration_error_message): Correct handling of
7622         templates.
7623         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7624         (cp_tree_node_structure): Remove WRAPPER case.
7625         * decl2.c (finish_file): Call validate_conversion_obstack.
7626         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7627         (build_op_delete_call): Likewise.
7628         (build_x_delete): Likewise.
7629         (build_delete): Adjust call to build_op_delete_call.
7630         * pt.c (tsubst_friend_declaration): Adjust code to determine
7631         whether or not a friend template is a definition.
7632         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7633         * tree.c (build_zc_wrapper): Remove.
7634
7635 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
7636
7637         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7638         * cp-tree.h: Don't declare cxx_builtin_type_decls.
7639         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7640         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7641
7642 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
7643
7644         * typeck.c (lookup_destructor): Fix typo in error message.
7645
7646 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
7647
7648         * call.c, parser.c, tree.c: Fix comment typos.
7649
7650 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7651
7652         Bug 13856
7653         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7654         * decl.c (duplicate_decls, start_function): Likewise.
7655
7656 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7657
7658         * name-lookup.c (pushdecl): Issue shadow warnings directly.
7659         * parser.c (free_parser_stacks): Delete.
7660
7661 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
7662
7663         * rtti.c: Update copyright.
7664
7665 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7666
7667         PR c++/14033
7668         * decl.c (require_complete_types_for_parms): Do not insert
7669         error_mark_node in the parameter list.
7670
7671 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7672
7673         PR c++/14028
7674         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7675         error when terminator can not be found.
7676
7677 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
7678
7679         Make-lang.in (po-generated):  Delete.
7680
7681 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
7682
7683         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7684         targetm.calls.promote_prototypes.
7685
7686 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7687
7688         PR middle-end/13750
7689         Revert:
7690         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
7691         PR pch/13361
7692         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7693         (handle_pragma_implementation): Likewise.
7694
7695 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
7696
7697         PR c++/13714
7698         * typeck.c (lookup_destructor): Tweak error message.
7699
7700 2004-02-05  Jan Hubicka  <jh@suse.cz>
7701
7702         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
7703         functions.
7704
7705 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7706
7707         PR c++/14008
7708         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7709         code, only emits the diagnostic now. Added lookup of the identifier
7710         and support for qualified ids.
7711         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7712         Parse an (invalid) type name as id-expression within a declarator.
7713         (cp_parser_simple_declaration): Use it.
7714         (cp_parser_member_declaration): Likewise.
7715         (cp_parser_make_typename_type): New function. Handle errors through
7716         cp_parser_diagnose_invalid_typename.
7717         (cp_parser_elaborated_type_specifier): Use it.
7718
7719 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7720
7721         PR c++/13932
7722         * call.c (convert_like_real): Use "converting" rather than
7723         "argument" as the descriptive keyword to
7724         dubious_conversion_warnings.
7725         * typeck.c (convert_for_assignment): Do not call
7726         dubious_conversion_warnings.
7727
7728 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7729
7730         PR c++/13086
7731         * init.c (build_delete): Emit a more informative error message in
7732         case of an incomplete type, and on the correct source line.
7733
7734 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
7735
7736         * error.c, search.c: Update copyright.
7737
7738 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7739
7740         PR c++/9941
7741         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7742         linkage for the typeinfo name string.
7743
7744 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7745
7746         PR c++/13969
7747         * cp-tree.h (fold_non_dependent_expr): New function.
7748         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7749         (cp_parser_template_argument): Use fold_non_dependent_expr.
7750         (cp_parser_direct_declarator): Likewise.
7751         * pt.c (fold_non_dependent_expr): New function.
7752         (convert_nontype_argument): Use it.
7753         (tsubst_qualified_id): Simplify.
7754         (tsubst_copy_and_build): Likewise.
7755
7756 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7757
7758         * decl.c (cxx_push_function_context): Do not set
7759         current_function_is_thunk.
7760         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7761         actual function.
7762
7763 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7764
7765         PR c++/13997
7766         * pt.c (more_specialized_class): Increase processing_template_decl
7767         while partial ordering.
7768
7769 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7770
7771         PR c++/13925
7772         * decl.c (start_function): Do not call pushdecl for any
7773         instantiation or specialization of a primary template.
7774
7775 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7776
7777         PR c++/13950
7778         * parser.c (cp_parser_class_name): Robustify.
7779
7780         PR c++/13970
7781         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7782
7783         PR c++/14002
7784         * semantics.c (finish_id_expression): Do not return an
7785         IDENTIFIER_NODE when lookup finds a PARM_DECL.
7786
7787 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7788
7789         PR c++/13978
7790         * pt.c (build_non_dependent_expr): Do not build
7791         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7792
7793         PR c++/13968
7794         * semantics.c (finish_id_expression): Do not return an
7795         IDENTIFIER_NODE when lookup finds a VAR_DECL.
7796
7797         PR c++/13975
7798         * parser.c (cp_parser_simple_declaration): When skipping to the
7799         end of the statement swallow the terminating semicolon.
7800
7801 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
7802
7803         PR c++/13113
7804         * init.c (build_offset_ref): Improve error recovery for invalid
7805         uses of non-static member functions.
7806
7807         PR c++/13854
7808         * cp-tree.h (cp_build_type_attribute_variant): New function.
7809         * class.c (build_clone): Use cp_build_type_attribute_variant.
7810         * decl.c (duplicate_decls): Likewise.
7811         * pt.c (copy_default_args_to_explicit_spec): Likewise.
7812         (tsubst_function_type): Likewise.
7813         * tree.c (build_exception_variant): Check attributes before
7814         concluding that two types are the same.
7815         (cp_build_type-attribute_variant): New method.
7816         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7817
7818         PR c++/13907
7819         * call.c (convert_class_to_reference): Keep better track of
7820         pedantically invalid user-defined conversions.
7821
7822 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7823
7824         PR c++/13957
7825         * pt.c (tsubst_qualified_id): Improved error message when a type
7826         is expected but not found.
7827
7828 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
7829
7830         * class.c: Fix comment typos.
7831         * decl.c: Likewise.
7832         * error.c: Likewise.
7833         * parser.c: Likewise.
7834         * pt.c: Likewise.
7835         * search.c: Likewise.
7836         * typeck.c: Likewise.
7837
7838 2004-01-30  Richard Henderson  <rth@redhat.com>
7839
7840         PR c++/13693
7841         * method.c (use_thunk): Don't force_target_expr for void thunks.
7842         * tree.c (build_target_expr_with_type): Assert non-void type.
7843         (force_target_expr): Likewise.
7844
7845 2004-01-30  Michael Matz  <matz@suse.de>
7846
7847         * parser.c (cp_parser_labeled_statement): Accept case ranges.
7848
7849 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7850
7851         DR206
7852         PR c++/13813
7853         * decl.c (grokdeclarator): Check immediatly type completeness for
7854         non-dependent types.
7855
7856 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7857
7858         PR c++/13683
7859         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7860         a sizeof expression.block
7861
7862 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
7863
7864         PR c++/13883
7865         * mangle.c (write_encoding): Correct encoding of member template
7866         constructors.
7867
7868 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7869
7870         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7871         template name as it was `<::' (digraph typo).
7872         (cp_parser_nth_token_starts_template_argument_list_p): New function.
7873         (cp_parser_id_expression): Use it.
7874         (cp_parser_nested_name_specifier_opt): Likewise.
7875         (cp_parser_template_name): Likewise.
7876         (cp_parser_class_name): Likewise.
7877         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7878
7879 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
7880
7881         PR c++/13791
7882         * typeck.c (merge_types): Do not merge attributes into
7883         TYPENAME_TYPEs.
7884
7885         PR c++/13736
7886         * parser.c (cp_parser_direct_declarator): Do not prevent
7887         backtracking inside a parenthesized declarator.
7888         (cp_parser_parameter_declaration): Fix typo in comment.
7889
7890 2004-01-28  Jan Hubicka  <jh@suse.cz>
7891
7892         * semantics.c (expand_body)  Do emit_associated_thunks before
7893         expansion.
7894
7895 2004-01-27  Devang Patel  <dpatel@apple.com>
7896
7897         * name-lookup.c: Include "debug.h"
7898         (do_namespace_alias): Invoke debug_hooks to emit debug info
7899         for namespace alias.
7900         (do_local_using_decl): Invoke debug_hooks to emit debug info
7901         for using decl.
7902         (do_class_using_decl): Same.
7903         (do_toplevel_using_decl): Same.
7904         (do_using_directive): Same.
7905         (cp_emit_debug_info_for_using): New function.
7906         * Make-lang.in (cp/parser.o): Depend on debug.h
7907         (cp/name-lookup.o): Same.
7908
7909 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7910
7911         * cp-tree.h (language_function, lang_type_header): Use
7912         BOOL_BITFIELD.
7913         * name-lookup.h (cp_binding_level): Likewise.
7914
7915 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
7916
7917         PR c++/13663
7918         * semantics.c (finish_for_expr): Check for unresolved overloaded
7919         functions.
7920
7921         * class.c (add_method): Just check processing_template_decl to
7922         determine whether or not we are within a template.
7923         * decl2.c (maybe_retrofit_in_chrg): Likewise.
7924         * init.c (decl_constant_value): Check the type of the declaration,
7925         not TREE_READONLY.
7926         * name-lookup.c (maybe_push_to_top_level): Rename to ...
7927         (push_to_top_level): ... this.
7928         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7929         * pt.c (push_template_decl_real): Reorder condition for speed.
7930         (convert_template_argument): Use dependency-checking functions in
7931         place of uses_template_parms.
7932         (lookup_template_class): Avoid calling uses_template_parms more
7933         than once.
7934         (uses_template_parms): Reimplement, using dependency-checking
7935         functions.
7936         (instantiate_class_template): Use push_to_top_level, not
7937         maybe_push_to_top_level.
7938         (type_unification_real): Simplify.
7939         (type_dependent_expression_p): Handle OFFSET_REFs and
7940         TEMPLATE_DECLs.
7941         (any_dependent_template_arguments_p): Handle multiple levels of
7942         template argument.
7943         * semantics.c (expand_or_defer_fn): Do not check
7944         uses_template_parms for template instantiations.
7945         * typeck.c (comptypes): Avoid calling cp_type_quals.
7946
7947 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
7948
7949         PR c++/13833
7950         * call.c (build_over_call): Do not convert arguments when
7951         processing a template.
7952         * pt.c (build_non_dependent_expr): Do not build a
7953         NON_DEPENDENT_EXPR for arithmetic constants.
7954
7955 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7956
7957         PR c++/13810
7958         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7959         returns a TYPE_DECL. no further lookup is required.
7960         * semantics.c (check_template_template_default_arg): A TYPE_DECL
7961         is invalid. Rework to give better diagnostics.
7962
7963 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7964
7965         PR c++/13797
7966         * pt.c (instantiate_class_template): Add an error_mark_node
7967         check.
7968         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
7969
7970 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
7971
7972         PR c++/13701
7973         * decl.c (finish_function): Move the call to
7974         finish_fname_decls below the call to
7975         finish_eh_spec_block.
7976
7977 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
7978
7979         * optimize.c, typeck2.c: Update copyright.
7980
7981 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
7982
7983         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
7984         init.c, mangle.c, typeck.c: Update copyright.
7985
7986 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
7987
7988         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
7989
7990 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
7991
7992         * Make-lang.in: Replace $(docdir) with doc.
7993         (c++.info, c++.srcinfo): Dummy entry.
7994         (c++.man, c++.srcman): New rules.
7995         (c++.install-man): Revamp rule.
7996
7997 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
7998
7999         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
8000         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
8001         immediate $(shell) instead of deferred backquote.
8002
8003 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
8004
8005         PR c++/13651
8006         * parser.c (cp_parser_postfix_expression): When encountering
8007         incomplete type on left-hand side of "->" or ".", treat the entire
8008         expression as erroneous.
8009
8010         PR c++/13592
8011         * call.c (build_field_call): Remove.
8012         (n_build_method_call): Likewise.
8013         (build_method_call): Likewise.
8014         (build_new_method_call): Do not call build_field_call.
8015         * class.c (n_build_method_call): Remove.
8016         (print_class_statistics): Do not print it.
8017         * cp-tree.h (build_method_call): Remove declaration.
8018         (finish_object_call_expr): Likewise.
8019         (build_new_1): Do not use build_method_call.
8020         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
8021         when the function appearing on the right-hand-side of "." or "->"
8022         is not actually a function.
8023         * pt.c (tsubst_copy_and_build): Likewise.
8024         * semantics.c (finish_object_call_expr): Remove.
8025
8026 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
8027
8028         PR c++/13710
8029         * pt.c (tsubst): Use finish_typeof.
8030
8031 2004-01-18  Jason Merrill  <jason@redhat.com>
8032
8033         PR c++/11725
8034         * except.c (build_throw): In a template, set
8035         current_function_returns_abnormally.
8036
8037 2004-01-17  Fred Fish  <fnf@intrinsity.com>
8038
8039         PR c++/11895
8040         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
8041         except don't call array_type_nelts() with a VECTOR_TYPE.
8042
8043 2004-01-16  Jan Hubicka  <jh@suse.cz>
8044
8045         * mangle.c (write_mangled_name): Remove inline modifier.
8046
8047 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
8048
8049         PR c++/13574
8050         * decl.c (compute_array_index_type): Fix grammar in comment.
8051         * init.c (build_zero_init): Handle zero-sized arrays correctly.
8052
8053         PR c++/13178
8054         * call.c (name_as_c_string): Print conversion operator names
8055         correctly.
8056
8057         PR c++/13478
8058         * call.c (initialize_reference): Pass -1 for inner parameter to
8059         convert_like_real.
8060
8061 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8062
8063         PR c++/13407
8064         * parser.c (cp_parser_base_specifier): Check for an invalid
8065         keyword `typename' and emit an user-friendly error message.
8066
8067 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
8068
8069         PR pch/13361
8070         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8071         (handle_pragma_implementation): Likewise.
8072
8073 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8074
8075         PR c++/9259
8076         * typeck.c (build_class_member_access_expr): Allow to access members
8077         of the currently open class.
8078         (finish_class_member_access_expr): Likewise.
8079
8080 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
8081
8082         PR c++/13659
8083         * name-lookup.c (validate_nonmember_using_decl): Take scope and
8084         name by value, instead of computing them.
8085         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
8086         arguments.  Pass them to validate_nonmember_using_decl.
8087         * name-lookup.h (do_local_using_decl): Adjust.
8088         (do_toplevel_using_decl): Likewise.
8089         * parser.c (cp_parser_using_declaration): Likewise.
8090         * pt.c (tsubst_expr): Likewise.
8091
8092 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
8093
8094         PR c++/13594
8095         PR c++/13658
8096         * name-lookup.c (qualified_lookup_using_namespace): Search
8097         strongly-associated namespaces first, and only then try other
8098         namespaces.
8099
8100 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
8101
8102         * Make-lang.in (c++.srcextra): Dummy entry.
8103
8104 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8105
8106         PR c++/8856
8107         * parser.c (cp_parser_template_name): Don't try to parse a
8108         conversion-function-id, as it cannot be a template-name.
8109         (cp_parser_simple_type_specifier): Check for invalid template-ids
8110         even after a built-in type.
8111
8112 2004-01-14  Jan Hubicka  <jh@suse.cz>
8113
8114         PR c++/12850
8115         * pt.c (instantiate_decl):  Do not increase function_depth.
8116
8117 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
8118
8119         PR c++/9021
8120         PR c++/11005
8121         * parser.c (cp_parser_elaborated_type_specifier): Warn about
8122         attributes and discard.
8123         * decl.c (xref_tag): Don't overwite existing attributes with
8124         NULL_TREE.
8125
8126 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8127
8128         PR c++/12335
8129         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8130         is no destructor while looking up a BIT_NOT_EXPR.
8131
8132 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
8133
8134         * cxxfilt.c: Remove unused file.
8135
8136 2004-01-14  Jan Hubicka  <jh@suse.cz>
8137
8138         Partial fix to PR c++/12850
8139         * decl2.c (mark_used): Do not proactively instantiate templates
8140         when compiling in unit-at-a-time or not optimizing.
8141         * optimize.c (maybe_clone_body): Do not increase function depth.
8142
8143 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8144
8145         PR c++/13474
8146         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8147
8148 2004-01-12  Steven Bosscher  <stevenb@suse.de>
8149
8150         PR c++/13558
8151         * parser.c (cp_parser_member_declaration): Any non-type is also
8152         not a class or a function.
8153
8154 2004-01-12  Jason Merrill  <jason@redhat.com>
8155
8156         PR c++/12815
8157         * class.c (build_base_path): Do not mark vtable references as
8158         TREE_CONSTANT.
8159         (build_vtbl_ref_1): Likewise.
8160
8161 2004-01-12  Richard Henderson  <rth@redhat.com>
8162
8163         PR opt/10776
8164         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8165         (store_init_value): Use it.
8166         * decl.c (check_initializer): Expect full initialization code
8167         from store_init_value.
8168         * init.c (expand_aggr_init_1): Likewise.
8169         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8170
8171 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
8172
8173         * class.c (layout_class_type): For non-POD class types, also copy
8174         the DECL_SIZE and DECL_MODE of fields to the base class type.
8175
8176 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8177
8178         PR c++/13289
8179         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8180         calling regenerate_decl_from_template.
8181
8182 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
8183
8184         PR c++/4100
8185         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8186         decl-specifier occurring along with a class definition.
8187
8188 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
8189
8190         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8191         clauses to comments describing declares_class_or_enum.
8192         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8193         false.
8194
8195 2004-01-12  Jan Hubicka  <jh@suse.cz>
8196
8197         * pt.c (for_each_template_parm): Do not check for duplicates.
8198         (for_each_template_parm): Use walk_tree duplicate checking code.
8199
8200 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
8201
8202         PR c++/3478
8203         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8204         is error_mark_node, don't add any more decl_specs.
8205         (cp_parser_init_declarator): After committing to a declaration, if
8206         the decl_specifiers start with error_mark_node, issue an error and
8207         change the type to "int".
8208
8209 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
8210
8211         PR bootstrap/7817
8212         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8213
8214 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8215
8216         DR 337
8217         PR c++/9256
8218         * pt.c (tsubst): Substitution must fail if we are attempting to
8219         create an array with element type that is an abstract class type.
8220         * decl.c (cp_finish_decl): Strip pointers and array types recursively
8221         before calling abstract_virtuals_error.
8222
8223 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
8224
8225         * name-lookup.c (qualified_lookup_using_namespace): Consider
8226         strong using directives even if we've already found a binding.
8227
8228 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
8229
8230         * cp-tree.h (cxx_expand_expr): Change prototype.
8231         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8232
8233 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8234
8235         PR c++/12573
8236         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8237         looking into them recursively. They can be there because of the
8238         new __offsetof__ extension.
8239
8240 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
8241
8242         * parser.c (cp_parser_save_member_function_body): Mark the
8243         definition static.
8244
8245 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
8246
8247         PR c++/13057
8248         * class.c (build_clone): Copy type attributes from the original
8249         function to the clone.
8250
8251         PR c++/12815
8252         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8253         references as constant.
8254
8255         PR c++/12132
8256         * parser.c (cp_parser_explicit_instantiation): Improve error
8257         recovery.
8258         (cp_parser_require): Improve indication of the error location.
8259
8260         PR c++/13451
8261         * parser.c (cp_parser_class_head): Reorder logic to check for
8262         invalid qualification.
8263
8264 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8265
8266         PR c++/13157
8267         * name-lookup.c (lookup_using_namespace): Remove spacesp
8268         parameter.
8269         (unqualified_namespace_lookup): Likewise.
8270         (lookup_qualified_name): Adjust accordingly.
8271         (lookup_name_real): Likewise.
8272         (lookup_arg_dependent): Do not eliminate the namespace of the
8273         functions found by unqualified name lookup unless that is the
8274         current namespace.
8275
8276 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
8277
8278         * semantics.c (push_deferring_access_checks): Fix format.
8279         (resume_deferring_access_checks): Likewise.
8280         (stop_deferring_access_checks): Likewise.
8281         (pop_deferring_access_checks): Likewise.
8282         (get_deferred_access_checks): Likewise.
8283         (pop_to_parent_deferring_access_checks): Likewise.
8284         (perform_deferred_access_checks): Likewise.
8285         (perform_or_defer_access_check): Likewise.
8286
8287 2004-01-04  Richard Henderson  <rth@redhat.com>
8288
8289         * call.c (build_over_call): Don't create a save_expr of an
8290         aggregate, but rather its address.
8291
8292 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8293
8294         PR c++/13529
8295         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8296         an offsetof expression.
8297
8298         * parser.c (cp_parser_parameter_declaration): Fix comment.
8299
8300         PR c++/12226
8301         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8302         (reference_binding): Set it when appropriate.
8303         (build_temp): New function, split out from ...
8304         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
8305         (initialize_reference): Likewise.
8306
8307         PR c++/13536
8308         * parser.c (cp_parser): Add in_type_id_in_expr_p.
8309         (cp_parser_new): Initialize it.
8310         (cp_parser_postfix_expression): Set it.
8311         (cp_parser_sizeof_operand): Likewise.
8312         (cp_parser_parameteR_declaration): Do not commit early to tenative
8313         parsers when in_type_id_in_expr_p is set.
8314
8315 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8316
8317         PR c++/13094
8318         * parser.c (cp_parser_template_argument): Don't call
8319         make_unbound_class_template directly.
8320         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8321         UNBOUND_CLASS_TEMPLATE tree node.
8322
8323 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
8324
8325         PR target/12729
8326         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8327
8328 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8329
8330         PR c++/13520
8331         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8332         (DECL_FUNCTION_TEMPLATE_P): Use it.
8333         (DECL_CLASS_TEMPLATE_P): Likewise.
8334         * parser.c (cp_parser_lookup_name): Add is_template parameter.
8335         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8336         (cp_parser_template_name): Likewise.
8337         (cp_parser_elaborated_type_specifier): Likewise.
8338         (cp_parser_namespace_name): Likewise.
8339         (cp_parser_class_name): Likewise.
8340         (cp_parser_lookup_name_simple): Likewise.
8341
8342 See ChangeLog.3 for earlier changes.