1 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4 * pt.c (convert_nontype_argument): Disallow conversions between
5 different enumeration types.
7 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
9 * cp-tree.h (BINFO_MARKED): Remove.
10 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
11 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
12 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
13 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
14 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
15 (mark_primary_bases, determine_primary_base, base_derived_from,
16 dfs_find_final_overrider, dfs_find_final_overrider_q,
17 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
18 dfs_modify_vtables, walk_subobject_offsets,
19 layout_nonempty_base_or_field, build_base_field,
20 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
21 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
22 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
23 build_ctor_vtbl_group, accumulate_vtble_inits,
24 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
25 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
26 add_vcall_offset_vtbl_entries_1): Likewise.
27 * decl.c (xref_basetypes): Incomming virtual base indicated by
29 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
30 * init.c (finish_init_stmts, sort_mem_initializers,
31 emit_mem_initializers, build_vtble_address, expand_member_init,
32 push_base_cleanups): Likewise.
33 * method.c (do_build_copy_constructor): Likewise.
34 * pt.c (instantiate_class_template,
35 get_template_base_recursive): Likewise.
36 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
37 get_pseudo_ti_desc): Likewise.
38 * search.c (lookup_base_r, dynamic_cast_base_recurse,
39 binfo_from_vbase, binfo_via_virtual, copied_binfo,
40 original_binfo): Likewise.
41 * semantics.c (finish_base_specifier): Virtualness is indicated
43 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
45 2004-07-06 Mark Mitchell <mark@codesourcery.com>
48 2004-06-24 Jason Merrill <jason@redhat.com>
50 * decl.c (grokparms): Give the PARM_DECL reference type if the
51 parameter is passed by invisible reference.
53 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
55 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
56 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
57 * pt.c (check_instantiated_args, unify): Likewise.
59 2004-07-05 Phil Edwards <phil@codesourcery.com>
61 * Make-lang.in (check-c++, lang_checks): Add some comments.
63 2004-07-05 Zack Weinberg <zack@codesourcery.com>
65 * cp-mudflap.c: Delete file.
66 * Makefile.in: Remove all references to cp-mudflap.o.
68 2004-07-05 Zack Weinberg <zack@codesourcery.com>
70 * decl.c (cxx_init_decl_processing): Call
71 build_common_tree_nodes before creating the global NAMESPACE_DECL.
73 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
76 * call.c (build_operator_new_call): Look only at global scope.
78 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
80 * call.c (enforce_access): Expect TREE_BINFO.
81 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
82 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
83 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
85 (BINFO_LANG_ELTS): Remove.
86 (BINFO_LANG_SLOTS): New.
87 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
88 (CLASSTYPE_TEMPLATE_INFO): Adjust.
89 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
90 * search.c (lookup_member): Check TREE_BINFO.
91 * semantics.c (perform_or_defer_access_check): Likewise.
92 (check_accessibility_of_qualified_id): Check
93 deferred_access_no_check.
94 * tree.c (make_binfo): Use make_tree_binfo.
96 2004-07-04 Mark Mitchell <mark@codesourcery.com>
98 * method.c (implicitly_declare_fn): Set linkage of generated
101 2004-07-04 Richard Henderson <rth@redhat.com>
103 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
105 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
108 * name-lookup.c (push_class_level_binding): Don't pass a
109 TREE_LIST of ambiguous names to check_template_shadow as it
110 only handles declarations. Instead, pull the declaration
113 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
116 * pt.c (check_explicit_specialization): Clarify error message.
118 2004-07-02 Richard Henderson <rth@redhat.com>
120 * tree.c (cp_unsave_r): Update remap_save_expr call.
122 2004-07-02 Mark Mitchell <mark@codesourcery.com>
125 * mangle.c (write_template_arg): Correct mangling.
128 * decl.c (grokdeclarator): Robustify.
130 2004-07-01 Richard Henderson <rth@redhat.com>
132 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
133 * method.c (synthesize_method): Don't clear_last_expr.
134 * name-lookup.c (maybe_push_cleanup_level): Likewise.
136 2004-07-01 Nick Clifton <nickc@redhat.com>
138 * decl2.c (import_export_class): Invoke the
139 import_export_class field in the gcc_target structure if it is not
142 2004-06-30 Richard Henderson (rth@redhat.com>
144 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
145 * method.c (use_thunk): Likewise.
147 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
149 * call.c (build_over_call), typeck.c (build_function_call): Call
150 check_function_arguments instead of check_function_format.
152 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
154 * call.c (build_over_call), typeck.c (build_function_call): Update
155 calls to check_function_format.
157 2004-06-30 Richard Henderson <rth@redhat.com>
159 * call.c (build_over_call): Use __builtin_memcpy for copying
160 CLASS_AS_BASE rather than funny casting.
162 2004-06-30 Richard Henderson <rth@redhat.com>
164 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
165 TYPE_SIZE_UNIT of full_type.
167 2004-06-30 Per Bothner <per@bothner.com>
169 Conditionally compile support for --enable-mapped_location.
170 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
171 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
172 adjustments - which I don't understand.
173 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
174 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
175 (print_instantiation_partial_context): Use expand_location.
176 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
177 * name-lookup.c: Likewise.
178 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
179 * name-lookup.c: Use input_line macro.
180 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
181 (cp_parser_statement): Rename locaal variable statement_locus to
182 statement_location and use SET_EXPR_LOCATION macro.
183 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
184 * tree.c (cp_walk_subtrees): Likewise.
186 2004-06-29 Per Bothner <per@bothner.com>
188 * tree.c (build_min_nt, build_min, build_min_non_dep):
189 Don't set TREE_COMPLEXITY from input_line.
191 2004-06-29 Paul Brook <paul@codesourcery.com>
193 * init.c: Include target.h.
194 (get_cookie_size): Remove and replace with target hook.
196 (build_new_1): Store the element size in the cookie.
198 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
201 * parser.c (cp_parser_template_declaration_after_export): Disable
202 access checks here ...
203 (cp_parser_class_specifier): ... not here.
205 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
207 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
208 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
209 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
212 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
214 * cp-tree.h (struct deferred_access): Move to ...
215 * semantics.c (struct deferred_access): ... here. Adjust.
216 (deferred_access_stack): Make a VEC(deferred_access),
217 (deferred_access_free_list): Remove.
218 (deferred_access_no_check): New.
219 (push_deferring_access_checks, resume_deferring_access_checks,
220 stop_deferring_access_checks, pop_deferring_access_checks,
221 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
222 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
224 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
227 * call.c (build_temp): Declare.
228 (check_constructor_callable): New.
229 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
230 CONSTRUCTOR_CALLABLE.
231 (convert_like_real, initialize_reference): Use
232 check_constructor_callable.
233 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
234 (LOOKUP_*): Renumber.
236 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
238 * friend.c (add_friend): Only perform access checks when context
240 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
241 * parser.c (cp_parser_class_specifier): Disable access checks here
242 when parsing the body of a templated class.
243 * semantics.c (perform_or_defer_access_checks): Reorder to allow
244 NULL binfos when not checking access.
246 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
248 Use vector API for vbase list.
249 * cp-tree.h: Include vec.h
250 (DEF_VEC_P (tree)): New type.
251 (struct lang_type_class): Change vbase's member type.
252 (binfo_for_vbase): Declare.
253 * class.c (determine_primary_base, base_derived_from,
254 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
255 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
256 build_vtbl_initializer): Adjust.
257 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
259 * init.c (sort_mem_initializers, expand_member_init,
260 push_base_cleanups): Adjust.
261 * method.c (do_build_copy_constructor): Adjust.
262 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
263 (binfo_for_vbase): New.
264 * tree.c (copy_base_binfos): Adjust.
266 2004-06-28 Mark Mitchell <mark@codesourcery.com>
268 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
270 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
273 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
274 paranthesis in case of pointers to array members.
275 * error.c (dump_type_prefix): Likewise.
276 (dump_type_suffix): Maybe issue a whitespace when printing
279 2004-06-27 Mark Mitchell <mark@codesourcery.com>
282 * parser.c (cp_parser_set_decl_spec_type): Refine test for
283 redefinition of built-in types.
285 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
287 * error.c (pp_template_argument_list_start): Remove.
288 (pp_template_argument_list_end): Likewise.
289 (pp_separate_with_comma): Use pp_cxx_separate_with.
290 (reinit_global_formatting_buffer): Remove.
291 (pp_non_consecutive_character): Likewise.
292 (dump_scope): Use pp_cxx_colon_colon.
293 (dump_template_parameter): Use pp_cxx_identifier,
294 pp_cxx_tree_identifier and pp_cxx_whitespace.
295 (dump_templat_bindings): Replace use of pp_string with sequence
296 of pp_cxx_whitespace and pp_equal.
297 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
298 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
300 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
301 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
302 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
303 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
304 pp_cxx_right_bracket, pp_cxx_identifier throughout,
305 (dump_decl): Likewise.
306 (dump_template_decl): Likewise.
307 (dump_function_decl): Likewise. Set padding as appropriate.
308 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
310 (dump_exception_spec): Likewise.
311 (dump_function_name): Use pp_cxx_tree_identifier and
313 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
314 pp_cxx_end_template_argument_list.
315 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
316 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
317 pp_cxx_whitespace throughout.
318 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
320 (dump_unary_op): Likewise.
321 (reinit_cxx_pp): New function.
322 (type_as_string); Use it.
323 (expr_as_string): Likewise.
324 (decl_as_string); Likewise.
325 (context_as_string): Likewise.
326 (lang_decl_name): Likewise.
327 (decl_to_string): Likewise.
328 (expr_to_string): Likewise.
329 (parm_to_string): Likewise.
330 (type_to_string): Likewise.
331 (args_to_string): Likewise.
332 (cv_to_string): Likewise.
334 2004-06-26 Mark Mitchell <mark@codesourcery.com>
336 * cp-tree.h (cp_cv_quals): New type.
337 (cp_declarator): Use it instead of "tree" as appropriate.
338 (grok_method_quals): Adjust prototype.
339 (grokclassfn): Likewise.
340 (do_friend): Likewise.
341 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
342 (grokdeclarator): Likewise.
343 * decl2.c (grok_method_quals): Likewise.
344 (grokclassfn): Likewise.
345 * friend.c (do_friend): Likewise.
346 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
347 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
348 (make_pointer_declarator): Likewise.
349 (make_reference_declarator): Likewise.
350 (make_ptrmem_declarator): Likewise.
351 (cp_parser_ptr_operator): Likewise.
352 (cp_parser_cv_qualifier_seq_opt): Likewise.
353 (cp_parser_cv_qualifier_opt): Remove.
354 (cp_parser_new_declarator_opt): Adjust call to
355 cp_parser_ptr_operator.
356 (cp_parser_conversion_declaration_opt): Likewise.
357 (cp_parser_declarator): Use cp_cv_quals, not tree.
358 (cp_parser_direct_declarator): Likewise.
360 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
362 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
363 Rename DECL_STMT to DECL_EXPR.
364 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
365 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
366 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
368 2004-06-26 Jan Hubicka <jh@suse.cz>
371 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
372 reachability analysis.
374 2004-06-25 Mark Mitchell <mark@codesourcery.com>
376 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
379 2004-06-25 Paul Brook <paul@codesourcery.com>
381 * decl2.c (get_guard): Call targetm.cxx.guard_type.
382 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
384 2004-06-24 Mark Mitchell <mark@codesourcery.com>
386 * decl.c (grokdeclarator): Restore error messages about __thread.
387 * parser.c (cp_parser_decl_specifier_seq): Likewise.
389 2004-06-24 Jason Merrill <jason@redhat.com>
392 * decl.c (grokparms): Give the PARM_DECL reference type if the
393 parameter is passed by invisible reference.
395 2004-06-24 Andreas Schwab <schwab@suse.de>
397 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
399 2004-06-23 Mark Mitchell <mark@codesourcery.com>
401 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
402 (cp/decl.o): Likewise.
403 (cp/decl2.o): Likewise.
405 (cp/semantics.o): Likewise.
406 * config-lang.in (gtfiles): Do not reference cp/lex.h.
407 * class.c: Do not include lex.h.
408 (add_implicitly_declared_members): Do not use
409 adding_implicit_members.
410 (check_bases_and_members): Do not talk about grok_x_components.
411 * cp/cp-tree.h (adding_implicit_members): Remove.
412 (cp_storage_class): New type.
413 (cp_decl_spec): Likewise.
414 (cp_decl_specifier_seq): Likewise.
415 (cp_parameter_declarator): Use it for the decl_specifiers field.
416 (check_tag_decl): Adjust prototype.
417 (shadow_tag): Likewise.
418 (groktypename): Likewise.
419 (start_decl): Likewise.
420 (start_function): Likewise.
421 (start_method): Likewise.
422 (grok_x_components): Remove.
423 (grokfield): Adjust prototype.
424 (grokbitfield): Likewise.
425 (finish_member_class_template): Remove.
426 * decl.c: Do not include lex.h.
427 (adding_implicit_members): Do not define.
428 (check_tag_decl): Do not use trees to represent decl-specifiers.
429 (shadow_tag): Likewise.
430 (groktypename): Likewise.
431 (start_decl): Likewise.
432 (grokvardecl): Likewise.
433 (grokdeclarator): Likewise.
434 (grokparms): Likewise.
435 (start_function): Likewise.
436 (start_method): Likewise.
437 * decl.h (grokdeclarator): Adjust prototype.
438 * decl2.c: Do not include lex.h.
439 (grok_x_components): Remove.
440 (grokfield): Do not use trees to represent decl-specifiers.
441 (grokbitfield): Likewise.
442 * lex.c: Do not include lex.h.
444 * parser.c: Include target.h.
445 (clear_decl_specs): New function.
446 (cp_parser_translation_unit): Do not use trees to represent
448 (cp_parser_postfix_expression): Likewise.
449 (cp_parser_new_type_id): Likewise.
450 (cp_parser_condition): Likewise.
451 (cp_parser_simple_declaration): Likewise.
452 (cp_parser_decl_specifier_seq): Likewise.
453 (cp_parser_function_specifier_opt): Likewise.
454 (cp_parser_conversion_type_id): Likewise.
455 (cp_parser_template_parameter): Likewise.
456 (cp_parser_explicit_instantiation): Likewise.
457 (cp_parser_type_specifier): Likewise.
458 (cp_parser_simple_type_specifier): Likewise.
459 (cp_parser_init_declarator): Likewise.
460 (cp_parser_type_id): Likewise.
461 (cp_parser_type_specifier_seq): Likewise.
462 (cp_parser_parameter_declaration): Likewise.
463 (cp_parser_member_declaration): Likewise.
464 (cp_parser_exception_declaration): Likewise.
465 (cp_parser_function_definition_from_specifiers_and_declarator):
467 (cp_parser_single_declaration): Likewise.
468 (cp_parser_save_member_function_body): Likewise.
469 (cp_parser_friend_p): Likewise.
470 (cp_parser_set_storage_class): New function.
471 (cp_parser_set_decl_spec_type): Likewise.
472 * pt.c: Do not include lex.h.
473 * semantics.c: Likewise.
474 (finish_member_class_template): Remove.
476 2004-06-23 Roger Sayle <roger@eyesopen.com>
478 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
479 longer take both "args" and "convert_args" as arguments.
480 (build_op_delete_call): Update call to build_cxx_call.
481 (build_over_call): Likewise, update call to build_cxx_call.
482 * cp-tree.h (build_cxx_call): Update funtion prototype.
483 * typeck.c (build_function_call): Don't call expand_tree_builtin.
484 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
485 (throw_bad_typeid): Likewise.
486 (build_dynamic_cast_1): Likewise.
488 2004-06-22 Richard Henderson <rth@redhat.com>
490 * class.c (build_vfn_ref): Take a pointer not object. Build
492 (cp_fold_obj_type_ref): New.
493 * call.c (build_over_call): Update build_vfn_ref call.
494 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
495 * cp-tree.h (cp_fold_obj_type_ref): Declare.
497 2004-06-21 Jason Merrill <jason@redhat.com>
500 * cp-gimplify.c (cp_gimplify_init_expr): Look through
503 2004-06-21 Mark Mitchell <mark@codesourcery.com>
505 * cp-tree.def (NEW_EXPR): Add a fourth slot.
506 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
507 (TREE_PARMLIST): Likewise.
508 (CALL_DECLARATOR_PARMS): Likewise.
509 (CALL_DECLARATOR_QUALS): Likewise.
510 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
511 (cp_declarator_kind): New type.
512 (cp_parameter_declarator): Likewise.
513 (cp_declarator): Likewise.
514 (cp_error_declarator): Likewise.
515 (no_parameters): Likewise.
516 (groktypename): Change prototype.
517 (start_decl): Likewise.
518 (start_handler_parms): Likewise.
519 (get_scope_of_declarator): Likewise.
520 (start_function): Likewise.
521 (start_preparsed_function): New function.
522 (start_function): Change prototype.
523 (start_method): Likewise.
524 (grokfield): Likewise.
525 (grokbitfield): Likewise.
526 (build_new): Likewise.
527 (make_pointer_declarator): Remove.
528 (make_reference_declarator): Likewise.
529 (make_call_declarator): Likewise.
530 (set_quals_and_spec): Likewise.
531 (process_template_parm): Change prototype.
532 (begin_function_definition): Remove.
533 (finish_parmlist): Remove.
534 * decl.c (groktypename): Do not use trees to represent
536 (start_decl): Likewise.
537 (start_handler_parms): Remove.
538 (get_scope_of_declarator): Reimplement.
539 (grokdeclarator): Do not use trees to represent declarators.
540 (grokparms): Likewise.
541 (start_function): Likewise.
542 (start_method): Likewise.
543 (build_void_list_mode): Do not use TREE_PARMLIST.
544 * decl.h (grokdeclarator): Change prototype.
545 * decl2.c (grok_method_quals): Robustify.
546 (grok_x_components): Do not use trees to represent declarators.
547 (grokfield): Likewise.
548 (grokbitfield): Likewise.
549 (start_objects): Build FUNCTION_DECLs, not declarators.
550 (start_static_storage_duration_function): Likewise.
551 * init.c (build_new): Simplify.
552 * lex.c (make_pointer_declarator): Remove.
553 (make_reference_declarator): Likewise.
554 (make_call_declarator): Likewise.
555 (set_quals_and_spec): Likewise.
556 * method.c (use_thunk): Use start_preparsed_function.
557 (synthesize_method): Likewise.
558 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
559 * optimize.c (maybe_clone_body): Use start_preparsed_function.
560 * parser.c (cp_error_declarator): New variable.
561 (declarator_obstack): Likewise.
562 (alloc_declarator): New function.
563 (make_declarator): Likewise.
564 (make_id_declarator): Likewise.
565 (make_pointer_declarator): Likewise.
566 (make_reference_declarator): Likewise.
567 (make_ptrmem_declarator): Likewise.
568 (make_call_declarator): Likewise.
569 (make_array_declarator): Likewise.
570 (no_parameters): New variable.
571 (make_parameter_declarator): Likewise.
572 (cp_parser_check_for_definition_in_return_type): Do not use trees
573 to represent declarators.
574 (cp_parser_translation_unit): Likewise.
575 (cp_parser_new_expression): Likewise.
576 (cp_parser_new_type_id): Likewise.
577 (cp_parser_new_declarator_opt): Likewise.
578 (cp_parser_direct_new_declarator): Likewise.
579 (cp_parser_condition): Likewise.
580 (cp_parser_declaration_statement): Likewise.
581 (cp_parser_declaration): Likewise.
582 (cp_parser_conversion_type_id): Likewise.
583 (cp_parser_conversion_declarator_opt): Likewise.
584 (cp_parser_template_parameter_list): Likewise.
585 (cp_parser_template_parameter): Likewise.
586 (cp_parser_explicit_instantiation): Likewise.
587 (cp_parser_init_declarator): Likewise.
588 (cp_parser_declarator): Likewise.
589 (cp_parser_direct_declarator): Likewise.
590 (cp_parser_type_id): Likewise.
591 (cp_parser_parameter_declaration_clause): Likewise.
592 (cp_parser_parameter_declaration_list): Likewise.
593 (cp_parser_parameter_declaration): Likewise.
594 (cp_parser_member_declaration): Likewise.
595 (cp_parser_exception_declaration): Likewise.
596 (cp_parser_check_declarator_template_parameters): Likewise.
597 (cp_parser_function_definition_from_specifiers_and_declarator):
599 (cp_parser_save_member_function_body): Likewise.
600 * pt.c (process_template_parm): Add is_non_type parameter.
601 (convert_template_argument): Adjust call to groktypename.
602 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
603 (tsubst): Do not expect declarators.
604 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
606 (instantiate_decl): Use start_preparsed_function.
607 * semantics.c (begin_function_definition): Remove.
608 (finish_parmlist): Remove.
609 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
612 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
614 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
615 (build_new_method_call): Likewise.
616 * decl.c (local_variable_p_walkfn): Don't walk into types.
617 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
618 (build_anon_union_vars): Add new operand for COMPONENT_REF.
619 * init.c (buld_new): Add new operand for ARRAY_REF.
620 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
621 (do_build_assign_ref): Likewise.
622 * parser.c (cp_parser_direct_new_declarator): Add new operands
624 (cp_parser_direct_declarator): Likewise.
625 * pt.c (tsubst): Likewise.
626 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
628 * semantics.c (finish_non_static_data_member): Add new operand
630 * typeck.c (build_class_member_access_expr): Likewise.
631 (build_class_member_access_expr, finish_class_member_access_expr):
633 (build_ptrmemfunc_access_expr): Likewise.
634 (build_array_ref): Add new operands for ARRAY_REF.
635 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
636 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
638 2004-06-21 Richard Henderson <rth@redhat.com>
640 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
641 * parser.c (cp_parser_jump_statement): Update commentary.
642 * pt.c (tsubst_expr): Use RETURN_EXPR.
643 * semantics.c (finish_return_stmt): Likewise.
644 (finalize_nrv_r): Likewise.
645 * typeck.c, typeck2.c: Update file start commentary.
647 2004-06-21 Richard Henderson <rth@redhat.com>
649 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
651 2004-06-20 Richard Henderson <rth@redhat.com>
653 * cp-tree.h (add_decl_stmt): Declare.
654 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
655 * semantics.c (maybe_cleanup_point_expr): New.
656 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
657 finish_for_expr, finish_switch_cond): Use it.
658 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
660 2004-06-20 Richard Henderson <rth@redhat.com>
662 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
663 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
664 (cp_gimplify_expr): Call it.
665 (gimplify_cleanup_stmt): Move from c-gimplify.c.
666 (cp_genericize): New.
667 * decl.c (finish_function): Call it.
668 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
669 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
670 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
671 (cp_genericize): Declare.
672 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
673 * dump.c (cp_dump_tree): Likewise.
674 * semantics.c (push_cleanup): Move from c-semantics.c.
676 2004-06-20 Zack Weinberg <zack@codesourcery.com>
678 * cp-lang.c (has_c_linkage): Implement.
680 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
681 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
682 (builtin_function_1): Don't call make_decl_rtl.
683 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
684 (grokvardecl): Don't call mangle_decl.
685 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
687 * method.c (set_mangled_name_for_decl): Delete.
688 * name-lookup.c (pushdecl): When a local extern shadows a
689 file-scope declaration of the same object, give both DECLs the
691 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
692 on DECL_ASSEMBLER_NAME.
694 2004-06-19 Richard Henderson <rth@redhat.com>
696 * cp-gimplify.c: Remove unnecessary prototypes.
697 (cp_gimplify_stmt): Merge into ...
698 (cp_gimplify_expr): ... here. Move to end of file. Handle
699 stmts_are_full_exprs_p frobbing.
700 * cp-tree.h (cp_gimplify_stmt): Remove.
701 * pt.c (tsubst_expr): Merge prep_stmt and unify.
702 * tree.c (init_tree): Don't set lang_gimplify_stmt.
704 2004-06-18 Richard Henderson <rth@redhat.com>
707 * semantics.c (begin_cond): New.
708 (finish_cond): Rewrite to handle template DECL_STMTs specially.
709 Assume that non-template decls go land before the conditional.
710 (simplify_loop_decl_cond): Likewise.
711 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
712 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
713 begin_switch_stmt, finish_switch_cond): Update to match.
715 2004-06-17 Jason Merrill <jason@redhat.com>
718 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
719 (finish_stmt_expr_expr): Update type after conversions.
720 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
721 Handle void initializer.
722 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
724 2004-06-17 Geoffrey Keating <geoffk@apple.com>
726 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
727 * cp-tree.h (defer_fn): Delete.
728 * decl2.c (defer_fn): Delete.
729 (finish_file): Simplify deferred_fns loops; check that
730 only used inline functions get into deferred_fns.
731 (mark_used): Inline previous contents of defer_fn.
733 2004-06-16 Richard Henderson <rth@redhat.com>
735 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
736 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
737 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
738 of CTOR_INITIALIZER ...
739 (pp_cxx_statement): ... here.
740 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
741 (finish_function): Use alloc_stmt_list to zap entire function.
742 * parser.c (cp_parser_compound_statement): Update commentary.
743 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
744 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
745 (finish_stmt_expr): Don't look through COMPOUND_STMT.
747 2004-06-16 Geoffrey Keating <geoffk@apple.com>
749 * pt.c (mark_decl_instantiated): Don't call defer_fn.
751 2004-06-16 Richard Henderson <rth@redhat.com>
753 * parser.c (cp_parser_labeled_statement): Update commentary.
754 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
755 * tree.c (mark_local_for_remap_r): Likewise.
757 2004-06-16 Richard Henderson <rth@redhat.com>
759 * parser.c (cp_parser_asm_definition): Update commentary.
760 * pt.c (tsubst_expr): Use ASM_EXPR.
761 * semantics.c (finish_asm_stmt): Likewise.
763 2004-06-16 Richard Henderson <rth@redhat.com>
765 * decl.c (finish_destructor_body): Use LABEL_EXPR.
766 * parser.c (cp_parser_statement): Update commentary.
767 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
768 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
769 * tree.c (mark_local_for_remap_r): Likewise.
771 2004-06-16 Richard Henderson <rth@redhat.com>
774 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
775 statement in FOR_INIT_STMT for templates.
777 2004-06-15 Richard Henderson <rth@redhat.com>
779 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
780 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
781 (genericize_try_block): Use gimplify_stmt.
782 (genericize_catch_block, genericize_eh_spec_block): Likewise.
783 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
784 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
785 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
786 (cp_tree_chain_matters_p): Remove.
787 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
788 (COMPOUND_STMT_BODY_BLOCK): New.
789 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
790 (EXPR_STMT_STMT_EXPR_RESULT): New.
791 (building_stmt_tree): Check cur_stmt_list.
792 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
793 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
794 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
795 (cp_finish_decl): Use push_cleanup.
796 (start_function, finish_function): Use statement lists.
797 (finish_stmt): Do nothing.
798 * except.c (begin_eh_spec_block): Use statement lists.
799 (check_handlers_1, check_handlers): Likewise.
800 * init.c (construct_virtual_base): Don't add extra compound stmts.
801 (build_vec_init): Likewise.
802 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
803 * name-lookup.h (struct cp_binding_level): Add statement_list.
804 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
805 (cp_parser_labeled_statement, cp_parser_expression_statement,
806 cp_parser_statement_seq_opt): Likewise.
807 (cp_parser_compound_statement): Likewise. Take bool for try block.
808 (cp_parser_selection_statement): Tidy if processing.
809 (cp_parser_already_scoped_statement): Rewrite to do what it says.
810 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
811 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
812 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
813 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
814 (finish_cond): New, rewritten from FINISH_COND.
815 (simplify_loop_decl_cond): New.
816 (finish_expr_stmt): Avoid nested EXPR_STMTs.
817 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
818 begin_else_clause, finish_else_clause, finish_if_stmt,
819 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
820 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
821 finish_for_cond, finish_for_stmt, begin_switch_stmt,
822 finish_switch_cond, finish_switch_stmt, begin_try_block,
823 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
824 finish_handler_sequence, finish_function_handler_sequence,
825 begin_handler, finish_handler_parms, finish_handler,
826 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
827 using statement lists.
828 (begin_compound_stmt): Replace has_no_scope argument with flags.
829 Update all callers. Use statement lists.
830 (finish_compound_stmt): Likewise.
831 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
832 (current_scope_stmt_stack): Remove.
833 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
834 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
835 Rewrite with statement lists.
837 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
839 * parser.c: Change all assignments of c_lex_string_translate
840 to true and false to 1 and 0.
841 (cp_lexer_read_token): Convert type of the translated string.
842 (cp_parser_skip_to_closing_parentheses): Preserve original
843 value of c_lex_string_translate, and set it to -1 while
845 (cp_parser_cache_group): Likewise.
846 (cp_parser_cache_group_1): Renamed.
847 (cp_parser_asm_operand_list): Remove redundant setting of
848 c_lex_string_translate.
849 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
850 Handle chained strings.
852 2004-06-12 Andrew Pinski <apinski@apple.com>
856 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
858 * cp-tree.h: Fix typo.
860 * cp-tree.h: Include cgraph.h
861 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
862 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
864 2004-06-12 Jason Merrill <jason@redhat.com>
866 PR tree-optimization/14107
867 * decl.c (finish_function): Warn about no return in all functions.
869 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
871 * cp-tree.h (struct language_function): Remove cannot_inline.
872 * decl.c (save_function_data): cannot_inline is no more.
873 (cxx_push_function_context): Likewise.
874 * decl2.c (start_objects, start_static_storage_duration_function):
875 Reset DECL_INLINE, set DECL_UNINLINABLE.
877 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
880 * search.c (lookup_field): Propagate the ambiguity list.
881 (lookup_fnfields): Likewise.
883 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
886 * parser.c (cp_parser_template_name): Ctors/dtors never need a
887 template keyword to disambiguate.
889 2004-06-14 Mark Mitchell <mark@codesourcery.com>
892 * decl.c (grokdeclarator): Ignore pointer-to-members when
893 computing template depth.
896 * name-lookup.c (pushtag): Do not try to put class declarations in
897 explicit specialization scopes.
899 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
901 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
903 2004-06-11 Mark Mitchell <mark@codesourcery.com>
906 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
907 bindings for undeclared built-ins.
909 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
911 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
912 appear at the correct location.
914 2004-06-10 Jason Merrill <jason@redhat.com>
918 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
919 * init.c (build_offset_ref): Build SCOPE_REF with non-null
920 TREE_TYPE for non-dependent names.
921 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
922 unknown_type_node as its TREE_TYPE.
923 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
924 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
925 (dump_expr) <SCOPE_REF case>: Likewise.
927 2004-06-10 Mark Mitchell <mark@codesourcery.com>
930 * parser.c (cp_parser_direct_declarator): Robustify.
933 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
934 constants in non-dependent contexts.
938 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
941 2004-06-10 Jakub Jelinek <jakub@redhat.com>
944 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
947 2004-06-09 Mark Mitchell <mark@codesourcery.com>
951 2004-06-07 Mark Mitchell <mark@codesourcery.com>
952 * lex.c (handle_pragma_interface): Deprecate.
953 (handle_pragma_implementation): Likewise.
955 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
957 * g++spec.c (lang_specific_driver): Remove check for -lm
958 and -lmath when check it see if it was the math library.
960 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
963 * parser.c (cp_parser_direct_declarator): Reject constructor named
964 as qualified template-id.
966 2004-06-07 Mark Mitchell <mark@codesourcery.com>
969 * lex.c (handle_pragma_interface): Deprecate.
970 (handle_pragma_implementation): Likewise.
972 2004-06-07 Mark Mitchell <mark@codesourcery.com>
975 * parser.c (cp_parser_iteration_statement): Fix typo in error
979 * pt.c (tsubst_default_argument): Do not defer access checks
980 while substituting into the default argument.
983 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
984 constant in a non-dependent context.
987 * except.c (build_throw): Ensure that temp_expr has been
990 2004-06-06 Roger Sayle <roger@eyesopen.com>
992 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
994 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
997 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
998 'typename', and accept 'template'.
1000 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1001 Jan Hubicka <jh@suse.cz>
1004 * method.c (use_think): Do not mark thunk as referenced.
1006 2004-06-03 Matt Austern <austern@apple.com>
1009 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1010 is nonzero, and if we see a noninline definition of a key method,
1011 make the vtables nonweak.
1013 2004-06-02 Matt Austern <austern@apple.com>
1015 * cp-tree.h (instantiate_decl): new boolean parameter,
1016 undefined_ok. Current behavior is equivalent to its being 0.
1017 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1018 * pt.c (mark_decl_instantiated): Unconditionally make
1019 instantiations explicit unconditionally
1020 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1021 since mark_decl_instantiated now does it.
1022 (instantiate_class_member): New. Instantiate a member of an
1023 explicitly instantiated class template.
1024 (do_type_instantiation): Explicitly instantiate members of an
1025 explicitly instantiated class template.
1026 (instantiate_decl): if undefined_ok is nonzero, and if we're
1027 trying to explicitly instantiated a template with no definition,
1028 change it to an implicit instantiation.
1029 (instantiate_pending_templates): Add new argument to instantiate_decl.
1030 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1032 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1034 * cp-tree.h: Fix typo.
1036 * cp-tree.h: Include cgraph.h
1037 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1038 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1040 2004-06-01 Jason Merrill <jason@redhat.com>
1043 * call.c (call_builtin_trap): Remove type parm.
1044 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1045 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1047 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1050 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1051 TREE_TYPE for non-dependent names.
1052 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1053 unknown_type_node as its TREE_TYPE.
1054 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1055 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1056 (dump_expr) <SCOPE_REF case>: Likewise.
1058 2004-06-01 Richard Henderson <rth@redhat.com>
1059 Andrew Pinski <pinskia@physics.uc.edu>
1061 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1062 * parser.c (struct cp_parser): Remove in_offsetof.
1063 (cp_parser_new): Don't set it.
1064 (cp_parser_unary_expression): Don't check it.
1065 (cp_parser_postfix_open_square_expression): Split out from ...
1066 (cp_parser_postfix_expression): ... here.
1067 (cp_parser_postfix_dot_deref_expression): Likewise.
1068 (cp_parser_builtin_offsetof): New.
1069 (cp_parser_primary_expression): Use it.
1071 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1074 * parser.c (cp_parser_postfix_expression): Allow subscript
1075 operator in offsetof.
1077 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1080 * friend.c (add_friend): Do not try to perform access checks for
1081 functions from dependent classes.
1083 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1085 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1086 (pp_cxx_begin_template_argument_list): Turn into a function.
1087 (pp_cxx_end_template_argument_list): Likewise.
1088 (pp_cxx_separate_with): Define.
1089 (pp_cxx_unqualified_id): Tidy.
1090 (pp_cxx_primary_expression): Likewise.
1091 (pp_cxx_postfix_expression): Likewise.
1092 (pp_cxx_expression): Likewise.
1093 (pp_cxx_simple_type_specifier): Likewise.
1094 (pp_cxx_type_specifier_seq): Likewise.
1095 (pp_cxx_parameter_declaration_clause): Likewise.
1096 (pp_cxx_exception_specification): Likewise.
1097 (pp_cxx_direct_declarator): Likewise.
1098 (pp_cxx_type_id): Likewise.
1099 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1101 (pp_cxx_left_paren): Likewise.
1102 (pp_cxx_right_paren): Likewise.
1103 (pp_cxx_left_brace): Likewise.
1104 (pp_cxx_right_brace): Likewise.
1105 (pp_cxx_left_bracket): Likewise.
1106 (pp_cxx_right_bracket): Likewise.
1107 (pp_cxx_dot): Likewise.
1108 (pp_cxx_identifier): Likewise.
1109 (pp_cxx_tree_identifier): Likewise.
1110 (pp_cxx_ampersand): New macro.
1111 (pp_cxx_star): Likewise.
1112 (pp_cxx_arrow): Likewise.
1113 (pp_cxx_semicolon): Likewise.
1114 (pp_cxx_complement): Likewise.
1115 (pp_cxx_begin_template_argument_list): Declaree.
1116 (pp_cxx_end_template_argument_list): Likewise.
1117 (pp_cxx_colon_colon): likewise.
1119 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1121 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1124 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1126 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1127 typeck.c: Fix comment formatting.
1129 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1131 * cp-lang.c (cp_expand_decl): Remove.
1132 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1134 2004-05-30 Andreas Jaeger <aj@suse.de>
1136 * lang-specs.h: Add missing initializers for .ii.
1138 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1140 * decl.c (cp_make_fname_decl): Free return value from
1143 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1146 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1148 * init.c (build_new): Likewise.
1151 * name-lookup.c (arg_assoc): Robustify.
1154 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1155 when determining the scope to use for a pointer to member.
1156 (lookup_anon_field): Give it external linkage.
1157 * cp-tree.h (lookup_anon_field): Declare it.
1158 * expr.c (cplus_expand_constant): Use it.
1160 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1163 * parser.c (cp_parser_simple_type_specifier): Call
1164 maybe_note_name_used_in_class.
1166 2004-05-28 Tom Marshall <tmarshall@real.com>
1169 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1170 the class has friends.
1172 2004-05-27 Adam Nemet <anemet@lnxw.com>
1175 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1176 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1178 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1180 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1181 if it might be needed.
1182 * pt.c (mark_decl_instantiated): Only call defer_fn if
1183 the function actually needs processing in finish_file.
1184 * decl2.c (finish_file): Add check that elements in
1185 deferred_fns_used are really needed there. Remove unnecessary
1186 test of DECL_SAVED_TREE.
1188 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1190 * Make-lang.in: No need to specify $(LIBCPP).
1192 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1195 * parser.c (cp_parser_class_head): Robustify.
1198 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1200 (cp_parser_constructor_declarator_p): Treat attributes
1204 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1205 base classes in templates.
1207 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1210 * pt.c (instantiate_template): Robustify.
1212 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1215 * decl.c (xref_tag): Issue errors about redeclaring template
1216 classes as non-template classes.
1218 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1221 * name-lookup.c (supplement_binding): Allow redefinitions of
1225 * parser.c (cp_parser_template_argument): Robustify.
1227 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1229 * class.c (alter_access): Use %E format specifier to print an
1230 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1231 (push_lang_context): Likewise.
1232 * decl.c (lookup_label): Likewise.
1233 (grokdeclarator): Likewise.
1234 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1235 * pt.c (do_type_instantiation): Likewise.
1236 * tree.c (handle_java_interface_attribute): Likewise.
1237 (handle_com_interface_attribute): Likewise.
1238 (handle_init_priority_attribute): Likewise.
1240 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1244 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1245 recognized as overloaded functions.
1247 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1250 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1251 layout conflicts for unions.
1254 * typeck.c (build_x_unary_op): Instantiate template class
1255 specializations before looking for "operator &".
1258 * typeck.c (complete_type): Layout non-dependent array types, even
1262 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1265 2004-05-22 Roger Sayle <roger@eyesopen.com>
1267 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1268 returning when TREE_TYPE is error_mark_node.
1269 * typeck.c (require_complete_type): Return error_mark_node if
1270 value's type is an error_mark_node.
1272 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1274 * optimize.c (calls_setjmp_r): Remove.
1275 (calls_setjmp_p): Remove.
1276 * cp-tree.c (calls_setjmp_p): Remove.
1277 * decl.c (finish_function): Do not call calls_setjmp_p.
1279 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1281 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1282 * decl2.c (maybe_make_one_only): Likewise.
1283 * method.c (use_thunk): Likewise.
1285 2004-05-18 Jason Merrill <jason@redhat.com>
1287 * class.c (build_base_path): Tidy a bit.
1289 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1291 * name-lookup.c (struct scope_binding): New.
1292 (EMPTY_SCOPE_BINDING): New.
1293 (lookup_using_namespace): Take a scope_binding instead of a
1295 (qualified_lookup_using_namespace): Likewise.
1296 (cxx_binding_clear): Delete.
1297 (do_nonmember_using_decl): Use a scope_binding instead of a
1299 (lookup_tag): Don't call select_decl.
1300 (ambiguous_decl): Don't return anything (and change callers to match).
1301 Take a scope_binding as the second parameter.
1302 (lookup_namespace_name): Use a scope_binding instead of a
1304 (unqualified_namespace_lookup): Likewise.
1305 (lookup_qualified_name): Likewise.
1306 (select_decl): Take a scope_binding instead of a cxx_binding.
1307 Use macros rather than hand-coding tests for type-ness.
1309 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1311 * cp-gimplify.c: Rename from cp-simplify.c.
1312 * Make-lang.in, optimize.c: Update.
1314 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1316 Merge from tree-ssa-20020619-branch. See
1317 ChangeLog.tree-ssa for details.
1319 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1320 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1321 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1322 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1324 * cp-mudflap.c: New file.
1325 * cp-simplify.c:: New file.
1327 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1330 * decl2.c (check_classfn): For member templates, compare also the
1331 template parameters to match the declaration.
1332 * cp-tree.h: Adjust declaration of check_classfn.
1333 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1334 * friend.c (do_friend): Likewise.
1335 * pt.c (tsubst_friend_function): Likewise.
1337 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1339 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1340 Instead, dig into the representation type to find the array bound.
1342 2004-04-30 Jason Merrill <jason@redhat.com>
1344 Refer to base members using COMPONENT_REFs where possible.
1345 * class.c (build_simple_base_path): New fn.
1346 (build_base_path): Use it for non-virtual base references.
1347 (layout_class_type): Change base fields to their real type
1348 after layout is done.
1349 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1350 * cp-lang.c (cxx_get_alias_set): Use it.
1352 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1354 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1357 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1360 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1361 used in integral constant expressions.
1363 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1365 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1368 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1370 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1371 * decl.c (reshape_init): Use it.
1372 * init.c (perform_member_init): Remove redundant condition.
1373 (build_aggr_init): Adjust to handle brace-enclosed initializers
1375 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1377 * parser.c (cp_parser_initializer_clause): Do not set
1378 TREE_HAS_CONSTRUCTOR on the initializer.
1379 * rtti.c (tinfo_base_init): Likewise.
1380 (generic_initializer): Likewise.
1381 (ptr_initializer): Likewise.
1382 (ptm_initializer): Likewise.
1383 (class_initializer): Likewise.
1384 (get_pseudo_ti_init): Likewise.
1385 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1387 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1389 * name-lookup.c (anonymous_namespace_name): Make static.
1391 2004-04-19 Roger Sayle <roger@eyesopen.com>
1394 * class.c (build_base_path): Call fold whilst building the NULL
1395 pointer check expression trees.
1397 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1399 * init.c (build_new_1): Don't use type size argument for Java
1400 _Jv_AllocObject call.
1402 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1404 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1405 declaration and definition.
1407 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1410 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1411 than ASM_OUTPUT_DEF.
1413 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1415 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1416 current_function_decl == NULL.
1418 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1421 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1424 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1426 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1428 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1429 or TREE_SIDE_EFFECTS of a type.
1431 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1434 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1435 cv-qualifier unification.
1436 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1438 2004-04-02 Jan Hubicka <jh@suse.cz>
1440 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1441 * cp-tree.h (cp_update_decl_after_saving): Declare.
1442 * tree.c (cp_update_decl_after_saving): Define.
1444 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1447 * typeck.c (get_delta_difference): Call fold before returning the
1450 2004-04-01 Richard Henderson <rth@redhat.com>
1453 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1454 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1456 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1459 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1461 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1463 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1465 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1467 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1468 * class.c (check_bitfield_decl): Likewise.
1469 * cvt.c (type_promotes_to): Likewise.
1470 * decl.c (finish_enum): Likewise.
1471 * mangle.c (write_builtin_type): Likewise.
1472 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1473 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1474 (build_binary_op): Likewise.
1476 2004-03-31 Jan Hubicka <jh@suse.cz>
1478 * tree.h (optimize_function): Kill prototype.
1479 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1480 * semantics.c (expand_body): Kill.
1482 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1485 * decl.c (start_decl_1): Do not decide whether or not to create a
1486 new cleanup level until after the type has been completed.
1489 * pt.c (tsubst_default_argument): Clear current_function_decl.
1491 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1493 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1495 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1497 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1498 is null, just print the literal name and return.
1500 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1502 * cxx-pretty-print.c: Fix comment typos.
1504 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1506 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1509 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1511 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1512 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1515 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1517 PR 12267, 12391, 12560, 13129, 14114, 14133
1518 * cp-lang.c (c_reset_state): Delete.
1519 (push_file_scope, pop_file_scope): New stubs.
1520 * parser.c (c_parse_file): Call sorry() here if called more than once.
1522 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1524 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1527 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1529 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1531 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1533 * error.c (enum pad): Remove.
1534 (dump_qualifiers): Likewise.
1535 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1536 (dump_aggr_type): Likewise.
1537 (dump_type_suffix): Likewise.
1538 (dump_simple_decl): Likewise.
1539 (dump_function_decl): Likewise.
1540 (cv_to_string): Likewise.
1541 (dump_type_prefix): Likewise. Adjust return void.
1542 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1544 (pp_cxx_template_keyword_if_needed): Document.
1545 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1546 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1547 MUST_NOT_THROW_EXPR.
1549 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1552 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1553 templates, if their type is non-dependent.
1555 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1557 * call.c (build_op_delete_call): Do not forget the placement
1558 arguments when iterating through mutiple delete operators.
1560 * cp-tree.h (svaed_scope): Remove last_parms.
1561 (NEW_DELETE_OPNAME_P): New macro.
1562 (last_function_parms): Remove.
1563 (do_friend): Adjust prototype.
1564 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1565 using last_function_parms.
1566 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1567 using last_function_parms.
1568 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1569 for class-specific operator new and operator delete.
1570 (grok_op_properties): Do not look for allocation functions with
1572 (start_function): Use DECL_ARGUMENTS instead of
1573 last_function_parms.
1574 * decl.h (last_function_parms): Do not declare.
1575 * decl2.c (grokclassfn): Do not use last_function_parms.
1576 * friend.c (do_friend): Remove parmdecls parameter.
1577 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1578 (pop_from_top_level): Do not restore it.
1579 * pt.c (check_explicit_specialization): Do not adjust
1580 last_function_parms.
1582 * name-lookup.c (do_local_using_decl): Create a local binding for
1583 types brought in via using declarations.
1585 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1586 function declarations correctly.
1588 * semantics.c (finish_id_expression): Correct handling of
1589 conversion operators to dependent types.
1591 * typeck.c (lookup_destructor): Allow the use of destructors from
1594 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1596 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1597 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1598 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1599 the field is named TEMPLATE_TYPE_PARM_INDEX.
1601 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1604 * parser.c (cp_parser_functional_cast): A cast to anything
1605 but integral or enumaration type is not an integral constant
1607 * pt.c (value_dependent_expression_p): Handle cast expressions
1608 without operands (such as "int()").
1610 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1612 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1613 cv-qualification between the type named by the
1614 pseudo-destructor-name and the object-type.
1616 * search.c (accessible_base_p): Handle non-proper bases.
1618 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1619 refers to a single overloaded function, set the type of the
1621 * tree.c (lvalue_type): Simplify.
1622 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1624 (build_unary_op): Handle OVERLOADs with known types.
1626 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1629 * parser.c (cp_parser_postfix_expression): Handle the use of
1630 "typename" in non-dependent contexts. Convert appropriately when
1631 when using a qualified name after "->" or ".".
1633 * call.c (conditional_conversion): Honor the requirement that some
1634 conversions refer to the original object.
1636 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1638 * call.c (build_conditional_expr): Do not call force_rvalue for
1639 operands of void_type when the conditional expression itself has
1641 * name-lookup.c (pushdecl): Don't consider a declaration of a
1642 function named "main" to be an overload of a type named "main".
1643 * parser.c (cp_parser_template_name): Perform name lookup when the
1644 template name is proceeded by "template" if the qualifying scope
1646 * typeck.c (composite_pointer_type_r): Correctly handle
1647 pointer-to-member types.
1648 (build_const_cast): Likewise.
1650 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1652 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1653 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1654 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1655 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1656 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1657 (TYPEOF_TYPE_EXPR): New macro.
1658 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1659 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1660 * pt.c (tsubst): Likewise.
1661 * semantics.c (finish_typeof): Likewise.
1662 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1663 and TEMPLATE_TYPE_PARM.
1664 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1665 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1667 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1670 * cp-tree.h (build_new_op): Change prototype.
1671 (build_x_binary_op): Likewise.
1672 * call.c (build_new_op): Add overloaded_p parameter.
1673 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1674 * parser.c (cp_parser_binary_expression): Note that uses of
1675 overloaded operators prevents an expression from being considered
1676 an integral constant.
1677 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1679 * semantics.c (finish_call_expr): Likewise.
1680 * typeck.c (rationalize_conditional_expr): Likewise.
1681 (build_x_indirect_ref): Likewise.
1682 (build_x_binary_op): Likewise.
1683 (build_x_unary_op): Likewise.
1684 (build_x_compound_expr): Likewise.
1685 (build_modify_expr): Likewise.
1686 * typeck2.c (build_x_arrow): Likewise.
1688 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1690 * cp-lang.c, ptree.c: Update copyright.
1692 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1695 * parser.c (cp_parser_non_integral_constant_expression): Encode
1696 more of the idiom that surrounded calls to this function within
1698 (cp_parser_primary_expression): Adjust accordingly.
1699 (cp_parser_postfix_expression): Likewise.
1700 (cp_parser_unary_expression): Likewise.
1701 (cp_parser_cast_expression): Likewise.
1702 (cp_parser_assignment_expression): Likewise.
1703 (cp_parser_expression): Likewise.
1704 (cp_parser_new_expression): Note that new-expressions are not
1705 allowed in integral constant expressions.
1706 (cp_parser_delete_expression): Likewise.
1708 2004-03-12 Matt Austern <austern@apple.com>
1710 * decl2.c (maybe_make_one_only): Look at
1711 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1712 to make an explicit instantiation weak.
1713 * method.c (use_thunk): Make sure we call comdat_linkage
1715 * pt.c (do_type_instantiation): On systems where weak symbols
1716 don't go in a static archive's TOC, explicit instantiation of a
1717 class must imply *explicit* instantiation of its memeber.
1719 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1721 * call.c, cp-tree.h, pt.c: Fix comment typos.
1723 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1726 * decl.c (xref_tag): Disregard non-type declarations when
1727 looking up a tagged type.
1729 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1732 * call.c (convert_like_real): Build a const qualified temporary,
1733 when testing ctor access.
1735 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1737 * call.c (initialize_reference): Fix typo.
1739 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1742 * pt.c (determine_specialization): For member templates, match also
1746 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1748 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1750 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1753 * call.c (initialize_reference): Handle initializers that are
1754 class-member access expressions applies to rvalues.
1756 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1759 * name-lookup.c (supplement_binding): Ignore functions that are
1760 marked DECL_ANTICIPATED.
1762 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1765 * class.c (check_field_decls): Complain about non-static data
1766 members of reference type in unions. Propagate
1767 CLASSTYPE_REF_FIELDS_NEED_INIT and
1768 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1770 * init.c (perform_member_init): Complain about mbmers with const
1771 type that are not explicitly initialized.
1773 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1775 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1776 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1777 (lang_identifier): Remove implicit_decl and error_locus.
1778 (IDENTIFIER_IMPLICIT_DECL): Remove.
1779 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1780 (IDENTIFIER_ERROR_LOCUS): Likewise.
1781 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1782 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1783 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1784 (implicitly_declare): Remove.
1785 * decl.c (warn_extern_redeclared_static): Remove check of
1786 IDENTIFIER_IMPLICIT_DECL.
1787 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1788 (implicitly_declare): Remove.
1789 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1790 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1791 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1792 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1793 in the innermost scope, rather than at namespace scope.
1794 * name-lookup.c (push_local_binding): Give it external linkage.
1795 (pushdecl): Remove dead code.
1796 * name-lookup.h (push_local_binding): Declare it.
1797 * ptree.c (cxx_print_identifier): Don't print
1798 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1799 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1800 not IDENTIFIER_ERROR_LOCUS.
1801 * typeck.c (build_function_call): Remove dead code.
1803 2004-03-08 Jason Merrill <jason@redhat.com>
1806 * decl.c (xref_tag): Remove attribute handling.
1807 * cp-tree.h: Adjust prototype.
1808 * decl.c, parser.c, rtti.c: Adjust callers.
1809 * parser.c (cp_parser_class_head): Pass back attributes in the
1811 (cp_parser_class_specifier): Adjust.
1813 2004-03-08 Matt Austern <austern@apple.com>
1816 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1817 as static, to static_decls array.
1819 2004-03-05 Jason Merrill <jason@redhat.com>
1821 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1823 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1825 * decl.c (grokfndecl): Update old incorrect comment.
1826 (grokvardecl): Diagnose C++ variables of type with no linkage.
1828 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1831 * pt.c (build_non_dependent_expr): Do not create a
1832 NON_DEPENDENT_EXPR for a THROW_EXPR.
1834 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1837 * error.c (dump_expr): Handle THROW_EXPR.
1839 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1842 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1843 lookup if ordinary name-lookup finds a non-function.
1844 * pt.c (tsubst_copy_and_build): Likewise.
1847 * parser.c (cp_parser_late_parsing_default_args): Check that there
1848 are no extra tokens after the end of the default-argument
1851 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1854 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1855 having C++ linkage for name-mangling purposes.
1858 * parser.c (cp_parser_direct_declarator): Recognize constructor
1859 declarators that use a template-id to name the class being
1863 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1864 (tsubst_expr): Do not call tsubst_copy, even when
1865 processing_template_decl.
1867 2004-03-01 Jeff Law <law@redhat.com>
1869 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1872 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1875 * name-lookup.h (push_scope): Change prototype.
1876 * name-lookup.c (push_scope): Do not reenter the current class
1878 * decl.c (grokfndecl): Check return code from push_scope before
1880 * decl2.c (check_classfn): Likewise.
1881 * parser.c (cp_parser_conversion_function_id): Likewise.
1882 (cp_parser_init_declarator): Likewise.
1883 (cp_parser_direct_declarator): Likewise.
1884 (cp_parser_class_specifier): Likewise.
1885 (cp_parser_class_head): Likewise.
1886 (cp_parser_lookup_name): Likewise.
1887 (cp_parser_constructor_declarator_p): Likewise.
1888 * pt.c (instantiate_class_template): Likewise.
1889 (resolve_typename_type): Likewise.
1891 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1894 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1898 * class.c (update_vtable_entry_for_fn): Do not go through
1899 covariance machinery if the type returned by an overrider is the
1900 same as the original.
1902 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
1904 * call.c: Fix a comment typo.
1906 2004-02-27 Ziemowit Laski <zlaski@apple.com>
1908 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1910 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1913 * parser.c (cp_parser_parameter_declaration_list): Commit
1914 to fewer tentative parses.
1916 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1919 * pt.c (dependent_type_p_r): A template template parameter is a
1922 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1925 * mangle.c (write_template_arg_literal): Don't rely on identity for
1928 2004-02-24 Jason Merrill <jason@redhat.com>
1930 * tree.c (build_exception_variant): Use check_qualified_type.
1932 2004-02-23 Zack Weinberg <zack@codesourcery.com>
1933 Kazu Hirata <kazu@cs.umass.edu>
1935 * decl.c (cxx_init_decl_processing): Don't check
1936 flag_writable_strings.
1938 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
1941 * typeck.c (maybe_warn_about_returning_address_of_location):
1942 Change check for VAR_DECL to use DECL_P instead.
1944 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1947 * cvt.c (build_expr_type_conversion): Type must be complete before
1948 looking up for conversions.
1950 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1953 * name-lookup.c (arg_assoc_class): Don't look into template
1954 arguments if it is not a primary template.
1956 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1959 * method.c (use_thunk): Always clone function argument tree.
1961 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1964 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1967 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1968 for all type variants.
1970 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1973 * decl.c (duplicate_decls): Return error_mark_node for invalid
1975 * name-lookup.c (push_namespace): Ignore the return value from
1977 * pt.c (push_template_decl_real): Robustify.
1980 * name-lookup.c (push_class_level_binding): Do not complain about
1981 adding a binding for a member whose name is the same as the
1982 enclosing class if the member is located in a base class of the
1985 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1988 * parser.c (cp_parser_new_expression): Parse an ill-formed
1989 direct-new-declarator after a parenthesized type-id to emit good
1992 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
1994 * cp-tree.def, cvt.c: Update copyright.
1996 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1999 * cp-tree.h (abi_version_at_least): Remove.
2000 * mangle.c: Include flags.h.
2002 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2005 * call.c (build_conditional_expr): Handle conversions between
2006 class types which result in differently cv-qualified type
2010 * class.c (delete_duplicate_fields_1): Remove.
2011 (delete_duplicate_fields): Likewise.
2012 (finish_struct_anon): Remove check for members with the same name
2013 as their enclosing class.
2014 (check_field_decls): Do not call duplicate_fields.
2015 * decl.c (grokdeclarator): Remove check for static data members
2016 with the same name as their enclosing class.
2017 * name-lookup.c (push_class_level_binding): Check for members with
2018 the same name as their enclosing class.
2020 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2023 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2025 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2028 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2029 has full set of arguments.
2031 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2034 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2036 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2039 * cp-tree.h (delete_sanity): Change prototype.
2040 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2041 Remove dead code. Adjust code to warn about deleting an array.
2042 * typekc.c (decay_conversion): Use build_address and build_nop.
2045 * search.c (accessible_p): Do not check access in thunks.
2048 * call.c (build_conditional_expr): Call force_rvalue on the
2049 non-void operand in the case that one result is a throw-expression
2050 and the other is not.
2052 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2055 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2056 the type name and look ahead for ::~, and bail out early with a
2057 better error message if the parse is going to fail.
2059 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2061 * call.c (conversion_kind): New type.
2062 (conversion_rank): Likewise.
2063 (conversion): Likewise.
2064 (CONVERSION_RANK): New macro.
2065 (conversion_obstack): New variable.
2066 (obstack_initialized): Likewise.
2067 (z_candidate): Change type of convs and second_conv.
2068 (candidate_warning): New type.
2069 (IDENTITY_RANK): Remove.
2070 (EXACT_RANK): Likewise.
2071 (PROMO_RANK): Likewise.
2072 (STD_RANK): Likewise.
2073 (PBOOL_RANK): Likewise.
2074 (USER_RANK): Likewise.
2075 (ELLIPSIS_RANK): Likewise.
2076 (BAD_RANK): Likewise.
2077 (ICS_RANK): Likewise.
2078 (ICS_STD_RANK): Likewise.
2079 (ICS_USER_FLAG): Likewise.
2080 (ICS_ELLIPSIS_FLAG): Likewise.
2081 (ICS_THIS_FLAG): Likewise.
2082 (ICS_BAD_FLAG): Likewise.
2083 (NEED_TEMPORARY_P): Likewise.
2084 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2085 (USER_CONV_CAND): Likewise.
2086 (USER_CONV_FN): Likewise.
2087 (conversion_obstack_alloc): New function.
2088 (alloc_conversion): Likewise.
2089 (validate_conversion_obstack): Likewise.
2090 (alloc_conversions): Likewise.
2091 (build_conv): Adjust to deal with new conversion data structures.
2092 (build_identity_conv): New function.
2093 (build_ambiguous_conv): Likewise.
2094 (standard_conversion): Adjust to deal with new conversion data
2096 (convert_class_to_reference): Likewise.
2097 (direct_reference_binding): Likewise.
2098 (reference_binding): Likewise.
2099 (implicit_conversion): Likewise.
2100 (add_candidate): Likewise.
2101 (add_function_candidate): Likewise.
2102 (add_conv_candidate): Likewise.
2103 (build_builtin_candidate): Likewise.
2104 (print_z_candidate): Likewise.
2105 (merge_conversion_sequences): Likewise.
2106 (build_user_type_conversion_1): Likewise.
2107 (build_user_type_conversion): Likewise.
2108 (build_new_function_call): Likewise.
2109 (build_object_call): Likewise.
2110 (conditional_conversion): Likewise.
2111 (build_conditional_expr): Likewise.
2112 (build_new_op): Likewise.
2113 (build_op_delete_call): Likewise.
2114 (convert_like_real): Likewise.
2115 (build_over_call): Likewise.
2116 (build_new_method_call): Likewise.
2117 (is_subseq): Likewise.
2118 (maybe_handle_implicit_object): Likewise.
2119 (maybe_handle_ref_bind): Likewise.
2120 (compare_ics): Likewise.
2121 (source_type): Likewise.
2122 (add_warning): Likewise.
2124 (can_convert_arg): Likewise.
2125 (can_convert_arg_bad): Likewise.
2126 (perform_implicit_conversion): Likewise.
2127 (perform_direct_initialization_if_possible): Likewise.
2128 (initialize_reference): Likewise.
2129 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2130 * cp-tree.def (WRAPPER): Likewise.
2131 (IDENTITY_CONV): Remove.
2132 (LVALUE_CONV): Likewise.
2133 (QUAL_CONV): Likewise.
2134 (STD_CONV): Likewise.
2135 (PTR_CONV): Likewise.
2136 (PMEM_CONV): Likewise.
2137 (BASE_CONV): Likewise.
2138 (REF_BIND): Likewise.
2139 (USER_CONV): Likewise.
2140 (AMBIG_CONV): Likewise.
2141 (RVALUE_CONV): Likewise.
2142 * cp-tree.h (tree_wrapper): Remove.
2143 (WRAPPER_ZC): Remove.
2144 (lang_tree_node): Remove wrapper.
2145 (LOOKUP_SPECULATIVELY): Remove.
2146 (build_op_delete_call): Adjust prototype.
2147 (validate_conversion_obstack): Declare.
2148 (build_zc_wrapper): Remove.
2149 * cvt.c (convert_to_reference): Remove dead code.
2150 (ocp_convert): Likewise.
2151 * decl.c (redeclaration_error_message): Correct handling of
2153 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2154 (cp_tree_node_structure): Remove WRAPPER case.
2155 * decl2.c (finish_file): Call validate_conversion_obstack.
2156 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2157 (build_op_delete_call): Likewise.
2158 (build_x_delete): Likewise.
2159 (build_delete): Adjust call to build_op_delete_call.
2160 * pt.c (tsubst_friend_declaration): Adjust code to determine
2161 whether or not a friend template is a definition.
2162 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2163 * tree.c (build_zc_wrapper): Remove.
2165 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2167 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2168 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2169 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2170 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2172 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2174 * typeck.c (lookup_destructor): Fix typo in error message.
2176 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2178 * call.c, parser.c, tree.c: Fix comment typos.
2180 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2183 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2184 * decl.c (duplicate_decls, start_function): Likewise.
2186 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2188 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2189 * parser.c (free_parser_stacks): Delete.
2191 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2193 * rtti.c: Update copyright.
2195 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2198 * decl.c (require_complete_types_for_parms): Do not insert
2199 error_mark_node in the parameter list.
2201 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2204 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2205 error when terminator can not be found.
2207 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2209 Make-lang.in (po-generated): Delete.
2211 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2213 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2214 targetm.calls.promote_prototypes.
2216 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2220 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2222 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2223 (handle_pragma_implementation): Likewise.
2225 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2228 * typeck.c (lookup_destructor): Tweak error message.
2230 2004-02-05 Jan Hubicka <jh@suse.cz>
2232 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2235 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2238 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2239 code, only emits the diagnostic now. Added lookup of the identifier
2240 and support for qualified ids.
2241 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2242 Parse an (invalid) type name as id-expression within a declarator.
2243 (cp_parser_simple_declaration): Use it.
2244 (cp_parser_member_declaration): Likewise.
2245 (cp_parser_make_typename_type): New function. Handle errors through
2246 cp_parser_diagnose_invalid_typename.
2247 (cp_parser_elaborated_type_specifier): Use it.
2249 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2252 * call.c (convert_like_real): Use "converting" rather than
2253 "argument" as the descriptive keyword to
2254 dubious_conversion_warnings.
2255 * typeck.c (convert_for_assignment): Do not call
2256 dubious_conversion_warnings.
2258 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2261 * init.c (build_delete): Emit a more informative error message in
2262 case of an incomplete type, and on the correct source line.
2264 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2266 * error.c, search.c: Update copyright.
2268 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2271 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2272 linkage for the typeinfo name string.
2274 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2277 * cp-tree.h (fold_non_dependent_expr): New function.
2278 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2279 (cp_parser_template_argument): Use fold_non_dependent_expr.
2280 (cp_parser_direct_declarator): Likewise.
2281 * pt.c (fold_non_dependent_expr): New function.
2282 (convert_nontype_argument): Use it.
2283 (tsubst_qualified_id): Simplify.
2284 (tsubst_copy_and_build): Likewise.
2286 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2288 * decl.c (cxx_push_function_context): Do not set
2289 current_function_is_thunk.
2290 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2293 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2296 * pt.c (more_specialized_class): Increase processing_template_decl
2297 while partial ordering.
2299 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2302 * decl.c (start_function): Do not call pushdecl for any
2303 instantiation or specialization of a primary template.
2305 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2308 * parser.c (cp_parser_class_name): Robustify.
2311 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2314 * semantics.c (finish_id_expression): Do not return an
2315 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2317 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2320 * pt.c (build_non_dependent_expr): Do not build
2321 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2324 * semantics.c (finish_id_expression): Do not return an
2325 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2328 * parser.c (cp_parser_simple_declaration): When skipping to the
2329 end of the statement swallow the terminating semicolon.
2331 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2334 * init.c (build_offset_ref): Improve error recovery for invalid
2335 uses of non-static member functions.
2338 * cp-tree.h (cp_build_type_attribute_variant): New function.
2339 * class.c (build_clone): Use cp_build_type_attribute_variant.
2340 * decl.c (duplicate_decls): Likewise.
2341 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2342 (tsubst_function_type): Likewise.
2343 * tree.c (build_exception_variant): Check attributes before
2344 concluding that two types are the same.
2345 (cp_build_type-attribute_variant): New method.
2346 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2349 * call.c (convert_class_to_reference): Keep better track of
2350 pedantically invalid user-defined conversions.
2352 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2355 * pt.c (tsubst_qualified_id): Improved error message when a type
2356 is expected but not found.
2358 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2360 * class.c: Fix comment typos.
2362 * error.c: Likewise.
2363 * parser.c: Likewise.
2365 * search.c: Likewise.
2366 * typeck.c: Likewise.
2368 2004-01-30 Richard Henderson <rth@redhat.com>
2371 * method.c (use_thunk): Don't force_target_expr for void thunks.
2372 * tree.c (build_target_expr_with_type): Assert non-void type.
2373 (force_target_expr): Likewise.
2375 2004-01-30 Michael Matz <matz@suse.de>
2377 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2379 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2383 * decl.c (grokdeclarator): Check immediatly type completeness for
2384 non-dependent types.
2386 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2389 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2390 a sizeof expression.block
2392 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2395 * mangle.c (write_encoding): Correct encoding of member template
2398 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2400 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2401 template name as it was `<::' (digraph typo).
2402 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2403 (cp_parser_id_expression): Use it.
2404 (cp_parser_nested_name_specifier_opt): Likewise.
2405 (cp_parser_template_name): Likewise.
2406 (cp_parser_class_name): Likewise.
2407 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2409 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2412 * typeck.c (merge_types): Do not merge attributes into
2416 * parser.c (cp_parser_direct_declarator): Do not prevent
2417 backtracking inside a parenthesized declarator.
2418 (cp_parser_parameter_declaration): Fix typo in comment.
2420 2004-01-28 Jan Hubicka <jh@suse.cz>
2422 * semantics.c (expand_body) Do emit_associated_thunks before
2425 2004-01-27 Devang Patel <dpatel@apple.com>
2427 * name-lookup.c: Include "debug.h"
2428 (do_namespace_alias): Invoke debug_hooks to emit debug info
2429 for namespace alias.
2430 (do_local_using_decl): Invoke debug_hooks to emit debug info
2432 (do_class_using_decl): Same.
2433 (do_toplevel_using_decl): Same.
2434 (do_using_directive): Same.
2435 (cp_emit_debug_info_for_using): New function.
2436 * Make-lang.in (cp/parser.o): Depend on debug.h
2437 (cp/name-lookup.o): Same.
2439 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2441 * cp-tree.h (language_function, lang_type_header): Use
2443 * name-lookup.h (cp_binding_level): Likewise.
2445 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2448 * semantics.c (finish_for_expr): Check for unresolved overloaded
2451 * class.c (add_method): Just check processing_template_decl to
2452 determine whether or not we are within a template.
2453 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2454 * init.c (decl_constant_value): Check the type of the declaration,
2456 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2457 (push_to_top_level): ... this.
2458 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2459 * pt.c (push_template_decl_real): Reorder condition for speed.
2460 (convert_template_argument): Use dependency-checking functions in
2461 place of uses_template_parms.
2462 (lookup_template_class): Avoid calling uses_template_parms more
2464 (uses_template_parms): Reimplement, using dependency-checking
2466 (instantiate_class_template): Use push_to_top_level, not
2467 maybe_push_to_top_level.
2468 (type_unification_real): Simplify.
2469 (type_dependent_expression_p): Handle OFFSET_REFs and
2471 (any_dependent_template_arguments_p): Handle multiple levels of
2473 * semantics.c (expand_or_defer_fn): Do not check
2474 uses_template_parms for template instantiations.
2475 * typeck.c (comptypes): Avoid calling cp_type_quals.
2477 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2480 * call.c (build_over_call): Do not convert arguments when
2481 processing a template.
2482 * pt.c (build_non_dependent_expr): Do not build a
2483 NON_DEPENDENT_EXPR for arithmetic constants.
2485 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2488 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2489 returns a TYPE_DECL. no further lookup is required.
2490 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2491 is invalid. Rework to give better diagnostics.
2493 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2496 * pt.c (instantiate_class_template): Add an error_mark_node
2498 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2500 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2503 * decl.c (finish_function): Move the call to
2504 finish_fname_decls below the call to
2505 finish_eh_spec_block.
2507 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2509 * optimize.c, typeck2.c: Update copyright.
2511 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2513 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2514 init.c, mangle.c, typeck.c: Update copyright.
2516 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2518 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2520 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2522 * Make-lang.in: Replace $(docdir) with doc.
2523 (c++.info, c++.srcinfo): Dummy entry.
2524 (c++.man, c++.srcman): New rules.
2525 (c++.install-man): Revamp rule.
2527 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2529 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2530 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2531 immediate $(shell) instead of deferred backquote.
2533 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2536 * parser.c (cp_parser_postfix_expression): When encountering
2537 incomplete type on left-hand side of "->" or ".", treat the entire
2538 expression as erroneous.
2541 * call.c (build_field_call): Remove.
2542 (n_build_method_call): Likewise.
2543 (build_method_call): Likewise.
2544 (build_new_method_call): Do not call build_field_call.
2545 * class.c (n_build_method_call): Remove.
2546 (print_class_statistics): Do not print it.
2547 * cp-tree.h (build_method_call): Remove declaration.
2548 (finish_object_call_expr): Likewise.
2549 (build_new_1): Do not use build_method_call.
2550 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2551 when the function appearing on the right-hand-side of "." or "->"
2552 is not actually a function.
2553 * pt.c (tsubst_copy_and_build): Likewise.
2554 * semantics.c (finish_object_call_expr): Remove.
2556 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2559 * pt.c (tsubst): Use finish_typeof.
2561 2004-01-18 Jason Merrill <jason@redhat.com>
2564 * except.c (build_throw): In a template, set
2565 current_function_returns_abnormally.
2567 2004-01-17 Fred Fish <fnf@intrinsity.com>
2570 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2571 except don't call array_type_nelts() with a VECTOR_TYPE.
2573 2004-01-16 Jan Hubicka <jh@suse.cz>
2575 * mangle.c (write_mangled_name): Remove inline modifier.
2577 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2580 * decl.c (compute_array_index_type): Fix grammar in comment.
2581 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2584 * call.c (name_as_c_string): Print conversion operator names
2588 * call.c (initialize_reference): Pass -1 for inner parameter to
2591 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2594 * parser.c (cp_parser_base_specifier): Check for an invalid
2595 keyword `typename' and emit an user-friendly error message.
2597 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2600 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2601 (handle_pragma_implementation): Likewise.
2603 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2606 * typeck.c (build_class_member_access_expr): Allow to access members
2607 of the currently open class.
2608 (finish_class_member_access_expr): Likewise.
2610 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2613 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2614 name by value, instead of computing them.
2615 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2616 arguments. Pass them to validate_nonmember_using_decl.
2617 * name-lookup.h (do_local_using_decl): Adjust.
2618 (do_toplevel_using_decl): Likewise.
2619 * parser.c (cp_parser_using_declaration): Likewise.
2620 * pt.c (tsubst_expr): Likewise.
2622 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2626 * name-lookup.c (qualified_lookup_using_namespace): Search
2627 strongly-associated namespaces first, and only then try other
2630 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2632 * Make-lang.in (c++.srcextra): Dummy entry.
2634 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2637 * parser.c (cp_parser_template_name): Don't try to parse a
2638 conversion-function-id, as it cannot be a template-name.
2639 (cp_parser_simple_type_specifier): Check for invalid template-ids
2640 even after a built-in type.
2642 2004-01-14 Jan Hubicka <jh@suse.cz>
2645 * pt.c (instantiate_decl): Do not increase function_depth.
2647 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2651 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2652 attributes and discard.
2653 * decl.c (xref_tag): Don't overwite existing attributes with
2656 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2659 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2660 is no destructor while looking up a BIT_NOT_EXPR.
2662 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2664 * cxxfilt.c: Remove unused file.
2666 2004-01-14 Jan Hubicka <jh@suse.cz>
2668 Partial fix to PR c++/12850
2669 * decl2.c (mark_used): Do not proactively instantiate templates
2670 when compiling in unit-at-a-time or not optimizing.
2671 * optimize.c (maybe_clone_body): Do not increase function depth.
2673 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2676 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2678 2004-01-12 Steven Bosscher <stevenb@suse.de>
2681 * parser.c (cp_parser_member_declaration): Any non-type is also
2682 not a class or a function.
2684 2004-01-12 Jason Merrill <jason@redhat.com>
2687 * class.c (build_base_path): Do not mark vtable references as
2689 (build_vtbl_ref_1): Likewise.
2691 2004-01-12 Richard Henderson <rth@redhat.com>
2694 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2695 (store_init_value): Use it.
2696 * decl.c (check_initializer): Expect full initialization code
2697 from store_init_value.
2698 * init.c (expand_aggr_init_1): Likewise.
2699 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2701 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2703 * class.c (layout_class_type): For non-POD class types, also copy
2704 the DECL_SIZE and DECL_MODE of fields to the base class type.
2706 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2709 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2710 calling regenerate_decl_from_template.
2712 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2715 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2716 decl-specifier occurring along with a class definition.
2718 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2720 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2721 clauses to comments describing declares_class_or_enum.
2722 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2725 2004-01-12 Jan Hubicka <jh@suse.cz>
2727 * pt.c (for_each_template_parm): Do not check for duplicates.
2728 (for_each_template_parm): Use walk_tree duplicate checking code.
2730 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2733 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2734 is error_mark_node, don't add any more decl_specs.
2735 (cp_parser_init_declarator): After committing to a declaration, if
2736 the decl_specifiers start with error_mark_node, issue an error and
2737 change the type to "int".
2739 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2742 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2744 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2748 * pt.c (tsubst): Substitution must fail if we are attempting to
2749 create an array with element type that is an abstract class type.
2750 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2751 before calling abstract_virtuals_error.
2753 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2755 * name-lookup.c (qualified_lookup_using_namespace): Consider
2756 strong using directives even if we've already found a binding.
2758 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2760 * cp-tree.h (cxx_expand_expr): Change prototype.
2761 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2763 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2766 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2767 looking into them recursively. They can be there because of the
2768 new __offsetof__ extension.
2770 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2772 * parser.c (cp_parser_save_member_function_body): Mark the
2775 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2778 * class.c (build_clone): Copy type attributes from the original
2779 function to the clone.
2782 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2783 references as constant.
2786 * parser.c (cp_parser_explicit_instantiation): Improve error
2788 (cp_parser_require): Improve indication of the error location.
2791 * parser.c (cp_parser_class_head): Reorder logic to check for
2792 invalid qualification.
2794 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2797 * name-lookup.c (lookup_using_namespace): Remove spacesp
2799 (unqualified_namespace_lookup): Likewise.
2800 (lookup_qualified_name): Adjust accordingly.
2801 (lookup_name_real): Likewise.
2802 (lookup_arg_dependent): Do not eliminate the namespace of the
2803 functions found by unqualified name lookup unless that is the
2806 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2808 * semantics.c (push_deferring_access_checks): Fix format.
2809 (resume_deferring_access_checks): Likewise.
2810 (stop_deferring_access_checks): Likewise.
2811 (pop_deferring_access_checks): Likewise.
2812 (get_deferred_access_checks): Likewise.
2813 (pop_to_parent_deferring_access_checks): Likewise.
2814 (perform_deferred_access_checks): Likewise.
2815 (perform_or_defer_access_check): Likewise.
2817 2004-01-04 Richard Henderson <rth@redhat.com>
2819 * call.c (build_over_call): Don't create a save_expr of an
2820 aggregate, but rather its address.
2822 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2825 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2826 an offsetof expression.
2828 * parser.c (cp_parser_parameter_declaration): Fix comment.
2831 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2832 (reference_binding): Set it when appropriate.
2833 (build_temp): New function, split out from ...
2834 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2835 (initialize_reference): Likewise.
2838 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2839 (cp_parser_new): Initialize it.
2840 (cp_parser_postfix_expression): Set it.
2841 (cp_parser_sizeof_operand): Likewise.
2842 (cp_parser_parameteR_declaration): Do not commit early to tenative
2843 parsers when in_type_id_in_expr_p is set.
2845 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2848 * parser.c (cp_parser_template_argument): Don't call
2849 make_unbound_class_template directly.
2850 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2851 UNBOUND_CLASS_TEMPLATE tree node.
2853 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2856 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2858 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2861 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2862 (DECL_FUNCTION_TEMPLATE_P): Use it.
2863 (DECL_CLASS_TEMPLATE_P): Likewise.
2864 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2865 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2866 (cp_parser_template_name): Likewise.
2867 (cp_parser_elaborated_type_specifier): Likewise.
2868 (cp_parser_namespace_name): Likewise.
2869 (cp_parser_class_name): Likewise.
2870 (cp_parser_lookup_name_simple): Likewise.
2872 See ChangeLog.3 for earlier changes.