OSDN Git Service

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