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