OSDN Git Service

52a0ee6bb34ea2ea23e7e0b2ef96378143d9fc8f
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
2
3         * class.c (abort_fndecl_addr): New variable.
4         (build_vtbl_initializer): If we have a pure virtual function
5         share the abort function's address.
6         Include gt-cp-class.h at the end.
7         * config-lang.in (gtfiles): Add cp/class.c.
8
9 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
10
11         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
12         (pp_cxx_function_definition): Make static.
13         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
14         (pp_cxx_function_definition): Likewise.
15
16 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
17
18         * name-lookup.c (print_binding_level): Make static.
19         (constructor_name_full): Make static inline.
20         (current_decl_namespace): Make static.
21         * name-lookup.h (constructor_name_full): Remove prototype.
22         (print_binding_level): Likewise.
23         (current_decl_namespace): Likewise.
24
25 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
26
27         * decl.h (debug_bindings_indentation): Remove.
28
29 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
30
31         * typeck.c: Fix a comment typo.
32
33 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
34
35         PR c++/19208
36         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
37         at least once.
38         (tsubst): Use fold_decl_constant_value in place of a bare call to
39         integral_constant_value.
40
41 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
42
43         * typeck.c (more_qualified_p): Remove.
44         * cp-tree.h: Remove the corresponding prototype.
45
46 2005-01-19  Matt Austern  <austern@apple.com>
47
48         * typeck.c (comptypes): Handle return code from objc_comptypes
49         correctly.
50         
51 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
52
53         * cp-tree.h, name-lookup.h: Remove unused prototypes.
54
55 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
56
57         PR c++/19375
58         * semantics.c (finish_id_expression): Disable access checking for
59         already lookuped FIELD_DECL.
60
61 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
62
63         * decl.c (delete_block): Remove.
64         * cp-tree.h: Remove the corresponding prototype.
65
66         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
67         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
68         Remove.
69         * cp-tree.h: Remove the corresponding prototypes.
70
71         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
72         cp_update_decl_after_saving, name_p): Remove.
73         * cp-tree.h: Remove the corresponding prototypes.
74
75 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
76
77         PR c/19472
78         * semantics.c (finish_asm_stmt): Strip nops off
79         input memory operands.
80
81 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
82
83         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
84         typeck2.c: Update copyright.
85
86 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
87
88         * class.c (get_enclosing_class): Remove.
89         * cp-tree.h: Remove the corresponding prototypes.
90
91         * cvt.c (convert_lvalue): Remove.
92         * cp-tree.h: Remove the corresponding prototype.
93
94         * pt.c (tinst_for_decl): Remove.
95         * cp-tree.h: Remove the corresponding prototypes.
96
97         * tree.c (hash_chainon): Remove.
98         * cp-tree.h: Remove the corresponding prototypes.
99
100 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
101
102         PR c++/19263
103         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
104         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
105
106 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
107
108         * Make-lang.in (cp-warn): Don't append $(WERROR).
109
110 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
111
112         * cp-tree.h: Fix a comment typo.
113
114 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
115
116         PR c++/19298
117         * pt.c (tsubst_qualified_id): Call convert_from_reference.
118
119 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
120
121         PR c++/19244
122         * class.c (add_implicitly_declared_members): Remove dead code.
123         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
124         DECL_CONSTRUCTOR_P.
125         (grokdeclarator): Adjust calls to grokfndecl.
126         * method.c (implicitly_declare_fn): Improve documentation.
127         * parser.c (cp_parser_direct_declarator): Do not consider a
128         function to be a constructor if the containing class was
129         originally anonymous.
130
131 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
132
133         PR c++/17154
134         * search.c (lookup_field_1): Handle using declaration in
135         class template partial specialization.
136
137 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
138
139         PR c++/19258
140         * pt.c (push_access_scope): Handle friend defined in class.
141         (pop_access_scope): Likewise.
142
143 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
144
145         PR c++/19270
146         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
147         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
148         array-new handling code.  Use build_x_binary_op.
149
150 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
151
152         PR c++/19030
153         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
154         * name-lookup.h (push_scope): Return pushed scope, not flag.
155         * name-lookup.c (push_scope): Return scope that should be popped,
156         not a flag.
157         * decl.c (start_decl): Adjust.
158         (grokfndecl): Adjust scope push and pop.
159         * decl2.c (check_classfn): Likewise.
160         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
161         cp_parser_init_declarator, cp_parser_direct_declarator,
162         cp_parser_class_specifier, cp_parser_class_head,
163         cp_parser_lookup_name,
164         cp_parser_constructor_declarator_p): Likewise.
165         * pt.c (instantiate_class_template,
166         resolve_typename_type): Likewise.
167
168 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
169
170         PR c++/14136
171         * parser.c (cp_parser_unqualified_id): Do not issue error message
172         for typedef-name as destructor declarator when performing an
173         uncommitted tentative parse.
174
175 2005-01-01  Steven Bosscher  <stevenb@suse.de>
176
177         PR middle-end/17544
178         * decl.c (finish_function): Fix comment.  Annotate the compiler
179         generated return with the current file name and line 0.
180
181 2004-12-31  Richard Henderson  <rth@redhat.com>
182
183         PR middle-end/17799
184         * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
185         * class.c (build_vtable): Don't conditionallize setting it
186         based on DWARF2_DEBUG.
187         (layout_class_type): Set DECL_IGNORED_P.
188         * decl2.c (get_guard): Likewise.
189         * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
190         * tree.c (build_local_temp): Likewise.
191
192 2004-12-30  Mark Mitchell  <mark@codesourcery.com>
193
194         * cp-tree.h (cp_declarator): Split "name" field into
195         qualifying_scope and unqualified_name.
196         * decl.c (get_scope_of_declarator): Adjust accordingly.
197         (grokdeclarator): Likewise.
198         * decl2.c (grokfield): Likewise, and adjust call to
199         do_class_using_decl.
200         * name-lookup.c (do_class_using_decl): Split "decl" into
201         "scope" and "name".  Remove unnecessary code.
202         * name-lookup.h (do_class_using_decl): Adjust declaration.
203         * parser.c (make_id_declarator): Split "id" into qualifying_scope
204         and unqualified_name.
205         (cp_parser_using_declaration): Adjust call to do_class_using_decl.
206         (cp_parser_direct_declarator): Adjust to handle the fact that
207         cp_parser_declarator_id no longer returns a SCOPE_REF.
208         (cp_parser_direct_declarator): Likewise.
209         (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
210         names.
211         (cp_parser_member_declaration): Adjust call to make_id_declarator.
212         (cp_parser_check_declarator_template_parameters): Do not expect a
213         SCOPE_REF. 
214         
215         * decl.c (duplicate_decls): Call ggc_free on declarations we will
216         not be needing any longer.
217
218         PR c++/19190
219         * cvt.c (convert_to_void): Do not use STRIP_NOPs.
220
221 2004-12-28  Richard Henderson  <rth@redhat.com>
222
223         PR inline-asm/15740
224         * semantics.c (finish_asm_stmt): Resolve asm names.  Validate input
225         constraints.  Mark memory inputs addressable.
226
227 2004-12-27  Jason Merrill  <jason@redhat.com>
228
229         * decl.c (expand_static_init): Don't use shortcut if
230         targetm.relaxed_ordering.
231
232 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
233
234         PR c++/19149
235         * decl.c (check_tag_decl): Robustify.
236
237 2004-12-23  Mark Mitchell  <mark@codesourcery.com>
238
239         PR c++/17595
240         * parser.c (cp_parser_error): Issue better messages about
241         #pragma in locations where it is not permitted.
242
243         PR c++/17413
244         * pt.c (check_instantiated_args): Remove bogus SFINAE code.
245
246         * cvt.c (convert_to_void): Fix typo in comment.
247
248 2004-12-23  Alexandre Oliva  <aoliva@redhat.com>
249
250         PR c++/18962
251         * pt.c (check_explicit_specialization): Use the argument list from
252         the definition in a template function specialization definition.
253
254 2004-12-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
255
256         PR c++/18733
257         * pt.c (check_explicit_specialization): Use special logic to validate
258         befriended specializations.
259
260 2004-12-22  Mark Mitchell  <mark@codesourcery.com>
261
262         * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
263
264         PR c++/18464
265         * call.c (build_this): In templates, do not bother with
266         build_unary_op.
267         * typeck.c (unary_complex_lvalue): In a template, always refuse
268         simplifications. 
269
270         PR c++/18492
271         * cp-gimplify.c (cp_genericize): Relax assertion.
272
273         PR c++/11224
274         * cvt.c (convert_to_void): Warn about unused values.
275
276         PR c++/18257
277         * rtti.c (emit_support_tinfos): On systems without weak symbols,
278         emit the runtime library type-info objects as non-COMDAT. 
279
280 2004-12-21  Mark Mitchell  <mark@codesourcery.com>
281
282         PR c++/18378
283         * call.c (convert_like_real): Do not permit the use of a copy
284         constructor to copy a packed field.
285
286         PR c++/19063
287         * decl.c (grokdeclarator): Return error_mark_node, not
288         void_type_node, to indicate errors.
289         * parser.c (cp_parser_template_parameter_list): Robustify.
290         (cp_parser_template_parameter): Likewise.
291
292         PR c++/19034
293         * tree.c (cp_tree_equal): Handle OVERLOAD.
294
295 2004-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
296
297         * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
298         * name-lookup.c (pushdecl_class_level): Likewise.
299
300 2004-12-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
301
302         * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
303
304 2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
305
306         PR c++/18984
307         * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
308         check to see if contains the pointer.  Insert the statement before
309         returning.
310
311 2004-12-21  Nathan Sidwell  <nathan@codesourcery.com>
312
313         PR c++/14075
314         * decl.c (check_initializer): Check string initializer of array is
315         not parenthesized.
316         * cp-tree.h (PAREN_STRING_LITERAL_P): New.
317         * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
318         * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
319
320         * cp-tree.def (TEMPLATE_TYPE_PARM,
321         BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder 
322         for better code efficiency.
323         * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
324         (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
325         (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
326         INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
327         CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
328         TYPE_PTROBV_P): Likewise. 
329
330         PR c++/18975
331         * method.c (do_build_copy_constructor): Refactor. Don't const
332         qualify a mutable field.
333         (do_build_assign_ref): Likewise.
334
335 2004-12-20  Matt Austern <austern@apple.com>
336
337         PR c++/19044
338         * decl.c (make_rtl_for_nonlocal_decl): Use
339         set_builtin_user_assembler_name.
340         
341 2004-12-19  Mark Mitchell  <mark@codesourcery.com>
342
343         * cp-tree.h (note_decl_for_pch): New function.
344         * class.c (build_clone): Call note_decl_for_pch.
345         * semantics.c (finish_member_declaration): Likewise.
346         (note_decl_for_pch): New function.
347
348 2004-12-17  Steven Bosscher  <stevenb@suse.de>
349
350         * init.c (build_zero_init): max_index is the number of
351         elements, minus 1.
352
353 2004-12-17  Nathan Sidwell  <nathan@codesourcery.com>
354
355         PR c++/18721
356         * class.c (add_method): Do not push conversion operators into a
357         binding level.
358
359         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
360         * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
361
362 2004-12-16  Nathan Sidwell  <nathan@codesourcery.com>
363
364         PR c++/18905
365         * cp-tree.h (integral_constant_value): Declare.
366         * call.c (null_ptr_cst_p): Use integral_constant_value, not
367         decl_constant_value.
368         (convert_like_real): Likewise.
369         * class.c (check_bitfield_decl): Likewise.
370         * cvt.c (ocp_convert): Likewise.
371         (convert): Remove unnecessary decl_constant_value call.
372         * decl.c (compute_array_index_type): Use integral_constant_value,
373         not decl_constant_value.
374         (build_enumerator): Likewise.
375         * decl2.c (grokfield): Likewise.
376         * init.c (decl_constant_value): Simplify.
377         (integral_constant_value): New.
378         * pt.c (fold_decl_constant_value): Use integral_constant_value,
379         remove subsequent check.
380         (tsubst): Use integral_constant_value, not decl_constant_value.
381         (tsubst_copy, unify): Likewise.
382         * typeck.c (decay_conversion): Likewise.
383         (build_compound_expr): Remove unnecessary decl_constant_value
384         calls.
385         (build_static_cast_1, build_reinterpret_cast_1):
386         (convert_for_assignment): Remove comment about not calling
387         decl_constant_value.
388
389 2004-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
390
391         PR c++/18825
392         * pt.c (instantiate_class_template): Set input_location for
393         friend function.
394         (tsubst_friend_function): Don't set input_location here.
395         Make sure the context is complete if necessary.
396
397 2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>
398
399         PR c++/18981
400         * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
401         flag setting.
402
403 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
404
405         PR c++/18738
406         * decl.c (make_typename_type): Do not handle namespace-scoped
407         names here.
408         (tag_name): Handle typename_type.
409         (check_elaborated_type_specifier): Handle typenames.
410         * parser.c (cp_parser_diagnose_invalid_type_name): Improve
411         comment.
412         (cp_parser_elaborated_type_specifier): Use
413         cp_parser_diagnose_invalid_type_name.
414
415 2004-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
416
417         PR c++/18965
418         * init.c (build_zero_init): If the max_index is 0, there is no
419         need to create a RANGE_EXPR.
420
421 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
422
423         PR c++/18793
424         * cp-objcp-common.c (cp_expr_size): Loosen assertion.
425
426 2004-12-14  Nathan Sidwell  <nathan@codesourcery.com>
427
428         PR c++/18949
429         * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
430         REFERENCE_REF_P is dereferencing a reference type.
431         * typeck.c (build_static_cast): Convert from reference even in a
432         template.
433         (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
434
435 2004-12-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
436
437         * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
438         (cp_parser_name_lookup_error): Use it.
439         (cp_parser_check_for_invalid_template_id): Likewise.
440         (cp_parser_skip_to_closing_parenthesis): Likewise.
441         (cp_parser_nested_name_specifier_opt): Likewise.
442         (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
443         (cp_parser_parameter_declaration_list): Likewise.
444         (cp_parser_parameter_declaration): Likewise.
445         (cp_parser_template_name): Let cp_parser_simulate_error perform
446         the checking.
447         (cp_parser_committed_to_tentative_parse): Remove.
448
449 2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
450
451         PR c++/18968
452         * class.c (build_base_path): Convert the zero constant to the correct
453         type when comparing.
454
455 2004-12-13  Mark Mitchell  <mark@codesourcery.com>
456
457         PR c++/18925
458         * class.c (layout_class_type): Determine the visibility of static
459         data members.
460
461 2004-12-12  Roger Sayle  <roger@eyesopen.com>
462
463         PR middle-end/12454
464         * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
465         condition is a constant and the unexecuted clause is empty.
466
467 2004-12-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
468
469         PR c++/18731
470         * parser.c (cp_parser_class_head): Reject typedef-name in class head.
471
472 2004-12-09  Matt Austern  <austern@apple.com>
473
474         PR c++/18514
475         * name-lookup.c (do_nonmember_using_decl): A real function
476         declaration takes precedence over an anticipated declaration.
477         
478 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
479
480         * parser.c (cp_parser_member_declaration): Fix comment typo.
481
482 2004-12-09  Alexandre Oliva  <aoliva@redhat.com>
483
484         PR c++/18757
485         * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
486         if parsing failed.
487
488 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
489
490         PR c++/18073
491         * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
492
493 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
494
495         PR c++/16681
496         * init.c (build_zero_init): Build a RANGE_EXPR for an array
497         initializer.
498
499 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
500
501         * typeck.c: Remove DOS line endings.
502
503 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
504
505         PR c++/18100
506         * decl.c (lookup_and_check_tag): Diagnose nested class with 
507         the same name as enclosing class.
508
509 2004-12-08  Nathan Sidwell  <nathan@codesourcery.com>
510
511         PR c++/18803
512         * cp-tree.h (REFERENCE_REF_P): New.
513         (CPTI_TYPE_INFO_TYPE): Rename to ...
514         (CPTI_CONST_TYPE_INFO_TYPE): ... here.
515         (CPTI_TYPE_INFO_REF_TYPE): Remove.
516         (type_info_type_node): Rename to ...
517         (const_type_info_type_node): ... here.
518         (type_info_ref_type): Remove.
519         * call.c (build_user_type_conversion): Reformat.
520         (resolve_args): Do not convert_from_reference.
521         (build_object_call): Call convert_from_reference.
522         (prep_operand): Do not convert_from_reference.
523         (build_new_method_call): Likewise.
524         * class.c (build_vfield_ref): Likewise.
525         * cvt.c (convert_to_reference): Likewise.
526         (convert_from_reference): Build INDIRECT_REF here, not with
527         build_indirect_ref.
528         (convert_force): Do not convert_from_reference.
529         (build_expr_type_conversion): Likewise.
530         * decl.c (grok_reference_init): Likewise.
531         * decl2.c (delete_sanity): Likewise.
532         * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
533         * init.c (build_dtor_call): Do not convert_from_reference.
534         * parser.c (cp_parser_template_argument): Unwrap indirected
535         reference. Allow TEMPLATE_PARM_INDEX as an object parm.
536         * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
537         convert_from_reference, if indicated.
538         <case CALL_EXPR>: Do not convert_from_reference.
539         <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
540         (tsubst_initializer_list): Do not convert_from_reference.
541         * rtti.c (init_rtti_processing): Adjust node creation.
542         (throw_bad_typeid): Use const_type_info_type_node.
543         Do not convert_from_reference.
544         (typeid_ok_p): Use const_type_info_type_node.
545         (build_typeid, get_typeid): Always return type_info typed node.
546         (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
547         * semantics.c (finish_stmt_expr_expr): Do not
548         convert_from_reference.
549         (finish_id_expression): Convert_from_reference as appropriate.
550         * typeck.c (decay_conversion): Do not convert_from_reference.
551         (finish_class_member_access_expr): Likewise.
552         (build_indirect_ref): Use POINTER_TYPE_P.
553         (convert_arguments): Do not convert_from_reference.
554         (build_modify_expr): Likewise.
555         (convert_for_initialization): Likewise.
556         * typeck2.c (build_x_arrow): Likewise.
557
558 2004-12-07  Ziemowit Laski  <zlaski@apple.com>
559
560         * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
561         field to 'objc_info'.
562
563 2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
564
565         * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
566
567 2004-12-07  Roger Sayle  <roger@eyesopen.com>
568
569         * name-lookup.c (leave_scope): We only need to update
570         class_binding_level when leaving a class scope.
571
572 2004-12-06  Ziemowit Laski  <zlaski@apple.com>
573
574         * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
575
576 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
577
578         PR c++/17011, c++/17971
579         * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
580         invalid field.
581         (tsubst_copy_and_build) <COMPONENT_REF case>: Check
582         error_mark_node after member substitution.
583         * semantics.c (finish_id_expression): Call
584         finish_non_static_data_member for non-dependent FIELD_DECL.
585
586 2004-12-03  Nathan Sidwell  <nathan@codesourcery.com>
587
588         PR c++/18782
589         * decl.c (grokdeclarator): Make sure class in pointer to member is
590         not a namespace.
591
592 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
593
594         PR c++/18318
595         * parser.c (cp_parser_new_type_id): Move array size expression
596         checks from here ...
597         * init.c (build_new): ... to here.
598
599 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
600
601         PR c++/18758
602         * parser.c (cp_parser_class_head): Return NULL_TREE when
603         push_template_decl fails.  Update comment.
604
605 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
606
607         PR c++/15664, c++/18276
608         * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize.  Correctly
609         tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
610
611 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
612
613         PR c++/18123
614         * parser.c (cp_parser_type_specifier): Catch template declaration
615         of enum.
616
617 2004-12-01  Matt Austern  <austern@apple.com>
618
619         * name-lookup.c (namespace_binding): Omit alias check for global
620         namespace.
621
622 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
623
624         PR c++/18729
625         * parser.c (cp_parser_class_name): Check decl's type is not
626         error_mark_node.
627
628         PR c++/17431
629         * call.c (standard_conversion): Add FLAGS parameter. Do not allow
630         derived to base conversion when checking constructor
631         accessibility.
632         (implicit_conversion): Pass FLAGS to standard_conversion.
633         (check_constructir_callable): Disallow conversion functions.
634
635 2004-11-30  Kazu Hirata  <kazu@cs.umass.edu>
636
637         * parser.c: Fix comment typos.
638
639 2004-11-27  Mark Mitchell  <mark@codesourcery.com>
640
641         PR c++/18368
642         * parser.c (cp_parser_check_for_definition_in_return_type): Take
643         the defined type as a parameter, and inform the user about the
644         possibility of a missing semicolon.
645         (cp_parser_explicit_instantiation): Adjust call to
646         cp_parser_check_for_definition_in_return_type.
647         (cp_parser_init_declarator): Likewise.
648         (cp_parser_member_declaration): Likewise.
649
650         PR c++/18674
651         * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
652         typename from comments.
653         * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
654         (TYPENAME_IS_CLASS_P): Likewise.
655         (make_typename_type): Change prototype.
656         * decl.c (struct_typename_info): New type.
657         (typename_compare): Expect the second argument to be a
658         typename_info, not a tree.
659         (build_typename_type): Add tag_type parameter.  Do not create a
660         new type until necessary.
661         (make_typename_type): Add tag_type parameter.
662         * error.c (TYPENAME_TYPE): Print tags other than "typename" if
663         appropriate.
664         * friend.c (make_friend_class): Adjust call to make_typename_type.
665         * parser.c (cp_parser_make_typename_type): Likewise.
666         (cp_parser_primary_expression): Adjust call to
667         cp_parser_lookup_name.
668         (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
669         (cp_parser_class_or_namespace_name): Likewise.
670         (cp_parser_postfix_expression): Adjust calls to
671         make_typename_type.
672         (cp_parser_mem_initializer_id): Adjust calls to
673         cp_parser_class_name.
674         (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
675         (cp_parser_template_name): Likewise.
676         (cp_parser_template_argument): Likewise.
677         (cp_parser_type_name): Adjust call to cp_parser_class_name.
678         (cp_parser_elaborated_type_specifier): Adjust calls to
679         make_typename_type and cp_parser_lookup_name.
680         (cp_parser_namespace_name): Likewise.
681         (cp_parser_class_name): Replace type_p parameter with tag_type.
682         Adjust calls to make_typename_type and cp_parser_lookup_name.
683         (cp_parser_class_head): Adjust calls to cp_parser_class_name.
684         (cp_parser_base_specifier): Likewise.
685         (cp_parser_lookup_name): Replace is_type parameter with tag_type.
686         Adjust calls to make_typename_type and lookup_qualified_name.
687         (cp_parser_lookup_name_simple): Adjust call to
688         cp_parser_lookup_name.
689         (cp_parser_constructor_declarator_p): Adjust call to
690         cp_parser_class_name.
691         * pt.c (convert_template_argument): Adjust all to
692         make_typename_type.
693         (tsubst_decl): Do not pre-substitute the type of the declaration.
694         (tsubst): Hand off declarations more quickly.  Adjust call to
695         make_typename_type. 
696
697         PR c++/18512
698         * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
699
700 2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
701
702         PR c/7544
703         * Make-lang.in (cp/decl2.o): Update dependencies.
704         * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
705
706 2004-11-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
707
708         PR c++/18652
709         * name-lookup.c (pushtag): Change return type to tree.
710         * cp-tree.h (pushtag): Adjust declaration.
711         * decl.c (xref_tag, start_enum): Use return value of pushtag.
712         * pt.c (push_template_decl_real): Return immediately if
713         pushdecl_namespace_level returns error_mark_node.
714
715 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
716
717         * pt.c: Fix a comment typo.
718
719 2004-11-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
720
721         Friend class name lookup 4/n
722         * class.c (pushclass): Don't call cxx_remember_type_decls.
723         * cp-tree.h (clear_anon_tags): Remove declaration.
724         * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
725         * name-lookup.c (binding_entry_free, binding_table_free): Comment
726         out functions.
727         (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
728         binding_table_remove_anonymous_types, cxx_remember_type_decls,
729         bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
730         lookup_tag_reverse): Remove
731         (begin_scope, leave_scope, kept_level_p, print_binding_level):
732         Don't use type_decls field in cp_binding_level.
733         (maybe_process_template_type_declaration, pushtag): Set
734         CLASSTYPE_NESTED_UTDS directly.
735         * name-lookup.h (binding_table_remove_anonymous_types,
736         cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
737         declaration.
738         (cp_binding_level): Remove type_decls field.
739
740 2004-11-26  Kazu Hirata  <kazu@cs.umass.edu>
741
742         * typeck.c: Fix a comment typo.
743
744 2004-11-25  Mark Mitchell  <mark@codesourcery.com>
745
746         PR c++/18445
747         * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
748         unknown_type as non matching.  Tidy up.
749         * pt.c (build_non_dependent_expr): Do not build a
750         NON_DEPENDENT_EXPR for a VAR_DECL.
751
752         PR c++/18001
753         * cp-tree.h (lvalue_or_else): Remove declaration.
754         * tree.c (lvalue_or_else): Remove.
755         * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
756         (build_modify_expr): Likewise.
757
758         PR c++/18625
759         * decl.c (duplicate_decls): Return error_mark_node on error, as
760         specified.
761
762         PR c++/18466
763         * decl.c (grokvardecl): Keep track of whether or not a there was
764         explicit qualification.
765         * name-lookup.c (set_decl_namespace): Complain about explicit
766         qualification of a name within its own namespace.
767
768         PR c++/18545
769         * typeck.c (check_return_expr): Robustify.
770
771 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
772
773         Friend class name lookup 3/n, PR c++/3332
774         * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
775         (lookup_type_scope): Don't deal with name from user declaration
776         specially.
777         * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
778         * parser.c (cp_parser_class_specifier): Use push_inner_scope and
779         pop_inner_scope.
780
781 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
782
783         Friend class name lookup 2/n, PR c++/14513, c++/15410
784         * name-lookup.c (lookup_name_real): Simplify.
785         (lookup_type_scope): Add SCOPE parameter.  Handle friend class
786         lookup.
787         * name-lookup.h (tag_scope): New enum type.
788         (lookup_type_scope): Adjust declaration.
789         * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
790         Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
791         (start_enum): Likewise.  Add assertion test that NAME is 
792         IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
793         case of error.
794         * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
795         * parser.c (cp_parser_elaborated_type_specifier,
796         cp_parser_class_head): Adjust call to xref_tag.
797         * pt.c (lookup_template_class, instantiate_class_template):
798         Likewise.
799         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
800         tinfo_base_init, emit_support_tinfos): Likewise.
801
802 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
803
804         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
805
806 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
807
808         PR c++/17473
809         * name-lookup.c (supplement_binding): Do not allow typedefs to be
810         redefined in class scope.
811
812         PR c++/18285
813         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
814         redefinitions of builtin types other that "bool" or "wchar_t".
815
816 2004-11-24  Steven Bosscher  <stevenb@suse.de>
817
818         * decl.c (cxx_init_decl_processing): Don't clear
819         flag_inline_functions.
820
821 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
822
823         * pt.c (tsubst_function_type): Do not permit function types which
824         return arrays or functions.
825
826         PR c++/18586
827         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
828
829         PR c++/18530
830         * cp-tree.h (CTOR_NAME): Remove.
831         (DTOR_NAME): Remove.
832         * decl.c (initialize_predefined_identifiers): Add spaces to the
833         end of constructor and destructor names.
834
835 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
836
837         PR c++/8929
838         * decl.c (start_decl): Check for invalid specialization headers.
839
840 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
841
842         PR c++/16882
843
844         * call.c (standard_conversion): Move check for conversions between
845         vector pointers...
846         * typeck.c (ptr_reasonably_similar): ... here.
847
848 2004-11-23  Ben Elliston  <bje@au.ibm.com>
849
850         * cp-tree.h (context_as_string): Remove extern.
851         * error.c (context_as_string): Remove.
852
853         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
854         * lex.c (cp_type_qual_from_rid): Remove.
855
856         * cp-tree.h (do_poplevel): Remove extern.
857         (check_multiple_declarators): Likewise.
858         * semantics.c (do_poplevel): Make static.
859         (check_multiple_declarators): Remove.
860
861         * cp-tree.h (check_final_overrider): Remove extern.
862         * search.c (check_final_overrider): Make static.
863
864         * cp-tree.h (build_artificial_parm): Remove extern.
865         * decl2.c (build_artificial_parm): Make static.
866
867 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
868
869         PR c++/18354
870         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
871         Make sure the result is always a rvalue.
872
873 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
874
875         * decl.c (start_preparsed_function): Call check_function_type even
876         in templates.
877         (require_complete_types_for_parms): Skip dependent types.
878         (check_function_type): Likewise.
879
880 2004-11-16  Steven Bosscher  <stevenb@suse.de>
881
882         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
883         * search.c: Don't include it.
884
885 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
886
887         * cp-gimplify.c: Include pointer-set.h
888         (cp_genericize_r): Use pointer_sets instead of a hashtable.
889         Also instert the new statement for CLEANUP_STMT.
890         (cp_genericize): Use pointer_sets instead of a hashtable.
891         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
892
893 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
894
895         Friend class name lookup 1/n, PR c++/18471
896         * decl.c (lookup_and_check_tag): New function.
897         (xref_tag, start_enum): Use it.
898         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
899         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
900         location.
901         * name-lookup.c (lookup_name_current_level): Rename to ...
902         (lookup_name_innermost_nonclass_level): ... this.
903         (lookup_type_scope): New function.
904         * name-lookup.h (lookup_name_current_level): Rename to ...
905         (lookup_name_innermost_nonclass_level): ... this.
906         (lookup_type_scope): Add declaration.
907
908 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
909
910         PR c++/17344
911         * pt.c (coerce_template_parms): Only emit error message about
912         invalid template argument when TF_ERROR.
913
914 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
915
916         PR c++/18389
917         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
918         error_mark_node to indicate errors.
919
920         PR c++/18429
921         * parser.c (cp_parser_direct_declarator): Disallow non-constant
922         array bounds when not inside a function.
923
924         PR c++/18436
925         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
926         unqualified name resolves to a member function.
927
928         PR c++/18407
929         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
930         derived class correctly.
931         
932         * decl2.c (import_export_decl): Fix typo in comment.
933         * tree.c (pod_type_p): Likewise.
934
935 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
936
937         * typeck.c (cxx_mark_addressable): Add braces around the first if.
938
939 2004-11-10  Adam Nemet  <anemet@lnxw.com>
940
941         PR middle-end/18160  
942         * typeck.c (cxx_mark_addressable): Issue an error if address of an
943         explicit register variable is requested.
944
945 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
946
947         PR c++/18143
948         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
949         (struct lang_decl_flags): Add thunk_p flag.
950         (struct lang_decl): Remove separate fixed_offset. Place
951         cloned_function and fixed_offset into union.
952         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
953         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
954         (THUNK_FIXED_OFFSET): Adjust.
955         * method.c (make_thunk): Adjust.
956
957 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
958
959         PR c++/18369
960         * init.c (build_new_1): Handle parenthesized type-ids that name an
961         array type.  Tidy.
962
963 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
964
965         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
966         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
967         quoting in diagnostics.
968         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
969         quoting in printf format.
970         * decl.c (duplicate_decls, start_decl): Use %qD instead of
971         unquoted %D.
972
973 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
974
975         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
976         search.c, typeck2.c: Fix comment formatting.
977
978 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
979         
980         PR tree-optimization/18184
981         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
982         of different modes or alias-all flags as equivalent.
983         * typeck.c (comptypes): Likewise.
984
985 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
986
987         DR 49, 100
988         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
989         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
990         TYPE_REFFN_P): Document.
991         (fold_decl_constant_value): New prototype.
992         * pt.c (convert_nontype_argument_function): Rewrite and extract
993         parts into...
994         (fold_decl_constant_value, convert_nontype_argument_function): New.
995         (lookup_template_class): Add comment about useless double call.
996         * mangle.c (write_expression): Strip conversions before lowering
997         pointer to members.
998         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
999         enum to enum conversion.
1000
1001 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
1002
1003         PR c++/18124
1004         * parser.c (cp_parser_type_parameter): Robustify.
1005
1006         PR c++/18155
1007         * parser.c (cp_parser_single_declaration): Disallow template
1008         typedefs.
1009
1010         PR c++/18177
1011         * typeck.c (build_const_cast): Use error_operand_p.
1012
1013 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
1014
1015         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1016         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1017         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1018         from cp-lang.c.
1019         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1020         from cp-lang.c.
1021         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1022
1023 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
1024
1025         PR c++/18064
1026         * search.c (check_final_overrider): Deprecate gnu covariant extension.
1027
1028 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1029
1030         Convert diagnostics to use quoting flag q 9/n
1031         * typeck.c (build_x_unary_op, convert_member_func_to_ptr, 
1032         get_delta_difference):  Use new quotation style.
1033         * repo.c (reopen_repo_file_for_write): Likewise.
1034         * pt.c (do_type_instantiation): Likewise.
1035         * parser.c (cp_parser_diagnose_invalid_type_name): 
1036         * name-lookup.c (push_overloaded_decl, set_decl_namespace): 
1037         * error.c (cp_print_error_function,
1038         print_instantiation_full_context): Likewise.
1039         * decl.c (define_label, grok_reference_init, 
1040         maybe_deduce_size_from_array_init, revert_static_member_fn): 
1041         * decl2.c (check_classfn): Likewise.
1042         * class.c (add_method, check_field_decls, layout_class_type, 
1043         resolve_address_of_overloaded_function): Likewise.
1044         * call.c (build_x_va_arg, build_over_call): Likewise.
1045
1046 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1047
1048         Convert diagnostics to use quoting flag q 8/n
1049         * cvt.c (cp_convert_to_pointer, warn_ref_binding, 
1050         convert_to_reference, ocp_convert, convert_to_void 
1051         cp_convert_to_pointer): Use new quotation style.
1052
1053 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
1054
1055         PR c++/15172
1056         * typeck2.c (store_init_value): Use split_nonconstant_init even
1057         for types that require construction.
1058         
1059 1004-10-28  Matt Austern  <austern@apple.com>
1060
1061         PR c++/17542
1062         * cp-tree.h (class_key_or_enum_as_string): Declare.
1063         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1064         and remove static qualifier.
1065         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1066         union/enum declaration.
1067         
1068 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
1069
1070         * pt.c: Fix a comment typo.
1071
1072 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
1073
1074         * typeck.c (composite_pointer_type): Remove comment about DR 195.
1075         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1076         warning when being pedantic.
1077         (build_reinterpet_cast, build_c_cast): Adjust.
1078
1079 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
1080
1081         PR c++/17695
1082         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1083         appear in a constructor/destructor that will be cloned.
1084
1085 1004-10-28  Matt Austern  <austern@apple.com>
1086
1087         PR c++/14124
1088         * decl.c (finish_enum): Handle packed attribute.
1089         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1090         
1091 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
1092
1093         PR c++/17132
1094         * pt.c (instantiate_class_template): Increment
1095         processing_template_decl when substituting into a member class
1096         template.
1097
1098 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
1099
1100         PR c++/17435
1101         * call.c (convert_like_real): Fix formatting.
1102         (initialize_reference): When binding a temporary to a base class,
1103         ensure that the nominal copy made is to the derived class, not the
1104         base class.
1105
1106         PR c++/18140
1107         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1108         include ">>".
1109
1110 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1111
1112         * decl.c (bad_specifiers): Move the q after the %.
1113
1114 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1115
1116         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1117         the %.
1118
1119 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
1120
1121         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1122         * search.c (current_scope): Fix prototype.
1123
1124         PR c++/18093
1125         * search.c (current_scope): Return the innermost non-block scope,
1126         not the innermost non-block, non-namespace scope.
1127         (at_namespace_scope_p): Adjust accordingly.
1128         (dfs_accessible_post): Do not pass namespaces to is_friend.
1129         (dfs_walk_once_accessible_r): Likewise.
1130         * decl.c (grokvardecl): Adjust call to current_scope.
1131         (build_enumerator): Likewise.
1132         * parser.c (cp_parser_using_declaration): Likewise.
1133         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1134         current_scope.
1135         (cp_parser_class_head): Adjust call to current_scope.
1136         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1137         alias.
1138
1139         PR c++/18020
1140         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1141         their underlying values.
1142
1143         PR c++/18161
1144         * typeck.c (build_binary_op): Honor build_type, even when in a
1145         template.
1146
1147 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
1148
1149         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1150         padding token checking.
1151
1152 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
1153
1154         PR c++/18121
1155         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1156         layout_type as it is already done by create_array_type_for_decl.
1157
1158 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
1159
1160         PR c++/18095
1161         * parser.c (eof_token): Make const, correctly initialize rid and
1162         location fields.
1163         (struct cp_lexer): Replace buffer_end pointer with buffer_length
1164         count. Adjust.
1165         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
1166         zero it out.
1167         (cp_lexer_new_from_tokens): Adjust.
1168         (cp_lexer_grow_buffer): Remove.
1169         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1170         cp_lexer_purge_token): Add const casts.
1171
1172 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
1173
1174         PR c++/18073
1175         PR c++/10841
1176         * cp-tree.h (convert_to_base): Change prototype.
1177         (build_ptrmemfunc): Likewise.
1178         (convert_ptrmem): New function.
1179         * call.c (struct conversion): Adjust documentation for base_p.
1180         (standard_conversion): Set base_p for ck_pmem conversions as
1181         appropriate.
1182         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1183         conversions.
1184         * class.c (convert_to_base): Handle both pointers and objects.
1185         Add nonnull parameter.
1186         (build_vfield_ref): Adjust call to convert_to_base.
1187         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1188         (convert_force): Likewise.
1189         * typeck.c (build_unary_op): Likewise.
1190         (convert_ptrmem): New function.
1191         (build_static_cast_1): Use it.
1192         (build_reinterpret_cast): Allow conversions to vector types.
1193         (get_delta_difference): Add c_cast_p parameter.
1194         (build_ptrmemfunc): Likewise.  Adjust calls to
1195         get_delta_difference.
1196
1197 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
1198
1199         PR c++/13560
1200         * error.c (cp_error_at): Output the context as it might be
1201         different file as the other location.
1202
1203 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
1204
1205         * typeck.c: Fix a comment typo.
1206
1207 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1208
1209         PR c++/13495
1210         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1211         * cp-tree.h (make_unbound_class_template): Adjust prototype.
1212         * parser.c (cp_parser_lookup_name): Adjust call to
1213         make_unbound_class_template.
1214         (cp_parser_single_declaration): Handle member class of class
1215         template as template friend parsing correctly.
1216         * friend.c (is_friend): Call is_specialization_of_friend for
1217         template friend class.
1218         (make_friend_class): Handle member class of class template as
1219         template friend.
1220         * pt.c (is_specialization_of_friend): Likewise.
1221         (instantiate_class_template): Likewise.
1222         (tsubst): Adjust call to make_unbound_class_template.
1223
1224 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
1225
1226         * typeck.c (composite_pointer_type): Add comment about DR 195
1227         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1228         Allow function pointer conversions that DR195 suggests.
1229         (build_reinterpret_cast, build_c_cast): Update
1230         build_reinterpret_cast_1 calls. 
1231
1232 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
1233
1234         * call.c, typeck.c: Fix comment typos.
1235
1236 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
1237
1238         * parser.c (cp_token_position): New typedef. Define VEC thereof.
1239         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1240         next_token and last_token cp_token_position. Make saved_tokens a
1241         VEC(cp_token_position).
1242         (eof_token): New static variable.
1243         (CP_SAVED_TOKENS_SIZE): Rename to ...
1244         (CP_SAVED_TOKEN_STACK): ... here.
1245         (cp_lexer_new_main): Adjust main lexer creation and buffer
1246         filling.
1247         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1248         to the parent buffer.  Do not append eof token.
1249         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1250         stack.
1251         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1252         (cp_lexer_token_position, cp_lexer_token_at): New.
1253         (cp_lexer_saving_tokens): Adjust. Make inline.
1254         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1255         (cp_lexer_peek_token_emit_debug_info): Fold into ...
1256         (cp_lexer_peek_token): ... here.
1257         (cp_lexer_peek_nth_token): Don't peek past EOF.
1258         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1259         EOF.
1260         (cp_lexer_purge_token): Adjust eof setting.
1261         (cp_lexer_purge_tokens_after): Likewise.
1262         (cp_lexer_save_tokens): Push next_token directly.
1263         (cp_lexer_commit_tokens): Adjust.
1264         (cp_lexer_rollback_tokens): Pop next_token directly.
1265         (cp_parser_check_for_invalid_template_id): Adjust token purging.
1266         (cp_parser_translation_unit): Do not consume the EOF.
1267         (cp_parser_nested_name_specifier_opt): Adjust token purging.
1268         (cp_parser_template_id, cp_parser_template_name): Likewise.
1269
1270 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
1271
1272         PR c++/14035
1273         * call.c (struct conversion): Add base_p.
1274         (convert_like): Add c_cast_p argument.
1275         (convert_like_with_conversion): Likewise.
1276         (build_conv): Clear base_p.
1277         (standard_conversion): Set it, for derived-to-base conversions.
1278         (convert_like_real): Add c_cast_p parameter.  Handle pointer
1279         conversions directly rather than relying on ocp_convert.
1280         (perform_direct_initialization_if_possible): Add c_cast_p
1281         parameter.
1282         * cp-tree.h (perform_direct_initialization_if_possible): Change
1283         prototype.
1284         (convert_member_func_to_ptr): New function.
1285         * typeck.c (check_for_casting_away_constness): Add diag_fn
1286         parameter.
1287         (build_static_cast_1): New function, split out from ...
1288         (build_static_cast): ... here.  Use build_static_cast_1.
1289         (build_reinterpret_cast_1): New function, split out from ...
1290         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
1291         (build_const_cast_1): New function, split out from ...
1292         (build_const_cast): ... here.  Use build_const_cast_1.
1293         (build_c_cast): Rewrite to use build_const_cast_1,
1294         build_static_cast_1, and build_reinterpret_cast_1.
1295         (convert_member_func_to_ptr): New function.
1296
1297 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
1298
1299         PR c++/18047
1300         * parser.c (enum cp_parser_prec): Give relational expressions
1301         a higher precedence than equality expressions.
1302
1303 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
1304
1305         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
1306         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
1307         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
1308         (enum base_access): Reorganize.
1309         (accessible_base_p, accessible_p): Add consider_local_p parameter.
1310         * call.c (standard_conversion): Update comment about
1311         DERIVED_FROM_P.
1312         (enforce_access): Adjust accessible_p call.
1313         (build_over_call): Adjust accessible_base_p call.
1314         * class.c (convert_to_base): Adjust lookup_base call.
1315         (build_vtbl_ref_1): Likewise.
1316         (warn_about_ambiguous_bases): Likewise. Add early exit.
1317         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
1318         * search.c (accessible_base_p): Add consider_local_p parameter.
1319         (lookup_base): Pass consider_local_p to accessible_base_p call.
1320         (friend_accessible_p): Check whether scope is a class member.
1321         Remove unnecessary class template check.
1322         (accessible_p): Add consider_local_p parameter. Use it.
1323         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
1324         * tree.c (maybe_dummy_object): Likewise.
1325         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
1326         (build_class_member_access_expr): Adjust lookup_base call.
1327         * typeck2.c (binfo_or_else): Likewise.
1328         * rtti.c (build_dynamic_cast_1): Access can consider friendship
1329         and current scope.
1330
1331 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1332
1333         PR c++/17743
1334         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
1335
1336 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1337
1338         PR c++/10479
1339         * parser.c (cp_parser_parenthesized_expression_list): Fold
1340         non-dependent expressions in attribute lists.
1341
1342 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
1343
1344         PR c++/17042
1345         * decl.c (declare_global_var): Use the return value from pushdecl.
1346
1347         PR c++/14667
1348         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
1349         type names if we have already found a valid type.
1350         (cp_parser_member_declaration): Likewise.
1351         
1352         PR c++/17916
1353         * parser.c (cp_parser_member_specification_opt): Handle
1354         CPP_PRAGMA.
1355
1356 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
1357
1358         * dump.c, g++spec.c, repo.c: Update copyright.
1359
1360 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
1361
1362         * decl.c: Fix a comment typo.
1363
1364 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
1365
1366         PR c++/16301
1367         * name-lookup.c (parse_using_directive): If we have a
1368         error_mark_node, do not set the decl namespace associations
1369         on it.
1370
1371 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
1372
1373         PR c++/17976
1374         * decl.c (cp_finish_decl): Do not call expand_static_init more
1375         than once for a single variable.
1376
1377 2004-10-14  Matt Austern  <austern@apple.com>
1378
1379         * Make-lang.in (pt.o): depends on pointer-set.h
1380         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
1381         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
1382         (for_each_template_parm): Convert from htab_t to pointer_set_t.
1383         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
1384         
1385 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
1386
1387         PR c++/17661
1388         * semantics.c (finish_for_expr): Convert expression to void
1389         so that we don't create temporaries for a?b:c.
1390
1391 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
1392
1393         * search.c: Fix a comment typo.
1394
1395 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1396
1397         * class.c (dfs_modify_vtables): Simplify condition. Return
1398         dfs_skip_bases as appropriate.
1399         (modify_all_vtables): Walk in pre-order.
1400         * search.c (dfs_walk_all, dfs_walk_once_r,
1401         dfs_walk_once_accessible_r): Assert post order function never
1402         returns dfs_skip_bases.
1403
1404         * search.c (struct lookup_base_data_s): New.
1405         (lookup_base_r): Replace with ...
1406         (dfs_lookup_base): ... this.
1407         (lookup_base): Use dfs_walk_all.
1408
1409 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
1410
1411         * search.c: Fix comment typos.
1412
1413 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
1414
1415         PR c++/15786
1416         * parser.c (cp_parser_declarator): Add member_p parameter. 
1417         (cp_parser_condition): Adjust calls to cp_parser_declarator.
1418         (cp_parser_explicit_instantiation): Likewise.
1419         (cp_parser_init_declarator): Likewise.
1420         (cp_parser_direct_declarator): Add member_p parameter.  Do not
1421         parse tentatively when parsing the parameters to a member.
1422         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1423         (cp_parser_parameter_declaration): Likewise.
1424         (cp_parser_member_declaration): Likewise.
1425         (cp_parser_exception_declaration): Likewise.
1426
1427         PR c++/17936
1428         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1429         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1430         for members of partial or explicit specializations.
1431
1432         PR c++/17929
1433         * decl2.c (finish_anon_union): Robustify.
1434
1435 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
1436
1437         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1438         (dcast_base_hint): ... here.
1439         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1440         * search.c (struct dcast_data_s): New.
1441         (dynamic_cast_base_recurse): Remove. Replace with ...
1442         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1443         (get_dynamic_cast_base_type): Rename to ...
1444         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
1445         (accessible_r): Remove.
1446         (dfs_accessible_post): New, broken out of accessible_r.
1447         (accessible_p): Use dfs_walk_once_accessible.
1448         (dfs_walk_once_accessible_r): New. From accessible_r.
1449         (dfs_walk_once_accessible): New. From acessible_p.
1450
1451         * cp-tree.h (SAME_BINFO_TYPE_P): New.
1452         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1453         binfo types.
1454         (convert_to_base_statically, determine_primary_bases,
1455         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1456         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1457         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1458         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1459         * init.c (expand_member_init): Likewise.
1460         * search.c (lookup_base_r, dynamic_cast_base_recurse,
1461         binfo_via_virtual, copied_binfo, binfo_for_vbase,
1462         original_binfo): Likewise.
1463         * tree.c (copy_binfo): Likewise.
1464
1465 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
1466
1467         * semantics.c: Fix comment typos.
1468
1469 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
1470
1471         PR c++/17554
1472         part of c++/17657
1473         middle-end/17703
1474         * semantics.c (maybe_cleanup_point_expr): Call
1475         fold_build_cleanup_point_expr.
1476         (maybe_cleanup_point_expr_void): New function.
1477         (add_decl_expr): Call maybe_cleanup_point_expr_void.
1478         (finish_expr_stmt): Likewise.
1479         (finish_return_stmt): Likewise.
1480         (finish_for_expr): Likewise.
1481         (finish_asm_stmt): Likewise.
1482         * typeck.c (condition_conversion): Call
1483         fold_build_cleanup_point_expr.
1484
1485 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
1486
1487         PR c++/17907
1488         * semantics.c (add_decl_expr): If the decl has a size which
1489         has side effects then the decl expression needs a cleanup point.
1490
1491 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
1492
1493         PR c++/17393
1494         * decl.c (grokdeclarator): Robustify error-recovery on invalid
1495         declarations.
1496
1497 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1498
1499         Convert diagnostics to use quoting flag q 7/n
1500         * typeck.c (composite_pointer_type_r, composite_pointer_type, 
1501         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr, 
1502         string_conv_p, build_class_member_access_expr, 
1503         build_class_member_access_expr, lookup_destructor, 
1504         finish_class_member_access_expr, build_indirect_ref, 
1505         get_member_function_from_ptrfunc, build_function_call, 
1506         convert_arguments, build_binary_op, pointer_diff, build_unary_op, 
1507         check_for_casting_away_constness, build_static_cast, 
1508         build_reinterpret_cast, build_const_cast, build_c_cast, 
1509         build_modify_expr, get_delta_difference, build_ptrmemfunc, 
1510         dubious_conversion_warnings, convert_for_assignment, 
1511         convert_for_initialization, 
1512         maybe_warn_about_returning_address_of_local, check_return_expr): 
1513         Use quoting marks.
1514
1515         * typeck2.c (error_not_base_type, readonly_error, 
1516         abstract_virtuals_error, cxx_incomplete_type_diagnostic, 
1517         store_init_value, digest_init, build_x_arrow, 
1518         build_m_component_ref, require_complete_eh_spec_types): Likewise.
1519
1520         * tree.c (cp_build_qualified_type_real, 
1521         handle_java_interface_attribute, handle_init_priority_attribute):
1522         Likewise.
1523
1524         * semantics.c (finish_asm_stmt, finish_non_static_data_member, 
1525         finish_pseudo_destructor_expr, 
1526         check_template_template_default_arg, begin_class_definition, 
1527         finish_base_specifier, qualified_name_lookup_error, 
1528         finish_id_expression, finish_typeof): Likewise.
1529
1530         * search.c (lookup_base, check_final_overrider,
1531         look_for_overrides_r): Likewise.
1532
1533         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1534
1535 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
1536
1537         PR c++/17867
1538         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1539         constructor.
1540
1541         PR c++/17670
1542         * init.c (build_new): Correct comments.
1543         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1544         the non-array case.
1545
1546         PR c++/17821
1547         * parser.c (cp_parser_postfix_dot_deref_expression): If the
1548         pseduo-destructor-name production does not work, fall back to the
1549         ordinary production.
1550
1551         PR c++/17826
1552         * tree.c (cp_tree_equal): Handle a BASELINK.
1553
1554         PR c++/17524
1555         * cp-tree.h (check_var_type): New function.
1556         * decl.c (check_var_type): New function, split out from ...
1557         (grokdeclarator): ... here.
1558         * pt.c (tsubst_decl): Use check_var_type.
1559
1560         PR c++/17685
1561         * decl.c (grokdeclarator): Disallow declarations of operators as
1562         non-functions.
1563         
1564 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1565
1566         PR c++/17868
1567         * error.c (dump_expr): Add missing case for RDIV_EXPR.
1568
1569 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
1570
1571         * pt.c, search.c: Fix comment typos.
1572
1573 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
1574
1575         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
1576         unmarkedp): Remove.
1577         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
1578         * class.c (struct find_final_overrider_data): Remove most_derived,
1579         vpath_list and vpath fields.  Add path field.
1580         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
1581         (dfs_find_final_overrider): Rename to ...
1582         (dfs_find_final_overrider_pre): ... here. Adjust.
1583         (dfs_find_final_overrider_post): Adjust.
1584         (dfs_find_final_overrider_q): Fold into
1585         dfs_find_final_overrider_pre.
1586         (find_final_overrider): Adjust dfs searching.
1587         (dfs_modify_vtables): Don't mark binfo here.
1588         (modify_all_vtables): Use dfs_walk_once.
1589         (build_vtt_inits): Likwise. Use dfs_walk_all.
1590         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
1591         Return dfs_skip_bases as appropriate.
1592         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
1593         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
1594         appropriate. Don't mark binfo here.
1595         (initialize_vtbl_ptrs): Use dfs_walk_once.
1596         * search.c (struct vbase_info): Remove unused struct.
1597         (access_in_type): Use dfs_walk_once.
1598         (dfs_access_in_type): Don't mark binfo here.
1599         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
1600         Fold into ...
1601         (accessible_r): ... here. New. Specialize dfs_walk_once.
1602         (accessible_p): Use accessible_r.
1603         (lookup_field_queue_p): Remove. Fold into ...
1604         (lookup_field_r): ... here. Adjust.
1605         (lookup_member): Use dfs_walk_all.
1606         (dfs_walk_real, dfs_walk): Replace with ...
1607         (dfs_walk_all, dfs_walk_once): ... these.
1608         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
1609         (dfs_unmark, unmarkedp, markedp): Remove.
1610         (dfs_get_pure_virtuals): Don't mark binfo here.
1611         (get_pure_virtuals): Use dfs_walk_once.
1612         (dfs_debug_unmarked_p): Remove. Fold into ...
1613         (dfs_debug_mark): ... here.
1614         (note_debug_info_needed): Use dfs_walk_all.
1615
1616 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
1617
1618         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
1619         CLEANUP_POINT_EXPR to get the asm expression.
1620
1621 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
1622
1623         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
1624         (DECL_MEMBER_TEMPLATE_P): New macro.
1625         (is_member_template): Remove.
1626         (class_method_index_for_fn): New function.
1627         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
1628         * class.c (finish_struct_methods): Remove out-of-date comment.
1629         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
1630         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
1631         class_method_index_for_fn.
1632         * pt.c (is_member_template): Remove.
1633         (is_member_template_class): Likewise.
1634         (optimize_specialization_lookup_p): New function.
1635         (retrieve_specialization): Optimize lookups for members that are
1636         not member templates.
1637         (register_specialization): Adjust accordingly.
1638         (build_template_decl): Add member_template_p parameter.  Set
1639         DECL_MEMBER_TEMPLATE_P.
1640         (process_partial_specialization): Adjust call to
1641         retrieve_specialization.
1642         (push_template_decl_real): Determine whether the template is a
1643         member template.
1644         (lookup_template_class): Use retrieve_specialization.
1645         (tsubst_decl): Adjust call to retrieve_specialization.
1646         (tsubst_exception_specification): New function.
1647         (tsubst): Use it.
1648         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
1649         (instantiate_template): Adjust call to retrieve_specialization.
1650         (regenerate_decl_from_template): Do not actually generate a new
1651         DECL.
1652         (instantiate_decl): Adjust call to retrieve_specialization.
1653         (class_method_index_for_fn): New method.
1654
1655 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
1656
1657         * parser.c (cp_parser_asm_definition): Look passed the
1658         CLEANUP_POINT_EXPR to get the asm expression.
1659
1660 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
1661
1662         PR c++/17368
1663         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
1664         also.
1665
1666 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1667
1668         Convert diagnostics to use quoting flag q 6/n
1669         * pt.c (finish_member_template_decl, check_specialization_scope, 
1670         maybe_process_partial_specialization, determine_specialization, 
1671         check_explicit_specialization, maybe_check_template_type, 
1672         process_partial_specialization, check_default_tmpl_args, 
1673         push_template_decl_real, redeclare_class_template, 
1674         convert_nontype_argument, coerce_template_parms, 
1675         lookup_template_class, push_tinst_level, 
1676         instantiate_class_template, tsubst_arg_types, 
1677         tsubst_function_type, tsubst, tsubst_qualified_id, 
1678         tsubst_copy_and_build, check_instantiated_args, 
1679         do_decl_instantiation, do_type_instantiation, 
1680         invalid_nontype_parm_type_p, check_specialization_namespace, 
1681         convert_template_argument, determine_specialization, 
1682         check_template_shadow, tsubst_decl 
1683         instantiate_pending_templates): Use quoting marks.
1684
1685 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1686
1687         PR c++/17829
1688         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
1689         unqualified lookup finds a member function.
1690
1691 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1692
1693         Convert diagnostics to use quoting flag q 5/n
1694         * parser.c (cp_parser_name_lookup_error, 
1695         cp_parser_diagnose_invalid_type_name, 
1696         cp_parser_primary_expression, cp_parser_unqualified_id, 
1697         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement, 
1698         cp_parser_jump_statement, cp_parser_simple_declaration, 
1699         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id, 
1700         cp_parser_type_parameter, cp_parser_template_id, 
1701         cp_parser_template_name, cp_parser_direct_declarator, 
1702         cp_parser_parameter_declaration_list, cp_parser_class_head, 
1703         cp_parser_base_specifier, cp_parser_lookup_name, 
1704         cp_parser_late_parsing_default_args, 
1705         cp_parser_optional_template_keyword 
1706         cp_parser_elaborated_type_specifier, cp_parser_check_class_key, 
1707         cp_parser_check_access_in_redeclaration): Use quoting marks.
1708
1709         * name-lookup.c (supplement_binding, pushdecl, 
1710         check_for_out_of_scope_variable, validate_nonmember_using_decl, 
1711         do_nonmember_using_decl, lookup_tag, set_decl_namespace, 
1712         push_namespace, do_namespace_alias, do_using_directive, 
1713         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
1714
1715         * method.c (use_thunk): Likewise.
1716
1717         * lex.c (unqualified_name_lookup_error, 
1718         unqualified_fn_lookup_error): Likewise.
1719
1720 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1721
1722         Convert diagnostics to use quoting flag q 4/n
1723         * except.c (decl_is_java_type, build_throw, 
1724         is_admissible_throw_operand, check_handlers_1, check_handlers): 
1725         Use quoting formats.
1726         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
1727         * init.c (sort_mem_initializers, emit_mem_initializers, 
1728         member_init_ok_or_else, expand_member_init, is_aggr_type, 
1729         build_offset_ref, build_java_class_ref): Likewise.
1730
1731 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1732
1733         Convert diagnostics to use quoting flag q 3/n
1734         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
1735         redeclaration_error_message, lookup_label, check_goto,
1736         make_typename_type, make_unbound_class_template,
1737         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1, 
1738         grok_reference_init, layout_var_decl, maybe_commonize_var, 
1739         check_for_uninitialized_const_var, reshape_init_array, 
1740         reshape_init, check_initializer, cp_finish_decl,
1741         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl, 
1742         check_static_variable_definition, compute_array_index_type, 
1743         create_array_type_for_decl, check_special_function_return_type, 
1744         grokdeclarator, check_default_argument, grokparms, 
1745         grok_ctor_properties, grok_op_properties, 
1746         check_elaborated_type_specifier, xref_tag, finish_enum, 
1747         build_enumerator, check_function_type, start_preparsed_function, 
1748         store_parm_decls): Use quoting formats.
1749         * decl2.c (grok_array_decl, delete_sanity, check_member_template, 
1750         check_java_method, check_classfn, finish_static_data_member_decl, 
1751         grokfield, grokbitfield, grok_function_init,
1752         build_anon_union_vars, coerce_new_type, coerce_delete_type,
1753         check_default_args): Likewise.
1754         * parser.c (cp_parser_decl_specifier_seq): Likewise.
1755
1756 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1757
1758         Convert diagnostics to use quoting flag q 2/n
1759         * class.c (build_base_path, add_method, alter_access,
1760         handle_using_decl, check_bases,
1761         maybe_warn_about_overly_private_class, find_final_overrider,
1762         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
1763         check_bitfield_decl, check_field_decls, layout_empty_base,
1764         build_base_field, check_methods, layout_virtual_bases,
1765         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
1766         resolve_address_of_overloaded_function, instantiate_type,
1767         note_name_declared_in_class): Use format flag "q" for quoting.
1768
1769 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1770
1771         Convert diagnostics to use quoting flag q 1/n
1772         * error.c (locate_error): Ignore quoting flag q.
1773         * call.c (build_user_type_conversion_1, build_operator_new_call,
1774         build_object_call, op_error, build_conditional_expr,
1775         build_new_op, build_op_delete_call, enforce_access,
1776         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
1777         convert_default_arg, build_over_call, build_new_method_call,
1778         joust, perform_implicit_conversion, initialize_reference): Use the
1779         quoting flag q.
1780
1781 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
1782
1783         PR c++/17797
1784         * typeck.c (build_reinterpret_cast): Return if the inner type
1785         is error_mark_node.
1786
1787 2004-10-01  Jan Hubicka  <jh@suse.cz>
1788
1789         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
1790
1791 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
1792
1793         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
1794         turning operator_code and fixed_offset into bitfields.
1795
1796 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
1797
1798         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
1799
1800 2004-09-29  Jason Merrill  <jason@redhat.com>
1801
1802         PR tree-optimization/17697
1803         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
1804
1805 2004-09-28  Jason Merrill  <jason@redhat.com>
1806
1807         PR middle-end/17525
1808         * class.c (build_base_field): Set TYPE_MODE.
1809
1810 2004-09-28  Roger Sayle  <roger@eyesopen.com>
1811
1812         PR driver/17537
1813         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
1814         than -lc and -lm, may require linking against libstc++.
1815
1816 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
1817
1818         * tree.c: Fix a comment typo.
1819
1820 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
1821
1822         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
1823         (struct secondary_vptr_vtt_init_data_s): New.
1824         (build_vtt_inits): Adjust dfs_walkers.
1825         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
1826         secondary_vptr_vtt_init_data_s structure. Adjust.
1827         (dfs_ctor_vtable_bases_queue_p): Remove.
1828         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
1829
1830         * pt.c (struct get_template_base_data_s): Remove.
1831         (get_template_base_r): Fold into get_template_base.
1832         (get_template_base): Walk base binfos directly in inheritance
1833         graph order.
1834
1835 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
1836
1837         PR c++/17642
1838         * cp-tree.h (fold_if_not_in_template): New function.
1839         * call.c (build_conditional_expr): Use fold_if_not_in_template.
1840         (build_cxx_call): Likewise.
1841         * cvt.c (convert_to_complex): Likewise.
1842         (ocp_convert): Likewise.
1843         (convert): Likewise.
1844         (convert_force): Likewise.
1845         * decl.c (compute_array_index_type): Clear
1846         processing_template_decl while folding array bounds.
1847         * pt.c (convert_nontype_argument): Clear
1848         processing_template_decl while processing non-type argument
1849         initialization.
1850         * tree.c (fold_if_not_in_template): New function.
1851         * typeck.c (build_class_member_access_expr): Use
1852         fold_if_not_in_template.
1853         (build_array_ref): Likewise.
1854         (build_binary_op): Likewise.  Do not try to optimize computations
1855         when processing templates.
1856         (cp_pointer_int_sum): Use fold_if_not_in_template.
1857         (pointer_diff): Likewise.
1858         (build_unary_op): Likewise.
1859         (build_reinterpret_cast): Likewise.
1860         (get_delta_difference): Likewise.
1861         (expand_ptrmemfunc_cst): Likewise.
1862         (dubious_conversion_warnings): Likewise.
1863
1864 2004-09-27  Matt Austern  <austern@apple.com>
1865
1866         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
1867         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
1868         tokens that come from headers that are implicitly extern "C".
1869         (struct cp_parser): new one-bit field, implicit_extern_c.
1870         (cp_parser_new): Set parser's implicit_extern_c to false.
1871         (cp_parser_translation_unit): Pop lang context if we were in a
1872         header that was implicitly extern "C".
1873         (cp_parser_declaration_seq_opt): Push/pop lang context as
1874         required by the token's and parser's implicit_extern_c.
1875         
1876 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
1877
1878         PR c++/17585
1879         * cp-tree.h (shared_member_p): Declare.
1880         * search.c (shared_member_p): Give it external linkage.
1881         * semantics.c (finish_qualified_id_expr): Use it.
1882         (finish_id_expression): Likewise.
1883
1884         PR c++/17585
1885         * semantics.c (finish_id_expression): Do not add "this->" to
1886         static member functions.
1887
1888 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
1889
1890         PR c++/17681
1891         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
1892
1893         * class.c (struct count_depth_data): Remove.
1894         (dfs_depth_post, dfs_depth_q): Remove.
1895         (find_final_overrider): Use number of vbase classes as depth
1896         bound.
1897         
1898         * cp-tree.h (types_overlap_p): Remove.
1899         * search.c (struct overlap_info): Remove.
1900         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
1901         
1902         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
1903         (get_template_base_recursive): Remove. Replace with ...
1904         (get_template_base_r): ... this.
1905         (struct get_template_base_data_s): New.
1906         (get_template_base): Use get_template_base_r via dfs_walk.  Always
1907         return NULL on failure.
1908         (unify): Remove error_mark_node check from get_template_base result.
1909
1910 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
1911
1912         * parser.c (cp_parser_expression_stack): Clarify why it is
1913         an array of NUM_PREC_VALUES elements.
1914         (cp_parser_binary_expression): Clarify why we do not need to
1915         handle stack overflow.
1916
1917 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
1918
1919         PR c++/16889
1920         * search.c (lookup_field_queue_p): Correct check for hidden base.
1921
1922         * search.c (bfs_walk): Remove.
1923         (lookup_member): Use dfs_walk_real.
1924         (dfs_walk_real): Move and adjust documentation from bfs_walk.
1925
1926 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
1927
1928         * decl.c (grokfndecl): If ::main is found not to return int,
1929         correct it after issuing a diagnostic.
1930         (grokdeclarator): If the incoming type was error_mark_node, do
1931         not complain about declaring something with no type.
1932         (start_function): Change check for ::main not returning int to
1933         an assertion, as grokfndecl now catches this when the user did it.
1934         * init.c (perform_member_init, sort_mem_initializers)
1935         (emit_mem_initializers): Make most diagnostics be issued on
1936         the line of current_function_decl, not whatever the current
1937         input line is.
1938         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
1939         definition and declaration with #ifdef ENABLE_CHECKING.
1940         Avoid unnecessary use of fprintf.
1941         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
1942         definitions to avoid warnings.
1943         (cp_lexer_new_main): Add assertion that first token is not a
1944         padding token.
1945         (cp_lexer_new_from_token_array): Fold into ...
1946         (cp_lexer_new_from_tokens): ... here.  Add assertion that
1947         first token is not a padding token.
1948         (cp_lexer_set_source_position_from_token): Move nearer to callers.
1949         Remove unused lexer argument.
1950         (cp_lexer_peek_token): Just print debugging report (if enabled)
1951         and return lexer->next_token.
1952         (cp_lexer_skip_purged_tokens): Delete.
1953         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
1954         inline, simplify bodies.
1955         (cp_lexer_peek_nth_token): Add debugging report a la
1956         cp_lexer_peek_token.
1957         (cp_lexer_consume_token): Correct commentary.  Advance over
1958         purged tokens here.  Set current source position here, from
1959         token to be returned.  Avoid unnecessary use of fprintf.
1960         (cp_lexer_purge_token): Advance next_token pointer over this and
1961         subsequent purged tokens.
1962         (cp_parser_error): Adjust source position to that of the
1963         peeked token.
1964         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
1965         (cp_parser_string_literal): Remove some excessive cleverness.
1966         (cp_parser_enum_specifier): Call start_enum before consuming
1967         the opening brace.
1968         (cp_parser_member_declaration): Make the "extra semicolon"
1969         diagnostic consistently-worded with the other place this is
1970         diagnosed.  Explicitly set the diagnostic location to the
1971         location of the offending semicolon.
1972         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
1973         in diagnostics.  Do not use cp_parser_require.  Set location
1974         of diagnostics about improper use of '>>' to location of
1975         offending token.
1976         (cp_parser_late_parsing_for_member):
1977         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
1978         (cp_parser_late_parsing_default_args): Likewise.  Manually
1979         move some logic outside the loop.
1980
1981 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
1982
1983         PR c++/17618
1984         * cvt.c (cp_convert_to_pointer): Return early when the type is
1985         an error_mark_node.
1986
1987 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
1988
1989         PR c++/13989
1990         PR c++/9844
1991         * decl.c (grokfndecl): Add new argument "attrlist", use it
1992         to call cplus_decl_attributes.
1993         (start_function): Remove call to cplus_decl_attributes.
1994         * cvt.c (ocp_convert): Add support to use type conversion
1995         function to vector type.
1996         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
1997         to the parsed type.
1998
1999 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
2000
2001         PR c++/17596
2002
2003         * parser.c (cp_parser_token_tree_map_node,
2004         cp_parser_pm_expression, cp_parser_additive_expression,
2005         cp_parser_multiplicative_expression, cp_parser_shift_expression,
2006         cp_parser_relational_expression, cp_parser_equality_expression,
2007         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2008         cp_parser_inclusive_or_expression,
2009         cp_parser_logical_and_expression,
2010         cp_parser_logical_or_expression): Removed.
2011         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2012         binops, binops_by_token): New.
2013         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2014         (cp_parser_new): Initialize binops_by_token.
2015         (cp_parser_binary_expression): Rewritten.
2016         (N_CP_TTYPES): New.
2017
2018 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
2019
2020         * parser.c: Fix a comment typo.
2021
2022 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
2023
2024         PR c++/17620
2025         * decl.c (xref_basetypes): Look through typedefs before checking
2026         for duplicate base.
2027
2028 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
2029
2030         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2031         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2032         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2033         (init_rtti_processing): Initialize it to something realistic.
2034         (get_tinfo_decl): Adjust pushing the new decl.
2035
2036         * cp-tree.h (struct lang_type_class): Remove marked flags, add
2037         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
2038         (TYPE_MARKED_P): New.
2039         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2040         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2041         CLEAR_CLASSTYPE_MARKED_N): Remove.
2042         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2043         CLEAR_CLASSTYPE_MARKED_*): Remove.
2044         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2045         shaped and repeated base properties.
2046         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2047         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2048         class_hint_flags): Remove.
2049         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2050         CLASSTYPE_DIAMOND_SHAPED_P.
2051
2052 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
2053
2054         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2055         cp-objcp-common.h.
2056         (objcp_tsubst_copy_and_build): Reformat function signature.
2057         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2058         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2059
2060 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
2061
2062         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2063         Don't handle CPP_PRAGMA tokens specially.
2064         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
2065         purge the token; do clear token->value after processing.  Add
2066         assertion at beginning that token->value is nonzero.
2067         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2068         CPP_PRAGMA as a full statement or declaration in its own right.
2069
2070 2004-09-21  Matt Austern  <austern@apple.com>
2071
2072         PR c++/15049
2073         * decl.c (grokvardecl): Accept declarations of global variables
2074         using anonymous types.
2075
2076 2004-09-21  Roger Sayle  <roger@eyesopen.com>
2077
2078         PR c++/7503
2079         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
2080         if either operand has side-effects.
2081         * typeck.c (rationalize_conditional_expr): Assert that neither
2082         operand of MIN_EXPR or MAX_EXPR has side-effects.
2083         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
2084         Check that the "lhs" is a valid lvalue, i.e. that neither operand
2085         of a MIN_EXPR or MAX_EXPR has a side-effect.
2086
2087 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
2088
2089         * cp-tree.h (struct lang_type_header): Remove
2090         uses_multiple_inheritance field.
2091         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2092         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2093         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2094         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2095         (TYPE_CONTAINS_VPTR_P): Likewise.
2096         * call.c (add_template_candidate_real): Use
2097         CLASSTYPE_VBASECLASSES.
2098         (build_special_member_call): Likewise.
2099         * class.c (finish_struct_bits): Remove
2100         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2101         bookkeeping.
2102         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2103         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2104         bookkeeping.
2105         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2106         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2107         Likewise.
2108         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2109         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2110         bookkeeping.
2111         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2112         * decl2.c (maybe_retrofit_in_chrg): Likewise.
2113         * init.c (expand_member, push_base_cleanups): Likewise.
2114         * pt.c (instantiate_class_template): Remove
2115         TYPE_USES_MULTIPLE_INHERITANCE,
2116         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2117         bookkeeping.
2118         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2119         check.
2120         * typeck2.c (process_init_constructor): Replace some sorrys with
2121         asserts.
2122
2123 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
2124
2125         * decl.c (reshape_init_array): Initialize max_index_cst to fix
2126         bootstrap failure.
2127
2128 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
2129
2130         PR c++/17530
2131         * pt.c (tsubst): Fix parentheses to accomodate emacs.
2132         (tsubst_baselink): If we get a single function, mark it as used.
2133
2134 2004-09-20  Matt Austern <austern@apple.com>
2135             Zack Weinberg  <zack@codesourcery.com>
2136
2137         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2138         Apply lbasename to input_filename before passing to get_fileinfo.
2139         * semantics.c (begin_class_definition): Likewise.
2140         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2141         correct filename.  Rename variables to be less confusing.
2142         (handle_pragma_implementation): Likewise.  Disable "appears
2143         after file is included" diagnostic.
2144
2145         * parser.c (struct cp_token): Add in_system_header fiag.
2146         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2147         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2148         (CPP_NONE, cp_lexer_read_token): Delete.
2149         (struct cp_lexer): Remove first_token, string_tokens,
2150         main_lexer_p fields.  Clarify comments.
2151         (struct cp_token_cache): Now just a pair of pointers.
2152         (CP_LEXER_BUFFER_SIZE): New #define.
2153         (CPP_PURGED): New fake token type.
2154         (cp_lexer_new_from_token_array, cp_lexer_destroy)
2155         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2156         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2157         New functions.
2158         (cp_lexer_new_from_tokens): Now a simple wrapper around
2159         cp_lexer_new_from_token_array.
2160         (cp_lexer_set_source_position_from_token): Also update
2161         in_system_header.
2162         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2163         Don't wrap round.
2164         (cp_lexer_token_difference): Dont handle wrapping round.
2165         (cp_lexer_new_main): Enable pragma deferral and raw strings,
2166         read the entire translation unit through c_lex_with_flags into
2167         this lexer's buffer, then turn raw strings back off again.
2168         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2169         (cp_lexer_get_preprocessor_token): No need to handle not being
2170         the main lexer.  Set token->in_system_header too.
2171         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
2172         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
2173         (cp_lexer_peek_nth_token): Likewise.
2174         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2175         the other tokens down.
2176         (cp_lexer_purge_tokens_after): Likewise.
2177         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2178         about there being no tokens.
2179         (cp_lexer_print_token): Revise to give useful information on
2180         all tokens.
2181         (struct cp_parser): Add field translate_strings_p.
2182         (cp_parser_new): Initialize it.
2183         (cp_parser_translation_unit): Destroy the lexer when done.
2184         (cp_parser_parameter_declaration): Restructure saving of
2185         default arguments.
2186         (cp_parser_save_member_function_body): Likewise.
2187         (cp_parser_check_for_invalid_template_id)
2188         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2189         Adjust calls to cp_lexer_advance_token.
2190         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2191         No need to fiddle c_lex_string_translate.
2192         (cp_parser_primary_expression, cp_parser_linkage_specification)
2193         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2194         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2195         Use cp_parser_string_literal.
2196         (cp_parser_attribute_list): Save and restore
2197         parser->translate_strings_p, not c_lex_string_translate.
2198         (cp_parser_cache_group): Delete.
2199         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
2200         not take a cache argument.
2201
2202 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2203
2204         PR c++/14179
2205         * decl.c (reshape_init): Extract array handling into...
2206         (reshape_init_array): New function. Use integers instead of trees
2207         for indices. Handle out-of-range designated initializers.
2208
2209 2004-09-20  Steven Bosscher  <stevenb@suse.de>
2210
2211         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2212         to null_node.
2213
2214 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
2215
2216         * decl2.c (determine_visibility): Allow class visibility
2217         directives to override targetm.cxx.export_class_data.
2218
2219 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
2220
2221         * call.c, semantics.c: Follow spelling conventions.
2222         * class.c: Fix a comment typo.
2223
2224 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
2225
2226         PR pch/13361
2227         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2228         (handle_pragma_implementation): Likewise.
2229
2230 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
2231             Zack Weinberg  <zack@codesourcery.com>
2232
2233         * cp-tree.def: Use tree_code_class enumeration constants
2234         instead of code letters.
2235         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2236         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2237         Update for new tree-class enumeration constants.
2238
2239 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
2240
2241         PR c++/16002
2242         * parser.c (cp_parser_simple_declaration): Commit to tentative
2243         parses after seeing a decl-specifier.
2244         (cp_parser_simple_declaration): Eliminate spurious message.
2245         (cp_parser_init_declarator): Adjust error message.
2246
2247         PR c++/16029
2248         * lex.c (unqualified_name_lookup_error): Mark the dummy
2249         declaration as used.
2250
2251         PR c++/17501
2252         * parser.c (cp_parser_nested_name_specifier): Do not resolve
2253         typename types if the user explicitly said "typename".
2254
2255 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
2256
2257         * error.c (dump_decl): Make sure there is lang_specific info before
2258         checking for DTOR and CTOR decls.
2259
2260 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2261
2262         * class.c (copy_virtuals): Remove.
2263         (build_primary_vtable): Use copy_list directly.
2264         (build_secondary_vtable): Likewise.
2265         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2266         (create_vtable_ptr): Likewise.
2267
2268 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
2269
2270         * search.c: Follow spelling conventions.
2271
2272 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2273
2274         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2275         VEC(tree).
2276         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
2277         comments.
2278         * call.c (build_new_method_call): Don't confirm a pure virtual is
2279         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
2280         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
2281         (fixup_inline_methods, finish_struct): Likewise.
2282         * decl.c (finish_method): Likewise.
2283         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
2284         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
2285         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
2286         vector to avoid repeating the list in error messages.
2287
2288 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
2289
2290         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
2291         * cp-tree.h (cxx_comdat_group): Declare.
2292         * decl.c (cxx_comdat_group): New function.
2293
2294 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2295
2296         * search.c (get_pure_virtuals): Remove unused variables.
2297
2298         * cp-tree.h (struct lang_decl_flags): Remove
2299         needs_final_overrider.
2300         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
2301         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
2302         * class.c (finish_struct_bits): Correct comment about
2303         CLASSTYPE_PURE_VIRTUALS.
2304         * search.c (get_pure_virtuals): Remove useless loop.
2305
2306 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
2307
2308         PR c++/17324
2309         * mangle.c (partially_mangled_name): New variable.
2310         (partially_mangled_name_len): Likewise.
2311         (save_partially_mangled_name): New function.
2312         (restore_partially_mangled_name): Likewise.
2313         (write_encoding): Save and restore partially mangled names around
2314         calls to get_mostly_instantiated_function_type.
2315         (write_unqualified_name): Likewise.
2316
2317 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
2318
2319         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
2320
2321 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
2322
2323         PR c++/16162
2324         * parser.c (cp_parser_id_expression): Correct value for
2325         is_declarator.
2326         (cp_parser_nested_name_specifier_opt): Look through typenames as
2327         necessary.
2328         (cp_parser_template_name): Honor check_dependency_p.
2329
2330         PR c++/16716
2331         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
2332         Robustify.
2333
2334         PR c++/17327
2335         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
2336         gcc_unreacable.
2337
2338 2004-09-12  Richard Henderson  <rth@redhat.com>
2339
2340         PR c++/16254
2341         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
2342         * typeck.c (condition_conversion): Likewise.
2343
2344 2004-09-11  Richard Henderson  <rth@redhat.com>
2345
2346         PR c++/17404
2347         * pt.c (cur_stmt_expr): Move from tsubst_expr.
2348         (tsubst_expr) <case STMT_EXPR>: Move ...
2349         (tsubst_copy_and_build): ... here.
2350
2351 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
2352
2353         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
2354         comment explaining them moved to c-common.h.
2355         * lex.c (interface_only, interface_unknown, extract_interface_info):
2356         Delete definitions.
2357         (cxx_finish): Don't reset interface_unknown.
2358         (handle_pragma_interface): Don't set interface_only and
2359         interface_unknown; just the like-named fields in finfo.
2360         (handle_pragma_implementation): Adjust comment.
2361         * decl2.c (cp_finish_file): Don't reset interface_only and
2362         interface_unknown.
2363         * method.c (synthesize_method): Don't reset interface_unknown or
2364         call extract_interface_info.
2365         * pt.c (pop_tinst_level): Don't call extract_interface_info.
2366         * decl.c (start_cleanup_fn): Don't save or restore interface_only
2367         and interface_unknown.
2368         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
2369         and use the result instead of the interface_only/interface_unknown
2370         globals.
2371         (start_preparsed_function): Likewise.
2372         * lex.c (cxx_make_type): Likewise.
2373         * semantics.c (begin_class_definition): Likewise.
2374         (expand_body): Don't call extract_interface_info.
2375
2376 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
2377
2378         * decl.c (objc_mark_locals_volatile): Make description of
2379         routine more descriptive; only mark VAR_DECLs at each
2380         binding level.
2381
2382 2004-09-10  Richard Henderson  <rth@redhat.com>
2383
2384         PR c++/17386
2385         * call.c (build_vfield_ref): Move...
2386         * class.c (build_vfield_ref): ... here.  Convert datum to the
2387         primary base containing the vptr.
2388         (make_new_vtable): Simplify build_primary_vtable arguments.
2389         (finish_struct_1): Do not duplicate TYPE_VFIELD.
2390         * typeck.c (build_class_member_access_expr): Don't warn for
2391         null object access to base fields.
2392
2393 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
2394
2395         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
2396         New functions, to be called from ObjC++.
2397
2398 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
2399
2400         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
2401         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2402         comment typos.
2403
2404 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
2405
2406         * typeck.c (build_c_cast): Preserve the cast if casting
2407         to and from an Objective-C type.
2408
2409 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
2410
2411         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2412         * typeck.c: Include c-common.h.
2413         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2414         return the result if nonnegative.
2415
2416 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
2417
2418         * decl2.c (import_export_class)
2419         * lex.c (handle_pragma_interface):
2420         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2421
2422 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
2423
2424         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2425         * semantics.c: Include c-common.h.
2426         (finish_compound_stmt): Call objc_clear_super_receiver().
2427
2428 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
2429
2430         * cp-tree.h (do_poplevel): New prototype.
2431         * semantics.c (do_poplevel): Make externally visible.
2432
2433 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
2434
2435         * cp-tree.h (tree_pair_s): Define a GC'd vector.
2436         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2437         * semantics.c (deferred_access): Likewise.
2438
2439 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
2440
2441         * semantics.c (expand_body): Assert that we are not nested.
2442
2443 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
2444
2445         * decl.c (build_enumerator): Use add_double and int_fits_type_p
2446         instead of cp_build_binary_op, to avoid creating short-lived trees.
2447         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2448         lookahead instead of backtracking.  Move some code to avoid a
2449         conditional branch.
2450         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2451         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2452         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2453         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2454
2455 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2456
2457         * decl.c (grok_declarator): Remove a redundant semicolon.
2458
2459         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2460         Correct comments describing function parameters.
2461
2462 2004-09-03  Matt Austern  <austern@apple.com>
2463         Compile speed improvement.
2464         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2465         Otherwise define a stub macro that expands to nothing.
2466         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
2467         define a stub macro that expands to 0.
2468         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2469         (cp_lexer_stop_debugging): Likewise.
2470         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
2471         define a stub macro that expands to NULL.
2472         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2473         (cp_lexer_new_from_tokens): Likewise.
2474
2475 2004-09-03  Jan Hubicka  <jh@suse.cz>
2476
2477         * decl.c (finish_function): Clean out pointers we no longer need.
2478
2479 2004-09-03  Jan Beulich  <jbeulich@novell.com>
2480
2481         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2482         than "-lm".
2483
2484 2004-09-02  Paul Brook  <paul@codesourcery.com>
2485
2486         * decl2.c (determine_visibility): Only check data visibility
2487         for VAR_DECLS.
2488
2489 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
2490
2491         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2492         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2493         * decl2.c (determine_visibility): Honor
2494         TARGET_CXX_EXPORT_CLASS_DATA.
2495
2496         * class.c (key_method): Rename to ...
2497         (determine_key_method): ... this.
2498         (finish_struct_1): Adjust accordingly.
2499         * cp-tree.h (key_method): Declare.
2500         * decl2.c (maybe_emit_vtables): Determine the key method here if
2501         it has not already been done.
2502
2503 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
2504
2505         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2506         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2507         (cp/cp-decl.c): Do not depend on gtype-cp.h.
2508         (cp/cp-objcp-common.o): New target.
2509         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2510         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2511         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2512         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2513         respectively.
2514         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2515         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2516         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2517         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2518         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2519         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2520         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2521         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2522         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2523         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2524         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2525         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2526         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2527         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2528         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2529         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2530         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2531         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2532         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2533         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2534         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2535         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2536         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2537         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2538         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2539         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2540         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2541         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2542         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2543         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2544         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2545         hooks to cp-objcp-common.h.
2546         (finish_file): New function.
2547         * cp-objcp-common.c: New file.
2548         * cp-objcp-common.h: New file.
2549         * cp-tree.h (cp_finish_file): New prototype.
2550         * decl.c: Do not include gtype-cp.h.
2551         * decl2.c (finish_file): Rename to cp_finish_file.
2552
2553 2004-08-31  Richard Henderson  <rth@redhat.com>
2554
2555         PR c++/17221
2556         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2557         (tsubst_copy_and_build): ... here.
2558
2559 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
2560
2561         * cp-tree.h (initialize_artificial_var): Declare.
2562         * decl.c (initialize_artifical_var): New function.
2563         * class.c (initialize_array): Remove.
2564         (initialize_vtable): Use initialize_artificial_var.
2565         (build_vtt): Likewise.
2566         (build_ctor_vtbl_group): Likewise.
2567
2568 2004-08-30  Richard Henderson  <rth@redhat.com>
2569
2570         * class.c (build_base_path): Use build_address directly.
2571         * typeck.c (build_unary_op): Don't lower &a.b to pointer
2572         arithmetic directly.
2573         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
2574         means !initializer_constant_valid_p.
2575
2576 2004-08-30  Richard Henderson  <rth@redhat.com>
2577
2578         * class.c (fixed_type_or_null): Use get_base_address before
2579         assuming an ADDR_EXPR is non-null.
2580
2581 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
2582
2583         * name-lookup.c (pop_binding, pushdecl,
2584         set_identifier_type_value_with_scope, push_overloaded_decl,
2585         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
2586         * parser.c (cp_parser_diagnose_invalid_type_name,
2587         cp_parser_postfix_expression, cp_parser_unary_expression,
2588         cp_parser_check_declarator_template_para): Likewise.
2589         * pt.c (push_inline_template_parms_recursive,
2590         check_explicit_specialization, convert_nontype_argument,
2591         coerce_template_template_parms, uses_template_parms,
2592         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
2593         tsubst_expr, instantiate_template,
2594         maybe_adjust_types_for_deduction, type_unification_real,
2595         resolve_overloaded_unification, template_decl_level,
2596         type_dependent_expression_p): Likewise.
2597         * search.c (lookup_base_r): Likewise.
2598         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
2599         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
2600         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
2601         * typeck.c (common_type, get_member_function_from_ptrfunc,
2602         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
2603         * typeck2.c (cxx_incomplete_type_diagnostic,
2604         split_nonconstant_init_1, store_init_value,
2605         process_init_constructor): Likewise.
2606
2607 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
2608
2609         * call.c (check_dtor_name): Replace abort with gcc_assert or
2610         gcc_unreachable.
2611         (build_call, add_builtin_candidate, build_new_op,
2612         convert_like_real, build_over_call, in_charge_arg_for_name,
2613         source_type, joust): Likewise.
2614         * class.c (build_simple_base_path, get_vcall_index,
2615         finish_struct_1, instantiate_type, get_enclosing_class,
2616         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
2617         * cp-gimplify.c (cp_genericize): Likewise.
2618         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
2619         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
2620         * decl.c (poplevel, make_unbound_class_template, reshape_init,
2621         check_special_function_return_type, grokdeclarator,
2622         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
2623         finish_function): Likewise.
2624         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
2625         * error.c (dump_global_iord, dump_decl, dump_template_decl,
2626         language_to_string): Likewise.
2627         * except.c (choose_personality_routine): Likewise.
2628         * friend.c (do_friend): Likewise.
2629         * g++spec.c (lang_specific_driver): Likewise.
2630         * init.c (build_zero_init, expand_default_init, build_new_1,
2631         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
2632         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
2633         * mangle.c (add_substitution, write_unscoped_name,
2634         write_template_prefix, write_identifier,
2635         write_special_name_destructor, write_type, write_builtin_type,
2636         write_expression, write_template_param,
2637         write_java_integer_type_codes): Likewise.
2638         * method.c (implicitly_declare_fn): Likewise.
2639
2640 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
2641
2642         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
2643         (BINFO_INDIRECT_PRIMARY_P): Remove.
2644         * class.c (determine_primary_base): Rename to ...
2645         (determine_primary_bases): ... here.  Set all primary bases.
2646         (set_primary_base): Remove.
2647         (mark_primary_bases): Remove.
2648         (build_simple_base_path, walk_subobject_offsets,
2649         propagate_binfo_offsets, end_of_class): Adjust.
2650         (layout_class_type): Rename determine_primary_base call.
2651         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
2652         to type_as_string.
2653         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
2654         build_rtti_vtbl_entries): Adjust.
2655         * init.c (build_vtbl_address): Adjust.
2656
2657         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
2658
2659 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
2660
2661         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
2662         CXX_AND_OBJCXX_OBJS.
2663         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
2664         separately on the link line.
2665
2666 2004-08-28  Jason Merrill  <jason@redhat.com>
2667
2668         * decl.c (expand_static_init): Avoid bogus warnings.
2669
2670 2004-08-27  Jason Merrill  <jason@redhat.com>
2671
2672         PR c++/16851
2673         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
2674
2675         PR c++/13684
2676         * decl.c (expand_static_init): Use thread-safety API.
2677         (register_dtor_fn): Return the call, don't expand it.
2678         * tree.c (add_stmt_to_compound): New fn.
2679         (stabilize_call): Use it.
2680
2681 2004-08-27  Richard Henderson  <rth@redhat.com>
2682
2683         * cp-tree.def (OFFSETOF_EXPR): New.
2684         * parser.c (cp_parser_builtin_offsetof): Either built an
2685         OFFSETOF_EXPR, or call fold_offsetof immediately.
2686         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
2687
2688 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
2689
2690         * call.c (validate_conversion_obstack): Replace
2691         my_friendly_assert with gcc_assert or gcc_unreachable.
2692         (direct_reference_binding, merge_conversion_sequences,
2693         build_user_type_conversion_1, perform_overload_resolution,
2694         build_op_delete_call, enforce_access, call_builtin_trap,
2695         build_over_call, build_special_member_call, build_new_method_call,
2696         initialize_reference): Likewise.
2697         * class.c (build_base_path, build_primary_vtable, alter_access,
2698         check_bases, update_vtable_entry_for_fn, layout_empty_base,
2699         clone_function_decl, adjust_clone_args,
2700         type_requires_array_cookie, include_empty_classes,
2701         finish_struct_1, resolve_address_of_overloaded_function,
2702         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
2703         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2704         accumulate_vtbl_inits, build_vtbl_initializer,
2705         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
2706         * cvt.c (build_up_reference, convert_to_reference): Likewise.
2707         * decl.c (poplevel, duplicate_decls, make_typename_type,
2708         cxx_init_decl_processing, reshape_init, check_initializer,
2709         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
2710         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
2711         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
2712         xref_basetypes, start_preparsed_function, save_function_data,
2713         finish_function, finish_method, maybe_register_incomplete_var,
2714         complete_vars): Likewise.
2715         * decl2.c (grok_array_decl, check_member_template,
2716         check_classfn, finish_static_data_member_decl, coerce_new_type,
2717         coerce_delete_type, import_export_class, decl_needed_p,
2718         determine_visibility, import_export_decl, build_cleanup,
2719         start_static_initialization_or_destructi, do_static_destruction,
2720         prune_vars_needing_no_initialization,
2721         build_offset_ref_call_from_tree): Likewise.
2722         * error.c (dump_decl, dump_expr): Likewise.
2723         * init.c (finish_init_stmts, build_zero_init,
2724         expand_virtual_init, expand_default_init, expand_aggr_init_1,
2725         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
2726         Likewise.
2727         * mangle.c (write_method_parms, write_template_args,
2728         write_expression, write_template_arg): Likewise.
2729         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
2730         * name-lookup.c (pop_binding, begin_scope, leave_scope,
2731         resume_scope, push_using_decl, validate_nonmember_using_decl,
2732         is_ancestor, poplevel_class, set_inherited_value_binding_p,
2733         push_class_level_binding, do_class_using_decl, push_namespace,
2734         pop_namespace, add_using_namespace, ambiguous_decl,
2735         lookup_namespace_name, lookup_type_current_level,
2736         maybe_process_template_type_declaration): Likewise.
2737         * parser.c (cp_lexer_peek_nth_token,
2738         cp_parser_parse_and_diagnose_invalid_typ,
2739         cp_parser_translation_unit, cp_parser_template_id,
2740         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
2741         * pt.c (push_access_scope, finish_member_template_decl,
2742         push_inline_template_parms_recursive, add_outermost_template_args,
2743         get_innermost_template_args, begin_explicit_instantiation,
2744         end_explicit_instantiation, retrieve_specialization,
2745         is_specialization_of, is_specialization_of_friend,
2746         register_specialization, check_explicit_specialization,
2747         comp_template_parms, process_template_parm,
2748         process_partial_specialization, convert_nontype_argument,
2749         coerce_template_template_parms, coerce_template_parms,
2750         mangle_class_name_for_template, lookup_template_function,
2751         lookup_template_class, instantiate_class_template, tsubst_decl,
2752         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
2753         instantiate_template, fn_type_unification, type_unification_real,
2754         get_template_base, regenerate_decl_from_template,
2755         template_for_substitution, instantiate_decl,
2756         get_mostly_instantiated_function_type, dependent_scope_ref_p,
2757         value_dependent_expression_p, resolve_typename_type): Likewise.
2758         * repo.c (repo_emit_p): Likewise.
2759         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
2760         create_tinfo_types, emit_tinfo_decl): Likewise.
2761         * search.c (lookup_base_r, lookup_base, lookup_field_1,
2762         dfs_access_in_type, build_baselink, lookup_member,
2763         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
2764         * semantics.c (perform_or_defer_access_check,
2765         finish_non_static_data_member, finish_stmt_expr_expr,
2766         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
2767         finish_template_template_parm, finish_member_declaration,
2768         emit_associated_thunks): Likewise.
2769         * tree.c (build_target_expr_with_type, force_target_expr,
2770         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
2771         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
2772         cxx_sizeof_or_alignof_type, perform_integral_promotions,
2773         build_class_member_access_expr, finish_class_member_access_expr,
2774         build_ptrmemfunc_access_expr, build_unary_op,
2775         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
2776         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
2777         * typeck2.c (complete_type_check_abstract,
2778         abstract_virtuals_error, process_init_constructor,
2779         add_exception_specifier): Likewise.
2780
2781 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
2782
2783         * class.c (build_vtbl_initializer): Use ssize_int.
2784         * decl.c (complete_array_type): Likewise.
2785         * method.c (finish_thunk): Likewise.
2786         * search.c (get_dynamic_base_type): Likewise.
2787
2788 2004-08-26  Richard Henderson  <rth@redhat.com>
2789
2790         * cp-tree.h (DECL_FIELD_IS_BASE): New.
2791         * class.c (build_base_field): Set it.
2792         (build_simple_base_path): Use it.
2793         (fixed_type_or_null): Don't consider base fields definitive.
2794
2795 2004-08-25  Roger Sayle  <roger@eyesopen.com>
2796
2797         PR middle-end/16693
2798         PR tree-optimization/16372
2799         * decl.c (finish_enum): Make the precision of the enumerated type
2800         the same width as the underlying integer type.
2801
2802 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
2803
2804         PR c++/17155
2805         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
2806         functions.
2807
2808         * mangle.c (get_identifier_nocopy): Add cast.
2809
2810         * cp-tree.h (mangle_type): Remove.
2811         * mangle.c (globals): GTY it.
2812         (mangle_obstack): New variable.
2813         (name_obstack): Likewise.
2814         (name_base): Likewise.
2815         (write_char): Adjust accordingly.
2816         (write_chars): Likewise.
2817         (write_string): Likewise.
2818         (start_mangling): Initialize G.substitutions only one.  Add
2819         ident_p parameter.
2820         (finish_mangling): Use VARRAY_CLEAR to reclaim
2821         storage in G.substitutions.  Use obstack_finish.
2822         (init_mangle): Adjust for changes to variable names above.
2823         Initialize G.substitutions.
2824         (mangle_decl_string): Adjust call to start_mangling.
2825         (get_identifier_nocopy): New function.
2826         (mangle_decl): Use it.
2827         (mangle_type_string): Adjust call to start_mangling.
2828         (mangle_special_for_type): Likewise.
2829         (mangle_vtt_for_type): Likewise.
2830         (mangle_ctor_vtbl_for_type): Likewise.
2831         (mangle_thunk): Likewise.
2832         (mangle_guard_variable): Likewise.
2833         (mangle_ref_init_variable): Likewise.
2834
2835 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2836
2837         PR c++/14428
2838         * pt.c (redeclare_class_template): Check the type of non-type and
2839         template template parameter.
2840
2841 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
2842
2843         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
2844         (build_user_type_conversion_1, convert_like_real,
2845         build_java_interface_fn_ref, build_special_member_call): Likewise.
2846         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
2847         * cp-gimplify.c (cp_gimplify_expr): Likewise.
2848         * cvt.c (cp_convert_to_pointer): Likewise.
2849         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2850         * decl2.c (start_static_initialization_or_destruction,
2851         generate_ctor_or_dtor_function): Likewise.
2852         * except.c (build_throw): Likewise.
2853         * mangle.c (write_integer_cst): Likewise.
2854         * method.c (finish_thunk): Likewise.
2855         * rtti.c (build_headof, get_tinfo_decl_dynamic,
2856         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2857         get_pseudo_ti_init): Likewise.
2858         * search.c (get_dynamic_cast_base_type): Likewise.
2859
2860 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
2861
2862         * class.c, search.c: Remove references to DWARF_DEBUG.
2863
2864 2004-08-25  Adam Nemet  <anemet@lnxw.com>
2865
2866         * repo.c (extract_string): Reset backquote after one character.
2867         (get_base_filename): Fix indentation.
2868
2869 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2870
2871         * decl.c (cxx_init_decl_processing): Adjust
2872         build_common_tree_nodes call.
2873
2874 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2875
2876         PR c++/16889
2877         * (is_subobject_of_p): Resurrect & optimize.
2878         (lookup_field_r): Use it.
2879
2880 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2881
2882         PR c++/16706
2883         * search.c (friend_accessible_p): Increment processing_template_decl
2884         when deal with TEMPLATE_DECL of SCOPE.
2885
2886 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2887
2888         PR c++/17149
2889         * semantics.c (check_accessibility_of_qualified_id): Defer check
2890         if qualifying_type is a template parameter.
2891
2892 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
2893
2894         PR c++/17163
2895         * pt.c (instantiate_decl): Do not try to apply
2896         DECL_DECLARED_INLINED_P to a VAR_DECL.
2897
2898         * search.c (build_baselink): Fix typo in comment.
2899
2900 2004-08-22 Andrew Pinski  <apinski@apple.com>
2901
2902         Revert:
2903         2004-08-22  Andrew Pinski  <apinski@apple.com>
2904         PR c++/14029
2905         * typeck.c (build_unary_op): Use &a.b if the folded lowered
2906         expression is not constant.
2907
2908 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
2909
2910         * name-lookup.c (pushdecl): Rename build_type_copy call.
2911         * tree.c (cp_build_qualified_type_real,
2912         build_exception_variant, handle_java_interface_attribute): Likewise.
2913
2914 2004-08-22  Andrew Pinski  <apinski@apple.com>
2915
2916         PR c++/14029
2917         * typeck.c (build_unary_op): Use &a.b if the folded lowered
2918         expression is not constant.
2919
2920 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
2921
2922         PR c++/17121
2923         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2924
2925 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
2926
2927         PR c++/17120
2928         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
2929         MODOP_EXPR.
2930
2931 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2932
2933         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
2934         before calling comp_template_args.
2935
2936 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
2937
2938         * class.c (build_vtbl_initializer): Use build_int_cst for
2939         negative size types.
2940         * decl.c (complete_array_type): Likewise.
2941         * method.c (finish_thunk): Likewise.
2942
2943 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
2944
2945         * tree.c: Remove unused mark_local_for_remap_r.
2946
2947 2004-08-19  Eric Christopher  <echristo@redhat.com>
2948
2949         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
2950         * tree.c (cxx_unsave_expr_now): Delete.
2951         (cp_unsave_r): Ditto.
2952
2953 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
2954
2955         PR c++/15890
2956         * pt.c (push_template_decl_real): Disallow template allocation
2957         functions with fewer than two parameters.
2958
2959 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
2960
2961         * cp-tree.h (build_shared_int_cst): Remove.
2962         * tree.c (shared_int_cache): Remove.
2963         (build_shared_int_cst): Remove.
2964         * class.c (finish_struct_1): Use build_int_cst.
2965
2966 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
2967
2968         * decl.c (finish_enum): Do not copy value node early, copy
2969         later.
2970         * lex.c (cxx_init): Force null_node to be unique.
2971
2972 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
2973
2974         PR c++/17041
2975         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
2976         from input for MODOP_EXPR.
2977
2978 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
2979
2980         * pt.c (dependent_template_p): Fix typo in commment.
2981
2982         PR c++/17068
2983         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
2984         dependent.
2985
2986 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
2987
2988         PR c++/16246
2989         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
2990         arguments have the same type as the corresponding parameter.
2991
2992         PR c++/16215
2993         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
2994         is set use it for diagnostic purposes.
2995         (cp_parser_pseudo_destructor_name): Remove special-case error
2996         message.
2997
2998         PR c++/15871
2999         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3000
3001         PR c++/16965
3002         * cp-tree.h (qualified_name_lookup_error): Add parameter.
3003         * name-lookup.c (do_class_using_decl): Restrict set of entities
3004         passed to cp_emit_debug_info_for_using more carefully.
3005         (lookup_qualified_name): Allow lookup_member to return sets of
3006         ambiguous entries.
3007         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3008         (cp_parser_primary_expression): Handle ambiguous lookups.
3009         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3010         (cp_parser_template_argument): Likewise.
3011         (cp_parser_elaborate_type_specifier): Likewise.
3012         (cp_parser_namespace_name): Likewise.
3013         (cp_parser_class_name): Likewise.
3014         (cp_parser_lookup_name_simple): Likewise.
3015         * pt.c (tsubst_qualified_id): Handle ambiguous results.
3016         (tsubst_expr): Likewise.
3017         * semantics.c (qualified_name_lookup_error): Add decl paramter.
3018         For ambiguous lookups, print candidates.
3019
3020 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3021
3022         PR c++/6749
3023         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
3024         return anything.
3025         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3026         * decl2.c (finish_file): Adjust call to
3027         instantiate_pending_templates.
3028
3029 2004-08-15  Roger Sayle  <roger@eyesopen.com>
3030
3031         * call.c (build_vfield_ref, build_call, build_conditional_expr,
3032         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3033         build_java_interface_fn_ref, build_special_member_call,
3034         build_new_method_call, initialize_reference): Replace calls to
3035         build with calls to buildN.
3036         * class.c (build_base_path, convert_to_base_statically,
3037         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3038         build_vtbl_initializer): Likewise.
3039         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
3040         gimplify_if_stmt, cp_genericize_r): Likewise.
3041         * cvt.c (convert_to_void): Likewise.
3042         * decl.c (check_initializer, finish_constructor_body,
3043         finish_destructor_body): Likewise.
3044         * error.c (dump_expr): Likewise.
3045         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
3046         Likewise.
3047         * init.c (perform_member_init, expand_virtual_init,
3048         expand_cleanup_for_base, build_init, expand_default_init,
3049         build_offset_ref, decl_constant_value, build_new, build_new_1,
3050         build_vec_delete_1, build_vec_init, build_delete,
3051         push_base_cleanups, build_vec_delete): Likewise.
3052         * mangle.c (write_integer_cst): Likewise.
3053         * method.c (thunk_adjust, do_build_copy_constructor,
3054         do_build_assign_ref): Likewise.
3055         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
3056         unify, build_non_dependent_expr): Likewise.
3057         * rtti.c (build_headof, build_typeid, ifnonnull,
3058         build_dyanmic_cast_1, tinfo_base_init): Likewise.
3059         * semantics.c (begin_compound_stmt, finish_call_expr,
3060         finish_pseudo_destructor_expr, finish_id_expression,
3061         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
3062         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
3063         array_type_nelts_total, stabilize_call): Likewise.
3064         * typeck.c (decay_conversion, build_class_member_access_expr,
3065         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
3066         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
3067         build_x_unary_op, build_unary_op, unary_complex_lvalue,
3068         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
3069         check_return_expr): Likewise.
3070         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
3071         split_nonconstant_init, store_init_value, build_m_component_ref):
3072         Likewise.
3073
3074 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3075
3076         * call.c (convert_class_to_reference,
3077         build_user_type_conversion_1, convert_like_real,
3078         build_java_interface_fn_ref, build_special_member_call): Use
3079         build_int_cst.
3080         * class.c (build_vtbl_initializer): Likewise.
3081         * cp-gimplify.c (cp_gimplify_expr): Likewise.
3082         * cvt.c (cp_convert_to_pointer): Likewise.
3083         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3084         * decl2.c (start_static_initialization_or_destruction,
3085         generate_ctor_or_dtor_function): Likewise.
3086         * except.c (build_throw): Likewise.
3087         * lex.c (cxx_init): Likewise.
3088         * mangle.c (write_integer_cst): Likewise.
3089         * rtti.c (build_headof, get_tinfo_decl_dynamic,
3090         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3091         get_pseudo_ti_init): Likewise.
3092         * search.c (get_dynamic_cast_base_type): Likewise.
3093         * tree.c (build_shared_int_cst): Likewise.
3094
3095 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
3096
3097         PR c++/16273
3098         * class.c (count_depth_data): New type.
3099         (dfs_depth_post): New function.
3100         (dfs_depth_q): Likewise.
3101         (find_final_overrider_data_s): Change type of vpath.
3102         Add vpath_list.
3103         (dfs_find_final_overrider_1): New function.
3104         (dfs_find_final_overrider): Use it.
3105         (dfs_find_final_overrider_q): Adjust use of vpath.
3106         (dfs_find_final_overrider_post): Likewise.
3107         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
3108         vpath_list.
3109
3110 2004-08-12 Jan Beulich <jbeulich@novell.com>
3111
3112         * parser.c (cp_parser_asm_definition): Properly consume scope operator
3113         tokens preceding the clobbers. Don't check for scope operator
3114         following inputs. Simplify inputs handling to match that now used for
3115         clobbers.
3116
3117 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
3118
3119         PR c++/16698
3120         * except.c (build_throw): Allocate cleanup_type and the function
3121         for __cxa_throw separately.
3122
3123         PR c++/16853
3124         * call.c (standard_conversion): Do not accept conversions between
3125         pointers to members if the class types are unrelated.
3126
3127         PR c++/16618
3128         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
3129         char &" instead of just "char &".
3130
3131         PR c++/16870
3132         * pt.c (tsubst): Just return the unknown_type_node.
3133
3134 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
3135
3136         PR c++/16964
3137         * parser.c (cp_parser_class_specifier): Robustify.
3138
3139         PR c++/16904
3140         * pt.c (tsubst_copy_and_build): Complain about invalid
3141         qualification.
3142
3143         PR c++/16929
3144         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
3145         current_class_ref while tsubsting.
3146
3147 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
3148
3149         PR c++/16971
3150         * parser.c (cp_parser_init_declarator): Robustify.
3151
3152 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
3153
3154         * typeck2.c (process_init_constructor): Guard the missing field warning
3155         with warn_missing_field_initializers rather than extra_warnings.
3156
3157 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
3158
3159         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
3160
3161 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
3162
3163         * decl.c (start_preparsed_function): Move determine_visibility
3164         call.
3165         * decl2.c (determine_visibility): Incorporate dllexport testing.
3166
3167 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
3168
3169         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
3170         means that libstdc++ is needed.
3171
3172 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
3173
3174         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
3175
3176 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
3177
3178         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
3179         than passing it as a parameter to rest_of_decl_compilation.
3180         * decl2.c (grokfield): Use set_user_assembler_name.
3181
3182 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
3183
3184         * decl.c (complete_array_type): Don't gratuitously copy
3185         maxindex. Its type is always set.
3186
3187 2004-08-04  Paul Brook  <paul@codesourcery.com>
3188
3189         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
3190         * cp-tree.h (struct language_function): Rename x_dtor_label to
3191         x_cdtor_label.
3192         (dtor_label): Rename ...
3193         (cdtor_label): ... to this.
3194         * decl.c (begin_constructor_body): Remove.
3195         (check_special_function_return_type): Maybe change the return type.
3196         (grokdeclarator): Pass the class type.
3197         (start_preparsed_function): Constructors may need a return label.
3198         (finish_constructor_body, finish_destructor_body): Set the return
3199         value.
3200         (begin_function_body): Don't call begin_constructor_body.
3201         (finish_function): Don't warn for constructors or destructors.
3202         (implicitly_declare_fn): Maybe change the return type.
3203         * optimize.c: Include target.h.
3204         (maybe_clone_body): Remap the function result.
3205         * semantics.c: Include target.h.
3206         (finish_return_stmt): Maybe jump to return label for constructors.
3207
3208 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
3209
3210         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
3211         (check_field_decls): Or here.
3212         (check_methods): Or here.
3213         (initialize_array): Don't mess with DECL_CONTEXT.
3214         * cp-tree.h (start_decl): Adjust prototype.
3215         (determine_visibility): New function.
3216         * decl.c (duplicate_decls): Remove checks for hidden "operator
3217         new".
3218         (build_library_fn_1): Give all library functions default
3219         visibility.
3220         (start_decl): Add pop_scope_p parameter.  Tidy.
3221         (cp_finish_decl): Do not pop scopes here.  Call
3222         determine_visibility for variable definitions.
3223         (start_preparsed_function): Call determine_visibility.
3224         * decl2.c (determine_visibility): New function.
3225         * method.c (use_thunk): Fix formatting.
3226         * parser.c (cp_parser_condition): Adjust calls to start_decl.
3227         (cp_parser_init_declarator): Likewise.
3228         * pt.c (instantiate_decl): Always call pop_nested_class.
3229         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
3230         (tinfo_base_init): Likewise.
3231
3232 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
3233
3234         PR c++/16707
3235         * name-lookup.c (validate_nonmember_using_decl): Robustify.
3236
3237 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
3238
3239         PR c++/16224
3240         * name-lookup.c (decl_namespace): Remove.
3241         (current_decl_namespace): Use decl_namespace_context instead of
3242         decl_namespace.
3243         (push_decl_namespace): Likewise.
3244         (arg_assoc_class): Likewise.
3245         (arg_assoc_type): Likewise.
3246         * pt.c (check_specialization_namespace): New function.
3247         (maybe_process_partial_specialization): Use it.
3248         (register_specialization): Likewise.
3249
3250         PR c++/16489
3251         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
3252         * call.c (null_ptr_cst_p): Handle variables with constant
3253         initializers.
3254         * pt.c (convert_nontype_argument): Use
3255         DECL_INTEGRAL_CONSTANT_VAR_P.
3256         * semantics.c (finish_id_expression): Likewise.
3257
3258         PR c++/16529
3259         * decl.c (duplicate_decls): Reject duplicate namespace
3260         declarations.
3261
3262         PR c++/16810
3263         * typeck.c (build_ptrmemfunc): Loosen assertion.
3264
3265 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3266
3267         * call.c (z_candidate::template_decl): Rename from template.
3268         (add_template_candidate_real): Adjust member reference.
3269         (joust): Likewise.
3270
3271 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
3272
3273         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
3274         (lang_decl_flags): Narrow the width of "languages".  Add
3275         repo_available_p.
3276         (DECL_NEEDED_P): Remove.
3277         (FOR_EACH_CLONE): New macro.
3278         (DECL_REPO_AVAILABLE_P): Likewise.
3279         (DECL_TINFO_P): Likewise.
3280         (set_linkage_according_to_type): Declare.
3281         (import_export_vtable): Remove.
3282         (import_export_tinfo): Likewise.
3283         (mark_needed): New function.
3284         (decl_needed_p): Likewise.
3285         (note_vauge_linkage_fn): Likewise.
3286         (init_repo): Change prototype.
3287         (repo_template_used): Remove.
3288         (repo_template_instantiated): Likewise.
3289         (repo_emit_p): New function.
3290         (repo_export_class_p): Likewise.
3291         (no_linkage_check): Change prototype.
3292         * class.c (set_linkage_according_to_type): New function.
3293         (build_vtable): Use it.  Do not call import_export_vtable.  Set
3294         DECL_IGNORED_P if appropriate.
3295         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
3296         (make_rtL_for_nonlocal_decls): Check for template instantiations
3297         explicitly.
3298         (grokfndecl): Adjust call to no_linkage_check.
3299         (set_linkage_for_static_data_member): New function.
3300         (grokvardecl): Use it.  Adjust call to no_linkage_check.
3301         (grokdeclarator): Use set_linkage_for_static_data_member.
3302         * decl2.c (note_vague_linkage_fn): New function.
3303         (note_vague_linkage_var): Likewise.
3304         (finish_static_data_member_decl): Use it.
3305         (import_export_vtable): Remove.
3306         (import_export_class): Use repo_export_class_p.
3307         (var_finalized_p): Simplify.
3308         (maybe_emit_vtables): Simplify.
3309         (mark_needed): New function.
3310         (decl_needed_p): Likewise.
3311         (import_export_decl): Add documentation and consistency checks.
3312         Use repo_emit_p.  Handle virtual tables and RTTI information
3313         here.
3314         (import_export_tinfo): Remove.
3315         (write_out_vars): Call import_export_decl.
3316         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
3317         whenever one is.
3318         (finish_file): Use decl_needed_p.  Do not call import_export_decl
3319         for undefined static data members.  Do not warn about undefined
3320         inlines when using a repository.
3321         (mark_used): Use note_vague_linkage_fn.  Always defer template
3322         instantiations.
3323         * lex.c (cxx_init): Adjust call to init_repo.  Always set
3324         flag_unit_at_a-time.
3325         * method.c (synthesize_method): Remove unncessary
3326         import_export_decl call.
3327         (implicitly_declare_fn): Use set_linkage_according_to_type.
3328         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
3329         * pt.c (instantiate_class_template): Don't redundantly add classes
3330         to keyed_classes.  Don't call repo_template_used.
3331         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
3332         templates with internal linkage.
3333         (check_instantiated_args): Adjust call to no_linkage_check.
3334         (instantiate_template): Use FOR_EACH_CLONE.
3335         (mark_definable): New function.
3336         (mark_decl_instantiated): Use it.
3337         (do_decl_instantiation): Adjust tests for explicit instantiation
3338         after "extern template".
3339         (instantiate_class_member): Do not use repo_template_instantiated.
3340         (do_type_instantiation): Simplify.
3341         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
3342         Simplify.
3343         * repo.c (repo_get_id): Remove.
3344         (original_repo): Remove.
3345         (IDENTIFIER_REPO_USED): Remove.
3346         (IDENTIFIER_REPO_CHOSEN): Remove.
3347         Remove all #if 0'd code.
3348         (repo_template_used): Remove.
3349         (repo_template_instantiated): Remove.
3350         (temporary_obstack_initialized_p): New variable.
3351         (init_repo): Register with lang_post_pch_load.  Avoid creating
3352         identifiers unnecessarily.  Don't use original_repo.  Close the
3353         file here.
3354         (reopen_repo_file_for_write): Not here.
3355         (finish_repo): Always write out a new repository file.
3356         (repo_emit_p): New function.
3357         (repo_export_class_p): Likewise.
3358         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
3359         (involves_incomplete_p): New function.
3360         (tinfo_base_init): Use it.
3361         (ptr_initializer): Remove non_public_ptr parameter.
3362         (ptm_initializer): Likewise.
3363         (get_pseudo_ti_init): Likewise.
3364         (unemitted_tinfo_decl_p): Remove.
3365         (emit_tinfo_decl): Use import_export_decl.
3366         * semantics.c (expand_body): Move updates of static_ctors and
3367         static_dtors to ...
3368         (expand_or_defer_fn): ... here.
3369         * tree.c (no_linkage_check): Add relaxed_p parameter.
3370
3371 2004-07-28  Eric Christopher  <echristo@redhat.com>
3372
3373         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3374
3375 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
3376
3377         * cp-tree.h (struct tree_pair_s): New.
3378         (typedef tree_pair_p): New.
3379         (DEF_VEC_O(tree_pair_s)): New.
3380         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
3381         (CLASSTYPE_VCALL_INDICES): Update documentation.
3382         * class.c (get_vcall_index): Adjust.
3383         (add_vcall_offset): Adjust.
3384
3385 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
3386
3387         * pt.c, typeck.c: Remove spurious carriage returns.
3388
3389 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3390
3391         PR c++/14429
3392         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
3393         when the type of ARG is not dependent.
3394
3395 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
3396
3397         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
3398         (lang_specific_driver): If the C++ or math library options don't
3399         start with '-l', don't count them as added libraries.
3400
3401 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
3402
3403         * decl.c (xref_basetypes): Adjust base access vector creation.
3404         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
3405         access accesses.
3406         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
3407
3408 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
3409             Brian Ryner  <bryner@brianryner.com>
3410
3411         PR c++/15000
3412         PR c++/9283
3413         * class.c (check_field_decls): Apply hidden visibility if
3414         -fvisibility-inlines-hidden and inlined unless otherwise specified
3415         (build_vtable): Set vtable visibility to class visibility.
3416         (check_field_decls): Default static member visibility to class
3417         visibility.
3418         (check_methods): Default method visibility to class visibility.
3419         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
3420         CLASSTYPE_VISIBILITY_SPECIFIED macro.
3421         * decl.c (duplicate_decls): New logic for merging definition decls
3422         with declaration decls. Added ignore & warning when non default
3423         applied to global operator new or delete.
3424         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
3425         wherever VISIBILITY was changed
3426         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
3427         visibility.
3428         (tinfo_base_init): Set typeinfo name visibility to class visibility.
3429
3430 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
3431
3432         * decl.c: Rename all identifiers named `class' to `cl'.
3433         * cp-tree.h: Likewise.
3434
3435 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3436
3437         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
3438         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
3439         * name-lookup.c (binding_entry_make): Use GGC_NEW.
3440         (binding_table_construct): Use GGC_CNEWVEC.
3441         (binding_table_new): Use GGC_NEW.
3442         (cxx_binding_make): Likewise.
3443         (begin_scope): Likewise.
3444         (push_to_top_level): Use GCC_CNEW.
3445         * parser.c (cp_token_cache_new): Likewise.
3446         (cp_token_cache_push_token): Likewise.
3447         (cp_lexer_new_main): Likewise.
3448         (cp_lexer_new_from_tokens): Likewise.
3449         (cp_parser_context_new): Likewise.
3450         (cp_parser_new): Likewise.
3451         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
3452         * lex.c (cxx_make_type): Use GGC_CNEW.
3453         (retrofit_lang_decl): Use GGC_NEWVAR.
3454         (cxx_dup_lang_specific_decl): Likewise.
3455         (copy_lang_type): Likewise.
3456         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
3457         (save_function_data): Likewise.
3458         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
3459         (cxx_push_function_context): Likewise.
3460
3461 2004-07-25  Richard Henderson  <rth@redhat.com>
3462
3463         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
3464         DECL_IGNORED_P on RESULT_DECL.
3465         * semantics.c (finalize_nrv): Copy them too.
3466
3467 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
3468
3469         * search.c (lookup_conversion_operator): Avoid two loops.
3470         (add_conversions): Remove.
3471         (check_hidden_convs, split_conversions,
3472         lookup_conversions_r):  New.
3473         (lookup_conversions): Use lookup_conversions_r.
3474
3475 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
3476
3477         * pt.c (get_template_base): Check type is completable.
3478
3479 2004-07-21  Eric Christopher  <echristo@redhat.com>
3480
3481         * decl.c (poplevel): Inline unused variable checking.
3482         Change formatting.
3483
3484 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
3485
3486         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
3487         integer vectors.
3488
3489 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3490
3491         PR c++/14497
3492         * pt.c (check_explicit_specialization): Remove extension to accept
3493         specializations without template headers. Fall-through to normal
3494         processing.
3495
3496 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3497
3498         PR c++/509
3499         * pt.c (determine_specialization): New parameter template_count.
3500         Disambiguate between member templates and member functions counting
3501         the template headers.
3502         (check_explicit_specialization): Update caller.
3503         (tsubst_friend_function): Likewise.
3504
3505 2004-07-20  Steven Bosscher  <stevenb@suse.de>
3506
3507         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
3508         * cp-tree.h (tinst_level_t): New tree type.
3509         (union lang_tree_node): Handle it.
3510         (TINST_LOCATION): New accessor macro.
3511         (make_tinst_level): New prototype.
3512         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
3513         * decl.c (cp_tree_node_structure): Likewise.
3514         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
3515         (print_instantiation_partial_context): Likewise.
3516         * pt.c (pop_tinst_level): Likewise.
3517          (push_tinst_level): Use make_tinst_level.
3518         * tree.c (make_tinst_level): New function.
3519         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
3520
3521 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
3522
3523         * parser.c (cp_parser_simple_type_specifier): Fix typo.
3524
3525         PR c++/16637
3526         * parser.c (cp_parser_simple_type_specifier): Do not record usage
3527         of globally-qualified names.
3528
3529 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3530
3531         PR c++/16175
3532         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
3533         cv qualifier.
3534
3535 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
3536
3537         PR c++/16623
3538         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3539         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3540         * class.c (add_implicitly_declared_members): Use
3541         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3542         * method.c (lazily_declare_fn): Clear
3543         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3544         * search.c (lookup_fnfields_1): Check it.
3545
3546 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3547
3548         * cp-tree.h (vec_binfo_member): Remove.
3549         * tree.c (vec_binfo_member): Remove.
3550
3551         * cp-tree.h (struct lang_type_class): Remove vfields field.
3552         (CLASSTYPE_VFIELDS): Remove.
3553         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3554         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
3555         handling.
3556         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
3557         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
3558         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
3559
3560 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3561
3562         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
3563         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3564         Moved to common.
3565         (BINFO_LANG_SLOTS): Remove.
3566         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
3567         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
3568         * class.c (check_bases): Adjust BINFO accessors.
3569         (determine_primary_base, finish_struct_bits,
3570         maybe_warn_about_overly_private_class, warn_hidden,
3571         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
3572         warn_about_ambiguous_bases, get_vfield_name,
3573         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
3574         add_vcall_offset_vtbl_entries_r): Likewise.
3575         * dump.c (cp_dump_tree): Likewise.
3576         * init.c (sort_mem_initializers, expand_member_init, build_delete,
3577         push_base_cleanups): Likewise.
3578         * method.c (do_build_copy_constructor, do_build_assign_ref,
3579         synthesize_exception_spec): Likewise.
3580         name-lookup.c (arg_assoc_class): Likewise.
3581         * pt.c (instantiate_class_template,
3582         get_template_base_recursive): Likewise.
3583         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
3584         * typeck2.c (process_init_constructor): Likewise.
3585         * search.c (lookup_base_r, dynamic_cast_base_recurse,
3586         dfs_access_in_type, dfs_walk_real, look_for_overrides,
3587         types_overlap_p, copied_binfo, original_binfo): Likewise.
3588         (binfo_for_vtable): Remove
3589
3590 2004-07-20  Steven Bosscher  <stevenb@suse.de>
3591
3592         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
3593         thunk_alias, and the access and virtual_offset fields.
3594         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
3595         * decl.c (finish_case_label): Update c_add_case_node call.
3596
3597 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
3598
3599         Revert patch for PR c++/16623.
3600
3601 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
3602
3603         * except.c: Remove two spurious carriage returns.
3604
3605 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
3606
3607         PR c++/16623
3608         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3609         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3610         * class.c (add_implicitly_declared_members): Use
3611         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3612         * method.c (lazily_declare_fn): Clear
3613         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3614         * search.c (lookup_fnfields_1): Check it.
3615
3616 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
3617
3618         * class.c (add_method): Delay adding the slot until the end.
3619         (determine_primary_base): Adjust VEC_iterate invokation.
3620         (resort_type_method_vec, finish_struct_methods, warn_hidden,
3621         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
3622         build_vtbl_initializer): Likewise.
3623         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
3624         build_vbase_delete): Likewise.
3625         * method.c (do_build_copy_constructor): Likewise.
3626         * name-lookup.c (new_class_binding, print_binding_level,
3627         poplevel_class, store_class_bindings, push_to_top_level,
3628         pop_from_top_level): Likewise.
3629         * pt.c (check_explicit_specialization): Likewise.
3630         * search.c (lookup_conversion_operator, lookup_fnfields_1,
3631         get_pure_virtuals, add_conversions, dfs_check_overlap,
3632         binfo_for_vbase): Likewise.
3633
3634 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3635
3636         PR c++/12170
3637         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
3638         innermost set of template arguments during deduction.  Simplify.
3639
3640 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
3641
3642         * typeck.c (build_modify_expr, build_x_modify_expr): Set
3643         TREE_NO_WARNING on assignments with an operator other than '='.
3644
3645 2004-07-10  Steven Bosscher  <stevenb@suse.de>
3646             Joseph S. Myers  <jsm@polyomino.org.uk>
3647
3648         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
3649         * decl2.c (grokfield): Don't check current_class_depth via
3650         unused TREE_COMPLEXITY.
3651         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
3652         to avoid the missing parentheses warning.
3653         Don't set C_SET_EXP_ORIGINAL_CODE.
3654
3655 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
3656
3657         * tree.c (no_linkage_helper): Remove.
3658         (no_linkage_check): Don't use walk_tree_without_duplicates.
3659
3660         * mangle.c (write_expression): Issue a sorry for zero-operand
3661         functional casts.
3662
3663 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3664
3665         PR c++/13092
3666         * init.c (build_offset_ref): Build SCOPE_REF with non-null
3667         TREE_TYPE for non-dependent names.
3668         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
3669         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3670         unknown_type_node as its TREE_TYPE.
3671         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3672         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3673         (dump_expr) <SCOPE_REF case>: Likewise.
3674
3675 2004-07-17  Jason Merrill  <jason@redhat.com>
3676
3677         PR c++/16115
3678         * call.c (type_passed_as): Make the invisible reference type
3679         __restrict.
3680         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
3681         cp_genericize_r.  Handle invisible reference lowering.
3682         (is_invisiref_parm): New fn.
3683         (cp_genericize): Adjust the types of invisible reference parms.
3684         Don't repeat the walk for clones.
3685         * decl.c (store_parm_decls): Don't generate any code for clones.
3686
3687 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3688
3689         * cp-tree.h (builtin_function): Declare.
3690
3691 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
3692
3693         * class.c (finish_struct_methods): Remove unncessary code.
3694         (add_implicitly_declared_members): Create declarations for default
3695         constructors and copy constructors lazily.
3696         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
3697         lazy_copy_ctor.
3698         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
3699         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
3700         * decl2.c (check_classfn): Robustify.
3701         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
3702         (locate_ctor): Handle lazy default constructors.
3703         (locate_copy): Handle lazy copy constructors.
3704         (implicitly_declare_fn): Make sure we're looking at the
3705         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
3706         set TYPE_HAS_CONSTRUCTOR.
3707         (lazily_declare_fn): New function.
3708         * name-lookup.c (constructor_name_full): Simplify.
3709         * search.c (lookup_fnfields_1): Lazily create methods, as
3710         necessary.
3711         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
3712
3713 2004-07-16  Steven Bosscher  <stevenb@suse.de>
3714
3715         * cp-tree.h (struct lang_type): Don't have three GTY options on a
3716         single bit GTY desc.
3717
3718 2004-07-16  Richard Henderson  <rth@redhat.com>
3719
3720         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
3721         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
3722         * tree.c (cp_copy_res_decl_for_inlining): Remove.
3723
3724 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
3725
3726         * class.c (finish_struct_bits): Use for loop.
3727         (propagate_binfo_offsets): Do primary binfo outside of loop.
3728
3729         PR c++/16583
3730         * dump.c (cp_dump_tree): Don't dump the bases if there's no
3731         binfo.
3732
3733         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
3734
3735 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
3736
3737         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
3738         has_abstract_assign_ref.  Make methods a VEC(tree) *.
3739         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
3740         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
3741         (CLASSTYPE_DESTRUCTORS): Likewise.
3742         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
3743         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3744         (add_method): Change prototoype.
3745         * class.c (add_method): Remove error_p parameter.  Adjust for
3746         changes to CLASSTYPE_METHOD_VEC.
3747         (handle_using_decl): Adjust call to add_method.
3748         (maybe_warn_about_overly_private_class): Adjust for
3749         changes to CLASSTYPE_METHOD_VEC.
3750         (resort_type_method_vec): Likewise.
3751         (finish_struct_methods): Likewise.
3752         (check_for_override): Likewise.
3753         (warn_hidden): Likewise.
3754         (add_implicitly_declared_members): Defer creation of assignment
3755         operators.  Adjust call to add_method.
3756         (clone_function_decl): Adjust call to add_method.
3757         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
3758         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
3759         * decl.c (grok_special_member_properties): Don't set
3760         TYPE_HAS_ABSTRACT_ASSIGN_REF.
3761         * decl2.c (check_classfn): Adjust for
3762         changes to CLASSTYPE_METHOD_VEC.
3763         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
3764         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
3765         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
3766         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
3767         cp_finish_decl.
3768         * pt.c (check_explicit_specialization): Adjust for
3769         changes to CLASSTYPE_METHOD_VEC.
3770         (instantiate_class_template): Do not set
3771         TYPE_HAS_ABSTRACT_ASSIGN_REF.
3772         * ptree.c (cxx_print_type): Don't try to print
3773         CLASSTYPE_METHOD_VEC.
3774         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
3775         * search.c (lookup_field_r): Adjust for
3776         changes to CLASSTYPE_METHOD_VEC.
3777         (lookup_fnfields): Likewise.
3778         (lookup_conversion_operator): Likewise.
3779         (lookup_fnfields_1): Likewise.  Create assignment operators
3780         lazily.
3781         (look_for_overrides_here): Adjust for
3782         changes to CLASSTYPE_METHOD_VEC.
3783         (add_conversions): Likewise.
3784         * semantics.c (finish_member_declaration): Adjust call to add_method.
3785
3786 2004-07-15  Jason Merrill  <jason@redhat.com>
3787
3788         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
3789         references and pointers are compatible.
3790
3791 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
3792
3793         * decl.c (xref_basetypes): Refactor.
3794         * tree.c (copy_base_binfos): Replace with ...
3795         (copy_binfo): ... this. Deep copy the given binfo, (not the just
3796         bases of the given base).
3797         * cp-tree.h (copy_base_binfo): Remove.
3798         (copy_binfo): Declare.
3799
3800 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
3801
3802         * name-lookup.c (set_inherited_value_binding_p): Add class_type
3803         parameter.
3804         (get_class_binding): Adjust.
3805         (push_class_level_binding): Don't use set_inherited_value_binding_p.
3806
3807 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
3808
3809         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
3810         * decl.c (xref_basetypes): Set it here.
3811
3812         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
3813         Don't check for incomplete base.
3814         (get_vfield_name): Simplify while loop.
3815         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
3816
3817 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
3818
3819         * lex.c (cxx_make_type): Remove call to get_pointer_type.
3820
3821         * cp-tree.h (IDENTIFIER_VALUE): Remove.
3822         (BINFO_PUSHDECLS_MARKED): Likewise.
3823         (maybe_inject_for_scope_var): Likewise.
3824         (push_class_decls): Likewise.
3825         * name-lookup.h (push_class_binding): Remove.
3826         (innermost_non_namespace_value): New function.
3827         (outer_binding): Likewise.
3828         * class.c (add_method): Push bindings before adding to
3829         TYPE_METHODS.
3830         (restore_class_cache): Do not restore class_shadowed.
3831         (pushclass): Do not add USING_DECLs.  Do not call
3832         push_class_decls.
3833         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
3834         * decl.c (pushdecl): Use outer_binding.
3835         (poplevel): Set the scope for an out-of-scope for-loop declaration
3836         appropriately.
3837         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
3838         * name-lookup.c (new_class_binding): New function.
3839         (push_binding): Use it.
3840         (pushdecl): Use innermost_non_namespace_value.
3841         (maybe_inject_for_scope_var): Remove.
3842         (push_class_binding): Remove.
3843         (set_inherited_value_binding_p): New function.
3844         (get_class_binding): New function.
3845         (push_class_level_binding): Assert that the current_class_type is
3846         being defined.
3847         (outer_binding): New function.
3848         (innermost_non_namespace_value): Likewise.
3849         (lookup_name_real): Use outer_binding.
3850         (lookup_name_current_level): Ignore out-of-scope variables.
3851         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
3852         (lookup_template_class): Likewise.
3853         * search.c (dfs_push_type_decls): Remove.
3854         (dfs_push_decls): Likewise.
3855         (setup_class_bindings): Likewise.
3856         (lookup_field_1): Handle USING_DECLs from dependent scopes.
3857         (marked_pushdecls_p): Remove.
3858         (unmarked_pushdecls_p): Remove.
3859         (marked_identifiers): Remove.
3860         (setup_class_bindings): Remove.
3861         (dfs_push_type_decls): Remove.
3862         (dfs_push_decls): Remove.
3863         (push_class_decls): Remove.
3864
3865 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
3866
3867         PR c++/16518
3868         PR c++/16337
3869         * decl.c (grokvardecl): Make declspecs parameter const.
3870         (grokdeclarator): Likewise.  Adjust accordingly.
3871         * decl.h (grokdeclarator): Adjust declaration.
3872         * parser.c (cp_parser_init_declarator): Do not clear
3873         decl_specifiers->attributes.
3874
3875         * cp-tree.h (lang_identifier): Remove class_value.
3876         (IDENTIFIER_CLASS_VALUE): Remove.
3877         (pop_class_decls): Likewise.
3878         (init_search_processing): Likewise.
3879         * class.c (handle_using_decl): Use lookup_member, not
3880         IDENTIFIER_CLASS_VALUE.
3881         (restore_class_cache): New function, split out from ...
3882         (pushclass): ... here.  Do not call clear_identifier_class_values.
3883         (invalidate_class_lookup_cache): Do not clear
3884         IDENTIFIER_CLASS_VALUE.
3885         (popclass): Do not call pop_class_decls.
3886         (maybe_note_name_used_in_class): Do not save names looked up after
3887         the class is complete.  Use lookup_member, not
3888         IDENTIFIER_CLASS_VALUE.
3889         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
3890         * decl.c (cxx_init_decl_processing): Do not call
3891         init_search_processing.
3892         * method.c (do_build_copy_constructor): Remove unnecessary code.
3893         (do_build_assign_ref): Likewise.
3894         * name-lookup.c (pushdecl): Use lookup_member, not
3895         IDENTIFIER_CLASS_VALUE.
3896         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
3897         type_shadowed list.
3898         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
3899         (push_class_binding): Do not set it.
3900         (clear_identifier_class_values): Remove.
3901         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
3902         (store_binding): Do not save it.
3903         (pop_from_top_level): Do not restore it.
3904         * name-lookup.h (cxx_saved_binding): Remove class_value.
3905         (clear_identifier_class_values): Remove.
3906         * ptree.c (cxx_print_identifier): Do not print
3907         IDENTIFIER_CLASS_VALUE.
3908         * search.c (search_obstack): Remove.
3909         (push_stack_level): Remove.
3910         (pop_stack_level): Remove.
3911         (search_level): Remove.
3912         (search_stack): Remove.
3913         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
3914         (setup_class_bindings): Use IDENTIFIER_MARKED, not
3915         IDENTIFIER_CLASS_VALUE.
3916         (marked_identifiers): New variable.
3917         (push_class_decls): Clear IDENTIFIER_MARKED.
3918         (pop_class_decls): Don't call pop_search_level.
3919         (init_search_processing): Remove.
3920
3921 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
3922
3923         * cp-tree.h (get_aggr_typedef): Remove.
3924         * init.c (get_aggr_typedef): Likewise.
3925
3926         * name-lookup.c (push_class_level_binding): Simplify.
3927
3928 2004-07-12  Andrew Pinski  <apinski@apple.com>
3929
3930         PR c++/16475
3931         Revert:
3932         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
3933                 PR c++/16276
3934                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3935                 is not public.
3936
3937 2004-07-12  Eric Christopher  <echristo@redhat.com>
3938
3939         * parser.c (cp_parser_class_head): Remove unused variable.
3940
3941 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3942
3943         * decl.c (grok_op_properties): Reject [de-]allocation functions
3944         declared in a namespace, or declared as static.
3945
3946 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
3947
3948         * cp-tree.h (make_binfo): Remove.
3949         * decl.c (xref_basetypes): Use make_tree_binfo directly.
3950         * tree.h (copy_base_binfos): Likewise.
3951         (make_binfo): Remove.
3952
3953         * call.c (build_user_type_conversion_1, build_new_op,
3954         check_constructor_callable, build_temp,
3955         perform_direct_initialization_of_possible): Pass type directly to
3956         lookup_fnfields & build_special_member_call.
3957         (build_special_member_call): Accept a type, and complete it.
3958         * class.c (finish_stuct_bits): Copy the BINFOs here.
3959         * cvt.c (ocp_convert): Pass type directly to
3960         build_special_member_call.
3961         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
3962         (xref_basetypes): Allocate the binfo here. Adjust.
3963         * init.c (build_init, build_new_1): Pass type directly to
3964         build_special_member_call.
3965         * lex.c (cxx_make_type): Do not allocate binfo here.
3966         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
3967         * parser.c (cp_parser_class_head): Always call xref_basetypes.
3968         * pt.c (instantiate_class_template): Likewise. Inhibit access
3969         checking for template friends.
3970         * ptree.c (cxx_print_type): Adjust record printing.
3971         * search.c (lookup_base): When taking a type, complete it before
3972         looking for a binfo.
3973         (lookup_member): Delay completing a type.
3974         (push_class_decls): Don't walk an incomplete type.
3975         (lookup_conversions): Likewise.
3976         * semantics.c (finish_stmt_expr_expr): Pass type directly to
3977         build_special_member_call.
3978         * tree.c (copy_base_binfos): Adjust.
3979         (make_binfo): Likewise.
3980         * typeck.c (build_modify_expr): Pass type directly to
3981         build_special_member_call.
3982         * typeck2.c (process_init_constructor): Check a binfo exists.
3983         (build_m_component_ref): Allow accessing an incomplete type.
3984         (build_functional_cast): Pass type directly to
3985         build_special_member_call.
3986
3987 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3988
3989         PR c++/2204
3990         * config-lang.in (gtfiles): Add typeck2.c.
3991         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
3992         gt-cp-typeck2.h.
3993         * cp-tree.h: Decla