1 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3 * call.c (convert_class_to_reference,
4 build_user_type_conversion_1, convert_like_real,
5 build_java_interface_fn_ref, build_special_member_call): Use
7 * class.c (build_vtbl_initializer): Likewise.
8 * cp-gimplify.c (cp_gimplify_expr): Likewise.
9 * cvt.c (cp_convert_to_pointer): Likewise.
10 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
11 * decl2.c (start_static_initialization_or_destruction,
12 generate_ctor_or_dtor_function): Likewise.
13 * except.c (build_throw): Likewise.
14 * lex.c (cxx_init): Likewise.
15 * mangle.c (write_integer_cst): Likewise.
16 * rtti.c (build_headof, get_tinfo_decl_dynamic,
17 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
18 get_pseudo_ti_init): Likewise.
19 * search.c (get_dynamic_cast_base_type): Likewise.
20 * tree.c (build_shared_int_cst): Likewise.
22 2004-08-12 Mark Mitchell <mark@codesourcery.com>
25 * class.c (count_depth_data): New type.
26 (dfs_depth_post): New function.
27 (dfs_depth_q): Likewise.
28 (find_final_overrider_data_s): Change type of vpath.
30 (dfs_find_final_overrider_1): New function.
31 (dfs_find_final_overrider): Use it.
32 (dfs_find_final_overrider_q): Adjust use of vpath.
33 (dfs_find_final_overrider_post): Likewise.
34 (find_final_overrider): Use dfs_depth. Allocate and deallocate
37 2004-08-12 Jan Beulich <jbeulich@novell.com>
39 * parser.c (cp_parser_asm_definition): Properly consume scope operator
40 tokens preceding the clobbers. Don't check for scope operator
41 following inputs. Simplify inputs handling to match that now used for
44 2004-08-11 Mark Mitchell <mark@codesourcery.com>
47 * except.c (build_throw): Allocate cleanup_type and the function
48 for __cxa_throw separately.
51 * call.c (standard_conversion): Do not accept conversions between
52 pointers to members if the class types are unrelated.
55 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
56 char &" instead of just "char &".
59 * pt.c (tsubst): Just return the unknown_type_node.
61 2004-08-11 Mark Mitchell <mark@codesourcery.com>
64 * parser.c (cp_parser_class_specifier): Robustify.
67 * pt.c (tsubst_copy_and_build): Complain about invalid
71 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
72 current_class_ref while tsubsting.
74 2004-08-10 Mark Mitchell <mark@codesourcery.com>
77 * parser.c (cp_parser_init_declarator): Robustify.
79 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
81 * typeck2.c (process_init_constructor): Guard the missing field warning
82 with warn_missing_field_initializers rather than extra_warnings.
84 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
86 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
88 2004-08-05 Mark Mitchell <mark@codesourcery.com>
90 * decl.c (start_preparsed_function): Move determine_visibility
92 * decl2.c (determine_visibility): Incorporate dllexport testing.
94 2004-08-05 Geoffrey Keating <geoffk@apple.com>
96 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
97 means that libstdc++ is needed.
99 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
101 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
103 2004-08-04 Geoffrey Keating <geoffk@apple.com>
105 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
106 than passing it as a parameter to rest_of_decl_compilation.
107 * decl2.c (grokfield): Use set_user_assembler_name.
109 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
111 * decl.c (complete_array_type): Don't gratuitously copy
112 maxindex. Its type is always set.
114 2004-08-04 Paul Brook <paul@codesourcery.com>
116 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
117 * cp-tree.h (struct language_function): Rename x_dtor_label to
119 (dtor_label): Rename ...
120 (cdtor_label): ... to this.
121 * decl.c (begin_constructor_body): Remove.
122 (check_special_function_return_type): Maybe change the return type.
123 (grokdeclarator): Pass the class type.
124 (start_preparsed_function): Constructors may need a return label.
125 (finish_constructor_body, finish_destructor_body): Set the return
127 (begin_function_body): Don't call begin_constructor_body.
128 (finish_function): Don't warn for constructors or destructors.
129 (implicitly_declare_fn): Maybe change the return type.
130 * optimize.c: Include target.h.
131 (maybe_clone_body): Remap the function result.
132 * semantics.c: Include target.h.
133 (finish_return_stmt): Maybe jump to return label for constructors.
135 2004-08-03 Mark Mitchell <mark@codesourcery.com>
137 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
138 (check_field_decls): Or here.
139 (check_methods): Or here.
140 (initialize_array): Don't mess with DECL_CONTEXT.
141 * cp-tree.h (start_decl): Adjust prototype.
142 (determine_visibility): New function.
143 * decl.c (duplicate_decls): Remove checks for hidden "operator
145 (build_library_fn_1): Give all library functions default
147 (start_decl): Add pop_scope_p parameter. Tidy.
148 (cp_finish_decl): Do not pop scopes here. Call
149 determine_visibility for variable definitions.
150 (start_preparsed_function): Call determine_visibility.
151 * decl2.c (determine_visibility): New function.
152 * method.c (use_thunk): Fix formatting.
153 * parser.c (cp_parser_condition): Adjust calls to start_decl.
154 (cp_parser_init_declarator): Likewise.
155 * pt.c (instantiate_decl): Always call pop_nested_class.
156 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
157 (tinfo_base_init): Likewise.
159 2004-08-02 Mark Mitchell <mark@codesourcery.com>
162 * name-lookup.c (validate_nonmember_using_decl): Robustify.
164 2004-08-01 Mark Mitchell <mark@codesourcery.com>
167 * name-lookup.c (decl_namespace): Remove.
168 (current_decl_namespace): Use decl_namespace_context instead of
170 (push_decl_namespace): Likewise.
171 (arg_assoc_class): Likewise.
172 (arg_assoc_type): Likewise.
173 * pt.c (check_specialization_namespace): New function.
174 (maybe_process_partial_specialization): Use it.
175 (register_specialization): Likewise.
178 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
179 * call.c (null_ptr_cst_p): Handle variables with constant
181 * pt.c (convert_nontype_argument): Use
182 DECL_INTEGRAL_CONSTANT_VAR_P.
183 * semantics.c (finish_id_expression): Likewise.
186 * decl.c (duplicate_decls): Reject duplicate namespace
190 * typeck.c (build_ptrmemfunc): Loosen assertion.
192 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
194 * call.c (z_candidate::template_decl): Rename from template.
195 (add_template_candidate_real): Adjust member reference.
198 2004-07-29 Mark Mitchell <mark@codesourcery.com>
200 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
201 (lang_decl_flags): Narrow the width of "languages". Add
203 (DECL_NEEDED_P): Remove.
204 (FOR_EACH_CLONE): New macro.
205 (DECL_REPO_AVAILABLE_P): Likewise.
206 (DECL_TINFO_P): Likewise.
207 (set_linkage_according_to_type): Declare.
208 (import_export_vtable): Remove.
209 (import_export_tinfo): Likewise.
210 (mark_needed): New function.
211 (decl_needed_p): Likewise.
212 (note_vauge_linkage_fn): Likewise.
213 (init_repo): Change prototype.
214 (repo_template_used): Remove.
215 (repo_template_instantiated): Likewise.
216 (repo_emit_p): New function.
217 (repo_export_class_p): Likewise.
218 (no_linkage_check): Change prototype.
219 * class.c (set_linkage_according_to_type): New function.
220 (build_vtable): Use it. Do not call import_export_vtable. Set
221 DECL_IGNORED_P if appropriate.
222 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
223 (make_rtL_for_nonlocal_decls): Check for template instantiations
225 (grokfndecl): Adjust call to no_linkage_check.
226 (set_linkage_for_static_data_member): New function.
227 (grokvardecl): Use it. Adjust call to no_linkage_check.
228 (grokdeclarator): Use set_linkage_for_static_data_member.
229 * decl2.c (note_vague_linkage_fn): New function.
230 (note_vague_linkage_var): Likewise.
231 (finish_static_data_member_decl): Use it.
232 (import_export_vtable): Remove.
233 (import_export_class): Use repo_export_class_p.
234 (var_finalized_p): Simplify.
235 (maybe_emit_vtables): Simplify.
236 (mark_needed): New function.
237 (decl_needed_p): Likewise.
238 (import_export_decl): Add documentation and consistency checks.
239 Use repo_emit_p. Handle virtual tables and RTTI information
241 (import_export_tinfo): Remove.
242 (write_out_vars): Call import_export_decl.
243 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
245 (finish_file): Use decl_needed_p. Do not call import_export_decl
246 for undefined static data members. Do not warn about undefined
247 inlines when using a repository.
248 (mark_used): Use note_vague_linkage_fn. Always defer template
250 * lex.c (cxx_init): Adjust call to init_repo. Always set
252 * method.c (synthesize_method): Remove unncessary
253 import_export_decl call.
254 (implicitly_declare_fn): Use set_linkage_according_to_type.
255 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
256 * pt.c (instantiate_class_template): Don't redundantly add classes
257 to keyed_classes. Don't call repo_template_used.
258 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
259 templates with internal linkage.
260 (check_instantiated_args): Adjust call to no_linkage_check.
261 (instantiate_template): Use FOR_EACH_CLONE.
262 (mark_definable): New function.
263 (mark_decl_instantiated): Use it.
264 (do_decl_instantiation): Adjust tests for explicit instantiation
265 after "extern template".
266 (instantiate_class_member): Do not use repo_template_instantiated.
267 (do_type_instantiation): Simplify.
268 (instantiate_decl): Use mark_definable. Check repo_emit_p.
270 * repo.c (repo_get_id): Remove.
271 (original_repo): Remove.
272 (IDENTIFIER_REPO_USED): Remove.
273 (IDENTIFIER_REPO_CHOSEN): Remove.
274 Remove all #if 0'd code.
275 (repo_template_used): Remove.
276 (repo_template_instantiated): Remove.
277 (temporary_obstack_initialized_p): New variable.
278 (init_repo): Register with lang_post_pch_load. Avoid creating
279 identifiers unnecessarily. Don't use original_repo. Close the
281 (reopen_repo_file_for_write): Not here.
282 (finish_repo): Always write out a new repository file.
283 (repo_emit_p): New function.
284 (repo_export_class_p): Likewise.
285 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
286 (involves_incomplete_p): New function.
287 (tinfo_base_init): Use it.
288 (ptr_initializer): Remove non_public_ptr parameter.
289 (ptm_initializer): Likewise.
290 (get_pseudo_ti_init): Likewise.
291 (unemitted_tinfo_decl_p): Remove.
292 (emit_tinfo_decl): Use import_export_decl.
293 * semantics.c (expand_body): Move updates of static_ctors and
295 (expand_or_defer_fn): ... here.
296 * tree.c (no_linkage_check): Add relaxed_p parameter.
298 2004-07-28 Eric Christopher <echristo@redhat.com>
300 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
302 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
304 * cp-tree.h (struct tree_pair_s): New.
305 (typedef tree_pair_p): New.
306 (DEF_VEC_O(tree_pair_s)): New.
307 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
308 (CLASSTYPE_VCALL_INDICES): Update documentation.
309 * class.c (get_vcall_index): Adjust.
310 (add_vcall_offset): Adjust.
312 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
314 * pt.c, typeck.c: Remove spurious carriage returns.
316 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
319 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
320 when the type of ARG is not dependent.
322 2004-07-26 Geoffrey Keating <geoffk@apple.com>
324 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
325 (lang_specific_driver): If the C++ or math library options don't
326 start with '-l', don't count them as added libraries.
328 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
330 * decl.c (xref_basetypes): Adjust base access vector creation.
331 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
333 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
335 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
336 Brian Ryner <bryner@brianryner.com>
340 * class.c (check_field_decls): Apply hidden visibility if
341 -fvisibility-inlines-hidden and inlined unless otherwise specified
342 (build_vtable): Set vtable visibility to class visibility.
343 (check_field_decls): Default static member visibility to class
345 (check_methods): Default method visibility to class visibility.
346 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
347 CLASSTYPE_VISIBILITY_SPECIFIED macro.
348 * decl.c (duplicate_decls): New logic for merging definition decls
349 with declaration decls. Added ignore & warning when non default
350 applied to global operator new or delete.
351 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
352 wherever VISIBILITY was changed
353 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
355 (tinfo_base_init): Set typeinfo name visibility to class visibility.
357 2004-07-25 Bernardo Innocenti <bernie@develer.com>
359 * decl.c: Rename all identifiers named `class' to `cl'.
360 * cp-tree.h: Likewise.
362 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
364 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
365 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
366 * name-lookup.c (binding_entry_make): Use GGC_NEW.
367 (binding_table_construct): Use GGC_CNEWVEC.
368 (binding_table_new): Use GGC_NEW.
369 (cxx_binding_make): Likewise.
370 (begin_scope): Likewise.
371 (push_to_top_level): Use GCC_CNEW.
372 * parser.c (cp_token_cache_new): Likewise.
373 (cp_token_cache_push_token): Likewise.
374 (cp_lexer_new_main): Likewise.
375 (cp_lexer_new_from_tokens): Likewise.
376 (cp_parser_context_new): Likewise.
377 (cp_parser_new): Likewise.
378 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
379 * lex.c (cxx_make_type): Use GGC_CNEW.
380 (retrofit_lang_decl): Use GGC_NEWVAR.
381 (cxx_dup_lang_specific_decl): Likewise.
382 (copy_lang_type): Likewise.
383 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
384 (save_function_data): Likewise.
385 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
386 (cxx_push_function_context): Likewise.
388 2004-07-25 Richard Henderson <rth@redhat.com>
390 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
391 DECL_IGNORED_P on RESULT_DECL.
392 * semantics.c (finalize_nrv): Copy them too.
394 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
396 * search.c (lookup_conversion_operator): Avoid two loops.
397 (add_conversions): Remove.
398 (check_hidden_convs, split_conversions,
399 lookup_conversions_r): New.
400 (lookup_conversions): Use lookup_conversions_r.
402 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
404 * pt.c (get_template_base): Check type is completable.
406 2004-07-21 Eric Christopher <echristo@redhat.com>
408 * decl.c (poplevel): Inline unused variable checking.
411 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
413 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
416 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
419 * pt.c (check_explicit_specialization): Remove extension to accept
420 specializations without template headers. Fall-through to normal
423 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
426 * pt.c (determine_specialization): New parameter template_count.
427 Disambiguate between member templates and member functions counting
428 the template headers.
429 (check_explicit_specialization): Update caller.
430 (tsubst_friend_function): Likewise.
432 2004-07-20 Steven Bosscher <stevenb@suse.de>
434 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
435 * cp-tree.h (tinst_level_t): New tree type.
436 (union lang_tree_node): Handle it.
437 (TINST_LOCATION): New accessor macro.
438 (make_tinst_level): New prototype.
439 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
440 * decl.c (cp_tree_node_structure): Likewise.
441 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
442 (print_instantiation_partial_context): Likewise.
443 * pt.c (pop_tinst_level): Likewise.
444 (push_tinst_level): Use make_tinst_level.
445 * tree.c (make_tinst_level): New function.
446 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
448 2004-07-20 Mark Mitchell <mark@codesourcery.com>
450 * parser.c (cp_parser_simple_type_specifier): Fix typo.
453 * parser.c (cp_parser_simple_type_specifier): Do not record usage
454 of globally-qualified names.
456 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
459 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
462 2004-07-19 Mark Mitchell <mark@codesourcery.com>
465 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
466 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
467 * class.c (add_implicitly_declared_members): Use
468 CLASSTYPE_LAZY_ASSIGNMENT_OP.
469 * method.c (lazily_declare_fn): Clear
470 CLASSTYPE_LAZY_ASSIGNMENT_OP.
471 * search.c (lookup_fnfields_1): Check it.
473 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
475 * cp-tree.h (vec_binfo_member): Remove.
476 * tree.c (vec_binfo_member): Remove.
478 * cp-tree.h (struct lang_type_class): Remove vfields field.
479 (CLASSTYPE_VFIELDS): Remove.
480 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
481 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
483 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
484 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
485 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
487 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
489 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
490 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
492 (BINFO_LANG_SLOTS): Remove.
493 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
494 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
495 * class.c (check_bases): Adjust BINFO accessors.
496 (determine_primary_base, finish_struct_bits,
497 maybe_warn_about_overly_private_class, warn_hidden,
498 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
499 warn_about_ambiguous_bases, get_vfield_name,
500 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
501 add_vcall_offset_vtbl_entries_r): Likewise.
502 * dump.c (cp_dump_tree): Likewise.
503 * init.c (sort_mem_initializers, expand_member_init, build_delete,
504 push_base_cleanups): Likewise.
505 * method.c (do_build_copy_constructor, do_build_assign_ref,
506 synthesize_exception_spec): Likewise.
507 name-lookup.c (arg_assoc_class): Likewise.
508 * pt.c (instantiate_class_template,
509 get_template_base_recursive): Likewise.
510 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
511 * typeck2.c (process_init_constructor): Likewise.
512 * search.c (lookup_base_r, dynamic_cast_base_recurse,
513 dfs_access_in_type, dfs_walk_real, look_for_overrides,
514 types_overlap_p, copied_binfo, original_binfo): Likewise.
515 (binfo_for_vtable): Remove
517 2004-07-20 Steven Bosscher <stevenb@suse.de>
519 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
520 thunk_alias, and the access and virtual_offset fields.
521 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
522 * decl.c (finish_case_label): Update c_add_case_node call.
524 2004-07-19 Mark Mitchell <mark@codesourcery.com>
526 Revert patch for PR c++/16623.
528 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
530 * except.c: Remove two spurious carriage returns.
532 2004-07-19 Mark Mitchell <mark@codesourcery.com>
535 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
536 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
537 * class.c (add_implicitly_declared_members): Use
538 CLASSTYPE_LAZY_ASSIGNMENT_OP.
539 * method.c (lazily_declare_fn): Clear
540 CLASSTYPE_LAZY_ASSIGNMENT_OP.
541 * search.c (lookup_fnfields_1): Check it.
543 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
545 * class.c (add_method): Delay adding the slot until the end.
546 (determine_primary_base): Adjust VEC_iterate invokation.
547 (resort_type_method_vec, finish_struct_methods, warn_hidden,
548 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
549 build_vtbl_initializer): Likewise.
550 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
551 build_vbase_delete): Likewise.
552 * method.c (do_build_copy_constructor): Likewise.
553 * name-lookup.c (new_class_binding, print_binding_level,
554 poplevel_class, store_class_bindings, push_to_top_level,
555 pop_from_top_level): Likewise.
556 * pt.c (check_explicit_specialization): Likewise.
557 * search.c (lookup_conversion_operator, lookup_fnfields_1,
558 get_pure_virtuals, add_conversions, dfs_check_overlap,
559 binfo_for_vbase): Likewise.
561 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
564 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
565 innermost set of template arguments during deduction. Simplify.
567 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
569 * typeck.c (build_modify_expr, build_x_modify_expr): Set
570 TREE_NO_WARNING on assignments with an operator other than '='.
572 2004-07-10 Steven Bosscher <stevenb@suse.de>
573 Joseph S. Myers <jsm@polyomino.org.uk>
575 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
576 * decl2.c (grokfield): Don't check current_class_depth via
577 unused TREE_COMPLEXITY.
578 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
579 to avoid the missing parentheses warning.
580 Don't set C_SET_EXP_ORIGINAL_CODE.
582 2004-07-18 Mark Mitchell <mark@codesourcery.com>
584 * tree.c (no_linkage_helper): Remove.
585 (no_linkage_check): Don't use walk_tree_without_duplicates.
587 * mangle.c (write_expression): Issue a sorry for zero-operand
590 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
593 * init.c (build_offset_ref): Build SCOPE_REF with non-null
594 TREE_TYPE for non-dependent names.
595 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
596 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
597 unknown_type_node as its TREE_TYPE.
598 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
599 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
600 (dump_expr) <SCOPE_REF case>: Likewise.
602 2004-07-17 Jason Merrill <jason@redhat.com>
605 * call.c (type_passed_as): Make the invisible reference type
607 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
608 cp_genericize_r. Handle invisible reference lowering.
609 (is_invisiref_parm): New fn.
610 (cp_genericize): Adjust the types of invisible reference parms.
611 Don't repeat the walk for clones.
612 * decl.c (store_parm_decls): Don't generate any code for clones.
614 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
616 * cp-tree.h (builtin_function): Declare.
618 2004-07-16 Mark Mitchell <mark@codesourcery.com>
620 * class.c (finish_struct_methods): Remove unncessary code.
621 (add_implicitly_declared_members): Create declarations for default
622 constructors and copy constructors lazily.
623 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
625 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
626 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
627 * decl2.c (check_classfn): Robustify.
628 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
629 (locate_ctor): Handle lazy default constructors.
630 (locate_copy): Handle lazy copy constructors.
631 (implicitly_declare_fn): Make sure we're looking at the
632 TYPE_MAIN_VARIANT for a class before creating functions. Don't
633 set TYPE_HAS_CONSTRUCTOR.
634 (lazily_declare_fn): New function.
635 * name-lookup.c (constructor_name_full): Simplify.
636 * search.c (lookup_fnfields_1): Lazily create methods, as
638 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
640 2004-07-16 Steven Bosscher <stevenb@suse.de>
642 * cp-tree.h (struct lang_type): Don't have three GTY options on a
645 2004-07-16 Richard Henderson <rth@redhat.com>
647 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
648 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
649 * tree.c (cp_copy_res_decl_for_inlining): Remove.
651 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
653 * class.c (finish_struct_bits): Use for loop.
654 (propagate_binfo_offsets): Do primary binfo outside of loop.
657 * dump.c (cp_dump_tree): Don't dump the bases if there's no
660 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
662 2004-07-15 Mark Mitchell <mark@codesourcery.com>
664 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
665 has_abstract_assign_ref. Make methods a VEC(tree) *.
666 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
667 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
668 (CLASSTYPE_DESTRUCTORS): Likewise.
669 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
670 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
671 (add_method): Change prototoype.
672 * class.c (add_method): Remove error_p parameter. Adjust for
673 changes to CLASSTYPE_METHOD_VEC.
674 (handle_using_decl): Adjust call to add_method.
675 (maybe_warn_about_overly_private_class): Adjust for
676 changes to CLASSTYPE_METHOD_VEC.
677 (resort_type_method_vec): Likewise.
678 (finish_struct_methods): Likewise.
679 (check_for_override): Likewise.
680 (warn_hidden): Likewise.
681 (add_implicitly_declared_members): Defer creation of assignment
682 operators. Adjust call to add_method.
683 (clone_function_decl): Adjust call to add_method.
684 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
685 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
686 * decl.c (grok_special_member_properties): Don't set
687 TYPE_HAS_ABSTRACT_ASSIGN_REF.
688 * decl2.c (check_classfn): Adjust for
689 changes to CLASSTYPE_METHOD_VEC.
690 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
691 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
692 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
693 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
695 * pt.c (check_explicit_specialization): Adjust for
696 changes to CLASSTYPE_METHOD_VEC.
697 (instantiate_class_template): Do not set
698 TYPE_HAS_ABSTRACT_ASSIGN_REF.
699 * ptree.c (cxx_print_type): Don't try to print
700 CLASSTYPE_METHOD_VEC.
701 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
702 * search.c (lookup_field_r): Adjust for
703 changes to CLASSTYPE_METHOD_VEC.
704 (lookup_fnfields): Likewise.
705 (lookup_conversion_operator): Likewise.
706 (lookup_fnfields_1): Likewise. Create assignment operators
708 (look_for_overrides_here): Adjust for
709 changes to CLASSTYPE_METHOD_VEC.
710 (add_conversions): Likewise.
711 * semantics.c (finish_member_declaration): Adjust call to add_method.
713 2004-07-15 Jason Merrill <jason@redhat.com>
715 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
716 references and pointers are compatible.
718 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
720 * decl.c (xref_basetypes): Refactor.
721 * tree.c (copy_base_binfos): Replace with ...
722 (copy_binfo): ... this. Deep copy the given binfo, (not the just
723 bases of the given base).
724 * cp-tree.h (copy_base_binfo): Remove.
725 (copy_binfo): Declare.
727 2004-07-15 Mark Mitchell <mark@codesourcery.com>
729 * name-lookup.c (set_inherited_value_binding_p): Add class_type
731 (get_class_binding): Adjust.
732 (push_class_level_binding): Don't use set_inherited_value_binding_p.
734 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
736 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
737 * decl.c (xref_basetypes): Set it here.
739 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
740 Don't check for incomplete base.
741 (get_vfield_name): Simplify while loop.
742 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
744 2004-07-14 Mark Mitchell <mark@codesourcery.com>
746 * lex.c (cxx_make_type): Remove call to get_pointer_type.
748 * cp-tree.h (IDENTIFIER_VALUE): Remove.
749 (BINFO_PUSHDECLS_MARKED): Likewise.
750 (maybe_inject_for_scope_var): Likewise.
751 (push_class_decls): Likewise.
752 * name-lookup.h (push_class_binding): Remove.
753 (innermost_non_namespace_value): New function.
754 (outer_binding): Likewise.
755 * class.c (add_method): Push bindings before adding to
757 (restore_class_cache): Do not restore class_shadowed.
758 (pushclass): Do not add USING_DECLs. Do not call
760 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
761 * decl.c (pushdecl): Use outer_binding.
762 (poplevel): Set the scope for an out-of-scope for-loop declaration
764 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
765 * name-lookup.c (new_class_binding): New function.
766 (push_binding): Use it.
767 (pushdecl): Use innermost_non_namespace_value.
768 (maybe_inject_for_scope_var): Remove.
769 (push_class_binding): Remove.
770 (set_inherited_value_binding_p): New function.
771 (get_class_binding): New function.
772 (push_class_level_binding): Assert that the current_class_type is
774 (outer_binding): New function.
775 (innermost_non_namespace_value): Likewise.
776 (lookup_name_real): Use outer_binding.
777 (lookup_name_current_level): Ignore out-of-scope variables.
778 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
779 (lookup_template_class): Likewise.
780 * search.c (dfs_push_type_decls): Remove.
781 (dfs_push_decls): Likewise.
782 (setup_class_bindings): Likewise.
783 (lookup_field_1): Handle USING_DECLs from dependent scopes.
784 (marked_pushdecls_p): Remove.
785 (unmarked_pushdecls_p): Remove.
786 (marked_identifiers): Remove.
787 (setup_class_bindings): Remove.
788 (dfs_push_type_decls): Remove.
789 (dfs_push_decls): Remove.
790 (push_class_decls): Remove.
792 2004-07-13 Mark Mitchell <mark@codesourcery.com>
796 * decl.c (grokvardecl): Make declspecs parameter const.
797 (grokdeclarator): Likewise. Adjust accordingly.
798 * decl.h (grokdeclarator): Adjust declaration.
799 * parser.c (cp_parser_init_declarator): Do not clear
800 decl_specifiers->attributes.
802 * cp-tree.h (lang_identifier): Remove class_value.
803 (IDENTIFIER_CLASS_VALUE): Remove.
804 (pop_class_decls): Likewise.
805 (init_search_processing): Likewise.
806 * class.c (handle_using_decl): Use lookup_member, not
807 IDENTIFIER_CLASS_VALUE.
808 (restore_class_cache): New function, split out from ...
809 (pushclass): ... here. Do not call clear_identifier_class_values.
810 (invalidate_class_lookup_cache): Do not clear
811 IDENTIFIER_CLASS_VALUE.
812 (popclass): Do not call pop_class_decls.
813 (maybe_note_name_used_in_class): Do not save names looked up after
814 the class is complete. Use lookup_member, not
815 IDENTIFIER_CLASS_VALUE.
816 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
817 * decl.c (cxx_init_decl_processing): Do not call
818 init_search_processing.
819 * method.c (do_build_copy_constructor): Remove unnecessary code.
820 (do_build_assign_ref): Likewise.
821 * name-lookup.c (pushdecl): Use lookup_member, not
822 IDENTIFIER_CLASS_VALUE.
823 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
825 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
826 (push_class_binding): Do not set it.
827 (clear_identifier_class_values): Remove.
828 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
829 (store_binding): Do not save it.
830 (pop_from_top_level): Do not restore it.
831 * name-lookup.h (cxx_saved_binding): Remove class_value.
832 (clear_identifier_class_values): Remove.
833 * ptree.c (cxx_print_identifier): Do not print
834 IDENTIFIER_CLASS_VALUE.
835 * search.c (search_obstack): Remove.
836 (push_stack_level): Remove.
837 (pop_stack_level): Remove.
838 (search_level): Remove.
839 (search_stack): Remove.
840 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
841 (setup_class_bindings): Use IDENTIFIER_MARKED, not
842 IDENTIFIER_CLASS_VALUE.
843 (marked_identifiers): New variable.
844 (push_class_decls): Clear IDENTIFIER_MARKED.
845 (pop_class_decls): Don't call pop_search_level.
846 (init_search_processing): Remove.
848 2004-07-12 Mark Mitchell <mark@codesourcery.com>
850 * cp-tree.h (get_aggr_typedef): Remove.
851 * init.c (get_aggr_typedef): Likewise.
853 * name-lookup.c (push_class_level_binding): Simplify.
855 2004-07-12 Andrew Pinski <apinski@apple.com>
859 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
861 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
864 2004-07-12 Eric Christopher <echristo@redhat.com>
866 * parser.c (cp_parser_class_head): Remove unused variable.
868 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
870 * decl.c (grok_op_properties): Reject [de-]allocation functions
871 declared in a namespace, or declared as static.
873 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
875 * cp-tree.h (make_binfo): Remove.
876 * decl.c (xref_basetypes): Use make_tree_binfo directly.
877 * tree.h (copy_base_binfos): Likewise.
878 (make_binfo): Remove.
880 * call.c (build_user_type_conversion_1, build_new_op,
881 check_constructor_callable, build_temp,
882 perform_direct_initialization_of_possible): Pass type directly to
883 lookup_fnfields & build_special_member_call.
884 (build_special_member_call): Accept a type, and complete it.
885 * class.c (finish_stuct_bits): Copy the BINFOs here.
886 * cvt.c (ocp_convert): Pass type directly to
887 build_special_member_call.
888 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
889 (xref_basetypes): Allocate the binfo here. Adjust.
890 * init.c (build_init, build_new_1): Pass type directly to
891 build_special_member_call.
892 * lex.c (cxx_make_type): Do not allocate binfo here.
893 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
894 * parser.c (cp_parser_class_head): Always call xref_basetypes.
895 * pt.c (instantiate_class_template): Likewise. Inhibit access
896 checking for template friends.
897 * ptree.c (cxx_print_type): Adjust record printing.
898 * search.c (lookup_base): When taking a type, complete it before
900 (lookup_member): Delay completing a type.
901 (push_class_decls): Don't walk an incomplete type.
902 (lookup_conversions): Likewise.
903 * semantics.c (finish_stmt_expr_expr): Pass type directly to
904 build_special_member_call.
905 * tree.c (copy_base_binfos): Adjust.
906 (make_binfo): Likewise.
907 * typeck.c (build_modify_expr): Pass type directly to
908 build_special_member_call.
909 * typeck2.c (process_init_constructor): Check a binfo exists.
910 (build_m_component_ref): Allow accessing an incomplete type.
911 (build_functional_cast): Pass type directly to
912 build_special_member_call.
914 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
917 * config-lang.in (gtfiles): Add typeck2.c.
918 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
920 * cp-tree.h: Declare complete_type_check_abstract.
921 * typeck2.c (pat_calc_hash, pat_compare,
922 complete_type_check_abstract): New functions.
923 (abstract_virtuals_error): If the type is abstract, register the
924 declaration within abstract_pending_vars for further checks.
925 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
926 * decl.c (cp_finish_decl): Do not strip array types.
927 (create_array_type_for_decl): Check for abstractness of the element
929 (complete_vars): Call complete_type_check_abstract.
930 * class.c (finish_struct): Prepare a list of virtual functions for
931 template types, and call complete_vars on it to check for abstractness.
933 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
935 PR tree-optimization/14107
936 * decl.c (finish_function): Remove temporary band-aid.
938 2004-07-11 Mark Mitchell <mark@codesourcery.com>
940 * call.c (build_operator_new_call): Avoid using push_to_top_level.
941 (build_new_op): Adjust call to lookup_function_nonclass.
942 * name-lookup.c (identifier_type_value): Adjust call to
944 (lookup_name_real): Add block_p parameter.
945 (lookup_name_nonclass): Adjust call to lookup_name_real.
946 (lookup_function_nonclass): Likewise.
947 (lookup_name): Likewise.
948 * name-lookup.h (lookup_name_real): Change prototype.
949 (lookup_name_nonclass): Likewise.
950 * parser.c (cp_parser_lookup_name): Likewise.
952 * cp-tree.h (saved_scope): Make old_bindings a vector.
953 (unuse_fields): Remove.
954 * name-lookup.h (cxx_saved_binding): Define it.
955 * class.c (pushclass): Don't use unuse_fields.
956 * name-lookup.c (cxx_saved_binding_make): Remove.
957 (store_binding): Add new bindings to a vector, using an
958 accumulator style, rather than adding them to a list.
959 (store_bindings): Adjust accordingly.
960 (store_class_bindings): Likewise.
961 (push_to_top_level): Likewise.
962 (pop_from_top_level): Likewise.
963 * optimize.c (maybe_clone_body): Must push_to_top_level and
964 pop_from_top_level calls outside of loop.
965 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
966 calls here from cp_parser_late_parsing_default_args.
967 (cp_parser_save_default_args): Record the class type in which the
968 function is declared.
969 (cp_parser_late_parsing_default_args): Do not call
970 push_nested_class/pop_nested_class.
971 * search.c (dfs_unuse_fields): Remove.
972 (unuse_fields): Remove.
974 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
976 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
977 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
978 * cp-tree.h (poplevel): Declare.
980 * decl.c (set_block): Remove.
982 2004-07-10 Mike Stump <mrs@apple.com>
984 * decl2.c (import_export_class): Never export/import vtables
985 with inline key functions.
987 2004-07-09 Steven Bosscher <stevenb@suse.de>
989 * typeck.c (c_expand_asm_operands): Remove.
991 2004-07-09 Mike Stump <mrs@apple.com>
993 * typeck.c (build_class_member_access_expr): Skip null deref
994 warning when we don't dereference it.
996 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1000 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1001 warn for pointers to functions/members, or for classes without
1004 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1006 * name-lookup.h (struct cp_binding_level): Update documentation
1009 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1012 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1013 returning CALL_EXPR, and non-reference return type.
1015 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1017 * name-lookup.c (push_binding): Use VEC_reserve.
1019 2004-07-08 Richard Henderson <rth@redhat.com>
1021 * cp-tree.h (expand_eh_spec_block): Remove.
1023 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1025 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1026 x_previous_class_values; add x_previous_class_level.
1027 (previous_class_type): Remove.
1028 (previous_class_values): Remove.
1029 (previous_class_level): New macro.
1030 * class.c (pushclass): Restore the identifier cache more
1032 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1033 previous_class_values.
1034 * decl.c (poplevel): Likewise.
1035 * name-lookup.c (cxx_binding_init): New function.
1036 (cxx_binding_make): Use it.
1037 (push_binding): For a binding in a class level, use a vector of
1038 cp_class_binding nodes.
1039 (push_binding_level): New function.
1040 (begin_scope): Use it.
1041 (leave_scope): Do not put class binding levels on the free list.
1042 (print_binding_level): Adjust for the fact that class_shadowed is
1044 (poplevel_class): Likewise.
1045 (clear_identifier_class_values): Likewise.
1046 (push_class_level_binding): Likewise.
1047 (set_class_shadows): Remove.
1048 (store_binding): New function.
1049 (store_class_bindings): New function.
1050 (push_to_top_level): Use store_class_bindings as appropriate.
1051 (pop_from_top_level): Use previous_class_level, not
1052 previous_class_type.
1053 * name-lookup.h (cp_class_binding): New type.
1054 (cp_binding_level): Use a vector object for class_shadowed.
1055 (push_binding_level): Declare.
1056 (set_class_shadows): Remove.
1058 2004-07-07 Andrew Pinski <apinski@apple.com>
1060 * class.c (instantiate_type): BUFFER_REF is dead.
1061 * lex.c (init_operators): IN_EXPR is dead.
1063 2004-07-07 Jason Merrill <jason@redhat.com>
1066 * call.c (build_new_op): Give overload warnings for built-in
1069 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1072 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1075 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1077 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1078 * class.c (build_primary_vtable, check_bases,
1079 determine_primary_base, finish_struct_bits,
1080 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1081 get_basefndecls, warn_hidden, walk_subobject_offsets,
1082 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1083 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1084 finish_struct_1, get_vfield_name, contains_empty_class_p,
1085 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1086 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1087 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1089 * decl.c (xref_basetypes): Likewise.
1090 * dump.c (cp_dump_tree): Likewise.
1091 * error.c (dump_expr): Likewise.
1092 * init.c (sort_mem_initializers, expand_member_init,
1093 push_base_cleanups): Likewise.
1094 * method.c (do_build_copy_constructor, do_build_assign_reg,
1095 synthesize_exception_spec): Likewise.
1096 * name-lookup.c (arg_assoc_class): Likewise.
1097 * pt.c (instantiate_class_template, tsubst,
1098 get_template_base_recursive): Likewise.
1099 * ptree.c (cxx_print_type): Likewise.
1100 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1101 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1102 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1103 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1104 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1105 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1106 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1107 * tree.c (copy_base_binfos, make_binfo): Likewise.
1108 * typeck.c (commmon_base_type): Likewise
1109 * typeck2.c (process_init_constructor): Likewise
1111 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1113 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1115 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1118 * pt.c (convert_nontype_argument): Disallow conversions between
1119 different enumeration types.
1121 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1123 * cp-tree.h (BINFO_MARKED): Remove.
1124 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1125 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1126 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1127 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1128 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1129 (mark_primary_bases, determine_primary_base, base_derived_from,
1130 dfs_find_final_overrider, dfs_find_final_overrider_q,
1131 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1132 dfs_modify_vtables, walk_subobject_offsets,
1133 layout_nonempty_base_or_field, build_base_field,
1134 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1135 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1136 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1137 build_ctor_vtbl_group, accumulate_vtble_inits,
1138 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1139 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1140 add_vcall_offset_vtbl_entries_1): Likewise.
1141 * decl.c (xref_basetypes): Incomming virtual base indicated by
1143 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1144 * init.c (finish_init_stmts, sort_mem_initializers,
1145 emit_mem_initializers, build_vtble_address, expand_member_init,
1146 push_base_cleanups): Likewise.
1147 * method.c (do_build_copy_constructor): Likewise.
1148 * pt.c (instantiate_class_template,
1149 get_template_base_recursive): Likewise.
1150 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1151 get_pseudo_ti_desc): Likewise.
1152 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1153 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1154 original_binfo): Likewise.
1155 * semantics.c (finish_base_specifier): Virtualness is indicated
1157 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1159 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1162 2004-06-24 Jason Merrill <jason@redhat.com>
1164 * decl.c (grokparms): Give the PARM_DECL reference type if the
1165 parameter is passed by invisible reference.
1167 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1169 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1170 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1171 * pt.c (check_instantiated_args, unify): Likewise.
1173 2004-07-05 Phil Edwards <phil@codesourcery.com>
1175 * Make-lang.in (check-c++, lang_checks): Add some comments.
1177 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1179 * cp-mudflap.c: Delete file.
1180 * Makefile.in: Remove all references to cp-mudflap.o.
1182 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1184 * decl.c (cxx_init_decl_processing): Call
1185 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1187 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1190 * call.c (build_operator_new_call): Look only at global scope.
1192 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1194 * call.c (enforce_access): Expect TREE_BINFO.
1195 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1196 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1197 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1199 (BINFO_LANG_ELTS): Remove.
1200 (BINFO_LANG_SLOTS): New.
1201 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1202 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1203 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1204 * search.c (lookup_member): Check TREE_BINFO.
1205 * semantics.c (perform_or_defer_access_check): Likewise.
1206 (check_accessibility_of_qualified_id): Check
1207 deferred_access_no_check.
1208 * tree.c (make_binfo): Use make_tree_binfo.
1210 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1212 * method.c (implicitly_declare_fn): Set linkage of generated
1215 2004-07-04 Richard Henderson <rth@redhat.com>
1217 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1219 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1222 * name-lookup.c (push_class_level_binding): Don't pass a
1223 TREE_LIST of ambiguous names to check_template_shadow as it
1224 only handles declarations. Instead, pull the declaration
1227 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1230 * pt.c (check_explicit_specialization): Clarify error message.
1232 2004-07-02 Richard Henderson <rth@redhat.com>
1234 * tree.c (cp_unsave_r): Update remap_save_expr call.
1236 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1239 * mangle.c (write_template_arg): Correct mangling.
1242 * decl.c (grokdeclarator): Robustify.
1244 2004-07-01 Richard Henderson <rth@redhat.com>
1246 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1247 * method.c (synthesize_method): Don't clear_last_expr.
1248 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1250 2004-07-01 Nick Clifton <nickc@redhat.com>
1252 * decl2.c (import_export_class): Invoke the
1253 import_export_class field in the gcc_target structure if it is not
1256 2004-06-30 Richard Henderson (rth@redhat.com>
1258 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1259 * method.c (use_thunk): Likewise.
1261 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1263 * call.c (build_over_call), typeck.c (build_function_call): Call
1264 check_function_arguments instead of check_function_format.
1266 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1268 * call.c (build_over_call), typeck.c (build_function_call): Update
1269 calls to check_function_format.
1271 2004-06-30 Richard Henderson <rth@redhat.com>
1273 * call.c (build_over_call): Use __builtin_memcpy for copying
1274 CLASS_AS_BASE rather than funny casting.
1276 2004-06-30 Richard Henderson <rth@redhat.com>
1278 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1279 TYPE_SIZE_UNIT of full_type.
1281 2004-06-30 Per Bothner <per@bothner.com>
1283 Conditionally compile support for --enable-mapped_location.
1284 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1285 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1286 adjustments - which I don't understand.
1287 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1288 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1289 (print_instantiation_partial_context): Use expand_location.
1290 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1291 * name-lookup.c: Likewise.
1292 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1293 * name-lookup.c: Use input_line macro.
1294 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1295 (cp_parser_statement): Rename locaal variable statement_locus to
1296 statement_location and use SET_EXPR_LOCATION macro.
1297 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1298 * tree.c (cp_walk_subtrees): Likewise.
1300 2004-06-29 Per Bothner <per@bothner.com>
1302 * tree.c (build_min_nt, build_min, build_min_non_dep):
1303 Don't set TREE_COMPLEXITY from input_line.
1305 2004-06-29 Paul Brook <paul@codesourcery.com>
1307 * init.c: Include target.h.
1308 (get_cookie_size): Remove and replace with target hook.
1310 (build_new_1): Store the element size in the cookie.
1312 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1315 * parser.c (cp_parser_template_declaration_after_export): Disable
1316 access checks here ...
1317 (cp_parser_class_specifier): ... not here.
1319 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1321 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1322 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1323 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1326 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1328 * cp-tree.h (struct deferred_access): Move to ...
1329 * semantics.c (struct deferred_access): ... here. Adjust.
1330 (deferred_access_stack): Make a VEC(deferred_access),
1331 (deferred_access_free_list): Remove.
1332 (deferred_access_no_check): New.
1333 (push_deferring_access_checks, resume_deferring_access_checks,
1334 stop_deferring_access_checks, pop_deferring_access_checks,
1335 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1336 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1338 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1341 * call.c (build_temp): Declare.
1342 (check_constructor_callable): New.
1343 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1344 CONSTRUCTOR_CALLABLE.
1345 (convert_like_real, initialize_reference): Use
1346 check_constructor_callable.
1347 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1348 (LOOKUP_*): Renumber.
1350 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1352 * friend.c (add_friend): Only perform access checks when context
1354 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1355 * parser.c (cp_parser_class_specifier): Disable access checks here
1356 when parsing the body of a templated class.
1357 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1358 NULL binfos when not checking access.
1360 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1362 Use vector API for vbase list.
1363 * cp-tree.h: Include vec.h
1364 (DEF_VEC_P (tree)): New type.
1365 (struct lang_type_class): Change vbase's member type.
1366 (binfo_for_vbase): Declare.
1367 * class.c (determine_primary_base, base_derived_from,
1368 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1369 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1370 build_vtbl_initializer): Adjust.
1371 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1373 * init.c (sort_mem_initializers, expand_member_init,
1374 push_base_cleanups): Adjust.
1375 * method.c (do_build_copy_constructor): Adjust.
1376 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1377 (binfo_for_vbase): New.
1378 * tree.c (copy_base_binfos): Adjust.
1380 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1382 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1384 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1387 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1388 paranthesis in case of pointers to array members.
1389 * error.c (dump_type_prefix): Likewise.
1390 (dump_type_suffix): Maybe issue a whitespace when printing
1393 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1396 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1397 redefinition of built-in types.
1399 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1401 * error.c (pp_template_argument_list_start): Remove.
1402 (pp_template_argument_list_end): Likewise.
1403 (pp_separate_with_comma): Use pp_cxx_separate_with.
1404 (reinit_global_formatting_buffer): Remove.
1405 (pp_non_consecutive_character): Likewise.
1406 (dump_scope): Use pp_cxx_colon_colon.
1407 (dump_template_parameter): Use pp_cxx_identifier,
1408 pp_cxx_tree_identifier and pp_cxx_whitespace.
1409 (dump_templat_bindings): Replace use of pp_string with sequence
1410 of pp_cxx_whitespace and pp_equal.
1411 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1412 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1414 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1415 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1416 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1417 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1418 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1419 (dump_decl): Likewise.
1420 (dump_template_decl): Likewise.
1421 (dump_function_decl): Likewise. Set padding as appropriate.
1422 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1424 (dump_exception_spec): Likewise.
1425 (dump_function_name): Use pp_cxx_tree_identifier and
1427 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1428 pp_cxx_end_template_argument_list.
1429 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1430 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1431 pp_cxx_whitespace throughout.
1432 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1434 (dump_unary_op): Likewise.
1435 (reinit_cxx_pp): New function.
1436 (type_as_string); Use it.
1437 (expr_as_string): Likewise.
1438 (decl_as_string); Likewise.
1439 (context_as_string): Likewise.
1440 (lang_decl_name): Likewise.
1441 (decl_to_string): Likewise.
1442 (expr_to_string): Likewise.
1443 (parm_to_string): Likewise.
1444 (type_to_string): Likewise.
1445 (args_to_string): Likewise.
1446 (cv_to_string): Likewise.
1448 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1450 * cp-tree.h (cp_cv_quals): New type.
1451 (cp_declarator): Use it instead of "tree" as appropriate.
1452 (grok_method_quals): Adjust prototype.
1453 (grokclassfn): Likewise.
1454 (do_friend): Likewise.
1455 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1456 (grokdeclarator): Likewise.
1457 * decl2.c (grok_method_quals): Likewise.
1458 (grokclassfn): Likewise.
1459 * friend.c (do_friend): Likewise.
1460 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1461 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1462 (make_pointer_declarator): Likewise.
1463 (make_reference_declarator): Likewise.
1464 (make_ptrmem_declarator): Likewise.
1465 (cp_parser_ptr_operator): Likewise.
1466 (cp_parser_cv_qualifier_seq_opt): Likewise.
1467 (cp_parser_cv_qualifier_opt): Remove.
1468 (cp_parser_new_declarator_opt): Adjust call to
1469 cp_parser_ptr_operator.
1470 (cp_parser_conversion_declaration_opt): Likewise.
1471 (cp_parser_declarator): Use cp_cv_quals, not tree.
1472 (cp_parser_direct_declarator): Likewise.
1474 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1476 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1477 Rename DECL_STMT to DECL_EXPR.
1478 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1479 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1480 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1482 2004-06-26 Jan Hubicka <jh@suse.cz>
1485 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1486 reachability analysis.
1488 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1490 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1493 2004-06-25 Paul Brook <paul@codesourcery.com>
1495 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1496 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1498 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1500 * decl.c (grokdeclarator): Restore error messages about __thread.
1501 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1503 2004-06-24 Jason Merrill <jason@redhat.com>
1506 * decl.c (grokparms): Give the PARM_DECL reference type if the
1507 parameter is passed by invisible reference.
1509 2004-06-24 Andreas Schwab <schwab@suse.de>
1511 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1513 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1515 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1516 (cp/decl.o): Likewise.
1517 (cp/decl2.o): Likewise.
1518 (cp/pt.o): Likewise.
1519 (cp/semantics.o): Likewise.
1520 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1521 * class.c: Do not include lex.h.
1522 (add_implicitly_declared_members): Do not use
1523 adding_implicit_members.
1524 (check_bases_and_members): Do not talk about grok_x_components.
1525 * cp/cp-tree.h (adding_implicit_members): Remove.
1526 (cp_storage_class): New type.
1527 (cp_decl_spec): Likewise.
1528 (cp_decl_specifier_seq): Likewise.
1529 (cp_parameter_declarator): Use it for the decl_specifiers field.
1530 (check_tag_decl): Adjust prototype.
1531 (shadow_tag): Likewise.
1532 (groktypename): Likewise.
1533 (start_decl): Likewise.
1534 (start_function): Likewise.
1535 (start_method): Likewise.
1536 (grok_x_components): Remove.
1537 (grokfield): Adjust prototype.
1538 (grokbitfield): Likewise.
1539 (finish_member_class_template): Remove.
1540 * decl.c: Do not include lex.h.
1541 (adding_implicit_members): Do not define.
1542 (check_tag_decl): Do not use trees to represent decl-specifiers.
1543 (shadow_tag): Likewise.
1544 (groktypename): Likewise.
1545 (start_decl): Likewise.
1546 (grokvardecl): Likewise.
1547 (grokdeclarator): Likewise.
1548 (grokparms): Likewise.
1549 (start_function): Likewise.
1550 (start_method): Likewise.
1551 * decl.h (grokdeclarator): Adjust prototype.
1552 * decl2.c: Do not include lex.h.
1553 (grok_x_components): Remove.
1554 (grokfield): Do not use trees to represent decl-specifiers.
1555 (grokbitfield): Likewise.
1556 * lex.c: Do not include lex.h.
1558 * parser.c: Include target.h.
1559 (clear_decl_specs): New function.
1560 (cp_parser_translation_unit): Do not use trees to represent
1562 (cp_parser_postfix_expression): Likewise.
1563 (cp_parser_new_type_id): Likewise.
1564 (cp_parser_condition): Likewise.
1565 (cp_parser_simple_declaration): Likewise.
1566 (cp_parser_decl_specifier_seq): Likewise.
1567 (cp_parser_function_specifier_opt): Likewise.
1568 (cp_parser_conversion_type_id): Likewise.
1569 (cp_parser_template_parameter): Likewise.
1570 (cp_parser_explicit_instantiation): Likewise.
1571 (cp_parser_type_specifier): Likewise.
1572 (cp_parser_simple_type_specifier): Likewise.
1573 (cp_parser_init_declarator): Likewise.
1574 (cp_parser_type_id): Likewise.
1575 (cp_parser_type_specifier_seq): Likewise.
1576 (cp_parser_parameter_declaration): Likewise.
1577 (cp_parser_member_declaration): Likewise.
1578 (cp_parser_exception_declaration): Likewise.
1579 (cp_parser_function_definition_from_specifiers_and_declarator):
1581 (cp_parser_single_declaration): Likewise.
1582 (cp_parser_save_member_function_body): Likewise.
1583 (cp_parser_friend_p): Likewise.
1584 (cp_parser_set_storage_class): New function.
1585 (cp_parser_set_decl_spec_type): Likewise.
1586 * pt.c: Do not include lex.h.
1587 * semantics.c: Likewise.
1588 (finish_member_class_template): Remove.
1590 2004-06-23 Roger Sayle <roger@eyesopen.com>
1592 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1593 longer take both "args" and "convert_args" as arguments.
1594 (build_op_delete_call): Update call to build_cxx_call.
1595 (build_over_call): Likewise, update call to build_cxx_call.
1596 * cp-tree.h (build_cxx_call): Update funtion prototype.
1597 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1598 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1599 (throw_bad_typeid): Likewise.
1600 (build_dynamic_cast_1): Likewise.
1602 2004-06-22 Richard Henderson <rth@redhat.com>
1604 * class.c (build_vfn_ref): Take a pointer not object. Build
1606 (cp_fold_obj_type_ref): New.
1607 * call.c (build_over_call): Update build_vfn_ref call.
1608 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1609 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1611 2004-06-21 Jason Merrill <jason@redhat.com>
1614 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1617 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1619 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1620 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1621 (TREE_PARMLIST): Likewise.
1622 (CALL_DECLARATOR_PARMS): Likewise.
1623 (CALL_DECLARATOR_QUALS): Likewise.
1624 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1625 (cp_declarator_kind): New type.
1626 (cp_parameter_declarator): Likewise.
1627 (cp_declarator): Likewise.
1628 (cp_error_declarator): Likewise.
1629 (no_parameters): Likewise.
1630 (groktypename): Change prototype.
1631 (start_decl): Likewise.
1632 (start_handler_parms): Likewise.
1633 (get_scope_of_declarator): Likewise.
1634 (start_function): Likewise.
1635 (start_preparsed_function): New function.
1636 (start_function): Change prototype.
1637 (start_method): Likewise.
1638 (grokfield): Likewise.
1639 (grokbitfield): Likewise.
1640 (build_new): Likewise.
1641 (make_pointer_declarator): Remove.
1642 (make_reference_declarator): Likewise.
1643 (make_call_declarator): Likewise.
1644 (set_quals_and_spec): Likewise.
1645 (process_template_parm): Change prototype.
1646 (begin_function_definition): Remove.
1647 (finish_parmlist): Remove.
1648 * decl.c (groktypename): Do not use trees to represent
1650 (start_decl): Likewise.
1651 (start_handler_parms): Remove.
1652 (get_scope_of_declarator): Reimplement.
1653 (grokdeclarator): Do not use trees to represent declarators.
1654 (grokparms): Likewise.
1655 (start_function): Likewise.
1656 (start_method): Likewise.
1657 (build_void_list_mode): Do not use TREE_PARMLIST.
1658 * decl.h (grokdeclarator): Change prototype.
1659 * decl2.c (grok_method_quals): Robustify.
1660 (grok_x_components): Do not use trees to represent declarators.
1661 (grokfield): Likewise.
1662 (grokbitfield): Likewise.
1663 (start_objects): Build FUNCTION_DECLs, not declarators.
1664 (start_static_storage_duration_function): Likewise.
1665 * init.c (build_new): Simplify.
1666 * lex.c (make_pointer_declarator): Remove.
1667 (make_reference_declarator): Likewise.
1668 (make_call_declarator): Likewise.
1669 (set_quals_and_spec): Likewise.
1670 * method.c (use_thunk): Use start_preparsed_function.
1671 (synthesize_method): Likewise.
1672 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1673 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1674 * parser.c (cp_error_declarator): New variable.
1675 (declarator_obstack): Likewise.
1676 (alloc_declarator): New function.
1677 (make_declarator): Likewise.
1678 (make_id_declarator): Likewise.
1679 (make_pointer_declarator): Likewise.
1680 (make_reference_declarator): Likewise.
1681 (make_ptrmem_declarator): Likewise.
1682 (make_call_declarator): Likewise.
1683 (make_array_declarator): Likewise.
1684 (no_parameters): New variable.
1685 (make_parameter_declarator): Likewise.
1686 (cp_parser_check_for_definition_in_return_type): Do not use trees
1687 to represent declarators.
1688 (cp_parser_translation_unit): Likewise.
1689 (cp_parser_new_expression): Likewise.
1690 (cp_parser_new_type_id): Likewise.
1691 (cp_parser_new_declarator_opt): Likewise.
1692 (cp_parser_direct_new_declarator): Likewise.
1693 (cp_parser_condition): Likewise.
1694 (cp_parser_declaration_statement): Likewise.
1695 (cp_parser_declaration): Likewise.
1696 (cp_parser_conversion_type_id): Likewise.
1697 (cp_parser_conversion_declarator_opt): Likewise.
1698 (cp_parser_template_parameter_list): Likewise.
1699 (cp_parser_template_parameter): Likewise.
1700 (cp_parser_explicit_instantiation): Likewise.
1701 (cp_parser_init_declarator): Likewise.
1702 (cp_parser_declarator): Likewise.
1703 (cp_parser_direct_declarator): Likewise.
1704 (cp_parser_type_id): Likewise.
1705 (cp_parser_parameter_declaration_clause): Likewise.
1706 (cp_parser_parameter_declaration_list): Likewise.
1707 (cp_parser_parameter_declaration): Likewise.
1708 (cp_parser_member_declaration): Likewise.
1709 (cp_parser_exception_declaration): Likewise.
1710 (cp_parser_check_declarator_template_parameters): Likewise.
1711 (cp_parser_function_definition_from_specifiers_and_declarator):
1713 (cp_parser_save_member_function_body): Likewise.
1714 * pt.c (process_template_parm): Add is_non_type parameter.
1715 (convert_template_argument): Adjust call to groktypename.
1716 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1717 (tsubst): Do not expect declarators.
1718 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1720 (instantiate_decl): Use start_preparsed_function.
1721 * semantics.c (begin_function_definition): Remove.
1722 (finish_parmlist): Remove.
1723 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1726 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1728 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1729 (build_new_method_call): Likewise.
1730 * decl.c (local_variable_p_walkfn): Don't walk into types.
1731 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1732 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1733 * init.c (buld_new): Add new operand for ARRAY_REF.
1734 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1735 (do_build_assign_ref): Likewise.
1736 * parser.c (cp_parser_direct_new_declarator): Add new operands
1738 (cp_parser_direct_declarator): Likewise.
1739 * pt.c (tsubst): Likewise.
1740 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1742 * semantics.c (finish_non_static_data_member): Add new operand
1744 * typeck.c (build_class_member_access_expr): Likewise.
1745 (build_class_member_access_expr, finish_class_member_access_expr):
1747 (build_ptrmemfunc_access_expr): Likewise.
1748 (build_array_ref): Add new operands for ARRAY_REF.
1749 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1750 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1752 2004-06-21 Richard Henderson <rth@redhat.com>
1754 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1755 * parser.c (cp_parser_jump_statement): Update commentary.
1756 * pt.c (tsubst_expr): Use RETURN_EXPR.
1757 * semantics.c (finish_return_stmt): Likewise.
1758 (finalize_nrv_r): Likewise.
1759 * typeck.c, typeck2.c: Update file start commentary.
1761 2004-06-21 Richard Henderson <rth@redhat.com>
1763 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1765 2004-06-20 Richard Henderson <rth@redhat.com>
1767 * cp-tree.h (add_decl_stmt): Declare.
1768 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1769 * semantics.c (maybe_cleanup_point_expr): New.
1770 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1771 finish_for_expr, finish_switch_cond): Use it.
1772 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1774 2004-06-20 Richard Henderson <rth@redhat.com>
1776 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1777 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1778 (cp_gimplify_expr): Call it.
1779 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1780 (cp_genericize): New.
1781 * decl.c (finish_function): Call it.
1782 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1783 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1784 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1785 (cp_genericize): Declare.
1786 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1787 * dump.c (cp_dump_tree): Likewise.
1788 * semantics.c (push_cleanup): Move from c-semantics.c.
1790 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1792 * cp-lang.c (has_c_linkage): Implement.
1794 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1795 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1796 (builtin_function_1): Don't call make_decl_rtl.
1797 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1798 (grokvardecl): Don't call mangle_decl.
1799 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1800 DECL_ASSEMBLER_NAME.
1801 * method.c (set_mangled_name_for_decl): Delete.
1802 * name-lookup.c (pushdecl): When a local extern shadows a
1803 file-scope declaration of the same object, give both DECLs the
1805 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1806 on DECL_ASSEMBLER_NAME.
1808 2004-06-19 Richard Henderson <rth@redhat.com>
1810 * cp-gimplify.c: Remove unnecessary prototypes.
1811 (cp_gimplify_stmt): Merge into ...
1812 (cp_gimplify_expr): ... here. Move to end of file. Handle
1813 stmts_are_full_exprs_p frobbing.
1814 * cp-tree.h (cp_gimplify_stmt): Remove.
1815 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1816 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1818 2004-06-18 Richard Henderson <rth@redhat.com>
1821 * semantics.c (begin_cond): New.
1822 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1823 Assume that non-template decls go land before the conditional.
1824 (simplify_loop_decl_cond): Likewise.
1825 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1826 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1827 begin_switch_stmt, finish_switch_cond): Update to match.
1829 2004-06-17 Jason Merrill <jason@redhat.com>
1832 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1833 (finish_stmt_expr_expr): Update type after conversions.
1834 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1835 Handle void initializer.
1836 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1838 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1840 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1841 * cp-tree.h (defer_fn): Delete.
1842 * decl2.c (defer_fn): Delete.
1843 (finish_file): Simplify deferred_fns loops; check that
1844 only used inline functions get into deferred_fns.
1845 (mark_used): Inline previous contents of defer_fn.
1847 2004-06-16 Richard Henderson <rth@redhat.com>
1849 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1850 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1851 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1852 of CTOR_INITIALIZER ...
1853 (pp_cxx_statement): ... here.
1854 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1855 (finish_function): Use alloc_stmt_list to zap entire function.
1856 * parser.c (cp_parser_compound_statement): Update commentary.
1857 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1858 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1859 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1861 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1863 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1865 2004-06-16 Richard Henderson <rth@redhat.com>
1867 * parser.c (cp_parser_labeled_statement): Update commentary.
1868 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1869 * tree.c (mark_local_for_remap_r): Likewise.
1871 2004-06-16 Richard Henderson <rth@redhat.com>
1873 * parser.c (cp_parser_asm_definition): Update commentary.
1874 * pt.c (tsubst_expr): Use ASM_EXPR.
1875 * semantics.c (finish_asm_stmt): Likewise.
1877 2004-06-16 Richard Henderson <rth@redhat.com>
1879 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1880 * parser.c (cp_parser_statement): Update commentary.
1881 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1882 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1883 * tree.c (mark_local_for_remap_r): Likewise.
1885 2004-06-16 Richard Henderson <rth@redhat.com>
1888 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1889 statement in FOR_INIT_STMT for templates.
1891 2004-06-15 Richard Henderson <rth@redhat.com>
1893 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1894 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1895 (genericize_try_block): Use gimplify_stmt.
1896 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1897 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1898 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1899 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1900 (cp_tree_chain_matters_p): Remove.
1901 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1902 (COMPOUND_STMT_BODY_BLOCK): New.
1903 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1904 (EXPR_STMT_STMT_EXPR_RESULT): New.
1905 (building_stmt_tree): Check cur_stmt_list.
1906 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1907 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1908 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1909 (cp_finish_decl): Use push_cleanup.
1910 (start_function, finish_function): Use statement lists.
1911 (finish_stmt): Do nothing.
1912 * except.c (begin_eh_spec_block): Use statement lists.
1913 (check_handlers_1, check_handlers): Likewise.
1914 * init.c (construct_virtual_base): Don't add extra compound stmts.
1915 (build_vec_init): Likewise.
1916 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1917 * name-lookup.h (struct cp_binding_level): Add statement_list.
1918 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1919 (cp_parser_labeled_statement, cp_parser_expression_statement,
1920 cp_parser_statement_seq_opt): Likewise.
1921 (cp_parser_compound_statement): Likewise. Take bool for try block.
1922 (cp_parser_selection_statement): Tidy if processing.
1923 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1924 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1925 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1926 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1927 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1928 (finish_cond): New, rewritten from FINISH_COND.
1929 (simplify_loop_decl_cond): New.
1930 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1931 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1932 begin_else_clause, finish_else_clause, finish_if_stmt,
1933 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1934 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1935 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1936 finish_switch_cond, finish_switch_stmt, begin_try_block,
1937 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1938 finish_handler_sequence, finish_function_handler_sequence,
1939 begin_handler, finish_handler_parms, finish_handler,
1940 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1941 using statement lists.
1942 (begin_compound_stmt): Replace has_no_scope argument with flags.
1943 Update all callers. Use statement lists.
1944 (finish_compound_stmt): Likewise.
1945 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1946 (current_scope_stmt_stack): Remove.
1947 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1948 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1949 Rewrite with statement lists.
1951 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1953 * parser.c: Change all assignments of c_lex_string_translate
1954 to true and false to 1 and 0.
1955 (cp_lexer_read_token): Convert type of the translated string.
1956 (cp_parser_skip_to_closing_parentheses): Preserve original
1957 value of c_lex_string_translate, and set it to -1 while
1959 (cp_parser_cache_group): Likewise.
1960 (cp_parser_cache_group_1): Renamed.
1961 (cp_parser_asm_operand_list): Remove redundant setting of
1962 c_lex_string_translate.
1963 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1964 Handle chained strings.
1966 2004-06-12 Andrew Pinski <apinski@apple.com>
1970 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1972 * cp-tree.h: Fix typo.
1974 * cp-tree.h: Include cgraph.h
1975 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1976 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1978 2004-06-12 Jason Merrill <jason@redhat.com>
1980 PR tree-optimization/14107
1981 * decl.c (finish_function): Warn about no return in all functions.
1983 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1985 * cp-tree.h (struct language_function): Remove cannot_inline.
1986 * decl.c (save_function_data): cannot_inline is no more.
1987 (cxx_push_function_context): Likewise.
1988 * decl2.c (start_objects, start_static_storage_duration_function):
1989 Reset DECL_INLINE, set DECL_UNINLINABLE.
1991 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1994 * search.c (lookup_field): Propagate the ambiguity list.
1995 (lookup_fnfields): Likewise.
1997 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2000 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2001 template keyword to disambiguate.
2003 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2006 * decl.c (grokdeclarator): Ignore pointer-to-members when
2007 computing template depth.
2010 * name-lookup.c (pushtag): Do not try to put class declarations in
2011 explicit specialization scopes.
2013 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2015 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2017 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2020 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2021 bindings for undeclared built-ins.
2023 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2025 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2026 appear at the correct location.
2028 2004-06-10 Jason Merrill <jason@redhat.com>
2032 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2033 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2034 TREE_TYPE for non-dependent names.
2035 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2036 unknown_type_node as its TREE_TYPE.
2037 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2038 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2039 (dump_expr) <SCOPE_REF case>: Likewise.
2041 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2044 * parser.c (cp_parser_direct_declarator): Robustify.
2047 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2048 constants in non-dependent contexts.
2052 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2055 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2058 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2061 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2065 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2066 * lex.c (handle_pragma_interface): Deprecate.
2067 (handle_pragma_implementation): Likewise.
2069 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2071 * g++spec.c (lang_specific_driver): Remove check for -lm
2072 and -lmath when check it see if it was the math library.
2074 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2077 * parser.c (cp_parser_direct_declarator): Reject constructor named
2078 as qualified template-id.
2080 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2083 * lex.c (handle_pragma_interface): Deprecate.
2084 (handle_pragma_implementation): Likewise.
2086 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2089 * parser.c (cp_parser_iteration_statement): Fix typo in error
2093 * pt.c (tsubst_default_argument): Do not defer access checks
2094 while substituting into the default argument.
2097 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2098 constant in a non-dependent context.
2101 * except.c (build_throw): Ensure that temp_expr has been
2104 2004-06-06 Roger Sayle <roger@eyesopen.com>
2106 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2108 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2111 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2112 'typename', and accept 'template'.
2114 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2115 Jan Hubicka <jh@suse.cz>
2118 * method.c (use_think): Do not mark thunk as referenced.
2120 2004-06-03 Matt Austern <austern@apple.com>
2123 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2124 is nonzero, and if we see a noninline definition of a key method,
2125 make the vtables nonweak.
2127 2004-06-02 Matt Austern <austern@apple.com>
2129 * cp-tree.h (instantiate_decl): new boolean parameter,
2130 undefined_ok. Current behavior is equivalent to its being 0.
2131 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2132 * pt.c (mark_decl_instantiated): Unconditionally make
2133 instantiations explicit unconditionally
2134 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2135 since mark_decl_instantiated now does it.
2136 (instantiate_class_member): New. Instantiate a member of an
2137 explicitly instantiated class template.
2138 (do_type_instantiation): Explicitly instantiate members of an
2139 explicitly instantiated class template.
2140 (instantiate_decl): if undefined_ok is nonzero, and if we're
2141 trying to explicitly instantiated a template with no definition,
2142 change it to an implicit instantiation.
2143 (instantiate_pending_templates): Add new argument to instantiate_decl.
2144 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2146 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2148 * cp-tree.h: Fix typo.
2150 * cp-tree.h: Include cgraph.h
2151 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2152 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2154 2004-06-01 Jason Merrill <jason@redhat.com>
2157 * call.c (call_builtin_trap): Remove type parm.
2158 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2159 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2161 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2164 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2165 TREE_TYPE for non-dependent names.
2166 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2167 unknown_type_node as its TREE_TYPE.
2168 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2169 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2170 (dump_expr) <SCOPE_REF case>: Likewise.
2172 2004-06-01 Richard Henderson <rth@redhat.com>
2173 Andrew Pinski <pinskia@physics.uc.edu>
2175 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2176 * parser.c (struct cp_parser): Remove in_offsetof.
2177 (cp_parser_new): Don't set it.
2178 (cp_parser_unary_expression): Don't check it.
2179 (cp_parser_postfix_open_square_expression): Split out from ...
2180 (cp_parser_postfix_expression): ... here.
2181 (cp_parser_postfix_dot_deref_expression): Likewise.
2182 (cp_parser_builtin_offsetof): New.
2183 (cp_parser_primary_expression): Use it.
2185 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2188 * parser.c (cp_parser_postfix_expression): Allow subscript
2189 operator in offsetof.
2191 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2194 * friend.c (add_friend): Do not try to perform access checks for
2195 functions from dependent classes.
2197 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2199 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2200 (pp_cxx_begin_template_argument_list): Turn into a function.
2201 (pp_cxx_end_template_argument_list): Likewise.
2202 (pp_cxx_separate_with): Define.
2203 (pp_cxx_unqualified_id): Tidy.
2204 (pp_cxx_primary_expression): Likewise.
2205 (pp_cxx_postfix_expression): Likewise.
2206 (pp_cxx_expression): Likewise.
2207 (pp_cxx_simple_type_specifier): Likewise.
2208 (pp_cxx_type_specifier_seq): Likewise.
2209 (pp_cxx_parameter_declaration_clause): Likewise.
2210 (pp_cxx_exception_specification): Likewise.
2211 (pp_cxx_direct_declarator): Likewise.
2212 (pp_cxx_type_id): Likewise.
2213 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2215 (pp_cxx_left_paren): Likewise.
2216 (pp_cxx_right_paren): Likewise.
2217 (pp_cxx_left_brace): Likewise.
2218 (pp_cxx_right_brace): Likewise.
2219 (pp_cxx_left_bracket): Likewise.
2220 (pp_cxx_right_bracket): Likewise.
2221 (pp_cxx_dot): Likewise.
2222 (pp_cxx_identifier): Likewise.
2223 (pp_cxx_tree_identifier): Likewise.
2224 (pp_cxx_ampersand): New macro.
2225 (pp_cxx_star): Likewise.
2226 (pp_cxx_arrow): Likewise.
2227 (pp_cxx_semicolon): Likewise.
2228 (pp_cxx_complement): Likewise.
2229 (pp_cxx_begin_template_argument_list): Declaree.
2230 (pp_cxx_end_template_argument_list): Likewise.
2231 (pp_cxx_colon_colon): likewise.
2233 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2235 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2238 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2240 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2241 typeck.c: Fix comment formatting.
2243 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2245 * cp-lang.c (cp_expand_decl): Remove.
2246 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2248 2004-05-30 Andreas Jaeger <aj@suse.de>
2250 * lang-specs.h: Add missing initializers for .ii.
2252 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2254 * decl.c (cp_make_fname_decl): Free return value from
2257 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2260 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2262 * init.c (build_new): Likewise.
2265 * name-lookup.c (arg_assoc): Robustify.
2268 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2269 when determining the scope to use for a pointer to member.
2270 (lookup_anon_field): Give it external linkage.
2271 * cp-tree.h (lookup_anon_field): Declare it.
2272 * expr.c (cplus_expand_constant): Use it.
2274 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2277 * parser.c (cp_parser_simple_type_specifier): Call
2278 maybe_note_name_used_in_class.
2280 2004-05-28 Tom Marshall <tmarshall@real.com>
2283 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2284 the class has friends.
2286 2004-05-27 Adam Nemet <anemet@lnxw.com>
2289 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2290 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2292 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2294 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2295 if it might be needed.
2296 * pt.c (mark_decl_instantiated): Only call defer_fn if
2297 the function actually needs processing in finish_file.
2298 * decl2.c (finish_file): Add check that elements in
2299 deferred_fns_used are really needed there. Remove unnecessary
2300 test of DECL_SAVED_TREE.
2302 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2304 * Make-lang.in: No need to specify $(LIBCPP).
2306 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2309 * parser.c (cp_parser_class_head): Robustify.
2312 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2314 (cp_parser_constructor_declarator_p): Treat attributes
2318 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2319 base classes in templates.
2321 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2324 * pt.c (instantiate_template): Robustify.
2326 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2329 * decl.c (xref_tag): Issue errors about redeclaring template
2330 classes as non-template classes.
2332 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2335 * name-lookup.c (supplement_binding): Allow redefinitions of
2339 * parser.c (cp_parser_template_argument): Robustify.
2341 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2343 * class.c (alter_access): Use %E format specifier to print an
2344 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2345 (push_lang_context): Likewise.
2346 * decl.c (lookup_label): Likewise.
2347 (grokdeclarator): Likewise.
2348 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2349 * pt.c (do_type_instantiation): Likewise.
2350 * tree.c (handle_java_interface_attribute): Likewise.
2351 (handle_com_interface_attribute): Likewise.
2352 (handle_init_priority_attribute): Likewise.
2354 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2358 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2359 recognized as overloaded functions.
2361 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2364 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2365 layout conflicts for unions.
2368 * typeck.c (build_x_unary_op): Instantiate template class
2369 specializations before looking for "operator &".
2372 * typeck.c (complete_type): Layout non-dependent array types, even
2376 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2379 2004-05-22 Roger Sayle <roger@eyesopen.com>
2381 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2382 returning when TREE_TYPE is error_mark_node.
2383 * typeck.c (require_complete_type): Return error_mark_node if
2384 value's type is an error_mark_node.
2386 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2388 * optimize.c (calls_setjmp_r): Remove.
2389 (calls_setjmp_p): Remove.
2390 * cp-tree.c (calls_setjmp_p): Remove.
2391 * decl.c (finish_function): Do not call calls_setjmp_p.
2393 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2395 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2396 * decl2.c (maybe_make_one_only): Likewise.
2397 * method.c (use_thunk): Likewise.
2399 2004-05-18 Jason Merrill <jason@redhat.com>
2401 * class.c (build_base_path): Tidy a bit.
2403 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2405 * name-lookup.c (struct scope_binding): New.
2406 (EMPTY_SCOPE_BINDING): New.
2407 (lookup_using_namespace): Take a scope_binding instead of a
2409 (qualified_lookup_using_namespace): Likewise.
2410 (cxx_binding_clear): Delete.
2411 (do_nonmember_using_decl): Use a scope_binding instead of a
2413 (lookup_tag): Don't call select_decl.
2414 (ambiguous_decl): Don't return anything (and change callers to match).
2415 Take a scope_binding as the second parameter.
2416 (lookup_namespace_name): Use a scope_binding instead of a
2418 (unqualified_namespace_lookup): Likewise.
2419 (lookup_qualified_name): Likewise.
2420 (select_decl): Take a scope_binding instead of a cxx_binding.
2421 Use macros rather than hand-coding tests for type-ness.
2423 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2425 * cp-gimplify.c: Rename from cp-simplify.c.
2426 * Make-lang.in, optimize.c: Update.
2428 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2430 Merge from tree-ssa-20020619-branch. See
2431 ChangeLog.tree-ssa for details.
2433 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2434 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2435 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2436 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2438 * cp-mudflap.c: New file.
2439 * cp-simplify.c:: New file.
2441 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2444 * decl2.c (check_classfn): For member templates, compare also the
2445 template parameters to match the declaration.
2446 * cp-tree.h: Adjust declaration of check_classfn.
2447 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2448 * friend.c (do_friend): Likewise.
2449 * pt.c (tsubst_friend_function): Likewise.
2451 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2453 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2454 Instead, dig into the representation type to find the array bound.
2456 2004-04-30 Jason Merrill <jason@redhat.com>
2458 Refer to base members using COMPONENT_REFs where possible.
2459 * class.c (build_simple_base_path): New fn.
2460 (build_base_path): Use it for non-virtual base references.
2461 (layout_class_type): Change base fields to their real type
2462 after layout is done.
2463 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2464 * cp-lang.c (cxx_get_alias_set): Use it.
2466 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2468 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2471 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2474 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2475 used in integral constant expressions.
2477 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2479 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2482 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2484 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2485 * decl.c (reshape_init): Use it.
2486 * init.c (perform_member_init): Remove redundant condition.
2487 (build_aggr_init): Adjust to handle brace-enclosed initializers
2489 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2491 * parser.c (cp_parser_initializer_clause): Do not set
2492 TREE_HAS_CONSTRUCTOR on the initializer.
2493 * rtti.c (tinfo_base_init): Likewise.
2494 (generic_initializer): Likewise.
2495 (ptr_initializer): Likewise.
2496 (ptm_initializer): Likewise.
2497 (class_initializer): Likewise.
2498 (get_pseudo_ti_init): Likewise.
2499 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2501 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2503 * name-lookup.c (anonymous_namespace_name): Make static.
2505 2004-04-19 Roger Sayle <roger@eyesopen.com>
2508 * class.c (build_base_path): Call fold whilst building the NULL
2509 pointer check expression trees.
2511 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2513 * init.c (build_new_1): Don't use type size argument for Java
2514 _Jv_AllocObject call.
2516 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2518 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2519 declaration and definition.
2521 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2524 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2525 than ASM_OUTPUT_DEF.
2527 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2529 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2530 current_function_decl == NULL.
2532 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2535 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2538 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2540 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2542 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2543 or TREE_SIDE_EFFECTS of a type.
2545 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2548 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2549 cv-qualifier unification.
2550 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2552 2004-04-02 Jan Hubicka <jh@suse.cz>
2554 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2555 * cp-tree.h (cp_update_decl_after_saving): Declare.
2556 * tree.c (cp_update_decl_after_saving): Define.
2558 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2561 * typeck.c (get_delta_difference): Call fold before returning the
2564 2004-04-01 Richard Henderson <rth@redhat.com>
2567 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2568 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2570 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2573 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2575 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2577 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2579 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2581 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2582 * class.c (check_bitfield_decl): Likewise.
2583 * cvt.c (type_promotes_to): Likewise.
2584 * decl.c (finish_enum): Likewise.
2585 * mangle.c (write_builtin_type): Likewise.
2586 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2587 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2588 (build_binary_op): Likewise.
2590 2004-03-31 Jan Hubicka <jh@suse.cz>
2592 * tree.h (optimize_function): Kill prototype.
2593 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2594 * semantics.c (expand_body): Kill.
2596 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2599 * decl.c (start_decl_1): Do not decide whether or not to create a
2600 new cleanup level until after the type has been completed.
2603 * pt.c (tsubst_default_argument): Clear current_function_decl.
2605 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2607 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2609 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2611 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2612 is null, just print the literal name and return.
2614 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2616 * cxx-pretty-print.c: Fix comment typos.
2618 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2620 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2623 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2625 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2626 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2629 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2631 PR 12267, 12391, 12560, 13129, 14114, 14133
2632 * cp-lang.c (c_reset_state): Delete.
2633 (push_file_scope, pop_file_scope): New stubs.
2634 * parser.c (c_parse_file): Call sorry() here if called more than once.
2636 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2638 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2641 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2643 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2645 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2647 * error.c (enum pad): Remove.
2648 (dump_qualifiers): Likewise.
2649 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2650 (dump_aggr_type): Likewise.
2651 (dump_type_suffix): Likewise.
2652 (dump_simple_decl): Likewise.
2653 (dump_function_decl): Likewise.
2654 (cv_to_string): Likewise.
2655 (dump_type_prefix): Likewise. Adjust return void.
2656 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2658 (pp_cxx_template_keyword_if_needed): Document.
2659 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2660 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2661 MUST_NOT_THROW_EXPR.
2663 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2666 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2667 templates, if their type is non-dependent.
2669 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2671 * call.c (build_op_delete_call): Do not forget the placement
2672 arguments when iterating through mutiple delete operators.
2674 * cp-tree.h (svaed_scope): Remove last_parms.
2675 (NEW_DELETE_OPNAME_P): New macro.
2676 (last_function_parms): Remove.
2677 (do_friend): Adjust prototype.
2678 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2679 using last_function_parms.
2680 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2681 using last_function_parms.
2682 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2683 for class-specific operator new and operator delete.
2684 (grok_op_properties): Do not look for allocation functions with
2686 (start_function): Use DECL_ARGUMENTS instead of
2687 last_function_parms.
2688 * decl.h (last_function_parms): Do not declare.
2689 * decl2.c (grokclassfn): Do not use last_function_parms.
2690 * friend.c (do_friend): Remove parmdecls parameter.
2691 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2692 (pop_from_top_level): Do not restore it.
2693 * pt.c (check_explicit_specialization): Do not adjust
2694 last_function_parms.
2696 * name-lookup.c (do_local_using_decl): Create a local binding for
2697 types brought in via using declarations.
2699 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2700 function declarations correctly.
2702 * semantics.c (finish_id_expression): Correct handling of
2703 conversion operators to dependent types.
2705 * typeck.c (lookup_destructor): Allow the use of destructors from
2708 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2710 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2711 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2712 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2713 the field is named TEMPLATE_TYPE_PARM_INDEX.
2715 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2718 * parser.c (cp_parser_functional_cast): A cast to anything
2719 but integral or enumaration type is not an integral constant
2721 * pt.c (value_dependent_expression_p): Handle cast expressions
2722 without operands (such as "int()").
2724 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2726 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2727 cv-qualification between the type named by the
2728 pseudo-destructor-name and the object-type.
2730 * search.c (accessible_base_p): Handle non-proper bases.
2732 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2733 refers to a single overloaded function, set the type of the
2735 * tree.c (lvalue_type): Simplify.
2736 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2738 (build_unary_op): Handle OVERLOADs with known types.
2740 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2743 * parser.c (cp_parser_postfix_expression): Handle the use of
2744 "typename" in non-dependent contexts. Convert appropriately when
2745 when using a qualified name after "->" or ".".
2747 * call.c (conditional_conversion): Honor the requirement that some
2748 conversions refer to the original object.
2750 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2752 * call.c (build_conditional_expr): Do not call force_rvalue for
2753 operands of void_type when the conditional expression itself has
2755 * name-lookup.c (pushdecl): Don't consider a declaration of a
2756 function named "main" to be an overload of a type named "main".
2757 * parser.c (cp_parser_template_name): Perform name lookup when the
2758 template name is proceeded by "template" if the qualifying scope
2760 * typeck.c (composite_pointer_type_r): Correctly handle
2761 pointer-to-member types.
2762 (build_const_cast): Likewise.
2764 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2766 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2767 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2768 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2769 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2770 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2771 (TYPEOF_TYPE_EXPR): New macro.
2772 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2773 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2774 * pt.c (tsubst): Likewise.
2775 * semantics.c (finish_typeof): Likewise.
2776 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2777 and TEMPLATE_TYPE_PARM.
2778 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2779 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2781 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2784 * cp-tree.h (build_new_op): Change prototype.
2785 (build_x_binary_op): Likewise.
2786 * call.c (build_new_op): Add overloaded_p parameter.
2787 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2788 * parser.c (cp_parser_binary_expression): Note that uses of
2789 overloaded operators prevents an expression from being considered
2790 an integral constant.
2791 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2793 * semantics.c (finish_call_expr): Likewise.
2794 * typeck.c (rationalize_conditional_expr): Likewise.
2795 (build_x_indirect_ref): Likewise.
2796 (build_x_binary_op): Likewise.
2797 (build_x_unary_op): Likewise.
2798 (build_x_compound_expr): Likewise.
2799 (build_modify_expr): Likewise.
2800 * typeck2.c (build_x_arrow): Likewise.
2802 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2804 * cp-lang.c, ptree.c: Update copyright.
2806 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2809 * parser.c (cp_parser_non_integral_constant_expression): Encode
2810 more of the idiom that surrounded calls to this function within
2812 (cp_parser_primary_expression): Adjust accordingly.
2813 (cp_parser_postfix_expression): Likewise.
2814 (cp_parser_unary_expression): Likewise.
2815 (cp_parser_cast_expression): Likewise.
2816 (cp_parser_assignment_expression): Likewise.
2817 (cp_parser_expression): Likewise.
2818 (cp_parser_new_expression): Note that new-expressions are not
2819 allowed in integral constant expressions.
2820 (cp_parser_delete_expression): Likewise.
2822 2004-03-12 Matt Austern <austern@apple.com>
2824 * decl2.c (maybe_make_one_only): Look at
2825 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2826 to make an explicit instantiation weak.
2827 * method.c (use_thunk): Make sure we call comdat_linkage
2829 * pt.c (do_type_instantiation): On systems where weak symbols
2830 don't go in a static archive's TOC, explicit instantiation of a
2831 class must imply *explicit* instantiation of its memeber.
2833 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2835 * call.c, cp-tree.h, pt.c: Fix comment typos.
2837 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2840 * decl.c (xref_tag): Disregard non-type declarations when
2841 looking up a tagged type.
2843 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2846 * call.c (convert_like_real): Build a const qualified temporary,
2847 when testing ctor access.
2849 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2851 * call.c (initialize_reference): Fix typo.
2853 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2856 * pt.c (determine_specialization): For member templates, match also
2860 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2862 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2864 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2867 * call.c (initialize_reference): Handle initializers that are
2868 class-member access expressions applies to rvalues.
2870 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2873 * name-lookup.c (supplement_binding): Ignore functions that are
2874 marked DECL_ANTICIPATED.
2876 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2879 * class.c (check_field_decls): Complain about non-static data
2880 members of reference type in unions. Propagate
2881 CLASSTYPE_REF_FIELDS_NEED_INIT and
2882 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2884 * init.c (perform_member_init): Complain about mbmers with const
2885 type that are not explicitly initialized.
2887 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2889 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2890 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2891 (lang_identifier): Remove implicit_decl and error_locus.
2892 (IDENTIFIER_IMPLICIT_DECL): Remove.
2893 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2894 (IDENTIFIER_ERROR_LOCUS): Likewise.
2895 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2896 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2897 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2898 (implicitly_declare): Remove.
2899 * decl.c (warn_extern_redeclared_static): Remove check of
2900 IDENTIFIER_IMPLICIT_DECL.
2901 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2902 (implicitly_declare): Remove.
2903 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2904 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2905 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2906 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2907 in the innermost scope, rather than at namespace scope.
2908 * name-lookup.c (push_local_binding): Give it external linkage.
2909 (pushdecl): Remove dead code.
2910 * name-lookup.h (push_local_binding): Declare it.
2911 * ptree.c (cxx_print_identifier): Don't print
2912 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2913 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2914 not IDENTIFIER_ERROR_LOCUS.
2915 * typeck.c (build_function_call): Remove dead code.
2917 2004-03-08 Jason Merrill <jason@redhat.com>
2920 * decl.c (xref_tag): Remove attribute handling.
2921 * cp-tree.h: Adjust prototype.
2922 * decl.c, parser.c, rtti.c: Adjust callers.
2923 * parser.c (cp_parser_class_head): Pass back attributes in the
2925 (cp_parser_class_specifier): Adjust.
2927 2004-03-08 Matt Austern <austern@apple.com>
2930 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2931 as static, to static_decls array.
2933 2004-03-05 Jason Merrill <jason@redhat.com>
2935 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2937 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2939 * decl.c (grokfndecl): Update old incorrect comment.
2940 (grokvardecl): Diagnose C++ variables of type with no linkage.
2942 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2945 * pt.c (build_non_dependent_expr): Do not create a
2946 NON_DEPENDENT_EXPR for a THROW_EXPR.
2948 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2951 * error.c (dump_expr): Handle THROW_EXPR.
2953 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2956 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2957 lookup if ordinary name-lookup finds a non-function.
2958 * pt.c (tsubst_copy_and_build): Likewise.
2961 * parser.c (cp_parser_late_parsing_default_args): Check that there
2962 are no extra tokens after the end of the default-argument
2965 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2968 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2969 having C++ linkage for name-mangling purposes.
2972 * parser.c (cp_parser_direct_declarator): Recognize constructor
2973 declarators that use a template-id to name the class being
2977 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2978 (tsubst_expr): Do not call tsubst_copy, even when
2979 processing_template_decl.
2981 2004-03-01 Jeff Law <law@redhat.com>
2983 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2986 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2989 * name-lookup.h (push_scope): Change prototype.
2990 * name-lookup.c (push_scope): Do not reenter the current class
2992 * decl.c (grokfndecl): Check return code from push_scope before
2994 * decl2.c (check_classfn): Likewise.
2995 * parser.c (cp_parser_conversion_function_id): Likewise.
2996 (cp_parser_init_declarator): Likewise.
2997 (cp_parser_direct_declarator): Likewise.
2998 (cp_parser_class_specifier): Likewise.
2999 (cp_parser_class_head): Likewise.
3000 (cp_parser_lookup_name): Likewise.
3001 (cp_parser_constructor_declarator_p): Likewise.
3002 * pt.c (instantiate_class_template): Likewise.
3003 (resolve_typename_type): Likewise.
3005 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3008 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3012 * class.c (update_vtable_entry_for_fn): Do not go through
3013 covariance machinery if the type returned by an overrider is the
3014 same as the original.
3016 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3018 * call.c: Fix a comment typo.
3020 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3022 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3024 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3027 * parser.c (cp_parser_parameter_declaration_list): Commit
3028 to fewer tentative parses.
3030 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3033 * pt.c (dependent_type_p_r): A template template parameter is a
3036 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3039 * mangle.c (write_template_arg_literal): Don't rely on identity for
3042 2004-02-24 Jason Merrill <jason@redhat.com>
3044 * tree.c (build_exception_variant): Use check_qualified_type.
3046 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3047 Kazu Hirata <kazu@cs.umass.edu>
3049 * decl.c (cxx_init_decl_processing): Don't check
3050 flag_writable_strings.
3052 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3055 * typeck.c (maybe_warn_about_returning_address_of_location):
3056 Change check for VAR_DECL to use DECL_P instead.
3058 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3061 * cvt.c (build_expr_type_conversion): Type must be complete before
3062 looking up for conversions.
3064 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3067 * name-lookup.c (arg_assoc_class): Don't look into template
3068 arguments if it is not a primary template.
3070 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3073 * method.c (use_thunk): Always clone function argument tree.
3075 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3078 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3081 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3082 for all type variants.
3084 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3087 * decl.c (duplicate_decls): Return error_mark_node for invalid
3089 * name-lookup.c (push_namespace): Ignore the return value from
3091 * pt.c (push_template_decl_real): Robustify.
3094 * name-lookup.c (push_class_level_binding): Do not complain about
3095 adding a binding for a member whose name is the same as the
3096 enclosing class if the member is located in a base class of the
3099 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3102 * parser.c (cp_parser_new_expression): Parse an ill-formed
3103 direct-new-declarator after a parenthesized type-id to emit good
3106 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3108 * cp-tree.def, cvt.c: Update copyright.
3110 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3113 * cp-tree.h (abi_version_at_least): Remove.
3114 * mangle.c: Include flags.h.
3116 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3119 * call.c (build_conditional_expr): Handle conversions between
3120 class types which result in differently cv-qualified type
3124 * class.c (delete_duplicate_fields_1): Remove.
3125 (delete_duplicate_fields): Likewise.
3126 (finish_struct_anon): Remove check for members with the same name
3127 as their enclosing class.
3128 (check_field_decls): Do not call duplicate_fields.
3129 * decl.c (grokdeclarator): Remove check for static data members
3130 with the same name as their enclosing class.
3131 * name-lookup.c (push_class_level_binding): Check for members with
3132 the same name as their enclosing class.
3134 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3137 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3139 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3142 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3143 has full set of arguments.
3145 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3148 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3150 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3153 * cp-tree.h (delete_sanity): Change prototype.
3154 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3155 Remove dead code. Adjust code to warn about deleting an array.
3156 * typekc.c (decay_conversion): Use build_address and build_nop.
3159 * search.c (accessible_p): Do not check access in thunks.
3162 * call.c (build_conditional_expr): Call force_rvalue on the
3163 non-void operand in the case that one result is a throw-expression
3164 and the other is not.
3166 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3169 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3170 the type name and look ahead for ::~, and bail out early with a
3171 better error message if the parse is going to fail.
3173 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3175 * call.c (conversion_kind): New type.
3176 (conversion_rank): Likewise.
3177 (conversion): Likewise.
3178 (CONVERSION_RANK): New macro.
3179 (conversion_obstack): New variable.
3180 (obstack_initialized): Likewise.
3181 (z_candidate): Change type of convs and second_conv.
3182 (candidate_warning): New type.
3183 (IDENTITY_RANK): Remove.
3184 (EXACT_RANK): Likewise.
3185 (PROMO_RANK): Likewise.
3186 (STD_RANK): Likewise.
3187 (PBOOL_RANK): Likewise.
3188 (USER_RANK): Likewise.
3189 (ELLIPSIS_RANK): Likewise.
3190 (BAD_RANK): Likewise.
3191 (ICS_RANK): Likewise.
3192 (ICS_STD_RANK): Likewise.
3193 (ICS_USER_FLAG): Likewise.
3194 (ICS_ELLIPSIS_FLAG): Likewise.
3195 (ICS_THIS_FLAG): Likewise.
3196 (ICS_BAD_FLAG): Likewise.
3197 (NEED_TEMPORARY_P): Likewise.
3198 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3199 (USER_CONV_CAND): Likewise.
3200 (USER_CONV_FN): Likewise.
3201 (conversion_obstack_alloc): New function.
3202 (alloc_conversion): Likewise.
3203 (validate_conversion_obstack): Likewise.
3204 (alloc_conversions): Likewise.
3205 (build_conv): Adjust to deal with new conversion data structures.
3206 (build_identity_conv): New function.
3207 (build_ambiguous_conv): Likewise.
3208 (standard_conversion): Adjust to deal with new conversion data
3210 (convert_class_to_reference): Likewise.
3211 (direct_reference_binding): Likewise.
3212 (reference_binding): Likewise.
3213 (implicit_conversion): Likewise.
3214 (add_candidate): Likewise.
3215 (add_function_candidate): Likewise.
3216 (add_conv_candidate): Likewise.
3217 (build_builtin_candidate): Likewise.
3218 (print_z_candidate): Likewise.
3219 (merge_conversion_sequences): Likewise.
3220 (build_user_type_conversion_1): Likewise.
3221 (build_user_type_conversion): Likewise.
3222 (build_new_function_call): Likewise.
3223 (build_object_call): Likewise.
3224 (conditional_conversion): Likewise.
3225 (build_conditional_expr): Likewise.
3226 (build_new_op): Likewise.
3227 (build_op_delete_call): Likewise.
3228 (convert_like_real): Likewise.
3229 (build_over_call): Likewise.
3230 (build_new_method_call): Likewise.
3231 (is_subseq): Likewise.
3232 (maybe_handle_implicit_object): Likewise.
3233 (maybe_handle_ref_bind): Likewise.
3234 (compare_ics): Likewise.
3235 (source_type): Likewise.
3236 (add_warning): Likewise.
3238 (can_convert_arg): Likewise.
3239 (can_convert_arg_bad): Likewise.
3240 (perform_implicit_conversion): Likewise.
3241 (perform_direct_initialization_if_possible): Likewise.
3242 (initialize_reference): Likewise.
3243 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3244 * cp-tree.def (WRAPPER): Likewise.
3245 (IDENTITY_CONV): Remove.
3246 (LVALUE_CONV): Likewise.
3247 (QUAL_CONV): Likewise.
3248 (STD_CONV): Likewise.
3249 (PTR_CONV): Likewise.
3250 (PMEM_CONV): Likewise.
3251 (BASE_CONV): Likewise.
3252 (REF_BIND): Likewise.
3253 (USER_CONV): Likewise.
3254 (AMBIG_CONV): Likewise.
3255 (RVALUE_CONV): Likewise.
3256 * cp-tree.h (tree_wrapper): Remove.
3257 (WRAPPER_ZC): Remove.
3258 (lang_tree_node): Remove wrapper.
3259 (LOOKUP_SPECULATIVELY): Remove.
3260 (build_op_delete_call): Adjust prototype.
3261 (validate_conversion_obstack): Declare.
3262 (build_zc_wrapper): Remove.
3263 * cvt.c (convert_to_reference): Remove dead code.
3264 (ocp_convert): Likewise.
3265 * decl.c (redeclaration_error_message): Correct handling of
3267 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3268 (cp_tree_node_structure): Remove WRAPPER case.
3269 * decl2.c (finish_file): Call validate_conversion_obstack.
3270 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3271 (build_op_delete_call): Likewise.
3272 (build_x_delete): Likewise.
3273 (build_delete): Adjust call to build_op_delete_call.
3274 * pt.c (tsubst_friend_declaration): Adjust code to determine
3275 whether or not a friend template is a definition.
3276 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3277 * tree.c (build_zc_wrapper): Remove.
3279 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3281 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3282 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3283 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3284 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3286 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3288 * typeck.c (lookup_destructor): Fix typo in error message.
3290 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3292 * call.c, parser.c, tree.c: Fix comment typos.
3294 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3297 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3298 * decl.c (duplicate_decls, start_function): Likewise.
3300 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3302 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3303 * parser.c (free_parser_stacks): Delete.
3305 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3307 * rtti.c: Update copyright.
3309 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3312 * decl.c (require_complete_types_for_parms): Do not insert
3313 error_mark_node in the parameter list.
3315 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3318 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3319 error when terminator can not be found.
3321 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3323 Make-lang.in (po-generated): Delete.
3325 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3327 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3328 targetm.calls.promote_prototypes.
3330 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3334 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3336 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3337 (handle_pragma_implementation): Likewise.
3339 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3342 * typeck.c (lookup_destructor): Tweak error message.
3344 2004-02-05 Jan Hubicka <jh@suse.cz>
3346 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3349 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3352 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3353 code, only emits the diagnostic now. Added lookup of the identifier
3354 and support for qualified ids.
3355 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3356 Parse an (invalid) type name as id-expression within a declarator.
3357 (cp_parser_simple_declaration): Use it.
3358 (cp_parser_member_declaration): Likewise.
3359 (cp_parser_make_typename_type): New function. Handle errors through
3360 cp_parser_diagnose_invalid_typename.
3361 (cp_parser_elaborated_type_specifier): Use it.
3363 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3366 * call.c (convert_like_real): Use "converting" rather than
3367 "argument" as the descriptive keyword to
3368 dubious_conversion_warnings.
3369 * typeck.c (convert_for_assignment): Do not call
3370 dubious_conversion_warnings.
3372 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3375 * init.c (build_delete): Emit a more informative error message in
3376 case of an incomplete type, and on the correct source line.
3378 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3380 * error.c, search.c: Update copyright.
3382 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3385 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3386 linkage for the typeinfo name string.
3388 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3391 * cp-tree.h (fold_non_dependent_expr): New function.
3392 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3393 (cp_parser_template_argument): Use fold_non_dependent_expr.
3394 (cp_parser_direct_declarator): Likewise.
3395 * pt.c (fold_non_dependent_expr): New function.
3396 (convert_nontype_argument): Use it.
3397 (tsubst_qualified_id): Simplify.
3398 (tsubst_copy_and_build): Likewise.
3400 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3402 * decl.c (cxx_push_function_context): Do not set
3403 current_function_is_thunk.
3404 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3407 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3410 * pt.c (more_specialized_class): Increase processing_template_decl
3411 while partial ordering.
3413 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3416 * decl.c (start_function): Do not call pushdecl for any
3417 instantiation or specialization of a primary template.
3419 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3422 * parser.c (cp_parser_class_name): Robustify.
3425 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3428 * semantics.c (finish_id_expression): Do not return an
3429 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3431 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3434 * pt.c (build_non_dependent_expr): Do not build
3435 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3438 * semantics.c (finish_id_expression): Do not return an
3439 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3442 * parser.c (cp_parser_simple_declaration): When skipping to the
3443 end of the statement swallow the terminating semicolon.
3445 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3448 * init.c (build_offset_ref): Improve error recovery for invalid
3449 uses of non-static member functions.
3452 * cp-tree.h (cp_build_type_attribute_variant): New function.
3453 * class.c (build_clone): Use cp_build_type_attribute_variant.
3454 * decl.c (duplicate_decls): Likewise.
3455 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3456 (tsubst_function_type): Likewise.
3457 * tree.c (build_exception_variant): Check attributes before
3458 concluding that two types are the same.
3459 (cp_build_type-attribute_variant): New method.
3460 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3463 * call.c (convert_class_to_reference): Keep better track of
3464 pedantically invalid user-defined conversions.
3466 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3469 * pt.c (tsubst_qualified_id): Improved error message when a type
3470 is expected but not found.
3472 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3474 * class.c: Fix comment typos.
3476 * error.c: Likewise.
3477 * parser.c: Likewise.
3479 * search.c: Likewise.
3480 * typeck.c: Likewise.
3482 2004-01-30 Richard Henderson <rth@redhat.com>
3485 * method.c (use_thunk): Don't force_target_expr for void thunks.
3486 * tree.c (build_target_expr_with_type): Assert non-void type.
3487 (force_target_expr): Likewise.
3489 2004-01-30 Michael Matz <matz@suse.de>
3491 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3493 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3497 * decl.c (grokdeclarator): Check immediatly type completeness for
3498 non-dependent types.
3500 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3503 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3504 a sizeof expression.block
3506 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3509 * mangle.c (write_encoding): Correct encoding of member template
3512 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3514 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3515 template name as it was `<::' (digraph typo).
3516 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3517 (cp_parser_id_expression): Use it.
3518 (cp_parser_nested_name_specifier_opt): Likewise.
3519 (cp_parser_template_name): Likewise.
3520 (cp_parser_class_name): Likewise.
3521 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3523 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3526 * typeck.c (merge_types): Do not merge attributes into
3530 * parser.c (cp_parser_direct_declarator): Do not prevent
3531 backtracking inside a parenthesized declarator.
3532 (cp_parser_parameter_declaration): Fix typo in comment.
3534 2004-01-28 Jan Hubicka <jh@suse.cz>
3536 * semantics.c (expand_body) Do emit_associated_thunks before
3539 2004-01-27 Devang Patel <dpatel@apple.com>
3541 * name-lookup.c: Include "debug.h"
3542 (do_namespace_alias): Invoke debug_hooks to emit debug info
3543 for namespace alias.
3544 (do_local_using_decl): Invoke debug_hooks to emit debug info
3546 (do_class_using_decl): Same.
3547 (do_toplevel_using_decl): Same.
3548 (do_using_directive): Same.
3549 (cp_emit_debug_info_for_using): New function.
3550 * Make-lang.in (cp/parser.o): Depend on debug.h
3551 (cp/name-lookup.o): Same.
3553 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3555 * cp-tree.h (language_function, lang_type_header): Use
3557 * name-lookup.h (cp_binding_level): Likewise.
3559 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3562 * semantics.c (finish_for_expr): Check for unresolved overloaded
3565 * class.c (add_method): Just check processing_template_decl to
3566 determine whether or not we are within a template.
3567 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3568 * init.c (decl_constant_value): Check the type of the declaration,
3570 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3571 (push_to_top_level): ... this.
3572 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3573 * pt.c (push_template_decl_real): Reorder condition for speed.
3574 (convert_template_argument): Use dependency-checking functions in
3575 place of uses_template_parms.
3576 (lookup_template_class): Avoid calling uses_template_parms more
3578 (uses_template_parms): Reimplement, using dependency-checking
3580 (instantiate_class_template): Use push_to_top_level, not
3581 maybe_push_to_top_level.
3582 (type_unification_real): Simplify.
3583 (type_dependent_expression_p): Handle OFFSET_REFs and
3585 (any_dependent_template_arguments_p): Handle multiple levels of
3587 * semantics.c (expand_or_defer_fn): Do not check
3588 uses_template_parms for template instantiations.
3589 * typeck.c (comptypes): Avoid calling cp_type_quals.
3591 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3594 * call.c (build_over_call): Do not convert arguments when
3595 processing a template.
3596 * pt.c (build_non_dependent_expr): Do not build a
3597 NON_DEPENDENT_EXPR for arithmetic constants.
3599 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3602 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3603 returns a TYPE_DECL. no further lookup is required.
3604 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3605 is invalid. Rework to give better diagnostics.
3607 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3610 * pt.c (instantiate_class_template): Add an error_mark_node
3612 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3614 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3617 * decl.c (finish_function): Move the call to
3618 finish_fname_decls below the call to
3619 finish_eh_spec_block.
3621 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3623 * optimize.c, typeck2.c: Update copyright.
3625 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3627 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3628 init.c, mangle.c, typeck.c: Update copyright.
3630 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3632 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3634 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3636 * Make-lang.in: Replace $(docdir) with doc.
3637 (c++.info, c++.srcinfo): Dummy entry.
3638 (c++.man, c++.srcman): New rules.
3639 (c++.install-man): Revamp rule.
3641 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3643 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3644 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3645 immediate $(shell) instead of deferred backquote.
3647 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3650 * parser.c (cp_parser_postfix_expression): When encountering
3651 incomplete type on left-hand side of "->" or ".", treat the entire
3652 expression as erroneous.
3655 * call.c (build_field_call): Remove.
3656 (n_build_method_call): Likewise.
3657 (build_method_call): Likewise.
3658 (build_new_method_call): Do not call build_field_call.
3659 * class.c (n_build_method_call): Remove.
3660 (print_class_statistics): Do not print it.
3661 * cp-tree.h (build_method_call): Remove declaration.
3662 (finish_object_call_expr): Likewise.
3663 (build_new_1): Do not use build_method_call.
3664 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3665 when the function appearing on the right-hand-side of "." or "->"
3666 is not actually a function.
3667 * pt.c (tsubst_copy_and_build): Likewise.
3668 * semantics.c (finish_object_call_expr): Remove.
3670 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3673 * pt.c (tsubst): Use finish_typeof.
3675 2004-01-18 Jason Merrill <jason@redhat.com>
3678 * except.c (build_throw): In a template, set
3679 current_function_returns_abnormally.
3681 2004-01-17 Fred Fish <fnf@intrinsity.com>
3684 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3685 except don't call array_type_nelts() with a VECTOR_TYPE.
3687 2004-01-16 Jan Hubicka <jh@suse.cz>
3689 * mangle.c (write_mangled_name): Remove inline modifier.
3691 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3694 * decl.c (compute_array_index_type): Fix grammar in comment.
3695 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3698 * call.c (name_as_c_string): Print conversion operator names
3702 * call.c (initialize_reference): Pass -1 for inner parameter to
3705 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3708 * parser.c (cp_parser_base_specifier): Check for an invalid
3709 keyword `typename' and emit an user-friendly error message.
3711 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3714 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3715 (handle_pragma_implementation): Likewise.
3717 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3720 * typeck.c (build_class_member_access_expr): Allow to access members
3721 of the currently open class.
3722 (finish_class_member_access_expr): Likewise.
3724 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3727 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3728 name by value, instead of computing them.
3729 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3730 arguments. Pass them to validate_nonmember_using_decl.
3731 * name-lookup.h (do_local_using_decl): Adjust.
3732 (do_toplevel_using_decl): Likewise.
3733 * parser.c (cp_parser_using_declaration): Likewise.
3734 * pt.c (tsubst_expr): Likewise.
3736 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3740 * name-lookup.c (qualified_lookup_using_namespace): Search
3741 strongly-associated namespaces first, and only then try other
3744 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3746 * Make-lang.in (c++.srcextra): Dummy entry.
3748 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3751 * parser.c (cp_parser_template_name): Don't try to parse a
3752 conversion-function-id, as it cannot be a template-name.
3753 (cp_parser_simple_type_specifier): Check for invalid template-ids
3754 even after a built-in type.
3756 2004-01-14 Jan Hubicka <jh@suse.cz>
3759 * pt.c (instantiate_decl): Do not increase function_depth.
3761 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3765 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3766 attributes and discard.
3767 * decl.c (xref_tag): Don't overwite existing attributes with
3770 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3773 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3774 is no destructor while looking up a BIT_NOT_EXPR.
3776 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3778 * cxxfilt.c: Remove unused file.
3780 2004-01-14 Jan Hubicka <jh@suse.cz>
3782 Partial fix to PR c++/12850
3783 * decl2.c (mark_used): Do not proactively instantiate templates
3784 when compiling in unit-at-a-time or not optimizing.
3785 * optimize.c (maybe_clone_body): Do not increase function depth.
3787 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3790 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3792 2004-01-12 Steven Bosscher <stevenb@suse.de>
3795 * parser.c (cp_parser_member_declaration): Any non-type is also
3796 not a class or a function.
3798 2004-01-12 Jason Merrill <jason@redhat.com>
3801 * class.c (build_base_path): Do not mark vtable references as
3803 (build_vtbl_ref_1): Likewise.
3805 2004-01-12 Richard Henderson <rth@redhat.com>
3808 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3809 (store_init_value): Use it.
3810 * decl.c (check_initializer): Expect full initialization code
3811 from store_init_value.
3812 * init.c (expand_aggr_init_1): Likewise.
3813 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3815 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3817 * class.c (layout_class_type): For non-POD class types, also copy
3818 the DECL_SIZE and DECL_MODE of fields to the base class type.
3820 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3823 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3824 calling regenerate_decl_from_template.
3826 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3829 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3830 decl-specifier occurring along with a class definition.
3832 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3834 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3835 clauses to comments describing declares_class_or_enum.
3836 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3839 2004-01-12 Jan Hubicka <jh@suse.cz>
3841 * pt.c (for_each_template_parm): Do not check for duplicates.
3842 (for_each_template_parm): Use walk_tree duplicate checking code.
3844 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3847 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3848 is error_mark_node, don't add any more decl_specs.
3849 (cp_parser_init_declarator): After committing to a declaration, if
3850 the decl_specifiers start with error_mark_node, issue an error and
3851 change the type to "int".
3853 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3856 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3858 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3862 * pt.c (tsubst): Substitution must fail if we are attempting to
3863 create an array with element type that is an abstract class type.
3864 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3865 before calling abstract_virtuals_error.
3867 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3869 * name-lookup.c (qualified_lookup_using_namespace): Consider
3870 strong using directives even if we've already found a binding.
3872 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3874 * cp-tree.h (cxx_expand_expr): Change prototype.
3875 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3877 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3880 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3881 looking into them recursively. They can be there because of the
3882 new __offsetof__ extension.
3884 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3886 * parser.c (cp_parser_save_member_function_body): Mark the
3889 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3892 * class.c (build_clone): Copy type attributes from the original
3893 function to the clone.
3896 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3897 references as constant.
3900 * parser.c (cp_parser_explicit_instantiation): Improve error
3902 (cp_parser_require): Improve indication of the error location.
3905 * parser.c (cp_parser_class_head): Reorder logic to check for
3906 invalid qualification.
3908 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3911 * name-lookup.c (lookup_using_namespace): Remove spacesp
3913 (unqualified_namespace_lookup): Likewise.
3914 (lookup_qualified_name): Adjust accordingly.
3915 (lookup_name_real): Likewise.
3916 (lookup_arg_dependent): Do not eliminate the namespace of the
3917 functions found by unqualified name lookup unless that is the
3920 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3922 * semantics.c (push_deferring_access_checks): Fix format.
3923 (resume_deferring_access_checks): Likewise.
3924 (stop_deferring_access_checks): Likewise.
3925 (pop_deferring_access_checks): Likewise.
3926 (get_deferred_access_checks): Likewise.
3927 (pop_to_parent_deferring_access_checks): Likewise.
3928 (perform_deferred_access_checks): Likewise.
3929 (perform_or_defer_access_check): Likewise.
3931 2004-01-04 Richard Henderson <rth@redhat.com>
3933 * call.c (build_over_call): Don't create a save_expr of an
3934 aggregate, but rather its address.
3936 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3939 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3940 an offsetof expression.
3942 * parser.c (cp_parser_parameter_declaration): Fix comment.
3945 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3946 (reference_binding): Set it when appropriate.
3947 (build_temp): New function, split out from ...
3948 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3949 (initialize_reference): Likewise.
3952 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3953 (cp_parser_new): Initialize it.
3954 (cp_parser_postfix_expression): Set it.
3955 (cp_parser_sizeof_operand): Likewise.
3956 (cp_parser_parameteR_declaration): Do not commit early to tenative
3957 parsers when in_type_id_in_expr_p is set.
3959 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3962 * parser.c (cp_parser_template_argument): Don't call
3963 make_unbound_class_template directly.
3964 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3965 UNBOUND_CLASS_TEMPLATE tree node.
3967 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3970 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3972 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3975 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3976 (DECL_FUNCTION_TEMPLATE_P): Use it.
3977 (DECL_CLASS_TEMPLATE_P): Likewise.
3978 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3979 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3980 (cp_parser_template_name): Likewise.
3981 (cp_parser_elaborated_type_specifier): Likewise.
3982 (cp_parser_namespace_name): Likewise.
3983 (cp_parser_class_name): Likewise.
3984 (cp_parser_lookup_name_simple): Likewise.
3986 See ChangeLog.3 for earlier changes.