1 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3 * class.c (build_vtbl_initializer): Use build_int_cst for
5 * decl.c (complete_array_type): Likewise.
6 * method.c (finish_thunk): Likewise.
8 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
10 * tree.c: Remove unused mark_local_for_remap_r.
12 2004-08-19 Eric Christopher <echristo@redhat.com>
14 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
15 * tree.c (cxx_unsave_expr_now): Delete.
18 2004-08-19 Mark Mitchell <mark@codesourcery.com>
21 * pt.c (push_template_decl_real): Disallow template allocation
22 functions with fewer than two parameters.
24 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
26 * cp-tree.h (build_shared_int_cst): Remove.
27 * tree.c (shared_int_cache): Remove.
28 (build_shared_int_cst): Remove.
29 * class.c (finish_struct_1): Use build_int_cst.
31 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
33 * decl.c (finish_enum): Do not copy value node early, copy
35 * lex.c (cxx_init): Force null_node to be unique.
37 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
40 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
41 from input for MODOP_EXPR.
43 2004-08-18 Mark Mitchell <mark@codesourcery.com>
45 * pt.c (dependent_template_p): Fix typo in commment.
48 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
51 2004-08-17 Mark Mitchell <mark@codesourcery.com>
54 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
55 arguments have the same type as the corresponding parameter.
58 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
59 is set use it for diagnostic purposes.
60 (cp_parser_pseudo_destructor_name): Remove special-case error
64 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
67 * cp-tree.h (qualified_name_lookup_error): Add parameter.
68 * name-lookup.c (do_class_using_decl): Restrict set of entities
69 passed to cp_emit_debug_info_for_using more carefully.
70 (lookup_qualified_name): Allow lookup_member to return sets of
72 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
73 (cp_parser_primary_expression): Handle ambiguous lookups.
74 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
75 (cp_parser_template_argument): Likewise.
76 (cp_parser_elaborate_type_specifier): Likewise.
77 (cp_parser_namespace_name): Likewise.
78 (cp_parser_class_name): Likewise.
79 (cp_parser_lookup_name_simple): Likewise.
80 * pt.c (tsubst_qualified_id): Handle ambiguous results.
81 (tsubst_expr): Likewise.
82 * semantics.c (qualified_name_lookup_error): Add decl paramter.
83 For ambiguous lookups, print candidates.
85 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
88 * pt.c (instantiate_pending_templates): Add int parameter. Don't
90 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
91 * decl2.c (finish_file): Adjust call to
92 instantiate_pending_templates.
94 2004-08-15 Roger Sayle <roger@eyesopen.com>
96 * call.c (build_vfield_ref, build_call, build_conditional_expr,
97 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
98 build_java_interface_fn_ref, build_special_member_call,
99 build_new_method_call, initialize_reference): Replace calls to
100 build with calls to buildN.
101 * class.c (build_base_path, convert_to_base_statically,
102 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
103 build_vtbl_initializer): Likewise.
104 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
105 gimplify_if_stmt, cp_genericize_r): Likewise.
106 * cvt.c (convert_to_void): Likewise.
107 * decl.c (check_initializer, finish_constructor_body,
108 finish_destructor_body): Likewise.
109 * error.c (dump_expr): Likewise.
110 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
112 * init.c (perform_member_init, expand_virtual_init,
113 expand_cleanup_for_base, build_init, expand_default_init,
114 build_offset_ref, decl_constant_value, build_new, build_new_1,
115 build_vec_delete_1, build_vec_init, build_delete,
116 push_base_cleanups, build_vec_delete): Likewise.
117 * mangle.c (write_integer_cst): Likewise.
118 * method.c (thunk_adjust, do_build_copy_constructor,
119 do_build_assign_ref): Likewise.
120 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
121 unify, build_non_dependent_expr): Likewise.
122 * rtti.c (build_headof, build_typeid, ifnonnull,
123 build_dyanmic_cast_1, tinfo_base_init): Likewise.
124 * semantics.c (begin_compound_stmt, finish_call_expr,
125 finish_pseudo_destructor_expr, finish_id_expression,
126 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
127 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
128 array_type_nelts_total, stabilize_call): Likewise.
129 * typeck.c (decay_conversion, build_class_member_access_expr,
130 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
131 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
132 build_x_unary_op, build_unary_op, unary_complex_lvalue,
133 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
134 check_return_expr): Likewise.
135 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
136 split_nonconstant_init, store_init_value, build_m_component_ref):
139 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
141 * call.c (convert_class_to_reference,
142 build_user_type_conversion_1, convert_like_real,
143 build_java_interface_fn_ref, build_special_member_call): Use
145 * class.c (build_vtbl_initializer): Likewise.
146 * cp-gimplify.c (cp_gimplify_expr): Likewise.
147 * cvt.c (cp_convert_to_pointer): Likewise.
148 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
149 * decl2.c (start_static_initialization_or_destruction,
150 generate_ctor_or_dtor_function): Likewise.
151 * except.c (build_throw): Likewise.
152 * lex.c (cxx_init): Likewise.
153 * mangle.c (write_integer_cst): Likewise.
154 * rtti.c (build_headof, get_tinfo_decl_dynamic,
155 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
156 get_pseudo_ti_init): Likewise.
157 * search.c (get_dynamic_cast_base_type): Likewise.
158 * tree.c (build_shared_int_cst): Likewise.
160 2004-08-12 Mark Mitchell <mark@codesourcery.com>
163 * class.c (count_depth_data): New type.
164 (dfs_depth_post): New function.
165 (dfs_depth_q): Likewise.
166 (find_final_overrider_data_s): Change type of vpath.
168 (dfs_find_final_overrider_1): New function.
169 (dfs_find_final_overrider): Use it.
170 (dfs_find_final_overrider_q): Adjust use of vpath.
171 (dfs_find_final_overrider_post): Likewise.
172 (find_final_overrider): Use dfs_depth. Allocate and deallocate
175 2004-08-12 Jan Beulich <jbeulich@novell.com>
177 * parser.c (cp_parser_asm_definition): Properly consume scope operator
178 tokens preceding the clobbers. Don't check for scope operator
179 following inputs. Simplify inputs handling to match that now used for
182 2004-08-11 Mark Mitchell <mark@codesourcery.com>
185 * except.c (build_throw): Allocate cleanup_type and the function
186 for __cxa_throw separately.
189 * call.c (standard_conversion): Do not accept conversions between
190 pointers to members if the class types are unrelated.
193 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
194 char &" instead of just "char &".
197 * pt.c (tsubst): Just return the unknown_type_node.
199 2004-08-11 Mark Mitchell <mark@codesourcery.com>
202 * parser.c (cp_parser_class_specifier): Robustify.
205 * pt.c (tsubst_copy_and_build): Complain about invalid
209 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
210 current_class_ref while tsubsting.
212 2004-08-10 Mark Mitchell <mark@codesourcery.com>
215 * parser.c (cp_parser_init_declarator): Robustify.
217 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
219 * typeck2.c (process_init_constructor): Guard the missing field warning
220 with warn_missing_field_initializers rather than extra_warnings.
222 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
224 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
226 2004-08-05 Mark Mitchell <mark@codesourcery.com>
228 * decl.c (start_preparsed_function): Move determine_visibility
230 * decl2.c (determine_visibility): Incorporate dllexport testing.
232 2004-08-05 Geoffrey Keating <geoffk@apple.com>
234 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
235 means that libstdc++ is needed.
237 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
239 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
241 2004-08-04 Geoffrey Keating <geoffk@apple.com>
243 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
244 than passing it as a parameter to rest_of_decl_compilation.
245 * decl2.c (grokfield): Use set_user_assembler_name.
247 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
249 * decl.c (complete_array_type): Don't gratuitously copy
250 maxindex. Its type is always set.
252 2004-08-04 Paul Brook <paul@codesourcery.com>
254 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
255 * cp-tree.h (struct language_function): Rename x_dtor_label to
257 (dtor_label): Rename ...
258 (cdtor_label): ... to this.
259 * decl.c (begin_constructor_body): Remove.
260 (check_special_function_return_type): Maybe change the return type.
261 (grokdeclarator): Pass the class type.
262 (start_preparsed_function): Constructors may need a return label.
263 (finish_constructor_body, finish_destructor_body): Set the return
265 (begin_function_body): Don't call begin_constructor_body.
266 (finish_function): Don't warn for constructors or destructors.
267 (implicitly_declare_fn): Maybe change the return type.
268 * optimize.c: Include target.h.
269 (maybe_clone_body): Remap the function result.
270 * semantics.c: Include target.h.
271 (finish_return_stmt): Maybe jump to return label for constructors.
273 2004-08-03 Mark Mitchell <mark@codesourcery.com>
275 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
276 (check_field_decls): Or here.
277 (check_methods): Or here.
278 (initialize_array): Don't mess with DECL_CONTEXT.
279 * cp-tree.h (start_decl): Adjust prototype.
280 (determine_visibility): New function.
281 * decl.c (duplicate_decls): Remove checks for hidden "operator
283 (build_library_fn_1): Give all library functions default
285 (start_decl): Add pop_scope_p parameter. Tidy.
286 (cp_finish_decl): Do not pop scopes here. Call
287 determine_visibility for variable definitions.
288 (start_preparsed_function): Call determine_visibility.
289 * decl2.c (determine_visibility): New function.
290 * method.c (use_thunk): Fix formatting.
291 * parser.c (cp_parser_condition): Adjust calls to start_decl.
292 (cp_parser_init_declarator): Likewise.
293 * pt.c (instantiate_decl): Always call pop_nested_class.
294 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
295 (tinfo_base_init): Likewise.
297 2004-08-02 Mark Mitchell <mark@codesourcery.com>
300 * name-lookup.c (validate_nonmember_using_decl): Robustify.
302 2004-08-01 Mark Mitchell <mark@codesourcery.com>
305 * name-lookup.c (decl_namespace): Remove.
306 (current_decl_namespace): Use decl_namespace_context instead of
308 (push_decl_namespace): Likewise.
309 (arg_assoc_class): Likewise.
310 (arg_assoc_type): Likewise.
311 * pt.c (check_specialization_namespace): New function.
312 (maybe_process_partial_specialization): Use it.
313 (register_specialization): Likewise.
316 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
317 * call.c (null_ptr_cst_p): Handle variables with constant
319 * pt.c (convert_nontype_argument): Use
320 DECL_INTEGRAL_CONSTANT_VAR_P.
321 * semantics.c (finish_id_expression): Likewise.
324 * decl.c (duplicate_decls): Reject duplicate namespace
328 * typeck.c (build_ptrmemfunc): Loosen assertion.
330 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
332 * call.c (z_candidate::template_decl): Rename from template.
333 (add_template_candidate_real): Adjust member reference.
336 2004-07-29 Mark Mitchell <mark@codesourcery.com>
338 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
339 (lang_decl_flags): Narrow the width of "languages". Add
341 (DECL_NEEDED_P): Remove.
342 (FOR_EACH_CLONE): New macro.
343 (DECL_REPO_AVAILABLE_P): Likewise.
344 (DECL_TINFO_P): Likewise.
345 (set_linkage_according_to_type): Declare.
346 (import_export_vtable): Remove.
347 (import_export_tinfo): Likewise.
348 (mark_needed): New function.
349 (decl_needed_p): Likewise.
350 (note_vauge_linkage_fn): Likewise.
351 (init_repo): Change prototype.
352 (repo_template_used): Remove.
353 (repo_template_instantiated): Likewise.
354 (repo_emit_p): New function.
355 (repo_export_class_p): Likewise.
356 (no_linkage_check): Change prototype.
357 * class.c (set_linkage_according_to_type): New function.
358 (build_vtable): Use it. Do not call import_export_vtable. Set
359 DECL_IGNORED_P if appropriate.
360 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
361 (make_rtL_for_nonlocal_decls): Check for template instantiations
363 (grokfndecl): Adjust call to no_linkage_check.
364 (set_linkage_for_static_data_member): New function.
365 (grokvardecl): Use it. Adjust call to no_linkage_check.
366 (grokdeclarator): Use set_linkage_for_static_data_member.
367 * decl2.c (note_vague_linkage_fn): New function.
368 (note_vague_linkage_var): Likewise.
369 (finish_static_data_member_decl): Use it.
370 (import_export_vtable): Remove.
371 (import_export_class): Use repo_export_class_p.
372 (var_finalized_p): Simplify.
373 (maybe_emit_vtables): Simplify.
374 (mark_needed): New function.
375 (decl_needed_p): Likewise.
376 (import_export_decl): Add documentation and consistency checks.
377 Use repo_emit_p. Handle virtual tables and RTTI information
379 (import_export_tinfo): Remove.
380 (write_out_vars): Call import_export_decl.
381 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
383 (finish_file): Use decl_needed_p. Do not call import_export_decl
384 for undefined static data members. Do not warn about undefined
385 inlines when using a repository.
386 (mark_used): Use note_vague_linkage_fn. Always defer template
388 * lex.c (cxx_init): Adjust call to init_repo. Always set
390 * method.c (synthesize_method): Remove unncessary
391 import_export_decl call.
392 (implicitly_declare_fn): Use set_linkage_according_to_type.
393 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
394 * pt.c (instantiate_class_template): Don't redundantly add classes
395 to keyed_classes. Don't call repo_template_used.
396 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
397 templates with internal linkage.
398 (check_instantiated_args): Adjust call to no_linkage_check.
399 (instantiate_template): Use FOR_EACH_CLONE.
400 (mark_definable): New function.
401 (mark_decl_instantiated): Use it.
402 (do_decl_instantiation): Adjust tests for explicit instantiation
403 after "extern template".
404 (instantiate_class_member): Do not use repo_template_instantiated.
405 (do_type_instantiation): Simplify.
406 (instantiate_decl): Use mark_definable. Check repo_emit_p.
408 * repo.c (repo_get_id): Remove.
409 (original_repo): Remove.
410 (IDENTIFIER_REPO_USED): Remove.
411 (IDENTIFIER_REPO_CHOSEN): Remove.
412 Remove all #if 0'd code.
413 (repo_template_used): Remove.
414 (repo_template_instantiated): Remove.
415 (temporary_obstack_initialized_p): New variable.
416 (init_repo): Register with lang_post_pch_load. Avoid creating
417 identifiers unnecessarily. Don't use original_repo. Close the
419 (reopen_repo_file_for_write): Not here.
420 (finish_repo): Always write out a new repository file.
421 (repo_emit_p): New function.
422 (repo_export_class_p): Likewise.
423 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
424 (involves_incomplete_p): New function.
425 (tinfo_base_init): Use it.
426 (ptr_initializer): Remove non_public_ptr parameter.
427 (ptm_initializer): Likewise.
428 (get_pseudo_ti_init): Likewise.
429 (unemitted_tinfo_decl_p): Remove.
430 (emit_tinfo_decl): Use import_export_decl.
431 * semantics.c (expand_body): Move updates of static_ctors and
433 (expand_or_defer_fn): ... here.
434 * tree.c (no_linkage_check): Add relaxed_p parameter.
436 2004-07-28 Eric Christopher <echristo@redhat.com>
438 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
440 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
442 * cp-tree.h (struct tree_pair_s): New.
443 (typedef tree_pair_p): New.
444 (DEF_VEC_O(tree_pair_s)): New.
445 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
446 (CLASSTYPE_VCALL_INDICES): Update documentation.
447 * class.c (get_vcall_index): Adjust.
448 (add_vcall_offset): Adjust.
450 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
452 * pt.c, typeck.c: Remove spurious carriage returns.
454 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
457 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
458 when the type of ARG is not dependent.
460 2004-07-26 Geoffrey Keating <geoffk@apple.com>
462 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
463 (lang_specific_driver): If the C++ or math library options don't
464 start with '-l', don't count them as added libraries.
466 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
468 * decl.c (xref_basetypes): Adjust base access vector creation.
469 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
471 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
473 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
474 Brian Ryner <bryner@brianryner.com>
478 * class.c (check_field_decls): Apply hidden visibility if
479 -fvisibility-inlines-hidden and inlined unless otherwise specified
480 (build_vtable): Set vtable visibility to class visibility.
481 (check_field_decls): Default static member visibility to class
483 (check_methods): Default method visibility to class visibility.
484 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
485 CLASSTYPE_VISIBILITY_SPECIFIED macro.
486 * decl.c (duplicate_decls): New logic for merging definition decls
487 with declaration decls. Added ignore & warning when non default
488 applied to global operator new or delete.
489 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
490 wherever VISIBILITY was changed
491 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
493 (tinfo_base_init): Set typeinfo name visibility to class visibility.
495 2004-07-25 Bernardo Innocenti <bernie@develer.com>
497 * decl.c: Rename all identifiers named `class' to `cl'.
498 * cp-tree.h: Likewise.
500 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
502 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
503 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
504 * name-lookup.c (binding_entry_make): Use GGC_NEW.
505 (binding_table_construct): Use GGC_CNEWVEC.
506 (binding_table_new): Use GGC_NEW.
507 (cxx_binding_make): Likewise.
508 (begin_scope): Likewise.
509 (push_to_top_level): Use GCC_CNEW.
510 * parser.c (cp_token_cache_new): Likewise.
511 (cp_token_cache_push_token): Likewise.
512 (cp_lexer_new_main): Likewise.
513 (cp_lexer_new_from_tokens): Likewise.
514 (cp_parser_context_new): Likewise.
515 (cp_parser_new): Likewise.
516 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
517 * lex.c (cxx_make_type): Use GGC_CNEW.
518 (retrofit_lang_decl): Use GGC_NEWVAR.
519 (cxx_dup_lang_specific_decl): Likewise.
520 (copy_lang_type): Likewise.
521 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
522 (save_function_data): Likewise.
523 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
524 (cxx_push_function_context): Likewise.
526 2004-07-25 Richard Henderson <rth@redhat.com>
528 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
529 DECL_IGNORED_P on RESULT_DECL.
530 * semantics.c (finalize_nrv): Copy them too.
532 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
534 * search.c (lookup_conversion_operator): Avoid two loops.
535 (add_conversions): Remove.
536 (check_hidden_convs, split_conversions,
537 lookup_conversions_r): New.
538 (lookup_conversions): Use lookup_conversions_r.
540 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
542 * pt.c (get_template_base): Check type is completable.
544 2004-07-21 Eric Christopher <echristo@redhat.com>
546 * decl.c (poplevel): Inline unused variable checking.
549 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
551 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
554 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
557 * pt.c (check_explicit_specialization): Remove extension to accept
558 specializations without template headers. Fall-through to normal
561 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
564 * pt.c (determine_specialization): New parameter template_count.
565 Disambiguate between member templates and member functions counting
566 the template headers.
567 (check_explicit_specialization): Update caller.
568 (tsubst_friend_function): Likewise.
570 2004-07-20 Steven Bosscher <stevenb@suse.de>
572 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
573 * cp-tree.h (tinst_level_t): New tree type.
574 (union lang_tree_node): Handle it.
575 (TINST_LOCATION): New accessor macro.
576 (make_tinst_level): New prototype.
577 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
578 * decl.c (cp_tree_node_structure): Likewise.
579 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
580 (print_instantiation_partial_context): Likewise.
581 * pt.c (pop_tinst_level): Likewise.
582 (push_tinst_level): Use make_tinst_level.
583 * tree.c (make_tinst_level): New function.
584 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
586 2004-07-20 Mark Mitchell <mark@codesourcery.com>
588 * parser.c (cp_parser_simple_type_specifier): Fix typo.
591 * parser.c (cp_parser_simple_type_specifier): Do not record usage
592 of globally-qualified names.
594 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
597 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
600 2004-07-19 Mark Mitchell <mark@codesourcery.com>
603 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
604 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
605 * class.c (add_implicitly_declared_members): Use
606 CLASSTYPE_LAZY_ASSIGNMENT_OP.
607 * method.c (lazily_declare_fn): Clear
608 CLASSTYPE_LAZY_ASSIGNMENT_OP.
609 * search.c (lookup_fnfields_1): Check it.
611 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
613 * cp-tree.h (vec_binfo_member): Remove.
614 * tree.c (vec_binfo_member): Remove.
616 * cp-tree.h (struct lang_type_class): Remove vfields field.
617 (CLASSTYPE_VFIELDS): Remove.
618 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
619 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
621 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
622 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
623 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
625 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
627 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
628 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
630 (BINFO_LANG_SLOTS): Remove.
631 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
632 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
633 * class.c (check_bases): Adjust BINFO accessors.
634 (determine_primary_base, finish_struct_bits,
635 maybe_warn_about_overly_private_class, warn_hidden,
636 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
637 warn_about_ambiguous_bases, get_vfield_name,
638 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
639 add_vcall_offset_vtbl_entries_r): Likewise.
640 * dump.c (cp_dump_tree): Likewise.
641 * init.c (sort_mem_initializers, expand_member_init, build_delete,
642 push_base_cleanups): Likewise.
643 * method.c (do_build_copy_constructor, do_build_assign_ref,
644 synthesize_exception_spec): Likewise.
645 name-lookup.c (arg_assoc_class): Likewise.
646 * pt.c (instantiate_class_template,
647 get_template_base_recursive): Likewise.
648 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
649 * typeck2.c (process_init_constructor): Likewise.
650 * search.c (lookup_base_r, dynamic_cast_base_recurse,
651 dfs_access_in_type, dfs_walk_real, look_for_overrides,
652 types_overlap_p, copied_binfo, original_binfo): Likewise.
653 (binfo_for_vtable): Remove
655 2004-07-20 Steven Bosscher <stevenb@suse.de>
657 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
658 thunk_alias, and the access and virtual_offset fields.
659 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
660 * decl.c (finish_case_label): Update c_add_case_node call.
662 2004-07-19 Mark Mitchell <mark@codesourcery.com>
664 Revert patch for PR c++/16623.
666 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
668 * except.c: Remove two spurious carriage returns.
670 2004-07-19 Mark Mitchell <mark@codesourcery.com>
673 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
674 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
675 * class.c (add_implicitly_declared_members): Use
676 CLASSTYPE_LAZY_ASSIGNMENT_OP.
677 * method.c (lazily_declare_fn): Clear
678 CLASSTYPE_LAZY_ASSIGNMENT_OP.
679 * search.c (lookup_fnfields_1): Check it.
681 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
683 * class.c (add_method): Delay adding the slot until the end.
684 (determine_primary_base): Adjust VEC_iterate invokation.
685 (resort_type_method_vec, finish_struct_methods, warn_hidden,
686 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
687 build_vtbl_initializer): Likewise.
688 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
689 build_vbase_delete): Likewise.
690 * method.c (do_build_copy_constructor): Likewise.
691 * name-lookup.c (new_class_binding, print_binding_level,
692 poplevel_class, store_class_bindings, push_to_top_level,
693 pop_from_top_level): Likewise.
694 * pt.c (check_explicit_specialization): Likewise.
695 * search.c (lookup_conversion_operator, lookup_fnfields_1,
696 get_pure_virtuals, add_conversions, dfs_check_overlap,
697 binfo_for_vbase): Likewise.
699 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
702 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
703 innermost set of template arguments during deduction. Simplify.
705 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
707 * typeck.c (build_modify_expr, build_x_modify_expr): Set
708 TREE_NO_WARNING on assignments with an operator other than '='.
710 2004-07-10 Steven Bosscher <stevenb@suse.de>
711 Joseph S. Myers <jsm@polyomino.org.uk>
713 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
714 * decl2.c (grokfield): Don't check current_class_depth via
715 unused TREE_COMPLEXITY.
716 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
717 to avoid the missing parentheses warning.
718 Don't set C_SET_EXP_ORIGINAL_CODE.
720 2004-07-18 Mark Mitchell <mark@codesourcery.com>
722 * tree.c (no_linkage_helper): Remove.
723 (no_linkage_check): Don't use walk_tree_without_duplicates.
725 * mangle.c (write_expression): Issue a sorry for zero-operand
728 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
731 * init.c (build_offset_ref): Build SCOPE_REF with non-null
732 TREE_TYPE for non-dependent names.
733 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
734 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
735 unknown_type_node as its TREE_TYPE.
736 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
737 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
738 (dump_expr) <SCOPE_REF case>: Likewise.
740 2004-07-17 Jason Merrill <jason@redhat.com>
743 * call.c (type_passed_as): Make the invisible reference type
745 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
746 cp_genericize_r. Handle invisible reference lowering.
747 (is_invisiref_parm): New fn.
748 (cp_genericize): Adjust the types of invisible reference parms.
749 Don't repeat the walk for clones.
750 * decl.c (store_parm_decls): Don't generate any code for clones.
752 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
754 * cp-tree.h (builtin_function): Declare.
756 2004-07-16 Mark Mitchell <mark@codesourcery.com>
758 * class.c (finish_struct_methods): Remove unncessary code.
759 (add_implicitly_declared_members): Create declarations for default
760 constructors and copy constructors lazily.
761 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
763 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
764 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
765 * decl2.c (check_classfn): Robustify.
766 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
767 (locate_ctor): Handle lazy default constructors.
768 (locate_copy): Handle lazy copy constructors.
769 (implicitly_declare_fn): Make sure we're looking at the
770 TYPE_MAIN_VARIANT for a class before creating functions. Don't
771 set TYPE_HAS_CONSTRUCTOR.
772 (lazily_declare_fn): New function.
773 * name-lookup.c (constructor_name_full): Simplify.
774 * search.c (lookup_fnfields_1): Lazily create methods, as
776 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
778 2004-07-16 Steven Bosscher <stevenb@suse.de>
780 * cp-tree.h (struct lang_type): Don't have three GTY options on a
783 2004-07-16 Richard Henderson <rth@redhat.com>
785 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
786 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
787 * tree.c (cp_copy_res_decl_for_inlining): Remove.
789 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
791 * class.c (finish_struct_bits): Use for loop.
792 (propagate_binfo_offsets): Do primary binfo outside of loop.
795 * dump.c (cp_dump_tree): Don't dump the bases if there's no
798 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
800 2004-07-15 Mark Mitchell <mark@codesourcery.com>
802 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
803 has_abstract_assign_ref. Make methods a VEC(tree) *.
804 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
805 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
806 (CLASSTYPE_DESTRUCTORS): Likewise.
807 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
808 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
809 (add_method): Change prototoype.
810 * class.c (add_method): Remove error_p parameter. Adjust for
811 changes to CLASSTYPE_METHOD_VEC.
812 (handle_using_decl): Adjust call to add_method.
813 (maybe_warn_about_overly_private_class): Adjust for
814 changes to CLASSTYPE_METHOD_VEC.
815 (resort_type_method_vec): Likewise.
816 (finish_struct_methods): Likewise.
817 (check_for_override): Likewise.
818 (warn_hidden): Likewise.
819 (add_implicitly_declared_members): Defer creation of assignment
820 operators. Adjust call to add_method.
821 (clone_function_decl): Adjust call to add_method.
822 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
823 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
824 * decl.c (grok_special_member_properties): Don't set
825 TYPE_HAS_ABSTRACT_ASSIGN_REF.
826 * decl2.c (check_classfn): Adjust for
827 changes to CLASSTYPE_METHOD_VEC.
828 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
829 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
830 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
831 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
833 * pt.c (check_explicit_specialization): Adjust for
834 changes to CLASSTYPE_METHOD_VEC.
835 (instantiate_class_template): Do not set
836 TYPE_HAS_ABSTRACT_ASSIGN_REF.
837 * ptree.c (cxx_print_type): Don't try to print
838 CLASSTYPE_METHOD_VEC.
839 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
840 * search.c (lookup_field_r): Adjust for
841 changes to CLASSTYPE_METHOD_VEC.
842 (lookup_fnfields): Likewise.
843 (lookup_conversion_operator): Likewise.
844 (lookup_fnfields_1): Likewise. Create assignment operators
846 (look_for_overrides_here): Adjust for
847 changes to CLASSTYPE_METHOD_VEC.
848 (add_conversions): Likewise.
849 * semantics.c (finish_member_declaration): Adjust call to add_method.
851 2004-07-15 Jason Merrill <jason@redhat.com>
853 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
854 references and pointers are compatible.
856 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
858 * decl.c (xref_basetypes): Refactor.
859 * tree.c (copy_base_binfos): Replace with ...
860 (copy_binfo): ... this. Deep copy the given binfo, (not the just
861 bases of the given base).
862 * cp-tree.h (copy_base_binfo): Remove.
863 (copy_binfo): Declare.
865 2004-07-15 Mark Mitchell <mark@codesourcery.com>
867 * name-lookup.c (set_inherited_value_binding_p): Add class_type
869 (get_class_binding): Adjust.
870 (push_class_level_binding): Don't use set_inherited_value_binding_p.
872 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
874 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
875 * decl.c (xref_basetypes): Set it here.
877 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
878 Don't check for incomplete base.
879 (get_vfield_name): Simplify while loop.
880 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
882 2004-07-14 Mark Mitchell <mark@codesourcery.com>
884 * lex.c (cxx_make_type): Remove call to get_pointer_type.
886 * cp-tree.h (IDENTIFIER_VALUE): Remove.
887 (BINFO_PUSHDECLS_MARKED): Likewise.
888 (maybe_inject_for_scope_var): Likewise.
889 (push_class_decls): Likewise.
890 * name-lookup.h (push_class_binding): Remove.
891 (innermost_non_namespace_value): New function.
892 (outer_binding): Likewise.
893 * class.c (add_method): Push bindings before adding to
895 (restore_class_cache): Do not restore class_shadowed.
896 (pushclass): Do not add USING_DECLs. Do not call
898 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
899 * decl.c (pushdecl): Use outer_binding.
900 (poplevel): Set the scope for an out-of-scope for-loop declaration
902 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
903 * name-lookup.c (new_class_binding): New function.
904 (push_binding): Use it.
905 (pushdecl): Use innermost_non_namespace_value.
906 (maybe_inject_for_scope_var): Remove.
907 (push_class_binding): Remove.
908 (set_inherited_value_binding_p): New function.
909 (get_class_binding): New function.
910 (push_class_level_binding): Assert that the current_class_type is
912 (outer_binding): New function.
913 (innermost_non_namespace_value): Likewise.
914 (lookup_name_real): Use outer_binding.
915 (lookup_name_current_level): Ignore out-of-scope variables.
916 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
917 (lookup_template_class): Likewise.
918 * search.c (dfs_push_type_decls): Remove.
919 (dfs_push_decls): Likewise.
920 (setup_class_bindings): Likewise.
921 (lookup_field_1): Handle USING_DECLs from dependent scopes.
922 (marked_pushdecls_p): Remove.
923 (unmarked_pushdecls_p): Remove.
924 (marked_identifiers): Remove.
925 (setup_class_bindings): Remove.
926 (dfs_push_type_decls): Remove.
927 (dfs_push_decls): Remove.
928 (push_class_decls): Remove.
930 2004-07-13 Mark Mitchell <mark@codesourcery.com>
934 * decl.c (grokvardecl): Make declspecs parameter const.
935 (grokdeclarator): Likewise. Adjust accordingly.
936 * decl.h (grokdeclarator): Adjust declaration.
937 * parser.c (cp_parser_init_declarator): Do not clear
938 decl_specifiers->attributes.
940 * cp-tree.h (lang_identifier): Remove class_value.
941 (IDENTIFIER_CLASS_VALUE): Remove.
942 (pop_class_decls): Likewise.
943 (init_search_processing): Likewise.
944 * class.c (handle_using_decl): Use lookup_member, not
945 IDENTIFIER_CLASS_VALUE.
946 (restore_class_cache): New function, split out from ...
947 (pushclass): ... here. Do not call clear_identifier_class_values.
948 (invalidate_class_lookup_cache): Do not clear
949 IDENTIFIER_CLASS_VALUE.
950 (popclass): Do not call pop_class_decls.
951 (maybe_note_name_used_in_class): Do not save names looked up after
952 the class is complete. Use lookup_member, not
953 IDENTIFIER_CLASS_VALUE.
954 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
955 * decl.c (cxx_init_decl_processing): Do not call
956 init_search_processing.
957 * method.c (do_build_copy_constructor): Remove unnecessary code.
958 (do_build_assign_ref): Likewise.
959 * name-lookup.c (pushdecl): Use lookup_member, not
960 IDENTIFIER_CLASS_VALUE.
961 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
963 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
964 (push_class_binding): Do not set it.
965 (clear_identifier_class_values): Remove.
966 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
967 (store_binding): Do not save it.
968 (pop_from_top_level): Do not restore it.
969 * name-lookup.h (cxx_saved_binding): Remove class_value.
970 (clear_identifier_class_values): Remove.
971 * ptree.c (cxx_print_identifier): Do not print
972 IDENTIFIER_CLASS_VALUE.
973 * search.c (search_obstack): Remove.
974 (push_stack_level): Remove.
975 (pop_stack_level): Remove.
976 (search_level): Remove.
977 (search_stack): Remove.
978 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
979 (setup_class_bindings): Use IDENTIFIER_MARKED, not
980 IDENTIFIER_CLASS_VALUE.
981 (marked_identifiers): New variable.
982 (push_class_decls): Clear IDENTIFIER_MARKED.
983 (pop_class_decls): Don't call pop_search_level.
984 (init_search_processing): Remove.
986 2004-07-12 Mark Mitchell <mark@codesourcery.com>
988 * cp-tree.h (get_aggr_typedef): Remove.
989 * init.c (get_aggr_typedef): Likewise.
991 * name-lookup.c (push_class_level_binding): Simplify.
993 2004-07-12 Andrew Pinski <apinski@apple.com>
997 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
999 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1002 2004-07-12 Eric Christopher <echristo@redhat.com>
1004 * parser.c (cp_parser_class_head): Remove unused variable.
1006 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1008 * decl.c (grok_op_properties): Reject [de-]allocation functions
1009 declared in a namespace, or declared as static.
1011 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
1013 * cp-tree.h (make_binfo): Remove.
1014 * decl.c (xref_basetypes): Use make_tree_binfo directly.
1015 * tree.h (copy_base_binfos): Likewise.
1016 (make_binfo): Remove.
1018 * call.c (build_user_type_conversion_1, build_new_op,
1019 check_constructor_callable, build_temp,
1020 perform_direct_initialization_of_possible): Pass type directly to
1021 lookup_fnfields & build_special_member_call.
1022 (build_special_member_call): Accept a type, and complete it.
1023 * class.c (finish_stuct_bits): Copy the BINFOs here.
1024 * cvt.c (ocp_convert): Pass type directly to
1025 build_special_member_call.
1026 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
1027 (xref_basetypes): Allocate the binfo here. Adjust.
1028 * init.c (build_init, build_new_1): Pass type directly to
1029 build_special_member_call.
1030 * lex.c (cxx_make_type): Do not allocate binfo here.
1031 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
1032 * parser.c (cp_parser_class_head): Always call xref_basetypes.
1033 * pt.c (instantiate_class_template): Likewise. Inhibit access
1034 checking for template friends.
1035 * ptree.c (cxx_print_type): Adjust record printing.
1036 * search.c (lookup_base): When taking a type, complete it before
1037 looking for a binfo.
1038 (lookup_member): Delay completing a type.
1039 (push_class_decls): Don't walk an incomplete type.
1040 (lookup_conversions): Likewise.
1041 * semantics.c (finish_stmt_expr_expr): Pass type directly to
1042 build_special_member_call.
1043 * tree.c (copy_base_binfos): Adjust.
1044 (make_binfo): Likewise.
1045 * typeck.c (build_modify_expr): Pass type directly to
1046 build_special_member_call.
1047 * typeck2.c (process_init_constructor): Check a binfo exists.
1048 (build_m_component_ref): Allow accessing an incomplete type.
1049 (build_functional_cast): Pass type directly to
1050 build_special_member_call.
1052 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1055 * config-lang.in (gtfiles): Add typeck2.c.
1056 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
1058 * cp-tree.h: Declare complete_type_check_abstract.
1059 * typeck2.c (pat_calc_hash, pat_compare,
1060 complete_type_check_abstract): New functions.
1061 (abstract_virtuals_error): If the type is abstract, register the
1062 declaration within abstract_pending_vars for further checks.
1063 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
1064 * decl.c (cp_finish_decl): Do not strip array types.
1065 (create_array_type_for_decl): Check for abstractness of the element
1067 (complete_vars): Call complete_type_check_abstract.
1068 * class.c (finish_struct): Prepare a list of virtual functions for
1069 template types, and call complete_vars on it to check for abstractness.
1071 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
1073 PR tree-optimization/14107
1074 * decl.c (finish_function): Remove temporary band-aid.
1076 2004-07-11 Mark Mitchell <mark@codesourcery.com>
1078 * call.c (build_operator_new_call): Avoid using push_to_top_level.
1079 (build_new_op): Adjust call to lookup_function_nonclass.
1080 * name-lookup.c (identifier_type_value): Adjust call to
1082 (lookup_name_real): Add block_p parameter.
1083 (lookup_name_nonclass): Adjust call to lookup_name_real.
1084 (lookup_function_nonclass): Likewise.
1085 (lookup_name): Likewise.
1086 * name-lookup.h (lookup_name_real): Change prototype.
1087 (lookup_name_nonclass): Likewise.
1088 * parser.c (cp_parser_lookup_name): Likewise.
1090 * cp-tree.h (saved_scope): Make old_bindings a vector.
1091 (unuse_fields): Remove.
1092 * name-lookup.h (cxx_saved_binding): Define it.
1093 * class.c (pushclass): Don't use unuse_fields.
1094 * name-lookup.c (cxx_saved_binding_make): Remove.
1095 (store_binding): Add new bindings to a vector, using an
1096 accumulator style, rather than adding them to a list.
1097 (store_bindings): Adjust accordingly.
1098 (store_class_bindings): Likewise.
1099 (push_to_top_level): Likewise.
1100 (pop_from_top_level): Likewise.
1101 * optimize.c (maybe_clone_body): Must push_to_top_level and
1102 pop_from_top_level calls outside of loop.
1103 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
1104 calls here from cp_parser_late_parsing_default_args.
1105 (cp_parser_save_default_args): Record the class type in which the
1106 function is declared.
1107 (cp_parser_late_parsing_default_args): Do not call
1108 push_nested_class/pop_nested_class.
1109 * search.c (dfs_unuse_fields): Remove.
1110 (unuse_fields): Remove.
1112 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1114 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
1115 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
1116 * cp-tree.h (poplevel): Declare.
1117 (set_block): Remove.
1118 * decl.c (set_block): Remove.
1120 2004-07-10 Mike Stump <mrs@apple.com>
1122 * decl2.c (import_export_class): Never export/import vtables
1123 with inline key functions.
1125 2004-07-09 Steven Bosscher <stevenb@suse.de>
1127 * typeck.c (c_expand_asm_operands): Remove.
1129 2004-07-09 Mike Stump <mrs@apple.com>
1131 * typeck.c (build_class_member_access_expr): Skip null deref
1132 warning when we don't dereference it.
1134 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1138 * class.c (check_field_decls): Improve -Weffc++ warning: do not
1139 warn for pointers to functions/members, or for classes without
1142 2004-07-08 Mark Mitchell <mark@codesourcery.com>
1144 * name-lookup.h (struct cp_binding_level): Update documentation
1147 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1150 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
1151 returning CALL_EXPR, and non-reference return type.
1153 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
1155 * name-lookup.c (push_binding): Use VEC_reserve.
1157 2004-07-08 Richard Henderson <rth@redhat.com>
1159 * cp-tree.h (expand_eh_spec_block): Remove.
1161 2004-07-07 Mark Mitchell <mark@codesourcery.com>
1163 * cp-tree.h (saved_scope): Remove x_previous_class_type and
1164 x_previous_class_values; add x_previous_class_level.
1165 (previous_class_type): Remove.
1166 (previous_class_values): Remove.
1167 (previous_class_level): New macro.
1168 * class.c (pushclass): Restore the identifier cache more
1170 (invalidate_class_lookup_cache): Use vector for class_shadowed and
1171 previous_class_values.
1172 * decl.c (poplevel): Likewise.
1173 * name-lookup.c (cxx_binding_init): New function.
1174 (cxx_binding_make): Use it.
1175 (push_binding): For a binding in a class level, use a vector of
1176 cp_class_binding nodes.
1177 (push_binding_level): New function.
1178 (begin_scope): Use it.
1179 (leave_scope): Do not put class binding levels on the free list.
1180 (print_binding_level): Adjust for the fact that class_shadowed is
1182 (poplevel_class): Likewise.
1183 (clear_identifier_class_values): Likewise.
1184 (push_class_level_binding): Likewise.
1185 (set_class_shadows): Remove.
1186 (store_binding): New function.
1187 (store_class_bindings): New function.
1188 (push_to_top_level): Use store_class_bindings as appropriate.
1189 (pop_from_top_level): Use previous_class_level, not
1190 previous_class_type.
1191 * name-lookup.h (cp_class_binding): New type.
1192 (cp_binding_level): Use a vector object for class_shadowed.
1193 (push_binding_level): Declare.
1194 (set_class_shadows): Remove.
1196 2004-07-07 Andrew Pinski <apinski@apple.com>
1198 * class.c (instantiate_type): BUFFER_REF is dead.
1199 * lex.c (init_operators): IN_EXPR is dead.
1201 2004-07-07 Jason Merrill <jason@redhat.com>
1204 * call.c (build_new_op): Give overload warnings for built-in
1207 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
1210 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
1213 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1215 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
1216 * class.c (build_primary_vtable, check_bases,
1217 determine_primary_base, finish_struct_bits,
1218 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
1219 get_basefndecls, warn_hidden, walk_subobject_offsets,
1220 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
1221 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
1222 finish_struct_1, get_vfield_name, contains_empty_class_p,
1223 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
1224 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
1225 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
1227 * decl.c (xref_basetypes): Likewise.
1228 * dump.c (cp_dump_tree): Likewise.
1229 * error.c (dump_expr): Likewise.
1230 * init.c (sort_mem_initializers, expand_member_init,
1231 push_base_cleanups): Likewise.
1232 * method.c (do_build_copy_constructor, do_build_assign_reg,
1233 synthesize_exception_spec): Likewise.
1234 * name-lookup.c (arg_assoc_class): Likewise.
1235 * pt.c (instantiate_class_template, tsubst,
1236 get_template_base_recursive): Likewise.
1237 * ptree.c (cxx_print_type): Likewise.
1238 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
1239 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1240 dfs_access_in_type, access_in_type, lookup_field_queue_p,
1241 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
1242 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
1243 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
1244 binfo_for_vtable, copied_binfo, original_binfo): Likewise
1245 * tree.c (copy_base_binfos, make_binfo): Likewise.
1246 * typeck.c (commmon_base_type): Likewise
1247 * typeck2.c (process_init_constructor): Likewise
1249 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
1251 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
1253 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1256 * pt.c (convert_nontype_argument): Disallow conversions between
1257 different enumeration types.
1259 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1261 * cp-tree.h (BINFO_MARKED): Remove.
1262 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
1263 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
1264 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
1265 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
1266 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
1267 (mark_primary_bases, determine_primary_base, base_derived_from,
1268 dfs_find_final_overrider, dfs_find_final_overrider_q,
1269 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
1270 dfs_modify_vtables, walk_subobject_offsets,
1271 layout_nonempty_base_or_field, build_base_field,
1272 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
1273 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
1274 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
1275 build_ctor_vtbl_group, accumulate_vtble_inits,
1276 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
1277 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
1278 add_vcall_offset_vtbl_entries_1): Likewise.
1279 * decl.c (xref_basetypes): Incomming virtual base indicated by
1281 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
1282 * init.c (finish_init_stmts, sort_mem_initializers,
1283 emit_mem_initializers, build_vtble_address, expand_member_init,
1284 push_base_cleanups): Likewise.
1285 * method.c (do_build_copy_constructor): Likewise.
1286 * pt.c (instantiate_class_template,
1287 get_template_base_recursive): Likewise.
1288 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
1289 get_pseudo_ti_desc): Likewise.
1290 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1291 binfo_from_vbase, binfo_via_virtual, copied_binfo,
1292 original_binfo): Likewise.
1293 * semantics.c (finish_base_specifier): Virtualness is indicated
1295 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
1297 2004-07-06 Mark Mitchell <mark@codesourcery.com>
1300 2004-06-24 Jason Merrill <jason@redhat.com>
1302 * decl.c (grokparms): Give the PARM_DECL reference type if the
1303 parameter is passed by invisible reference.
1305 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1307 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
1308 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
1309 * pt.c (check_instantiated_args, unify): Likewise.
1311 2004-07-05 Phil Edwards <phil@codesourcery.com>
1313 * Make-lang.in (check-c++, lang_checks): Add some comments.
1315 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1317 * cp-mudflap.c: Delete file.
1318 * Makefile.in: Remove all references to cp-mudflap.o.
1320 2004-07-05 Zack Weinberg <zack@codesourcery.com>
1322 * decl.c (cxx_init_decl_processing): Call
1323 build_common_tree_nodes before creating the global NAMESPACE_DECL.
1325 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1328 * call.c (build_operator_new_call): Look only at global scope.
1330 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1332 * call.c (enforce_access): Expect TREE_BINFO.
1333 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
1334 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
1335 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
1337 (BINFO_LANG_ELTS): Remove.
1338 (BINFO_LANG_SLOTS): New.
1339 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
1340 (CLASSTYPE_TEMPLATE_INFO): Adjust.
1341 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
1342 * search.c (lookup_member): Check TREE_BINFO.
1343 * semantics.c (perform_or_defer_access_check): Likewise.
1344 (check_accessibility_of_qualified_id): Check
1345 deferred_access_no_check.
1346 * tree.c (make_binfo): Use make_tree_binfo.
1348 2004-07-04 Mark Mitchell <mark@codesourcery.com>
1350 * method.c (implicitly_declare_fn): Set linkage of generated
1353 2004-07-04 Richard Henderson <rth@redhat.com>
1355 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
1357 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
1360 * name-lookup.c (push_class_level_binding): Don't pass a
1361 TREE_LIST of ambiguous names to check_template_shadow as it
1362 only handles declarations. Instead, pull the declaration
1365 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1368 * pt.c (check_explicit_specialization): Clarify error message.
1370 2004-07-02 Richard Henderson <rth@redhat.com>
1372 * tree.c (cp_unsave_r): Update remap_save_expr call.
1374 2004-07-02 Mark Mitchell <mark@codesourcery.com>
1377 * mangle.c (write_template_arg): Correct mangling.
1380 * decl.c (grokdeclarator): Robustify.
1382 2004-07-01 Richard Henderson <rth@redhat.com>
1384 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
1385 * method.c (synthesize_method): Don't clear_last_expr.
1386 * name-lookup.c (maybe_push_cleanup_level): Likewise.
1388 2004-07-01 Nick Clifton <nickc@redhat.com>
1390 * decl2.c (import_export_class): Invoke the
1391 import_export_class field in the gcc_target structure if it is not
1394 2004-06-30 Richard Henderson (rth@redhat.com>
1396 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
1397 * method.c (use_thunk): Likewise.
1399 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1401 * call.c (build_over_call), typeck.c (build_function_call): Call
1402 check_function_arguments instead of check_function_format.
1404 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
1406 * call.c (build_over_call), typeck.c (build_function_call): Update
1407 calls to check_function_format.
1409 2004-06-30 Richard Henderson <rth@redhat.com>
1411 * call.c (build_over_call): Use __builtin_memcpy for copying
1412 CLASS_AS_BASE rather than funny casting.
1414 2004-06-30 Richard Henderson <rth@redhat.com>
1416 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
1417 TYPE_SIZE_UNIT of full_type.
1419 2004-06-30 Per Bothner <per@bothner.com>
1421 Conditionally compile support for --enable-mapped_location.
1422 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
1423 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
1424 adjustments - which I don't understand.
1425 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
1426 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
1427 (print_instantiation_partial_context): Use expand_location.
1428 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
1429 * name-lookup.c: Likewise.
1430 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
1431 * name-lookup.c: Use input_line macro.
1432 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
1433 (cp_parser_statement): Rename locaal variable statement_locus to
1434 statement_location and use SET_EXPR_LOCATION macro.
1435 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
1436 * tree.c (cp_walk_subtrees): Likewise.
1438 2004-06-29 Per Bothner <per@bothner.com>
1440 * tree.c (build_min_nt, build_min, build_min_non_dep):
1441 Don't set TREE_COMPLEXITY from input_line.
1443 2004-06-29 Paul Brook <paul@codesourcery.com>
1445 * init.c: Include target.h.
1446 (get_cookie_size): Remove and replace with target hook.
1448 (build_new_1): Store the element size in the cookie.
1450 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1453 * parser.c (cp_parser_template_declaration_after_export): Disable
1454 access checks here ...
1455 (cp_parser_class_specifier): ... not here.
1457 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1459 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1460 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1461 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1464 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1466 * cp-tree.h (struct deferred_access): Move to ...
1467 * semantics.c (struct deferred_access): ... here. Adjust.
1468 (deferred_access_stack): Make a VEC(deferred_access),
1469 (deferred_access_free_list): Remove.
1470 (deferred_access_no_check): New.
1471 (push_deferring_access_checks, resume_deferring_access_checks,
1472 stop_deferring_access_checks, pop_deferring_access_checks,
1473 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1474 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1476 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1479 * call.c (build_temp): Declare.
1480 (check_constructor_callable): New.
1481 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1482 CONSTRUCTOR_CALLABLE.
1483 (convert_like_real, initialize_reference): Use
1484 check_constructor_callable.
1485 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1486 (LOOKUP_*): Renumber.
1488 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1490 * friend.c (add_friend): Only perform access checks when context
1492 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1493 * parser.c (cp_parser_class_specifier): Disable access checks here
1494 when parsing the body of a templated class.
1495 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1496 NULL binfos when not checking access.
1498 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1500 Use vector API for vbase list.
1501 * cp-tree.h: Include vec.h
1502 (DEF_VEC_P (tree)): New type.
1503 (struct lang_type_class): Change vbase's member type.
1504 (binfo_for_vbase): Declare.
1505 * class.c (determine_primary_base, base_derived_from,
1506 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1507 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1508 build_vtbl_initializer): Adjust.
1509 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1511 * init.c (sort_mem_initializers, expand_member_init,
1512 push_base_cleanups): Adjust.
1513 * method.c (do_build_copy_constructor): Adjust.
1514 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1515 (binfo_for_vbase): New.
1516 * tree.c (copy_base_binfos): Adjust.
1518 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1520 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1522 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1525 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1526 paranthesis in case of pointers to array members.
1527 * error.c (dump_type_prefix): Likewise.
1528 (dump_type_suffix): Maybe issue a whitespace when printing
1531 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1534 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1535 redefinition of built-in types.
1537 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1539 * error.c (pp_template_argument_list_start): Remove.
1540 (pp_template_argument_list_end): Likewise.
1541 (pp_separate_with_comma): Use pp_cxx_separate_with.
1542 (reinit_global_formatting_buffer): Remove.
1543 (pp_non_consecutive_character): Likewise.
1544 (dump_scope): Use pp_cxx_colon_colon.
1545 (dump_template_parameter): Use pp_cxx_identifier,
1546 pp_cxx_tree_identifier and pp_cxx_whitespace.
1547 (dump_templat_bindings): Replace use of pp_string with sequence
1548 of pp_cxx_whitespace and pp_equal.
1549 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1550 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1552 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1553 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1554 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1555 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1556 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1557 (dump_decl): Likewise.
1558 (dump_template_decl): Likewise.
1559 (dump_function_decl): Likewise. Set padding as appropriate.
1560 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1562 (dump_exception_spec): Likewise.
1563 (dump_function_name): Use pp_cxx_tree_identifier and
1565 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1566 pp_cxx_end_template_argument_list.
1567 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1568 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1569 pp_cxx_whitespace throughout.
1570 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1572 (dump_unary_op): Likewise.
1573 (reinit_cxx_pp): New function.
1574 (type_as_string); Use it.
1575 (expr_as_string): Likewise.
1576 (decl_as_string); Likewise.
1577 (context_as_string): Likewise.
1578 (lang_decl_name): Likewise.
1579 (decl_to_string): Likewise.
1580 (expr_to_string): Likewise.
1581 (parm_to_string): Likewise.
1582 (type_to_string): Likewise.
1583 (args_to_string): Likewise.
1584 (cv_to_string): Likewise.
1586 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1588 * cp-tree.h (cp_cv_quals): New type.
1589 (cp_declarator): Use it instead of "tree" as appropriate.
1590 (grok_method_quals): Adjust prototype.
1591 (grokclassfn): Likewise.
1592 (do_friend): Likewise.
1593 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1594 (grokdeclarator): Likewise.
1595 * decl2.c (grok_method_quals): Likewise.
1596 (grokclassfn): Likewise.
1597 * friend.c (do_friend): Likewise.
1598 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1599 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1600 (make_pointer_declarator): Likewise.
1601 (make_reference_declarator): Likewise.
1602 (make_ptrmem_declarator): Likewise.
1603 (cp_parser_ptr_operator): Likewise.
1604 (cp_parser_cv_qualifier_seq_opt): Likewise.
1605 (cp_parser_cv_qualifier_opt): Remove.
1606 (cp_parser_new_declarator_opt): Adjust call to
1607 cp_parser_ptr_operator.
1608 (cp_parser_conversion_declaration_opt): Likewise.
1609 (cp_parser_declarator): Use cp_cv_quals, not tree.
1610 (cp_parser_direct_declarator): Likewise.
1612 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1614 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1615 Rename DECL_STMT to DECL_EXPR.
1616 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1617 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1618 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1620 2004-06-26 Jan Hubicka <jh@suse.cz>
1623 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1624 reachability analysis.
1626 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1628 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1631 2004-06-25 Paul Brook <paul@codesourcery.com>
1633 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1634 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1636 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1638 * decl.c (grokdeclarator): Restore error messages about __thread.
1639 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1641 2004-06-24 Jason Merrill <jason@redhat.com>
1644 * decl.c (grokparms): Give the PARM_DECL reference type if the
1645 parameter is passed by invisible reference.
1647 2004-06-24 Andreas Schwab <schwab@suse.de>
1649 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1651 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1653 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1654 (cp/decl.o): Likewise.
1655 (cp/decl2.o): Likewise.
1656 (cp/pt.o): Likewise.
1657 (cp/semantics.o): Likewise.
1658 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1659 * class.c: Do not include lex.h.
1660 (add_implicitly_declared_members): Do not use
1661 adding_implicit_members.
1662 (check_bases_and_members): Do not talk about grok_x_components.
1663 * cp/cp-tree.h (adding_implicit_members): Remove.
1664 (cp_storage_class): New type.
1665 (cp_decl_spec): Likewise.
1666 (cp_decl_specifier_seq): Likewise.
1667 (cp_parameter_declarator): Use it for the decl_specifiers field.
1668 (check_tag_decl): Adjust prototype.
1669 (shadow_tag): Likewise.
1670 (groktypename): Likewise.
1671 (start_decl): Likewise.
1672 (start_function): Likewise.
1673 (start_method): Likewise.
1674 (grok_x_components): Remove.
1675 (grokfield): Adjust prototype.
1676 (grokbitfield): Likewise.
1677 (finish_member_class_template): Remove.
1678 * decl.c: Do not include lex.h.
1679 (adding_implicit_members): Do not define.
1680 (check_tag_decl): Do not use trees to represent decl-specifiers.
1681 (shadow_tag): Likewise.
1682 (groktypename): Likewise.
1683 (start_decl): Likewise.
1684 (grokvardecl): Likewise.
1685 (grokdeclarator): Likewise.
1686 (grokparms): Likewise.
1687 (start_function): Likewise.
1688 (start_method): Likewise.
1689 * decl.h (grokdeclarator): Adjust prototype.
1690 * decl2.c: Do not include lex.h.
1691 (grok_x_components): Remove.
1692 (grokfield): Do not use trees to represent decl-specifiers.
1693 (grokbitfield): Likewise.
1694 * lex.c: Do not include lex.h.
1696 * parser.c: Include target.h.
1697 (clear_decl_specs): New function.
1698 (cp_parser_translation_unit): Do not use trees to represent
1700 (cp_parser_postfix_expression): Likewise.
1701 (cp_parser_new_type_id): Likewise.
1702 (cp_parser_condition): Likewise.
1703 (cp_parser_simple_declaration): Likewise.
1704 (cp_parser_decl_specifier_seq): Likewise.
1705 (cp_parser_function_specifier_opt): Likewise.
1706 (cp_parser_conversion_type_id): Likewise.
1707 (cp_parser_template_parameter): Likewise.
1708 (cp_parser_explicit_instantiation): Likewise.
1709 (cp_parser_type_specifier): Likewise.
1710 (cp_parser_simple_type_specifier): Likewise.
1711 (cp_parser_init_declarator): Likewise.
1712 (cp_parser_type_id): Likewise.
1713 (cp_parser_type_specifier_seq): Likewise.
1714 (cp_parser_parameter_declaration): Likewise.
1715 (cp_parser_member_declaration): Likewise.
1716 (cp_parser_exception_declaration): Likewise.
1717 (cp_parser_function_definition_from_specifiers_and_declarator):
1719 (cp_parser_single_declaration): Likewise.
1720 (cp_parser_save_member_function_body): Likewise.
1721 (cp_parser_friend_p): Likewise.
1722 (cp_parser_set_storage_class): New function.
1723 (cp_parser_set_decl_spec_type): Likewise.
1724 * pt.c: Do not include lex.h.
1725 * semantics.c: Likewise.
1726 (finish_member_class_template): Remove.
1728 2004-06-23 Roger Sayle <roger@eyesopen.com>
1730 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1731 longer take both "args" and "convert_args" as arguments.
1732 (build_op_delete_call): Update call to build_cxx_call.
1733 (build_over_call): Likewise, update call to build_cxx_call.
1734 * cp-tree.h (build_cxx_call): Update funtion prototype.
1735 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1736 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1737 (throw_bad_typeid): Likewise.
1738 (build_dynamic_cast_1): Likewise.
1740 2004-06-22 Richard Henderson <rth@redhat.com>
1742 * class.c (build_vfn_ref): Take a pointer not object. Build
1744 (cp_fold_obj_type_ref): New.
1745 * call.c (build_over_call): Update build_vfn_ref call.
1746 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1747 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1749 2004-06-21 Jason Merrill <jason@redhat.com>
1752 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1755 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1757 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1758 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1759 (TREE_PARMLIST): Likewise.
1760 (CALL_DECLARATOR_PARMS): Likewise.
1761 (CALL_DECLARATOR_QUALS): Likewise.
1762 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1763 (cp_declarator_kind): New type.
1764 (cp_parameter_declarator): Likewise.
1765 (cp_declarator): Likewise.
1766 (cp_error_declarator): Likewise.
1767 (no_parameters): Likewise.
1768 (groktypename): Change prototype.
1769 (start_decl): Likewise.
1770 (start_handler_parms): Likewise.
1771 (get_scope_of_declarator): Likewise.
1772 (start_function): Likewise.
1773 (start_preparsed_function): New function.
1774 (start_function): Change prototype.
1775 (start_method): Likewise.
1776 (grokfield): Likewise.
1777 (grokbitfield): Likewise.
1778 (build_new): Likewise.
1779 (make_pointer_declarator): Remove.
1780 (make_reference_declarator): Likewise.
1781 (make_call_declarator): Likewise.
1782 (set_quals_and_spec): Likewise.
1783 (process_template_parm): Change prototype.
1784 (begin_function_definition): Remove.
1785 (finish_parmlist): Remove.
1786 * decl.c (groktypename): Do not use trees to represent
1788 (start_decl): Likewise.
1789 (start_handler_parms): Remove.
1790 (get_scope_of_declarator): Reimplement.
1791 (grokdeclarator): Do not use trees to represent declarators.
1792 (grokparms): Likewise.
1793 (start_function): Likewise.
1794 (start_method): Likewise.
1795 (build_void_list_mode): Do not use TREE_PARMLIST.
1796 * decl.h (grokdeclarator): Change prototype.
1797 * decl2.c (grok_method_quals): Robustify.
1798 (grok_x_components): Do not use trees to represent declarators.
1799 (grokfield): Likewise.
1800 (grokbitfield): Likewise.
1801 (start_objects): Build FUNCTION_DECLs, not declarators.
1802 (start_static_storage_duration_function): Likewise.
1803 * init.c (build_new): Simplify.
1804 * lex.c (make_pointer_declarator): Remove.
1805 (make_reference_declarator): Likewise.
1806 (make_call_declarator): Likewise.
1807 (set_quals_and_spec): Likewise.
1808 * method.c (use_thunk): Use start_preparsed_function.
1809 (synthesize_method): Likewise.
1810 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1811 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1812 * parser.c (cp_error_declarator): New variable.
1813 (declarator_obstack): Likewise.
1814 (alloc_declarator): New function.
1815 (make_declarator): Likewise.
1816 (make_id_declarator): Likewise.
1817 (make_pointer_declarator): Likewise.
1818 (make_reference_declarator): Likewise.
1819 (make_ptrmem_declarator): Likewise.
1820 (make_call_declarator): Likewise.
1821 (make_array_declarator): Likewise.
1822 (no_parameters): New variable.
1823 (make_parameter_declarator): Likewise.
1824 (cp_parser_check_for_definition_in_return_type): Do not use trees
1825 to represent declarators.
1826 (cp_parser_translation_unit): Likewise.
1827 (cp_parser_new_expression): Likewise.
1828 (cp_parser_new_type_id): Likewise.
1829 (cp_parser_new_declarator_opt): Likewise.
1830 (cp_parser_direct_new_declarator): Likewise.
1831 (cp_parser_condition): Likewise.
1832 (cp_parser_declaration_statement): Likewise.
1833 (cp_parser_declaration): Likewise.
1834 (cp_parser_conversion_type_id): Likewise.
1835 (cp_parser_conversion_declarator_opt): Likewise.
1836 (cp_parser_template_parameter_list): Likewise.
1837 (cp_parser_template_parameter): Likewise.
1838 (cp_parser_explicit_instantiation): Likewise.
1839 (cp_parser_init_declarator): Likewise.
1840 (cp_parser_declarator): Likewise.
1841 (cp_parser_direct_declarator): Likewise.
1842 (cp_parser_type_id): Likewise.
1843 (cp_parser_parameter_declaration_clause): Likewise.
1844 (cp_parser_parameter_declaration_list): Likewise.
1845 (cp_parser_parameter_declaration): Likewise.
1846 (cp_parser_member_declaration): Likewise.
1847 (cp_parser_exception_declaration): Likewise.
1848 (cp_parser_check_declarator_template_parameters): Likewise.
1849 (cp_parser_function_definition_from_specifiers_and_declarator):
1851 (cp_parser_save_member_function_body): Likewise.
1852 * pt.c (process_template_parm): Add is_non_type parameter.
1853 (convert_template_argument): Adjust call to groktypename.
1854 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1855 (tsubst): Do not expect declarators.
1856 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1858 (instantiate_decl): Use start_preparsed_function.
1859 * semantics.c (begin_function_definition): Remove.
1860 (finish_parmlist): Remove.
1861 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1864 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1866 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1867 (build_new_method_call): Likewise.
1868 * decl.c (local_variable_p_walkfn): Don't walk into types.
1869 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1870 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1871 * init.c (buld_new): Add new operand for ARRAY_REF.
1872 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1873 (do_build_assign_ref): Likewise.
1874 * parser.c (cp_parser_direct_new_declarator): Add new operands
1876 (cp_parser_direct_declarator): Likewise.
1877 * pt.c (tsubst): Likewise.
1878 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1880 * semantics.c (finish_non_static_data_member): Add new operand
1882 * typeck.c (build_class_member_access_expr): Likewise.
1883 (build_class_member_access_expr, finish_class_member_access_expr):
1885 (build_ptrmemfunc_access_expr): Likewise.
1886 (build_array_ref): Add new operands for ARRAY_REF.
1887 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1888 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1890 2004-06-21 Richard Henderson <rth@redhat.com>
1892 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1893 * parser.c (cp_parser_jump_statement): Update commentary.
1894 * pt.c (tsubst_expr): Use RETURN_EXPR.
1895 * semantics.c (finish_return_stmt): Likewise.
1896 (finalize_nrv_r): Likewise.
1897 * typeck.c, typeck2.c: Update file start commentary.
1899 2004-06-21 Richard Henderson <rth@redhat.com>
1901 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1903 2004-06-20 Richard Henderson <rth@redhat.com>
1905 * cp-tree.h (add_decl_stmt): Declare.
1906 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1907 * semantics.c (maybe_cleanup_point_expr): New.
1908 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1909 finish_for_expr, finish_switch_cond): Use it.
1910 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1912 2004-06-20 Richard Henderson <rth@redhat.com>
1914 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1915 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1916 (cp_gimplify_expr): Call it.
1917 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1918 (cp_genericize): New.
1919 * decl.c (finish_function): Call it.
1920 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1921 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1922 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1923 (cp_genericize): Declare.
1924 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1925 * dump.c (cp_dump_tree): Likewise.
1926 * semantics.c (push_cleanup): Move from c-semantics.c.
1928 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1930 * cp-lang.c (has_c_linkage): Implement.
1932 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1933 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1934 (builtin_function_1): Don't call make_decl_rtl.
1935 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1936 (grokvardecl): Don't call mangle_decl.
1937 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1938 DECL_ASSEMBLER_NAME.
1939 * method.c (set_mangled_name_for_decl): Delete.
1940 * name-lookup.c (pushdecl): When a local extern shadows a
1941 file-scope declaration of the same object, give both DECLs the
1943 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1944 on DECL_ASSEMBLER_NAME.
1946 2004-06-19 Richard Henderson <rth@redhat.com>
1948 * cp-gimplify.c: Remove unnecessary prototypes.
1949 (cp_gimplify_stmt): Merge into ...
1950 (cp_gimplify_expr): ... here. Move to end of file. Handle
1951 stmts_are_full_exprs_p frobbing.
1952 * cp-tree.h (cp_gimplify_stmt): Remove.
1953 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1954 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1956 2004-06-18 Richard Henderson <rth@redhat.com>
1959 * semantics.c (begin_cond): New.
1960 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1961 Assume that non-template decls go land before the conditional.
1962 (simplify_loop_decl_cond): Likewise.
1963 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1964 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1965 begin_switch_stmt, finish_switch_cond): Update to match.
1967 2004-06-17 Jason Merrill <jason@redhat.com>
1970 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1971 (finish_stmt_expr_expr): Update type after conversions.
1972 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1973 Handle void initializer.
1974 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1976 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1978 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1979 * cp-tree.h (defer_fn): Delete.
1980 * decl2.c (defer_fn): Delete.
1981 (finish_file): Simplify deferred_fns loops; check that
1982 only used inline functions get into deferred_fns.
1983 (mark_used): Inline previous contents of defer_fn.
1985 2004-06-16 Richard Henderson <rth@redhat.com>
1987 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1988 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1989 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1990 of CTOR_INITIALIZER ...
1991 (pp_cxx_statement): ... here.
1992 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1993 (finish_function): Use alloc_stmt_list to zap entire function.
1994 * parser.c (cp_parser_compound_statement): Update commentary.
1995 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1996 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1997 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1999 2004-06-16 Geoffrey Keating <geoffk@apple.com>
2001 * pt.c (mark_decl_instantiated): Don't call defer_fn.
2003 2004-06-16 Richard Henderson <rth@redhat.com>
2005 * parser.c (cp_parser_labeled_statement): Update commentary.
2006 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
2007 * tree.c (mark_local_for_remap_r): Likewise.
2009 2004-06-16 Richard Henderson <rth@redhat.com>
2011 * parser.c (cp_parser_asm_definition): Update commentary.
2012 * pt.c (tsubst_expr): Use ASM_EXPR.
2013 * semantics.c (finish_asm_stmt): Likewise.
2015 2004-06-16 Richard Henderson <rth@redhat.com>
2017 * decl.c (finish_destructor_body): Use LABEL_EXPR.
2018 * parser.c (cp_parser_statement): Update commentary.
2019 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
2020 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
2021 * tree.c (mark_local_for_remap_r): Likewise.
2023 2004-06-16 Richard Henderson <rth@redhat.com>
2026 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
2027 statement in FOR_INIT_STMT for templates.
2029 2004-06-15 Richard Henderson <rth@redhat.com>
2031 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
2032 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
2033 (genericize_try_block): Use gimplify_stmt.
2034 (genericize_catch_block, genericize_eh_spec_block): Likewise.
2035 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
2036 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
2037 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
2038 (cp_tree_chain_matters_p): Remove.
2039 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
2040 (COMPOUND_STMT_BODY_BLOCK): New.
2041 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
2042 (EXPR_STMT_STMT_EXPR_RESULT): New.
2043 (building_stmt_tree): Check cur_stmt_list.
2044 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
2045 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
2046 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
2047 (cp_finish_decl): Use push_cleanup.
2048 (start_function, finish_function): Use statement lists.
2049 (finish_stmt): Do nothing.
2050 * except.c (begin_eh_spec_block): Use statement lists.
2051 (check_handlers_1, check_handlers): Likewise.
2052 * init.c (construct_virtual_base): Don't add extra compound stmts.
2053 (build_vec_init): Likewise.
2054 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
2055 * name-lookup.h (struct cp_binding_level): Add statement_list.
2056 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
2057 (cp_parser_labeled_statement, cp_parser_expression_statement,
2058 cp_parser_statement_seq_opt): Likewise.
2059 (cp_parser_compound_statement): Likewise. Take bool for try block.
2060 (cp_parser_selection_statement): Tidy if processing.
2061 (cp_parser_already_scoped_statement): Rewrite to do what it says.
2062 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
2063 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
2064 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
2065 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
2066 (finish_cond): New, rewritten from FINISH_COND.
2067 (simplify_loop_decl_cond): New.
2068 (finish_expr_stmt): Avoid nested EXPR_STMTs.
2069 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
2070 begin_else_clause, finish_else_clause, finish_if_stmt,
2071 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
2072 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
2073 finish_for_cond, finish_for_stmt, begin_switch_stmt,
2074 finish_switch_cond, finish_switch_stmt, begin_try_block,
2075 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
2076 finish_handler_sequence, finish_function_handler_sequence,
2077 begin_handler, finish_handler_parms, finish_handler,
2078 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
2079 using statement lists.
2080 (begin_compound_stmt): Replace has_no_scope argument with flags.
2081 Update all callers. Use statement lists.
2082 (finish_compound_stmt): Likewise.
2083 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
2084 (current_scope_stmt_stack): Remove.
2085 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
2086 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
2087 Rewrite with statement lists.
2089 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
2091 * parser.c: Change all assignments of c_lex_string_translate
2092 to true and false to 1 and 0.
2093 (cp_lexer_read_token): Convert type of the translated string.
2094 (cp_parser_skip_to_closing_parentheses): Preserve original
2095 value of c_lex_string_translate, and set it to -1 while
2097 (cp_parser_cache_group): Likewise.
2098 (cp_parser_cache_group_1): Renamed.
2099 (cp_parser_asm_operand_list): Remove redundant setting of
2100 c_lex_string_translate.
2101 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
2102 Handle chained strings.
2104 2004-06-12 Andrew Pinski <apinski@apple.com>
2108 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2110 * cp-tree.h: Fix typo.
2112 * cp-tree.h: Include cgraph.h
2113 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2114 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2116 2004-06-12 Jason Merrill <jason@redhat.com>
2118 PR tree-optimization/14107
2119 * decl.c (finish_function): Warn about no return in all functions.
2121 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2123 * cp-tree.h (struct language_function): Remove cannot_inline.
2124 * decl.c (save_function_data): cannot_inline is no more.
2125 (cxx_push_function_context): Likewise.
2126 * decl2.c (start_objects, start_static_storage_duration_function):
2127 Reset DECL_INLINE, set DECL_UNINLINABLE.
2129 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2132 * search.c (lookup_field): Propagate the ambiguity list.
2133 (lookup_fnfields): Likewise.
2135 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2138 * parser.c (cp_parser_template_name): Ctors/dtors never need a
2139 template keyword to disambiguate.
2141 2004-06-14 Mark Mitchell <mark@codesourcery.com>
2144 * decl.c (grokdeclarator): Ignore pointer-to-members when
2145 computing template depth.
2148 * name-lookup.c (pushtag): Do not try to put class declarations in
2149 explicit specialization scopes.
2151 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
2153 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
2155 2004-06-11 Mark Mitchell <mark@codesourcery.com>
2158 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
2159 bindings for undeclared built-ins.
2161 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2163 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
2164 appear at the correct location.
2166 2004-06-10 Jason Merrill <jason@redhat.com>
2170 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2171 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2172 TREE_TYPE for non-dependent names.
2173 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2174 unknown_type_node as its TREE_TYPE.
2175 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2176 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2177 (dump_expr) <SCOPE_REF case>: Likewise.
2179 2004-06-10 Mark Mitchell <mark@codesourcery.com>
2182 * parser.c (cp_parser_direct_declarator): Robustify.
2185 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
2186 constants in non-dependent contexts.
2190 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
2193 2004-06-10 Jakub Jelinek <jakub@redhat.com>
2196 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
2199 2004-06-09 Mark Mitchell <mark@codesourcery.com>
2203 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2204 * lex.c (handle_pragma_interface): Deprecate.
2205 (handle_pragma_implementation): Likewise.
2207 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
2209 * g++spec.c (lang_specific_driver): Remove check for -lm
2210 and -lmath when check it see if it was the math library.
2212 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2215 * parser.c (cp_parser_direct_declarator): Reject constructor named
2216 as qualified template-id.
2218 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2221 * lex.c (handle_pragma_interface): Deprecate.
2222 (handle_pragma_implementation): Likewise.
2224 2004-06-07 Mark Mitchell <mark@codesourcery.com>
2227 * parser.c (cp_parser_iteration_statement): Fix typo in error
2231 * pt.c (tsubst_default_argument): Do not defer access checks
2232 while substituting into the default argument.
2235 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
2236 constant in a non-dependent context.
2239 * except.c (build_throw): Ensure that temp_expr has been
2242 2004-06-06 Roger Sayle <roger@eyesopen.com>
2244 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
2246 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2249 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
2250 'typename', and accept 'template'.
2252 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
2253 Jan Hubicka <jh@suse.cz>
2256 * method.c (use_think): Do not mark thunk as referenced.
2258 2004-06-03 Matt Austern <austern@apple.com>
2261 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
2262 is nonzero, and if we see a noninline definition of a key method,
2263 make the vtables nonweak.
2265 2004-06-02 Matt Austern <austern@apple.com>
2267 * cp-tree.h (instantiate_decl): new boolean parameter,
2268 undefined_ok. Current behavior is equivalent to its being 0.
2269 * decl2.c (mark_used): Add new argument when calling instantiate_decl
2270 * pt.c (mark_decl_instantiated): Unconditionally make
2271 instantiations explicit unconditionally
2272 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
2273 since mark_decl_instantiated now does it.
2274 (instantiate_class_member): New. Instantiate a member of an
2275 explicitly instantiated class template.
2276 (do_type_instantiation): Explicitly instantiate members of an
2277 explicitly instantiated class template.
2278 (instantiate_decl): if undefined_ok is nonzero, and if we're
2279 trying to explicitly instantiated a template with no definition,
2280 change it to an implicit instantiation.
2281 (instantiate_pending_templates): Add new argument to instantiate_decl.
2282 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2284 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
2286 * cp-tree.h: Fix typo.
2288 * cp-tree.h: Include cgraph.h
2289 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
2290 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
2292 2004-06-01 Jason Merrill <jason@redhat.com>
2295 * call.c (call_builtin_trap): Remove type parm.
2296 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
2297 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
2299 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2302 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2303 TREE_TYPE for non-dependent names.
2304 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2305 unknown_type_node as its TREE_TYPE.
2306 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2307 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2308 (dump_expr) <SCOPE_REF case>: Likewise.
2310 2004-06-01 Richard Henderson <rth@redhat.com>
2311 Andrew Pinski <pinskia@physics.uc.edu>
2313 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
2314 * parser.c (struct cp_parser): Remove in_offsetof.
2315 (cp_parser_new): Don't set it.
2316 (cp_parser_unary_expression): Don't check it.
2317 (cp_parser_postfix_open_square_expression): Split out from ...
2318 (cp_parser_postfix_expression): ... here.
2319 (cp_parser_postfix_dot_deref_expression): Likewise.
2320 (cp_parser_builtin_offsetof): New.
2321 (cp_parser_primary_expression): Use it.
2323 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2326 * parser.c (cp_parser_postfix_expression): Allow subscript
2327 operator in offsetof.
2329 2004-05-31 Mark Mitchell <mark@codesourcery.com>
2332 * friend.c (add_friend): Do not try to perform access checks for
2333 functions from dependent classes.
2335 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2337 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
2338 (pp_cxx_begin_template_argument_list): Turn into a function.
2339 (pp_cxx_end_template_argument_list): Likewise.
2340 (pp_cxx_separate_with): Define.
2341 (pp_cxx_unqualified_id): Tidy.
2342 (pp_cxx_primary_expression): Likewise.
2343 (pp_cxx_postfix_expression): Likewise.
2344 (pp_cxx_expression): Likewise.
2345 (pp_cxx_simple_type_specifier): Likewise.
2346 (pp_cxx_type_specifier_seq): Likewise.
2347 (pp_cxx_parameter_declaration_clause): Likewise.
2348 (pp_cxx_exception_specification): Likewise.
2349 (pp_cxx_direct_declarator): Likewise.
2350 (pp_cxx_type_id): Likewise.
2351 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
2353 (pp_cxx_left_paren): Likewise.
2354 (pp_cxx_right_paren): Likewise.
2355 (pp_cxx_left_brace): Likewise.
2356 (pp_cxx_right_brace): Likewise.
2357 (pp_cxx_left_bracket): Likewise.
2358 (pp_cxx_right_bracket): Likewise.
2359 (pp_cxx_dot): Likewise.
2360 (pp_cxx_identifier): Likewise.
2361 (pp_cxx_tree_identifier): Likewise.
2362 (pp_cxx_ampersand): New macro.
2363 (pp_cxx_star): Likewise.
2364 (pp_cxx_arrow): Likewise.
2365 (pp_cxx_semicolon): Likewise.
2366 (pp_cxx_complement): Likewise.
2367 (pp_cxx_begin_template_argument_list): Declaree.
2368 (pp_cxx_end_template_argument_list): Likewise.
2369 (pp_cxx_colon_colon): likewise.
2371 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2373 * parser.c (cp_parser_simple_type_specifier): Explicitly test
2376 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
2378 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
2379 typeck.c: Fix comment formatting.
2381 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
2383 * cp-lang.c (cp_expand_decl): Remove.
2384 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
2386 2004-05-30 Andreas Jaeger <aj@suse.de>
2388 * lang-specs.h: Add missing initializers for .ii.
2390 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
2392 * decl.c (cp_make_fname_decl): Free return value from
2395 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2398 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
2400 * init.c (build_new): Likewise.
2403 * name-lookup.c (arg_assoc): Robustify.
2406 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
2407 when determining the scope to use for a pointer to member.
2408 (lookup_anon_field): Give it external linkage.
2409 * cp-tree.h (lookup_anon_field): Declare it.
2410 * expr.c (cplus_expand_constant): Use it.
2412 2004-05-28 Mark Mitchell <mark@codesourcery.com>
2415 * parser.c (cp_parser_simple_type_specifier): Call
2416 maybe_note_name_used_in_class.
2418 2004-05-28 Tom Marshall <tmarshall@real.com>
2421 * class.c (finish_struct_1): Warn only if the dtor is non-private or
2422 the class has friends.
2424 2004-05-27 Adam Nemet <anemet@lnxw.com>
2427 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
2428 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
2430 2004-05-24 Geoffrey Keating <geoffk@apple.com>
2432 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
2433 if it might be needed.
2434 * pt.c (mark_decl_instantiated): Only call defer_fn if
2435 the function actually needs processing in finish_file.
2436 * decl2.c (finish_file): Add check that elements in
2437 deferred_fns_used are really needed there. Remove unnecessary
2438 test of DECL_SAVED_TREE.
2440 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2442 * Make-lang.in: No need to specify $(LIBCPP).
2444 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2447 * parser.c (cp_parser_class_head): Robustify.
2450 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2452 (cp_parser_constructor_declarator_p): Treat attributes
2456 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2457 base classes in templates.
2459 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2462 * pt.c (instantiate_template): Robustify.
2464 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2467 * decl.c (xref_tag): Issue errors about redeclaring template
2468 classes as non-template classes.
2470 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2473 * name-lookup.c (supplement_binding): Allow redefinitions of
2477 * parser.c (cp_parser_template_argument): Robustify.
2479 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2481 * class.c (alter_access): Use %E format specifier to print an
2482 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2483 (push_lang_context): Likewise.
2484 * decl.c (lookup_label): Likewise.
2485 (grokdeclarator): Likewise.
2486 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2487 * pt.c (do_type_instantiation): Likewise.
2488 * tree.c (handle_java_interface_attribute): Likewise.
2489 (handle_com_interface_attribute): Likewise.
2490 (handle_init_priority_attribute): Likewise.
2492 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2496 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2497 recognized as overloaded functions.
2499 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2502 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2503 layout conflicts for unions.
2506 * typeck.c (build_x_unary_op): Instantiate template class
2507 specializations before looking for "operator &".
2510 * typeck.c (complete_type): Layout non-dependent array types, even
2514 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2517 2004-05-22 Roger Sayle <roger@eyesopen.com>
2519 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2520 returning when TREE_TYPE is error_mark_node.
2521 * typeck.c (require_complete_type): Return error_mark_node if
2522 value's type is an error_mark_node.
2524 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2526 * optimize.c (calls_setjmp_r): Remove.
2527 (calls_setjmp_p): Remove.
2528 * cp-tree.c (calls_setjmp_p): Remove.
2529 * decl.c (finish_function): Do not call calls_setjmp_p.
2531 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2533 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2534 * decl2.c (maybe_make_one_only): Likewise.
2535 * method.c (use_thunk): Likewise.
2537 2004-05-18 Jason Merrill <jason@redhat.com>
2539 * class.c (build_base_path): Tidy a bit.
2541 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2543 * name-lookup.c (struct scope_binding): New.
2544 (EMPTY_SCOPE_BINDING): New.
2545 (lookup_using_namespace): Take a scope_binding instead of a
2547 (qualified_lookup_using_namespace): Likewise.
2548 (cxx_binding_clear): Delete.
2549 (do_nonmember_using_decl): Use a scope_binding instead of a
2551 (lookup_tag): Don't call select_decl.
2552 (ambiguous_decl): Don't return anything (and change callers to match).
2553 Take a scope_binding as the second parameter.
2554 (lookup_namespace_name): Use a scope_binding instead of a
2556 (unqualified_namespace_lookup): Likewise.
2557 (lookup_qualified_name): Likewise.
2558 (select_decl): Take a scope_binding instead of a cxx_binding.
2559 Use macros rather than hand-coding tests for type-ness.
2561 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2563 * cp-gimplify.c: Rename from cp-simplify.c.
2564 * Make-lang.in, optimize.c: Update.
2566 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2568 Merge from tree-ssa-20020619-branch. See
2569 ChangeLog.tree-ssa for details.
2571 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2572 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2573 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2574 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2576 * cp-mudflap.c: New file.
2577 * cp-simplify.c:: New file.
2579 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2582 * decl2.c (check_classfn): For member templates, compare also the
2583 template parameters to match the declaration.
2584 * cp-tree.h: Adjust declaration of check_classfn.
2585 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2586 * friend.c (do_friend): Likewise.
2587 * pt.c (tsubst_friend_function): Likewise.
2589 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2591 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2592 Instead, dig into the representation type to find the array bound.
2594 2004-04-30 Jason Merrill <jason@redhat.com>
2596 Refer to base members using COMPONENT_REFs where possible.
2597 * class.c (build_simple_base_path): New fn.
2598 (build_base_path): Use it for non-virtual base references.
2599 (layout_class_type): Change base fields to their real type
2600 after layout is done.
2601 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2602 * cp-lang.c (cxx_get_alias_set): Use it.
2604 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2606 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2609 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2612 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2613 used in integral constant expressions.
2615 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2617 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2620 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2622 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2623 * decl.c (reshape_init): Use it.
2624 * init.c (perform_member_init): Remove redundant condition.
2625 (build_aggr_init): Adjust to handle brace-enclosed initializers
2627 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2629 * parser.c (cp_parser_initializer_clause): Do not set
2630 TREE_HAS_CONSTRUCTOR on the initializer.
2631 * rtti.c (tinfo_base_init): Likewise.
2632 (generic_initializer): Likewise.
2633 (ptr_initializer): Likewise.
2634 (ptm_initializer): Likewise.
2635 (class_initializer): Likewise.
2636 (get_pseudo_ti_init): Likewise.
2637 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2639 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2641 * name-lookup.c (anonymous_namespace_name): Make static.
2643 2004-04-19 Roger Sayle <roger@eyesopen.com>
2646 * class.c (build_base_path): Call fold whilst building the NULL
2647 pointer check expression trees.
2649 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2651 * init.c (build_new_1): Don't use type size argument for Java
2652 _Jv_AllocObject call.
2654 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2656 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2657 declaration and definition.
2659 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2662 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2663 than ASM_OUTPUT_DEF.
2665 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2667 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2668 current_function_decl == NULL.
2670 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2673 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2676 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2678 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2680 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2681 or TREE_SIDE_EFFECTS of a type.
2683 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2686 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2687 cv-qualifier unification.
2688 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2690 2004-04-02 Jan Hubicka <jh@suse.cz>
2692 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2693 * cp-tree.h (cp_update_decl_after_saving): Declare.
2694 * tree.c (cp_update_decl_after_saving): Define.
2696 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2699 * typeck.c (get_delta_difference): Call fold before returning the
2702 2004-04-01 Richard Henderson <rth@redhat.com>
2705 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2706 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2708 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2711 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2713 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2715 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2717 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2719 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2720 * class.c (check_bitfield_decl): Likewise.
2721 * cvt.c (type_promotes_to): Likewise.
2722 * decl.c (finish_enum): Likewise.
2723 * mangle.c (write_builtin_type): Likewise.
2724 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2725 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2726 (build_binary_op): Likewise.
2728 2004-03-31 Jan Hubicka <jh@suse.cz>
2730 * tree.h (optimize_function): Kill prototype.
2731 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2732 * semantics.c (expand_body): Kill.
2734 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2737 * decl.c (start_decl_1): Do not decide whether or not to create a
2738 new cleanup level until after the type has been completed.
2741 * pt.c (tsubst_default_argument): Clear current_function_decl.
2743 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2745 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2747 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2749 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2750 is null, just print the literal name and return.
2752 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2754 * cxx-pretty-print.c: Fix comment typos.
2756 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2758 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2761 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2763 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2764 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2767 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2769 PR 12267, 12391, 12560, 13129, 14114, 14133
2770 * cp-lang.c (c_reset_state): Delete.
2771 (push_file_scope, pop_file_scope): New stubs.
2772 * parser.c (c_parse_file): Call sorry() here if called more than once.
2774 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2776 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2779 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2781 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2783 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2785 * error.c (enum pad): Remove.
2786 (dump_qualifiers): Likewise.
2787 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2788 (dump_aggr_type): Likewise.
2789 (dump_type_suffix): Likewise.
2790 (dump_simple_decl): Likewise.
2791 (dump_function_decl): Likewise.
2792 (cv_to_string): Likewise.
2793 (dump_type_prefix): Likewise. Adjust return void.
2794 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2796 (pp_cxx_template_keyword_if_needed): Document.
2797 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2798 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2799 MUST_NOT_THROW_EXPR.
2801 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2804 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2805 templates, if their type is non-dependent.
2807 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2809 * call.c (build_op_delete_call): Do not forget the placement
2810 arguments when iterating through mutiple delete operators.
2812 * cp-tree.h (svaed_scope): Remove last_parms.
2813 (NEW_DELETE_OPNAME_P): New macro.
2814 (last_function_parms): Remove.
2815 (do_friend): Adjust prototype.
2816 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2817 using last_function_parms.
2818 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2819 using last_function_parms.
2820 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2821 for class-specific operator new and operator delete.
2822 (grok_op_properties): Do not look for allocation functions with
2824 (start_function): Use DECL_ARGUMENTS instead of
2825 last_function_parms.
2826 * decl.h (last_function_parms): Do not declare.
2827 * decl2.c (grokclassfn): Do not use last_function_parms.
2828 * friend.c (do_friend): Remove parmdecls parameter.
2829 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2830 (pop_from_top_level): Do not restore it.
2831 * pt.c (check_explicit_specialization): Do not adjust
2832 last_function_parms.
2834 * name-lookup.c (do_local_using_decl): Create a local binding for
2835 types brought in via using declarations.
2837 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2838 function declarations correctly.
2840 * semantics.c (finish_id_expression): Correct handling of
2841 conversion operators to dependent types.
2843 * typeck.c (lookup_destructor): Allow the use of destructors from
2846 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2848 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2849 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2850 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2851 the field is named TEMPLATE_TYPE_PARM_INDEX.
2853 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2856 * parser.c (cp_parser_functional_cast): A cast to anything
2857 but integral or enumaration type is not an integral constant
2859 * pt.c (value_dependent_expression_p): Handle cast expressions
2860 without operands (such as "int()").
2862 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2864 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2865 cv-qualification between the type named by the
2866 pseudo-destructor-name and the object-type.
2868 * search.c (accessible_base_p): Handle non-proper bases.
2870 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2871 refers to a single overloaded function, set the type of the
2873 * tree.c (lvalue_type): Simplify.
2874 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2876 (build_unary_op): Handle OVERLOADs with known types.
2878 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2881 * parser.c (cp_parser_postfix_expression): Handle the use of
2882 "typename" in non-dependent contexts. Convert appropriately when
2883 when using a qualified name after "->" or ".".
2885 * call.c (conditional_conversion): Honor the requirement that some
2886 conversions refer to the original object.
2888 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2890 * call.c (build_conditional_expr): Do not call force_rvalue for
2891 operands of void_type when the conditional expression itself has
2893 * name-lookup.c (pushdecl): Don't consider a declaration of a
2894 function named "main" to be an overload of a type named "main".
2895 * parser.c (cp_parser_template_name): Perform name lookup when the
2896 template name is proceeded by "template" if the qualifying scope
2898 * typeck.c (composite_pointer_type_r): Correctly handle
2899 pointer-to-member types.
2900 (build_const_cast): Likewise.
2902 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2904 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2905 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2906 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2907 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2908 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2909 (TYPEOF_TYPE_EXPR): New macro.
2910 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2911 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2912 * pt.c (tsubst): Likewise.
2913 * semantics.c (finish_typeof): Likewise.
2914 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2915 and TEMPLATE_TYPE_PARM.
2916 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2917 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2919 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2922 * cp-tree.h (build_new_op): Change prototype.
2923 (build_x_binary_op): Likewise.
2924 * call.c (build_new_op): Add overloaded_p parameter.
2925 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2926 * parser.c (cp_parser_binary_expression): Note that uses of
2927 overloaded operators prevents an expression from being considered
2928 an integral constant.
2929 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2931 * semantics.c (finish_call_expr): Likewise.
2932 * typeck.c (rationalize_conditional_expr): Likewise.
2933 (build_x_indirect_ref): Likewise.
2934 (build_x_binary_op): Likewise.
2935 (build_x_unary_op): Likewise.
2936 (build_x_compound_expr): Likewise.
2937 (build_modify_expr): Likewise.
2938 * typeck2.c (build_x_arrow): Likewise.
2940 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2942 * cp-lang.c, ptree.c: Update copyright.
2944 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2947 * parser.c (cp_parser_non_integral_constant_expression): Encode
2948 more of the idiom that surrounded calls to this function within
2950 (cp_parser_primary_expression): Adjust accordingly.
2951 (cp_parser_postfix_expression): Likewise.
2952 (cp_parser_unary_expression): Likewise.
2953 (cp_parser_cast_expression): Likewise.
2954 (cp_parser_assignment_expression): Likewise.
2955 (cp_parser_expression): Likewise.
2956 (cp_parser_new_expression): Note that new-expressions are not
2957 allowed in integral constant expressions.
2958 (cp_parser_delete_expression): Likewise.
2960 2004-03-12 Matt Austern <austern@apple.com>
2962 * decl2.c (maybe_make_one_only): Look at
2963 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2964 to make an explicit instantiation weak.
2965 * method.c (use_thunk): Make sure we call comdat_linkage
2967 * pt.c (do_type_instantiation): On systems where weak symbols
2968 don't go in a static archive's TOC, explicit instantiation of a
2969 class must imply *explicit* instantiation of its memeber.
2971 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2973 * call.c, cp-tree.h, pt.c: Fix comment typos.
2975 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2978 * decl.c (xref_tag): Disregard non-type declarations when
2979 looking up a tagged type.
2981 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2984 * call.c (convert_like_real): Build a const qualified temporary,
2985 when testing ctor access.
2987 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2989 * call.c (initialize_reference): Fix typo.
2991 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2994 * pt.c (determine_specialization): For member templates, match also
2998 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
3000 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
3002 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3005 * call.c (initialize_reference): Handle initializers that are
3006 class-member access expressions applies to rvalues.
3008 2004-03-09 Mark Mitchell <mark@codesourcery.com>
3011 * name-lookup.c (supplement_binding): Ignore functions that are
3012 marked DECL_ANTICIPATED.
3014 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3017 * class.c (check_field_decls): Complain about non-static data
3018 members of reference type in unions. Propagate
3019 CLASSTYPE_REF_FIELDS_NEED_INIT and
3020 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
3022 * init.c (perform_member_init): Complain about mbmers with const
3023 type that are not explicitly initialized.
3025 2004-03-08 Mark Mitchell <mark@codesourcery.com>
3027 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
3028 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
3029 (lang_identifier): Remove implicit_decl and error_locus.
3030 (IDENTIFIER_IMPLICIT_DECL): Remove.
3031 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
3032 (IDENTIFIER_ERROR_LOCUS): Likewise.
3033 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3034 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
3035 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3036 (implicitly_declare): Remove.
3037 * decl.c (warn_extern_redeclared_static): Remove check of
3038 IDENTIFIER_IMPLICIT_DECL.
3039 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
3040 (implicitly_declare): Remove.
3041 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
3042 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
3043 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
3044 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
3045 in the innermost scope, rather than at namespace scope.
3046 * name-lookup.c (push_local_binding): Give it external linkage.
3047 (pushdecl): Remove dead code.
3048 * name-lookup.h (push_local_binding): Declare it.
3049 * ptree.c (cxx_print_identifier): Don't print
3050 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
3051 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
3052 not IDENTIFIER_ERROR_LOCUS.
3053 * typeck.c (build_function_call): Remove dead code.
3055 2004-03-08 Jason Merrill <jason@redhat.com>
3058 * decl.c (xref_tag): Remove attribute handling.
3059 * cp-tree.h: Adjust prototype.
3060 * decl.c, parser.c, rtti.c: Adjust callers.
3061 * parser.c (cp_parser_class_head): Pass back attributes in the
3063 (cp_parser_class_specifier): Adjust.
3065 2004-03-08 Matt Austern <austern@apple.com>
3068 * name-lookup.c (add_decl_to_level): Add extern variables, as well
3069 as static, to static_decls array.
3071 2004-03-05 Jason Merrill <jason@redhat.com>
3073 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
3075 2004-03-04 Geoffrey Keating <geoffk@apple.com>
3077 * decl.c (grokfndecl): Update old incorrect comment.
3078 (grokvardecl): Diagnose C++ variables of type with no linkage.
3080 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3083 * pt.c (build_non_dependent_expr): Do not create a
3084 NON_DEPENDENT_EXPR for a THROW_EXPR.
3086 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3089 * error.c (dump_expr): Handle THROW_EXPR.
3091 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3094 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
3095 lookup if ordinary name-lookup finds a non-function.
3096 * pt.c (tsubst_copy_and_build): Likewise.
3099 * parser.c (cp_parser_late_parsing_default_args): Check that there
3100 are no extra tokens after the end of the default-argument
3103 2004-03-01 Mark Mitchell <mark@codesourcery.com>
3106 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
3107 having C++ linkage for name-mangling purposes.
3110 * parser.c (cp_parser_direct_declarator): Recognize constructor
3111 declarators that use a template-id to name the class being
3115 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
3116 (tsubst_expr): Do not call tsubst_copy, even when
3117 processing_template_decl.
3119 2004-03-01 Jeff Law <law@redhat.com>
3121 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
3124 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3127 * name-lookup.h (push_scope): Change prototype.
3128 * name-lookup.c (push_scope): Do not reenter the current class
3130 * decl.c (grokfndecl): Check return code from push_scope before
3132 * decl2.c (check_classfn): Likewise.
3133 * parser.c (cp_parser_conversion_function_id): Likewise.
3134 (cp_parser_init_declarator): Likewise.
3135 (cp_parser_direct_declarator): Likewise.
3136 (cp_parser_class_specifier): Likewise.
3137 (cp_parser_class_head): Likewise.
3138 (cp_parser_lookup_name): Likewise.
3139 (cp_parser_constructor_declarator_p): Likewise.
3140 * pt.c (instantiate_class_template): Likewise.
3141 (resolve_typename_type): Likewise.
3143 2004-02-29 Mark Mitchell <mark@codesourcery.com>
3146 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
3150 * class.c (update_vtable_entry_for_fn): Do not go through
3151 covariance machinery if the type returned by an overrider is the
3152 same as the original.
3154 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
3156 * call.c: Fix a comment typo.
3158 2004-02-27 Ziemowit Laski <zlaski@apple.com>
3160 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
3162 2004-02-26 Mark Mitchell <mark@codesourcery.com>
3165 * parser.c (cp_parser_parameter_declaration_list): Commit
3166 to fewer tentative parses.
3168 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3171 * pt.c (dependent_type_p_r): A template template parameter is a
3174 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3177 * mangle.c (write_template_arg_literal): Don't rely on identity for
3180 2004-02-24 Jason Merrill <jason@redhat.com>
3182 * tree.c (build_exception_variant): Use check_qualified_type.
3184 2004-02-23 Zack Weinberg <zack@codesourcery.com>
3185 Kazu Hirata <kazu@cs.umass.edu>
3187 * decl.c (cxx_init_decl_processing): Don't check
3188 flag_writable_strings.
3190 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
3193 * typeck.c (maybe_warn_about_returning_address_of_location):
3194 Change check for VAR_DECL to use DECL_P instead.
3196 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3199 * cvt.c (build_expr_type_conversion): Type must be complete before
3200 looking up for conversions.
3202 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3205 * name-lookup.c (arg_assoc_class): Don't look into template
3206 arguments if it is not a primary template.
3208 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3211 * method.c (use_thunk): Always clone function argument tree.
3213 2004-02-20 Mark Mitchell <mark@codesourcery.com>
3216 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
3219 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
3220 for all type variants.
3222 2004-02-19 Mark Mitchell <mark@codesourcery.com>
3225 * decl.c (duplicate_decls): Return error_mark_node for invalid
3227 * name-lookup.c (push_namespace): Ignore the return value from
3229 * pt.c (push_template_decl_real): Robustify.
3232 * name-lookup.c (push_class_level_binding): Do not complain about
3233 adding a binding for a member whose name is the same as the
3234 enclosing class if the member is located in a base class of the
3237 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3240 * parser.c (cp_parser_new_expression): Parse an ill-formed
3241 direct-new-declarator after a parenthesized type-id to emit good
3244 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
3246 * cp-tree.def, cvt.c: Update copyright.
3248 2004-02-17 Mark Mitchell <mark@codesourcery.com>
3251 * cp-tree.h (abi_version_at_least): Remove.
3252 * mangle.c: Include flags.h.
3254 2004-02-15 Mark Mitchell <mark@codesourcery.com>
3257 * call.c (build_conditional_expr): Handle conversions between
3258 class types which result in differently cv-qualified type
3262 * class.c (delete_duplicate_fields_1): Remove.
3263 (delete_duplicate_fields): Likewise.
3264 (finish_struct_anon): Remove check for members with the same name
3265 as their enclosing class.
3266 (check_field_decls): Do not call duplicate_fields.
3267 * decl.c (grokdeclarator): Remove check for static data members
3268 with the same name as their enclosing class.
3269 * name-lookup.c (push_class_level_binding): Check for members with
3270 the same name as their enclosing class.
3272 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3275 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
3277 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3280 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
3281 has full set of arguments.
3283 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3286 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
3288 2004-02-13 Mark Mitchell <mark@codesourcery.com>
3291 * cp-tree.h (delete_sanity): Change prototype.
3292 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
3293 Remove dead code. Adjust code to warn about deleting an array.
3294 * typekc.c (decay_conversion): Use build_address and build_nop.
3297 * search.c (accessible_p): Do not check access in thunks.
3300 * call.c (build_conditional_expr): Call force_rvalue on the
3301 non-void operand in the case that one result is a throw-expression
3302 and the other is not.
3304 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
3307 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
3308 the type name and look ahead for ::~, and bail out early with a
3309 better error message if the parse is going to fail.
3311 2004-02-12 Mark Mitchell <mark@codesourcery.com>
3313 * call.c (conversion_kind): New type.
3314 (conversion_rank): Likewise.
3315 (conversion): Likewise.
3316 (CONVERSION_RANK): New macro.
3317 (conversion_obstack): New variable.
3318 (obstack_initialized): Likewise.
3319 (z_candidate): Change type of convs and second_conv.
3320 (candidate_warning): New type.
3321 (IDENTITY_RANK): Remove.
3322 (EXACT_RANK): Likewise.
3323 (PROMO_RANK): Likewise.
3324 (STD_RANK): Likewise.
3325 (PBOOL_RANK): Likewise.
3326 (USER_RANK): Likewise.
3327 (ELLIPSIS_RANK): Likewise.
3328 (BAD_RANK): Likewise.
3329 (ICS_RANK): Likewise.
3330 (ICS_STD_RANK): Likewise.
3331 (ICS_USER_FLAG): Likewise.
3332 (ICS_ELLIPSIS_FLAG): Likewise.
3333 (ICS_THIS_FLAG): Likewise.
3334 (ICS_BAD_FLAG): Likewise.
3335 (NEED_TEMPORARY_P): Likewise.
3336 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
3337 (USER_CONV_CAND): Likewise.
3338 (USER_CONV_FN): Likewise.
3339 (conversion_obstack_alloc): New function.
3340 (alloc_conversion): Likewise.
3341 (validate_conversion_obstack): Likewise.
3342 (alloc_conversions): Likewise.
3343 (build_conv): Adjust to deal with new conversion data structures.
3344 (build_identity_conv): New function.
3345 (build_ambiguous_conv): Likewise.
3346 (standard_conversion): Adjust to deal with new conversion data
3348 (convert_class_to_reference): Likewise.
3349 (direct_reference_binding): Likewise.
3350 (reference_binding): Likewise.
3351 (implicit_conversion): Likewise.
3352 (add_candidate): Likewise.
3353 (add_function_candidate): Likewise.
3354 (add_conv_candidate): Likewise.
3355 (build_builtin_candidate): Likewise.
3356 (print_z_candidate): Likewise.
3357 (merge_conversion_sequences): Likewise.
3358 (build_user_type_conversion_1): Likewise.
3359 (build_user_type_conversion): Likewise.
3360 (build_new_function_call): Likewise.
3361 (build_object_call): Likewise.
3362 (conditional_conversion): Likewise.
3363 (build_conditional_expr): Likewise.
3364 (build_new_op): Likewise.
3365 (build_op_delete_call): Likewise.
3366 (convert_like_real): Likewise.
3367 (build_over_call): Likewise.
3368 (build_new_method_call): Likewise.
3369 (is_subseq): Likewise.
3370 (maybe_handle_implicit_object): Likewise.
3371 (maybe_handle_ref_bind): Likewise.
3372 (compare_ics): Likewise.
3373 (source_type): Likewise.
3374 (add_warning): Likewise.
3376 (can_convert_arg): Likewise.
3377 (can_convert_arg_bad): Likewise.
3378 (perform_implicit_conversion): Likewise.
3379 (perform_direct_initialization_if_possible): Likewise.
3380 (initialize_reference): Likewise.
3381 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
3382 * cp-tree.def (WRAPPER): Likewise.
3383 (IDENTITY_CONV): Remove.
3384 (LVALUE_CONV): Likewise.
3385 (QUAL_CONV): Likewise.
3386 (STD_CONV): Likewise.
3387 (PTR_CONV): Likewise.
3388 (PMEM_CONV): Likewise.
3389 (BASE_CONV): Likewise.
3390 (REF_BIND): Likewise.
3391 (USER_CONV): Likewise.
3392 (AMBIG_CONV): Likewise.
3393 (RVALUE_CONV): Likewise.
3394 * cp-tree.h (tree_wrapper): Remove.
3395 (WRAPPER_ZC): Remove.
3396 (lang_tree_node): Remove wrapper.
3397 (LOOKUP_SPECULATIVELY): Remove.
3398 (build_op_delete_call): Adjust prototype.
3399 (validate_conversion_obstack): Declare.
3400 (build_zc_wrapper): Remove.
3401 * cvt.c (convert_to_reference): Remove dead code.
3402 (ocp_convert): Likewise.
3403 * decl.c (redeclaration_error_message): Correct handling of
3405 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
3406 (cp_tree_node_structure): Remove WRAPPER case.
3407 * decl2.c (finish_file): Call validate_conversion_obstack.
3408 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
3409 (build_op_delete_call): Likewise.
3410 (build_x_delete): Likewise.
3411 (build_delete): Adjust call to build_op_delete_call.
3412 * pt.c (tsubst_friend_declaration): Adjust code to determine
3413 whether or not a friend template is a definition.
3414 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
3415 * tree.c (build_zc_wrapper): Remove.
3417 2004-02-12 Zack Weinberg <zack@codesourcery.com>
3419 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
3420 * cp-tree.h: Don't declare cxx_builtin_type_decls.
3421 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
3422 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
3424 2004-02-10 Mark Mitchell <mark@codesourcery.com>
3426 * typeck.c (lookup_destructor): Fix typo in error message.
3428 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
3430 * call.c, parser.c, tree.c: Fix comment typos.
3432 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3435 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
3436 * decl.c (duplicate_decls, start_function): Likewise.
3438 2004-02-07 Zack Weinberg <zack@codesourcery.com>
3440 * name-lookup.c (pushdecl): Issue shadow warnings directly.
3441 * parser.c (free_parser_stacks): Delete.
3443 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
3445 * rtti.c: Update copyright.
3447 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3450 * decl.c (require_complete_types_for_parms): Do not insert
3451 error_mark_node in the parameter list.
3453 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3456 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3457 error when terminator can not be found.
3459 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3461 Make-lang.in (po-generated): Delete.
3463 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3465 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3466 targetm.calls.promote_prototypes.
3468 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3472 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3474 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3475 (handle_pragma_implementation): Likewise.
3477 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3480 * typeck.c (lookup_destructor): Tweak error message.
3482 2004-02-05 Jan Hubicka <jh@suse.cz>
3484 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3487 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3490 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3491 code, only emits the diagnostic now. Added lookup of the identifier
3492 and support for qualified ids.
3493 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3494 Parse an (invalid) type name as id-expression within a declarator.
3495 (cp_parser_simple_declaration): Use it.
3496 (cp_parser_member_declaration): Likewise.
3497 (cp_parser_make_typename_type): New function. Handle errors through
3498 cp_parser_diagnose_invalid_typename.
3499 (cp_parser_elaborated_type_specifier): Use it.
3501 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3504 * call.c (convert_like_real): Use "converting" rather than
3505 "argument" as the descriptive keyword to
3506 dubious_conversion_warnings.
3507 * typeck.c (convert_for_assignment): Do not call
3508 dubious_conversion_warnings.
3510 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3513 * init.c (build_delete): Emit a more informative error message in
3514 case of an incomplete type, and on the correct source line.
3516 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3518 * error.c, search.c: Update copyright.
3520 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3523 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3524 linkage for the typeinfo name string.
3526 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3529 * cp-tree.h (fold_non_dependent_expr): New function.
3530 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3531 (cp_parser_template_argument): Use fold_non_dependent_expr.
3532 (cp_parser_direct_declarator): Likewise.
3533 * pt.c (fold_non_dependent_expr): New function.
3534 (convert_nontype_argument): Use it.
3535 (tsubst_qualified_id): Simplify.
3536 (tsubst_copy_and_build): Likewise.
3538 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3540 * decl.c (cxx_push_function_context): Do not set
3541 current_function_is_thunk.
3542 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3545 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3548 * pt.c (more_specialized_class): Increase processing_template_decl
3549 while partial ordering.
3551 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3554 * decl.c (start_function): Do not call pushdecl for any
3555 instantiation or specialization of a primary template.
3557 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3560 * parser.c (cp_parser_class_name): Robustify.
3563 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3566 * semantics.c (finish_id_expression): Do not return an
3567 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3569 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3572 * pt.c (build_non_dependent_expr): Do not build
3573 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3576 * semantics.c (finish_id_expression): Do not return an
3577 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3580 * parser.c (cp_parser_simple_declaration): When skipping to the
3581 end of the statement swallow the terminating semicolon.
3583 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3586 * init.c (build_offset_ref): Improve error recovery for invalid
3587 uses of non-static member functions.
3590 * cp-tree.h (cp_build_type_attribute_variant): New function.
3591 * class.c (build_clone): Use cp_build_type_attribute_variant.
3592 * decl.c (duplicate_decls): Likewise.
3593 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3594 (tsubst_function_type): Likewise.
3595 * tree.c (build_exception_variant): Check attributes before
3596 concluding that two types are the same.
3597 (cp_build_type-attribute_variant): New method.
3598 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3601 * call.c (convert_class_to_reference): Keep better track of
3602 pedantically invalid user-defined conversions.
3604 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3607 * pt.c (tsubst_qualified_id): Improved error message when a type
3608 is expected but not found.
3610 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3612 * class.c: Fix comment typos.
3614 * error.c: Likewise.
3615 * parser.c: Likewise.
3617 * search.c: Likewise.
3618 * typeck.c: Likewise.
3620 2004-01-30 Richard Henderson <rth@redhat.com>
3623 * method.c (use_thunk): Don't force_target_expr for void thunks.
3624 * tree.c (build_target_expr_with_type): Assert non-void type.
3625 (force_target_expr): Likewise.
3627 2004-01-30 Michael Matz <matz@suse.de>
3629 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3631 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3635 * decl.c (grokdeclarator): Check immediatly type completeness for
3636 non-dependent types.
3638 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3641 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3642 a sizeof expression.block
3644 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3647 * mangle.c (write_encoding): Correct encoding of member template
3650 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3652 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3653 template name as it was `<::' (digraph typo).
3654 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3655 (cp_parser_id_expression): Use it.
3656 (cp_parser_nested_name_specifier_opt): Likewise.
3657 (cp_parser_template_name): Likewise.
3658 (cp_parser_class_name): Likewise.
3659 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3661 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3664 * typeck.c (merge_types): Do not merge attributes into
3668 * parser.c (cp_parser_direct_declarator): Do not prevent
3669 backtracking inside a parenthesized declarator.
3670 (cp_parser_parameter_declaration): Fix typo in comment.
3672 2004-01-28 Jan Hubicka <jh@suse.cz>
3674 * semantics.c (expand_body) Do emit_associated_thunks before
3677 2004-01-27 Devang Patel <dpatel@apple.com>
3679 * name-lookup.c: Include "debug.h"
3680 (do_namespace_alias): Invoke debug_hooks to emit debug info
3681 for namespace alias.
3682 (do_local_using_decl): Invoke debug_hooks to emit debug info
3684 (do_class_using_decl): Same.
3685 (do_toplevel_using_decl): Same.
3686 (do_using_directive): Same.
3687 (cp_emit_debug_info_for_using): New function.
3688 * Make-lang.in (cp/parser.o): Depend on debug.h
3689 (cp/name-lookup.o): Same.
3691 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3693 * cp-tree.h (language_function, lang_type_header): Use
3695 * name-lookup.h (cp_binding_level): Likewise.
3697 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3700 * semantics.c (finish_for_expr): Check for unresolved overloaded
3703 * class.c (add_method): Just check processing_template_decl to
3704 determine whether or not we are within a template.
3705 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3706 * init.c (decl_constant_value): Check the type of the declaration,
3708 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3709 (push_to_top_level): ... this.
3710 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3711 * pt.c (push_template_decl_real): Reorder condition for speed.
3712 (convert_template_argument): Use dependency-checking functions in
3713 place of uses_template_parms.
3714 (lookup_template_class): Avoid calling uses_template_parms more
3716 (uses_template_parms): Reimplement, using dependency-checking
3718 (instantiate_class_template): Use push_to_top_level, not
3719 maybe_push_to_top_level.
3720 (type_unification_real): Simplify.
3721 (type_dependent_expression_p): Handle OFFSET_REFs and
3723 (any_dependent_template_arguments_p): Handle multiple levels of
3725 * semantics.c (expand_or_defer_fn): Do not check
3726 uses_template_parms for template instantiations.
3727 * typeck.c (comptypes): Avoid calling cp_type_quals.
3729 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3732 * call.c (build_over_call): Do not convert arguments when
3733 processing a template.
3734 * pt.c (build_non_dependent_expr): Do not build a
3735 NON_DEPENDENT_EXPR for arithmetic constants.
3737 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3740 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3741 returns a TYPE_DECL. no further lookup is required.
3742 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3743 is invalid. Rework to give better diagnostics.
3745 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3748 * pt.c (instantiate_class_template): Add an error_mark_node
3750 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3752 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3755 * decl.c (finish_function): Move the call to
3756 finish_fname_decls below the call to
3757 finish_eh_spec_block.
3759 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3761 * optimize.c, typeck2.c: Update copyright.
3763 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3765 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3766 init.c, mangle.c, typeck.c: Update copyright.
3768 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3770 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3772 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3774 * Make-lang.in: Replace $(docdir) with doc.
3775 (c++.info, c++.srcinfo): Dummy entry.
3776 (c++.man, c++.srcman): New rules.
3777 (c++.install-man): Revamp rule.
3779 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3781 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3782 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3783 immediate $(shell) instead of deferred backquote.
3785 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3788 * parser.c (cp_parser_postfix_expression): When encountering
3789 incomplete type on left-hand side of "->" or ".", treat the entire
3790 expression as erroneous.
3793 * call.c (build_field_call): Remove.
3794 (n_build_method_call): Likewise.
3795 (build_method_call): Likewise.
3796 (build_new_method_call): Do not call build_field_call.
3797 * class.c (n_build_method_call): Remove.
3798 (print_class_statistics): Do not print it.
3799 * cp-tree.h (build_method_call): Remove declaration.
3800 (finish_object_call_expr): Likewise.
3801 (build_new_1): Do not use build_method_call.
3802 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3803 when the function appearing on the right-hand-side of "." or "->"
3804 is not actually a function.
3805 * pt.c (tsubst_copy_and_build): Likewise.
3806 * semantics.c (finish_object_call_expr): Remove.
3808 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3811 * pt.c (tsubst): Use finish_typeof.
3813 2004-01-18 Jason Merrill <jason@redhat.com>
3816 * except.c (build_throw): In a template, set
3817 current_function_returns_abnormally.
3819 2004-01-17 Fred Fish <fnf@intrinsity.com>
3822 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3823 except don't call array_type_nelts() with a VECTOR_TYPE.
3825 2004-01-16 Jan Hubicka <jh@suse.cz>
3827 * mangle.c (write_mangled_name): Remove inline modifier.
3829 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3832 * decl.c (compute_array_index_type): Fix grammar in comment.
3833 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3836 * call.c (name_as_c_string): Print conversion operator names
3840 * call.c (initialize_reference): Pass -1 for inner parameter to
3843 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3846 * parser.c (cp_parser_base_specifier): Check for an invalid
3847 keyword `typename' and emit an user-friendly error message.
3849 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3852 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3853 (handle_pragma_implementation): Likewise.
3855 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3858 * typeck.c (build_class_member_access_expr): Allow to access members
3859 of the currently open class.
3860 (finish_class_member_access_expr): Likewise.
3862 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3865 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3866 name by value, instead of computing them.
3867 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3868 arguments. Pass them to validate_nonmember_using_decl.
3869 * name-lookup.h (do_local_using_decl): Adjust.
3870 (do_toplevel_using_decl): Likewise.
3871 * parser.c (cp_parser_using_declaration): Likewise.
3872 * pt.c (tsubst_expr): Likewise.
3874 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3878 * name-lookup.c (qualified_lookup_using_namespace): Search
3879 strongly-associated namespaces first, and only then try other
3882 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3884 * Make-lang.in (c++.srcextra): Dummy entry.
3886 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3889 * parser.c (cp_parser_template_name): Don't try to parse a
3890 conversion-function-id, as it cannot be a template-name.
3891 (cp_parser_simple_type_specifier): Check for invalid template-ids
3892 even after a built-in type.
3894 2004-01-14 Jan Hubicka <jh@suse.cz>
3897 * pt.c (instantiate_decl): Do not increase function_depth.
3899 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3903 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3904 attributes and discard.
3905 * decl.c (xref_tag): Don't overwite existing attributes with
3908 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3911 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3912 is no destructor while looking up a BIT_NOT_EXPR.
3914 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3916 * cxxfilt.c: Remove unused file.
3918 2004-01-14 Jan Hubicka <jh@suse.cz>
3920 Partial fix to PR c++/12850
3921 * decl2.c (mark_used): Do not proactively instantiate templates
3922 when compiling in unit-at-a-time or not optimizing.
3923 * optimize.c (maybe_clone_body): Do not increase function depth.
3925 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3928 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3930 2004-01-12 Steven Bosscher <stevenb@suse.de>
3933 * parser.c (cp_parser_member_declaration): Any non-type is also
3934 not a class or a function.
3936 2004-01-12 Jason Merrill <jason@redhat.com>
3939 * class.c (build_base_path): Do not mark vtable references as
3941 (build_vtbl_ref_1): Likewise.
3943 2004-01-12 Richard Henderson <rth@redhat.com>
3946 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3947 (store_init_value): Use it.
3948 * decl.c (check_initializer): Expect full initialization code
3949 from store_init_value.
3950 * init.c (expand_aggr_init_1): Likewise.
3951 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3953 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3955 * class.c (layout_class_type): For non-POD class types, also copy
3956 the DECL_SIZE and DECL_MODE of fields to the base class type.
3958 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3961 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3962 calling regenerate_decl_from_template.
3964 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3967 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3968 decl-specifier occurring along with a class definition.
3970 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3972 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3973 clauses to comments describing declares_class_or_enum.
3974 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3977 2004-01-12 Jan Hubicka <jh@suse.cz>
3979 * pt.c (for_each_template_parm): Do not check for duplicates.
3980 (for_each_template_parm): Use walk_tree duplicate checking code.
3982 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3985 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3986 is error_mark_node, don't add any more decl_specs.
3987 (cp_parser_init_declarator): After committing to a declaration, if
3988 the decl_specifiers start with error_mark_node, issue an error and
3989 change the type to "int".
3991 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3994 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3996 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4000 * pt.c (tsubst): Substitution must fail if we are attempting to
4001 create an array with element type that is an abstract class type.
4002 * decl.c (cp_finish_decl): Strip pointers and array types recursively
4003 before calling abstract_virtuals_error.
4005 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
4007 * name-lookup.c (qualified_lookup_using_namespace): Consider
4008 strong using directives even if we've already found a binding.
4010 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4012 * cp-tree.h (cxx_expand_expr): Change prototype.
4013 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
4015 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4018 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
4019 looking into them recursively. They can be there because of the
4020 new __offsetof__ extension.
4022 2004-01-07 Zack Weinberg <zack@codesourcery.com>
4024 * parser.c (cp_parser_save_member_function_body): Mark the
4027 2004-01-05 Mark Mitchell <mark@codesourcery.com>
4030 * class.c (build_clone): Copy type attributes from the original
4031 function to the clone.
4034 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
4035 references as constant.
4038 * parser.c (cp_parser_explicit_instantiation): Improve error
4040 (cp_parser_require): Improve indication of the error location.
4043 * parser.c (cp_parser_class_head): Reorder logic to check for
4044 invalid qualification.
4046 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4049 * name-lookup.c (lookup_using_namespace): Remove spacesp
4051 (unqualified_namespace_lookup): Likewise.
4052 (lookup_qualified_name): Adjust accordingly.
4053 (lookup_name_real): Likewise.
4054 (lookup_arg_dependent): Do not eliminate the namespace of the
4055 functions found by unqualified name lookup unless that is the
4058 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
4060 * semantics.c (push_deferring_access_checks): Fix format.
4061 (resume_deferring_access_checks): Likewise.
4062 (stop_deferring_access_checks): Likewise.
4063 (pop_deferring_access_checks): Likewise.
4064 (get_deferred_access_checks): Likewise.
4065 (pop_to_parent_deferring_access_checks): Likewise.
4066 (perform_deferred_access_checks): Likewise.
4067 (perform_or_defer_access_check): Likewise.
4069 2004-01-04 Richard Henderson <rth@redhat.com>
4071 * call.c (build_over_call): Don't create a save_expr of an
4072 aggregate, but rather its address.
4074 2004-01-04 Mark Mitchell <mark@codesourcery.com>
4077 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
4078 an offsetof expression.
4080 * parser.c (cp_parser_parameter_declaration): Fix comment.
4083 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
4084 (reference_binding): Set it when appropriate.
4085 (build_temp): New function, split out from ...
4086 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
4087 (initialize_reference): Likewise.
4090 * parser.c (cp_parser): Add in_type_id_in_expr_p.
4091 (cp_parser_new): Initialize it.
4092 (cp_parser_postfix_expression): Set it.
4093 (cp_parser_sizeof_operand): Likewise.
4094 (cp_parser_parameteR_declaration): Do not commit early to tenative
4095 parsers when in_type_id_in_expr_p is set.
4097 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4100 * parser.c (cp_parser_template_argument): Don't call
4101 make_unbound_class_template directly.
4102 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
4103 UNBOUND_CLASS_TEMPLATE tree node.
4105 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
4108 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
4110 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4113 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
4114 (DECL_FUNCTION_TEMPLATE_P): Use it.
4115 (DECL_CLASS_TEMPLATE_P): Likewise.
4116 * parser.c (cp_parser_lookup_name): Add is_template parameter.
4117 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
4118 (cp_parser_template_name): Likewise.
4119 (cp_parser_elaborated_type_specifier): Likewise.
4120 (cp_parser_namespace_name): Likewise.
4121 (cp_parser_class_name): Likewise.
4122 (cp_parser_lookup_name_simple): Likewise.
4124 See ChangeLog.3 for earlier changes.