OSDN Git Service

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