1 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3 * cp-mudflap.c: Delete file.
4 * Makefile.in: Remove all references to cp-mudflap.o.
6 2004-07-05 Zack Weinberg <zack@codesourcery.com>
8 * decl.c (cxx_init_decl_processing): Call
9 build_common_tree_nodes before creating the global NAMESPACE_DECL.
11 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
14 * call.c (build_operator_new_call): Look only at global scope.
16 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
18 * call.c (enforce_access): Expect TREE_BINFO.
19 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
20 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
21 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
23 (BINFO_LANG_ELTS): Remove.
24 (BINFO_LANG_SLOTS): New.
25 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
26 (CLASSTYPE_TEMPLATE_INFO): Adjust.
27 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
28 * search.c (lookup_member): Check TREE_BINFO.
29 * semantics.c (perform_or_defer_access_check): Likewise.
30 (check_accessibility_of_qualified_id): Check
31 deferred_access_no_check.
32 * tree.c (make_binfo): Use make_tree_binfo.
34 2004-07-04 Mark Mitchell <mark@codesourcery.com>
36 * method.c (implicitly_declare_fn): Set linkage of generated
39 2004-07-04 Richard Henderson <rth@redhat.com>
41 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
43 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
46 * name-lookup.c (push_class_level_binding): Don't pass a
47 TREE_LIST of ambiguous names to check_template_shadow as it
48 only handles declarations. Instead, pull the declaration
51 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
54 * pt.c (check_explicit_specialization): Clarify error message.
56 2004-07-02 Richard Henderson <rth@redhat.com>
58 * tree.c (cp_unsave_r): Update remap_save_expr call.
60 2004-07-02 Mark Mitchell <mark@codesourcery.com>
63 * mangle.c (write_template_arg): Correct mangling.
66 * decl.c (grokdeclarator): Robustify.
68 2004-07-01 Richard Henderson <rth@redhat.com>
70 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
71 * method.c (synthesize_method): Don't clear_last_expr.
72 * name-lookup.c (maybe_push_cleanup_level): Likewise.
74 2004-07-01 Nick Clifton <nickc@redhat.com>
76 * decl2.c (import_export_class): Invoke the
77 import_export_class field in the gcc_target structure if it is not
80 2004-06-30 Richard Henderson (rth@redhat.com>
82 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
83 * method.c (use_thunk): Likewise.
85 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
87 * call.c (build_over_call), typeck.c (build_function_call): Call
88 check_function_arguments instead of check_function_format.
90 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
92 * call.c (build_over_call), typeck.c (build_function_call): Update
93 calls to check_function_format.
95 2004-06-30 Richard Henderson <rth@redhat.com>
97 * call.c (build_over_call): Use __builtin_memcpy for copying
98 CLASS_AS_BASE rather than funny casting.
100 2004-06-30 Richard Henderson <rth@redhat.com>
102 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
103 TYPE_SIZE_UNIT of full_type.
105 2004-06-30 Per Bothner <per@bothner.com>
107 Conditionally compile support for --enable-mapped_location.
108 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
109 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
110 adjustments - which I don't understand.
111 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
112 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
113 (print_instantiation_partial_context): Use expand_location.
114 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
115 * name-lookup.c: Likewise.
116 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
117 * name-lookup.c: Use input_line macro.
118 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
119 (cp_parser_statement): Rename locaal variable statement_locus to
120 statement_location and use SET_EXPR_LOCATION macro.
121 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
122 * tree.c (cp_walk_subtrees): Likewise.
124 2004-06-29 Per Bothner <per@bothner.com>
126 * tree.c (build_min_nt, build_min, build_min_non_dep):
127 Don't set TREE_COMPLEXITY from input_line.
129 2004-06-29 Paul Brook <paul@codesourcery.com>
131 * init.c: Include target.h.
132 (get_cookie_size): Remove and replace with target hook.
134 (build_new_1): Store the element size in the cookie.
136 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
139 * parser.c (cp_parser_template_declaration_after_export): Disable
140 access checks here ...
141 (cp_parser_class_specifier): ... not here.
143 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
145 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
146 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
147 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
150 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
152 * cp-tree.h (struct deferred_access): Move to ...
153 * semantics.c (struct deferred_access): ... here. Adjust.
154 (deferred_access_stack): Make a VEC(deferred_access),
155 (deferred_access_free_list): Remove.
156 (deferred_access_no_check): New.
157 (push_deferring_access_checks, resume_deferring_access_checks,
158 stop_deferring_access_checks, pop_deferring_access_checks,
159 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
160 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
162 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
165 * call.c (build_temp): Declare.
166 (check_constructor_callable): New.
167 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
168 CONSTRUCTOR_CALLABLE.
169 (convert_like_real, initialize_reference): Use
170 check_constructor_callable.
171 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
172 (LOOKUP_*): Renumber.
174 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
176 * friend.c (add_friend): Only perform access checks when context
178 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
179 * parser.c (cp_parser_class_specifier): Disable access checks here
180 when parsing the body of a templated class.
181 * semantics.c (perform_or_defer_access_checks): Reorder to allow
182 NULL binfos when not checking access.
184 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
186 Use vector API for vbase list.
187 * cp-tree.h: Include vec.h
188 (DEF_VEC_P (tree)): New type.
189 (struct lang_type_class): Change vbase's member type.
190 (binfo_for_vbase): Declare.
191 * class.c (determine_primary_base, base_derived_from,
192 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
193 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
194 build_vtbl_initializer): Adjust.
195 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
197 * init.c (sort_mem_initializers, expand_member_init,
198 push_base_cleanups): Adjust.
199 * method.c (do_build_copy_constructor): Adjust.
200 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
201 (binfo_for_vbase): New.
202 * tree.c (copy_base_binfos): Adjust.
204 2004-06-28 Mark Mitchell <mark@codesourcery.com>
206 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
208 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
211 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
212 paranthesis in case of pointers to array members.
213 * error.c (dump_type_prefix): Likewise.
214 (dump_type_suffix): Maybe issue a whitespace when printing
217 2004-06-27 Mark Mitchell <mark@codesourcery.com>
220 * parser.c (cp_parser_set_decl_spec_type): Refine test for
221 redefinition of built-in types.
223 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
225 * error.c (pp_template_argument_list_start): Remove.
226 (pp_template_argument_list_end): Likewise.
227 (pp_separate_with_comma): Use pp_cxx_separate_with.
228 (reinit_global_formatting_buffer): Remove.
229 (pp_non_consecutive_character): Likewise.
230 (dump_scope): Use pp_cxx_colon_colon.
231 (dump_template_parameter): Use pp_cxx_identifier,
232 pp_cxx_tree_identifier and pp_cxx_whitespace.
233 (dump_templat_bindings): Replace use of pp_string with sequence
234 of pp_cxx_whitespace and pp_equal.
235 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
236 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
238 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
239 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
240 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
241 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
242 pp_cxx_right_bracket, pp_cxx_identifier throughout,
243 (dump_decl): Likewise.
244 (dump_template_decl): Likewise.
245 (dump_function_decl): Likewise. Set padding as appropriate.
246 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
248 (dump_exception_spec): Likewise.
249 (dump_function_name): Use pp_cxx_tree_identifier and
251 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
252 pp_cxx_end_template_argument_list.
253 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
254 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
255 pp_cxx_whitespace throughout.
256 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
258 (dump_unary_op): Likewise.
259 (reinit_cxx_pp): New function.
260 (type_as_string); Use it.
261 (expr_as_string): Likewise.
262 (decl_as_string); Likewise.
263 (context_as_string): Likewise.
264 (lang_decl_name): Likewise.
265 (decl_to_string): Likewise.
266 (expr_to_string): Likewise.
267 (parm_to_string): Likewise.
268 (type_to_string): Likewise.
269 (args_to_string): Likewise.
270 (cv_to_string): Likewise.
272 2004-06-26 Mark Mitchell <mark@codesourcery.com>
274 * cp-tree.h (cp_cv_quals): New type.
275 (cp_declarator): Use it instead of "tree" as appropriate.
276 (grok_method_quals): Adjust prototype.
277 (grokclassfn): Likewise.
278 (do_friend): Likewise.
279 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
280 (grokdeclarator): Likewise.
281 * decl2.c (grok_method_quals): Likewise.
282 (grokclassfn): Likewise.
283 * friend.c (do_friend): Likewise.
284 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
285 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
286 (make_pointer_declarator): Likewise.
287 (make_reference_declarator): Likewise.
288 (make_ptrmem_declarator): Likewise.
289 (cp_parser_ptr_operator): Likewise.
290 (cp_parser_cv_qualifier_seq_opt): Likewise.
291 (cp_parser_cv_qualifier_opt): Remove.
292 (cp_parser_new_declarator_opt): Adjust call to
293 cp_parser_ptr_operator.
294 (cp_parser_conversion_declaration_opt): Likewise.
295 (cp_parser_declarator): Use cp_cv_quals, not tree.
296 (cp_parser_direct_declarator): Likewise.
298 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
300 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
301 Rename DECL_STMT to DECL_EXPR.
302 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
303 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
304 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
306 2004-06-26 Jan Hubicka <jh@suse.cz>
309 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
310 reachability analysis.
312 2004-06-25 Mark Mitchell <mark@codesourcery.com>
314 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
317 2004-06-25 Paul Brook <paul@codesourcery.com>
319 * decl2.c (get_guard): Call targetm.cxx.guard_type.
320 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
322 2004-06-24 Mark Mitchell <mark@codesourcery.com>
324 * decl.c (grokdeclarator): Restore error messages about __thread.
325 * parser.c (cp_parser_decl_specifier_seq): Likewise.
327 2004-06-24 Jason Merrill <jason@redhat.com>
330 * decl.c (grokparms): Give the PARM_DECL reference type if the
331 parameter is passed by invisible reference.
333 2004-06-24 Andreas Schwab <schwab@suse.de>
335 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
337 2004-06-23 Mark Mitchell <mark@codesourcery.com>
339 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
340 (cp/decl.o): Likewise.
341 (cp/decl2.o): Likewise.
343 (cp/semantics.o): Likewise.
344 * config-lang.in (gtfiles): Do not reference cp/lex.h.
345 * class.c: Do not include lex.h.
346 (add_implicitly_declared_members): Do not use
347 adding_implicit_members.
348 (check_bases_and_members): Do not talk about grok_x_components.
349 * cp/cp-tree.h (adding_implicit_members): Remove.
350 (cp_storage_class): New type.
351 (cp_decl_spec): Likewise.
352 (cp_decl_specifier_seq): Likewise.
353 (cp_parameter_declarator): Use it for the decl_specifiers field.
354 (check_tag_decl): Adjust prototype.
355 (shadow_tag): Likewise.
356 (groktypename): Likewise.
357 (start_decl): Likewise.
358 (start_function): Likewise.
359 (start_method): Likewise.
360 (grok_x_components): Remove.
361 (grokfield): Adjust prototype.
362 (grokbitfield): Likewise.
363 (finish_member_class_template): Remove.
364 * decl.c: Do not include lex.h.
365 (adding_implicit_members): Do not define.
366 (check_tag_decl): Do not use trees to represent decl-specifiers.
367 (shadow_tag): Likewise.
368 (groktypename): Likewise.
369 (start_decl): Likewise.
370 (grokvardecl): Likewise.
371 (grokdeclarator): Likewise.
372 (grokparms): Likewise.
373 (start_function): Likewise.
374 (start_method): Likewise.
375 * decl.h (grokdeclarator): Adjust prototype.
376 * decl2.c: Do not include lex.h.
377 (grok_x_components): Remove.
378 (grokfield): Do not use trees to represent decl-specifiers.
379 (grokbitfield): Likewise.
380 * lex.c: Do not include lex.h.
382 * parser.c: Include target.h.
383 (clear_decl_specs): New function.
384 (cp_parser_translation_unit): Do not use trees to represent
386 (cp_parser_postfix_expression): Likewise.
387 (cp_parser_new_type_id): Likewise.
388 (cp_parser_condition): Likewise.
389 (cp_parser_simple_declaration): Likewise.
390 (cp_parser_decl_specifier_seq): Likewise.
391 (cp_parser_function_specifier_opt): Likewise.
392 (cp_parser_conversion_type_id): Likewise.
393 (cp_parser_template_parameter): Likewise.
394 (cp_parser_explicit_instantiation): Likewise.
395 (cp_parser_type_specifier): Likewise.
396 (cp_parser_simple_type_specifier): Likewise.
397 (cp_parser_init_declarator): Likewise.
398 (cp_parser_type_id): Likewise.
399 (cp_parser_type_specifier_seq): Likewise.
400 (cp_parser_parameter_declaration): Likewise.
401 (cp_parser_member_declaration): Likewise.
402 (cp_parser_exception_declaration): Likewise.
403 (cp_parser_function_definition_from_specifiers_and_declarator):
405 (cp_parser_single_declaration): Likewise.
406 (cp_parser_save_member_function_body): Likewise.
407 (cp_parser_friend_p): Likewise.
408 (cp_parser_set_storage_class): New function.
409 (cp_parser_set_decl_spec_type): Likewise.
410 * pt.c: Do not include lex.h.
411 * semantics.c: Likewise.
412 (finish_member_class_template): Remove.
414 2004-06-23 Roger Sayle <roger@eyesopen.com>
416 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
417 longer take both "args" and "convert_args" as arguments.
418 (build_op_delete_call): Update call to build_cxx_call.
419 (build_over_call): Likewise, update call to build_cxx_call.
420 * cp-tree.h (build_cxx_call): Update funtion prototype.
421 * typeck.c (build_function_call): Don't call expand_tree_builtin.
422 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
423 (throw_bad_typeid): Likewise.
424 (build_dynamic_cast_1): Likewise.
426 2004-06-22 Richard Henderson <rth@redhat.com>
428 * class.c (build_vfn_ref): Take a pointer not object. Build
430 (cp_fold_obj_type_ref): New.
431 * call.c (build_over_call): Update build_vfn_ref call.
432 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
433 * cp-tree.h (cp_fold_obj_type_ref): Declare.
435 2004-06-21 Jason Merrill <jason@redhat.com>
438 * cp-gimplify.c (cp_gimplify_init_expr): Look through
441 2004-06-21 Mark Mitchell <mark@codesourcery.com>
443 * cp-tree.def (NEW_EXPR): Add a fourth slot.
444 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
445 (TREE_PARMLIST): Likewise.
446 (CALL_DECLARATOR_PARMS): Likewise.
447 (CALL_DECLARATOR_QUALS): Likewise.
448 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
449 (cp_declarator_kind): New type.
450 (cp_parameter_declarator): Likewise.
451 (cp_declarator): Likewise.
452 (cp_error_declarator): Likewise.
453 (no_parameters): Likewise.
454 (groktypename): Change prototype.
455 (start_decl): Likewise.
456 (start_handler_parms): Likewise.
457 (get_scope_of_declarator): Likewise.
458 (start_function): Likewise.
459 (start_preparsed_function): New function.
460 (start_function): Change prototype.
461 (start_method): Likewise.
462 (grokfield): Likewise.
463 (grokbitfield): Likewise.
464 (build_new): Likewise.
465 (make_pointer_declarator): Remove.
466 (make_reference_declarator): Likewise.
467 (make_call_declarator): Likewise.
468 (set_quals_and_spec): Likewise.
469 (process_template_parm): Change prototype.
470 (begin_function_definition): Remove.
471 (finish_parmlist): Remove.
472 * decl.c (groktypename): Do not use trees to represent
474 (start_decl): Likewise.
475 (start_handler_parms): Remove.
476 (get_scope_of_declarator): Reimplement.
477 (grokdeclarator): Do not use trees to represent declarators.
478 (grokparms): Likewise.
479 (start_function): Likewise.
480 (start_method): Likewise.
481 (build_void_list_mode): Do not use TREE_PARMLIST.
482 * decl.h (grokdeclarator): Change prototype.
483 * decl2.c (grok_method_quals): Robustify.
484 (grok_x_components): Do not use trees to represent declarators.
485 (grokfield): Likewise.
486 (grokbitfield): Likewise.
487 (start_objects): Build FUNCTION_DECLs, not declarators.
488 (start_static_storage_duration_function): Likewise.
489 * init.c (build_new): Simplify.
490 * lex.c (make_pointer_declarator): Remove.
491 (make_reference_declarator): Likewise.
492 (make_call_declarator): Likewise.
493 (set_quals_and_spec): Likewise.
494 * method.c (use_thunk): Use start_preparsed_function.
495 (synthesize_method): Likewise.
496 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
497 * optimize.c (maybe_clone_body): Use start_preparsed_function.
498 * parser.c (cp_error_declarator): New variable.
499 (declarator_obstack): Likewise.
500 (alloc_declarator): New function.
501 (make_declarator): Likewise.
502 (make_id_declarator): Likewise.
503 (make_pointer_declarator): Likewise.
504 (make_reference_declarator): Likewise.
505 (make_ptrmem_declarator): Likewise.
506 (make_call_declarator): Likewise.
507 (make_array_declarator): Likewise.
508 (no_parameters): New variable.
509 (make_parameter_declarator): Likewise.
510 (cp_parser_check_for_definition_in_return_type): Do not use trees
511 to represent declarators.
512 (cp_parser_translation_unit): Likewise.
513 (cp_parser_new_expression): Likewise.
514 (cp_parser_new_type_id): Likewise.
515 (cp_parser_new_declarator_opt): Likewise.
516 (cp_parser_direct_new_declarator): Likewise.
517 (cp_parser_condition): Likewise.
518 (cp_parser_declaration_statement): Likewise.
519 (cp_parser_declaration): Likewise.
520 (cp_parser_conversion_type_id): Likewise.
521 (cp_parser_conversion_declarator_opt): Likewise.
522 (cp_parser_template_parameter_list): Likewise.
523 (cp_parser_template_parameter): Likewise.
524 (cp_parser_explicit_instantiation): Likewise.
525 (cp_parser_init_declarator): Likewise.
526 (cp_parser_declarator): Likewise.
527 (cp_parser_direct_declarator): Likewise.
528 (cp_parser_type_id): Likewise.
529 (cp_parser_parameter_declaration_clause): Likewise.
530 (cp_parser_parameter_declaration_list): Likewise.
531 (cp_parser_parameter_declaration): Likewise.
532 (cp_parser_member_declaration): Likewise.
533 (cp_parser_exception_declaration): Likewise.
534 (cp_parser_check_declarator_template_parameters): Likewise.
535 (cp_parser_function_definition_from_specifiers_and_declarator):
537 (cp_parser_save_member_function_body): Likewise.
538 * pt.c (process_template_parm): Add is_non_type parameter.
539 (convert_template_argument): Adjust call to groktypename.
540 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
541 (tsubst): Do not expect declarators.
542 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
544 (instantiate_decl): Use start_preparsed_function.
545 * semantics.c (begin_function_definition): Remove.
546 (finish_parmlist): Remove.
547 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
550 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
552 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
553 (build_new_method_call): Likewise.
554 * decl.c (local_variable_p_walkfn): Don't walk into types.
555 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
556 (build_anon_union_vars): Add new operand for COMPONENT_REF.
557 * init.c (buld_new): Add new operand for ARRAY_REF.
558 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
559 (do_build_assign_ref): Likewise.
560 * parser.c (cp_parser_direct_new_declarator): Add new operands
562 (cp_parser_direct_declarator): Likewise.
563 * pt.c (tsubst): Likewise.
564 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
566 * semantics.c (finish_non_static_data_member): Add new operand
568 * typeck.c (build_class_member_access_expr): Likewise.
569 (build_class_member_access_expr, finish_class_member_access_expr):
571 (build_ptrmemfunc_access_expr): Likewise.
572 (build_array_ref): Add new operands for ARRAY_REF.
573 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
574 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
576 2004-06-21 Richard Henderson <rth@redhat.com>
578 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
579 * parser.c (cp_parser_jump_statement): Update commentary.
580 * pt.c (tsubst_expr): Use RETURN_EXPR.
581 * semantics.c (finish_return_stmt): Likewise.
582 (finalize_nrv_r): Likewise.
583 * typeck.c, typeck2.c: Update file start commentary.
585 2004-06-21 Richard Henderson <rth@redhat.com>
587 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
589 2004-06-20 Richard Henderson <rth@redhat.com>
591 * cp-tree.h (add_decl_stmt): Declare.
592 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
593 * semantics.c (maybe_cleanup_point_expr): New.
594 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
595 finish_for_expr, finish_switch_cond): Use it.
596 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
598 2004-06-20 Richard Henderson <rth@redhat.com>
600 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
601 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
602 (cp_gimplify_expr): Call it.
603 (gimplify_cleanup_stmt): Move from c-gimplify.c.
604 (cp_genericize): New.
605 * decl.c (finish_function): Call it.
606 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
607 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
608 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
609 (cp_genericize): Declare.
610 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
611 * dump.c (cp_dump_tree): Likewise.
612 * semantics.c (push_cleanup): Move from c-semantics.c.
614 2004-06-20 Zack Weinberg <zack@codesourcery.com>
616 * cp-lang.c (has_c_linkage): Implement.
618 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
619 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
620 (builtin_function_1): Don't call make_decl_rtl.
621 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
622 (grokvardecl): Don't call mangle_decl.
623 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
625 * method.c (set_mangled_name_for_decl): Delete.
626 * name-lookup.c (pushdecl): When a local extern shadows a
627 file-scope declaration of the same object, give both DECLs the
629 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
630 on DECL_ASSEMBLER_NAME.
632 2004-06-19 Richard Henderson <rth@redhat.com>
634 * cp-gimplify.c: Remove unnecessary prototypes.
635 (cp_gimplify_stmt): Merge into ...
636 (cp_gimplify_expr): ... here. Move to end of file. Handle
637 stmts_are_full_exprs_p frobbing.
638 * cp-tree.h (cp_gimplify_stmt): Remove.
639 * pt.c (tsubst_expr): Merge prep_stmt and unify.
640 * tree.c (init_tree): Don't set lang_gimplify_stmt.
642 2004-06-18 Richard Henderson <rth@redhat.com>
645 * semantics.c (begin_cond): New.
646 (finish_cond): Rewrite to handle template DECL_STMTs specially.
647 Assume that non-template decls go land before the conditional.
648 (simplify_loop_decl_cond): Likewise.
649 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
650 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
651 begin_switch_stmt, finish_switch_cond): Update to match.
653 2004-06-17 Jason Merrill <jason@redhat.com>
656 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
657 (finish_stmt_expr_expr): Update type after conversions.
658 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
659 Handle void initializer.
660 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
662 2004-06-17 Geoffrey Keating <geoffk@apple.com>
664 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
665 * cp-tree.h (defer_fn): Delete.
666 * decl2.c (defer_fn): Delete.
667 (finish_file): Simplify deferred_fns loops; check that
668 only used inline functions get into deferred_fns.
669 (mark_used): Inline previous contents of defer_fn.
671 2004-06-16 Richard Henderson <rth@redhat.com>
673 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
674 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
675 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
676 of CTOR_INITIALIZER ...
677 (pp_cxx_statement): ... here.
678 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
679 (finish_function): Use alloc_stmt_list to zap entire function.
680 * parser.c (cp_parser_compound_statement): Update commentary.
681 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
682 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
683 (finish_stmt_expr): Don't look through COMPOUND_STMT.
685 2004-06-16 Geoffrey Keating <geoffk@apple.com>
687 * pt.c (mark_decl_instantiated): Don't call defer_fn.
689 2004-06-16 Richard Henderson <rth@redhat.com>
691 * parser.c (cp_parser_labeled_statement): Update commentary.
692 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
693 * tree.c (mark_local_for_remap_r): Likewise.
695 2004-06-16 Richard Henderson <rth@redhat.com>
697 * parser.c (cp_parser_asm_definition): Update commentary.
698 * pt.c (tsubst_expr): Use ASM_EXPR.
699 * semantics.c (finish_asm_stmt): Likewise.
701 2004-06-16 Richard Henderson <rth@redhat.com>
703 * decl.c (finish_destructor_body): Use LABEL_EXPR.
704 * parser.c (cp_parser_statement): Update commentary.
705 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
706 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
707 * tree.c (mark_local_for_remap_r): Likewise.
709 2004-06-16 Richard Henderson <rth@redhat.com>
712 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
713 statement in FOR_INIT_STMT for templates.
715 2004-06-15 Richard Henderson <rth@redhat.com>
717 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
718 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
719 (genericize_try_block): Use gimplify_stmt.
720 (genericize_catch_block, genericize_eh_spec_block): Likewise.
721 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
722 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
723 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
724 (cp_tree_chain_matters_p): Remove.
725 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
726 (COMPOUND_STMT_BODY_BLOCK): New.
727 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
728 (EXPR_STMT_STMT_EXPR_RESULT): New.
729 (building_stmt_tree): Check cur_stmt_list.
730 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
731 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
732 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
733 (cp_finish_decl): Use push_cleanup.
734 (start_function, finish_function): Use statement lists.
735 (finish_stmt): Do nothing.
736 * except.c (begin_eh_spec_block): Use statement lists.
737 (check_handlers_1, check_handlers): Likewise.
738 * init.c (construct_virtual_base): Don't add extra compound stmts.
739 (build_vec_init): Likewise.
740 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
741 * name-lookup.h (struct cp_binding_level): Add statement_list.
742 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
743 (cp_parser_labeled_statement, cp_parser_expression_statement,
744 cp_parser_statement_seq_opt): Likewise.
745 (cp_parser_compound_statement): Likewise. Take bool for try block.
746 (cp_parser_selection_statement): Tidy if processing.
747 (cp_parser_already_scoped_statement): Rewrite to do what it says.
748 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
749 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
750 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
751 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
752 (finish_cond): New, rewritten from FINISH_COND.
753 (simplify_loop_decl_cond): New.
754 (finish_expr_stmt): Avoid nested EXPR_STMTs.
755 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
756 begin_else_clause, finish_else_clause, finish_if_stmt,
757 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
758 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
759 finish_for_cond, finish_for_stmt, begin_switch_stmt,
760 finish_switch_cond, finish_switch_stmt, begin_try_block,
761 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
762 finish_handler_sequence, finish_function_handler_sequence,
763 begin_handler, finish_handler_parms, finish_handler,
764 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
765 using statement lists.
766 (begin_compound_stmt): Replace has_no_scope argument with flags.
767 Update all callers. Use statement lists.
768 (finish_compound_stmt): Likewise.
769 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
770 (current_scope_stmt_stack): Remove.
771 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
772 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
773 Rewrite with statement lists.
775 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
777 * parser.c: Change all assignments of c_lex_string_translate
778 to true and false to 1 and 0.
779 (cp_lexer_read_token): Convert type of the translated string.
780 (cp_parser_skip_to_closing_parentheses): Preserve original
781 value of c_lex_string_translate, and set it to -1 while
783 (cp_parser_cache_group): Likewise.
784 (cp_parser_cache_group_1): Renamed.
785 (cp_parser_asm_operand_list): Remove redundant setting of
786 c_lex_string_translate.
787 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
788 Handle chained strings.
790 2004-06-12 Andrew Pinski <apinski@apple.com>
794 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
796 * cp-tree.h: Fix typo.
798 * cp-tree.h: Include cgraph.h
799 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
800 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
802 2004-06-12 Jason Merrill <jason@redhat.com>
804 PR tree-optimization/14107
805 * decl.c (finish_function): Warn about no return in all functions.
807 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
809 * cp-tree.h (struct language_function): Remove cannot_inline.
810 * decl.c (save_function_data): cannot_inline is no more.
811 (cxx_push_function_context): Likewise.
812 * decl2.c (start_objects, start_static_storage_duration_function):
813 Reset DECL_INLINE, set DECL_UNINLINABLE.
815 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
818 * search.c (lookup_field): Propagate the ambiguity list.
819 (lookup_fnfields): Likewise.
821 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
824 * parser.c (cp_parser_template_name): Ctors/dtors never need a
825 template keyword to disambiguate.
827 2004-06-14 Mark Mitchell <mark@codesourcery.com>
830 * decl.c (grokdeclarator): Ignore pointer-to-members when
831 computing template depth.
834 * name-lookup.c (pushtag): Do not try to put class declarations in
835 explicit specialization scopes.
837 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
839 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
841 2004-06-11 Mark Mitchell <mark@codesourcery.com>
844 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
845 bindings for undeclared built-ins.
847 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
849 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
850 appear at the correct location.
852 2004-06-10 Jason Merrill <jason@redhat.com>
856 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
857 * init.c (build_offset_ref): Build SCOPE_REF with non-null
858 TREE_TYPE for non-dependent names.
859 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
860 unknown_type_node as its TREE_TYPE.
861 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
862 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
863 (dump_expr) <SCOPE_REF case>: Likewise.
865 2004-06-10 Mark Mitchell <mark@codesourcery.com>
868 * parser.c (cp_parser_direct_declarator): Robustify.
871 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
872 constants in non-dependent contexts.
876 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
879 2004-06-10 Jakub Jelinek <jakub@redhat.com>
882 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
885 2004-06-09 Mark Mitchell <mark@codesourcery.com>
889 2004-06-07 Mark Mitchell <mark@codesourcery.com>
890 * lex.c (handle_pragma_interface): Deprecate.
891 (handle_pragma_implementation): Likewise.
893 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
895 * g++spec.c (lang_specific_driver): Remove check for -lm
896 and -lmath when check it see if it was the math library.
898 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
901 * parser.c (cp_parser_direct_declarator): Reject constructor named
902 as qualified template-id.
904 2004-06-07 Mark Mitchell <mark@codesourcery.com>
907 * lex.c (handle_pragma_interface): Deprecate.
908 (handle_pragma_implementation): Likewise.
910 2004-06-07 Mark Mitchell <mark@codesourcery.com>
913 * parser.c (cp_parser_iteration_statement): Fix typo in error
917 * pt.c (tsubst_default_argument): Do not defer access checks
918 while substituting into the default argument.
921 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
922 constant in a non-dependent context.
925 * except.c (build_throw): Ensure that temp_expr has been
928 2004-06-06 Roger Sayle <roger@eyesopen.com>
930 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
932 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
935 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
936 'typename', and accept 'template'.
938 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
939 Jan Hubicka <jh@suse.cz>
942 * method.c (use_think): Do not mark thunk as referenced.
944 2004-06-03 Matt Austern <austern@apple.com>
947 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
948 is nonzero, and if we see a noninline definition of a key method,
949 make the vtables nonweak.
951 2004-06-02 Matt Austern <austern@apple.com>
953 * cp-tree.h (instantiate_decl): new boolean parameter,
954 undefined_ok. Current behavior is equivalent to its being 0.
955 * decl2.c (mark_used): Add new argument when calling instantiate_decl
956 * pt.c (mark_decl_instantiated): Unconditionally make
957 instantiations explicit unconditionally
958 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
959 since mark_decl_instantiated now does it.
960 (instantiate_class_member): New. Instantiate a member of an
961 explicitly instantiated class template.
962 (do_type_instantiation): Explicitly instantiate members of an
963 explicitly instantiated class template.
964 (instantiate_decl): if undefined_ok is nonzero, and if we're
965 trying to explicitly instantiated a template with no definition,
966 change it to an implicit instantiation.
967 (instantiate_pending_templates): Add new argument to instantiate_decl.
968 * tree.c (cp_cannot_inline_tree_fn): Likewise.
970 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
972 * cp-tree.h: Fix typo.
974 * cp-tree.h: Include cgraph.h
975 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
976 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
978 2004-06-01 Jason Merrill <jason@redhat.com>
981 * call.c (call_builtin_trap): Remove type parm.
982 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
983 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
985 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
988 * init.c (build_offset_ref): Build SCOPE_REF with non-null
989 TREE_TYPE for non-dependent names.
990 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
991 unknown_type_node as its TREE_TYPE.
992 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
993 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
994 (dump_expr) <SCOPE_REF case>: Likewise.
996 2004-06-01 Richard Henderson <rth@redhat.com>
997 Andrew Pinski <pinskia@physics.uc.edu>
999 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1000 * parser.c (struct cp_parser): Remove in_offsetof.
1001 (cp_parser_new): Don't set it.
1002 (cp_parser_unary_expression): Don't check it.
1003 (cp_parser_postfix_open_square_expression): Split out from ...
1004 (cp_parser_postfix_expression): ... here.
1005 (cp_parser_postfix_dot_deref_expression): Likewise.
1006 (cp_parser_builtin_offsetof): New.
1007 (cp_parser_primary_expression): Use it.
1009 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1012 * parser.c (cp_parser_postfix_expression): Allow subscript
1013 operator in offsetof.
1015 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1018 * friend.c (add_friend): Do not try to perform access checks for
1019 functions from dependent classes.
1021 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1023 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1024 (pp_cxx_begin_template_argument_list): Turn into a function.
1025 (pp_cxx_end_template_argument_list): Likewise.
1026 (pp_cxx_separate_with): Define.
1027 (pp_cxx_unqualified_id): Tidy.
1028 (pp_cxx_primary_expression): Likewise.
1029 (pp_cxx_postfix_expression): Likewise.
1030 (pp_cxx_expression): Likewise.
1031 (pp_cxx_simple_type_specifier): Likewise.
1032 (pp_cxx_type_specifier_seq): Likewise.
1033 (pp_cxx_parameter_declaration_clause): Likewise.
1034 (pp_cxx_exception_specification): Likewise.
1035 (pp_cxx_direct_declarator): Likewise.
1036 (pp_cxx_type_id): Likewise.
1037 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1039 (pp_cxx_left_paren): Likewise.
1040 (pp_cxx_right_paren): Likewise.
1041 (pp_cxx_left_brace): Likewise.
1042 (pp_cxx_right_brace): Likewise.
1043 (pp_cxx_left_bracket): Likewise.
1044 (pp_cxx_right_bracket): Likewise.
1045 (pp_cxx_dot): Likewise.
1046 (pp_cxx_identifier): Likewise.
1047 (pp_cxx_tree_identifier): Likewise.
1048 (pp_cxx_ampersand): New macro.
1049 (pp_cxx_star): Likewise.
1050 (pp_cxx_arrow): Likewise.
1051 (pp_cxx_semicolon): Likewise.
1052 (pp_cxx_complement): Likewise.
1053 (pp_cxx_begin_template_argument_list): Declaree.
1054 (pp_cxx_end_template_argument_list): Likewise.
1055 (pp_cxx_colon_colon): likewise.
1057 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1059 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1062 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1064 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1065 typeck.c: Fix comment formatting.
1067 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1069 * cp-lang.c (cp_expand_decl): Remove.
1070 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1072 2004-05-30 Andreas Jaeger <aj@suse.de>
1074 * lang-specs.h: Add missing initializers for .ii.
1076 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1078 * decl.c (cp_make_fname_decl): Free return value from
1081 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1084 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1086 * init.c (build_new): Likewise.
1089 * name-lookup.c (arg_assoc): Robustify.
1092 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1093 when determining the scope to use for a pointer to member.
1094 (lookup_anon_field): Give it external linkage.
1095 * cp-tree.h (lookup_anon_field): Declare it.
1096 * expr.c (cplus_expand_constant): Use it.
1098 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1101 * parser.c (cp_parser_simple_type_specifier): Call
1102 maybe_note_name_used_in_class.
1104 2004-05-28 Tom Marshall <tmarshall@real.com>
1107 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1108 the class has friends.
1110 2004-05-27 Adam Nemet <anemet@lnxw.com>
1113 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1114 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1116 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1118 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1119 if it might be needed.
1120 * pt.c (mark_decl_instantiated): Only call defer_fn if
1121 the function actually needs processing in finish_file.
1122 * decl2.c (finish_file): Add check that elements in
1123 deferred_fns_used are really needed there. Remove unnecessary
1124 test of DECL_SAVED_TREE.
1126 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1128 * Make-lang.in: No need to specify $(LIBCPP).
1130 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1133 * parser.c (cp_parser_class_head): Robustify.
1136 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1138 (cp_parser_constructor_declarator_p): Treat attributes
1142 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1143 base classes in templates.
1145 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1148 * pt.c (instantiate_template): Robustify.
1150 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1153 * decl.c (xref_tag): Issue errors about redeclaring template
1154 classes as non-template classes.
1156 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1159 * name-lookup.c (supplement_binding): Allow redefinitions of
1163 * parser.c (cp_parser_template_argument): Robustify.
1165 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1167 * class.c (alter_access): Use %E format specifier to print an
1168 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1169 (push_lang_context): Likewise.
1170 * decl.c (lookup_label): Likewise.
1171 (grokdeclarator): Likewise.
1172 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1173 * pt.c (do_type_instantiation): Likewise.
1174 * tree.c (handle_java_interface_attribute): Likewise.
1175 (handle_com_interface_attribute): Likewise.
1176 (handle_init_priority_attribute): Likewise.
1178 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1182 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1183 recognized as overloaded functions.
1185 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1188 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1189 layout conflicts for unions.
1192 * typeck.c (build_x_unary_op): Instantiate template class
1193 specializations before looking for "operator &".
1196 * typeck.c (complete_type): Layout non-dependent array types, even
1200 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1203 2004-05-22 Roger Sayle <roger@eyesopen.com>
1205 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1206 returning when TREE_TYPE is error_mark_node.
1207 * typeck.c (require_complete_type): Return error_mark_node if
1208 value's type is an error_mark_node.
1210 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1212 * optimize.c (calls_setjmp_r): Remove.
1213 (calls_setjmp_p): Remove.
1214 * cp-tree.c (calls_setjmp_p): Remove.
1215 * decl.c (finish_function): Do not call calls_setjmp_p.
1217 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1219 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1220 * decl2.c (maybe_make_one_only): Likewise.
1221 * method.c (use_thunk): Likewise.
1223 2004-05-18 Jason Merrill <jason@redhat.com>
1225 * class.c (build_base_path): Tidy a bit.
1227 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1229 * name-lookup.c (struct scope_binding): New.
1230 (EMPTY_SCOPE_BINDING): New.
1231 (lookup_using_namespace): Take a scope_binding instead of a
1233 (qualified_lookup_using_namespace): Likewise.
1234 (cxx_binding_clear): Delete.
1235 (do_nonmember_using_decl): Use a scope_binding instead of a
1237 (lookup_tag): Don't call select_decl.
1238 (ambiguous_decl): Don't return anything (and change callers to match).
1239 Take a scope_binding as the second parameter.
1240 (lookup_namespace_name): Use a scope_binding instead of a
1242 (unqualified_namespace_lookup): Likewise.
1243 (lookup_qualified_name): Likewise.
1244 (select_decl): Take a scope_binding instead of a cxx_binding.
1245 Use macros rather than hand-coding tests for type-ness.
1247 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1249 * cp-gimplify.c: Rename from cp-simplify.c.
1250 * Make-lang.in, optimize.c: Update.
1252 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1254 Merge from tree-ssa-20020619-branch. See
1255 ChangeLog.tree-ssa for details.
1257 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1258 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1259 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1260 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1262 * cp-mudflap.c: New file.
1263 * cp-simplify.c:: New file.
1265 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1268 * decl2.c (check_classfn): For member templates, compare also the
1269 template parameters to match the declaration.
1270 * cp-tree.h: Adjust declaration of check_classfn.
1271 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1272 * friend.c (do_friend): Likewise.
1273 * pt.c (tsubst_friend_function): Likewise.
1275 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1277 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1278 Instead, dig into the representation type to find the array bound.
1280 2004-04-30 Jason Merrill <jason@redhat.com>
1282 Refer to base members using COMPONENT_REFs where possible.
1283 * class.c (build_simple_base_path): New fn.
1284 (build_base_path): Use it for non-virtual base references.
1285 (layout_class_type): Change base fields to their real type
1286 after layout is done.
1287 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1288 * cp-lang.c (cxx_get_alias_set): Use it.
1290 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1292 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1295 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1298 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1299 used in integral constant expressions.
1301 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1303 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1306 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1308 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1309 * decl.c (reshape_init): Use it.
1310 * init.c (perform_member_init): Remove redundant condition.
1311 (build_aggr_init): Adjust to handle brace-enclosed initializers
1313 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1315 * parser.c (cp_parser_initializer_clause): Do not set
1316 TREE_HAS_CONSTRUCTOR on the initializer.
1317 * rtti.c (tinfo_base_init): Likewise.
1318 (generic_initializer): Likewise.
1319 (ptr_initializer): Likewise.
1320 (ptm_initializer): Likewise.
1321 (class_initializer): Likewise.
1322 (get_pseudo_ti_init): Likewise.
1323 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1325 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1327 * name-lookup.c (anonymous_namespace_name): Make static.
1329 2004-04-19 Roger Sayle <roger@eyesopen.com>
1332 * class.c (build_base_path): Call fold whilst building the NULL
1333 pointer check expression trees.
1335 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1337 * init.c (build_new_1): Don't use type size argument for Java
1338 _Jv_AllocObject call.
1340 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1342 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1343 declaration and definition.
1345 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1348 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1349 than ASM_OUTPUT_DEF.
1351 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1353 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1354 current_function_decl == NULL.
1356 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1359 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1362 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1364 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1366 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1367 or TREE_SIDE_EFFECTS of a type.
1369 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1372 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1373 cv-qualifier unification.
1374 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1376 2004-04-02 Jan Hubicka <jh@suse.cz>
1378 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1379 * cp-tree.h (cp_update_decl_after_saving): Declare.
1380 * tree.c (cp_update_decl_after_saving): Define.
1382 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1385 * typeck.c (get_delta_difference): Call fold before returning the
1388 2004-04-01 Richard Henderson <rth@redhat.com>
1391 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1392 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1394 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1397 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1399 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1401 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1403 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1405 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1406 * class.c (check_bitfield_decl): Likewise.
1407 * cvt.c (type_promotes_to): Likewise.
1408 * decl.c (finish_enum): Likewise.
1409 * mangle.c (write_builtin_type): Likewise.
1410 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1411 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1412 (build_binary_op): Likewise.
1414 2004-03-31 Jan Hubicka <jh@suse.cz>
1416 * tree.h (optimize_function): Kill prototype.
1417 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1418 * semantics.c (expand_body): Kill.
1420 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1423 * decl.c (start_decl_1): Do not decide whether or not to create a
1424 new cleanup level until after the type has been completed.
1427 * pt.c (tsubst_default_argument): Clear current_function_decl.
1429 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1431 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1433 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1435 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1436 is null, just print the literal name and return.
1438 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1440 * cxx-pretty-print.c: Fix comment typos.
1442 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1444 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1447 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1449 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1450 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1453 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1455 PR 12267, 12391, 12560, 13129, 14114, 14133
1456 * cp-lang.c (c_reset_state): Delete.
1457 (push_file_scope, pop_file_scope): New stubs.
1458 * parser.c (c_parse_file): Call sorry() here if called more than once.
1460 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1462 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1465 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1467 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1469 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1471 * error.c (enum pad): Remove.
1472 (dump_qualifiers): Likewise.
1473 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1474 (dump_aggr_type): Likewise.
1475 (dump_type_suffix): Likewise.
1476 (dump_simple_decl): Likewise.
1477 (dump_function_decl): Likewise.
1478 (cv_to_string): Likewise.
1479 (dump_type_prefix): Likewise. Adjust return void.
1480 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1482 (pp_cxx_template_keyword_if_needed): Document.
1483 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1484 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1485 MUST_NOT_THROW_EXPR.
1487 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1490 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1491 templates, if their type is non-dependent.
1493 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1495 * call.c (build_op_delete_call): Do not forget the placement
1496 arguments when iterating through mutiple delete operators.
1498 * cp-tree.h (svaed_scope): Remove last_parms.
1499 (NEW_DELETE_OPNAME_P): New macro.
1500 (last_function_parms): Remove.
1501 (do_friend): Adjust prototype.
1502 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1503 using last_function_parms.
1504 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1505 using last_function_parms.
1506 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1507 for class-specific operator new and operator delete.
1508 (grok_op_properties): Do not look for allocation functions with
1510 (start_function): Use DECL_ARGUMENTS instead of
1511 last_function_parms.
1512 * decl.h (last_function_parms): Do not declare.
1513 * decl2.c (grokclassfn): Do not use last_function_parms.
1514 * friend.c (do_friend): Remove parmdecls parameter.
1515 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1516 (pop_from_top_level): Do not restore it.
1517 * pt.c (check_explicit_specialization): Do not adjust
1518 last_function_parms.
1520 * name-lookup.c (do_local_using_decl): Create a local binding for
1521 types brought in via using declarations.
1523 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1524 function declarations correctly.
1526 * semantics.c (finish_id_expression): Correct handling of
1527 conversion operators to dependent types.
1529 * typeck.c (lookup_destructor): Allow the use of destructors from
1532 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1534 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1535 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1536 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1537 the field is named TEMPLATE_TYPE_PARM_INDEX.
1539 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1542 * parser.c (cp_parser_functional_cast): A cast to anything
1543 but integral or enumaration type is not an integral constant
1545 * pt.c (value_dependent_expression_p): Handle cast expressions
1546 without operands (such as "int()").
1548 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1550 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1551 cv-qualification between the type named by the
1552 pseudo-destructor-name and the object-type.
1554 * search.c (accessible_base_p): Handle non-proper bases.
1556 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1557 refers to a single overloaded function, set the type of the
1559 * tree.c (lvalue_type): Simplify.
1560 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1562 (build_unary_op): Handle OVERLOADs with known types.
1564 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1567 * parser.c (cp_parser_postfix_expression): Handle the use of
1568 "typename" in non-dependent contexts. Convert appropriately when
1569 when using a qualified name after "->" or ".".
1571 * call.c (conditional_conversion): Honor the requirement that some
1572 conversions refer to the original object.
1574 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1576 * call.c (build_conditional_expr): Do not call force_rvalue for
1577 operands of void_type when the conditional expression itself has
1579 * name-lookup.c (pushdecl): Don't consider a declaration of a
1580 function named "main" to be an overload of a type named "main".
1581 * parser.c (cp_parser_template_name): Perform name lookup when the
1582 template name is proceeded by "template" if the qualifying scope
1584 * typeck.c (composite_pointer_type_r): Correctly handle
1585 pointer-to-member types.
1586 (build_const_cast): Likewise.
1588 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1590 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1591 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1592 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1593 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1594 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1595 (TYPEOF_TYPE_EXPR): New macro.
1596 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1597 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1598 * pt.c (tsubst): Likewise.
1599 * semantics.c (finish_typeof): Likewise.
1600 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1601 and TEMPLATE_TYPE_PARM.
1602 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1603 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1605 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1608 * cp-tree.h (build_new_op): Change prototype.
1609 (build_x_binary_op): Likewise.
1610 * call.c (build_new_op): Add overloaded_p parameter.
1611 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1612 * parser.c (cp_parser_binary_expression): Note that uses of
1613 overloaded operators prevents an expression from being considered
1614 an integral constant.
1615 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1617 * semantics.c (finish_call_expr): Likewise.
1618 * typeck.c (rationalize_conditional_expr): Likewise.
1619 (build_x_indirect_ref): Likewise.
1620 (build_x_binary_op): Likewise.
1621 (build_x_unary_op): Likewise.
1622 (build_x_compound_expr): Likewise.
1623 (build_modify_expr): Likewise.
1624 * typeck2.c (build_x_arrow): Likewise.
1626 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1628 * cp-lang.c, ptree.c: Update copyright.
1630 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1633 * parser.c (cp_parser_non_integral_constant_expression): Encode
1634 more of the idiom that surrounded calls to this function within
1636 (cp_parser_primary_expression): Adjust accordingly.
1637 (cp_parser_postfix_expression): Likewise.
1638 (cp_parser_unary_expression): Likewise.
1639 (cp_parser_cast_expression): Likewise.
1640 (cp_parser_assignment_expression): Likewise.
1641 (cp_parser_expression): Likewise.
1642 (cp_parser_new_expression): Note that new-expressions are not
1643 allowed in integral constant expressions.
1644 (cp_parser_delete_expression): Likewise.
1646 2004-03-12 Matt Austern <austern@apple.com>
1648 * decl2.c (maybe_make_one_only): Look at
1649 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1650 to make an explicit instantiation weak.
1651 * method.c (use_thunk): Make sure we call comdat_linkage
1653 * pt.c (do_type_instantiation): On systems where weak symbols
1654 don't go in a static archive's TOC, explicit instantiation of a
1655 class must imply *explicit* instantiation of its memeber.
1657 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1659 * call.c, cp-tree.h, pt.c: Fix comment typos.
1661 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1664 * decl.c (xref_tag): Disregard non-type declarations when
1665 looking up a tagged type.
1667 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1670 * call.c (convert_like_real): Build a const qualified temporary,
1671 when testing ctor access.
1673 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1675 * call.c (initialize_reference): Fix typo.
1677 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1680 * pt.c (determine_specialization): For member templates, match also
1684 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1686 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1688 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1691 * call.c (initialize_reference): Handle initializers that are
1692 class-member access expressions applies to rvalues.
1694 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1697 * name-lookup.c (supplement_binding): Ignore functions that are
1698 marked DECL_ANTICIPATED.
1700 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1703 * class.c (check_field_decls): Complain about non-static data
1704 members of reference type in unions. Propagate
1705 CLASSTYPE_REF_FIELDS_NEED_INIT and
1706 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1708 * init.c (perform_member_init): Complain about mbmers with const
1709 type that are not explicitly initialized.
1711 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1713 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1714 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1715 (lang_identifier): Remove implicit_decl and error_locus.
1716 (IDENTIFIER_IMPLICIT_DECL): Remove.
1717 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1718 (IDENTIFIER_ERROR_LOCUS): Likewise.
1719 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1720 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1721 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1722 (implicitly_declare): Remove.
1723 * decl.c (warn_extern_redeclared_static): Remove check of
1724 IDENTIFIER_IMPLICIT_DECL.
1725 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1726 (implicitly_declare): Remove.
1727 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1728 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1729 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1730 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1731 in the innermost scope, rather than at namespace scope.
1732 * name-lookup.c (push_local_binding): Give it external linkage.
1733 (pushdecl): Remove dead code.
1734 * name-lookup.h (push_local_binding): Declare it.
1735 * ptree.c (cxx_print_identifier): Don't print
1736 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1737 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1738 not IDENTIFIER_ERROR_LOCUS.
1739 * typeck.c (build_function_call): Remove dead code.
1741 2004-03-08 Jason Merrill <jason@redhat.com>
1744 * decl.c (xref_tag): Remove attribute handling.
1745 * cp-tree.h: Adjust prototype.
1746 * decl.c, parser.c, rtti.c: Adjust callers.
1747 * parser.c (cp_parser_class_head): Pass back attributes in the
1749 (cp_parser_class_specifier): Adjust.
1751 2004-03-08 Matt Austern <austern@apple.com>
1754 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1755 as static, to static_decls array.
1757 2004-03-05 Jason Merrill <jason@redhat.com>
1759 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1761 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1763 * decl.c (grokfndecl): Update old incorrect comment.
1764 (grokvardecl): Diagnose C++ variables of type with no linkage.
1766 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1769 * pt.c (build_non_dependent_expr): Do not create a
1770 NON_DEPENDENT_EXPR for a THROW_EXPR.
1772 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1775 * error.c (dump_expr): Handle THROW_EXPR.
1777 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1780 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1781 lookup if ordinary name-lookup finds a non-function.
1782 * pt.c (tsubst_copy_and_build): Likewise.
1785 * parser.c (cp_parser_late_parsing_default_args): Check that there
1786 are no extra tokens after the end of the default-argument
1789 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1792 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1793 having C++ linkage for name-mangling purposes.
1796 * parser.c (cp_parser_direct_declarator): Recognize constructor
1797 declarators that use a template-id to name the class being
1801 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1802 (tsubst_expr): Do not call tsubst_copy, even when
1803 processing_template_decl.
1805 2004-03-01 Jeff Law <law@redhat.com>
1807 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1810 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1813 * name-lookup.h (push_scope): Change prototype.
1814 * name-lookup.c (push_scope): Do not reenter the current class
1816 * decl.c (grokfndecl): Check return code from push_scope before
1818 * decl2.c (check_classfn): Likewise.
1819 * parser.c (cp_parser_conversion_function_id): Likewise.
1820 (cp_parser_init_declarator): Likewise.
1821 (cp_parser_direct_declarator): Likewise.
1822 (cp_parser_class_specifier): Likewise.
1823 (cp_parser_class_head): Likewise.
1824 (cp_parser_lookup_name): Likewise.
1825 (cp_parser_constructor_declarator_p): Likewise.
1826 * pt.c (instantiate_class_template): Likewise.
1827 (resolve_typename_type): Likewise.
1829 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1832 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1836 * class.c (update_vtable_entry_for_fn): Do not go through
1837 covariance machinery if the type returned by an overrider is the
1838 same as the original.
1840 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
1842 * call.c: Fix a comment typo.
1844 2004-02-27 Ziemowit Laski <zlaski@apple.com>
1846 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1848 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1851 * parser.c (cp_parser_parameter_declaration_list): Commit
1852 to fewer tentative parses.
1854 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1857 * pt.c (dependent_type_p_r): A template template parameter is a
1860 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1863 * mangle.c (write_template_arg_literal): Don't rely on identity for
1866 2004-02-24 Jason Merrill <jason@redhat.com>
1868 * tree.c (build_exception_variant): Use check_qualified_type.
1870 2004-02-23 Zack Weinberg <zack@codesourcery.com>
1871 Kazu Hirata <kazu@cs.umass.edu>
1873 * decl.c (cxx_init_decl_processing): Don't check
1874 flag_writable_strings.
1876 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
1879 * typeck.c (maybe_warn_about_returning_address_of_location):
1880 Change check for VAR_DECL to use DECL_P instead.
1882 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1885 * cvt.c (build_expr_type_conversion): Type must be complete before
1886 looking up for conversions.
1888 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1891 * name-lookup.c (arg_assoc_class): Don't look into template
1892 arguments if it is not a primary template.
1894 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1897 * method.c (use_thunk): Always clone function argument tree.
1899 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1902 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1905 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1906 for all type variants.
1908 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1911 * decl.c (duplicate_decls): Return error_mark_node for invalid
1913 * name-lookup.c (push_namespace): Ignore the return value from
1915 * pt.c (push_template_decl_real): Robustify.
1918 * name-lookup.c (push_class_level_binding): Do not complain about
1919 adding a binding for a member whose name is the same as the
1920 enclosing class if the member is located in a base class of the
1923 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1926 * parser.c (cp_parser_new_expression): Parse an ill-formed
1927 direct-new-declarator after a parenthesized type-id to emit good
1930 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
1932 * cp-tree.def, cvt.c: Update copyright.
1934 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1937 * cp-tree.h (abi_version_at_least): Remove.
1938 * mangle.c: Include flags.h.
1940 2004-02-15 Mark Mitchell <mark@codesourcery.com>
1943 * call.c (build_conditional_expr): Handle conversions between
1944 class types which result in differently cv-qualified type
1948 * class.c (delete_duplicate_fields_1): Remove.
1949 (delete_duplicate_fields): Likewise.
1950 (finish_struct_anon): Remove check for members with the same name
1951 as their enclosing class.
1952 (check_field_decls): Do not call duplicate_fields.
1953 * decl.c (grokdeclarator): Remove check for static data members
1954 with the same name as their enclosing class.
1955 * name-lookup.c (push_class_level_binding): Check for members with
1956 the same name as their enclosing class.
1958 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1961 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1963 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1966 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1967 has full set of arguments.
1969 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1972 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1974 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1977 * cp-tree.h (delete_sanity): Change prototype.
1978 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1979 Remove dead code. Adjust code to warn about deleting an array.
1980 * typekc.c (decay_conversion): Use build_address and build_nop.
1983 * search.c (accessible_p): Do not check access in thunks.
1986 * call.c (build_conditional_expr): Call force_rvalue on the
1987 non-void operand in the case that one result is a throw-expression
1988 and the other is not.
1990 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
1993 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1994 the type name and look ahead for ::~, and bail out early with a
1995 better error message if the parse is going to fail.
1997 2004-02-12 Mark Mitchell <mark@codesourcery.com>
1999 * call.c (conversion_kind): New type.
2000 (conversion_rank): Likewise.
2001 (conversion): Likewise.
2002 (CONVERSION_RANK): New macro.
2003 (conversion_obstack): New variable.
2004 (obstack_initialized): Likewise.
2005 (z_candidate): Change type of convs and second_conv.
2006 (candidate_warning): New type.
2007 (IDENTITY_RANK): Remove.
2008 (EXACT_RANK): Likewise.
2009 (PROMO_RANK): Likewise.
2010 (STD_RANK): Likewise.
2011 (PBOOL_RANK): Likewise.
2012 (USER_RANK): Likewise.
2013 (ELLIPSIS_RANK): Likewise.
2014 (BAD_RANK): Likewise.
2015 (ICS_RANK): Likewise.
2016 (ICS_STD_RANK): Likewise.
2017 (ICS_USER_FLAG): Likewise.
2018 (ICS_ELLIPSIS_FLAG): Likewise.
2019 (ICS_THIS_FLAG): Likewise.
2020 (ICS_BAD_FLAG): Likewise.
2021 (NEED_TEMPORARY_P): Likewise.
2022 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2023 (USER_CONV_CAND): Likewise.
2024 (USER_CONV_FN): Likewise.
2025 (conversion_obstack_alloc): New function.
2026 (alloc_conversion): Likewise.
2027 (validate_conversion_obstack): Likewise.
2028 (alloc_conversions): Likewise.
2029 (build_conv): Adjust to deal with new conversion data structures.
2030 (build_identity_conv): New function.
2031 (build_ambiguous_conv): Likewise.
2032 (standard_conversion): Adjust to deal with new conversion data
2034 (convert_class_to_reference): Likewise.
2035 (direct_reference_binding): Likewise.
2036 (reference_binding): Likewise.
2037 (implicit_conversion): Likewise.
2038 (add_candidate): Likewise.
2039 (add_function_candidate): Likewise.
2040 (add_conv_candidate): Likewise.
2041 (build_builtin_candidate): Likewise.
2042 (print_z_candidate): Likewise.
2043 (merge_conversion_sequences): Likewise.
2044 (build_user_type_conversion_1): Likewise.
2045 (build_user_type_conversion): Likewise.
2046 (build_new_function_call): Likewise.
2047 (build_object_call): Likewise.
2048 (conditional_conversion): Likewise.
2049 (build_conditional_expr): Likewise.
2050 (build_new_op): Likewise.
2051 (build_op_delete_call): Likewise.
2052 (convert_like_real): Likewise.
2053 (build_over_call): Likewise.
2054 (build_new_method_call): Likewise.
2055 (is_subseq): Likewise.
2056 (maybe_handle_implicit_object): Likewise.
2057 (maybe_handle_ref_bind): Likewise.
2058 (compare_ics): Likewise.
2059 (source_type): Likewise.
2060 (add_warning): Likewise.
2062 (can_convert_arg): Likewise.
2063 (can_convert_arg_bad): Likewise.
2064 (perform_implicit_conversion): Likewise.
2065 (perform_direct_initialization_if_possible): Likewise.
2066 (initialize_reference): Likewise.
2067 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2068 * cp-tree.def (WRAPPER): Likewise.
2069 (IDENTITY_CONV): Remove.
2070 (LVALUE_CONV): Likewise.
2071 (QUAL_CONV): Likewise.
2072 (STD_CONV): Likewise.
2073 (PTR_CONV): Likewise.
2074 (PMEM_CONV): Likewise.
2075 (BASE_CONV): Likewise.
2076 (REF_BIND): Likewise.
2077 (USER_CONV): Likewise.
2078 (AMBIG_CONV): Likewise.
2079 (RVALUE_CONV): Likewise.
2080 * cp-tree.h (tree_wrapper): Remove.
2081 (WRAPPER_ZC): Remove.
2082 (lang_tree_node): Remove wrapper.
2083 (LOOKUP_SPECULATIVELY): Remove.
2084 (build_op_delete_call): Adjust prototype.
2085 (validate_conversion_obstack): Declare.
2086 (build_zc_wrapper): Remove.
2087 * cvt.c (convert_to_reference): Remove dead code.
2088 (ocp_convert): Likewise.
2089 * decl.c (redeclaration_error_message): Correct handling of
2091 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2092 (cp_tree_node_structure): Remove WRAPPER case.
2093 * decl2.c (finish_file): Call validate_conversion_obstack.
2094 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2095 (build_op_delete_call): Likewise.
2096 (build_x_delete): Likewise.
2097 (build_delete): Adjust call to build_op_delete_call.
2098 * pt.c (tsubst_friend_declaration): Adjust code to determine
2099 whether or not a friend template is a definition.
2100 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2101 * tree.c (build_zc_wrapper): Remove.
2103 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2105 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2106 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2107 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2108 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2110 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2112 * typeck.c (lookup_destructor): Fix typo in error message.
2114 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2116 * call.c, parser.c, tree.c: Fix comment typos.
2118 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2121 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2122 * decl.c (duplicate_decls, start_function): Likewise.
2124 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2126 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2127 * parser.c (free_parser_stacks): Delete.
2129 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2131 * rtti.c: Update copyright.
2133 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2136 * decl.c (require_complete_types_for_parms): Do not insert
2137 error_mark_node in the parameter list.
2139 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2142 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2143 error when terminator can not be found.
2145 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2147 Make-lang.in (po-generated): Delete.
2149 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2151 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2152 targetm.calls.promote_prototypes.
2154 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2158 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2160 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2161 (handle_pragma_implementation): Likewise.
2163 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2166 * typeck.c (lookup_destructor): Tweak error message.
2168 2004-02-05 Jan Hubicka <jh@suse.cz>
2170 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2173 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2176 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2177 code, only emits the diagnostic now. Added lookup of the identifier
2178 and support for qualified ids.
2179 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2180 Parse an (invalid) type name as id-expression within a declarator.
2181 (cp_parser_simple_declaration): Use it.
2182 (cp_parser_member_declaration): Likewise.
2183 (cp_parser_make_typename_type): New function. Handle errors through
2184 cp_parser_diagnose_invalid_typename.
2185 (cp_parser_elaborated_type_specifier): Use it.
2187 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2190 * call.c (convert_like_real): Use "converting" rather than
2191 "argument" as the descriptive keyword to
2192 dubious_conversion_warnings.
2193 * typeck.c (convert_for_assignment): Do not call
2194 dubious_conversion_warnings.
2196 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2199 * init.c (build_delete): Emit a more informative error message in
2200 case of an incomplete type, and on the correct source line.
2202 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2204 * error.c, search.c: Update copyright.
2206 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2209 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2210 linkage for the typeinfo name string.
2212 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2215 * cp-tree.h (fold_non_dependent_expr): New function.
2216 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2217 (cp_parser_template_argument): Use fold_non_dependent_expr.
2218 (cp_parser_direct_declarator): Likewise.
2219 * pt.c (fold_non_dependent_expr): New function.
2220 (convert_nontype_argument): Use it.
2221 (tsubst_qualified_id): Simplify.
2222 (tsubst_copy_and_build): Likewise.
2224 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2226 * decl.c (cxx_push_function_context): Do not set
2227 current_function_is_thunk.
2228 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2231 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2234 * pt.c (more_specialized_class): Increase processing_template_decl
2235 while partial ordering.
2237 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2240 * decl.c (start_function): Do not call pushdecl for any
2241 instantiation or specialization of a primary template.
2243 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2246 * parser.c (cp_parser_class_name): Robustify.
2249 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2252 * semantics.c (finish_id_expression): Do not return an
2253 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2255 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2258 * pt.c (build_non_dependent_expr): Do not build
2259 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2262 * semantics.c (finish_id_expression): Do not return an
2263 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2266 * parser.c (cp_parser_simple_declaration): When skipping to the
2267 end of the statement swallow the terminating semicolon.
2269 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2272 * init.c (build_offset_ref): Improve error recovery for invalid
2273 uses of non-static member functions.
2276 * cp-tree.h (cp_build_type_attribute_variant): New function.
2277 * class.c (build_clone): Use cp_build_type_attribute_variant.
2278 * decl.c (duplicate_decls): Likewise.
2279 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2280 (tsubst_function_type): Likewise.
2281 * tree.c (build_exception_variant): Check attributes before
2282 concluding that two types are the same.
2283 (cp_build_type-attribute_variant): New method.
2284 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2287 * call.c (convert_class_to_reference): Keep better track of
2288 pedantically invalid user-defined conversions.
2290 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2293 * pt.c (tsubst_qualified_id): Improved error message when a type
2294 is expected but not found.
2296 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2298 * class.c: Fix comment typos.
2300 * error.c: Likewise.
2301 * parser.c: Likewise.
2303 * search.c: Likewise.
2304 * typeck.c: Likewise.
2306 2004-01-30 Richard Henderson <rth@redhat.com>
2309 * method.c (use_thunk): Don't force_target_expr for void thunks.
2310 * tree.c (build_target_expr_with_type): Assert non-void type.
2311 (force_target_expr): Likewise.
2313 2004-01-30 Michael Matz <matz@suse.de>
2315 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2317 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2321 * decl.c (grokdeclarator): Check immediatly type completeness for
2322 non-dependent types.
2324 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2327 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2328 a sizeof expression.block
2330 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2333 * mangle.c (write_encoding): Correct encoding of member template
2336 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2338 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2339 template name as it was `<::' (digraph typo).
2340 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2341 (cp_parser_id_expression): Use it.
2342 (cp_parser_nested_name_specifier_opt): Likewise.
2343 (cp_parser_template_name): Likewise.
2344 (cp_parser_class_name): Likewise.
2345 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2347 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2350 * typeck.c (merge_types): Do not merge attributes into
2354 * parser.c (cp_parser_direct_declarator): Do not prevent
2355 backtracking inside a parenthesized declarator.
2356 (cp_parser_parameter_declaration): Fix typo in comment.
2358 2004-01-28 Jan Hubicka <jh@suse.cz>
2360 * semantics.c (expand_body) Do emit_associated_thunks before
2363 2004-01-27 Devang Patel <dpatel@apple.com>
2365 * name-lookup.c: Include "debug.h"
2366 (do_namespace_alias): Invoke debug_hooks to emit debug info
2367 for namespace alias.
2368 (do_local_using_decl): Invoke debug_hooks to emit debug info
2370 (do_class_using_decl): Same.
2371 (do_toplevel_using_decl): Same.
2372 (do_using_directive): Same.
2373 (cp_emit_debug_info_for_using): New function.
2374 * Make-lang.in (cp/parser.o): Depend on debug.h
2375 (cp/name-lookup.o): Same.
2377 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2379 * cp-tree.h (language_function, lang_type_header): Use
2381 * name-lookup.h (cp_binding_level): Likewise.
2383 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2386 * semantics.c (finish_for_expr): Check for unresolved overloaded
2389 * class.c (add_method): Just check processing_template_decl to
2390 determine whether or not we are within a template.
2391 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2392 * init.c (decl_constant_value): Check the type of the declaration,
2394 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2395 (push_to_top_level): ... this.
2396 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2397 * pt.c (push_template_decl_real): Reorder condition for speed.
2398 (convert_template_argument): Use dependency-checking functions in
2399 place of uses_template_parms.
2400 (lookup_template_class): Avoid calling uses_template_parms more
2402 (uses_template_parms): Reimplement, using dependency-checking
2404 (instantiate_class_template): Use push_to_top_level, not
2405 maybe_push_to_top_level.
2406 (type_unification_real): Simplify.
2407 (type_dependent_expression_p): Handle OFFSET_REFs and
2409 (any_dependent_template_arguments_p): Handle multiple levels of
2411 * semantics.c (expand_or_defer_fn): Do not check
2412 uses_template_parms for template instantiations.
2413 * typeck.c (comptypes): Avoid calling cp_type_quals.
2415 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2418 * call.c (build_over_call): Do not convert arguments when
2419 processing a template.
2420 * pt.c (build_non_dependent_expr): Do not build a
2421 NON_DEPENDENT_EXPR for arithmetic constants.
2423 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2426 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2427 returns a TYPE_DECL. no further lookup is required.
2428 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2429 is invalid. Rework to give better diagnostics.
2431 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2434 * pt.c (instantiate_class_template): Add an error_mark_node
2436 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2438 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2441 * decl.c (finish_function): Move the call to
2442 finish_fname_decls below the call to
2443 finish_eh_spec_block.
2445 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2447 * optimize.c, typeck2.c: Update copyright.
2449 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2451 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2452 init.c, mangle.c, typeck.c: Update copyright.
2454 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2456 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2458 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2460 * Make-lang.in: Replace $(docdir) with doc.
2461 (c++.info, c++.srcinfo): Dummy entry.
2462 (c++.man, c++.srcman): New rules.
2463 (c++.install-man): Revamp rule.
2465 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2467 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2468 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2469 immediate $(shell) instead of deferred backquote.
2471 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2474 * parser.c (cp_parser_postfix_expression): When encountering
2475 incomplete type on left-hand side of "->" or ".", treat the entire
2476 expression as erroneous.
2479 * call.c (build_field_call): Remove.
2480 (n_build_method_call): Likewise.
2481 (build_method_call): Likewise.
2482 (build_new_method_call): Do not call build_field_call.
2483 * class.c (n_build_method_call): Remove.
2484 (print_class_statistics): Do not print it.
2485 * cp-tree.h (build_method_call): Remove declaration.
2486 (finish_object_call_expr): Likewise.
2487 (build_new_1): Do not use build_method_call.
2488 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2489 when the function appearing on the right-hand-side of "." or "->"
2490 is not actually a function.
2491 * pt.c (tsubst_copy_and_build): Likewise.
2492 * semantics.c (finish_object_call_expr): Remove.
2494 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2497 * pt.c (tsubst): Use finish_typeof.
2499 2004-01-18 Jason Merrill <jason@redhat.com>
2502 * except.c (build_throw): In a template, set
2503 current_function_returns_abnormally.
2505 2004-01-17 Fred Fish <fnf@intrinsity.com>
2508 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2509 except don't call array_type_nelts() with a VECTOR_TYPE.
2511 2004-01-16 Jan Hubicka <jh@suse.cz>
2513 * mangle.c (write_mangled_name): Remove inline modifier.
2515 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2518 * decl.c (compute_array_index_type): Fix grammar in comment.
2519 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2522 * call.c (name_as_c_string): Print conversion operator names
2526 * call.c (initialize_reference): Pass -1 for inner parameter to
2529 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2532 * parser.c (cp_parser_base_specifier): Check for an invalid
2533 keyword `typename' and emit an user-friendly error message.
2535 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2538 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2539 (handle_pragma_implementation): Likewise.
2541 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2544 * typeck.c (build_class_member_access_expr): Allow to access members
2545 of the currently open class.
2546 (finish_class_member_access_expr): Likewise.
2548 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2551 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2552 name by value, instead of computing them.
2553 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2554 arguments. Pass them to validate_nonmember_using_decl.
2555 * name-lookup.h (do_local_using_decl): Adjust.
2556 (do_toplevel_using_decl): Likewise.
2557 * parser.c (cp_parser_using_declaration): Likewise.
2558 * pt.c (tsubst_expr): Likewise.
2560 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2564 * name-lookup.c (qualified_lookup_using_namespace): Search
2565 strongly-associated namespaces first, and only then try other
2568 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2570 * Make-lang.in (c++.srcextra): Dummy entry.
2572 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2575 * parser.c (cp_parser_template_name): Don't try to parse a
2576 conversion-function-id, as it cannot be a template-name.
2577 (cp_parser_simple_type_specifier): Check for invalid template-ids
2578 even after a built-in type.
2580 2004-01-14 Jan Hubicka <jh@suse.cz>
2583 * pt.c (instantiate_decl): Do not increase function_depth.
2585 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2589 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2590 attributes and discard.
2591 * decl.c (xref_tag): Don't overwite existing attributes with
2594 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2597 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2598 is no destructor while looking up a BIT_NOT_EXPR.
2600 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2602 * cxxfilt.c: Remove unused file.
2604 2004-01-14 Jan Hubicka <jh@suse.cz>
2606 Partial fix to PR c++/12850
2607 * decl2.c (mark_used): Do not proactively instantiate templates
2608 when compiling in unit-at-a-time or not optimizing.
2609 * optimize.c (maybe_clone_body): Do not increase function depth.
2611 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2614 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2616 2004-01-12 Steven Bosscher <stevenb@suse.de>
2619 * parser.c (cp_parser_member_declaration): Any non-type is also
2620 not a class or a function.
2622 2004-01-12 Jason Merrill <jason@redhat.com>
2625 * class.c (build_base_path): Do not mark vtable references as
2627 (build_vtbl_ref_1): Likewise.
2629 2004-01-12 Richard Henderson <rth@redhat.com>
2632 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2633 (store_init_value): Use it.
2634 * decl.c (check_initializer): Expect full initialization code
2635 from store_init_value.
2636 * init.c (expand_aggr_init_1): Likewise.
2637 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2639 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2641 * class.c (layout_class_type): For non-POD class types, also copy
2642 the DECL_SIZE and DECL_MODE of fields to the base class type.
2644 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2647 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2648 calling regenerate_decl_from_template.
2650 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2653 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2654 decl-specifier occurring along with a class definition.
2656 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2658 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2659 clauses to comments describing declares_class_or_enum.
2660 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2663 2004-01-12 Jan Hubicka <jh@suse.cz>
2665 * pt.c (for_each_template_parm): Do not check for duplicates.
2666 (for_each_template_parm): Use walk_tree duplicate checking code.
2668 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2671 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2672 is error_mark_node, don't add any more decl_specs.
2673 (cp_parser_init_declarator): After committing to a declaration, if
2674 the decl_specifiers start with error_mark_node, issue an error and
2675 change the type to "int".
2677 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2680 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2682 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2686 * pt.c (tsubst): Substitution must fail if we are attempting to
2687 create an array with element type that is an abstract class type.
2688 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2689 before calling abstract_virtuals_error.
2691 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2693 * name-lookup.c (qualified_lookup_using_namespace): Consider
2694 strong using directives even if we've already found a binding.
2696 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2698 * cp-tree.h (cxx_expand_expr): Change prototype.
2699 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2701 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2704 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2705 looking into them recursively. They can be there because of the
2706 new __offsetof__ extension.
2708 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2710 * parser.c (cp_parser_save_member_function_body): Mark the
2713 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2716 * class.c (build_clone): Copy type attributes from the original
2717 function to the clone.
2720 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2721 references as constant.
2724 * parser.c (cp_parser_explicit_instantiation): Improve error
2726 (cp_parser_require): Improve indication of the error location.
2729 * parser.c (cp_parser_class_head): Reorder logic to check for
2730 invalid qualification.
2732 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2735 * name-lookup.c (lookup_using_namespace): Remove spacesp
2737 (unqualified_namespace_lookup): Likewise.
2738 (lookup_qualified_name): Adjust accordingly.
2739 (lookup_name_real): Likewise.
2740 (lookup_arg_dependent): Do not eliminate the namespace of the
2741 functions found by unqualified name lookup unless that is the
2744 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2746 * semantics.c (push_deferring_access_checks): Fix format.
2747 (resume_deferring_access_checks): Likewise.
2748 (stop_deferring_access_checks): Likewise.
2749 (pop_deferring_access_checks): Likewise.
2750 (get_deferred_access_checks): Likewise.
2751 (pop_to_parent_deferring_access_checks): Likewise.
2752 (perform_deferred_access_checks): Likewise.
2753 (perform_or_defer_access_check): Likewise.
2755 2004-01-04 Richard Henderson <rth@redhat.com>
2757 * call.c (build_over_call): Don't create a save_expr of an
2758 aggregate, but rather its address.
2760 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2763 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2764 an offsetof expression.
2766 * parser.c (cp_parser_parameter_declaration): Fix comment.
2769 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2770 (reference_binding): Set it when appropriate.
2771 (build_temp): New function, split out from ...
2772 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2773 (initialize_reference): Likewise.
2776 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2777 (cp_parser_new): Initialize it.
2778 (cp_parser_postfix_expression): Set it.
2779 (cp_parser_sizeof_operand): Likewise.
2780 (cp_parser_parameteR_declaration): Do not commit early to tenative
2781 parsers when in_type_id_in_expr_p is set.
2783 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2786 * parser.c (cp_parser_template_argument): Don't call
2787 make_unbound_class_template directly.
2788 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2789 UNBOUND_CLASS_TEMPLATE tree node.
2791 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2794 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2796 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2799 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2800 (DECL_FUNCTION_TEMPLATE_P): Use it.
2801 (DECL_CLASS_TEMPLATE_P): Likewise.
2802 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2803 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2804 (cp_parser_template_name): Likewise.
2805 (cp_parser_elaborated_type_specifier): Likewise.
2806 (cp_parser_namespace_name): Likewise.
2807 (cp_parser_class_name): Likewise.
2808 (cp_parser_lookup_name_simple): Likewise.
2810 See ChangeLog.3 for earlier changes.