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