PR c++/19787
[official-gcc.git] / gcc / cp / ChangeLog
blob01d7f75dbd810f76f9dd036c24cad7df4c352d71
1 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
3         PR c++/19787
4         * call.c (initialize_reference): Robustify.
6         PR ++/19732
7         * decl.c (grokdeclarator): Check for invalid use of destructor
8         names.
10         PR c++/19762
11         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
12         names with invalid types.
14         PR c++/19826
15         * parser.c (cp_parser_direct_declarator): Allow type-dependent
16         expressions as array bounds.
18         PR c++/19739
19         * parser.c (cp_parser_attributes_list): Allow empty lists.
21 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
23         PR c++/19733
24         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
25         (check_bases): Give warnings about a base class with a
26         non-virtual destructor, even if it is implicit.
27         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
28         (maybe_warn_about_overly_private_class): Don't use
29         TYPE_HAS_DESTRUCTOR.
30         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
31         (check_for_override): Give it external linkage.
32         (add_implicitly_declared_members): Generate destructors lazily.
33         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
34         TYPE_HAS_DESTRUCTOR.
35         (check_bases_and_members): Call check_methods before
36         check_field_decls.
37         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
38         TYPE_HAS_DESTRUCTOR.
39         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
40         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
41         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
42         (lang_type_class): Add lazy_destructor.
43         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
44         (CLASSTYPE_DESTRUCTORS): Robustify.
45         (TYPE_HAS_DESTRUCTOR): Remove.
46         (check_for_override): Declare.
47         (build_vbase_delete): Remove.
48         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
49         expressions.
50         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
51         * except.c (dtor_nothrow): Lazily create destructors if necessary.
52         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
53         * init.c (build_delete): Lazily create destructors, if necessary.
54         (build_vbase_delete): Remove.
55         * method.c (locate_dtor): Simplify.
56         (implicitly_declare_fn): Add support for destructors.
57         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
58         necessary.
59         * pt.c (check_explicit_specialization): Don't use
60         TYPE_HAS_DESTRUCTOR.
61         (instantiate_class_template): Likewise.
62         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
63         * rtti.c (emit_support_tinfos): Robustify.
64         * search.c (lookup_fnfields_1): Lazily create destructors.
65         * typeck.c (build_class_member_access_expr): Remove
66         PSEUDO_DTOR_EXPR handling.
67         (lookup_destructor): Likewise.
69 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
71         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
72         copyright.
74 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
76         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
77         on boolean variables.
78         (cp_lexer_stop_debugging): Likewise.
80 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
82         PR c++/17401
83         * parser.c (cp_parser_pure_specifier): Emit a specific error
84         message with an invalid pure specifier.
85         * decl2.c (grok_function_init): Remove.
86         (grokfield): An initializer for a method is a always a pure
87         specifier.
89 2005-02-02  Matt Austern  <austern@apple.com>
91         PR c++/19628
92         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
93         * parser.c (cp_parser_postfix_expression): Accept function call in
94         constant expression if builtin_valid_in_constant_expr_p is true
95         for that function. 
96         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
97         * semantics.c (finish_id_expression): Accept function call in constant
98         expression if builtin_valid_in_constant_expr_p is true for that
99         function. 
100         * tree.c (builtin_valid_in_constant_expr_p): New.
101         
102 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
104         PR c++/17413
105         * pt.c (check_instantiated_args): Improve error message.
106         Fix logic when to print its second part.
108 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
110         * cp-tree.h (complete_type_or_else): Remove macro.
111         (complete_type_or_diagnostic): Rename to complete_type_or_else
112         and remove last argument.
113         * typeck.c (complete_type_or_diagnostic): Rename to
114         complete_type_or_else and remove last argument.
116 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
118         * cp-tree.h (commonparms): Remove prototype.
119         (convert_arguments): Likewise.
120         (PFN_FROM_PTRMEMFUNC): Remove.
121         * typeck.c (commonparms): Make static.
122         (convert_arguments): Add prototype. Make static.
123         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
125 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
127         * parser.c (cp_parser_primary_expression): Don't complain about
128         floating-point literals in integral constant expressions when
129         !pedantic.
131 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
133         * parser.c (cp_parser_template_id): Revert comment patch too.
134         
135         PR c++/18757
136         PR c++/19366
137         PR c++/19499
138         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
139         Issue an error when creating the template id.
140         * pt.c (fn_type_unification): Return early if the explicit
141         template arg list is an error_mark_node.
143 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
145         * decl.c (build_enumerator): Do not issue duplicate error messages
146         about invalid enumeration constants.
147         * parser.c (cp_parser_non_integral_constant_expression): Always
148         set parser->non_integral_constant_expression_p.
149         (cp_parser_primary_expression): Add cast_p parameter.  Issue
150         errors about invalid uses of floating-point literals in
151         cast-expressions.
152         (cp_parser_postfix_expression): Add cast_p parameter.
153         (cp_parser_open_square_expression): Pass it.
154         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
155         (cp_parser_unary_expression): Likewise.
156         (cp_parser_new_placement): Pass it.
157         (cp_parser_direct_new_declarator): Likewise.
158         (cp_parser_new_initializer): Likewise.
159         (cp_parser_cast_expression): Add cast_p parameter.
160         (cp_parser_binary_expression): Likewise.
161         (cp_parser_question_colon_clause): Likewise.
162         (cp_parser_assignment_expression): Likewise.
163         (cp_parser_expression): Likewise.
164         (cp_parser_constant_expression): If an integral constant
165         expression is invalid, return error_mark_node.
166         (cp_parser_expression_statement): Pass cast_p.
167         (cp_parser_condition): Likewise.
168         (cp_parser_iteration_statement): Likewise.
169         (cp_parser_jump_statement): Likewise.
170         (cp_parser_mem_initializer): Likewise.
171         (cp_parser_template_argument): Likewise.
172         (cp_parser_parameter_declaration): Likewise.
173         (cp_parser_initializer): Likewise.
174         (cp_parser_throw_expression): Likewise.
175         (cp_parser_attribute_list): Likewise.
176         (cp_parser_simple_cast_expression): Likewise.
177         (cp_parser_functional_cast): Likewise.
178         (cp_parser_late_parsing_default_args): Likewise.
179         (cp_parser_sizeof_operand): Save/restore
180         non_integral_constant_expression_p.
182 2005-01-31  Mike Stump  <mrs@apple.com>
184         * parser.c (cp_lexer_new_main): Get the first token, first, before
185         doing anything.
187 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
189         * decl.c (start_decl): Add missing parentheses.
191 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
193         PR c++/19555
194         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
195         * decl.c (duplicate_decls): Do not discard
196         DECL_IMPLICIT_INSTANTIATION when merging declarations.
197         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
198         variables that do not have DECL_USE_TEMPLATE.
200         PR c++/19395
201         * decl.c (grokdeclarator): Refactor code so that qualified names
202         are never allowed as the declarator in a typedef.
204         PR c++/19367
205         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
206         builtin declarations.
208         PR c++/19457
209         * call.c (convert_like_real): Inline call to
210         dubious_conversion_warnings here.
211         * cp-tree.h (dubious_conversion_warnings): Remove.
212         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
213         setting TREE_NEGATED_INT.
214         * typeck.c (dubious_conversion_warnings): Remove.
216         PR c++/19349
217         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
218         memory. 
220 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
222         PR c++/19253
223         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
224         tentative parses.
226         PR c++/19667
227         * pt.c (redeclare_class_template): Robustify.
229 2005-01-27  Steven Bosscher  <stevenb@suse.de>
231         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
232         instead of SWITCH_EXPR ones.
233         * pt.c (tsubst_expr): Likewise.
234         * semantics.c (begin_switch_stmt, finish_switch_cond,
235         finish_switch_stmt): Likewise.
237 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
239         PR c++/18370
240         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
242 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
244         * class.c (abort_fndecl_addr): New variable.
245         (build_vtbl_initializer): If we have a pure virtual function
246         share the abort function's address.
247         Include gt-cp-class.h at the end.
248         * config-lang.in (gtfiles): Add cp/class.c.
250 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
252         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
253         (pp_cxx_function_definition): Make static.
254         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
255         (pp_cxx_function_definition): Likewise.
257 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
259         * name-lookup.c (print_binding_level): Make static.
260         (constructor_name_full): Make static inline.
261         (current_decl_namespace): Make static.
262         * name-lookup.h (constructor_name_full): Remove prototype.
263         (print_binding_level): Likewise.
264         (current_decl_namespace): Likewise.
266 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
268         * decl.h (debug_bindings_indentation): Remove.
270 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
272         * typeck.c: Fix a comment typo.
274 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
276         PR c++/19208
277         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
278         at least once.
279         (tsubst): Use fold_decl_constant_value in place of a bare call to
280         integral_constant_value.
282 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
284         * typeck.c (more_qualified_p): Remove.
285         * cp-tree.h: Remove the corresponding prototype.
287 2005-01-19  Matt Austern  <austern@apple.com>
289         * typeck.c (comptypes): Handle return code from objc_comptypes
290         correctly.
291         
292 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
294         * cp-tree.h, name-lookup.h: Remove unused prototypes.
296 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
298         PR c++/19375
299         * semantics.c (finish_id_expression): Disable access checking for
300         already lookuped FIELD_DECL.
302 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
304         * decl.c (delete_block): Remove.
305         * cp-tree.h: Remove the corresponding prototype.
307         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
308         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
309         Remove.
310         * cp-tree.h: Remove the corresponding prototypes.
312         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
313         cp_update_decl_after_saving, name_p): Remove.
314         * cp-tree.h: Remove the corresponding prototypes.
316 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
318         PR c/19472
319         * semantics.c (finish_asm_stmt): Strip nops off
320         input memory operands.
322 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
324         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
325         typeck2.c: Update copyright.
327 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
329         * class.c (get_enclosing_class): Remove.
330         * cp-tree.h: Remove the corresponding prototypes.
332         * cvt.c (convert_lvalue): Remove.
333         * cp-tree.h: Remove the corresponding prototype.
335         * pt.c (tinst_for_decl): Remove.
336         * cp-tree.h: Remove the corresponding prototypes.
338         * tree.c (hash_chainon): Remove.
339         * cp-tree.h: Remove the corresponding prototypes.
341 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
343         PR c++/19263
344         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
345         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
347 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
349         * Make-lang.in (cp-warn): Don't append $(WERROR).
351 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
353         * cp-tree.h: Fix a comment typo.
355 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
357         PR c++/19298
358         * pt.c (tsubst_qualified_id): Call convert_from_reference.
360 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
362         PR c++/19244
363         * class.c (add_implicitly_declared_members): Remove dead code.
364         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
365         DECL_CONSTRUCTOR_P.
366         (grokdeclarator): Adjust calls to grokfndecl.
367         * method.c (implicitly_declare_fn): Improve documentation.
368         * parser.c (cp_parser_direct_declarator): Do not consider a
369         function to be a constructor if the containing class was
370         originally anonymous.
372 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
374         PR c++/17154
375         * search.c (lookup_field_1): Handle using declaration in
376         class template partial specialization.
378 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
380         PR c++/19258
381         * pt.c (push_access_scope): Handle friend defined in class.
382         (pop_access_scope): Likewise.
384 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
386         PR c++/19270
387         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
388         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
389         array-new handling code.  Use build_x_binary_op.
391 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
393         PR c++/19030
394         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
395         * name-lookup.h (push_scope): Return pushed scope, not flag.
396         * name-lookup.c (push_scope): Return scope that should be popped,
397         not a flag.
398         * decl.c (start_decl): Adjust.
399         (grokfndecl): Adjust scope push and pop.
400         * decl2.c (check_classfn): Likewise.
401         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
402         cp_parser_init_declarator, cp_parser_direct_declarator,
403         cp_parser_class_specifier, cp_parser_class_head,
404         cp_parser_lookup_name,
405         cp_parser_constructor_declarator_p): Likewise.
406         * pt.c (instantiate_class_template,
407         resolve_typename_type): Likewise.
409 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
411         PR c++/14136
412         * parser.c (cp_parser_unqualified_id): Do not issue error message
413         for typedef-name as destructor declarator when performing an
414         uncommitted tentative parse.
416 2005-01-01  Steven Bosscher  <stevenb@suse.de>
418         PR middle-end/17544
419         * decl.c (finish_function): Fix comment.  Annotate the compiler
420         generated return with the current file name and line 0.
422 2004-12-31  Richard Henderson  <rth@redhat.com>
424         PR middle-end/17799
425         * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
426         * class.c (build_vtable): Don't conditionallize setting it
427         based on DWARF2_DEBUG.
428         (layout_class_type): Set DECL_IGNORED_P.
429         * decl2.c (get_guard): Likewise.
430         * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
431         * tree.c (build_local_temp): Likewise.
433 2004-12-30  Mark Mitchell  <mark@codesourcery.com>
435         * cp-tree.h (cp_declarator): Split "name" field into
436         qualifying_scope and unqualified_name.
437         * decl.c (get_scope_of_declarator): Adjust accordingly.
438         (grokdeclarator): Likewise.
439         * decl2.c (grokfield): Likewise, and adjust call to
440         do_class_using_decl.
441         * name-lookup.c (do_class_using_decl): Split "decl" into
442         "scope" and "name".  Remove unnecessary code.
443         * name-lookup.h (do_class_using_decl): Adjust declaration.
444         * parser.c (make_id_declarator): Split "id" into qualifying_scope
445         and unqualified_name.
446         (cp_parser_using_declaration): Adjust call to do_class_using_decl.
447         (cp_parser_direct_declarator): Adjust to handle the fact that
448         cp_parser_declarator_id no longer returns a SCOPE_REF.
449         (cp_parser_direct_declarator): Likewise.
450         (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
451         names.
452         (cp_parser_member_declaration): Adjust call to make_id_declarator.
453         (cp_parser_check_declarator_template_parameters): Do not expect a
454         SCOPE_REF. 
455         
456         * decl.c (duplicate_decls): Call ggc_free on declarations we will
457         not be needing any longer.
459         PR c++/19190
460         * cvt.c (convert_to_void): Do not use STRIP_NOPs.
462 2004-12-28  Richard Henderson  <rth@redhat.com>
464         PR inline-asm/15740
465         * semantics.c (finish_asm_stmt): Resolve asm names.  Validate input
466         constraints.  Mark memory inputs addressable.
468 2004-12-27  Jason Merrill  <jason@redhat.com>
470         * decl.c (expand_static_init): Don't use shortcut if
471         targetm.relaxed_ordering.
473 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
475         PR c++/19149
476         * decl.c (check_tag_decl): Robustify.
478 2004-12-23  Mark Mitchell  <mark@codesourcery.com>
480         PR c++/17595
481         * parser.c (cp_parser_error): Issue better messages about
482         #pragma in locations where it is not permitted.
484         PR c++/17413
485         * pt.c (check_instantiated_args): Remove bogus SFINAE code.
487         * cvt.c (convert_to_void): Fix typo in comment.
489 2004-12-23  Alexandre Oliva  <aoliva@redhat.com>
491         PR c++/18962
492         * pt.c (check_explicit_specialization): Use the argument list from
493         the definition in a template function specialization definition.
495 2004-12-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
497         PR c++/18733
498         * pt.c (check_explicit_specialization): Use special logic to validate
499         befriended specializations.
501 2004-12-22  Mark Mitchell  <mark@codesourcery.com>
503         * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
505         PR c++/18464
506         * call.c (build_this): In templates, do not bother with
507         build_unary_op.
508         * typeck.c (unary_complex_lvalue): In a template, always refuse
509         simplifications. 
511         PR c++/18492
512         * cp-gimplify.c (cp_genericize): Relax assertion.
514         PR c++/11224
515         * cvt.c (convert_to_void): Warn about unused values.
517         PR c++/18257
518         * rtti.c (emit_support_tinfos): On systems without weak symbols,
519         emit the runtime library type-info objects as non-COMDAT. 
521 2004-12-21  Mark Mitchell  <mark@codesourcery.com>
523         PR c++/18378
524         * call.c (convert_like_real): Do not permit the use of a copy
525         constructor to copy a packed field.
527         PR c++/19063
528         * decl.c (grokdeclarator): Return error_mark_node, not
529         void_type_node, to indicate errors.
530         * parser.c (cp_parser_template_parameter_list): Robustify.
531         (cp_parser_template_parameter): Likewise.
533         PR c++/19034
534         * tree.c (cp_tree_equal): Handle OVERLOAD.
536 2004-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
538         * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
539         * name-lookup.c (pushdecl_class_level): Likewise.
541 2004-12-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
543         * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
545 2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
547         PR c++/18984
548         * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
549         check to see if contains the pointer.  Insert the statement before
550         returning.
552 2004-12-21  Nathan Sidwell  <nathan@codesourcery.com>
554         PR c++/14075
555         * decl.c (check_initializer): Check string initializer of array is
556         not parenthesized.
557         * cp-tree.h (PAREN_STRING_LITERAL_P): New.
558         * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
559         * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
561         * cp-tree.def (TEMPLATE_TYPE_PARM,
562         BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder 
563         for better code efficiency.
564         * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
565         (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
566         (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
567         INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
568         CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
569         TYPE_PTROBV_P): Likewise. 
571         PR c++/18975
572         * method.c (do_build_copy_constructor): Refactor. Don't const
573         qualify a mutable field.
574         (do_build_assign_ref): Likewise.
576 2004-12-20  Matt Austern <austern@apple.com>
578         PR c++/19044
579         * decl.c (make_rtl_for_nonlocal_decl): Use
580         set_builtin_user_assembler_name.
581         
582 2004-12-19  Mark Mitchell  <mark@codesourcery.com>
584         * cp-tree.h (note_decl_for_pch): New function.
585         * class.c (build_clone): Call note_decl_for_pch.
586         * semantics.c (finish_member_declaration): Likewise.
587         (note_decl_for_pch): New function.
589 2004-12-17  Steven Bosscher  <stevenb@suse.de>
591         * init.c (build_zero_init): max_index is the number of
592         elements, minus 1.
594 2004-12-17  Nathan Sidwell  <nathan@codesourcery.com>
596         PR c++/18721
597         * class.c (add_method): Do not push conversion operators into a
598         binding level.
600         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
601         * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
603 2004-12-16  Nathan Sidwell  <nathan@codesourcery.com>
605         PR c++/18905
606         * cp-tree.h (integral_constant_value): Declare.
607         * call.c (null_ptr_cst_p): Use integral_constant_value, not
608         decl_constant_value.
609         (convert_like_real): Likewise.
610         * class.c (check_bitfield_decl): Likewise.
611         * cvt.c (ocp_convert): Likewise.
612         (convert): Remove unnecessary decl_constant_value call.
613         * decl.c (compute_array_index_type): Use integral_constant_value,
614         not decl_constant_value.
615         (build_enumerator): Likewise.
616         * decl2.c (grokfield): Likewise.
617         * init.c (decl_constant_value): Simplify.
618         (integral_constant_value): New.
619         * pt.c (fold_decl_constant_value): Use integral_constant_value,
620         remove subsequent check.
621         (tsubst): Use integral_constant_value, not decl_constant_value.
622         (tsubst_copy, unify): Likewise.
623         * typeck.c (decay_conversion): Likewise.
624         (build_compound_expr): Remove unnecessary decl_constant_value
625         calls.
626         (build_static_cast_1, build_reinterpret_cast_1):
627         (convert_for_assignment): Remove comment about not calling
628         decl_constant_value.
630 2004-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
632         PR c++/18825
633         * pt.c (instantiate_class_template): Set input_location for
634         friend function.
635         (tsubst_friend_function): Don't set input_location here.
636         Make sure the context is complete if necessary.
638 2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>
640         PR c++/18981
641         * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
642         flag setting.
644 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
646         PR c++/18738
647         * decl.c (make_typename_type): Do not handle namespace-scoped
648         names here.
649         (tag_name): Handle typename_type.
650         (check_elaborated_type_specifier): Handle typenames.
651         * parser.c (cp_parser_diagnose_invalid_type_name): Improve
652         comment.
653         (cp_parser_elaborated_type_specifier): Use
654         cp_parser_diagnose_invalid_type_name.
656 2004-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
658         PR c++/18965
659         * init.c (build_zero_init): If the max_index is 0, there is no
660         need to create a RANGE_EXPR.
662 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
664         PR c++/18793
665         * cp-objcp-common.c (cp_expr_size): Loosen assertion.
667 2004-12-14  Nathan Sidwell  <nathan@codesourcery.com>
669         PR c++/18949
670         * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
671         REFERENCE_REF_P is dereferencing a reference type.
672         * typeck.c (build_static_cast): Convert from reference even in a
673         template.
674         (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
676 2004-12-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
678         * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
679         (cp_parser_name_lookup_error): Use it.
680         (cp_parser_check_for_invalid_template_id): Likewise.
681         (cp_parser_skip_to_closing_parenthesis): Likewise.
682         (cp_parser_nested_name_specifier_opt): Likewise.
683         (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
684         (cp_parser_parameter_declaration_list): Likewise.
685         (cp_parser_parameter_declaration): Likewise.
686         (cp_parser_template_name): Let cp_parser_simulate_error perform
687         the checking.
688         (cp_parser_committed_to_tentative_parse): Remove.
690 2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
692         PR c++/18968
693         * class.c (build_base_path): Convert the zero constant to the correct
694         type when comparing.
696 2004-12-13  Mark Mitchell  <mark@codesourcery.com>
698         PR c++/18925
699         * class.c (layout_class_type): Determine the visibility of static
700         data members.
702 2004-12-12  Roger Sayle  <roger@eyesopen.com>
704         PR middle-end/12454
705         * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
706         condition is a constant and the unexecuted clause is empty.
708 2004-12-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
710         PR c++/18731
711         * parser.c (cp_parser_class_head): Reject typedef-name in class head.
713 2004-12-09  Matt Austern  <austern@apple.com>
715         PR c++/18514
716         * name-lookup.c (do_nonmember_using_decl): A real function
717         declaration takes precedence over an anticipated declaration.
718         
719 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
721         * parser.c (cp_parser_member_declaration): Fix comment typo.
723 2004-12-09  Alexandre Oliva  <aoliva@redhat.com>
725         PR c++/18757
726         * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
727         if parsing failed.
729 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
731         PR c++/18073
732         * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
734 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
736         PR c++/16681
737         * init.c (build_zero_init): Build a RANGE_EXPR for an array
738         initializer.
740 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
742         * typeck.c: Remove DOS line endings.
744 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
746         PR c++/18100
747         * decl.c (lookup_and_check_tag): Diagnose nested class with 
748         the same name as enclosing class.
750 2004-12-08  Nathan Sidwell  <nathan@codesourcery.com>
752         PR c++/18803
753         * cp-tree.h (REFERENCE_REF_P): New.
754         (CPTI_TYPE_INFO_TYPE): Rename to ...
755         (CPTI_CONST_TYPE_INFO_TYPE): ... here.
756         (CPTI_TYPE_INFO_REF_TYPE): Remove.
757         (type_info_type_node): Rename to ...
758         (const_type_info_type_node): ... here.
759         (type_info_ref_type): Remove.
760         * call.c (build_user_type_conversion): Reformat.
761         (resolve_args): Do not convert_from_reference.
762         (build_object_call): Call convert_from_reference.
763         (prep_operand): Do not convert_from_reference.
764         (build_new_method_call): Likewise.
765         * class.c (build_vfield_ref): Likewise.
766         * cvt.c (convert_to_reference): Likewise.
767         (convert_from_reference): Build INDIRECT_REF here, not with
768         build_indirect_ref.
769         (convert_force): Do not convert_from_reference.
770         (build_expr_type_conversion): Likewise.
771         * decl.c (grok_reference_init): Likewise.
772         * decl2.c (delete_sanity): Likewise.
773         * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
774         * init.c (build_dtor_call): Do not convert_from_reference.
775         * parser.c (cp_parser_template_argument): Unwrap indirected
776         reference. Allow TEMPLATE_PARM_INDEX as an object parm.
777         * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
778         convert_from_reference, if indicated.
779         <case CALL_EXPR>: Do not convert_from_reference.
780         <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
781         (tsubst_initializer_list): Do not convert_from_reference.
782         * rtti.c (init_rtti_processing): Adjust node creation.
783         (throw_bad_typeid): Use const_type_info_type_node.
784         Do not convert_from_reference.
785         (typeid_ok_p): Use const_type_info_type_node.
786         (build_typeid, get_typeid): Always return type_info typed node.
787         (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
788         * semantics.c (finish_stmt_expr_expr): Do not
789         convert_from_reference.
790         (finish_id_expression): Convert_from_reference as appropriate.
791         * typeck.c (decay_conversion): Do not convert_from_reference.
792         (finish_class_member_access_expr): Likewise.
793         (build_indirect_ref): Use POINTER_TYPE_P.
794         (convert_arguments): Do not convert_from_reference.
795         (build_modify_expr): Likewise.
796         (convert_for_initialization): Likewise.
797         * typeck2.c (build_x_arrow): Likewise.
799 2004-12-07  Ziemowit Laski  <zlaski@apple.com>
801         * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
802         field to 'objc_info'.
804 2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
806         * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
808 2004-12-07  Roger Sayle  <roger@eyesopen.com>
810         * name-lookup.c (leave_scope): We only need to update
811         class_binding_level when leaving a class scope.
813 2004-12-06  Ziemowit Laski  <zlaski@apple.com>
815         * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
817 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
819         PR c++/17011, c++/17971
820         * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
821         invalid field.
822         (tsubst_copy_and_build) <COMPONENT_REF case>: Check
823         error_mark_node after member substitution.
824         * semantics.c (finish_id_expression): Call
825         finish_non_static_data_member for non-dependent FIELD_DECL.
827 2004-12-03  Nathan Sidwell  <nathan@codesourcery.com>
829         PR c++/18782
830         * decl.c (grokdeclarator): Make sure class in pointer to member is
831         not a namespace.
833 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
835         PR c++/18318
836         * parser.c (cp_parser_new_type_id): Move array size expression
837         checks from here ...
838         * init.c (build_new): ... to here.
840 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
842         PR c++/18758
843         * parser.c (cp_parser_class_head): Return NULL_TREE when
844         push_template_decl fails.  Update comment.
846 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
848         PR c++/15664, c++/18276
849         * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize.  Correctly
850         tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
852 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
854         PR c++/18123
855         * parser.c (cp_parser_type_specifier): Catch template declaration
856         of enum.
858 2004-12-01  Matt Austern  <austern@apple.com>
860         * name-lookup.c (namespace_binding): Omit alias check for global
861         namespace.
863 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
865         PR c++/18729
866         * parser.c (cp_parser_class_name): Check decl's type is not
867         error_mark_node.
869         PR c++/17431
870         * call.c (standard_conversion): Add FLAGS parameter. Do not allow
871         derived to base conversion when checking constructor
872         accessibility.
873         (implicit_conversion): Pass FLAGS to standard_conversion.
874         (check_constructir_callable): Disallow conversion functions.
876 2004-11-30  Kazu Hirata  <kazu@cs.umass.edu>
878         * parser.c: Fix comment typos.
880 2004-11-27  Mark Mitchell  <mark@codesourcery.com>
882         PR c++/18368
883         * parser.c (cp_parser_check_for_definition_in_return_type): Take
884         the defined type as a parameter, and inform the user about the
885         possibility of a missing semicolon.
886         (cp_parser_explicit_instantiation): Adjust call to
887         cp_parser_check_for_definition_in_return_type.
888         (cp_parser_init_declarator): Likewise.
889         (cp_parser_member_declaration): Likewise.
891         PR c++/18674
892         * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
893         typename from comments.
894         * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
895         (TYPENAME_IS_CLASS_P): Likewise.
896         (make_typename_type): Change prototype.
897         * decl.c (struct_typename_info): New type.
898         (typename_compare): Expect the second argument to be a
899         typename_info, not a tree.
900         (build_typename_type): Add tag_type parameter.  Do not create a
901         new type until necessary.
902         (make_typename_type): Add tag_type parameter.
903         * error.c (TYPENAME_TYPE): Print tags other than "typename" if
904         appropriate.
905         * friend.c (make_friend_class): Adjust call to make_typename_type.
906         * parser.c (cp_parser_make_typename_type): Likewise.
907         (cp_parser_primary_expression): Adjust call to
908         cp_parser_lookup_name.
909         (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
910         (cp_parser_class_or_namespace_name): Likewise.
911         (cp_parser_postfix_expression): Adjust calls to
912         make_typename_type.
913         (cp_parser_mem_initializer_id): Adjust calls to
914         cp_parser_class_name.
915         (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
916         (cp_parser_template_name): Likewise.
917         (cp_parser_template_argument): Likewise.
918         (cp_parser_type_name): Adjust call to cp_parser_class_name.
919         (cp_parser_elaborated_type_specifier): Adjust calls to
920         make_typename_type and cp_parser_lookup_name.
921         (cp_parser_namespace_name): Likewise.
922         (cp_parser_class_name): Replace type_p parameter with tag_type.
923         Adjust calls to make_typename_type and cp_parser_lookup_name.
924         (cp_parser_class_head): Adjust calls to cp_parser_class_name.
925         (cp_parser_base_specifier): Likewise.
926         (cp_parser_lookup_name): Replace is_type parameter with tag_type.
927         Adjust calls to make_typename_type and lookup_qualified_name.
928         (cp_parser_lookup_name_simple): Adjust call to
929         cp_parser_lookup_name.
930         (cp_parser_constructor_declarator_p): Adjust call to
931         cp_parser_class_name.
932         * pt.c (convert_template_argument): Adjust all to
933         make_typename_type.
934         (tsubst_decl): Do not pre-substitute the type of the declaration.
935         (tsubst): Hand off declarations more quickly.  Adjust call to
936         make_typename_type. 
938         PR c++/18512
939         * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
941 2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
943         PR c/7544
944         * Make-lang.in (cp/decl2.o): Update dependencies.
945         * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
947 2004-11-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
949         PR c++/18652
950         * name-lookup.c (pushtag): Change return type to tree.
951         * cp-tree.h (pushtag): Adjust declaration.
952         * decl.c (xref_tag, start_enum): Use return value of pushtag.
953         * pt.c (push_template_decl_real): Return immediately if
954         pushdecl_namespace_level returns error_mark_node.
956 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
958         * pt.c: Fix a comment typo.
960 2004-11-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
962         Friend class name lookup 4/n
963         * class.c (pushclass): Don't call cxx_remember_type_decls.
964         * cp-tree.h (clear_anon_tags): Remove declaration.
965         * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
966         * name-lookup.c (binding_entry_free, binding_table_free): Comment
967         out functions.
968         (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
969         binding_table_remove_anonymous_types, cxx_remember_type_decls,
970         bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
971         lookup_tag_reverse): Remove
972         (begin_scope, leave_scope, kept_level_p, print_binding_level):
973         Don't use type_decls field in cp_binding_level.
974         (maybe_process_template_type_declaration, pushtag): Set
975         CLASSTYPE_NESTED_UTDS directly.
976         * name-lookup.h (binding_table_remove_anonymous_types,
977         cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
978         declaration.
979         (cp_binding_level): Remove type_decls field.
981 2004-11-26  Kazu Hirata  <kazu@cs.umass.edu>
983         * typeck.c: Fix a comment typo.
985 2004-11-25  Mark Mitchell  <mark@codesourcery.com>
987         PR c++/18445
988         * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
989         unknown_type as non matching.  Tidy up.
990         * pt.c (build_non_dependent_expr): Do not build a
991         NON_DEPENDENT_EXPR for a VAR_DECL.
993         PR c++/18001
994         * cp-tree.h (lvalue_or_else): Remove declaration.
995         * tree.c (lvalue_or_else): Remove.
996         * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
997         (build_modify_expr): Likewise.
999         PR c++/18625
1000         * decl.c (duplicate_decls): Return error_mark_node on error, as
1001         specified.
1003         PR c++/18466
1004         * decl.c (grokvardecl): Keep track of whether or not a there was
1005         explicit qualification.
1006         * name-lookup.c (set_decl_namespace): Complain about explicit
1007         qualification of a name within its own namespace.
1009         PR c++/18545
1010         * typeck.c (check_return_expr): Robustify.
1012 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1014         Friend class name lookup 3/n, PR c++/3332
1015         * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1016         (lookup_type_scope): Don't deal with name from user declaration
1017         specially.
1018         * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1019         * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1020         pop_inner_scope.
1022 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1024         Friend class name lookup 2/n, PR c++/14513, c++/15410
1025         * name-lookup.c (lookup_name_real): Simplify.
1026         (lookup_type_scope): Add SCOPE parameter.  Handle friend class
1027         lookup.
1028         * name-lookup.h (tag_scope): New enum type.
1029         (lookup_type_scope): Adjust declaration.
1030         * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1031         Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1032         (start_enum): Likewise.  Add assertion test that NAME is 
1033         IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
1034         case of error.
1035         * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1036         * parser.c (cp_parser_elaborated_type_specifier,
1037         cp_parser_class_head): Adjust call to xref_tag.
1038         * pt.c (lookup_template_class, instantiate_class_template):
1039         Likewise.
1040         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1041         tinfo_base_init, emit_support_tinfos): Likewise.
1043 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
1045         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1047 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
1049         PR c++/17473
1050         * name-lookup.c (supplement_binding): Do not allow typedefs to be
1051         redefined in class scope.
1053         PR c++/18285
1054         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1055         redefinitions of builtin types other that "bool" or "wchar_t".
1057 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1059         * decl.c (cxx_init_decl_processing): Don't clear
1060         flag_inline_functions.
1062 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
1064         * pt.c (tsubst_function_type): Do not permit function types which
1065         return arrays or functions.
1067         PR c++/18586
1068         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1070         PR c++/18530
1071         * cp-tree.h (CTOR_NAME): Remove.
1072         (DTOR_NAME): Remove.
1073         * decl.c (initialize_predefined_identifiers): Add spaces to the
1074         end of constructor and destructor names.
1076 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1078         PR c++/8929
1079         * decl.c (start_decl): Check for invalid specialization headers.
1081 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
1083         PR c++/16882
1085         * call.c (standard_conversion): Move check for conversions between
1086         vector pointers...
1087         * typeck.c (ptr_reasonably_similar): ... here.
1089 2004-11-23  Ben Elliston  <bje@au.ibm.com>
1091         * cp-tree.h (context_as_string): Remove extern.
1092         * error.c (context_as_string): Remove.
1094         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
1095         * lex.c (cp_type_qual_from_rid): Remove.
1097         * cp-tree.h (do_poplevel): Remove extern.
1098         (check_multiple_declarators): Likewise.
1099         * semantics.c (do_poplevel): Make static.
1100         (check_multiple_declarators): Remove.
1102         * cp-tree.h (check_final_overrider): Remove extern.
1103         * search.c (check_final_overrider): Make static.
1105         * cp-tree.h (build_artificial_parm): Remove extern.
1106         * decl2.c (build_artificial_parm): Make static.
1108 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1110         PR c++/18354
1111         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
1112         Make sure the result is always a rvalue.
1114 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1116         * decl.c (start_preparsed_function): Call check_function_type even
1117         in templates.
1118         (require_complete_types_for_parms): Skip dependent types.
1119         (check_function_type): Likewise.
1121 2004-11-16  Steven Bosscher  <stevenb@suse.de>
1123         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
1124         * search.c: Don't include it.
1126 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
1128         * cp-gimplify.c: Include pointer-set.h
1129         (cp_genericize_r): Use pointer_sets instead of a hashtable.
1130         Also instert the new statement for CLEANUP_STMT.
1131         (cp_genericize): Use pointer_sets instead of a hashtable.
1132         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
1134 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1136         Friend class name lookup 1/n, PR c++/18471
1137         * decl.c (lookup_and_check_tag): New function.
1138         (xref_tag, start_enum): Use it.
1139         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
1140         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
1141         location.
1142         * name-lookup.c (lookup_name_current_level): Rename to ...
1143         (lookup_name_innermost_nonclass_level): ... this.
1144         (lookup_type_scope): New function.
1145         * name-lookup.h (lookup_name_current_level): Rename to ...
1146         (lookup_name_innermost_nonclass_level): ... this.
1147         (lookup_type_scope): Add declaration.
1149 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1151         PR c++/17344
1152         * pt.c (coerce_template_parms): Only emit error message about
1153         invalid template argument when TF_ERROR.
1155 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
1157         PR c++/18389
1158         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
1159         error_mark_node to indicate errors.
1161         PR c++/18429
1162         * parser.c (cp_parser_direct_declarator): Disallow non-constant
1163         array bounds when not inside a function.
1165         PR c++/18436
1166         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
1167         unqualified name resolves to a member function.
1169         PR c++/18407
1170         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
1171         derived class correctly.
1172         
1173         * decl2.c (import_export_decl): Fix typo in comment.
1174         * tree.c (pod_type_p): Likewise.
1176 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
1178         * typeck.c (cxx_mark_addressable): Add braces around the first if.
1180 2004-11-10  Adam Nemet  <anemet@lnxw.com>
1182         PR middle-end/18160  
1183         * typeck.c (cxx_mark_addressable): Issue an error if address of an
1184         explicit register variable is requested.
1186 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
1188         PR c++/18143
1189         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
1190         (struct lang_decl_flags): Add thunk_p flag.
1191         (struct lang_decl): Remove separate fixed_offset. Place
1192         cloned_function and fixed_offset into union.
1193         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
1194         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
1195         (THUNK_FIXED_OFFSET): Adjust.
1196         * method.c (make_thunk): Adjust.
1198 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
1200         PR c++/18369
1201         * init.c (build_new_1): Handle parenthesized type-ids that name an
1202         array type.  Tidy.
1204 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
1206         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
1207         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
1208         quoting in diagnostics.
1209         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
1210         quoting in printf format.
1211         * decl.c (duplicate_decls, start_decl): Use %qD instead of
1212         unquoted %D.
1214 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
1216         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
1217         search.c, typeck2.c: Fix comment formatting.
1219 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
1220         
1221         PR tree-optimization/18184
1222         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
1223         of different modes or alias-all flags as equivalent.
1224         * typeck.c (comptypes): Likewise.
1226 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1228         DR 49, 100
1229         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
1230         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
1231         TYPE_REFFN_P): Document.
1232         (fold_decl_constant_value): New prototype.
1233         * pt.c (convert_nontype_argument_function): Rewrite and extract
1234         parts into...
1235         (fold_decl_constant_value, convert_nontype_argument_function): New.
1236         (lookup_template_class): Add comment about useless double call.
1237         * mangle.c (write_expression): Strip conversions before lowering
1238         pointer to members.
1239         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1240         enum to enum conversion.
1242 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
1244         PR c++/18124
1245         * parser.c (cp_parser_type_parameter): Robustify.
1247         PR c++/18155
1248         * parser.c (cp_parser_single_declaration): Disallow template
1249         typedefs.
1251         PR c++/18177
1252         * typeck.c (build_const_cast): Use error_operand_p.
1254 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
1256         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1257         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1258         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1259         from cp-lang.c.
1260         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1261         from cp-lang.c.
1262         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1264 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
1266         PR c++/18064
1267         * search.c (check_final_overrider): Deprecate gnu covariant extension.
1269 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1271         Convert diagnostics to use quoting flag q 9/n
1272         * typeck.c (build_x_unary_op, convert_member_func_to_ptr, 
1273         get_delta_difference):  Use new quotation style.
1274         * repo.c (reopen_repo_file_for_write): Likewise.
1275         * pt.c (do_type_instantiation): Likewise.
1276         * parser.c (cp_parser_diagnose_invalid_type_name): 
1277         * name-lookup.c (push_overloaded_decl, set_decl_namespace): 
1278         * error.c (cp_print_error_function,
1279         print_instantiation_full_context): Likewise.
1280         * decl.c (define_label, grok_reference_init, 
1281         maybe_deduce_size_from_array_init, revert_static_member_fn): 
1282         * decl2.c (check_classfn): Likewise.
1283         * class.c (add_method, check_field_decls, layout_class_type, 
1284         resolve_address_of_overloaded_function): Likewise.
1285         * call.c (build_x_va_arg, build_over_call): Likewise.
1287 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1289         Convert diagnostics to use quoting flag q 8/n
1290         * cvt.c (cp_convert_to_pointer, warn_ref_binding, 
1291         convert_to_reference, ocp_convert, convert_to_void 
1292         cp_convert_to_pointer): Use new quotation style.
1294 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
1296         PR c++/15172
1297         * typeck2.c (store_init_value): Use split_nonconstant_init even
1298         for types that require construction.
1299         
1300 1004-10-28  Matt Austern  <austern@apple.com>
1302         PR c++/17542
1303         * cp-tree.h (class_key_or_enum_as_string): Declare.
1304         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1305         and remove static qualifier.
1306         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1307         union/enum declaration.
1308         
1309 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
1311         * pt.c: Fix a comment typo.
1313 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
1315         * typeck.c (composite_pointer_type): Remove comment about DR 195.
1316         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1317         warning when being pedantic.
1318         (build_reinterpet_cast, build_c_cast): Adjust.
1320 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
1322         PR c++/17695
1323         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1324         appear in a constructor/destructor that will be cloned.
1326 1004-10-28  Matt Austern  <austern@apple.com>
1328         PR c++/14124
1329         * decl.c (finish_enum): Handle packed attribute.
1330         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1331         
1332 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
1334         PR c++/17132
1335         * pt.c (instantiate_class_template): Increment
1336         processing_template_decl when substituting into a member class
1337         template.
1339 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
1341         PR c++/17435
1342         * call.c (convert_like_real): Fix formatting.
1343         (initialize_reference): When binding a temporary to a base class,
1344         ensure that the nominal copy made is to the derived class, not the
1345         base class.
1347         PR c++/18140
1348         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1349         include ">>".
1351 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1353         * decl.c (bad_specifiers): Move the q after the %.
1355 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1357         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1358         the %.
1360 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
1362         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1363         * search.c (current_scope): Fix prototype.
1365         PR c++/18093
1366         * search.c (current_scope): Return the innermost non-block scope,
1367         not the innermost non-block, non-namespace scope.
1368         (at_namespace_scope_p): Adjust accordingly.
1369         (dfs_accessible_post): Do not pass namespaces to is_friend.
1370         (dfs_walk_once_accessible_r): Likewise.
1371         * decl.c (grokvardecl): Adjust call to current_scope.
1372         (build_enumerator): Likewise.
1373         * parser.c (cp_parser_using_declaration): Likewise.
1374         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1375         current_scope.
1376         (cp_parser_class_head): Adjust call to current_scope.
1377         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1378         alias.
1380         PR c++/18020
1381         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1382         their underlying values.
1384         PR c++/18161
1385         * typeck.c (build_binary_op): Honor build_type, even when in a
1386         template.
1388 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
1390         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1391         padding token checking.
1393 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
1395         PR c++/18121
1396         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1397         layout_type as it is already done by create_array_type_for_decl.
1399 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
1401         PR c++/18095
1402         * parser.c (eof_token): Make const, correctly initialize rid and
1403         location fields.
1404         (struct cp_lexer): Replace buffer_end pointer with buffer_length
1405         count. Adjust.
1406         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
1407         zero it out.
1408         (cp_lexer_new_from_tokens): Adjust.
1409         (cp_lexer_grow_buffer): Remove.
1410         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1411         cp_lexer_purge_token): Add const casts.
1413 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
1415         PR c++/18073
1416         PR c++/10841
1417         * cp-tree.h (convert_to_base): Change prototype.
1418         (build_ptrmemfunc): Likewise.
1419         (convert_ptrmem): New function.
1420         * call.c (struct conversion): Adjust documentation for base_p.
1421         (standard_conversion): Set base_p for ck_pmem conversions as
1422         appropriate.
1423         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1424         conversions.
1425         * class.c (convert_to_base): Handle both pointers and objects.
1426         Add nonnull parameter.
1427         (build_vfield_ref): Adjust call to convert_to_base.
1428         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1429         (convert_force): Likewise.
1430         * typeck.c (build_unary_op): Likewise.
1431         (convert_ptrmem): New function.
1432         (build_static_cast_1): Use it.
1433         (build_reinterpret_cast): Allow conversions to vector types.
1434         (get_delta_difference): Add c_cast_p parameter.
1435         (build_ptrmemfunc): Likewise.  Adjust calls to
1436         get_delta_difference.
1438 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
1440         PR c++/13560
1441         * error.c (cp_error_at): Output the context as it might be
1442         different file as the other location.
1444 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
1446         * typeck.c: Fix a comment typo.
1448 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1450         PR c++/13495
1451         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1452         * cp-tree.h (make_unbound_class_template): Adjust prototype.
1453         * parser.c (cp_parser_lookup_name): Adjust call to
1454         make_unbound_class_template.
1455         (cp_parser_single_declaration): Handle member class of class
1456         template as template friend parsing correctly.
1457         * friend.c (is_friend): Call is_specialization_of_friend for
1458         template friend class.
1459         (make_friend_class): Handle member class of class template as
1460         template friend.
1461         * pt.c (is_specialization_of_friend): Likewise.
1462         (instantiate_class_template): Likewise.
1463         (tsubst): Adjust call to make_unbound_class_template.
1465 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
1467         * typeck.c (composite_pointer_type): Add comment about DR 195
1468         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1469         Allow function pointer conversions that DR195 suggests.
1470         (build_reinterpret_cast, build_c_cast): Update
1471         build_reinterpret_cast_1 calls. 
1473 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
1475         * call.c, typeck.c: Fix comment typos.
1477 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
1479         * parser.c (cp_token_position): New typedef. Define VEC thereof.
1480         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1481         next_token and last_token cp_token_position. Make saved_tokens a
1482         VEC(cp_token_position).
1483         (eof_token): New static variable.
1484         (CP_SAVED_TOKENS_SIZE): Rename to ...
1485         (CP_SAVED_TOKEN_STACK): ... here.
1486         (cp_lexer_new_main): Adjust main lexer creation and buffer
1487         filling.
1488         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1489         to the parent buffer.  Do not append eof token.
1490         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1491         stack.
1492         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1493         (cp_lexer_token_position, cp_lexer_token_at): New.
1494         (cp_lexer_saving_tokens): Adjust. Make inline.
1495         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1496         (cp_lexer_peek_token_emit_debug_info): Fold into ...
1497         (cp_lexer_peek_token): ... here.
1498         (cp_lexer_peek_nth_token): Don't peek past EOF.
1499         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1500         EOF.
1501         (cp_lexer_purge_token): Adjust eof setting.
1502         (cp_lexer_purge_tokens_after): Likewise.
1503         (cp_lexer_save_tokens): Push next_token directly.
1504         (cp_lexer_commit_tokens): Adjust.
1505         (cp_lexer_rollback_tokens): Pop next_token directly.
1506         (cp_parser_check_for_invalid_template_id): Adjust token purging.
1507         (cp_parser_translation_unit): Do not consume the EOF.
1508         (cp_parser_nested_name_specifier_opt): Adjust token purging.
1509         (cp_parser_template_id, cp_parser_template_name): Likewise.
1511 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
1513         PR c++/14035
1514         * call.c (struct conversion): Add base_p.
1515         (convert_like): Add c_cast_p argument.
1516         (convert_like_with_conversion): Likewise.
1517         (build_conv): Clear base_p.
1518         (standard_conversion): Set it, for derived-to-base conversions.
1519         (convert_like_real): Add c_cast_p parameter.  Handle pointer
1520         conversions directly rather than relying on ocp_convert.
1521         (perform_direct_initialization_if_possible): Add c_cast_p
1522         parameter.
1523         * cp-tree.h (perform_direct_initialization_if_possible): Change
1524         prototype.
1525         (convert_member_func_to_ptr): New function.
1526         * typeck.c (check_for_casting_away_constness): Add diag_fn
1527         parameter.
1528         (build_static_cast_1): New function, split out from ...
1529         (build_static_cast): ... here.  Use build_static_cast_1.
1530         (build_reinterpret_cast_1): New function, split out from ...
1531         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
1532         (build_const_cast_1): New function, split out from ...
1533         (build_const_cast): ... here.  Use build_const_cast_1.
1534         (build_c_cast): Rewrite to use build_const_cast_1,
1535         build_static_cast_1, and build_reinterpret_cast_1.
1536         (convert_member_func_to_ptr): New function.
1538 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
1540         PR c++/18047
1541         * parser.c (enum cp_parser_prec): Give relational expressions
1542         a higher precedence than equality expressions.
1544 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
1546         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
1547         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
1548         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
1549         (enum base_access): Reorganize.
1550         (accessible_base_p, accessible_p): Add consider_local_p parameter.
1551         * call.c (standard_conversion): Update comment about
1552         DERIVED_FROM_P.
1553         (enforce_access): Adjust accessible_p call.
1554         (build_over_call): Adjust accessible_base_p call.
1555         * class.c (convert_to_base): Adjust lookup_base call.
1556         (build_vtbl_ref_1): Likewise.
1557         (warn_about_ambiguous_bases): Likewise. Add early exit.
1558         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
1559         * search.c (accessible_base_p): Add consider_local_p parameter.
1560         (lookup_base): Pass consider_local_p to accessible_base_p call.
1561         (friend_accessible_p): Check whether scope is a class member.
1562         Remove unnecessary class template check.
1563         (accessible_p): Add consider_local_p parameter. Use it.
1564         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
1565         * tree.c (maybe_dummy_object): Likewise.
1566         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
1567         (build_class_member_access_expr): Adjust lookup_base call.
1568         * typeck2.c (binfo_or_else): Likewise.
1569         * rtti.c (build_dynamic_cast_1): Access can consider friendship
1570         and current scope.
1572 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1574         PR c++/17743
1575         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
1577 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1579         PR c++/10479
1580         * parser.c (cp_parser_parenthesized_expression_list): Fold
1581         non-dependent expressions in attribute lists.
1583 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
1585         PR c++/17042
1586         * decl.c (declare_global_var): Use the return value from pushdecl.
1588         PR c++/14667
1589         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
1590         type names if we have already found a valid type.
1591         (cp_parser_member_declaration): Likewise.
1592         
1593         PR c++/17916
1594         * parser.c (cp_parser_member_specification_opt): Handle
1595         CPP_PRAGMA.
1597 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
1599         * dump.c, g++spec.c, repo.c: Update copyright.
1601 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
1603         * decl.c: Fix a comment typo.
1605 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
1607         PR c++/16301
1608         * name-lookup.c (parse_using_directive): If we have a
1609         error_mark_node, do not set the decl namespace associations
1610         on it.
1612 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
1614         PR c++/17976
1615         * decl.c (cp_finish_decl): Do not call expand_static_init more
1616         than once for a single variable.
1618 2004-10-14  Matt Austern  <austern@apple.com>
1620         * Make-lang.in (pt.o): depends on pointer-set.h
1621         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
1622         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
1623         (for_each_template_parm): Convert from htab_t to pointer_set_t.
1624         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
1625         
1626 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
1628         PR c++/17661
1629         * semantics.c (finish_for_expr): Convert expression to void
1630         so that we don't create temporaries for a?b:c.
1632 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
1634         * search.c: Fix a comment typo.
1636 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1638         * class.c (dfs_modify_vtables): Simplify condition. Return
1639         dfs_skip_bases as appropriate.
1640         (modify_all_vtables): Walk in pre-order.
1641         * search.c (dfs_walk_all, dfs_walk_once_r,
1642         dfs_walk_once_accessible_r): Assert post order function never
1643         returns dfs_skip_bases.
1645         * search.c (struct lookup_base_data_s): New.
1646         (lookup_base_r): Replace with ...
1647         (dfs_lookup_base): ... this.
1648         (lookup_base): Use dfs_walk_all.
1650 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
1652         * search.c: Fix comment typos.
1654 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
1656         PR c++/15786
1657         * parser.c (cp_parser_declarator): Add member_p parameter. 
1658         (cp_parser_condition): Adjust calls to cp_parser_declarator.
1659         (cp_parser_explicit_instantiation): Likewise.
1660         (cp_parser_init_declarator): Likewise.
1661         (cp_parser_direct_declarator): Add member_p parameter.  Do not
1662         parse tentatively when parsing the parameters to a member.
1663         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1664         (cp_parser_parameter_declaration): Likewise.
1665         (cp_parser_member_declaration): Likewise.
1666         (cp_parser_exception_declaration): Likewise.
1668         PR c++/17936
1669         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1670         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1671         for members of partial or explicit specializations.
1673         PR c++/17929
1674         * decl2.c (finish_anon_union): Robustify.
1676 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
1678         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1679         (dcast_base_hint): ... here.
1680         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1681         * search.c (struct dcast_data_s): New.
1682         (dynamic_cast_base_recurse): Remove. Replace with ...
1683         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1684         (get_dynamic_cast_base_type): Rename to ...
1685         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
1686         (accessible_r): Remove.
1687         (dfs_accessible_post): New, broken out of accessible_r.
1688         (accessible_p): Use dfs_walk_once_accessible.
1689         (dfs_walk_once_accessible_r): New. From accessible_r.
1690         (dfs_walk_once_accessible): New. From acessible_p.
1692         * cp-tree.h (SAME_BINFO_TYPE_P): New.
1693         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1694         binfo types.
1695         (convert_to_base_statically, determine_primary_bases,
1696         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1697         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1698         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1699         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1700         * init.c (expand_member_init): Likewise.
1701         * search.c (lookup_base_r, dynamic_cast_base_recurse,
1702         binfo_via_virtual, copied_binfo, binfo_for_vbase,
1703         original_binfo): Likewise.
1704         * tree.c (copy_binfo): Likewise.
1706 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
1708         * semantics.c: Fix comment typos.
1710 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
1712         PR c++/17554
1713         part of c++/17657
1714         middle-end/17703
1715         * semantics.c (maybe_cleanup_point_expr): Call
1716         fold_build_cleanup_point_expr.
1717         (maybe_cleanup_point_expr_void): New function.
1718         (add_decl_expr): Call maybe_cleanup_point_expr_void.
1719         (finish_expr_stmt): Likewise.
1720         (finish_return_stmt): Likewise.
1721         (finish_for_expr): Likewise.
1722         (finish_asm_stmt): Likewise.
1723         * typeck.c (condition_conversion): Call
1724         fold_build_cleanup_point_expr.
1726 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
1728         PR c++/17907
1729         * semantics.c (add_decl_expr): If the decl has a size which
1730         has side effects then the decl expression needs a cleanup point.
1732 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
1734         PR c++/17393
1735         * decl.c (grokdeclarator): Robustify error-recovery on invalid
1736         declarations.
1738 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1740         Convert diagnostics to use quoting flag q 7/n
1741         * typeck.c (composite_pointer_type_r, composite_pointer_type, 
1742         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr, 
1743         string_conv_p, build_class_member_access_expr, 
1744         build_class_member_access_expr, lookup_destructor, 
1745         finish_class_member_access_expr, build_indirect_ref, 
1746         get_member_function_from_ptrfunc, build_function_call, 
1747         convert_arguments, build_binary_op, pointer_diff, build_unary_op, 
1748         check_for_casting_away_constness, build_static_cast, 
1749         build_reinterpret_cast, build_const_cast, build_c_cast, 
1750         build_modify_expr, get_delta_difference, build_ptrmemfunc, 
1751         dubious_conversion_warnings, convert_for_assignment, 
1752         convert_for_initialization, 
1753         maybe_warn_about_returning_address_of_local, check_return_expr): 
1754         Use quoting marks.
1756         * typeck2.c (error_not_base_type, readonly_error, 
1757         abstract_virtuals_error, cxx_incomplete_type_diagnostic, 
1758         store_init_value, digest_init, build_x_arrow, 
1759         build_m_component_ref, require_complete_eh_spec_types): Likewise.
1761         * tree.c (cp_build_qualified_type_real, 
1762         handle_java_interface_attribute, handle_init_priority_attribute):
1763         Likewise.
1765         * semantics.c (finish_asm_stmt, finish_non_static_data_member, 
1766         finish_pseudo_destructor_expr, 
1767         check_template_template_default_arg, begin_class_definition, 
1768         finish_base_specifier, qualified_name_lookup_error, 
1769         finish_id_expression, finish_typeof): Likewise.
1771         * search.c (lookup_base, check_final_overrider,
1772         look_for_overrides_r): Likewise.
1774         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1776 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
1778         PR c++/17867
1779         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1780         constructor.
1782         PR c++/17670
1783         * init.c (build_new): Correct comments.
1784         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1785         the non-array case.
1787         PR c++/17821
1788         * parser.c (cp_parser_postfix_dot_deref_expression): If the
1789         pseduo-destructor-name production does not work, fall back to the
1790         ordinary production.
1792         PR c++/17826
1793         * tree.c (cp_tree_equal): Handle a BASELINK.
1795         PR c++/17524
1796         * cp-tree.h (check_var_type): New function.
1797         * decl.c (check_var_type): New function, split out from ...
1798         (grokdeclarator): ... here.
1799         * pt.c (tsubst_decl): Use check_var_type.
1801         PR c++/17685
1802         * decl.c (grokdeclarator): Disallow declarations of operators as
1803         non-functions.
1804         
1805 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1807         PR c++/17868
1808         * error.c (dump_expr): Add missing case for RDIV_EXPR.
1810 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
1812         * pt.c, search.c: Fix comment typos.
1814 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
1816         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
1817         unmarkedp): Remove.
1818         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
1819         * class.c (struct find_final_overrider_data): Remove most_derived,
1820         vpath_list and vpath fields.  Add path field.
1821         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
1822         (dfs_find_final_overrider): Rename to ...
1823         (dfs_find_final_overrider_pre): ... here. Adjust.
1824         (dfs_find_final_overrider_post): Adjust.
1825         (dfs_find_final_overrider_q): Fold into
1826         dfs_find_final_overrider_pre.
1827         (find_final_overrider): Adjust dfs searching.
1828         (dfs_modify_vtables): Don't mark binfo here.
1829         (modify_all_vtables): Use dfs_walk_once.
1830         (build_vtt_inits): Likwise. Use dfs_walk_all.
1831         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
1832         Return dfs_skip_bases as appropriate.
1833         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
1834         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
1835         appropriate. Don't mark binfo here.
1836         (initialize_vtbl_ptrs): Use dfs_walk_once.
1837         * search.c (struct vbase_info): Remove unused struct.
1838         (access_in_type): Use dfs_walk_once.
1839         (dfs_access_in_type): Don't mark binfo here.
1840         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
1841         Fold into ...
1842         (accessible_r): ... here. New. Specialize dfs_walk_once.
1843         (accessible_p): Use accessible_r.
1844         (lookup_field_queue_p): Remove. Fold into ...
1845         (lookup_field_r): ... here. Adjust.
1846         (lookup_member): Use dfs_walk_all.
1847         (dfs_walk_real, dfs_walk): Replace with ...
1848         (dfs_walk_all, dfs_walk_once): ... these.
1849         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
1850         (dfs_unmark, unmarkedp, markedp): Remove.
1851         (dfs_get_pure_virtuals): Don't mark binfo here.
1852         (get_pure_virtuals): Use dfs_walk_once.
1853         (dfs_debug_unmarked_p): Remove. Fold into ...
1854         (dfs_debug_mark): ... here.
1855         (note_debug_info_needed): Use dfs_walk_all.
1857 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
1859         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
1860         CLEANUP_POINT_EXPR to get the asm expression.
1862 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
1864         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
1865         (DECL_MEMBER_TEMPLATE_P): New macro.
1866         (is_member_template): Remove.
1867         (class_method_index_for_fn): New function.
1868         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
1869         * class.c (finish_struct_methods): Remove out-of-date comment.
1870         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
1871         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
1872         class_method_index_for_fn.
1873         * pt.c (is_member_template): Remove.
1874         (is_member_template_class): Likewise.
1875         (optimize_specialization_lookup_p): New function.
1876         (retrieve_specialization): Optimize lookups for members that are
1877         not member templates.
1878         (register_specialization): Adjust accordingly.
1879         (build_template_decl): Add member_template_p parameter.  Set
1880         DECL_MEMBER_TEMPLATE_P.
1881         (process_partial_specialization): Adjust call to
1882         retrieve_specialization.
1883         (push_template_decl_real): Determine whether the template is a
1884         member template.
1885         (lookup_template_class): Use retrieve_specialization.
1886         (tsubst_decl): Adjust call to retrieve_specialization.
1887         (tsubst_exception_specification): New function.
1888         (tsubst): Use it.
1889         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
1890         (instantiate_template): Adjust call to retrieve_specialization.
1891         (regenerate_decl_from_template): Do not actually generate a new
1892         DECL.
1893         (instantiate_decl): Adjust call to retrieve_specialization.
1894         (class_method_index_for_fn): New method.
1896 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
1898         * parser.c (cp_parser_asm_definition): Look passed the
1899         CLEANUP_POINT_EXPR to get the asm expression.
1901 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
1903         PR c++/17368
1904         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
1905         also.
1907 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1909         Convert diagnostics to use quoting flag q 6/n
1910         * pt.c (finish_member_template_decl, check_specialization_scope, 
1911         maybe_process_partial_specialization, determine_specialization, 
1912         check_explicit_specialization, maybe_check_template_type, 
1913         process_partial_specialization, check_default_tmpl_args, 
1914         push_template_decl_real, redeclare_class_template, 
1915         convert_nontype_argument, coerce_template_parms, 
1916         lookup_template_class, push_tinst_level, 
1917         instantiate_class_template, tsubst_arg_types, 
1918         tsubst_function_type, tsubst, tsubst_qualified_id, 
1919         tsubst_copy_and_build, check_instantiated_args, 
1920         do_decl_instantiation, do_type_instantiation, 
1921         invalid_nontype_parm_type_p, check_specialization_namespace, 
1922         convert_template_argument, determine_specialization, 
1923         check_template_shadow, tsubst_decl 
1924         instantiate_pending_templates): Use quoting marks.
1926 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1928         PR c++/17829
1929         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
1930         unqualified lookup finds a member function.
1932 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1934         Convert diagnostics to use quoting flag q 5/n
1935         * parser.c (cp_parser_name_lookup_error, 
1936         cp_parser_diagnose_invalid_type_name, 
1937         cp_parser_primary_expression, cp_parser_unqualified_id, 
1938         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement, 
1939         cp_parser_jump_statement, cp_parser_simple_declaration, 
1940         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id, 
1941         cp_parser_type_parameter, cp_parser_template_id, 
1942         cp_parser_template_name, cp_parser_direct_declarator, 
1943         cp_parser_parameter_declaration_list, cp_parser_class_head, 
1944         cp_parser_base_specifier, cp_parser_lookup_name, 
1945         cp_parser_late_parsing_default_args, 
1946         cp_parser_optional_template_keyword 
1947         cp_parser_elaborated_type_specifier, cp_parser_check_class_key, 
1948         cp_parser_check_access_in_redeclaration): Use quoting marks.
1950         * name-lookup.c (supplement_binding, pushdecl, 
1951         check_for_out_of_scope_variable, validate_nonmember_using_decl, 
1952         do_nonmember_using_decl, lookup_tag, set_decl_namespace, 
1953         push_namespace, do_namespace_alias, do_using_directive, 
1954         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
1956         * method.c (use_thunk): Likewise.
1958         * lex.c (unqualified_name_lookup_error, 
1959         unqualified_fn_lookup_error): Likewise.
1961 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1963         Convert diagnostics to use quoting flag q 4/n
1964         * except.c (decl_is_java_type, build_throw, 
1965         is_admissible_throw_operand, check_handlers_1, check_handlers): 
1966         Use quoting formats.
1967         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
1968         * init.c (sort_mem_initializers, emit_mem_initializers, 
1969         member_init_ok_or_else, expand_member_init, is_aggr_type, 
1970         build_offset_ref, build_java_class_ref): Likewise.
1972 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1974         Convert diagnostics to use quoting flag q 3/n
1975         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
1976         redeclaration_error_message, lookup_label, check_goto,
1977         make_typename_type, make_unbound_class_template,
1978         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1, 
1979         grok_reference_init, layout_var_decl, maybe_commonize_var, 
1980         check_for_uninitialized_const_var, reshape_init_array, 
1981         reshape_init, check_initializer, cp_finish_decl,
1982         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl, 
1983         check_static_variable_definition, compute_array_index_type, 
1984         create_array_type_for_decl, check_special_function_return_type, 
1985         grokdeclarator, check_default_argument, grokparms, 
1986         grok_ctor_properties, grok_op_properties, 
1987         check_elaborated_type_specifier, xref_tag, finish_enum, 
1988         build_enumerator, check_function_type, start_preparsed_function, 
1989         store_parm_decls): Use quoting formats.
1990         * decl2.c (grok_array_decl, delete_sanity, check_member_template, 
1991         check_java_method, check_classfn, finish_static_data_member_decl, 
1992         grokfield, grokbitfield, grok_function_init,
1993         build_anon_union_vars, coerce_new_type, coerce_delete_type,
1994         check_default_args): Likewise.
1995         * parser.c (cp_parser_decl_specifier_seq): Likewise.
1997 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1999         Convert diagnostics to use quoting flag q 2/n
2000         * class.c (build_base_path, add_method, alter_access,
2001         handle_using_decl, check_bases,
2002         maybe_warn_about_overly_private_class, find_final_overrider,
2003         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2004         check_bitfield_decl, check_field_decls, layout_empty_base,
2005         build_base_field, check_methods, layout_virtual_bases,
2006         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2007         resolve_address_of_overloaded_function, instantiate_type,
2008         note_name_declared_in_class): Use format flag "q" for quoting.
2010 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2012         Convert diagnostics to use quoting flag q 1/n
2013         * error.c (locate_error): Ignore quoting flag q.
2014         * call.c (build_user_type_conversion_1, build_operator_new_call,
2015         build_object_call, op_error, build_conditional_expr,
2016         build_new_op, build_op_delete_call, enforce_access,
2017         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2018         convert_default_arg, build_over_call, build_new_method_call,
2019         joust, perform_implicit_conversion, initialize_reference): Use the
2020         quoting flag q.
2022 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
2024         PR c++/17797
2025         * typeck.c (build_reinterpret_cast): Return if the inner type
2026         is error_mark_node.
2028 2004-10-01  Jan Hubicka  <jh@suse.cz>
2030         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2032 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2034         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2035         turning operator_code and fixed_offset into bitfields.
2037 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
2039         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2041 2004-09-29  Jason Merrill  <jason@redhat.com>
2043         PR tree-optimization/17697
2044         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2046 2004-09-28  Jason Merrill  <jason@redhat.com>
2048         PR middle-end/17525
2049         * class.c (build_base_field): Set TYPE_MODE.
2051 2004-09-28  Roger Sayle  <roger@eyesopen.com>
2053         PR driver/17537
2054         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2055         than -lc and -lm, may require linking against libstc++.
2057 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
2059         * tree.c: Fix a comment typo.
2061 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
2063         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2064         (struct secondary_vptr_vtt_init_data_s): New.
2065         (build_vtt_inits): Adjust dfs_walkers.
2066         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2067         secondary_vptr_vtt_init_data_s structure. Adjust.
2068         (dfs_ctor_vtable_bases_queue_p): Remove.
2069         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2071         * pt.c (struct get_template_base_data_s): Remove.
2072         (get_template_base_r): Fold into get_template_base.
2073         (get_template_base): Walk base binfos directly in inheritance
2074         graph order.
2076 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
2078         PR c++/17642
2079         * cp-tree.h (fold_if_not_in_template): New function.
2080         * call.c (build_conditional_expr): Use fold_if_not_in_template.
2081         (build_cxx_call): Likewise.
2082         * cvt.c (convert_to_complex): Likewise.
2083         (ocp_convert): Likewise.
2084         (convert): Likewise.
2085         (convert_force): Likewise.
2086         * decl.c (compute_array_index_type): Clear
2087         processing_template_decl while folding array bounds.
2088         * pt.c (convert_nontype_argument): Clear
2089         processing_template_decl while processing non-type argument
2090         initialization.
2091         * tree.c (fold_if_not_in_template): New function.
2092         * typeck.c (build_class_member_access_expr): Use
2093         fold_if_not_in_template.
2094         (build_array_ref): Likewise.
2095         (build_binary_op): Likewise.  Do not try to optimize computations
2096         when processing templates.
2097         (cp_pointer_int_sum): Use fold_if_not_in_template.
2098         (pointer_diff): Likewise.
2099         (build_unary_op): Likewise.
2100         (build_reinterpret_cast): Likewise.
2101         (get_delta_difference): Likewise.
2102         (expand_ptrmemfunc_cst): Likewise.
2103         (dubious_conversion_warnings): Likewise.
2105 2004-09-27  Matt Austern  <austern@apple.com>
2107         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
2108         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
2109         tokens that come from headers that are implicitly extern "C".
2110         (struct cp_parser): new one-bit field, implicit_extern_c.
2111         (cp_parser_new): Set parser's implicit_extern_c to false.
2112         (cp_parser_translation_unit): Pop lang context if we were in a
2113         header that was implicitly extern "C".
2114         (cp_parser_declaration_seq_opt): Push/pop lang context as
2115         required by the token's and parser's implicit_extern_c.
2116         
2117 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
2119         PR c++/17585
2120         * cp-tree.h (shared_member_p): Declare.
2121         * search.c (shared_member_p): Give it external linkage.
2122         * semantics.c (finish_qualified_id_expr): Use it.
2123         (finish_id_expression): Likewise.
2125         PR c++/17585
2126         * semantics.c (finish_id_expression): Do not add "this->" to
2127         static member functions.
2129 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
2131         PR c++/17681
2132         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
2134         * class.c (struct count_depth_data): Remove.
2135         (dfs_depth_post, dfs_depth_q): Remove.
2136         (find_final_overrider): Use number of vbase classes as depth
2137         bound.
2138         
2139         * cp-tree.h (types_overlap_p): Remove.
2140         * search.c (struct overlap_info): Remove.
2141         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
2142         
2143         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
2144         (get_template_base_recursive): Remove. Replace with ...
2145         (get_template_base_r): ... this.
2146         (struct get_template_base_data_s): New.
2147         (get_template_base): Use get_template_base_r via dfs_walk.  Always
2148         return NULL on failure.
2149         (unify): Remove error_mark_node check from get_template_base result.
2151 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
2153         * parser.c (cp_parser_expression_stack): Clarify why it is
2154         an array of NUM_PREC_VALUES elements.
2155         (cp_parser_binary_expression): Clarify why we do not need to
2156         handle stack overflow.
2158 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
2160         PR c++/16889
2161         * search.c (lookup_field_queue_p): Correct check for hidden base.
2163         * search.c (bfs_walk): Remove.
2164         (lookup_member): Use dfs_walk_real.
2165         (dfs_walk_real): Move and adjust documentation from bfs_walk.
2167 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
2169         * decl.c (grokfndecl): If ::main is found not to return int,
2170         correct it after issuing a diagnostic.
2171         (grokdeclarator): If the incoming type was error_mark_node, do
2172         not complain about declaring something with no type.
2173         (start_function): Change check for ::main not returning int to
2174         an assertion, as grokfndecl now catches this when the user did it.
2175         * init.c (perform_member_init, sort_mem_initializers)
2176         (emit_mem_initializers): Make most diagnostics be issued on
2177         the line of current_function_decl, not whatever the current
2178         input line is.
2179         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
2180         definition and declaration with #ifdef ENABLE_CHECKING.
2181         Avoid unnecessary use of fprintf.
2182         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
2183         definitions to avoid warnings.
2184         (cp_lexer_new_main): Add assertion that first token is not a
2185         padding token.
2186         (cp_lexer_new_from_token_array): Fold into ...
2187         (cp_lexer_new_from_tokens): ... here.  Add assertion that
2188         first token is not a padding token.
2189         (cp_lexer_set_source_position_from_token): Move nearer to callers.
2190         Remove unused lexer argument.
2191         (cp_lexer_peek_token): Just print debugging report (if enabled)
2192         and return lexer->next_token.
2193         (cp_lexer_skip_purged_tokens): Delete.
2194         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
2195         inline, simplify bodies.
2196         (cp_lexer_peek_nth_token): Add debugging report a la
2197         cp_lexer_peek_token.
2198         (cp_lexer_consume_token): Correct commentary.  Advance over
2199         purged tokens here.  Set current source position here, from
2200         token to be returned.  Avoid unnecessary use of fprintf.
2201         (cp_lexer_purge_token): Advance next_token pointer over this and
2202         subsequent purged tokens.
2203         (cp_parser_error): Adjust source position to that of the
2204         peeked token.
2205         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
2206         (cp_parser_string_literal): Remove some excessive cleverness.
2207         (cp_parser_enum_specifier): Call start_enum before consuming
2208         the opening brace.
2209         (cp_parser_member_declaration): Make the "extra semicolon"
2210         diagnostic consistently-worded with the other place this is
2211         diagnosed.  Explicitly set the diagnostic location to the
2212         location of the offending semicolon.
2213         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
2214         in diagnostics.  Do not use cp_parser_require.  Set location
2215         of diagnostics about improper use of '>>' to location of
2216         offending token.
2217         (cp_parser_late_parsing_for_member):
2218         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
2219         (cp_parser_late_parsing_default_args): Likewise.  Manually
2220         move some logic outside the loop.
2222 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
2224         PR c++/17618
2225         * cvt.c (cp_convert_to_pointer): Return early when the type is
2226         an error_mark_node.
2228 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
2230         PR c++/13989
2231         PR c++/9844
2232         * decl.c (grokfndecl): Add new argument "attrlist", use it
2233         to call cplus_decl_attributes.
2234         (start_function): Remove call to cplus_decl_attributes.
2235         * cvt.c (ocp_convert): Add support to use type conversion
2236         function to vector type.
2237         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2238         to the parsed type.
2240 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
2242         PR c++/17596
2244         * parser.c (cp_parser_token_tree_map_node,
2245         cp_parser_pm_expression, cp_parser_additive_expression,
2246         cp_parser_multiplicative_expression, cp_parser_shift_expression,
2247         cp_parser_relational_expression, cp_parser_equality_expression,
2248         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2249         cp_parser_inclusive_or_expression,
2250         cp_parser_logical_and_expression,
2251         cp_parser_logical_or_expression): Removed.
2252         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2253         binops, binops_by_token): New.
2254         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2255         (cp_parser_new): Initialize binops_by_token.
2256         (cp_parser_binary_expression): Rewritten.
2257         (N_CP_TTYPES): New.
2259 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
2261         * parser.c: Fix a comment typo.
2263 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
2265         PR c++/17620
2266         * decl.c (xref_basetypes): Look through typedefs before checking
2267         for duplicate base.
2269 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
2271         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2272         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2273         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2274         (init_rtti_processing): Initialize it to something realistic.
2275         (get_tinfo_decl): Adjust pushing the new decl.
2277         * cp-tree.h (struct lang_type_class): Remove marked flags, add
2278         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
2279         (TYPE_MARKED_P): New.
2280         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2281         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2282         CLEAR_CLASSTYPE_MARKED_N): Remove.
2283         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2284         CLEAR_CLASSTYPE_MARKED_*): Remove.
2285         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2286         shaped and repeated base properties.
2287         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2288         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2289         class_hint_flags): Remove.
2290         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2291         CLASSTYPE_DIAMOND_SHAPED_P.
2293 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
2295         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2296         cp-objcp-common.h.
2297         (objcp_tsubst_copy_and_build): Reformat function signature.
2298         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2299         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2301 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
2303         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2304         Don't handle CPP_PRAGMA tokens specially.
2305         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
2306         purge the token; do clear token->value after processing.  Add
2307         assertion at beginning that token->value is nonzero.
2308         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2309         CPP_PRAGMA as a full statement or declaration in its own right.
2311 2004-09-21  Matt Austern  <austern@apple.com>
2313         PR c++/15049
2314         * decl.c (grokvardecl): Accept declarations of global variables
2315         using anonymous types.
2317 2004-09-21  Roger Sayle  <roger@eyesopen.com>
2319         PR c++/7503
2320         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
2321         if either operand has side-effects.
2322         * typeck.c (rationalize_conditional_expr): Assert that neither
2323         operand of MIN_EXPR or MAX_EXPR has side-effects.
2324         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
2325         Check that the "lhs" is a valid lvalue, i.e. that neither operand
2326         of a MIN_EXPR or MAX_EXPR has a side-effect.
2328 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
2330         * cp-tree.h (struct lang_type_header): Remove
2331         uses_multiple_inheritance field.
2332         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2333         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2334         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2335         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2336         (TYPE_CONTAINS_VPTR_P): Likewise.
2337         * call.c (add_template_candidate_real): Use
2338         CLASSTYPE_VBASECLASSES.
2339         (build_special_member_call): Likewise.
2340         * class.c (finish_struct_bits): Remove
2341         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2342         bookkeeping.
2343         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2344         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2345         bookkeeping.
2346         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2347         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2348         Likewise.
2349         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2350         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2351         bookkeeping.
2352         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2353         * decl2.c (maybe_retrofit_in_chrg): Likewise.
2354         * init.c (expand_member, push_base_cleanups): Likewise.
2355         * pt.c (instantiate_class_template): Remove
2356         TYPE_USES_MULTIPLE_INHERITANCE,
2357         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2358         bookkeeping.
2359         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2360         check.
2361         * typeck2.c (process_init_constructor): Replace some sorrys with
2362         asserts.
2364 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
2366         * decl.c (reshape_init_array): Initialize max_index_cst to fix
2367         bootstrap failure.
2369 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
2371         PR c++/17530
2372         * pt.c (tsubst): Fix parentheses to accomodate emacs.
2373         (tsubst_baselink): If we get a single function, mark it as used.
2375 2004-09-20  Matt Austern <austern@apple.com>
2376             Zack Weinberg  <zack@codesourcery.com>
2378         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2379         Apply lbasename to input_filename before passing to get_fileinfo.
2380         * semantics.c (begin_class_definition): Likewise.
2381         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2382         correct filename.  Rename variables to be less confusing.
2383         (handle_pragma_implementation): Likewise.  Disable "appears
2384         after file is included" diagnostic.
2386         * parser.c (struct cp_token): Add in_system_header fiag.
2387         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2388         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2389         (CPP_NONE, cp_lexer_read_token): Delete.
2390         (struct cp_lexer): Remove first_token, string_tokens,
2391         main_lexer_p fields.  Clarify comments.
2392         (struct cp_token_cache): Now just a pair of pointers.
2393         (CP_LEXER_BUFFER_SIZE): New #define.
2394         (CPP_PURGED): New fake token type.
2395         (cp_lexer_new_from_token_array, cp_lexer_destroy)
2396         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2397         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2398         New functions.
2399         (cp_lexer_new_from_tokens): Now a simple wrapper around
2400         cp_lexer_new_from_token_array.
2401         (cp_lexer_set_source_position_from_token): Also update
2402         in_system_header.
2403         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2404         Don't wrap round.
2405         (cp_lexer_token_difference): Dont handle wrapping round.
2406         (cp_lexer_new_main): Enable pragma deferral and raw strings,
2407         read the entire translation unit through c_lex_with_flags into
2408         this lexer's buffer, then turn raw strings back off again.
2409         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2410         (cp_lexer_get_preprocessor_token): No need to handle not being
2411         the main lexer.  Set token->in_system_header too.
2412         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
2413         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
2414         (cp_lexer_peek_nth_token): Likewise.
2415         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2416         the other tokens down.
2417         (cp_lexer_purge_tokens_after): Likewise.
2418         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2419         about there being no tokens.
2420         (cp_lexer_print_token): Revise to give useful information on
2421         all tokens.
2422         (struct cp_parser): Add field translate_strings_p.
2423         (cp_parser_new): Initialize it.
2424         (cp_parser_translation_unit): Destroy the lexer when done.
2425         (cp_parser_parameter_declaration): Restructure saving of
2426         default arguments.
2427         (cp_parser_save_member_function_body): Likewise.
2428         (cp_parser_check_for_invalid_template_id)
2429         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2430         Adjust calls to cp_lexer_advance_token.
2431         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2432         No need to fiddle c_lex_string_translate.
2433         (cp_parser_primary_expression, cp_parser_linkage_specification)
2434         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2435         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2436         Use cp_parser_string_literal.
2437         (cp_parser_attribute_list): Save and restore
2438         parser->translate_strings_p, not c_lex_string_translate.
2439         (cp_parser_cache_group): Delete.
2440         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
2441         not take a cache argument.
2443 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2445         PR c++/14179
2446         * decl.c (reshape_init): Extract array handling into...
2447         (reshape_init_array): New function. Use integers instead of trees
2448         for indices. Handle out-of-range designated initializers.
2450 2004-09-20  Steven Bosscher  <stevenb@suse.de>
2452         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2453         to null_node.
2455 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
2457         * decl2.c (determine_visibility): Allow class visibility
2458         directives to override targetm.cxx.export_class_data.
2460 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
2462         * call.c, semantics.c: Follow spelling conventions.
2463         * class.c: Fix a comment typo.
2465 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
2467         PR pch/13361
2468         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2469         (handle_pragma_implementation): Likewise.
2471 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
2472             Zack Weinberg  <zack@codesourcery.com>
2474         * cp-tree.def: Use tree_code_class enumeration constants
2475         instead of code letters.
2476         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2477         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2478         Update for new tree-class enumeration constants.
2480 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
2482         PR c++/16002
2483         * parser.c (cp_parser_simple_declaration): Commit to tentative
2484         parses after seeing a decl-specifier.
2485         (cp_parser_simple_declaration): Eliminate spurious message.
2486         (cp_parser_init_declarator): Adjust error message.
2488         PR c++/16029
2489         * lex.c (unqualified_name_lookup_error): Mark the dummy
2490         declaration as used.
2492         PR c++/17501
2493         * parser.c (cp_parser_nested_name_specifier): Do not resolve
2494         typename types if the user explicitly said "typename".
2496 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
2498         * error.c (dump_decl): Make sure there is lang_specific info before
2499         checking for DTOR and CTOR decls.
2501 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2503         * class.c (copy_virtuals): Remove.
2504         (build_primary_vtable): Use copy_list directly.
2505         (build_secondary_vtable): Likewise.
2506         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2507         (create_vtable_ptr): Likewise.
2509 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
2511         * search.c: Follow spelling conventions.
2513 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2515         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2516         VEC(tree).
2517         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
2518         comments.
2519         * call.c (build_new_method_call): Don't confirm a pure virtual is
2520         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
2521         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
2522         (fixup_inline_methods, finish_struct): Likewise.
2523         * decl.c (finish_method): Likewise.
2524         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
2525         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
2526         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
2527         vector to avoid repeating the list in error messages.
2529 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
2531         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
2532         * cp-tree.h (cxx_comdat_group): Declare.
2533         * decl.c (cxx_comdat_group): New function.
2535 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2537         * search.c (get_pure_virtuals): Remove unused variables.
2539         * cp-tree.h (struct lang_decl_flags): Remove
2540         needs_final_overrider.
2541         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
2542         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
2543         * class.c (finish_struct_bits): Correct comment about
2544         CLASSTYPE_PURE_VIRTUALS.
2545         * search.c (get_pure_virtuals): Remove useless loop.
2547 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
2549         PR c++/17324
2550         * mangle.c (partially_mangled_name): New variable.
2551         (partially_mangled_name_len): Likewise.
2552         (save_partially_mangled_name): New function.
2553         (restore_partially_mangled_name): Likewise.
2554         (write_encoding): Save and restore partially mangled names around
2555         calls to get_mostly_instantiated_function_type.
2556         (write_unqualified_name): Likewise.
2558 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
2560         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
2562 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
2564         PR c++/16162
2565         * parser.c (cp_parser_id_expression): Correct value for
2566         is_declarator.
2567         (cp_parser_nested_name_specifier_opt): Look through typenames as
2568         necessary.
2569         (cp_parser_template_name): Honor check_dependency_p.
2571         PR c++/16716
2572         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
2573         Robustify.
2575         PR c++/17327
2576         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
2577         gcc_unreacable.
2579 2004-09-12  Richard Henderson  <rth@redhat.com>
2581         PR c++/16254
2582         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
2583         * typeck.c (condition_conversion): Likewise.
2585 2004-09-11  Richard Henderson  <rth@redhat.com>
2587         PR c++/17404
2588         * pt.c (cur_stmt_expr): Move from tsubst_expr.
2589         (tsubst_expr) <case STMT_EXPR>: Move ...
2590         (tsubst_copy_and_build): ... here.
2592 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
2594         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
2595         comment explaining them moved to c-common.h.
2596         * lex.c (interface_only, interface_unknown, extract_interface_info):
2597         Delete definitions.
2598         (cxx_finish): Don't reset interface_unknown.
2599         (handle_pragma_interface): Don't set interface_only and
2600         interface_unknown; just the like-named fields in finfo.
2601         (handle_pragma_implementation): Adjust comment.
2602         * decl2.c (cp_finish_file): Don't reset interface_only and
2603         interface_unknown.
2604         * method.c (synthesize_method): Don't reset interface_unknown or
2605         call extract_interface_info.
2606         * pt.c (pop_tinst_level): Don't call extract_interface_info.
2607         * decl.c (start_cleanup_fn): Don't save or restore interface_only
2608         and interface_unknown.
2609         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
2610         and use the result instead of the interface_only/interface_unknown
2611         globals.
2612         (start_preparsed_function): Likewise.
2613         * lex.c (cxx_make_type): Likewise.
2614         * semantics.c (begin_class_definition): Likewise.
2615         (expand_body): Don't call extract_interface_info.
2617 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
2619         * decl.c (objc_mark_locals_volatile): Make description of
2620         routine more descriptive; only mark VAR_DECLs at each
2621         binding level.
2623 2004-09-10  Richard Henderson  <rth@redhat.com>
2625         PR c++/17386
2626         * call.c (build_vfield_ref): Move...
2627         * class.c (build_vfield_ref): ... here.  Convert datum to the
2628         primary base containing the vptr.
2629         (make_new_vtable): Simplify build_primary_vtable arguments.
2630         (finish_struct_1): Do not duplicate TYPE_VFIELD.
2631         * typeck.c (build_class_member_access_expr): Don't warn for
2632         null object access to base fields.
2634 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
2636         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
2637         New functions, to be called from ObjC++.
2639 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
2641         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
2642         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2643         comment typos.
2645 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
2647         * typeck.c (build_c_cast): Preserve the cast if casting
2648         to and from an Objective-C type.
2650 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
2652         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2653         * typeck.c: Include c-common.h.
2654         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2655         return the result if nonnegative.
2657 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
2659         * decl2.c (import_export_class)
2660         * lex.c (handle_pragma_interface):
2661         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2663 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
2665         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2666         * semantics.c: Include c-common.h.
2667         (finish_compound_stmt): Call objc_clear_super_receiver().
2669 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
2671         * cp-tree.h (do_poplevel): New prototype.
2672         * semantics.c (do_poplevel): Make externally visible.
2674 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
2676         * cp-tree.h (tree_pair_s): Define a GC'd vector.
2677         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2678         * semantics.c (deferred_access): Likewise.
2680 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
2682         * semantics.c (expand_body): Assert that we are not nested.
2684 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
2686         * decl.c (build_enumerator): Use add_double and int_fits_type_p
2687         instead of cp_build_binary_op, to avoid creating short-lived trees.
2688         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2689         lookahead instead of backtracking.  Move some code to avoid a
2690         conditional branch.
2691         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2692         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2693         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2694         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2696 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2698         * decl.c (grok_declarator): Remove a redundant semicolon.
2700         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2701         Correct comments describing function parameters.
2703 2004-09-03  Matt Austern  <austern@apple.com>
2704         Compile speed improvement.
2705         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2706         Otherwise define a stub macro that expands to nothing.
2707         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
2708         define a stub macro that expands to 0.
2709         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2710         (cp_lexer_stop_debugging): Likewise.
2711         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
2712         define a stub macro that expands to NULL.
2713         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2714         (cp_lexer_new_from_tokens): Likewise.
2716 2004-09-03  Jan Hubicka  <jh@suse.cz>
2718         * decl.c (finish_function): Clean out pointers we no longer need.
2720 2004-09-03  Jan Beulich  <jbeulich@novell.com>
2722         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2723         than "-lm".
2725 2004-09-02  Paul Brook  <paul@codesourcery.com>
2727         * decl2.c (determine_visibility): Only check data visibility
2728         for VAR_DECLS.
2730 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
2732         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2733         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2734         * decl2.c (determine_visibility): Honor
2735         TARGET_CXX_EXPORT_CLASS_DATA.
2737         * class.c (key_method): Rename to ...
2738         (determine_key_method): ... this.
2739         (finish_struct_1): Adjust accordingly.
2740         * cp-tree.h (key_method): Declare.
2741         * decl2.c (maybe_emit_vtables): Determine the key method here if
2742         it has not already been done.
2744 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
2746         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2747         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2748         (cp/cp-decl.c): Do not depend on gtype-cp.h.
2749         (cp/cp-objcp-common.o): New target.
2750         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2751         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2752         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2753         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2754         respectively.
2755         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2756         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2757         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2758         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2759         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2760         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2761         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2762         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2763         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2764         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2765         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2766         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2767         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2768         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2769         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2770         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2771         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2772         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2773         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2774         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2775         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2776         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2777         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2778         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2779         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2780         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2781         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2782         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2783         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2784         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2785         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2786         hooks to cp-objcp-common.h.
2787         (finish_file): New function.
2788         * cp-objcp-common.c: New file.
2789         * cp-objcp-common.h: New file.
2790         * cp-tree.h (cp_finish_file): New prototype.
2791         * decl.c: Do not include gtype-cp.h.
2792         * decl2.c (finish_file): Rename to cp_finish_file.
2794 2004-08-31  Richard Henderson  <rth@redhat.com>
2796         PR c++/17221
2797         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2798         (tsubst_copy_and_build): ... here.
2800 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
2802         * cp-tree.h (initialize_artificial_var): Declare.
2803         * decl.c (initialize_artifical_var): New function.
2804         * class.c (initialize_array): Remove.
2805         (initialize_vtable): Use initialize_artificial_var.
2806         (build_vtt): Likewise.
2807         (build_ctor_vtbl_group): Likewise.
2809 2004-08-30  Richard Henderson  <rth@redhat.com>
2811         * class.c (build_base_path): Use build_address directly.
2812         * typeck.c (build_unary_op): Don't lower &a.b to pointer
2813         arithmetic directly.
2814         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
2815         means !initializer_constant_valid_p.
2817 2004-08-30  Richard Henderson  <rth@redhat.com>
2819         * class.c (fixed_type_or_null): Use get_base_address before
2820         assuming an ADDR_EXPR is non-null.
2822 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
2824         * name-lookup.c (pop_binding, pushdecl,
2825         set_identifier_type_value_with_scope, push_overloaded_decl,
2826         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
2827         * parser.c (cp_parser_diagnose_invalid_type_name,
2828         cp_parser_postfix_expression, cp_parser_unary_expression,
2829         cp_parser_check_declarator_template_para): Likewise.
2830         * pt.c (push_inline_template_parms_recursive,
2831         check_explicit_specialization, convert_nontype_argument,
2832         coerce_template_template_parms, uses_template_parms,
2833         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
2834         tsubst_expr, instantiate_template,
2835         maybe_adjust_types_for_deduction, type_unification_real,
2836         resolve_overloaded_unification, template_decl_level,
2837         type_dependent_expression_p): Likewise.
2838         * search.c (lookup_base_r): Likewise.
2839         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
2840         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
2841         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
2842         * typeck.c (common_type, get_member_function_from_ptrfunc,
2843         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
2844         * typeck2.c (cxx_incomplete_type_diagnostic,
2845         split_nonconstant_init_1, store_init_value,
2846         process_init_constructor): Likewise.
2848 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
2850         * call.c (check_dtor_name): Replace abort with gcc_assert or
2851         gcc_unreachable.
2852         (build_call, add_builtin_candidate, build_new_op,
2853         convert_like_real, build_over_call, in_charge_arg_for_name,
2854         source_type, joust): Likewise.
2855         * class.c (build_simple_base_path, get_vcall_index,
2856         finish_struct_1, instantiate_type, get_enclosing_class,
2857         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
2858         * cp-gimplify.c (cp_genericize): Likewise.
2859         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
2860         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
2861         * decl.c (poplevel, make_unbound_class_template, reshape_init,
2862         check_special_function_return_type, grokdeclarator,
2863         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
2864         finish_function): Likewise.
2865         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
2866         * error.c (dump_global_iord, dump_decl, dump_template_decl,
2867         language_to_string): Likewise.
2868         * except.c (choose_personality_routine): Likewise.
2869         * friend.c (do_friend): Likewise.
2870         * g++spec.c (lang_specific_driver): Likewise.
2871         * init.c (build_zero_init, expand_default_init, build_new_1,
2872         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
2873         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
2874         * mangle.c (add_substitution, write_unscoped_name,
2875         write_template_prefix, write_identifier,
2876         write_special_name_destructor, write_type, write_builtin_type,
2877         write_expression, write_template_param,
2878         write_java_integer_type_codes): Likewise.
2879         * method.c (implicitly_declare_fn): Likewise.
2881 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
2883         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
2884         (BINFO_INDIRECT_PRIMARY_P): Remove.
2885         * class.c (determine_primary_base): Rename to ...
2886         (determine_primary_bases): ... here.  Set all primary bases.
2887         (set_primary_base): Remove.
2888         (mark_primary_bases): Remove.
2889         (build_simple_base_path, walk_subobject_offsets,
2890         propagate_binfo_offsets, end_of_class): Adjust.
2891         (layout_class_type): Rename determine_primary_base call.
2892         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
2893         to type_as_string.
2894         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
2895         build_rtti_vtbl_entries): Adjust.
2896         * init.c (build_vtbl_address): Adjust.
2898         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
2900 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
2902         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
2903         CXX_AND_OBJCXX_OBJS.
2904         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
2905         separately on the link line.
2907 2004-08-28  Jason Merrill  <jason@redhat.com>
2909         * decl.c (expand_static_init): Avoid bogus warnings.
2911 2004-08-27  Jason Merrill  <jason@redhat.com>
2913         PR c++/16851
2914         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
2916         PR c++/13684
2917         * decl.c (expand_static_init): Use thread-safety API.
2918         (register_dtor_fn): Return the call, don't expand it.
2919         * tree.c (add_stmt_to_compound): New fn.
2920         (stabilize_call): Use it.
2922 2004-08-27  Richard Henderson  <rth@redhat.com>
2924         * cp-tree.def (OFFSETOF_EXPR): New.
2925         * parser.c (cp_parser_builtin_offsetof): Either built an
2926         OFFSETOF_EXPR, or call fold_offsetof immediately.
2927         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
2929 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
2931         * call.c (validate_conversion_obstack): Replace
2932         my_friendly_assert with gcc_assert or gcc_unreachable.
2933         (direct_reference_binding, merge_conversion_sequences,
2934         build_user_type_conversion_1, perform_overload_resolution,
2935         build_op_delete_call, enforce_access, call_builtin_trap,
2936         build_over_call, build_special_member_call, build_new_method_call,
2937         initialize_reference): Likewise.
2938         * class.c (build_base_path, build_primary_vtable, alter_access,
2939         check_bases, update_vtable_entry_for_fn, layout_empty_base,
2940         clone_function_decl, adjust_clone_args,
2941         type_requires_array_cookie, include_empty_classes,
2942         finish_struct_1, resolve_address_of_overloaded_function,
2943         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
2944         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2945         accumulate_vtbl_inits, build_vtbl_initializer,
2946         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
2947         * cvt.c (build_up_reference, convert_to_reference): Likewise.
2948         * decl.c (poplevel, duplicate_decls, make_typename_type,
2949         cxx_init_decl_processing, reshape_init, check_initializer,
2950         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
2951         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
2952         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
2953         xref_basetypes, start_preparsed_function, save_function_data,
2954         finish_function, finish_method, maybe_register_incomplete_var,
2955         complete_vars): Likewise.
2956         * decl2.c (grok_array_decl, check_member_template,
2957         check_classfn, finish_static_data_member_decl, coerce_new_type,
2958         coerce_delete_type, import_export_class, decl_needed_p,
2959         determine_visibility, import_export_decl, build_cleanup,
2960         start_static_initialization_or_destructi, do_static_destruction,
2961         prune_vars_needing_no_initialization,
2962         build_offset_ref_call_from_tree): Likewise.
2963         * error.c (dump_decl, dump_expr): Likewise.
2964         * init.c (finish_init_stmts, build_zero_init,
2965         expand_virtual_init, expand_default_init, expand_aggr_init_1,
2966         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
2967         Likewise.
2968         * mangle.c (write_method_parms, write_template_args,
2969         write_expression, write_template_arg): Likewise.
2970         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
2971         * name-lookup.c (pop_binding, begin_scope, leave_scope,
2972         resume_scope, push_using_decl, validate_nonmember_using_decl,
2973         is_ancestor, poplevel_class, set_inherited_value_binding_p,
2974         push_class_level_binding, do_class_using_decl, push_namespace,
2975         pop_namespace, add_using_namespace, ambiguous_decl,
2976         lookup_namespace_name, lookup_type_current_level,
2977         maybe_process_template_type_declaration): Likewise.
2978         * parser.c (cp_lexer_peek_nth_token,
2979         cp_parser_parse_and_diagnose_invalid_typ,
2980         cp_parser_translation_unit, cp_parser_template_id,
2981         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
2982         * pt.c (push_access_scope, finish_member_template_decl,
2983         push_inline_template_parms_recursive, add_outermost_template_args,
2984         get_innermost_template_args, begin_explicit_instantiation,
2985         end_explicit_instantiation, retrieve_specialization,
2986         is_specialization_of, is_specialization_of_friend,
2987         register_specialization, check_explicit_specialization,
2988         comp_template_parms, process_template_parm,
2989         process_partial_specialization, convert_nontype_argument,
2990         coerce_template_template_parms, coerce_template_parms,
2991         mangle_class_name_for_template, lookup_template_function,
2992         lookup_template_class, instantiate_class_template, tsubst_decl,
2993         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
2994         instantiate_template, fn_type_unification, type_unification_real,
2995         get_template_base, regenerate_decl_from_template,
2996         template_for_substitution, instantiate_decl,
2997         get_mostly_instantiated_function_type, dependent_scope_ref_p,
2998         value_dependent_expression_p, resolve_typename_type): Likewise.
2999         * repo.c (repo_emit_p): Likewise.
3000         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3001         create_tinfo_types, emit_tinfo_decl): Likewise.
3002         * search.c (lookup_base_r, lookup_base, lookup_field_1,
3003         dfs_access_in_type, build_baselink, lookup_member,
3004         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3005         * semantics.c (perform_or_defer_access_check,
3006         finish_non_static_data_member, finish_stmt_expr_expr,
3007         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3008         finish_template_template_parm, finish_member_declaration,
3009         emit_associated_thunks): Likewise.
3010         * tree.c (build_target_expr_with_type, force_target_expr,
3011         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3012         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3013         cxx_sizeof_or_alignof_type, perform_integral_promotions,
3014         build_class_member_access_expr, finish_class_member_access_expr,
3015         build_ptrmemfunc_access_expr, build_unary_op,
3016         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3017         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3018         * typeck2.c (complete_type_check_abstract,
3019         abstract_virtuals_error, process_init_constructor,
3020         add_exception_specifier): Likewise.
3022 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
3024         * class.c (build_vtbl_initializer): Use ssize_int.
3025         * decl.c (complete_array_type): Likewise.
3026         * method.c (finish_thunk): Likewise.
3027         * search.c (get_dynamic_base_type): Likewise.
3029 2004-08-26  Richard Henderson  <rth@redhat.com>
3031         * cp-tree.h (DECL_FIELD_IS_BASE): New.
3032         * class.c (build_base_field): Set it.
3033         (build_simple_base_path): Use it.
3034         (fixed_type_or_null): Don't consider base fields definitive.
3036 2004-08-25  Roger Sayle  <roger@eyesopen.com>
3038         PR middle-end/16693
3039         PR tree-optimization/16372
3040         * decl.c (finish_enum): Make the precision of the enumerated type
3041         the same width as the underlying integer type.
3043 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
3045         PR c++/17155
3046         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3047         functions.
3049         * mangle.c (get_identifier_nocopy): Add cast.
3051         * cp-tree.h (mangle_type): Remove.
3052         * mangle.c (globals): GTY it.
3053         (mangle_obstack): New variable.
3054         (name_obstack): Likewise.
3055         (name_base): Likewise.
3056         (write_char): Adjust accordingly.
3057         (write_chars): Likewise.
3058         (write_string): Likewise.
3059         (start_mangling): Initialize G.substitutions only one.  Add
3060         ident_p parameter.
3061         (finish_mangling): Use VARRAY_CLEAR to reclaim
3062         storage in G.substitutions.  Use obstack_finish.
3063         (init_mangle): Adjust for changes to variable names above.
3064         Initialize G.substitutions.
3065         (mangle_decl_string): Adjust call to start_mangling.
3066         (get_identifier_nocopy): New function.
3067         (mangle_decl): Use it.
3068         (mangle_type_string): Adjust call to start_mangling.
3069         (mangle_special_for_type): Likewise.
3070         (mangle_vtt_for_type): Likewise.
3071         (mangle_ctor_vtbl_for_type): Likewise.
3072         (mangle_thunk): Likewise.
3073         (mangle_guard_variable): Likewise.
3074         (mangle_ref_init_variable): Likewise.
3076 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3078         PR c++/14428
3079         * pt.c (redeclare_class_template): Check the type of non-type and
3080         template template parameter.
3082 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3084         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
3085         (build_user_type_conversion_1, convert_like_real,
3086         build_java_interface_fn_ref, build_special_member_call): Likewise.
3087         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
3088         * cp-gimplify.c (cp_gimplify_expr): Likewise.
3089         * cvt.c (cp_convert_to_pointer): Likewise.
3090         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3091         * decl2.c (start_static_initialization_or_destruction,
3092         generate_ctor_or_dtor_function): Likewise.
3093         * except.c (build_throw): Likewise.
3094         * mangle.c (write_integer_cst): Likewise.
3095         * method.c (finish_thunk): Likewise.
3096         * rtti.c (build_headof, get_tinfo_decl_dynamic,
3097         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3098         get_pseudo_ti_init): Likewise.
3099         * search.c (get_dynamic_cast_base_type): Likewise.
3101 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
3103         * class.c, search.c: Remove references to DWARF_DEBUG.
3105 2004-08-25  Adam Nemet  <anemet@lnxw.com>
3107         * repo.c (extract_string): Reset backquote after one character.
3108         (get_base_filename): Fix indentation.
3110 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3112         * decl.c (cxx_init_decl_processing): Adjust
3113         build_common_tree_nodes call.
3115 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3117         PR c++/16889
3118         * (is_subobject_of_p): Resurrect & optimize.
3119         (lookup_field_r): Use it.
3121 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3123         PR c++/16706
3124         * search.c (friend_accessible_p): Increment processing_template_decl
3125         when deal with TEMPLATE_DECL of SCOPE.
3127 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3129         PR c++/17149
3130         * semantics.c (check_accessibility_of_qualified_id): Defer check
3131         if qualifying_type is a template parameter.
3133 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
3135         PR c++/17163
3136         * pt.c (instantiate_decl): Do not try to apply
3137         DECL_DECLARED_INLINED_P to a VAR_DECL.
3139         * search.c (build_baselink): Fix typo in comment.
3141 2004-08-22 Andrew Pinski  <apinski@apple.com>
3143         Revert:
3144         2004-08-22  Andrew Pinski  <apinski@apple.com>
3145         PR c++/14029
3146         * typeck.c (build_unary_op): Use &a.b if the folded lowered
3147         expression is not constant.
3149 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3151         * name-lookup.c (pushdecl): Rename build_type_copy call.
3152         * tree.c (cp_build_qualified_type_real,
3153         build_exception_variant, handle_java_interface_attribute): Likewise.
3155 2004-08-22  Andrew Pinski  <apinski@apple.com>
3157         PR c++/14029
3158         * typeck.c (build_unary_op): Use &a.b if the folded lowered
3159         expression is not constant.
3161 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
3163         PR c++/17121
3164         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
3166 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
3168         PR c++/17120
3169         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
3170         MODOP_EXPR.
3172 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3174         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
3175         before calling comp_template_args.
3177 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
3179         * class.c (build_vtbl_initializer): Use build_int_cst for
3180         negative size types.
3181         * decl.c (complete_array_type): Likewise.
3182         * method.c (finish_thunk): Likewise.
3184 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
3186         * tree.c: Remove unused mark_local_for_remap_r.
3188 2004-08-19  Eric Christopher  <echristo@redhat.com>
3190         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
3191         * tree.c (cxx_unsave_expr_now): Delete.
3192         (cp_unsave_r): Ditto.
3194 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
3196         PR c++/15890
3197         * pt.c (push_template_decl_real): Disallow template allocation
3198         functions with fewer than two parameters.
3200 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
3202         * cp-tree.h (build_shared_int_cst): Remove.
3203         * tree.c (shared_int_cache): Remove.
3204         (build_shared_int_cst): Remove.
3205         * class.c (finish_struct_1): Use build_int_cst.
3207 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
3209         * decl.c (finish_enum): Do not copy value node early, copy
3210         later.
3211         * lex.c (cxx_init): Force null_node to be unique.
3213 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
3215         PR c++/17041
3216         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
3217         from input for MODOP_EXPR.
3219 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
3221         * pt.c (dependent_template_p): Fix typo in commment.
3223         PR c++/17068
3224         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
3225         dependent.
3227 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
3229         PR c++/16246
3230         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
3231         arguments have the same type as the corresponding parameter.
3233         PR c++/16215
3234         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
3235         is set use it for diagnostic purposes.
3236         (cp_parser_pseudo_destructor_name): Remove special-case error
3237         message.
3239         PR c++/15871
3240         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3242         PR c++/16965
3243         * cp-tree.h (qualified_name_lookup_error): Add parameter.
3244         * name-lookup.c (do_class_using_decl): Restrict set of entities
3245         passed to cp_emit_debug_info_for_using more carefully.
3246         (lookup_qualified_name): Allow lookup_member to return sets of
3247         ambiguous entries.
3248         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3249         (cp_parser_primary_expression): Handle ambiguous lookups.
3250         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3251         (cp_parser_template_argument): Likewise.
3252         (cp_parser_elaborate_type_specifier): Likewise.
3253         (cp_parser_namespace_name): Likewise.
3254         (cp_parser_class_name): Likewise.
3255         (cp_parser_lookup_name_simple): Likewise.
3256         * pt.c (tsubst_qualified_id): Handle ambiguous results.
3257         (tsubst_expr): Likewise.
3258         * semantics.c (qualified_name_lookup_error): Add decl paramter.
3259         For ambiguous lookups, print candidates.
3261 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3263         PR c++/6749
3264         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
3265         return anything.
3266         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3267         * decl2.c (finish_file): Adjust call to
3268         instantiate_pending_templates.
3270 2004-08-15  Roger Sayle  <roger@eyesopen.com>
3272         * call.c (build_vfield_ref, build_call, build_conditional_expr,
3273         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3274         build_java_interface_fn_ref, build_special_member_call,
3275         build_new_method_call, initialize_reference): Replace calls to
3276         build with calls to buildN.
3277         * class.c (build_base_path, convert_to_base_statically,
3278         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3279         build_vtbl_initializer): Likewise.
3280         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
3281         gimplify_if_stmt, cp_genericize_r): Likewise.
3282         * cvt.c (convert_to_void): Likewise.
3283         * decl.c (check_initializer, finish_constructor_body,
3284         finish_destructor_body): Likewise.
3285         * error.c (dump_expr): Likewise.
3286         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
3287         Likewise.
3288         * init.c (perform_member_init, expand_virtual_init,
3289         expand_cleanup_for_base, build_init, expand_default_init,
3290         build_offset_ref, decl_constant_value, build_new, build_new_1,
3291         build_vec_delete_1, build_vec_init, build_delete,
3292         push_base_cleanups, build_vec_delete): Likewise.
3293         * mangle.c (write_integer_cst): Likewise.
3294         * method.c (thunk_adjust, do_build_copy_constructor,
3295         do_build_assign_ref): Likewise.
3296         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
3297         unify, build_non_dependent_expr): Likewise.
3298         * rtti.c (build_headof, build_typeid, ifnonnull,
3299         build_dyanmic_cast_1, tinfo_base_init): Likewise.
3300         * semantics.c (begin_compound_stmt, finish_call_expr,
3301         finish_pseudo_destructor_expr, finish_id_expression,
3302         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
3303         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
3304         array_type_nelts_total, stabilize_call): Likewise.
3305         * typeck.c (decay_conversion, build_class_member_access_expr,
3306         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
3307         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
3308         build_x_unary_op, build_unary_op, unary_complex_lvalue,
3309         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
3310         check_return_expr): Likewise.
3311         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
3312         split_nonconstant_init, store_init_value, build_m_component_ref):
3313         Likewise.
3315 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3317         * call.c (convert_class_to_reference,
3318         build_user_type_conversion_1, convert_like_real,
3319         build_java_interface_fn_ref, build_special_member_call): Use
3320         build_int_cst.
3321         * class.c (build_vtbl_initializer): Likewise.
3322         * cp-gimplify.c (cp_gimplify_expr): Likewise.
3323         * cvt.c (cp_convert_to_pointer): Likewise.
3324         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3325         * decl2.c (start_static_initialization_or_destruction,
3326         generate_ctor_or_dtor_function): Likewise.
3327         * except.c (build_throw): Likewise.
3328         * lex.c (cxx_init): Likewise.
3329         * mangle.c (write_integer_cst): Likewise.
3330         * rtti.c (build_headof, get_tinfo_decl_dynamic,
3331         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3332         get_pseudo_ti_init): Likewise.
3333         * search.c (get_dynamic_cast_base_type): Likewise.
3334         * tree.c (build_shared_int_cst): Likewise.
3336 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
3338         PR c++/16273
3339         * class.c (count_depth_data): New type.
3340         (dfs_depth_post): New function.
3341         (dfs_depth_q): Likewise.
3342         (find_final_overrider_data_s): Change type of vpath.
3343         Add vpath_list.
3344         (dfs_find_final_overrider_1): New function.
3345         (dfs_find_final_overrider): Use it.
3346         (dfs_find_final_overrider_q): Adjust use of vpath.
3347         (dfs_find_final_overrider_post): Likewise.
3348         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
3349         vpath_list.
3351 2004-08-12 Jan Beulich <jbeulich@novell.com>
3353         * parser.c (cp_parser_asm_definition): Properly consume scope operator
3354         tokens preceding the clobbers. Don't check for scope operator
3355         following inputs. Simplify inputs handling to match that now used for
3356         clobbers.
3358 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
3360         PR c++/16698
3361         * except.c (build_throw): Allocate cleanup_type and the function
3362         for __cxa_throw separately.
3364         PR c++/16853
3365         * call.c (standard_conversion): Do not accept conversions between
3366         pointers to members if the class types are unrelated.
3368         PR c++/16618
3369         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
3370         char &" instead of just "char &".
3372         PR c++/16870
3373         * pt.c (tsubst): Just return the unknown_type_node.
3375 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
3377         PR c++/16964
3378         * parser.c (cp_parser_class_specifier): Robustify.
3380         PR c++/16904
3381         * pt.c (tsubst_copy_and_build): Complain about invalid
3382         qualification.
3384         PR c++/16929
3385         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
3386         current_class_ref while tsubsting.
3388 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
3390         PR c++/16971
3391         * parser.c (cp_parser_init_declarator): Robustify.
3393 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
3395         * typeck2.c (process_init_constructor): Guard the missing field warning
3396         with warn_missing_field_initializers rather than extra_warnings.
3398 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
3400         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
3402 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
3404         * decl.c (start_preparsed_function): Move determine_visibility
3405         call.
3406         * decl2.c (determine_visibility): Incorporate dllexport testing.
3408 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
3410         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
3411         means that libstdc++ is needed.
3413 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
3415         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
3417 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
3419         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
3420         than passing it as a parameter to rest_of_decl_compilation.
3421         * decl2.c (grokfield): Use set_user_assembler_name.
3423 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
3425         * decl.c (complete_array_type): Don't gratuitously copy
3426         maxindex. Its type is always set.
3428 2004-08-04  Paul Brook  <paul@codesourcery.com>
3430         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
3431         * cp-tree.h (struct language_function): Rename x_dtor_label to
3432         x_cdtor_label.
3433         (dtor_label): Rename ...
3434         (cdtor_label): ... to this.
3435         * decl.c (begin_constructor_body): Remove.
3436         (check_special_function_return_type): Maybe change the return type.
3437         (grokdeclarator): Pass the class type.
3438         (start_preparsed_function): Constructors may need a return label.
3439         (finish_constructor_body, finish_destructor_body): Set the return
3440         value.
3441         (begin_function_body): Don't call begin_constructor_body.
3442         (finish_function): Don't warn for constructors or destructors.
3443         (implicitly_declare_fn): Maybe change the return type.
3444         * optimize.c: Include target.h.
3445         (maybe_clone_body): Remap the function result.
3446         * semantics.c: Include target.h.
3447         (finish_return_stmt): Maybe jump to return label for constructors.
3449 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
3451         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
3452         (check_field_decls): Or here.
3453         (check_methods): Or here.
3454         (initialize_array): Don't mess with DECL_CONTEXT.
3455         * cp-tree.h (start_decl): Adjust prototype.
3456         (determine_visibility): New function.
3457         * decl.c (duplicate_decls): Remove checks for hidden "operator
3458         new".
3459         (build_library_fn_1): Give all library functions default
3460         visibility.
3461         (start_decl): Add pop_scope_p parameter.  Tidy.
3462         (cp_finish_decl): Do not pop scopes here.  Call
3463         determine_visibility for variable definitions.
3464         (start_preparsed_function): Call determine_visibility.
3465         * decl2.c (determine_visibility): New function.
3466         * method.c (use_thunk): Fix formatting.
3467         * parser.c (cp_parser_condition): Adjust calls to start_decl.
3468         (cp_parser_init_declarator): Likewise.
3469         * pt.c (instantiate_decl): Always call pop_nested_class.
3470         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
3471         (tinfo_base_init): Likewise.
3473 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
3475         PR c++/16707
3476         * name-lookup.c (validate_nonmember_using_decl): Robustify.
3478 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
3480         PR c++/16224
3481         * name-lookup.c (decl_namespace): Remove.
3482         (current_decl_namespace): Use decl_namespace_context instead of
3483         decl_namespace.
3484         (push_decl_namespace): Likewise.
3485         (arg_assoc_class): Likewise.
3486         (arg_assoc_type): Likewise.
3487         * pt.c (check_specialization_namespace): New function.
3488         (maybe_process_partial_specialization): Use it.
3489         (register_specialization): Likewise.
3491         PR c++/16489
3492         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
3493         * call.c (null_ptr_cst_p): Handle variables with constant
3494         initializers.
3495         * pt.c (convert_nontype_argument): Use
3496         DECL_INTEGRAL_CONSTANT_VAR_P.
3497         * semantics.c (finish_id_expression): Likewise.
3499         PR c++/16529
3500         * decl.c (duplicate_decls): Reject duplicate namespace
3501         declarations.
3503         PR c++/16810
3504         * typeck.c (build_ptrmemfunc): Loosen assertion.
3506 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3508         * call.c (z_candidate::template_decl): Rename from template.
3509         (add_template_candidate_real): Adjust member reference.
3510         (joust): Likewise.
3512 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
3514         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
3515         (lang_decl_flags): Narrow the width of "languages".  Add
3516         repo_available_p.
3517         (DECL_NEEDED_P): Remove.
3518         (FOR_EACH_CLONE): New macro.
3519         (DECL_REPO_AVAILABLE_P): Likewise.
3520         (DECL_TINFO_P): Likewise.
3521         (set_linkage_according_to_type): Declare.
3522         (import_export_vtable): Remove.
3523         (import_export_tinfo): Likewise.
3524         (mark_needed): New function.
3525         (decl_needed_p): Likewise.
3526         (note_vauge_linkage_fn): Likewise.
3527         (init_repo): Change prototype.
3528         (repo_template_used): Remove.
3529         (repo_template_instantiated): Likewise.
3530         (repo_emit_p): New function.
3531         (repo_export_class_p): Likewise.
3532         (no_linkage_check): Change prototype.
3533         * class.c (set_linkage_according_to_type): New function.
3534         (build_vtable): Use it.  Do not call import_export_vtable.  Set
3535         DECL_IGNORED_P if appropriate.
3536         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
3537         (make_rtL_for_nonlocal_decls): Check for template instantiations
3538         explicitly.
3539         (grokfndecl): Adjust call to no_linkage_check.
3540         (set_linkage_for_static_data_member): New function.
3541         (grokvardecl): Use it.  Adjust call to no_linkage_check.
3542         (grokdeclarator): Use set_linkage_for_static_data_member.
3543         * decl2.c (note_vague_linkage_fn): New function.
3544         (note_vague_linkage_var): Likewise.
3545         (finish_static_data_member_decl): Use it.
3546         (import_export_vtable): Remove.
3547         (import_export_class): Use repo_export_class_p.
3548         (var_finalized_p): Simplify.
3549         (maybe_emit_vtables): Simplify.
3550         (mark_needed): New function.
3551         (decl_needed_p): Likewise.
3552         (import_export_decl): Add documentation and consistency checks.
3553         Use repo_emit_p.  Handle virtual tables and RTTI information
3554         here.
3555         (import_export_tinfo): Remove.
3556         (write_out_vars): Call import_export_decl.
3557         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
3558         whenever one is.
3559         (finish_file): Use decl_needed_p.  Do not call import_export_decl
3560         for undefined static data members.  Do not warn about undefined
3561         inlines when using a repository.
3562         (mark_used): Use note_vague_linkage_fn.  Always defer template
3563         instantiations.
3564         * lex.c (cxx_init): Adjust call to init_repo.  Always set
3565         flag_unit_at_a-time.
3566         * method.c (synthesize_method): Remove unncessary
3567         import_export_decl call.
3568         (implicitly_declare_fn): Use set_linkage_according_to_type.
3569         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
3570         * pt.c (instantiate_class_template): Don't redundantly add classes
3571         to keyed_classes.  Don't call repo_template_used.
3572         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
3573         templates with internal linkage.
3574         (check_instantiated_args): Adjust call to no_linkage_check.
3575         (instantiate_template): Use FOR_EACH_CLONE.
3576         (mark_definable): New function.
3577         (mark_decl_instantiated): Use it.
3578         (do_decl_instantiation): Adjust tests for explicit instantiation
3579         after "extern template".
3580         (instantiate_class_member): Do not use repo_template_instantiated.
3581         (do_type_instantiation): Simplify.
3582         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
3583         Simplify.
3584         * repo.c (repo_get_id): Remove.
3585         (original_repo): Remove.
3586         (IDENTIFIER_REPO_USED): Remove.
3587         (IDENTIFIER_REPO_CHOSEN): Remove.
3588         Remove all #if 0'd code.
3589         (repo_template_used): Remove.
3590         (repo_template_instantiated): Remove.
3591         (temporary_obstack_initialized_p): New variable.
3592         (init_repo): Register with lang_post_pch_load.  Avoid creating
3593         identifiers unnecessarily.  Don't use original_repo.  Close the
3594         file here.
3595         (reopen_repo_file_for_write): Not here.
3596         (finish_repo): Always write out a new repository file.
3597         (repo_emit_p): New function.
3598         (repo_export_class_p): Likewise.
3599         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
3600         (involves_incomplete_p): New function.
3601         (tinfo_base_init): Use it.
3602         (ptr_initializer): Remove non_public_ptr parameter.
3603         (ptm_initializer): Likewise.
3604         (get_pseudo_ti_init): Likewise.
3605         (unemitted_tinfo_decl_p): Remove.
3606         (emit_tinfo_decl): Use import_export_decl.
3607         * semantics.c (expand_body): Move updates of static_ctors and
3608         static_dtors to ...
3609         (expand_or_defer_fn): ... here.
3610         * tree.c (no_linkage_check): Add relaxed_p parameter.
3612 2004-07-28  Eric Christopher  <echristo@redhat.com>
3614         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3616 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
3618         * cp-tree.h (struct tree_pair_s): New.
3619         (typedef tree_pair_p): New.
3620         (DEF_VEC_O(tree_pair_s)): New.
3621         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
3622         (CLASSTYPE_VCALL_INDICES): Update documentation.
3623         * class.c (get_vcall_index): Adjust.
3624         (add_vcall_offset): Adjust.
3626 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
3628         * pt.c, typeck.c: Remove spurious carriage returns.
3630 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3632         PR c++/14429
3633         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
3634         when the type of ARG is not dependent.
3636 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
3638         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
3639         (lang_specific_driver): If the C++ or math library options don't
3640         start with '-l', don't count them as added libraries.
3642 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
3644         * decl.c (xref_basetypes): Adjust base access vector creation.
3645         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
3646         access accesses.
3647         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
3649 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
3650             Brian Ryner  <bryner@brianryner.com>
3652         PR c++/15000
3653         PR c++/9283
3654         * class.c (check_field_decls): Apply hidden visibility if
3655         -fvisibility-inlines-hidden and inlined unless otherwise specified
3656         (build_vtable): Set vtable visibility to class visibility.
3657         (check_field_decls): Default static member visibility to class
3658         visibility.
3659         (check_methods): Default method visibility to class visibility.
3660         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
3661         CLASSTYPE_VISIBILITY_SPECIFIED macro.
3662         * decl.c (duplicate_decls): New logic for merging definition decls
3663         with declaration decls. Added ignore & warning when non default
3664         applied to global operator new or delete.
3665         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
3666         wherever VISIBILITY was changed
3667         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
3668         visibility.
3669         (tinfo_base_init): Set typeinfo name visibility to class visibility.
3671 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
3673         * decl.c: Rename all identifiers named `class' to `cl'.
3674         * cp-tree.h: Likewise.
3676 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3678         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
3679         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
3680         * name-lookup.c (binding_entry_make): Use GGC_NEW.
3681         (binding_table_construct): Use GGC_CNEWVEC.
3682         (binding_table_new): Use GGC_NEW.
3683         (cxx_binding_make): Likewise.
3684         (begin_scope): Likewise.
3685         (push_to_top_level): Use GCC_CNEW.
3686         * parser.c (cp_token_cache_new): Likewise.
3687         (cp_token_cache_push_token): Likewise.
3688         (cp_lexer_new_main): Likewise.
3689         (cp_lexer_new_from_tokens): Likewise.
3690         (cp_parser_context_new): Likewise.
3691         (cp_parser_new): Likewise.
3692         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
3693         * lex.c (cxx_make_type): Use GGC_CNEW.
3694         (retrofit_lang_decl): Use GGC_NEWVAR.
3695         (cxx_dup_lang_specific_decl): Likewise.
3696         (copy_lang_type): Likewise.
3697         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
3698         (save_function_data): Likewise.
3699         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
3700         (cxx_push_function_context): Likewise.
3702 2004-07-25  Richard Henderson  <rth@redhat.com>
3704         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
3705         DECL_IGNORED_P on RESULT_DECL.
3706         * semantics.c (finalize_nrv): Copy them too.
3708 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
3710         * search.c (lookup_conversion_operator): Avoid two loops.
3711         (add_conversions): Remove.
3712         (check_hidden_convs, split_conversions,
3713         lookup_conversions_r):  New.
3714         (lookup_conversions): Use lookup_conversions_r.
3716 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
3718         * pt.c (get_template_base): Check type is completable.
3720 2004-07-21  Eric Christopher  <echristo@redhat.com>
3722         * decl.c (poplevel): Inline unused variable checking.
3723         Change formatting.
3725 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
3727         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
3728         integer vectors.
3730 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3732         PR c++/14497
3733         * pt.c (check_explicit_specialization): Remove extension to accept
3734         specializations without template headers. Fall-through to normal
3735         processing.
3737 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3739         PR c++/509
3740         * pt.c (determine_specialization): New parameter template_count.
3741         Disambiguate between member templates and member functions counting
3742         the template headers.
3743         (check_explicit_specialization): Update caller.
3744         (tsubst_friend_function): Likewise.
3746 2004-07-20  Steven Bosscher  <stevenb@suse.de>
3748         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
3749         * cp-tree.h (tinst_level_t): New tree type.
3750         (union lang_tree_node): Handle it.
3751         (TINST_LOCATION): New accessor macro.
3752         (make_tinst_level): New prototype.
3753         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
3754         * decl.c (cp_tree_node_structure): Likewise.
3755         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
3756         (print_instantiation_partial_context): Likewise.
3757         * pt.c (pop_tinst_level): Likewise.
3758          (push_tinst_level): Use make_tinst_level.
3759         * tree.c (make_tinst_level): New function.
3760         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
3762 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
3764         * parser.c (cp_parser_simple_type_specifier): Fix typo.
3766         PR c++/16637
3767         * parser.c (cp_parser_simple_type_specifier): Do not record usage
3768         of globally-qualified names.
3770 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3772         PR c++/16175
3773         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
3774         cv qualifier.
3776 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
3778         PR c++/16623
3779         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3780         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3781         * class.c (add_implicitly_declared_members): Use
3782         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3783         * method.c (lazily_declare_fn): Clear
3784         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3785         * search.c (lookup_fnfields_1): Check it.
3787 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3789         * cp-tree.h (vec_binfo_member): Remove.
3790         * tree.c (vec_binfo_member): Remove.
3792         * cp-tree.h (struct lang_type_class): Remove vfields field.
3793         (CLASSTYPE_VFIELDS): Remove.
3794         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3795         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
3796         handling.
3797         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
3798         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
3799         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
3801 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3803         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
3804         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3805         Moved to common.
3806         (BINFO_LANG_SLOTS): Remove.
3807         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
3808         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
3809         * class.c (check_bases): Adjust BINFO accessors.
3810         (determine_primary_base, finish_struct_bits,
3811         maybe_warn_about_overly_private_class, warn_hidden,
3812         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
3813         warn_about_ambiguous_bases, get_vfield_name,
3814         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
3815         add_vcall_offset_vtbl_entries_r): Likewise.
3816         * dump.c (cp_dump_tree): Likewise.
3817         * init.c (sort_mem_initializers, expand_member_init, build_delete,
3818         push_base_cleanups): Likewise.
3819         * method.c (do_build_copy_constructor, do_build_assign_ref,
3820         synthesize_exception_spec): Likewise.
3821         name-lookup.c (arg_assoc_class): Likewise.
3822         * pt.c (instantiate_class_template,
3823         get_template_base_recursive): Likewise.
3824         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
3825         * typeck2.c (process_init_constructor): Likewise.
3826         * search.c (lookup_base_r, dynamic_cast_base_recurse,
3827         dfs_access_in_type, dfs_walk_real, look_for_overrides,
3828         types_overlap_p, copied_binfo, original_binfo): Likewise.
3829         (binfo_for_vtable): Remove
3831 2004-07-20  Steven Bosscher  <stevenb@suse.de>
3833         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
3834         thunk_alias, and the access and virtual_offset fields.
3835         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
3836         * decl.c (finish_case_label): Update c_add_case_node call.
3838 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
3840         Revert patch for PR c++/16623.
3842 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
3844         * except.c: Remove two spurious carriage returns.
3846 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
3848         PR c++/16623
3849         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3850         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3851         * class.c (add_implicitly_declared_members): Use
3852         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3853         * method.c (lazily_declare_fn): Clear
3854         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3855         * search.c (lookup_fnfields_1): Check it.
3857 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
3859         * class.c (add_method): Delay adding the slot until the end.
3860         (determine_primary_base): Adjust VEC_iterate invokation.
3861         (resort_type_method_vec, finish_struct_methods, warn_hidden,
3862         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
3863         build_vtbl_initializer): Likewise.
3864         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
3865         build_vbase_delete): Likewise.
3866         * method.c (do_build_copy_constructor): Likewise.
3867         * name-lookup.c (new_class_binding, print_binding_level,
3868         poplevel_class, store_class_bindings, push_to_top_level,
3869         pop_from_top_level): Likewise.
3870         * pt.c (check_explicit_specialization): Likewise.
3871         * search.c (lookup_conversion_operator, lookup_fnfields_1,
3872         get_pure_virtuals, add_conversions, dfs_check_overlap,
3873         binfo_for_vbase): Likewise.
3875 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3877         PR c++/12170
3878         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
3879         innermost set of template arguments during deduction.  Simplify.
3881 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
3883         * typeck.c (build_modify_expr, build_x_modify_expr): Set
3884         TREE_NO_WARNING on assignments with an operator other than '='.
3886 2004-07-10  Steven Bosscher  <stevenb@suse.de>
3887             Joseph S. Myers  <jsm@polyomino.org.uk>
3889         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
3890         * decl2.c (grokfield): Don't check current_class_depth via
3891         unused TREE_COMPLEXITY.
3892         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
3893         to avoid the missing parentheses warning.
3894         Don't set C_SET_EXP_ORIGINAL_CODE.
3896 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
3898         * tree.c (no_linkage_helper): Remove.
3899         (no_linkage_check): Don't use walk_tree_without_duplicates.
3901         * mangle.c (write_expression): Issue a sorry for zero-operand
3902         functional casts.
3904 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3906         PR c++/13092
3907         * init.c (build_offset_ref): Build SCOPE_REF with non-null
3908         TREE_TYPE for non-dependent names.
3909         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
3910         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3911         unknown_type_node as its TREE_TYPE.
3912         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3913         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3914         (dump_expr) <SCOPE_REF case>: Likewise.
3916 2004-07-17  Jason Merrill  <jason@redhat.com>
3918         PR c++/16115
3919         * call.c (type_passed_as): Make the invisible reference type
3920         __restrict.
3921         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
3922         cp_genericize_r.  Handle invisible reference lowering.
3923         (is_invisiref_parm): New fn.
3924         (cp_genericize): Adjust the types of invisible reference parms.
3925         Don't repeat the walk for clones.
3926         * decl.c (store_parm_decls): Don't generate any code for clones.
3928 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3930         * cp-tree.h (builtin_function): Declare.
3932 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
3934         * class.c (finish_struct_methods): Remove unncessary code.
3935         (add_implicitly_declared_members): Create declarations for default
3936         constructors and copy constructors lazily.
3937         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
3938         lazy_copy_ctor.
3939         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
3940         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
3941         * decl2.c (check_classfn): Robustify.
3942         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
3943         (locate_ctor): Handle lazy default constructors.
3944         (locate_copy): Handle lazy copy constructors.
3945         (implicitly_declare_fn): Make sure we're looking at the
3946         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
3947         set TYPE_HAS_CONSTRUCTOR.
3948         (lazily_declare_fn): New function.
3949         * name-lookup.c (constructor_name_full): Simplify.
3950         * search.c (lookup_fnfields_1): Lazily create methods, as
3951         necessary.
3952         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
3954 2004-07-16  Steven Bosscher  <stevenb@suse.de>
3956         * cp-tree.h (struct lang_type): Don't have three GTY options on a
3957         single bit GTY desc.
3959 2004-07-16  Richard Henderson  <rth@redhat.com>
3961         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
3962         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
3963         * tree.c (cp_copy_res_decl_for_inlining): Remove.
3965 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
3967         * class.c (finish_struct_bits): Use for loop.
3968         (propagate_binfo_offsets): Do primary binfo outside of loop.
3970         PR c++/16583
3971         * dump.c (cp_dump_tree): Don't dump the bases if there's no
3972         binfo.
3974         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
3976 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
3978         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
3979         has_abstract_assign_ref.  Make methods a VEC(tree) *.
3980         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
3981         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
3982         (CLASSTYPE_DESTRUCTORS): Likewise.
3983         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
3984         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3985         (add_method): Change prototoype.
3986         * class.c (add_method): Remove error_p parameter.  Adjust for
3987         changes to CLASSTYPE_METHOD_VEC.
3988         (handle_using_decl): Adjust call to add_method.
3989         (maybe_warn_about_overly_private_class): Adjust for
3990         changes to CLASSTYPE_METHOD_VEC.
3991         (resort_type_method_vec): Likewise.
3992         (finish_struct_methods): Likewise.
3993         (check_for_override): Likewise.
3994         (warn_hidden): Likewise.
3995         (add_implicitly_declared_members): Defer creation of assignment
3996         operators.  Adjust call to add_method.
3997         (clone_function_decl): Adjust call to add_method.
3998         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
3999         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
4000         * decl.c (grok_special_member_properties): Don't set
4001         TYPE_HAS_ABSTRACT_ASSIGN_REF.
4002         * decl2.c (check_classfn): Adjust for
4003         changes to CLASSTYPE_METHOD_VEC.
4004         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
4005         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
4006         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
4007         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
4008         cp_finish_decl.
4009         * pt.c (check_explicit_specialization): Adjust for
4010         changes to CLASSTYPE_METHOD_VEC.
4011         (instantiate_class_template): Do not set
4012         TYPE_HAS_ABSTRACT_ASSIGN_REF.
4013         * ptree.c (cxx_print_type): Don't try to print
4014         CLASSTYPE_METHOD_VEC.
4015         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
4016         * search.c (lookup_field_r): Adjust for
4017         changes to CLASSTYPE_METHOD_VEC.
4018         (lookup_fnfields): Likewise.
4019         (lookup_conversion_operator): Likewise.
4020         (lookup_fnfields_1): Likewise.  Create assignment operators
4021         lazily.
4022         (look_for_overrides_here): Adjust for
4023         changes to CLASSTYPE_METHOD_VEC.
4024         (add_conversions): Likewise.
4025         * semantics.c (finish_member_declaration): Adjust call to add_method.
4027 2004-07-15  Jason Merrill  <jason@redhat.com>
4029         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4030         references and pointers are compatible.
4032 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
4034         * decl.c (xref_basetypes): Refactor.
4035         * tree.c (copy_base_binfos): Replace with ...
4036         (copy_binfo): ... this. Deep copy the given binfo, (not the just
4037         bases of the given base).
4038         * cp-tree.h (copy_base_binfo): Remove.
4039         (copy_binfo): Declare.
4041 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
4043         * name-lookup.c (set_inherited_value_binding_p): Add class_type
4044         parameter.
4045         (get_class_binding): Adjust.
4046         (push_class_level_binding): Don't use set_inherited_value_binding_p.
4048 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
4050         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4051         * decl.c (xref_basetypes): Set it here.
4053         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4054         Don't check for incomplete base.
4055         (get_vfield_name): Simplify while loop.
4056         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
4058 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
4060         * lex.c (cxx_make_type): Remove call to get_pointer_type.
4062         * cp-tree.h (IDENTIFIER_VALUE): Remove.
4063         (BINFO_PUSHDECLS_MARKED): Likewise.
4064         (maybe_inject_for_scope_var): Likewise.
4065         (push_class_decls): Likewise.
4066         * name-lookup.h (push_class_binding): Remove.
4067         (innermost_non_namespace_value): New function.
4068         (outer_binding): Likewise.
4069         * class.c (add_method): Push bindings before adding to
4070         TYPE_METHODS.
4071         (restore_class_cache): Do not restore class_shadowed.
4072         (pushclass): Do not add USING_DECLs.  Do not call
4073         push_class_decls.
4074         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
4075         * decl.c (pushdecl): Use outer_binding.
4076         (poplevel): Set the scope for an out-of-scope for-loop declaration
4077         appropriately.
4078         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
4079         * name-lookup.c (new_class_binding): New function.
4080         (push_binding): Use it.
4081         (pushdecl): Use innermost_non_namespace_value.
4082         (maybe_inject_for_scope_var): Remove.
4083         (push_class_binding): Remove.
4084         (set_inherited_value_binding_p): New function.
4085         (get_class_binding): New function.
4086         (push_class_level_binding): Assert that the current_class_type is
4087         being defined.
4088         (outer_binding): New function.
4089         (innermost_non_namespace_value): Likewise.
4090         (lookup_name_real): Use outer_binding.
4091         (lookup_name_current_level): Ignore out-of-scope variables.
4092         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
4093         (lookup_template_class): Likewise.
4094         * search.c (dfs_push_type_decls): Remove.
4095         (dfs_push_decls): Likewise.
4096         (setup_class_bindings): Likewise.
4097         (lookup_field_1): Handle USING_DECLs from dependent scopes.
4098         (marked_pushdecls_p): Remove.
4099         (unmarked_pushdecls_p): Remove.
4100         (marked_identifiers): Remove.
4101         (setup_class_bindings): Remove.
4102         (dfs_push_type_decls): Remove.
4103         (dfs_push_decls): Remove.
4104         (push_class_decls): Remove.
4106 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
4108         PR c++/16518
4109         PR c++/16337
4110         * decl.c (grokvardecl): Make declspecs parameter const.
4111         (grokdeclarator): Likewise.  Adjust accordingly.
4112         * decl.h (grokdeclarator): Adjust declaration.
4113         * parser.c (cp_parser_init_declarator): Do not clear
4114         decl_specifiers->attributes.
4116         * cp-tree.h (lang_identifier): Remove class_value.
4117         (IDENTIFIER_CLASS_VALUE): Remove.
4118         (pop_class_decls): Likewise.
4119         (init_search_processing): Likewise.
4120         * class.c (handle_using_decl): Use lookup_member, not
4121         IDENTIFIER_CLASS_VALUE.
4122         (restore_class_cache): New function, split out from ...
4123         (pushclass): ... here.  Do not call clear_identifier_class_values.
4124         (invalidate_class_lookup_cache): Do not clear
4125         IDENTIFIER_CLASS_VALUE.
4126         (popclass): Do not call pop_class_decls.
4127         (maybe_note_name_used_in_class): Do not save names looked up after
4128         the class is complete.  Use lookup_member, not
4129         IDENTIFIER_CLASS_VALUE.
4130         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
4131         * decl.c (cxx_init_decl_processing): Do not call
4132         init_search_processing.
4133         * method.c (do_build_copy_constructor): Remove unnecessary code.
4134         (do_build_assign_ref): Likewise.
4135         * name-lookup.c (pushdecl): Use lookup_member, not
4136         IDENTIFIER_CLASS_VALUE.
4137         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
4138         type_shadowed list.
4139         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
4140         (push_class_binding): Do not set it.
4141         (clear_identifier_class_values): Remove.
4142         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
4143         (store_binding): Do not save it.
4144         (pop_from_top_level): Do not restore it.
4145         * name-lookup.h (cxx_saved_binding): Remove class_value.
4146         (clear_identifier_class_values): Remove.
4147         * ptree.c (cxx_print_identifier): Do not print
4148         IDENTIFIER_CLASS_VALUE.
4149         * search.c (search_obstack): Remove.
4150         (push_stack_level): Remove.
4151         (pop_stack_level): Remove.
4152         (search_level): Remove.
4153         (search_stack): Remove.
4154         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
4155         (setup_class_bindings): Use IDENTIFIER_MARKED, not
4156         IDENTIFIER_CLASS_VALUE.
4157         (marked_identifiers): New variable.
4158         (push_class_decls): Clear IDENTIFIER_MARKED.
4159         (pop_class_decls): Don't call pop_search_level.
4160         (init_search_processing): Remove.
4162 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
4164         * cp-tree.h (get_aggr_typedef): Remove.
4165         * init.c (get_aggr_typedef): Likewise.
4167         * name-lookup.c (push_class_level_binding): Simplify.
4169 2004-07-12  Andrew Pinski  <apinski@apple.com>
4171         PR c++/16475
4172         Revert:
4173         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
4174                 PR c++/16276
4175                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4176                 is not public.
4178 2004-07-12  Eric Christopher  <echristo@redhat.com>
4180         * parser.c (cp_parser_class_head): Remove unused variable.
4182 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4184         * decl.c (grok_op_properties): Reject [de-]allocation functions
4185         declared in a namespace, or declared as static.
4187 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
4189         * cp-tree.h (make_binfo): Remove.
4190         * decl.c (xref_basetypes): Use make_tree_binfo directly.
4191         * tree.h (copy_base_binfos): Likewise.
4192         (make_binfo): Remove.
4194         * call.c (build_user_type_conversion_1, build_new_op,
4195         check_constructor_callable, build_temp,
4196         perform_direct_initialization_of_possible): Pass type directly to
4197         lookup_fnfields & build_special_member_call.
4198         (build_special_member_call): Accept a type, and complete it.
4199         * class.c (finish_stuct_bits): Copy the BINFOs here.
4200         * cvt.c (ocp_convert): Pass type directly to
4201         build_special_member_call.
4202         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
4203         (xref_basetypes): Allocate the binfo here. Adjust.
4204         * init.c (build_init, build_new_1): Pass type directly to
4205         build_special_member_call.
4206         * lex.c (cxx_make_type): Do not allocate binfo here.
4207         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
4208         * parser.c (cp_parser_class_head): Always call xref_basetypes.
4209         * pt.c (instantiate_class_template): Likewise. Inhibit access
4210         checking for template friends.
4211         * ptree.c (cxx_print_type): Adjust record printing.
4212         * search.c (lookup_base): When taking a type, complete it before
4213         looking for a binfo.
4214         (lookup_member): Delay completing a type.
4215         (push_class_decls): Don't walk an incomplete type.
4216         (lookup_conversions): Likewise.
4217         * semantics.c (finish_stmt_expr_expr): Pass type directly to
4218         build_special_member_call.
4219         * tree.c (copy_base_binfos): Adjust.
4220         (make_binfo): Likewise.
4221         * typeck.c (build_modify_expr): Pass type directly to
4222         build_special_member_call.
4223         * typeck2.c (process_init_constructor): Check a binfo exists.
4224         (build_m_component_ref): Allow accessing an incomplete type.
4225         (build_functional_cast): Pass type directly to
4226         build_special_member_call.
4228 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4230         PR c++/2204
4231         * config-lang.in (gtfiles): Add typeck2.c.
4232         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
4233         gt-cp-typeck2.h.
4234         * cp-tree.h: Declare complete_type_check_abstract.
4235         * typeck2.c (pat_calc_hash, pat_compare,
4236         complete_type_check_abstract): New functions.
4237         (abstract_virtuals_error): If the type is abstract, register the
4238         declaration within abstract_pending_vars for further checks.
4239         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
4240         * decl.c (cp_finish_decl): Do not strip array types.
4241         (create_array_type_for_decl): Check for abstractness of the element
4242         type.
4243         (complete_vars): Call complete_type_check_abstract.
4244         * class.c (finish_struct): Prepare a list of virtual functions for
4245         template types, and call complete_vars on it to check for abstractness.
4247 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
4249         PR tree-optimization/14107
4250         * decl.c (finish_function): Remove temporary band-aid.
4252 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
4254         * call.c (build_operator_new_call): Avoid using push_to_top_level.
4255         (build_new_op): Adjust call to lookup_function_nonclass.
4256         * name-lookup.c (identifier_type_value): Adjust call to
4257         lookup_name_real.
4258         (lookup_name_real): Add block_p parameter.
4259         (lookup_name_nonclass): Adjust call to lookup_name_real.
4260         (lookup_function_nonclass): Likewise.
4261         (lookup_name): Likewise.
4262         * name-lookup.h (lookup_name_real): Change prototype.
4263         (lookup_name_nonclass): Likewise.
4264         * parser.c (cp_parser_lookup_name): Likewise.
4266         * cp-tree.h (saved_scope): Make old_bindings a vector.
4267         (unuse_fields): Remove.
4268         * name-lookup.h (cxx_saved_binding): Define it.
4269         * class.c (pushclass): Don't use unuse_fields.
4270         * name-lookup.c (cxx_saved_binding_make): Remove.
4271         (store_binding): Add new bindings to a vector, using an
4272         accumulator style, rather than adding them to a list.
4273         (store_bindings): Adjust accordingly.
4274         (store_class_bindings): Likewise.
4275         (push_to_top_level): Likewise.
4276         (pop_from_top_level): Likewise.
4277         * optimize.c (maybe_clone_body): Must push_to_top_level and
4278         pop_from_top_level calls outside of loop.
4279         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
4280         calls here from cp_parser_late_parsing_default_args.
4281         (cp_parser_save_default_args): Record the class type in which the
4282         function is declared.
4283         (cp_parser_late_parsing_default_args): Do not call
4284         push_nested_class/pop_nested_class.
4285         * search.c (dfs_unuse_fields): Remove.
4286         (unuse_fields): Remove.
4288 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
4290         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
4291         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
4292         * cp-tree.h (poplevel): Declare.
4293         (set_block): Remove.
4294         * decl.c (set_block): Remove.
4296 2004-07-10  Mike Stump  <mrs@apple.com>
4298         * decl2.c (import_export_class): Never export/import vtables
4299         with inline key functions.
4301 2004-07-09  Steven Bosscher  <stevenb@suse.de>
4303         * typeck.c (c_expand_asm_operands): Remove.
4305 2004-07-09  Mike Stump  <mrs@apple.com>
4307         * typeck.c (build_class_member_access_expr): Skip null deref
4308         warning when we don't dereference it.
4310 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4312         PR c++/8211
4313         PR c++/16165
4314         * class.c (check_field_decls): Improve -Weffc++ warning: do not
4315         warn for pointers to functions/members, or for classes without
4316         destructors.
4318 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
4320         * name-lookup.h (struct cp_binding_level): Update documentation
4321         for class_shadowed.
4323 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4325         PR c++/16169
4326         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
4327         returning CALL_EXPR, and non-reference return type.
4329 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
4331         * name-lookup.c (push_binding): Use VEC_reserve.
4333 2004-07-08  Richard Henderson  <rth@redhat.com>
4335         * cp-tree.h (expand_eh_spec_block): Remove.
4337 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
4339         * cp-tree.h (saved_scope): Remove x_previous_class_type and
4340         x_previous_class_values; add x_previous_class_level.
4341         (previous_class_type): Remove.
4342         (previous_class_values): Remove.
4343         (previous_class_level): New macro.
4344         * class.c (pushclass): Restore the identifier cache more
4345         expeditiously.
4346         (invalidate_class_lookup_cache): Use vector for class_shadowed and
4347         previous_class_values.
4348         * decl.c (poplevel): Likewise.
4349         * name-lookup.c (cxx_binding_init): New function.
4350         (cxx_binding_make): Use it.
4351         (push_binding): For a binding in a class level, use a vector of
4352         cp_class_binding nodes.
4353         (push_binding_level): New function.
4354         (begin_scope): Use it.
4355         (leave_scope): Do not put class binding levels on the free list.
4356         (print_binding_level): Adjust for the fact that class_shadowed is
4357         a vector.
4358         (poplevel_class): Likewise.
4359         (clear_identifier_class_values): Likewise.
4360         (push_class_level_binding): Likewise.
4361         (set_class_shadows): Remove.
4362         (store_binding): New function.
4363         (store_class_bindings): New function.
4364         (push_to_top_level): Use store_class_bindings as appropriate.
4365         (pop_from_top_level): Use previous_class_level, not
4366         previous_class_type.
4367         * name-lookup.h (cp_class_binding): New type.
4368         (cp_binding_level): Use a vector object for class_shadowed.
4369         (push_binding_level): Declare.
4370         (set_class_shadows): Remove.
4372 2004-07-07  Andrew Pinski  <apinski@apple.com>
4374         * class.c (instantiate_type): BUFFER_REF is dead.
4375         * lex.c (init_operators): IN_EXPR is dead.
4377 2004-07-07  Jason Merrill  <jason@redhat.com>
4379         PR c++/16334
4380         * call.c (build_new_op): Give overload warnings for built-in
4381         candidates.
4383 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
4385         PR c++/16276
4386         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4387         is not public.
4389 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4391         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
4392         * class.c (build_primary_vtable, check_bases,
4393         determine_primary_base, finish_struct_bits,
4394         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
4395         get_basefndecls, warn_hidden, walk_subobject_offsets,
4396         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
4397         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
4398         finish_struct_1, get_vfield_name, contains_empty_class_p,
4399         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
4400         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
4401         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
4402         BINFO macros.
4403         * decl.c (xref_basetypes): Likewise.
4404         * dump.c (cp_dump_tree): Likewise.
4405         * error.c (dump_expr): Likewise.
4406         * init.c (sort_mem_initializers, expand_member_init,
4407         push_base_cleanups): Likewise.
4408         * method.c (do_build_copy_constructor, do_build_assign_reg,
4409         synthesize_exception_spec): Likewise.
4410         * name-lookup.c (arg_assoc_class): Likewise.
4411         * pt.c (instantiate_class_template, tsubst,
4412         get_template_base_recursive): Likewise.
4413         * ptree.c (cxx_print_type): Likewise.
4414         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
4415         * search.c (lookup_base_r, dynamic_cast_base_recurse,
4416         dfs_access_in_type, access_in_type, lookup_field_queue_p,
4417         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
4418         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
4419         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
4420         binfo_for_vtable, copied_binfo, original_binfo): Likewise
4421         * tree.c (copy_base_binfos, make_binfo): Likewise.
4422         * typeck.c (commmon_base_type): Likewise
4423         * typeck2.c (process_init_constructor): Likewise
4425 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
4427         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
4429 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4431         PR c++/3671
4432         * pt.c (convert_nontype_argument): Disallow conversions between
4433         different enumeration types.
4435 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4437         * cp-tree.h (BINFO_MARKED): Remove.
4438         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
4439         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
4440         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
4441         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
4442         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
4443         (mark_primary_bases, determine_primary_base, base_derived_from,
4444         dfs_find_final_overrider, dfs_find_final_overrider_q,
4445         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
4446         dfs_modify_vtables, walk_subobject_offsets,
4447         layout_nonempty_base_or_field, build_base_field,
4448         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
4449         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
4450         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
4451         build_ctor_vtbl_group, accumulate_vtble_inits,
4452         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
4453         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
4454         add_vcall_offset_vtbl_entries_1): Likewise.
4455         * decl.c (xref_basetypes): Incomming virtual base indicated by
4456         TREE_TYPE. Adjust.
4457         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
4458         * init.c (finish_init_stmts, sort_mem_initializers,
4459         emit_mem_initializers, build_vtble_address, expand_member_init,
4460         push_base_cleanups): Likewise.
4461         * method.c (do_build_copy_constructor): Likewise.
4462         * pt.c (instantiate_class_template,
4463         get_template_base_recursive): Likewise.
4464         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
4465         get_pseudo_ti_desc): Likewise.
4466         * search.c (lookup_base_r, dynamic_cast_base_recurse,
4467         binfo_from_vbase, binfo_via_virtual, copied_binfo,
4468         original_binfo): Likewise.
4469         * semantics.c (finish_base_specifier): Virtualness is indicated
4470         by TREE_TYPE.
4471         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
4473 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
4475         Revert:
4476         2004-06-24  Jason Merrill  <jason@redhat.com>
4477         PR c++/16115
4478         * decl.c (grokparms): Give the PARM_DECL reference type if the
4479         parameter is passed by invisible reference.
4481 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4483         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
4484         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
4485         * pt.c (check_instantiated_args, unify): Likewise.
4487 2004-07-05  Phil Edwards  <phil@codesourcery.com>
4489         * Make-lang.in (check-c++, lang_checks):  Add some comments.
4491 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
4493         * cp-mudflap.c: Delete file.
4494         * Makefile.in: Remove all references to cp-mudflap.o.
4496 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
4498         * decl.c (cxx_init_decl_processing): Call
4499         build_common_tree_nodes before creating the global NAMESPACE_DECL.
4501 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4503         PR c++/2518
4504         * call.c (build_operator_new_call): Look only at global scope.
4506 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4508         * call.c (enforce_access): Expect TREE_BINFO.
4509         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
4510         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
4511         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4512         Adjust.
4513         (BINFO_LANG_ELTS): Remove.
4514         (BINFO_LANG_SLOTS): New.
4515         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
4516         (CLASSTYPE_TEMPLATE_INFO): Adjust.
4517         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
4518         * search.c (lookup_member): Check TREE_BINFO.
4519         * semantics.c (perform_or_defer_access_check): Likewise.
4520         (check_accessibility_of_qualified_id): Check
4521         deferred_access_no_check.
4522         * tree.c (make_binfo): Use make_tree_binfo.
4524 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
4526         * method.c (implicitly_declare_fn): Set linkage of generated
4527         functions.
4529 2004-07-04  Richard Henderson  <rth@redhat.com>
4531         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
4533 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
4535         PR c++/3761
4536         * name-lookup.c (push_class_level_binding): Don't pass a
4537         TREE_LIST of ambiguous names to check_template_shadow as it
4538         only handles declarations. Instead, pull the declaration
4539         out and pass that.
4541 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4543         PR c++/14971
4544         * pt.c (check_explicit_specialization): Clarify error message.
4546 2004-07-02  Richard Henderson  <rth@redhat.com>
4548         * tree.c (cp_unsave_r): Update remap_save_expr call.
4550 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
4552         PR c++/16240
4553         * mangle.c (write_template_arg): Correct mangling.
4555         PR c++/16297
4556         * decl.c (grokdeclarator): Robustify.
4558 2004-07-01  Richard Henderson  <rth@redhat.com>
4560         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
4561         * method.c (synthesize_method): Don't clear_last_expr.
4562         * name-lookup.c (maybe_push_cleanup_level): Likewise.
4564 2004-07-01  Nick Clifton  <nickc@redhat.com>
4566         * decl2.c (import_export_class): Invoke the
4567         import_export_class field in the gcc_target structure if it is not
4568         empty.
4570 2004-06-30  Richard Henderson  (rth@redhat.com>
4572         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
4573         * method.c (use_thunk): Likewise.
4575 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
4577         * call.c (build_over_call), typeck.c (build_function_call): Call
4578         check_function_arguments instead of check_function_format.
4580 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
4582         * call.c (build_over_call), typeck.c (build_function_call): Update
4583         calls to check_function_format.
4585 2004-06-30  Richard Henderson  <rth@redhat.com>
4587         * call.c (build_over_call): Use __builtin_memcpy for copying
4588         CLASS_AS_BASE rather than funny casting.
4590 2004-06-30  Richard Henderson  <rth@redhat.com>
4592         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
4593         TYPE_SIZE_UNIT of full_type.
4595 2004-06-30  Per Bothner  <per@bothner.com>
4597         Conditionally compile support for --enable-mapped_location.
4598         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
4599         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
4600         adjustments - which I don't understand.
4601         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
4602         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
4603         (print_instantiation_partial_context):  Use expand_location.
4604         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
4605         * name-lookup.c:  Likewise.
4606         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
4607         * name-lookup.c:  Use input_line macro.
4608         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
4609         (cp_parser_statement):  Rename locaal variable statement_locus to
4610         statement_location and use SET_EXPR_LOCATION macro.
4611         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
4612         * tree.c (cp_walk_subtrees):  Likewise.
4614 2004-06-29  Per Bothner  <per@bothner.com>
4616         * tree.c (build_min_nt, build_min, build_min_non_dep):
4617         Don't set TREE_COMPLEXITY from input_line.
4619 2004-06-29  Paul Brook  <paul@codesourcery.com>
4621         * init.c: Include target.h.
4622         (get_cookie_size): Remove and replace with target hook.
4623         Update callers.
4624         (build_new_1): Store the element size in the cookie.
4626 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
4628         PR c++/16260
4629         * parser.c (cp_parser_template_declaration_after_export): Disable
4630         access checks here ...
4631         (cp_parser_class_specifier): ... not here.
4633 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4635         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4636         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4637         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
4638         TREE_CHECK macro.
4640 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4642         * cp-tree.h (struct deferred_access): Move to ...
4643         * semantics.c (struct deferred_access): ... here. Adjust.
4644         (deferred_access_stack): Make a VEC(deferred_access),
4645         (deferred_access_free_list): Remove.
4646         (deferred_access_no_check): New.
4647         (push_deferring_access_checks, resume_deferring_access_checks,
4648         stop_deferring_access_checks, pop_deferring_access_checks,
4649         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
4650         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
4652 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4654         PR c++/16174
4655         * call.c (build_temp): Declare.
4656         (check_constructor_callable): New.
4657         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
4658         CONSTRUCTOR_CALLABLE.
4659         (convert_like_real, initialize_reference): Use
4660         check_constructor_callable.
4661         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
4662         (LOOKUP_*): Renumber.
4664 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4666         * friend.c (add_friend): Only perform access checks when context
4667         is a class.
4668         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
4669         * parser.c (cp_parser_class_specifier): Disable access checks here
4670         when parsing the body of a templated class.
4671         * semantics.c (perform_or_defer_access_checks): Reorder to allow
4672         NULL binfos when not checking access.
4674 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4676         Use vector API for vbase list.
4677         * cp-tree.h: Include vec.h
4678         (DEF_VEC_P (tree)): New type.
4679         (struct lang_type_class): Change vbase's member type.
4680         (binfo_for_vbase): Declare.
4681         * class.c (determine_primary_base, base_derived_from,
4682         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
4683         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
4684         build_vtbl_initializer): Adjust.
4685         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
4686         vbases.
4687         * init.c (sort_mem_initializers, expand_member_init,
4688         push_base_cleanups): Adjust.
4689         * method.c (do_build_copy_constructor): Adjust.
4690         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
4691         (binfo_for_vbase): New.
4692         * tree.c (copy_base_binfos): Adjust.
4694 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
4696         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
4698 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4700         PR c++/14123
4701         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
4702         paranthesis in case of pointers to array members.
4703         * error.c (dump_type_prefix): Likewise.
4704         (dump_type_suffix): Maybe issue a whitespace when printing
4705         ARRAY_TYPE.
4707 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
4709         PR c++/16193
4710         * parser.c (cp_parser_set_decl_spec_type): Refine test for
4711         redefinition of built-in types.
4713 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4715         * error.c (pp_template_argument_list_start): Remove.
4716         (pp_template_argument_list_end): Likewise.
4717         (pp_separate_with_comma): Use pp_cxx_separate_with.
4718         (reinit_global_formatting_buffer): Remove.
4719         (pp_non_consecutive_character): Likewise.
4720         (dump_scope): Use pp_cxx_colon_colon.
4721         (dump_template_parameter): Use pp_cxx_identifier,
4722         pp_cxx_tree_identifier and pp_cxx_whitespace.
4723         (dump_templat_bindings): Replace use of pp_string with sequence
4724         of pp_cxx_whitespace and pp_equal.
4725         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
4726         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
4727         padding here.
4728         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
4729         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
4730         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
4731         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
4732         pp_cxx_right_bracket, pp_cxx_identifier throughout,
4733         (dump_decl): Likewise.
4734         (dump_template_decl): Likewise.
4735         (dump_function_decl): Likewise.  Set padding as appropriate.
4736         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
4737         pp_cxx_right_paren.
4738         (dump_exception_spec): Likewise.
4739         (dump_function_name): Use pp_cxx_tree_identifier and
4740         pp_cxx_identifier.
4741         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
4742         pp_cxx_end_template_argument_list.
4743         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
4744         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
4745         pp_cxx_whitespace throughout.
4746         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
4747         pp_cxx_right_paren.
4748         (dump_unary_op): Likewise.
4749         (reinit_cxx_pp): New function.
4750         (type_as_string); Use it.
4751         (expr_as_string): Likewise.
4752         (decl_as_string); Likewise.
4753         (context_as_string): Likewise.
4754         (lang_decl_name): Likewise.
4755         (decl_to_string): Likewise.
4756         (expr_to_string): Likewise.
4757         (parm_to_string): Likewise.
4758         (type_to_string): Likewise.
4759         (args_to_string): Likewise.
4760         (cv_to_string): Likewise.
4762 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
4764         * cp-tree.h (cp_cv_quals): New type.
4765         (cp_declarator): Use it instead of "tree" as appropriate.
4766         (grok_method_quals): Adjust prototype.
4767         (grokclassfn): Likewise.
4768         (do_friend): Likewise.
4769         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
4770         (grokdeclarator): Likewise.
4771         * decl2.c (grok_method_quals): Likewise.
4772         (grokclassfn): Likewise.
4773         * friend.c (do_friend): Likewise.
4774         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
4775         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
4776         (make_pointer_declarator): Likewise.
4777         (make_reference_declarator): Likewise.
4778         (make_ptrmem_declarator): Likewise.
4779         (cp_parser_ptr_operator): Likewise.
4780         (cp_parser_cv_qualifier_seq_opt): Likewise.
4781         (cp_parser_cv_qualifier_opt): Remove.
4782         (cp_parser_new_declarator_opt): Adjust call to
4783         cp_parser_ptr_operator.
4784         (cp_parser_conversion_declaration_opt): Likewise.
4785         (cp_parser_declarator): Use cp_cv_quals, not tree.
4786         (cp_parser_direct_declarator): Likewise.
4788 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4790         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
4791         Rename DECL_STMT to DECL_EXPR.
4792         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
4793         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
4794         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
4796 2004-06-26  Jan Hubicka  <jh@suse.cz>
4798         PR C++/14865
4799         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
4800         reachability analysis.
4802 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
4804         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
4805         2004-06-23 change.
4807 2004-06-25  Paul Brook  <paul@codesourcery.com>
4809         * decl2.c (get_guard): Call targetm.cxx.guard_type.
4810         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
4812 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
4814         * decl.c (grokdeclarator): Restore error messages about __thread.
4815         * parser.c (cp_parser_decl_specifier_seq): Likewise.
4817 2004-06-24  Jason Merrill  <jason@redhat.com>
4819         PR c++/16115
4820         * decl.c (grokparms): Give the PARM_DECL reference type if the
4821         parameter is passed by invisible reference.
4823 2004-06-24  Andreas Schwab  <schwab@suse.de>
4825         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
4827 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
4829         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
4830         (cp/decl.o): Likewise.
4831         (cp/decl2.o): Likewise.
4832         (cp/pt.o): Likewise.
4833         (cp/semantics.o): Likewise.
4834         * config-lang.in (gtfiles): Do not reference cp/lex.h.
4835         * class.c: Do not include lex.h.
4836         (add_implicitly_declared_members): Do not use
4837         adding_implicit_members.
4838         (check_bases_and_members): Do not talk about grok_x_components.
4839         * cp/cp-tree.h (adding_implicit_members): Remove.
4840         (cp_storage_class): New type.
4841         (cp_decl_spec): Likewise.
4842         (cp_decl_specifier_seq): Likewise.
4843         (cp_parameter_declarator): Use it for the decl_specifiers field.
4844         (check_tag_decl): Adjust prototype.
4845         (shadow_tag): Likewise.
4846         (groktypename): Likewise.
4847         (start_decl): Likewise.
4848         (start_function): Likewise.
4849         (start_method): Likewise.
4850         (grok_x_components): Remove.
4851         (grokfield): Adjust prototype.
4852         (grokbitfield): Likewise.
4853         (finish_member_class_template): Remove.
4854         * decl.c: Do not include lex.h.
4855         (adding_implicit_members): Do not define.
4856         (check_tag_decl): Do not use trees to represent decl-specifiers.
4857         (shadow_tag): Likewise.
4858         (groktypename): Likewise.
4859         (start_decl): Likewise.
4860         (grokvardecl): Likewise.
4861         (grokdeclarator): Likewise.
4862         (grokparms): Likewise.
4863         (start_function): Likewise.
4864         (start_method): Likewise.
4865         * decl.h (grokdeclarator): Adjust prototype.
4866         * decl2.c: Do not include lex.h.
4867         (grok_x_components): Remove.
4868         (grokfield): Do not use trees to represent decl-specifiers.
4869         (grokbitfield): Likewise.
4870         * lex.c: Do not include lex.h.
4871         * lex.h: Remove.
4872         * parser.c: Include target.h.
4873         (clear_decl_specs): New function.
4874         (cp_parser_translation_unit): Do not use trees to represent
4875         decl-specifiers.
4876         (cp_parser_postfix_expression): Likewise.
4877         (cp_parser_new_type_id): Likewise.
4878         (cp_parser_condition): Likewise.
4879         (cp_parser_simple_declaration): Likewise.
4880         (cp_parser_decl_specifier_seq): Likewise.
4881         (cp_parser_function_specifier_opt): Likewise.
4882         (cp_parser_conversion_type_id): Likewise.
4883         (cp_parser_template_parameter): Likewise.
4884         (cp_parser_explicit_instantiation): Likewise.
4885         (cp_parser_type_specifier): Likewise.
4886         (cp_parser_simple_type_specifier): Likewise.
4887         (cp_parser_init_declarator): Likewise.
4888         (cp_parser_type_id): Likewise.
4889         (cp_parser_type_specifier_seq): Likewise.
4890         (cp_parser_parameter_declaration): Likewise.
4891         (cp_parser_member_declaration): Likewise.
4892         (cp_parser_exception_declaration): Likewise.
4893         (cp_parser_function_definition_from_specifiers_and_declarator):
4894         Likewise.
4895         (cp_parser_single_declaration): Likewise.
4896         (cp_parser_save_member_function_body): Likewise.
4897         (cp_parser_friend_p): Likewise.
4898         (cp_parser_set_storage_class): New function.
4899         (cp_parser_set_decl_spec_type): Likewise.
4900         * pt.c: Do not include lex.h.
4901         * semantics.c: Likewise.
4902         (finish_member_class_template): Remove.
4904 2004-06-23  Roger Sayle  <roger@eyesopen.com>
4906         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
4907         longer take both "args" and "convert_args" as arguments.
4908         (build_op_delete_call): Update call to build_cxx_call.
4909         (build_over_call): Likewise, update call to build_cxx_call.
4910         * cp-tree.h (build_cxx_call): Update funtion prototype.
4911         * typeck.c (build_function_call): Don't call expand_tree_builtin.
4912         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
4913         (throw_bad_typeid): Likewise.
4914         (build_dynamic_cast_1): Likewise.
4916 2004-06-22  Richard Henderson  <rth@redhat.com>
4918         * class.c (build_vfn_ref): Take a pointer not object.  Build
4919         an OBJ_TYPE_REF.
4920         (cp_fold_obj_type_ref): New.
4921         * call.c (build_over_call): Update build_vfn_ref call.
4922         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
4923         * cp-tree.h (cp_fold_obj_type_ref): Declare.
4925 2004-06-21  Jason Merrill  <jason@redhat.com>
4927         PR c++/16112
4928         * cp-gimplify.c (cp_gimplify_init_expr): Look through
4929         CLEANUP_POINT_EXPR.
4931 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
4933         * cp-tree.def (NEW_EXPR): Add a fourth slot.
4934         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
4935         (TREE_PARMLIST): Likewise.
4936         (CALL_DECLARATOR_PARMS): Likewise.
4937         (CALL_DECLARATOR_QUALS): Likewise.
4938         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4939         (cp_declarator_kind): New type.
4940         (cp_parameter_declarator): Likewise.
4941         (cp_declarator): Likewise.
4942         (cp_error_declarator): Likewise.
4943         (no_parameters): Likewise.
4944         (groktypename): Change prototype.
4945         (start_decl): Likewise.
4946         (start_handler_parms): Likewise.
4947         (get_scope_of_declarator): Likewise.
4948         (start_function): Likewise.
4949         (start_preparsed_function): New function.
4950         (start_function): Change prototype.
4951         (start_method): Likewise.
4952         (grokfield): Likewise.
4953         (grokbitfield): Likewise.
4954         (build_new): Likewise.
4955         (make_pointer_declarator): Remove.
4956         (make_reference_declarator): Likewise.
4957         (make_call_declarator): Likewise.
4958         (set_quals_and_spec): Likewise.
4959         (process_template_parm): Change prototype.
4960         (begin_function_definition): Remove.
4961         (finish_parmlist): Remove.
4962         * decl.c (groktypename): Do not use trees to represent
4963         declarators.
4964         (start_decl): Likewise.
4965         (start_handler_parms): Remove.
4966         (get_scope_of_declarator): Reimplement.
4967         (grokdeclarator): Do not use trees to represent declarators.
4968         (grokparms): Likewise.
4969         (start_function): Likewise.
4970         (start_method): Likewise.
4971         (build_void_list_mode): Do not use TREE_PARMLIST.
4972         * decl.h (grokdeclarator): Change prototype.
4973         * decl2.c (grok_method_quals): Robustify.
4974         (grok_x_components): Do not use trees to represent declarators.
4975         (grokfield): Likewise.
4976         (grokbitfield): Likewise.
4977         (start_objects): Build FUNCTION_DECLs, not declarators.
4978         (start_static_storage_duration_function): Likewise.
4979         * init.c (build_new): Simplify.
4980         * lex.c (make_pointer_declarator): Remove.
4981         (make_reference_declarator): Likewise.
4982         (make_call_declarator): Likewise.
4983         (set_quals_and_spec): Likewise.
4984         * method.c (use_thunk): Use start_preparsed_function.
4985         (synthesize_method): Likewise.
4986         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
4987         * optimize.c (maybe_clone_body): Use start_preparsed_function.
4988         * parser.c (cp_error_declarator): New variable.
4989         (declarator_obstack): Likewise.
4990         (alloc_declarator): New function.
4991         (make_declarator): Likewise.
4992         (make_id_declarator): Likewise.
4993         (make_pointer_declarator): Likewise.
4994         (make_reference_declarator): Likewise.
4995         (make_ptrmem_declarator): Likewise.
4996         (make_call_declarator): Likewise.
4997         (make_array_declarator): Likewise.
4998         (no_parameters): New variable.
4999         (make_parameter_declarator): Likewise.
5000         (cp_parser_check_for_definition_in_return_type): Do not use trees
5001         to represent declarators.
5002         (cp_parser_translation_unit): Likewise.
5003         (cp_parser_new_expression): Likewise.
5004         (cp_parser_new_type_id): Likewise.
5005         (cp_parser_new_declarator_opt): Likewise.
5006         (cp_parser_direct_new_declarator): Likewise.
5007         (cp_parser_condition): Likewise.
5008         (cp_parser_declaration_statement): Likewise.
5009         (cp_parser_declaration): Likewise.
5010         (cp_parser_conversion_type_id): Likewise.
5011         (cp_parser_conversion_declarator_opt): Likewise.
5012         (cp_parser_template_parameter_list): Likewise.
5013         (cp_parser_template_parameter): Likewise.
5014         (cp_parser_explicit_instantiation): Likewise.
5015         (cp_parser_init_declarator): Likewise.
5016         (cp_parser_declarator): Likewise.
5017         (cp_parser_direct_declarator): Likewise.
5018         (cp_parser_type_id): Likewise.
5019         (cp_parser_parameter_declaration_clause): Likewise.
5020         (cp_parser_parameter_declaration_list): Likewise.
5021         (cp_parser_parameter_declaration): Likewise.
5022         (cp_parser_member_declaration): Likewise.
5023         (cp_parser_exception_declaration): Likewise.
5024         (cp_parser_check_declarator_template_parameters): Likewise.
5025         (cp_parser_function_definition_from_specifiers_and_declarator):
5026         Likewise.
5027         (cp_parser_save_member_function_body): Likewise.
5028         * pt.c (process_template_parm): Add is_non_type parameter.
5029         (convert_template_argument): Adjust call to groktypename.
5030         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
5031         (tsubst): Do not expect declarators.
5032         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
5033         argument.
5034         (instantiate_decl): Use start_preparsed_function.
5035         * semantics.c (begin_function_definition): Remove.
5036         (finish_parmlist): Remove.
5037         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
5038         declarators.
5040 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5042         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
5043         (build_new_method_call): Likewise.
5044         * decl.c (local_variable_p_walkfn): Don't walk into types.
5045         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
5046         (build_anon_union_vars): Add new operand for COMPONENT_REF.
5047         * init.c (buld_new): Add new operand for ARRAY_REF.
5048         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
5049         (do_build_assign_ref): Likewise.
5050         * parser.c (cp_parser_direct_new_declarator): Add new operands
5051         for ARRAY_REF.
5052         (cp_parser_direct_declarator): Likewise.
5053         * pt.c (tsubst): Likewise.
5054         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
5055         for COMPONENT_REF.
5056         * semantics.c (finish_non_static_data_member): Add new operand
5057         for COMPONENT_REF.
5058         * typeck.c (build_class_member_access_expr): Likewise.
5059         (build_class_member_access_expr, finish_class_member_access_expr):
5060         Likewise.
5061         (build_ptrmemfunc_access_expr): Likewise.
5062         (build_array_ref): Add new operands for ARRAY_REF.
5063         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
5064         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
5066 2004-06-21  Richard Henderson  <rth@redhat.com>
5068         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
5069         * parser.c (cp_parser_jump_statement): Update commentary.
5070         * pt.c (tsubst_expr): Use RETURN_EXPR.
5071         * semantics.c (finish_return_stmt): Likewise.
5072         (finalize_nrv_r): Likewise.
5073         * typeck.c, typeck2.c: Update file start commentary.
5075 2004-06-21  Richard Henderson  <rth@redhat.com>
5077         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
5079 2004-06-20  Richard Henderson  <rth@redhat.com>
5081         * cp-tree.h (add_decl_stmt): Declare.
5082         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
5083         * semantics.c (maybe_cleanup_point_expr): New.
5084         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
5085         finish_for_expr, finish_switch_cond): Use it.
5086         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
5088 2004-06-20  Richard Henderson  <rth@redhat.com>
5090         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
5091         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
5092         (cp_gimplify_expr): Call it.
5093         (gimplify_cleanup_stmt): Move from c-gimplify.c.
5094         (cp_genericize): New.
5095         * decl.c (finish_function): Call it.
5096         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
5097         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
5098         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
5099         (cp_genericize): Declare.
5100         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
5101         * dump.c (cp_dump_tree): Likewise.
5102         * semantics.c (push_cleanup): Move from c-semantics.c.
5104 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
5106         * cp-lang.c (has_c_linkage): Implement.
5108         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
5109         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
5110         (builtin_function_1): Don't call make_decl_rtl.
5111         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
5112         (grokvardecl): Don't call mangle_decl.
5113         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
5114         DECL_ASSEMBLER_NAME.
5115         * method.c (set_mangled_name_for_decl): Delete.
5116         * name-lookup.c (pushdecl): When a local extern shadows a
5117         file-scope declaration of the same object, give both DECLs the
5118         same DECL_UID.
5119         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
5120         on DECL_ASSEMBLER_NAME.
5122 2004-06-19  Richard Henderson  <rth@redhat.com>
5124         * cp-gimplify.c: Remove unnecessary prototypes.
5125         (cp_gimplify_stmt): Merge into ...
5126         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
5127         stmts_are_full_exprs_p frobbing.
5128         * cp-tree.h (cp_gimplify_stmt): Remove.
5129         * pt.c (tsubst_expr): Merge prep_stmt and unify.
5130         * tree.c (init_tree): Don't set lang_gimplify_stmt.
5132 2004-06-18  Richard Henderson  <rth@redhat.com>
5134         PR c++/16034
5135         * semantics.c (begin_cond): New.
5136         (finish_cond): Rewrite to handle template DECL_STMTs specially.
5137         Assume that non-template decls go land before the conditional.
5138         (simplify_loop_decl_cond): Likewise.
5139         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
5140         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
5141         begin_switch_stmt, finish_switch_cond): Update to match.
5143 2004-06-17  Jason Merrill  <jason@redhat.com>
5145         PR c++/16015
5146         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
5147         (finish_stmt_expr_expr): Update type after conversions.
5148         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
5149         Handle void initializer.
5150         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
5152 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
5154         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
5155         * cp-tree.h (defer_fn): Delete.
5156         * decl2.c (defer_fn): Delete.
5157         (finish_file): Simplify deferred_fns loops; check that
5158         only used inline functions get into deferred_fns.
5159         (mark_used): Inline previous contents of defer_fn.
5161 2004-06-16  Richard Henderson  <rth@redhat.com>
5163         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
5164         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
5165         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
5166         of CTOR_INITIALIZER ...
5167         (pp_cxx_statement): ... here.
5168         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
5169         (finish_function): Use alloc_stmt_list to zap entire function.
5170         * parser.c (cp_parser_compound_statement): Update commentary.
5171         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
5172         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
5173         (finish_stmt_expr): Don't look through COMPOUND_STMT.
5175 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
5177         * pt.c (mark_decl_instantiated): Don't call defer_fn.
5179 2004-06-16  Richard Henderson  <rth@redhat.com>
5181         * parser.c (cp_parser_labeled_statement): Update commentary.
5182         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
5183         * tree.c (mark_local_for_remap_r): Likewise.
5185 2004-06-16  Richard Henderson  <rth@redhat.com>
5187         * parser.c (cp_parser_asm_definition): Update commentary.
5188         * pt.c (tsubst_expr): Use ASM_EXPR.
5189         * semantics.c (finish_asm_stmt): Likewise.
5191 2004-06-16  Richard Henderson  <rth@redhat.com>
5193         * decl.c (finish_destructor_body): Use LABEL_EXPR.
5194         * parser.c (cp_parser_statement): Update commentary.
5195         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
5196         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
5197         * tree.c (mark_local_for_remap_r): Likewise.
5199 2004-06-16  Richard Henderson  <rth@redhat.com>
5201         PR c++/16012
5202         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
5203         statement in FOR_INIT_STMT for templates.
5205 2004-06-15  Richard Henderson  <rth@redhat.com>
5207         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
5208         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
5209         (genericize_try_block): Use gimplify_stmt.
5210         (genericize_catch_block, genericize_eh_spec_block): Likewise.
5211         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
5212         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
5213         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
5214         (cp_tree_chain_matters_p): Remove.
5215         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
5216         (COMPOUND_STMT_BODY_BLOCK): New.
5217         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
5218         (EXPR_STMT_STMT_EXPR_RESULT): New.
5219         (building_stmt_tree): Check cur_stmt_list.
5220         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
5221         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
5222         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
5223         (cp_finish_decl): Use push_cleanup.
5224         (start_function, finish_function): Use statement lists.
5225         (finish_stmt): Do nothing.
5226         * except.c (begin_eh_spec_block): Use statement lists.
5227         (check_handlers_1, check_handlers): Likewise.
5228         * init.c (construct_virtual_base): Don't add extra compound stmts.
5229         (build_vec_init): Likewise.
5230         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
5231         * name-lookup.h (struct cp_binding_level): Add statement_list.
5232         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
5233         (cp_parser_labeled_statement, cp_parser_expression_statement,
5234         cp_parser_statement_seq_opt): Likewise.
5235         (cp_parser_compound_statement): Likewise.  Take bool for try block.
5236         (cp_parser_selection_statement): Tidy if processing.
5237         (cp_parser_already_scoped_statement): Rewrite to do what it says.
5238         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
5239         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
5240         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
5241         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
5242         (finish_cond): New, rewritten from FINISH_COND.
5243         (simplify_loop_decl_cond): New.
5244         (finish_expr_stmt): Avoid nested EXPR_STMTs.
5245         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
5246         begin_else_clause, finish_else_clause, finish_if_stmt,
5247         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
5248         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
5249         finish_for_cond, finish_for_stmt, begin_switch_stmt,
5250         finish_switch_cond, finish_switch_stmt, begin_try_block,
5251         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
5252         finish_handler_sequence, finish_function_handler_sequence,
5253         begin_handler, finish_handler_parms, finish_handler,
5254         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
5255         using statement lists.
5256         (begin_compound_stmt): Replace has_no_scope argument with flags.
5257         Update all callers.  Use statement lists.
5258         (finish_compound_stmt): Likewise.
5259         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
5260         (current_scope_stmt_stack): Remove.
5261         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
5262         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
5263         Rewrite with statement lists.
5265 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
5267         * parser.c: Change all assignments of c_lex_string_translate
5268         to true and false to 1 and 0.
5269         (cp_lexer_read_token): Convert type of the translated string.
5270         (cp_parser_skip_to_closing_parentheses): Preserve original
5271         value of c_lex_string_translate, and set it to -1 while
5272         running.
5273         (cp_parser_cache_group): Likewise.
5274         (cp_parser_cache_group_1): Renamed.
5275         (cp_parser_asm_operand_list): Remove redundant setting of
5276         c_lex_string_translate.
5277         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
5278         Handle chained strings.
5280 2004-06-12  Andrew Pinski  <apinski@apple.com>
5282         PR c++/14639
5283         Revert:
5284         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
5286                 * cp-tree.h: Fix typo.
5288                 * cp-tree.h: Include cgraph.h
5289                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5290                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5292 2004-06-12  Jason Merrill  <jason@redhat.com>
5294         PR tree-optimization/14107
5295         * decl.c (finish_function): Warn about no return in all functions.
5297 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
5299         * cp-tree.h (struct language_function): Remove cannot_inline.
5300         * decl.c (save_function_data): cannot_inline is no more.
5301         (cxx_push_function_context): Likewise.
5302         * decl2.c (start_objects, start_static_storage_duration_function):
5303         Reset DECL_INLINE, set DECL_UNINLINABLE.
5305 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5307         PR c++/15967
5308         * search.c (lookup_field): Propagate the ambiguity list.
5309         (lookup_fnfields): Likewise.
5311 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5313         PR c++/15947
5314         * parser.c (cp_parser_template_name): Ctors/dtors never need a
5315         template keyword to disambiguate.
5317 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
5319         PR c++/15096
5320         * decl.c (grokdeclarator): Ignore pointer-to-members when
5321         computing template depth.
5323         PR c++/14930
5324         * name-lookup.c (pushtag): Do not try to put class declarations in
5325         explicit specialization scopes.
5327 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
5329         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
5331 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
5333         PR c++/15862
5334         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
5335         bindings for undeclared built-ins.
5337 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5339         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
5340         appear at the correct location.
5342 2004-06-10  Jason Merrill  <jason@redhat.com>
5344         PR c++/15875
5345         Revert:
5346         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5347         * init.c (build_offset_ref): Build SCOPE_REF with non-null
5348         TREE_TYPE for non-dependent names.
5349         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5350         unknown_type_node as its TREE_TYPE.
5351         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5352         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5353         (dump_expr) <SCOPE_REF case>: Likewise.
5355 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
5357         PR c++/15227
5358         * parser.c (cp_parser_direct_declarator): Robustify.
5360         PR c++/15877
5361         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
5362         constants in non-dependent contexts.
5364         PR c++/14211
5365         PR c++/15076
5366         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
5367         necessary.
5369 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
5371         PR c++/14791
5372         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
5373         specially.
5375 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
5377         Revert:
5378         PR c++/15815
5379         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
5380         * lex.c (handle_pragma_interface): Deprecate.
5381         (handle_pragma_implementation): Likewise.
5383 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
5385         * g++spec.c (lang_specific_driver): Remove check for -lm
5386         and -lmath when check it see if it was the math library.
5388 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5390         PR c++/7841
5391         * parser.c (cp_parser_direct_declarator): Reject constructor named
5392         as qualified template-id.
5394 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
5396         PR c++/15815
5397         * lex.c (handle_pragma_interface): Deprecate.
5398         (handle_pragma_implementation): Likewise.
5400 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
5402         PR c++/15766
5403         * parser.c (cp_parser_iteration_statement): Fix typo in error
5404         message.
5406         PR c++/14777
5407         * pt.c (tsubst_default_argument): Do not defer access checks
5408         while substituting into the default argument.
5410         PR c++/15554
5411         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
5412         constant in a non-dependent context.
5414         PR c++/15057
5415         * except.c (build_throw): Ensure that temp_expr has been
5416         initialized.
5418 2004-06-06  Roger Sayle  <roger@eyesopen.com>
5420         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
5422 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5424         PR c++/15503
5425         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
5426         'typename', and accept 'template'.
5428 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
5429             Jan Hubicka  <jh@suse.cz>
5431         PR c++/14639
5432         * method.c (use_think): Do not mark thunk as referenced.
5434 2004-06-03  Matt Austern  <austern@apple.com>
5436         PR c++/15428
5437         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
5438         is nonzero, and if we see a noninline definition of a key method,
5439         make the vtables nonweak.
5441 2004-06-02  Matt Austern  <austern@apple.com>
5443         * cp-tree.h (instantiate_decl): new boolean parameter,
5444         undefined_ok. Current behavior is equivalent to its being 0.
5445         * decl2.c (mark_used): Add new argument when calling instantiate_decl
5446         * pt.c (mark_decl_instantiated): Unconditionally make
5447         instantiations explicit unconditionally
5448         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
5449         since mark_decl_instantiated now does it.
5450         (instantiate_class_member): New.  Instantiate a member of an
5451         explicitly instantiated class template.
5452         (do_type_instantiation): Explicitly instantiate members of an
5453         explicitly instantiated class template.
5454         (instantiate_decl): if undefined_ok is nonzero, and if we're
5455         trying to explicitly instantiated a template with no definition,
5456         change it to an implicit instantiation.
5457         (instantiate_pending_templates): Add new argument to instantiate_decl.
5458         * tree.c (cp_cannot_inline_tree_fn): Likewise.
5460 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
5462         * cp-tree.h: Fix typo.
5464         * cp-tree.h: Include cgraph.h
5465         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5466         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5468 2004-06-01  Jason Merrill  <jason@redhat.com>
5470         PR c++/15142
5471         * call.c (call_builtin_trap): Remove type parm.
5472         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
5473         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
5475 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5477         PR c++/13092
5478         * init.c (build_offset_ref): Build SCOPE_REF with non-null
5479         TREE_TYPE for non-dependent names.
5480         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5481         unknown_type_node as its TREE_TYPE.
5482         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5483         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5484         (dump_expr) <SCOPE_REF case>: Likewise.
5486 2004-06-01  Richard Henderson  <rth@redhat.com>
5487             Andrew Pinski  <pinskia@physics.uc.edu>
5489         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
5490         * parser.c (struct cp_parser): Remove in_offsetof.
5491         (cp_parser_new): Don't set it.
5492         (cp_parser_unary_expression): Don't check it.
5493         (cp_parser_postfix_open_square_expression): Split out from ...
5494         (cp_parser_postfix_expression): ... here.
5495         (cp_parser_postfix_dot_deref_expression): Likewise.
5496         (cp_parser_builtin_offsetof): New.
5497         (cp_parser_primary_expression): Use it.
5499 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5501         PR c++/14932
5502         * parser.c (cp_parser_postfix_expression): Allow subscript
5503         operator in offsetof.
5505 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
5507         PR c++/15701
5508         * friend.c (add_friend): Do not try to perform access checks for
5509         functions from dependent classes.
5511 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5513         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
5514         (pp_cxx_begin_template_argument_list): Turn into a function.
5515         (pp_cxx_end_template_argument_list): Likewise.
5516         (pp_cxx_separate_with): Define.
5517         (pp_cxx_unqualified_id): Tidy.
5518         (pp_cxx_primary_expression): Likewise.
5519         (pp_cxx_postfix_expression): Likewise.
5520         (pp_cxx_expression): Likewise.
5521         (pp_cxx_simple_type_specifier): Likewise.
5522         (pp_cxx_type_specifier_seq): Likewise.
5523         (pp_cxx_parameter_declaration_clause): Likewise.
5524         (pp_cxx_exception_specification): Likewise.
5525         (pp_cxx_direct_declarator): Likewise.
5526         (pp_cxx_type_id): Likewise.
5527         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
5528         cxx-pretty-print.c.
5529         (pp_cxx_left_paren): Likewise.
5530         (pp_cxx_right_paren): Likewise.
5531         (pp_cxx_left_brace): Likewise.
5532         (pp_cxx_right_brace): Likewise.
5533         (pp_cxx_left_bracket): Likewise.
5534         (pp_cxx_right_bracket): Likewise.
5535         (pp_cxx_dot): Likewise.
5536         (pp_cxx_identifier): Likewise.
5537         (pp_cxx_tree_identifier): Likewise.
5538         (pp_cxx_ampersand): New macro.
5539         (pp_cxx_star): Likewise.
5540         (pp_cxx_arrow): Likewise.
5541         (pp_cxx_semicolon): Likewise.
5542         (pp_cxx_complement): Likewise.
5543         (pp_cxx_begin_template_argument_list): Declaree.
5544         (pp_cxx_end_template_argument_list): Likewise.
5545         (pp_cxx_colon_colon): likewise.
5547 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
5549         * parser.c (cp_parser_simple_type_specifier): Explicitly test
5550         against NULL_TREE.
5552 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
5554         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
5555         typeck.c: Fix comment formatting.
5557 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
5559         * cp-lang.c (cp_expand_decl): Remove.
5560         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
5562 2004-05-30  Andreas Jaeger  <aj@suse.de>
5564         * lang-specs.h: Add missing initializers for .ii.
5566 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
5568         * decl.c (cp_make_fname_decl): Free return value from
5569         fname_as_string.
5571 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
5573         PR c++/15083
5574         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
5575         even in a templat.e
5576         * init.c (build_new): Likewise.
5578         PR c++/15640
5579         * name-lookup.c (arg_assoc): Robustify.
5581         PR c++/15471
5582         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
5583         when determining the scope to use for a pointer to member.
5584         (lookup_anon_field): Give it external linkage.
5585         * cp-tree.h (lookup_anon_field): Declare it.
5586         * expr.c (cplus_expand_constant): Use it.
5588 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
5590         PR c++/14668
5591         * parser.c (cp_parser_simple_type_specifier): Call
5592         maybe_note_name_used_in_class.
5594 2004-05-28  Tom Marshall  <tmarshall@real.com>
5596         PR c++/15214
5597         * class.c (finish_struct_1): Warn only if the dtor is non-private or
5598         the class has friends.
5600 2004-05-27  Adam Nemet  <anemet@lnxw.com>
5602         PR c++/12883
5603         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
5604         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
5606 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
5608         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
5609         if it might be needed.
5610         * pt.c (mark_decl_instantiated): Only call defer_fn if
5611         the function actually needs processing in finish_file.
5612         * decl2.c (finish_file): Add check that elements in
5613         deferred_fns_used are really needed there.  Remove unnecessary
5614         test of DECL_SAVED_TREE.
5616 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
5618         * Make-lang.in: No need to specify $(LIBCPP).
5620 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
5622         PR c++/15044
5623         * parser.c (cp_parser_class_head): Robustify.
5625         PR c++/15317
5626         * parser.c (cp_parser_decl_specifier_seq): Correct error in
5627         comment.
5628         (cp_parser_constructor_declarator_p): Treat attributes
5629         as decl-specifiers.
5631         PR c++/15329
5632         * typeck.c (build_unary_op): Do not attempt to resolve casts to
5633         base classes in templates.
5635 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
5637         PR c++/15165
5638         * pt.c (instantiate_template): Robustify.
5640 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
5642         PR c++/15025
5643         * decl.c (xref_tag): Issue errors about redeclaring template
5644         classes as non-template classes.
5646 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
5648         PR c++/14821
5649         * name-lookup.c (supplement_binding): Allow redefinitions of
5650         namespace aliases.
5652         PR c++/14883
5653         * parser.c (cp_parser_template_argument): Robustify.
5655 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5657         * class.c (alter_access): Use %E format specifier to print an
5658         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
5659         (push_lang_context): Likewise.
5660         * decl.c (lookup_label): Likewise.
5661         (grokdeclarator): Likewise.
5662         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
5663         * pt.c (do_type_instantiation): Likewise.
5664         * tree.c (handle_java_interface_attribute): Likewise.
5665         (handle_com_interface_attribute): Likewise.
5666         (handle_init_priority_attribute): Likewise.
5668 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
5670         PR c++/15285
5671         PR c++/15299
5672         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
5673         recognized as overloaded functions.
5675 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
5677         PR c++/15507
5678         * class.c (layout_nonempty_base_or_field): Do not try to avoid
5679         layout conflicts for unions.
5681         PR c++/15542
5682         * typeck.c (build_x_unary_op): Instantiate template class
5683         specializations before looking for "operator &".
5685         PR c++/15427
5686         * typeck.c (complete_type): Layout non-dependent array types, even
5687         in templates.
5689         PR c++/15287
5690         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
5691         template.
5693 2004-05-22  Roger Sayle  <roger@eyesopen.com>
5695         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
5696         returning when TREE_TYPE is error_mark_node.
5697         * typeck.c (require_complete_type): Return error_mark_node if
5698         value's type is an error_mark_node.
5700 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
5702         * optimize.c (calls_setjmp_r): Remove.
5703         (calls_setjmp_p): Remove.
5704         * cp-tree.c (calls_setjmp_p): Remove.
5705         * decl.c (finish_function): Do not call calls_setjmp_p.
5707 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
5709         * decl.c (cp_finish_decl): Use mark_decl_referenced.
5710         * decl2.c (maybe_make_one_only): Likewise.
5711         * method.c (use_thunk): Likewise.
5713 2004-05-18  Jason Merrill  <jason@redhat.com>
5715         * class.c (build_base_path): Tidy a bit.
5717 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
5719         * name-lookup.c (struct scope_binding): New.
5720         (EMPTY_SCOPE_BINDING): New.
5721         (lookup_using_namespace): Take a scope_binding instead of a
5722         cxx_binding.
5723         (qualified_lookup_using_namespace): Likewise.
5724         (cxx_binding_clear): Delete.
5725         (do_nonmember_using_decl): Use a scope_binding instead of a
5726         cxx_binding.
5727         (lookup_tag): Don't call select_decl.
5728         (ambiguous_decl): Don't return anything (and change callers to match).
5729         Take a scope_binding as the second parameter.
5730         (lookup_namespace_name): Use a scope_binding instead of a
5731         cxx_binding.
5732         (unqualified_namespace_lookup): Likewise.
5733         (lookup_qualified_name): Likewise.
5734         (select_decl): Take a scope_binding instead of a cxx_binding.
5735         Use macros rather than hand-coding tests for type-ness.
5737 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5739         * cp-gimplify.c: Rename from cp-simplify.c.
5740         * Make-lang.in, optimize.c: Update.
5742 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5744         Merge from tree-ssa-20020619-branch.  See
5745         ChangeLog.tree-ssa for details.
5747         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
5748         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
5749         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
5750         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
5751         Merged.
5752         * cp-mudflap.c: New file.
5753         * cp-simplify.c:: New file.
5755 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5757         PR c++/14389
5758         * decl2.c (check_classfn): For member templates, compare also the
5759         template parameters to match the declaration.
5760         * cp-tree.h: Adjust declaration of check_classfn.
5761         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
5762         * friend.c (do_friend): Likewise.
5763         * pt.c (tsubst_friend_function): Likewise.
5765 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
5767         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
5768         Instead, dig into the representation type to find the array bound.
5770 2004-04-30  Jason Merrill  <jason@redhat.com>
5772         Refer to base members using COMPONENT_REFs where possible.
5773         * class.c (build_simple_base_path): New fn.
5774         (build_base_path): Use it for non-virtual base references.
5775         (layout_class_type): Change base fields to their real type
5776         after layout is done.
5777         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
5778         * cp-lang.c (cxx_get_alias_set): Use it.
5780 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
5782         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
5783         comment typos.
5785 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5787         PR c++/15064
5788         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
5789         used in integral constant expressions.
5791 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
5793         * init.c (build_aggr_init): Fix accidental use of C99 construct in
5794         previous change.
5796         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
5797         braced initializer.
5798         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
5799         * decl.c (reshape_init): Use it.
5800         * init.c (perform_member_init): Remove redundant condition.
5801         (build_aggr_init): Adjust to handle brace-enclosed initializers
5802         correctly.
5803         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5805         * parser.c (cp_parser_initializer_clause): Do not set
5806         TREE_HAS_CONSTRUCTOR on the initializer.
5807         * rtti.c (tinfo_base_init): Likewise.
5808         (generic_initializer): Likewise.
5809         (ptr_initializer): Likewise.
5810         (ptm_initializer): Likewise.
5811         (class_initializer): Likewise.
5812         (get_pseudo_ti_init): Likewise.
5813         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5815 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
5817         * name-lookup.c (anonymous_namespace_name): Make static.
5819 2004-04-19  Roger Sayle  <roger@eyesopen.com>
5821         PR middle-end/14531
5822         * class.c (build_base_path): Call fold whilst building the NULL
5823         pointer check expression trees.
5825 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
5827         * init.c (build_new_1): Don't use type size argument for Java
5828         _Jv_AllocObject call.
5830 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
5832         * method.c (make_alias_for_thunk): Remove preprocessor guard on
5833         declaration and definition.
5835 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
5837         PR c++/14808
5838         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
5839         than ASM_OUTPUT_DEF.
5841 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5843         * decl2.c (mark_used): Don't segfault if cfun != NULL but
5844         current_function_decl == NULL.
5846 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
5848         PR c++/3518
5849         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
5850         level.
5852 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5854         * init.c (decl_constant_value): Don't look at DECL_INITIAL
5855         of PARM_DECL.
5856         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
5857         or TREE_SIDE_EFFECTS of a type.
5859 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
5861         PR c++/14007
5862         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
5863         cv-qualifier unification.
5864         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
5866 2004-04-02  Jan Hubicka  <jh@suse.cz>
5868         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
5869         * cp-tree.h (cp_update_decl_after_saving): Declare.
5870         * tree.c (cp_update_decl_after_saving): Define.
5872 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
5874         PR c++/14803
5875         * typeck.c (get_delta_difference): Call fold before returning the
5876         value.
5878 2004-04-01  Richard Henderson  <rth@redhat.com>
5880         PR c++/14804
5881         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
5882         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
5884 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
5886         PR c++/14810
5887         * name-lookup.c (maybe_push_cleanup_level): Robustify.
5889 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5891         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
5893 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5895         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
5896         * class.c (check_bitfield_decl): Likewise.
5897         * cvt.c (type_promotes_to): Likewise.
5898         * decl.c (finish_enum): Likewise.
5899         * mangle.c (write_builtin_type): Likewise.
5900         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
5901         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
5902         (build_binary_op): Likewise.
5904 2004-03-31  Jan Hubicka  <jh@suse.cz>
5906         * tree.h (optimize_function): Kill prototype.
5907         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
5908         * semantics.c (expand_body): Kill.
5910 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
5912         PR c++/14724
5913         * decl.c (start_decl_1): Do not decide whether or not to create a
5914         new cleanup level until after the type has been completed.
5916         PR c++/14763
5917         * pt.c (tsubst_default_argument): Clear current_function_decl.
5919 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
5921         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
5923 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
5925         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
5926         is null, just print the literal name and return.
5928 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
5930         * cxx-pretty-print.c: Fix comment typos.
5932 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
5934         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
5935         Update copyright.
5937 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
5939         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
5940         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
5941         target hook.
5943 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
5945         PR 12267, 12391, 12560, 13129, 14114, 14133
5946         * cp-lang.c (c_reset_state): Delete.
5947         (push_file_scope, pop_file_scope): New stubs.
5948         * parser.c (c_parse_file): Call sorry() here if called more than once.
5950 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5952         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
5953         for INTEGER_CST.
5955 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5957         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
5959 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5961         * error.c (enum pad): Remove.
5962         (dump_qualifiers): Likewise.
5963         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
5964         (dump_aggr_type): Likewise.
5965         (dump_type_suffix): Likewise.
5966         (dump_simple_decl): Likewise.
5967         (dump_function_decl): Likewise.
5968         (cv_to_string): Likewise.
5969         (dump_type_prefix): Likewise.  Adjust return void.
5970         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
5971         cxx_pretty_print.h.
5972         (pp_cxx_template_keyword_if_needed): Document.
5973         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
5974         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
5975         MUST_NOT_THROW_EXPR.
5977 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
5979         PR c++/14616
5980         * decl.c (cp_finish_decl): Compute the size of arrays declared in
5981         templates, if their type is non-dependent.
5983 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
5985         * call.c (build_op_delete_call): Do not forget the placement
5986         arguments when iterating through mutiple delete operators.
5988         * cp-tree.h (svaed_scope): Remove last_parms.
5989         (NEW_DELETE_OPNAME_P): New macro.
5990         (last_function_parms): Remove.
5991         (do_friend): Adjust prototype.
5992         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
5993         using last_function_parms.
5994         (grokfndecl): Take the PARM_DECLs as an argument, rather than
5995         using last_function_parms.
5996         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
5997         for class-specific operator new and operator delete.
5998         (grok_op_properties): Do not look for allocation functions with
5999         METHOD_TYPEs.
6000         (start_function): Use DECL_ARGUMENTS instead of
6001         last_function_parms.
6002         * decl.h (last_function_parms): Do not declare.
6003         * decl2.c (grokclassfn): Do not use last_function_parms.
6004         * friend.c (do_friend): Remove parmdecls parameter.
6005         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
6006         (pop_from_top_level): Do not restore it.
6007         * pt.c (check_explicit_specialization): Do not adjust
6008         last_function_parms.
6010         * name-lookup.c (do_local_using_decl): Create a local binding for
6011         types brought in via using declarations.
6013         * name-lookup.c (lookup_arg_dependent): Handle block-scope
6014         function declarations correctly.
6016         * semantics.c (finish_id_expression): Correct handling of
6017         conversion operators to dependent types.
6019         * typeck.c (lookup_destructor): Allow the use of destructors from
6020         base classes.
6022 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6024         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
6025         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
6026         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
6027         the field is named TEMPLATE_TYPE_PARM_INDEX.
6029 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6031         PR c++/14545
6032         * parser.c (cp_parser_functional_cast): A cast to anything
6033         but integral or enumaration type is not an integral constant
6034         expression.
6035         * pt.c (value_dependent_expression_p): Handle cast expressions
6036         without operands (such as "int()").
6038 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
6040         * semantics.c (finish_pseudo_destructor_expr): Allow differing
6041         cv-qualification between the type named by the
6042         pseudo-destructor-name and the object-type.
6044         * search.c (accessible_base_p): Handle non-proper bases.
6046         * name-lookup.c (do_nonmember_using_decl): If a using declaration
6047         refers to a single overloaded function, set the type of the
6048         function.
6049         * tree.c (lvalue_type): Simplify.
6050         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
6051         unknown type.
6052         (build_unary_op): Handle OVERLOADs with known types.
6054         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
6055         function templates.
6057         * parser.c (cp_parser_postfix_expression): Handle the use of
6058         "typename" in non-dependent contexts.  Convert appropriately when
6059         when using a qualified name after "->" or ".".
6061         * call.c (conditional_conversion): Honor the requirement that some
6062         conversions refer to the original object.
6064 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
6066         * call.c (build_conditional_expr): Do not call force_rvalue for
6067         operands of void_type when the conditional expression itself has
6068         void type.
6069         * name-lookup.c (pushdecl): Don't consider a declaration of a
6070         function named "main" to be an overload of a type named "main".
6071         * parser.c (cp_parser_template_name): Perform name lookup when the
6072         template name is proceeded by "template" if the qualifying scope
6073         is non-dependent.
6074         * typeck.c (composite_pointer_type_r): Correctly handle
6075         pointer-to-member types.
6076         (build_const_cast): Likewise.
6078 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6080         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
6081         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
6082         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
6083         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
6084         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
6085         (TYPEOF_TYPE_EXPR): New macro.
6086         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
6087         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
6088         * pt.c (tsubst): Likewise.
6089         * semantics.c (finish_typeof): Likewise.
6090         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
6091         and TEMPLATE_TYPE_PARM.
6092         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
6093         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
6095 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
6097         PR c++/14586
6098         * cp-tree.h (build_new_op): Change prototype.
6099         (build_x_binary_op): Likewise.
6100         * call.c (build_new_op): Add overloaded_p parameter.
6101         * decl2.c (grok_array_decl): Adjust call to build_new_op.
6102         * parser.c (cp_parser_binary_expression): Note that uses of
6103         overloaded operators prevents an expression from being considered
6104         an integral constant.
6105         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
6106         build_x_binary_op.
6107         * semantics.c (finish_call_expr): Likewise.
6108         * typeck.c (rationalize_conditional_expr): Likewise.
6109         (build_x_indirect_ref): Likewise.
6110         (build_x_binary_op): Likewise.
6111         (build_x_unary_op): Likewise.
6112         (build_x_compound_expr): Likewise.
6113         (build_modify_expr): Likewise.
6114         * typeck2.c (build_x_arrow): Likewise.
6116 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
6118         * cp-lang.c, ptree.c: Update copyright.
6120 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
6122         PR c++/14550
6123         * parser.c (cp_parser_non_integral_constant_expression): Encode
6124         more of the idiom that surrounded calls to this function within
6125         the function itself
6126         (cp_parser_primary_expression): Adjust accordingly.
6127         (cp_parser_postfix_expression): Likewise.
6128         (cp_parser_unary_expression): Likewise.
6129         (cp_parser_cast_expression): Likewise.
6130         (cp_parser_assignment_expression): Likewise.
6131         (cp_parser_expression): Likewise.
6132         (cp_parser_new_expression): Note that new-expressions are not
6133         allowed in integral constant expressions.
6134         (cp_parser_delete_expression): Likewise.
6136 2004-03-12  Matt Austern  <austern@apple.com>
6138         * decl2.c (maybe_make_one_only): Look at
6139         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
6140         to make an explicit instantiation weak.
6141         * method.c (use_thunk): Make sure we call comdat_linkage
6142         when appropriate.
6143         * pt.c (do_type_instantiation): On systems where weak symbols
6144         don't go in a static archive's TOC, explicit instantiation of a
6145         class must imply *explicit* instantiation of its memeber.
6147 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
6149         * call.c, cp-tree.h, pt.c: Fix comment typos.
6151 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
6153         PR c++/14510
6154         * decl.c (xref_tag): Disregard non-type declarations when
6155         looking up a tagged type.
6157 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
6159         PR c++/14397
6160         * call.c (convert_like_real): Build a const qualified temporary,
6161         when testing ctor access.
6163 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
6165         * call.c (initialize_reference): Fix typo.
6167 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6169         PR c++/14409
6170         * pt.c (determine_specialization): For member templates, match also
6171         constness.
6173         PR c++/14448
6174         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
6175         non-dependent.
6176         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
6178 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
6180         PR c++/14230
6181         * call.c (initialize_reference): Handle initializers that are
6182         class-member access expressions applies to rvalues.
6184 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
6186         PR c++/14432
6187         * name-lookup.c (supplement_binding): Ignore functions that are
6188         marked DECL_ANTICIPATED.
6190 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
6192         PR c++/14401
6193         * class.c (check_field_decls): Complain about non-static data
6194         members of reference type in unions.  Propagate
6195         CLASSTYPE_REF_FIELDS_NEED_INIT and
6196         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
6197         data members.
6198         * init.c (perform_member_init): Complain about mbmers with const
6199         type that are not explicitly initialized.
6201 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
6203         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
6204         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
6205         (lang_identifier): Remove implicit_decl and error_locus.
6206         (IDENTIFIER_IMPLICIT_DECL): Remove.
6207         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
6208         (IDENTIFIER_ERROR_LOCUS): Likewise.
6209         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
6210         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
6211         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6212         (implicitly_declare): Remove.
6213         * decl.c (warn_extern_redeclared_static): Remove check of
6214         IDENTIFIER_IMPLICIT_DECL.
6215         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
6216         (implicitly_declare): Remove.
6217         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
6218         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
6219         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
6220         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
6221         in the innermost scope, rather than at namespace scope.
6222         * name-lookup.c (push_local_binding): Give it external linkage.
6223         (pushdecl): Remove dead code.
6224         * name-lookup.h (push_local_binding): Declare it.
6225         * ptree.c (cxx_print_identifier): Don't print
6226         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
6227         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
6228         not IDENTIFIER_ERROR_LOCUS.
6229         * typeck.c (build_function_call): Remove dead code.
6231 2004-03-08  Jason Merrill  <jason@redhat.com>
6233         PR c++/13170
6234         * decl.c (xref_tag): Remove attribute handling.
6235         * cp-tree.h: Adjust prototype.
6236         * decl.c, parser.c, rtti.c: Adjust callers.
6237         * parser.c (cp_parser_class_head): Pass back attributes in the
6238         class head.
6239         (cp_parser_class_specifier): Adjust.
6241 2004-03-08  Matt Austern  <austern@apple.com>
6243         PR debug/14079
6244         * name-lookup.c (add_decl_to_level): Add extern variables, as well
6245         as static, to static_decls array.
6247 2004-03-05  Jason Merrill  <jason@redhat.com>
6249         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
6251 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
6253         * decl.c (grokfndecl): Update old incorrect comment.
6254         (grokvardecl): Diagnose C++ variables of type with no linkage.
6256 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
6258         PR c++/14369
6259         * pt.c (build_non_dependent_expr): Do not create a
6260         NON_DEPENDENT_EXPR for a THROW_EXPR.
6262 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6264         PR c++/14369
6265         * error.c (dump_expr): Handle THROW_EXPR.
6267 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
6269         PR c++/14360
6270         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
6271         lookup if ordinary name-lookup finds a non-function.
6272         * pt.c (tsubst_copy_and_build): Likewise.
6274         PR c++/14361
6275         * parser.c (cp_parser_late_parsing_default_args): Check that there
6276         are no extra tokens after the end of the default-argument
6277         expression.
6279 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
6281         PR c++/14324
6282         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
6283         having C++ linkage for name-mangling purposes.
6285         PR c++/14260
6286         * parser.c (cp_parser_direct_declarator): Recognize constructor
6287         declarators that use a template-id to name the class being
6288         constructed.
6290         PR c++/14337
6291         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
6292         (tsubst_expr): Do not call tsubst_copy, even when
6293         processing_template_decl.
6295 2004-03-01  Jeff Law  <law@redhat.com>
6297         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
6298         the proper type.
6300 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
6302         PR c++/14138
6303         * name-lookup.h (push_scope): Change prototype.
6304         * name-lookup.c (push_scope): Do not reenter the current class
6305         scope.
6306         * decl.c (grokfndecl): Check return code from push_scope before
6307         calling pop_scope.
6308         * decl2.c (check_classfn): Likewise.
6309         * parser.c (cp_parser_conversion_function_id): Likewise.
6310         (cp_parser_init_declarator): Likewise.
6311         (cp_parser_direct_declarator): Likewise.
6312         (cp_parser_class_specifier): Likewise.
6313         (cp_parser_class_head): Likewise.
6314         (cp_parser_lookup_name): Likewise.
6315         (cp_parser_constructor_declarator_p): Likewise.
6316         * pt.c (instantiate_class_template): Likewise.
6317         (resolve_typename_type): Likewise.
6319 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
6321         PR c++/14267
6322         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
6323         extension.
6325         PR debug/12103
6326         * class.c (update_vtable_entry_for_fn): Do not go through
6327         covariance machinery if the type returned by an overrider is the
6328         same as the original.
6330 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
6332         * call.c: Fix a comment typo.
6334 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
6336         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
6338 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
6340         PR c++/14278
6341         * parser.c (cp_parser_parameter_declaration_list): Commit
6342         to fewer tentative parses.
6344 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6346         PR c++/14284
6347         * pt.c (dependent_type_p_r): A template template parameter is a
6348         dependent type.
6350 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6352         PR c++/14246
6353         * mangle.c (write_template_arg_literal): Don't rely on identity for
6354         boolean constants.
6356 2004-02-24  Jason Merrill  <jason@redhat.com>
6358         * tree.c (build_exception_variant): Use check_qualified_type.
6360 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
6361             Kazu Hirata  <kazu@cs.umass.edu>
6363         * decl.c (cxx_init_decl_processing): Don't check
6364         flag_writable_strings.
6366 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
6368         PR c++/14156
6369         * typeck.c (maybe_warn_about_returning_address_of_location):
6370         Change check for VAR_DECL to use DECL_P instead.
6372 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6374         PR c++/14250
6375         * cvt.c (build_expr_type_conversion): Type must be complete before
6376         looking up for conversions.
6378 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6380         PR c++/14143
6381         * name-lookup.c (arg_assoc_class): Don't look into template
6382         arguments if it is not a primary template.
6384 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6386         PR c++/12007
6387         * method.c (use_thunk): Always clone function argument tree.
6389 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
6391         PR c++/14199
6392         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
6394         PR c++/14173
6395         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
6396         for all type variants.
6398 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
6400         PR c++/13927
6401         * decl.c (duplicate_decls): Return error_mark_node for invalid
6402         redeclarations.
6403         * name-lookup.c (push_namespace): Ignore the return value from
6404         pushdecl.
6405         * pt.c (push_template_decl_real): Robustify.
6407         PR c++/14186
6408         * name-lookup.c (push_class_level_binding): Do not complain about
6409         adding a binding for a member whose name is the same as the
6410         enclosing class if the member is located in a base class of the
6411         current class.
6413 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6415         PR c++/14181
6416         * parser.c (cp_parser_new_expression): Parse an ill-formed
6417         direct-new-declarator after a parenthesized type-id to emit good
6418         diagnostic.
6420 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
6422         * cp-tree.def, cvt.c: Update copyright.
6424 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
6426         PR c++/11326
6427         * cp-tree.h (abi_version_at_least): Remove.
6428         * mangle.c: Include flags.h.
6430 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
6432         PR c++/13971
6433         * call.c (build_conditional_expr): Handle conversions between
6434         class types which result in differently cv-qualified type
6435         variants.
6437         PR c++/14086
6438         * class.c (delete_duplicate_fields_1): Remove.
6439         (delete_duplicate_fields): Likewise.
6440         (finish_struct_anon): Remove check for members with the same name
6441         as their enclosing class.
6442         (check_field_decls): Do not call duplicate_fields.
6443         * decl.c (grokdeclarator): Remove check for static data members
6444         with the same name as their enclosing class.
6445         * name-lookup.c (push_class_level_binding): Check for members with
6446         the same name as their enclosing class.
6448 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6450         PR c++/14085
6451         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
6453 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6455         PR c++/13635
6456         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
6457         has full set of arguments.
6459 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6461         PR c++/13927
6462         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
6464 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
6466         PR c++/14122
6467         * cp-tree.h (delete_sanity): Change prototype.
6468         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
6469         Remove dead code.  Adjust code to warn about deleting an array.
6470         * typekc.c (decay_conversion): Use build_address and build_nop.
6472         PR c++/14108
6473         * search.c (accessible_p): Do not check access in thunks.
6475         PR c++/14083
6476         * call.c (build_conditional_expr): Call force_rvalue on the
6477         non-void operand in the case that one result is a throw-expression
6478         and the other is not.
6480 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
6482         PR c++/9851
6483         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
6484         the type name and look ahead for ::~, and bail out early with a
6485         better error message if the parse is going to fail.
6487 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
6489         * call.c (conversion_kind): New type.
6490         (conversion_rank): Likewise.
6491         (conversion): Likewise.
6492         (CONVERSION_RANK): New macro.
6493         (conversion_obstack): New variable.
6494         (obstack_initialized): Likewise.
6495         (z_candidate): Change type of convs and second_conv.
6496         (candidate_warning): New type.
6497         (IDENTITY_RANK): Remove.
6498         (EXACT_RANK): Likewise.
6499         (PROMO_RANK): Likewise.
6500         (STD_RANK): Likewise.
6501         (PBOOL_RANK): Likewise.
6502         (USER_RANK): Likewise.
6503         (ELLIPSIS_RANK): Likewise.
6504         (BAD_RANK): Likewise.
6505         (ICS_RANK): Likewise.
6506         (ICS_STD_RANK): Likewise.
6507         (ICS_USER_FLAG): Likewise.
6508         (ICS_ELLIPSIS_FLAG): Likewise.
6509         (ICS_THIS_FLAG): Likewise.
6510         (ICS_BAD_FLAG): Likewise.
6511         (NEED_TEMPORARY_P): Likewise.
6512         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
6513         (USER_CONV_CAND): Likewise.
6514         (USER_CONV_FN): Likewise.
6515         (conversion_obstack_alloc): New function.
6516         (alloc_conversion): Likewise.
6517         (validate_conversion_obstack): Likewise.
6518         (alloc_conversions): Likewise.
6519         (build_conv): Adjust to deal with new conversion data structures.
6520         (build_identity_conv): New function.
6521         (build_ambiguous_conv): Likewise.
6522         (standard_conversion): Adjust to deal with new conversion data
6523         structures.
6524         (convert_class_to_reference): Likewise.
6525         (direct_reference_binding): Likewise.
6526         (reference_binding): Likewise.
6527         (implicit_conversion): Likewise.
6528         (add_candidate): Likewise.
6529         (add_function_candidate): Likewise.
6530         (add_conv_candidate): Likewise.
6531         (build_builtin_candidate): Likewise.
6532         (print_z_candidate): Likewise.
6533         (merge_conversion_sequences): Likewise.
6534         (build_user_type_conversion_1): Likewise.
6535         (build_user_type_conversion): Likewise.
6536         (build_new_function_call): Likewise.
6537         (build_object_call): Likewise.
6538         (conditional_conversion): Likewise.
6539         (build_conditional_expr): Likewise.
6540         (build_new_op): Likewise.
6541         (build_op_delete_call): Likewise.
6542         (convert_like_real): Likewise.
6543         (build_over_call): Likewise.
6544         (build_new_method_call): Likewise.
6545         (is_subseq): Likewise.
6546         (maybe_handle_implicit_object): Likewise.
6547         (maybe_handle_ref_bind): Likewise.
6548         (compare_ics): Likewise.
6549         (source_type): Likewise.
6550         (add_warning): Likewise.
6551         (joust): Likewise.
6552         (can_convert_arg): Likewise.
6553         (can_convert_arg_bad): Likewise.
6554         (perform_implicit_conversion): Likewise.
6555         (perform_direct_initialization_if_possible): Likewise.
6556         (initialize_reference): Likewise.
6557         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
6558         * cp-tree.def (WRAPPER): Likewise.
6559         (IDENTITY_CONV): Remove.
6560         (LVALUE_CONV): Likewise.
6561         (QUAL_CONV): Likewise.
6562         (STD_CONV): Likewise.
6563         (PTR_CONV): Likewise.
6564         (PMEM_CONV): Likewise.
6565         (BASE_CONV): Likewise.
6566         (REF_BIND): Likewise.
6567         (USER_CONV): Likewise.
6568         (AMBIG_CONV): Likewise.
6569         (RVALUE_CONV): Likewise.
6570         * cp-tree.h (tree_wrapper): Remove.
6571         (WRAPPER_ZC): Remove.
6572         (lang_tree_node): Remove wrapper.
6573         (LOOKUP_SPECULATIVELY): Remove.
6574         (build_op_delete_call): Adjust prototype.
6575         (validate_conversion_obstack): Declare.
6576         (build_zc_wrapper): Remove.
6577         * cvt.c (convert_to_reference): Remove dead code.
6578         (ocp_convert): Likewise.
6579         * decl.c (redeclaration_error_message): Correct handling of
6580         templates.
6581         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
6582         (cp_tree_node_structure): Remove WRAPPER case.
6583         * decl2.c (finish_file): Call validate_conversion_obstack.
6584         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
6585         (build_op_delete_call): Likewise.
6586         (build_x_delete): Likewise.
6587         (build_delete): Adjust call to build_op_delete_call.
6588         * pt.c (tsubst_friend_declaration): Adjust code to determine
6589         whether or not a friend template is a definition.
6590         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
6591         * tree.c (build_zc_wrapper): Remove.
6593 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
6595         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
6596         * cp-tree.h: Don't declare cxx_builtin_type_decls.
6597         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
6598         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
6600 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
6602         * typeck.c (lookup_destructor): Fix typo in error message.
6604 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
6606         * call.c, parser.c, tree.c: Fix comment typos.
6608 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
6610         Bug 13856
6611         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
6612         * decl.c (duplicate_decls, start_function): Likewise.
6614 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
6616         * name-lookup.c (pushdecl): Issue shadow warnings directly.
6617         * parser.c (free_parser_stacks): Delete.
6619 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
6621         * rtti.c: Update copyright.
6623 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6625         PR c++/14033
6626         * decl.c (require_complete_types_for_parms): Do not insert
6627         error_mark_node in the parameter list.
6629 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6631         PR c++/14028
6632         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
6633         error when terminator can not be found.
6635 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
6637         Make-lang.in (po-generated):  Delete.
6639 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
6641         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
6642         targetm.calls.promote_prototypes.
6644 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6646         PR middle-end/13750
6647         Revert:
6648         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
6649         PR pch/13361
6650         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6651         (handle_pragma_implementation): Likewise.
6653 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
6655         PR c++/13714
6656         * typeck.c (lookup_destructor): Tweak error message.
6658 2004-02-05  Jan Hubicka  <jh@suse.cz>
6660         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
6661         functions.
6663 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6665         PR c++/14008
6666         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
6667         code, only emits the diagnostic now. Added lookup of the identifier
6668         and support for qualified ids.
6669         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
6670         Parse an (invalid) type name as id-expression within a declarator.
6671         (cp_parser_simple_declaration): Use it.
6672         (cp_parser_member_declaration): Likewise.
6673         (cp_parser_make_typename_type): New function. Handle errors through
6674         cp_parser_diagnose_invalid_typename.
6675         (cp_parser_elaborated_type_specifier): Use it.
6677 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
6679         PR c++/13932
6680         * call.c (convert_like_real): Use "converting" rather than
6681         "argument" as the descriptive keyword to
6682         dubious_conversion_warnings.
6683         * typeck.c (convert_for_assignment): Do not call
6684         dubious_conversion_warnings.
6686 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6688         PR c++/13086
6689         * init.c (build_delete): Emit a more informative error message in
6690         case of an incomplete type, and on the correct source line.
6692 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
6694         * error.c, search.c: Update copyright.
6696 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
6698         PR c++/9941
6699         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
6700         linkage for the typeinfo name string.
6702 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
6704         PR c++/13969
6705         * cp-tree.h (fold_non_dependent_expr): New function.
6706         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
6707         (cp_parser_template_argument): Use fold_non_dependent_expr.
6708         (cp_parser_direct_declarator): Likewise.
6709         * pt.c (fold_non_dependent_expr): New function.
6710         (convert_nontype_argument): Use it.
6711         (tsubst_qualified_id): Simplify.
6712         (tsubst_copy_and_build): Likewise.
6714 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
6716         * decl.c (cxx_push_function_context): Do not set
6717         current_function_is_thunk.
6718         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
6719         actual function.
6721 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6723         PR c++/13997
6724         * pt.c (more_specialized_class): Increase processing_template_decl
6725         while partial ordering.
6727 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
6729         PR c++/13925
6730         * decl.c (start_function): Do not call pushdecl for any
6731         instantiation or specialization of a primary template.
6733 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
6735         PR c++/13950
6736         * parser.c (cp_parser_class_name): Robustify.
6738         PR c++/13970
6739         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
6741         PR c++/14002
6742         * semantics.c (finish_id_expression): Do not return an
6743         IDENTIFIER_NODE when lookup finds a PARM_DECL.
6745 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
6747         PR c++/13978
6748         * pt.c (build_non_dependent_expr): Do not build
6749         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
6751         PR c++/13968
6752         * semantics.c (finish_id_expression): Do not return an
6753         IDENTIFIER_NODE when lookup finds a VAR_DECL.
6755         PR c++/13975
6756         * parser.c (cp_parser_simple_declaration): When skipping to the
6757         end of the statement swallow the terminating semicolon.
6759 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
6761         PR c++/13113
6762         * init.c (build_offset_ref): Improve error recovery for invalid
6763         uses of non-static member functions.
6765         PR c++/13854
6766         * cp-tree.h (cp_build_type_attribute_variant): New function.
6767         * class.c (build_clone): Use cp_build_type_attribute_variant.
6768         * decl.c (duplicate_decls): Likewise.
6769         * pt.c (copy_default_args_to_explicit_spec): Likewise.
6770         (tsubst_function_type): Likewise.
6771         * tree.c (build_exception_variant): Check attributes before
6772         concluding that two types are the same.
6773         (cp_build_type-attribute_variant): New method.
6774         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
6776         PR c++/13907
6777         * call.c (convert_class_to_reference): Keep better track of
6778         pedantically invalid user-defined conversions.
6780 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6782         PR c++/13957
6783         * pt.c (tsubst_qualified_id): Improved error message when a type
6784         is expected but not found.
6786 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
6788         * class.c: Fix comment typos.
6789         * decl.c: Likewise.
6790         * error.c: Likewise.
6791         * parser.c: Likewise.
6792         * pt.c: Likewise.
6793         * search.c: Likewise.
6794         * typeck.c: Likewise.
6796 2004-01-30  Richard Henderson  <rth@redhat.com>
6798         PR c++/13693
6799         * method.c (use_thunk): Don't force_target_expr for void thunks.
6800         * tree.c (build_target_expr_with_type): Assert non-void type.
6801         (force_target_expr): Likewise.
6803 2004-01-30  Michael Matz  <matz@suse.de>
6805         * parser.c (cp_parser_labeled_statement): Accept case ranges.
6807 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6809         DR206
6810         PR c++/13813
6811         * decl.c (grokdeclarator): Check immediatly type completeness for
6812         non-dependent types.
6814 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6816         PR c++/13683
6817         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
6818         a sizeof expression.block
6820 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
6822         PR c++/13883
6823         * mangle.c (write_encoding): Correct encoding of member template
6824         constructors.
6826 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6828         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
6829         template name as it was `<::' (digraph typo).
6830         (cp_parser_nth_token_starts_template_argument_list_p): New function.
6831         (cp_parser_id_expression): Use it.
6832         (cp_parser_nested_name_specifier_opt): Likewise.
6833         (cp_parser_template_name): Likewise.
6834         (cp_parser_class_name): Likewise.
6835         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
6837 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
6839         PR c++/13791
6840         * typeck.c (merge_types): Do not merge attributes into
6841         TYPENAME_TYPEs.
6843         PR c++/13736
6844         * parser.c (cp_parser_direct_declarator): Do not prevent
6845         backtracking inside a parenthesized declarator.
6846         (cp_parser_parameter_declaration): Fix typo in comment.
6848 2004-01-28  Jan Hubicka  <jh@suse.cz>
6850         * semantics.c (expand_body)  Do emit_associated_thunks before
6851         expansion.
6853 2004-01-27  Devang Patel  <dpatel@apple.com>
6855         * name-lookup.c: Include "debug.h"
6856         (do_namespace_alias): Invoke debug_hooks to emit debug info
6857         for namespace alias.
6858         (do_local_using_decl): Invoke debug_hooks to emit debug info
6859         for using decl.
6860         (do_class_using_decl): Same.
6861         (do_toplevel_using_decl): Same.
6862         (do_using_directive): Same.
6863         (cp_emit_debug_info_for_using): New function.
6864         * Make-lang.in (cp/parser.o): Depend on debug.h
6865         (cp/name-lookup.o): Same.
6867 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6869         * cp-tree.h (language_function, lang_type_header): Use
6870         BOOL_BITFIELD.
6871         * name-lookup.h (cp_binding_level): Likewise.
6873 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
6875         PR c++/13663
6876         * semantics.c (finish_for_expr): Check for unresolved overloaded
6877         functions.
6879         * class.c (add_method): Just check processing_template_decl to
6880         determine whether or not we are within a template.
6881         * decl2.c (maybe_retrofit_in_chrg): Likewise.
6882         * init.c (decl_constant_value): Check the type of the declaration,
6883         not TREE_READONLY.
6884         * name-lookup.c (maybe_push_to_top_level): Rename to ...
6885         (push_to_top_level): ... this.
6886         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
6887         * pt.c (push_template_decl_real): Reorder condition for speed.
6888         (convert_template_argument): Use dependency-checking functions in
6889         place of uses_template_parms.
6890         (lookup_template_class): Avoid calling uses_template_parms more
6891         than once.
6892         (uses_template_parms): Reimplement, using dependency-checking
6893         functions.
6894         (instantiate_class_template): Use push_to_top_level, not
6895         maybe_push_to_top_level.
6896         (type_unification_real): Simplify.
6897         (type_dependent_expression_p): Handle OFFSET_REFs and
6898         TEMPLATE_DECLs.
6899         (any_dependent_template_arguments_p): Handle multiple levels of
6900         template argument.
6901         * semantics.c (expand_or_defer_fn): Do not check
6902         uses_template_parms for template instantiations.
6903         * typeck.c (comptypes): Avoid calling cp_type_quals.
6905 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
6907         PR c++/13833
6908         * call.c (build_over_call): Do not convert arguments when
6909         processing a template.
6910         * pt.c (build_non_dependent_expr): Do not build a
6911         NON_DEPENDENT_EXPR for arithmetic constants.
6913 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6915         PR c++/13810
6916         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
6917         returns a TYPE_DECL. no further lookup is required.
6918         * semantics.c (check_template_template_default_arg): A TYPE_DECL
6919         is invalid. Rework to give better diagnostics.
6921 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6923         PR c++/13797
6924         * pt.c (instantiate_class_template): Add an error_mark_node
6925         check.
6926         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
6928 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
6930         PR c++/13701
6931         * decl.c (finish_function): Move the call to
6932         finish_fname_decls below the call to
6933         finish_eh_spec_block.
6935 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
6937         * optimize.c, typeck2.c: Update copyright.
6939 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
6941         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
6942         init.c, mangle.c, typeck.c: Update copyright.
6944 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6946         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
6948 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6950         * Make-lang.in: Replace $(docdir) with doc.
6951         (c++.info, c++.srcinfo): Dummy entry.
6952         (c++.man, c++.srcman): New rules.
6953         (c++.install-man): Revamp rule.
6955 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6957         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
6958         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
6959         immediate $(shell) instead of deferred backquote.
6961 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
6963         PR c++/13651
6964         * parser.c (cp_parser_postfix_expression): When encountering
6965         incomplete type on left-hand side of "->" or ".", treat the entire
6966         expression as erroneous.
6968         PR c++/13592
6969         * call.c (build_field_call): Remove.
6970         (n_build_method_call): Likewise.
6971         (build_method_call): Likewise.
6972         (build_new_method_call): Do not call build_field_call.
6973         * class.c (n_build_method_call): Remove.
6974         (print_class_statistics): Do not print it.
6975         * cp-tree.h (build_method_call): Remove declaration.
6976         (finish_object_call_expr): Likewise.
6977         (build_new_1): Do not use build_method_call.
6978         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
6979         when the function appearing on the right-hand-side of "." or "->"
6980         is not actually a function.
6981         * pt.c (tsubst_copy_and_build): Likewise.
6982         * semantics.c (finish_object_call_expr): Remove.
6984 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
6986         PR c++/13710
6987         * pt.c (tsubst): Use finish_typeof.
6989 2004-01-18  Jason Merrill  <jason@redhat.com>
6991         PR c++/11725
6992         * except.c (build_throw): In a template, set
6993         current_function_returns_abnormally.
6995 2004-01-17  Fred Fish  <fnf@intrinsity.com>
6997         PR c++/11895
6998         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
6999         except don't call array_type_nelts() with a VECTOR_TYPE.
7001 2004-01-16  Jan Hubicka  <jh@suse.cz>
7003         * mangle.c (write_mangled_name): Remove inline modifier.
7005 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
7007         PR c++/13574
7008         * decl.c (compute_array_index_type): Fix grammar in comment.
7009         * init.c (build_zero_init): Handle zero-sized arrays correctly.
7011         PR c++/13178
7012         * call.c (name_as_c_string): Print conversion operator names
7013         correctly.
7015         PR c++/13478
7016         * call.c (initialize_reference): Pass -1 for inner parameter to
7017         convert_like_real.
7019 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7021         PR c++/13407
7022         * parser.c (cp_parser_base_specifier): Check for an invalid
7023         keyword `typename' and emit an user-friendly error message.
7025 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
7027         PR pch/13361
7028         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7029         (handle_pragma_implementation): Likewise.
7031 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7033         PR c++/9259
7034         * typeck.c (build_class_member_access_expr): Allow to access members
7035         of the currently open class.
7036         (finish_class_member_access_expr): Likewise.
7038 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
7040         PR c++/13659
7041         * name-lookup.c (validate_nonmember_using_decl): Take scope and
7042         name by value, instead of computing them.
7043         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
7044         arguments.  Pass them to validate_nonmember_using_decl.
7045         * name-lookup.h (do_local_using_decl): Adjust.
7046         (do_toplevel_using_decl): Likewise.
7047         * parser.c (cp_parser_using_declaration): Likewise.
7048         * pt.c (tsubst_expr): Likewise.
7050 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
7052         PR c++/13594
7053         PR c++/13658
7054         * name-lookup.c (qualified_lookup_using_namespace): Search
7055         strongly-associated namespaces first, and only then try other
7056         namespaces.
7058 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
7060         * Make-lang.in (c++.srcextra): Dummy entry.
7062 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7064         PR c++/8856
7065         * parser.c (cp_parser_template_name): Don't try to parse a
7066         conversion-function-id, as it cannot be a template-name.
7067         (cp_parser_simple_type_specifier): Check for invalid template-ids
7068         even after a built-in type.
7070 2004-01-14  Jan Hubicka  <jh@suse.cz>
7072         PR c++/12850
7073         * pt.c (instantiate_decl):  Do not increase function_depth.
7075 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
7077         PR c++/9021
7078         PR c++/11005
7079         * parser.c (cp_parser_elaborated_type_specifier): Warn about
7080         attributes and discard.
7081         * decl.c (xref_tag): Don't overwite existing attributes with
7082         NULL_TREE.
7084 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7086         PR c++/12335
7087         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
7088         is no destructor while looking up a BIT_NOT_EXPR.
7090 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
7092         * cxxfilt.c: Remove unused file.
7094 2004-01-14  Jan Hubicka  <jh@suse.cz>
7096         Partial fix to PR c++/12850
7097         * decl2.c (mark_used): Do not proactively instantiate templates
7098         when compiling in unit-at-a-time or not optimizing.
7099         * optimize.c (maybe_clone_body): Do not increase function depth.
7101 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7103         PR c++/13474
7104         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
7106 2004-01-12  Steven Bosscher  <stevenb@suse.de>
7108         PR c++/13558
7109         * parser.c (cp_parser_member_declaration): Any non-type is also
7110         not a class or a function.
7112 2004-01-12  Jason Merrill  <jason@redhat.com>
7114         PR c++/12815
7115         * class.c (build_base_path): Do not mark vtable references as
7116         TREE_CONSTANT.
7117         (build_vtbl_ref_1): Likewise.
7119 2004-01-12  Richard Henderson  <rth@redhat.com>
7121         PR opt/10776
7122         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
7123         (store_init_value): Use it.
7124         * decl.c (check_initializer): Expect full initialization code
7125         from store_init_value.
7126         * init.c (expand_aggr_init_1): Likewise.
7127         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
7129 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
7131         * class.c (layout_class_type): For non-POD class types, also copy
7132         the DECL_SIZE and DECL_MODE of fields to the base class type.
7134 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7136         PR c++/13289
7137         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
7138         calling regenerate_decl_from_template.
7140 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
7142         PR c++/4100
7143         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
7144         decl-specifier occurring along with a class definition.
7146 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
7148         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
7149         clauses to comments describing declares_class_or_enum.
7150         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
7151         false.
7153 2004-01-12  Jan Hubicka  <jh@suse.cz>
7155         * pt.c (for_each_template_parm): Do not check for duplicates.
7156         (for_each_template_parm): Use walk_tree duplicate checking code.
7158 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
7160         PR c++/3478
7161         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
7162         is error_mark_node, don't add any more decl_specs.
7163         (cp_parser_init_declarator): After committing to a declaration, if
7164         the decl_specifiers start with error_mark_node, issue an error and
7165         change the type to "int".
7167 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
7169         PR bootstrap/7817
7170         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
7172 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7174         DR 337
7175         PR c++/9256
7176         * pt.c (tsubst): Substitution must fail if we are attempting to
7177         create an array with element type that is an abstract class type.
7178         * decl.c (cp_finish_decl): Strip pointers and array types recursively
7179         before calling abstract_virtuals_error.
7181 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
7183         * name-lookup.c (qualified_lookup_using_namespace): Consider
7184         strong using directives even if we've already found a binding.
7186 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
7188         * cp-tree.h (cxx_expand_expr): Change prototype.
7189         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
7191 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7193         PR c++/12573
7194         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
7195         looking into them recursively. They can be there because of the
7196         new __offsetof__ extension.
7198 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
7200         * parser.c (cp_parser_save_member_function_body): Mark the
7201         definition static.
7203 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
7205         PR c++/13057
7206         * class.c (build_clone): Copy type attributes from the original
7207         function to the clone.
7209         PR c++/12815
7210         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
7211         references as constant.
7213         PR c++/12132
7214         * parser.c (cp_parser_explicit_instantiation): Improve error
7215         recovery.
7216         (cp_parser_require): Improve indication of the error location.
7218         PR c++/13451
7219         * parser.c (cp_parser_class_head): Reorder logic to check for
7220         invalid qualification.
7222 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
7224         PR c++/13157
7225         * name-lookup.c (lookup_using_namespace): Remove spacesp
7226         parameter.
7227         (unqualified_namespace_lookup): Likewise.
7228         (lookup_qualified_name): Adjust accordingly.
7229         (lookup_name_real): Likewise.
7230         (lookup_arg_dependent): Do not eliminate the namespace of the
7231         functions found by unqualified name lookup unless that is the
7232         current namespace.
7234 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
7236         * semantics.c (push_deferring_access_checks): Fix format.
7237         (resume_deferring_access_checks): Likewise.
7238         (stop_deferring_access_checks): Likewise.
7239         (pop_deferring_access_checks): Likewise.
7240         (get_deferred_access_checks): Likewise.
7241         (pop_to_parent_deferring_access_checks): Likewise.
7242         (perform_deferred_access_checks): Likewise.
7243         (perform_or_defer_access_check): Likewise.
7245 2004-01-04  Richard Henderson  <rth@redhat.com>
7247         * call.c (build_over_call): Don't create a save_expr of an
7248         aggregate, but rather its address.
7250 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
7252         PR c++/13529
7253         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
7254         an offsetof expression.
7256         * parser.c (cp_parser_parameter_declaration): Fix comment.
7258         PR c++/12226
7259         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
7260         (reference_binding): Set it when appropriate.
7261         (build_temp): New function, split out from ...
7262         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
7263         (initialize_reference): Likewise.
7265         PR c++/13536
7266         * parser.c (cp_parser): Add in_type_id_in_expr_p.
7267         (cp_parser_new): Initialize it.
7268         (cp_parser_postfix_expression): Set it.
7269         (cp_parser_sizeof_operand): Likewise.
7270         (cp_parser_parameteR_declaration): Do not commit early to tenative
7271         parsers when in_type_id_in_expr_p is set.
7273 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7275         PR c++/13094
7276         * parser.c (cp_parser_template_argument): Don't call
7277         make_unbound_class_template directly.
7278         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
7279         UNBOUND_CLASS_TEMPLATE tree node.
7281 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
7283         PR target/12729
7284         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
7286 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7288         PR c++/13520
7289         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
7290         (DECL_FUNCTION_TEMPLATE_P): Use it.
7291         (DECL_CLASS_TEMPLATE_P): Likewise.
7292         * parser.c (cp_parser_lookup_name): Add is_template parameter.
7293         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
7294         (cp_parser_template_name): Likewise.
7295         (cp_parser_elaborated_type_specifier): Likewise.
7296         (cp_parser_namespace_name): Likewise.
7297         (cp_parser_class_name): Likewise.
7298         (cp_parser_lookup_name_simple): Likewise.
7300 See ChangeLog.3 for earlier changes.