1 2004-07-02 Mark Mitchell <mark@codesourcery.com>
4 * decl.c (grokdeclarator): Robustify.
6 2004-07-01 Richard Henderson <rth@redhat.com>
8 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
9 * method.c (synthesize_method): Don't clear_last_expr.
10 * name-lookup.c (maybe_push_cleanup_level): Likewise.
12 2004-07-01 Nick Clifton <nickc@redhat.com>
14 * decl2.c (import_export_class): Invoke the
15 import_export_class field in the gcc_target structure if it is not
18 2004-06-30 Richard Henderson (rth@redhat.com>
20 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
21 * method.c (use_thunk): Likewise.
23 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
25 * call.c (build_over_call), typeck.c (build_function_call): Call
26 check_function_arguments instead of check_function_format.
28 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
30 * call.c (build_over_call), typeck.c (build_function_call): Update
31 calls to check_function_format.
33 2004-06-30 Richard Henderson <rth@redhat.com>
35 * call.c (build_over_call): Use __builtin_memcpy for copying
36 CLASS_AS_BASE rather than funny casting.
38 2004-06-30 Richard Henderson <rth@redhat.com>
40 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
41 TYPE_SIZE_UNIT of full_type.
43 2004-06-30 Per Bothner <per@bothner.com>
45 Conditionally compile support for --enable-mapped_location.
46 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
47 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
48 adjustments - which I don't understand.
49 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
50 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
51 (print_instantiation_partial_context): Use expand_location.
52 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
53 * name-lookup.c: Likewise.
54 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
55 * name-lookup.c: Use input_line macro.
56 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
57 (cp_parser_statement): Rename locaal variable statement_locus to
58 statement_location and use SET_EXPR_LOCATION macro.
59 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
60 * tree.c (cp_walk_subtrees): Likewise.
62 2004-06-29 Per Bothner <per@bothner.com>
64 * tree.c (build_min_nt, build_min, build_min_non_dep):
65 Don't set TREE_COMPLEXITY from input_line.
67 2004-06-29 Paul Brook <paul@codesourcery.com>
69 * init.c: Include target.h.
70 (get_cookie_size): Remove and replace with target hook.
72 (build_new_1): Store the element size in the cookie.
74 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
77 * parser.c (cp_parser_template_declaration_after_export): Disable
78 access checks here ...
79 (cp_parser_class_specifier): ... not here.
81 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
83 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
84 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
85 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
88 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
90 * cp-tree.h (struct deferred_access): Move to ...
91 * semantics.c (struct deferred_access): ... here. Adjust.
92 (deferred_access_stack): Make a VEC(deferred_access),
93 (deferred_access_free_list): Remove.
94 (deferred_access_no_check): New.
95 (push_deferring_access_checks, resume_deferring_access_checks,
96 stop_deferring_access_checks, pop_deferring_access_checks,
97 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
98 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
100 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
103 * call.c (build_temp): Declare.
104 (check_constructor_callable): New.
105 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
106 CONSTRUCTOR_CALLABLE.
107 (convert_like_real, initialize_reference): Use
108 check_constructor_callable.
109 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
110 (LOOKUP_*): Renumber.
112 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
114 * friend.c (add_friend): Only perform access checks when context
116 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
117 * parser.c (cp_parser_class_specifier): Disable access checks here
118 when parsing the body of a templated class.
119 * semantics.c (perform_or_defer_access_checks): Reorder to allow
120 NULL binfos when not checking access.
122 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
124 Use vector API for vbase list.
125 * cp-tree.h: Include vec.h
126 (DEF_VEC_P (tree)): New type.
127 (struct lang_type_class): Change vbase's member type.
128 (binfo_for_vbase): Declare.
129 * class.c (determine_primary_base, base_derived_from,
130 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
131 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
132 build_vtbl_initializer): Adjust.
133 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
135 * init.c (sort_mem_initializers, expand_member_init,
136 push_base_cleanups): Adjust.
137 * method.c (do_build_copy_constructor): Adjust.
138 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
139 (binfo_for_vbase): New.
140 * tree.c (copy_base_binfos): Adjust.
142 2004-06-28 Mark Mitchell <mark@codesourcery.com>
144 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
146 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
149 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
150 paranthesis in case of pointers to array members.
151 * error.c (dump_type_prefix): Likewise.
152 (dump_type_suffix): Maybe issue a whitespace when printing
155 2004-06-27 Mark Mitchell <mark@codesourcery.com>
158 * parser.c (cp_parser_set_decl_spec_type): Refine test for
159 redefinition of built-in types.
161 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
163 * error.c (pp_template_argument_list_start): Remove.
164 (pp_template_argument_list_end): Likewise.
165 (pp_separate_with_comma): Use pp_cxx_separate_with.
166 (reinit_global_formatting_buffer): Remove.
167 (pp_non_consecutive_character): Likewise.
168 (dump_scope): Use pp_cxx_colon_colon.
169 (dump_template_parameter): Use pp_cxx_identifier,
170 pp_cxx_tree_identifier and pp_cxx_whitespace.
171 (dump_templat_bindings): Replace use of pp_string with sequence
172 of pp_cxx_whitespace and pp_equal.
173 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
174 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
176 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
177 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
178 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
179 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
180 pp_cxx_right_bracket, pp_cxx_identifier throughout,
181 (dump_decl): Likewise.
182 (dump_template_decl): Likewise.
183 (dump_function_decl): Likewise. Set padding as appropriate.
184 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
186 (dump_exception_spec): Likewise.
187 (dump_function_name): Use pp_cxx_tree_identifier and
189 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
190 pp_cxx_end_template_argument_list.
191 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
192 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
193 pp_cxx_whitespace throughout.
194 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
196 (dump_unary_op): Likewise.
197 (reinit_cxx_pp): New function.
198 (type_as_string); Use it.
199 (expr_as_string): Likewise.
200 (decl_as_string); Likewise.
201 (context_as_string): Likewise.
202 (lang_decl_name): Likewise.
203 (decl_to_string): Likewise.
204 (expr_to_string): Likewise.
205 (parm_to_string): Likewise.
206 (type_to_string): Likewise.
207 (args_to_string): Likewise.
208 (cv_to_string): Likewise.
210 2004-06-26 Mark Mitchell <mark@codesourcery.com>
212 * cp-tree.h (cp_cv_quals): New type.
213 (cp_declarator): Use it instead of "tree" as appropriate.
214 (grok_method_quals): Adjust prototype.
215 (grokclassfn): Likewise.
216 (do_friend): Likewise.
217 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
218 (grokdeclarator): Likewise.
219 * decl2.c (grok_method_quals): Likewise.
220 (grokclassfn): Likewise.
221 * friend.c (do_friend): Likewise.
222 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
223 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
224 (make_pointer_declarator): Likewise.
225 (make_reference_declarator): Likewise.
226 (make_ptrmem_declarator): Likewise.
227 (cp_parser_ptr_operator): Likewise.
228 (cp_parser_cv_qualifier_seq_opt): Likewise.
229 (cp_parser_cv_qualifier_opt): Remove.
230 (cp_parser_new_declarator_opt): Adjust call to
231 cp_parser_ptr_operator.
232 (cp_parser_conversion_declaration_opt): Likewise.
233 (cp_parser_declarator): Use cp_cv_quals, not tree.
234 (cp_parser_direct_declarator): Likewise.
236 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
238 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
239 Rename DECL_STMT to DECL_EXPR.
240 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
241 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
242 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
244 2004-06-26 Jan Hubicka <jh@suse.cz>
247 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
248 reachability analysis.
250 2004-06-25 Mark Mitchell <mark@codesourcery.com>
252 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
255 2004-06-25 Paul Brook <paul@codesourcery.com>
257 * decl2.c (get_guard): Call targetm.cxx.guard_type.
258 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
260 2004-06-24 Mark Mitchell <mark@codesourcery.com>
262 * decl.c (grokdeclarator): Restore error messages about __thread.
263 * parser.c (cp_parser_decl_specifier_seq): Likewise.
265 2004-06-24 Jason Merrill <jason@redhat.com>
268 * decl.c (grokparms): Give the PARM_DECL reference type if the
269 parameter is passed by invisible reference.
271 2004-06-24 Andreas Schwab <schwab@suse.de>
273 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
275 2004-06-23 Mark Mitchell <mark@codesourcery.com>
277 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
278 (cp/decl.o): Likewise.
279 (cp/decl2.o): Likewise.
281 (cp/semantics.o): Likewise.
282 * config-lang.in (gtfiles): Do not reference cp/lex.h.
283 * class.c: Do not include lex.h.
284 (add_implicitly_declared_members): Do not use
285 adding_implicit_members.
286 (check_bases_and_members): Do not talk about grok_x_components.
287 * cp/cp-tree.h (adding_implicit_members): Remove.
288 (cp_storage_class): New type.
289 (cp_decl_spec): Likewise.
290 (cp_decl_specifier_seq): Likewise.
291 (cp_parameter_declarator): Use it for the decl_specifiers field.
292 (check_tag_decl): Adjust prototype.
293 (shadow_tag): Likewise.
294 (groktypename): Likewise.
295 (start_decl): Likewise.
296 (start_function): Likewise.
297 (start_method): Likewise.
298 (grok_x_components): Remove.
299 (grokfield): Adjust prototype.
300 (grokbitfield): Likewise.
301 (finish_member_class_template): Remove.
302 * decl.c: Do not include lex.h.
303 (adding_implicit_members): Do not define.
304 (check_tag_decl): Do not use trees to represent decl-specifiers.
305 (shadow_tag): Likewise.
306 (groktypename): Likewise.
307 (start_decl): Likewise.
308 (grokvardecl): Likewise.
309 (grokdeclarator): Likewise.
310 (grokparms): Likewise.
311 (start_function): Likewise.
312 (start_method): Likewise.
313 * decl.h (grokdeclarator): Adjust prototype.
314 * decl2.c: Do not include lex.h.
315 (grok_x_components): Remove.
316 (grokfield): Do not use trees to represent decl-specifiers.
317 (grokbitfield): Likewise.
318 * lex.c: Do not include lex.h.
320 * parser.c: Include target.h.
321 (clear_decl_specs): New function.
322 (cp_parser_translation_unit): Do not use trees to represent
324 (cp_parser_postfix_expression): Likewise.
325 (cp_parser_new_type_id): Likewise.
326 (cp_parser_condition): Likewise.
327 (cp_parser_simple_declaration): Likewise.
328 (cp_parser_decl_specifier_seq): Likewise.
329 (cp_parser_function_specifier_opt): Likewise.
330 (cp_parser_conversion_type_id): Likewise.
331 (cp_parser_template_parameter): Likewise.
332 (cp_parser_explicit_instantiation): Likewise.
333 (cp_parser_type_specifier): Likewise.
334 (cp_parser_simple_type_specifier): Likewise.
335 (cp_parser_init_declarator): Likewise.
336 (cp_parser_type_id): Likewise.
337 (cp_parser_type_specifier_seq): Likewise.
338 (cp_parser_parameter_declaration): Likewise.
339 (cp_parser_member_declaration): Likewise.
340 (cp_parser_exception_declaration): Likewise.
341 (cp_parser_function_definition_from_specifiers_and_declarator):
343 (cp_parser_single_declaration): Likewise.
344 (cp_parser_save_member_function_body): Likewise.
345 (cp_parser_friend_p): Likewise.
346 (cp_parser_set_storage_class): New function.
347 (cp_parser_set_decl_spec_type): Likewise.
348 * pt.c: Do not include lex.h.
349 * semantics.c: Likewise.
350 (finish_member_class_template): Remove.
352 2004-06-23 Roger Sayle <roger@eyesopen.com>
354 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
355 longer take both "args" and "convert_args" as arguments.
356 (build_op_delete_call): Update call to build_cxx_call.
357 (build_over_call): Likewise, update call to build_cxx_call.
358 * cp-tree.h (build_cxx_call): Update funtion prototype.
359 * typeck.c (build_function_call): Don't call expand_tree_builtin.
360 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
361 (throw_bad_typeid): Likewise.
362 (build_dynamic_cast_1): Likewise.
364 2004-06-22 Richard Henderson <rth@redhat.com>
366 * class.c (build_vfn_ref): Take a pointer not object. Build
368 (cp_fold_obj_type_ref): New.
369 * call.c (build_over_call): Update build_vfn_ref call.
370 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
371 * cp-tree.h (cp_fold_obj_type_ref): Declare.
373 2004-06-21 Jason Merrill <jason@redhat.com>
376 * cp-gimplify.c (cp_gimplify_init_expr): Look through
379 2004-06-21 Mark Mitchell <mark@codesourcery.com>
381 * cp-tree.def (NEW_EXPR): Add a fourth slot.
382 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
383 (TREE_PARMLIST): Likewise.
384 (CALL_DECLARATOR_PARMS): Likewise.
385 (CALL_DECLARATOR_QUALS): Likewise.
386 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
387 (cp_declarator_kind): New type.
388 (cp_parameter_declarator): Likewise.
389 (cp_declarator): Likewise.
390 (cp_error_declarator): Likewise.
391 (no_parameters): Likewise.
392 (groktypename): Change prototype.
393 (start_decl): Likewise.
394 (start_handler_parms): Likewise.
395 (get_scope_of_declarator): Likewise.
396 (start_function): Likewise.
397 (start_preparsed_function): New function.
398 (start_function): Change prototype.
399 (start_method): Likewise.
400 (grokfield): Likewise.
401 (grokbitfield): Likewise.
402 (build_new): Likewise.
403 (make_pointer_declarator): Remove.
404 (make_reference_declarator): Likewise.
405 (make_call_declarator): Likewise.
406 (set_quals_and_spec): Likewise.
407 (process_template_parm): Change prototype.
408 (begin_function_definition): Remove.
409 (finish_parmlist): Remove.
410 * decl.c (groktypename): Do not use trees to represent
412 (start_decl): Likewise.
413 (start_handler_parms): Remove.
414 (get_scope_of_declarator): Reimplement.
415 (grokdeclarator): Do not use trees to represent declarators.
416 (grokparms): Likewise.
417 (start_function): Likewise.
418 (start_method): Likewise.
419 (build_void_list_mode): Do not use TREE_PARMLIST.
420 * decl.h (grokdeclarator): Change prototype.
421 * decl2.c (grok_method_quals): Robustify.
422 (grok_x_components): Do not use trees to represent declarators.
423 (grokfield): Likewise.
424 (grokbitfield): Likewise.
425 (start_objects): Build FUNCTION_DECLs, not declarators.
426 (start_static_storage_duration_function): Likewise.
427 * init.c (build_new): Simplify.
428 * lex.c (make_pointer_declarator): Remove.
429 (make_reference_declarator): Likewise.
430 (make_call_declarator): Likewise.
431 (set_quals_and_spec): Likewise.
432 * method.c (use_thunk): Use start_preparsed_function.
433 (synthesize_method): Likewise.
434 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
435 * optimize.c (maybe_clone_body): Use start_preparsed_function.
436 * parser.c (cp_error_declarator): New variable.
437 (declarator_obstack): Likewise.
438 (alloc_declarator): New function.
439 (make_declarator): Likewise.
440 (make_id_declarator): Likewise.
441 (make_pointer_declarator): Likewise.
442 (make_reference_declarator): Likewise.
443 (make_ptrmem_declarator): Likewise.
444 (make_call_declarator): Likewise.
445 (make_array_declarator): Likewise.
446 (no_parameters): New variable.
447 (make_parameter_declarator): Likewise.
448 (cp_parser_check_for_definition_in_return_type): Do not use trees
449 to represent declarators.
450 (cp_parser_translation_unit): Likewise.
451 (cp_parser_new_expression): Likewise.
452 (cp_parser_new_type_id): Likewise.
453 (cp_parser_new_declarator_opt): Likewise.
454 (cp_parser_direct_new_declarator): Likewise.
455 (cp_parser_condition): Likewise.
456 (cp_parser_declaration_statement): Likewise.
457 (cp_parser_declaration): Likewise.
458 (cp_parser_conversion_type_id): Likewise.
459 (cp_parser_conversion_declarator_opt): Likewise.
460 (cp_parser_template_parameter_list): Likewise.
461 (cp_parser_template_parameter): Likewise.
462 (cp_parser_explicit_instantiation): Likewise.
463 (cp_parser_init_declarator): Likewise.
464 (cp_parser_declarator): Likewise.
465 (cp_parser_direct_declarator): Likewise.
466 (cp_parser_type_id): Likewise.
467 (cp_parser_parameter_declaration_clause): Likewise.
468 (cp_parser_parameter_declaration_list): Likewise.
469 (cp_parser_parameter_declaration): Likewise.
470 (cp_parser_member_declaration): Likewise.
471 (cp_parser_exception_declaration): Likewise.
472 (cp_parser_check_declarator_template_parameters): Likewise.
473 (cp_parser_function_definition_from_specifiers_and_declarator):
475 (cp_parser_save_member_function_body): Likewise.
476 * pt.c (process_template_parm): Add is_non_type parameter.
477 (convert_template_argument): Adjust call to groktypename.
478 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
479 (tsubst): Do not expect declarators.
480 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
482 (instantiate_decl): Use start_preparsed_function.
483 * semantics.c (begin_function_definition): Remove.
484 (finish_parmlist): Remove.
485 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
488 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
490 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
491 (build_new_method_call): Likewise.
492 * decl.c (local_variable_p_walkfn): Don't walk into types.
493 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
494 (build_anon_union_vars): Add new operand for COMPONENT_REF.
495 * init.c (buld_new): Add new operand for ARRAY_REF.
496 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
497 (do_build_assign_ref): Likewise.
498 * parser.c (cp_parser_direct_new_declarator): Add new operands
500 (cp_parser_direct_declarator): Likewise.
501 * pt.c (tsubst): Likewise.
502 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
504 * semantics.c (finish_non_static_data_member): Add new operand
506 * typeck.c (build_class_member_access_expr): Likewise.
507 (build_class_member_access_expr, finish_class_member_access_expr):
509 (build_ptrmemfunc_access_expr): Likewise.
510 (build_array_ref): Add new operands for ARRAY_REF.
511 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
512 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
514 2004-06-21 Richard Henderson <rth@redhat.com>
516 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
517 * parser.c (cp_parser_jump_statement): Update commentary.
518 * pt.c (tsubst_expr): Use RETURN_EXPR.
519 * semantics.c (finish_return_stmt): Likewise.
520 (finalize_nrv_r): Likewise.
521 * typeck.c, typeck2.c: Update file start commentary.
523 2004-06-21 Richard Henderson <rth@redhat.com>
525 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
527 2004-06-20 Richard Henderson <rth@redhat.com>
529 * cp-tree.h (add_decl_stmt): Declare.
530 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
531 * semantics.c (maybe_cleanup_point_expr): New.
532 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
533 finish_for_expr, finish_switch_cond): Use it.
534 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
536 2004-06-20 Richard Henderson <rth@redhat.com>
538 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
539 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
540 (cp_gimplify_expr): Call it.
541 (gimplify_cleanup_stmt): Move from c-gimplify.c.
542 (cp_genericize): New.
543 * decl.c (finish_function): Call it.
544 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
545 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
546 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
547 (cp_genericize): Declare.
548 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
549 * dump.c (cp_dump_tree): Likewise.
550 * semantics.c (push_cleanup): Move from c-semantics.c.
552 2004-06-20 Zack Weinberg <zack@codesourcery.com>
554 * cp-lang.c (has_c_linkage): Implement.
556 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
557 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
558 (builtin_function_1): Don't call make_decl_rtl.
559 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
560 (grokvardecl): Don't call mangle_decl.
561 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
563 * method.c (set_mangled_name_for_decl): Delete.
564 * name-lookup.c (pushdecl): When a local extern shadows a
565 file-scope declaration of the same object, give both DECLs the
567 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
568 on DECL_ASSEMBLER_NAME.
570 2004-06-19 Richard Henderson <rth@redhat.com>
572 * cp-gimplify.c: Remove unnecessary prototypes.
573 (cp_gimplify_stmt): Merge into ...
574 (cp_gimplify_expr): ... here. Move to end of file. Handle
575 stmts_are_full_exprs_p frobbing.
576 * cp-tree.h (cp_gimplify_stmt): Remove.
577 * pt.c (tsubst_expr): Merge prep_stmt and unify.
578 * tree.c (init_tree): Don't set lang_gimplify_stmt.
580 2004-06-18 Richard Henderson <rth@redhat.com>
583 * semantics.c (begin_cond): New.
584 (finish_cond): Rewrite to handle template DECL_STMTs specially.
585 Assume that non-template decls go land before the conditional.
586 (simplify_loop_decl_cond): Likewise.
587 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
588 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
589 begin_switch_stmt, finish_switch_cond): Update to match.
591 2004-06-17 Jason Merrill <jason@redhat.com>
594 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
595 (finish_stmt_expr_expr): Update type after conversions.
596 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
597 Handle void initializer.
598 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
600 2004-06-17 Geoffrey Keating <geoffk@apple.com>
602 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
603 * cp-tree.h (defer_fn): Delete.
604 * decl2.c (defer_fn): Delete.
605 (finish_file): Simplify deferred_fns loops; check that
606 only used inline functions get into deferred_fns.
607 (mark_used): Inline previous contents of defer_fn.
609 2004-06-16 Richard Henderson <rth@redhat.com>
611 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
612 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
613 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
614 of CTOR_INITIALIZER ...
615 (pp_cxx_statement): ... here.
616 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
617 (finish_function): Use alloc_stmt_list to zap entire function.
618 * parser.c (cp_parser_compound_statement): Update commentary.
619 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
620 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
621 (finish_stmt_expr): Don't look through COMPOUND_STMT.
623 2004-06-16 Geoffrey Keating <geoffk@apple.com>
625 * pt.c (mark_decl_instantiated): Don't call defer_fn.
627 2004-06-16 Richard Henderson <rth@redhat.com>
629 * parser.c (cp_parser_labeled_statement): Update commentary.
630 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
631 * tree.c (mark_local_for_remap_r): Likewise.
633 2004-06-16 Richard Henderson <rth@redhat.com>
635 * parser.c (cp_parser_asm_definition): Update commentary.
636 * pt.c (tsubst_expr): Use ASM_EXPR.
637 * semantics.c (finish_asm_stmt): Likewise.
639 2004-06-16 Richard Henderson <rth@redhat.com>
641 * decl.c (finish_destructor_body): Use LABEL_EXPR.
642 * parser.c (cp_parser_statement): Update commentary.
643 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
644 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
645 * tree.c (mark_local_for_remap_r): Likewise.
647 2004-06-16 Richard Henderson <rth@redhat.com>
650 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
651 statement in FOR_INIT_STMT for templates.
653 2004-06-15 Richard Henderson <rth@redhat.com>
655 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
656 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
657 (genericize_try_block): Use gimplify_stmt.
658 (genericize_catch_block, genericize_eh_spec_block): Likewise.
659 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
660 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
661 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
662 (cp_tree_chain_matters_p): Remove.
663 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
664 (COMPOUND_STMT_BODY_BLOCK): New.
665 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
666 (EXPR_STMT_STMT_EXPR_RESULT): New.
667 (building_stmt_tree): Check cur_stmt_list.
668 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
669 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
670 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
671 (cp_finish_decl): Use push_cleanup.
672 (start_function, finish_function): Use statement lists.
673 (finish_stmt): Do nothing.
674 * except.c (begin_eh_spec_block): Use statement lists.
675 (check_handlers_1, check_handlers): Likewise.
676 * init.c (construct_virtual_base): Don't add extra compound stmts.
677 (build_vec_init): Likewise.
678 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
679 * name-lookup.h (struct cp_binding_level): Add statement_list.
680 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
681 (cp_parser_labeled_statement, cp_parser_expression_statement,
682 cp_parser_statement_seq_opt): Likewise.
683 (cp_parser_compound_statement): Likewise. Take bool for try block.
684 (cp_parser_selection_statement): Tidy if processing.
685 (cp_parser_already_scoped_statement): Rewrite to do what it says.
686 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
687 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
688 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
689 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
690 (finish_cond): New, rewritten from FINISH_COND.
691 (simplify_loop_decl_cond): New.
692 (finish_expr_stmt): Avoid nested EXPR_STMTs.
693 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
694 begin_else_clause, finish_else_clause, finish_if_stmt,
695 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
696 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
697 finish_for_cond, finish_for_stmt, begin_switch_stmt,
698 finish_switch_cond, finish_switch_stmt, begin_try_block,
699 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
700 finish_handler_sequence, finish_function_handler_sequence,
701 begin_handler, finish_handler_parms, finish_handler,
702 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
703 using statement lists.
704 (begin_compound_stmt): Replace has_no_scope argument with flags.
705 Update all callers. Use statement lists.
706 (finish_compound_stmt): Likewise.
707 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
708 (current_scope_stmt_stack): Remove.
709 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
710 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
711 Rewrite with statement lists.
713 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
715 * parser.c: Change all assignments of c_lex_string_translate
716 to true and false to 1 and 0.
717 (cp_lexer_read_token): Convert type of the translated string.
718 (cp_parser_skip_to_closing_parentheses): Preserve original
719 value of c_lex_string_translate, and set it to -1 while
721 (cp_parser_cache_group): Likewise.
722 (cp_parser_cache_group_1): Renamed.
723 (cp_parser_asm_operand_list): Remove redundant setting of
724 c_lex_string_translate.
725 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
726 Handle chained strings.
728 2004-06-12 Andrew Pinski <apinski@apple.com>
732 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
734 * cp-tree.h: Fix typo.
736 * cp-tree.h: Include cgraph.h
737 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
738 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
740 2004-06-12 Jason Merrill <jason@redhat.com>
742 PR tree-optimization/14107
743 * decl.c (finish_function): Warn about no return in all functions.
745 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
747 * cp-tree.h (struct language_function): Remove cannot_inline.
748 * decl.c (save_function_data): cannot_inline is no more.
749 (cxx_push_function_context): Likewise.
750 * decl2.c (start_objects, start_static_storage_duration_function):
751 Reset DECL_INLINE, set DECL_UNINLINABLE.
753 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
756 * search.c (lookup_field): Propagate the ambiguity list.
757 (lookup_fnfields): Likewise.
759 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
762 * parser.c (cp_parser_template_name): Ctors/dtors never need a
763 template keyword to disambiguate.
765 2004-06-14 Mark Mitchell <mark@codesourcery.com>
768 * decl.c (grokdeclarator): Ignore pointer-to-members when
769 computing template depth.
772 * name-lookup.c (pushtag): Do not try to put class declarations in
773 explicit specialization scopes.
775 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
777 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
779 2004-06-11 Mark Mitchell <mark@codesourcery.com>
782 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
783 bindings for undeclared built-ins.
785 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
787 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
788 appear at the correct location.
790 2004-06-10 Jason Merrill <jason@redhat.com>
794 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
795 * init.c (build_offset_ref): Build SCOPE_REF with non-null
796 TREE_TYPE for non-dependent names.
797 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
798 unknown_type_node as its TREE_TYPE.
799 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
800 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
801 (dump_expr) <SCOPE_REF case>: Likewise.
803 2004-06-10 Mark Mitchell <mark@codesourcery.com>
806 * parser.c (cp_parser_direct_declarator): Robustify.
809 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
810 constants in non-dependent contexts.
814 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
817 2004-06-10 Jakub Jelinek <jakub@redhat.com>
820 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
823 2004-06-09 Mark Mitchell <mark@codesourcery.com>
827 2004-06-07 Mark Mitchell <mark@codesourcery.com>
828 * lex.c (handle_pragma_interface): Deprecate.
829 (handle_pragma_implementation): Likewise.
831 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
833 * g++spec.c (lang_specific_driver): Remove check for -lm
834 and -lmath when check it see if it was the math library.
836 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
839 * parser.c (cp_parser_direct_declarator): Reject constructor named
840 as qualified template-id.
842 2004-06-07 Mark Mitchell <mark@codesourcery.com>
845 * lex.c (handle_pragma_interface): Deprecate.
846 (handle_pragma_implementation): Likewise.
848 2004-06-07 Mark Mitchell <mark@codesourcery.com>
851 * parser.c (cp_parser_iteration_statement): Fix typo in error
855 * pt.c (tsubst_default_argument): Do not defer access checks
856 while substituting into the default argument.
859 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
860 constant in a non-dependent context.
863 * except.c (build_throw): Ensure that temp_expr has been
866 2004-06-06 Roger Sayle <roger@eyesopen.com>
868 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
870 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
873 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
874 'typename', and accept 'template'.
876 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
877 Jan Hubicka <jh@suse.cz>
880 * method.c (use_think): Do not mark thunk as referenced.
882 2004-06-03 Matt Austern <austern@apple.com>
885 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
886 is nonzero, and if we see a noninline definition of a key method,
887 make the vtables nonweak.
889 2004-06-02 Matt Austern <austern@apple.com>
891 * cp-tree.h (instantiate_decl): new boolean parameter,
892 undefined_ok. Current behavior is equivalent to its being 0.
893 * decl2.c (mark_used): Add new argument when calling instantiate_decl
894 * pt.c (mark_decl_instantiated): Unconditionally make
895 instantiations explicit unconditionally
896 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
897 since mark_decl_instantiated now does it.
898 (instantiate_class_member): New. Instantiate a member of an
899 explicitly instantiated class template.
900 (do_type_instantiation): Explicitly instantiate members of an
901 explicitly instantiated class template.
902 (instantiate_decl): if undefined_ok is nonzero, and if we're
903 trying to explicitly instantiated a template with no definition,
904 change it to an implicit instantiation.
905 (instantiate_pending_templates): Add new argument to instantiate_decl.
906 * tree.c (cp_cannot_inline_tree_fn): Likewise.
908 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
910 * cp-tree.h: Fix typo.
912 * cp-tree.h: Include cgraph.h
913 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
914 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
916 2004-06-01 Jason Merrill <jason@redhat.com>
919 * call.c (call_builtin_trap): Remove type parm.
920 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
921 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
923 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
926 * init.c (build_offset_ref): Build SCOPE_REF with non-null
927 TREE_TYPE for non-dependent names.
928 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
929 unknown_type_node as its TREE_TYPE.
930 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
931 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
932 (dump_expr) <SCOPE_REF case>: Likewise.
934 2004-06-01 Richard Henderson <rth@redhat.com>
935 Andrew Pinski <pinskia@physics.uc.edu>
937 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
938 * parser.c (struct cp_parser): Remove in_offsetof.
939 (cp_parser_new): Don't set it.
940 (cp_parser_unary_expression): Don't check it.
941 (cp_parser_postfix_open_square_expression): Split out from ...
942 (cp_parser_postfix_expression): ... here.
943 (cp_parser_postfix_dot_deref_expression): Likewise.
944 (cp_parser_builtin_offsetof): New.
945 (cp_parser_primary_expression): Use it.
947 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
950 * parser.c (cp_parser_postfix_expression): Allow subscript
951 operator in offsetof.
953 2004-05-31 Mark Mitchell <mark@codesourcery.com>
956 * friend.c (add_friend): Do not try to perform access checks for
957 functions from dependent classes.
959 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
961 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
962 (pp_cxx_begin_template_argument_list): Turn into a function.
963 (pp_cxx_end_template_argument_list): Likewise.
964 (pp_cxx_separate_with): Define.
965 (pp_cxx_unqualified_id): Tidy.
966 (pp_cxx_primary_expression): Likewise.
967 (pp_cxx_postfix_expression): Likewise.
968 (pp_cxx_expression): Likewise.
969 (pp_cxx_simple_type_specifier): Likewise.
970 (pp_cxx_type_specifier_seq): Likewise.
971 (pp_cxx_parameter_declaration_clause): Likewise.
972 (pp_cxx_exception_specification): Likewise.
973 (pp_cxx_direct_declarator): Likewise.
974 (pp_cxx_type_id): Likewise.
975 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
977 (pp_cxx_left_paren): Likewise.
978 (pp_cxx_right_paren): Likewise.
979 (pp_cxx_left_brace): Likewise.
980 (pp_cxx_right_brace): Likewise.
981 (pp_cxx_left_bracket): Likewise.
982 (pp_cxx_right_bracket): Likewise.
983 (pp_cxx_dot): Likewise.
984 (pp_cxx_identifier): Likewise.
985 (pp_cxx_tree_identifier): Likewise.
986 (pp_cxx_ampersand): New macro.
987 (pp_cxx_star): Likewise.
988 (pp_cxx_arrow): Likewise.
989 (pp_cxx_semicolon): Likewise.
990 (pp_cxx_complement): Likewise.
991 (pp_cxx_begin_template_argument_list): Declaree.
992 (pp_cxx_end_template_argument_list): Likewise.
993 (pp_cxx_colon_colon): likewise.
995 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
997 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1000 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1002 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1003 typeck.c: Fix comment formatting.
1005 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1007 * cp-lang.c (cp_expand_decl): Remove.
1008 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1010 2004-05-30 Andreas Jaeger <aj@suse.de>
1012 * lang-specs.h: Add missing initializers for .ii.
1014 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1016 * decl.c (cp_make_fname_decl): Free return value from
1019 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1022 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1024 * init.c (build_new): Likewise.
1027 * name-lookup.c (arg_assoc): Robustify.
1030 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1031 when determining the scope to use for a pointer to member.
1032 (lookup_anon_field): Give it external linkage.
1033 * cp-tree.h (lookup_anon_field): Declare it.
1034 * expr.c (cplus_expand_constant): Use it.
1036 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1039 * parser.c (cp_parser_simple_type_specifier): Call
1040 maybe_note_name_used_in_class.
1042 2004-05-28 Tom Marshall <tmarshall@real.com>
1045 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1046 the class has friends.
1048 2004-05-27 Adam Nemet <anemet@lnxw.com>
1051 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1052 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1054 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1056 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1057 if it might be needed.
1058 * pt.c (mark_decl_instantiated): Only call defer_fn if
1059 the function actually needs processing in finish_file.
1060 * decl2.c (finish_file): Add check that elements in
1061 deferred_fns_used are really needed there. Remove unnecessary
1062 test of DECL_SAVED_TREE.
1064 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1066 * Make-lang.in: No need to specify $(LIBCPP).
1068 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1071 * parser.c (cp_parser_class_head): Robustify.
1074 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1076 (cp_parser_constructor_declarator_p): Treat attributes
1080 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1081 base classes in templates.
1083 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1086 * pt.c (instantiate_template): Robustify.
1088 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1091 * decl.c (xref_tag): Issue errors about redeclaring template
1092 classes as non-template classes.
1094 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1097 * name-lookup.c (supplement_binding): Allow redefinitions of
1101 * parser.c (cp_parser_template_argument): Robustify.
1103 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1105 * class.c (alter_access): Use %E format specifier to print an
1106 identifier node. Avoid looking at the IDENTIFIER_POINTER.
1107 (push_lang_context): Likewise.
1108 * decl.c (lookup_label): Likewise.
1109 (grokdeclarator): Likewise.
1110 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1111 * pt.c (do_type_instantiation): Likewise.
1112 * tree.c (handle_java_interface_attribute): Likewise.
1113 (handle_com_interface_attribute): Likewise.
1114 (handle_init_priority_attribute): Likewise.
1116 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1120 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1121 recognized as overloaded functions.
1123 2004-05-22 Mark Mitchell <mark@codesourcery.com>
1126 * class.c (layout_nonempty_base_or_field): Do not try to avoid
1127 layout conflicts for unions.
1130 * typeck.c (build_x_unary_op): Instantiate template class
1131 specializations before looking for "operator &".
1134 * typeck.c (complete_type): Layout non-dependent array types, even
1138 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1141 2004-05-22 Roger Sayle <roger@eyesopen.com>
1143 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1144 returning when TREE_TYPE is error_mark_node.
1145 * typeck.c (require_complete_type): Return error_mark_node if
1146 value's type is an error_mark_node.
1148 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
1150 * optimize.c (calls_setjmp_r): Remove.
1151 (calls_setjmp_p): Remove.
1152 * cp-tree.c (calls_setjmp_p): Remove.
1153 * decl.c (finish_function): Do not call calls_setjmp_p.
1155 2004-05-18 Zack Weinberg <zack@codesourcery.com>
1157 * decl.c (cp_finish_decl): Use mark_decl_referenced.
1158 * decl2.c (maybe_make_one_only): Likewise.
1159 * method.c (use_thunk): Likewise.
1161 2004-05-18 Jason Merrill <jason@redhat.com>
1163 * class.c (build_base_path): Tidy a bit.
1165 2004-05-14 Geoffrey Keating <geoffk@apple.com>
1167 * name-lookup.c (struct scope_binding): New.
1168 (EMPTY_SCOPE_BINDING): New.
1169 (lookup_using_namespace): Take a scope_binding instead of a
1171 (qualified_lookup_using_namespace): Likewise.
1172 (cxx_binding_clear): Delete.
1173 (do_nonmember_using_decl): Use a scope_binding instead of a
1175 (lookup_tag): Don't call select_decl.
1176 (ambiguous_decl): Don't return anything (and change callers to match).
1177 Take a scope_binding as the second parameter.
1178 (lookup_namespace_name): Use a scope_binding instead of a
1180 (unqualified_namespace_lookup): Likewise.
1181 (lookup_qualified_name): Likewise.
1182 (select_decl): Take a scope_binding instead of a cxx_binding.
1183 Use macros rather than hand-coding tests for type-ness.
1185 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1187 * cp-gimplify.c: Rename from cp-simplify.c.
1188 * Make-lang.in, optimize.c: Update.
1190 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1192 Merge from tree-ssa-20020619-branch. See
1193 ChangeLog.tree-ssa for details.
1195 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1196 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1197 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1198 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1200 * cp-mudflap.c: New file.
1201 * cp-simplify.c:: New file.
1203 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1206 * decl2.c (check_classfn): For member templates, compare also the
1207 template parameters to match the declaration.
1208 * cp-tree.h: Adjust declaration of check_classfn.
1209 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1210 * friend.c (do_friend): Likewise.
1211 * pt.c (tsubst_friend_function): Likewise.
1213 2004-05-01 Zack Weinberg <zack@codesourcery.com>
1215 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1216 Instead, dig into the representation type to find the array bound.
1218 2004-04-30 Jason Merrill <jason@redhat.com>
1220 Refer to base members using COMPONENT_REFs where possible.
1221 * class.c (build_simple_base_path): New fn.
1222 (build_base_path): Use it for non-virtual base references.
1223 (layout_class_type): Change base fields to their real type
1224 after layout is done.
1225 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1226 * cp-lang.c (cxx_get_alias_set): Use it.
1228 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
1230 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1233 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1236 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1237 used in integral constant expressions.
1239 2004-04-22 Mark Mitchell <mark@codesourcery.com>
1241 * init.c (build_aggr_init): Fix accidental use of C99 construct in
1244 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1246 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1247 * decl.c (reshape_init): Use it.
1248 * init.c (perform_member_init): Remove redundant condition.
1249 (build_aggr_init): Adjust to handle brace-enclosed initializers
1251 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1253 * parser.c (cp_parser_initializer_clause): Do not set
1254 TREE_HAS_CONSTRUCTOR on the initializer.
1255 * rtti.c (tinfo_base_init): Likewise.
1256 (generic_initializer): Likewise.
1257 (ptr_initializer): Likewise.
1258 (ptm_initializer): Likewise.
1259 (class_initializer): Likewise.
1260 (get_pseudo_ti_init): Likewise.
1261 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1263 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1265 * name-lookup.c (anonymous_namespace_name): Make static.
1267 2004-04-19 Roger Sayle <roger@eyesopen.com>
1270 * class.c (build_base_path): Call fold whilst building the NULL
1271 pointer check expression trees.
1273 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1275 * init.c (build_new_1): Don't use type size argument for Java
1276 _Jv_AllocObject call.
1278 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1280 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1281 declaration and definition.
1283 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1286 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1287 than ASM_OUTPUT_DEF.
1289 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1291 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1292 current_function_decl == NULL.
1294 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1297 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1300 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1302 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1304 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1305 or TREE_SIDE_EFFECTS of a type.
1307 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1310 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1311 cv-qualifier unification.
1312 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1314 2004-04-02 Jan Hubicka <jh@suse.cz>
1316 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1317 * cp-tree.h (cp_update_decl_after_saving): Declare.
1318 * tree.c (cp_update_decl_after_saving): Define.
1320 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1323 * typeck.c (get_delta_difference): Call fold before returning the
1326 2004-04-01 Richard Henderson <rth@redhat.com>
1329 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1330 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1332 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1335 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1337 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1339 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1341 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1343 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1344 * class.c (check_bitfield_decl): Likewise.
1345 * cvt.c (type_promotes_to): Likewise.
1346 * decl.c (finish_enum): Likewise.
1347 * mangle.c (write_builtin_type): Likewise.
1348 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1349 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1350 (build_binary_op): Likewise.
1352 2004-03-31 Jan Hubicka <jh@suse.cz>
1354 * tree.h (optimize_function): Kill prototype.
1355 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1356 * semantics.c (expand_body): Kill.
1358 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1361 * decl.c (start_decl_1): Do not decide whether or not to create a
1362 new cleanup level until after the type has been completed.
1365 * pt.c (tsubst_default_argument): Clear current_function_decl.
1367 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1369 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1371 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1373 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1374 is null, just print the literal name and return.
1376 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1378 * cxx-pretty-print.c: Fix comment typos.
1380 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1382 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1385 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1387 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1388 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1391 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1393 PR 12267, 12391, 12560, 13129, 14114, 14133
1394 * cp-lang.c (c_reset_state): Delete.
1395 (push_file_scope, pop_file_scope): New stubs.
1396 * parser.c (c_parse_file): Call sorry() here if called more than once.
1398 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1400 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1403 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1405 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1407 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1409 * error.c (enum pad): Remove.
1410 (dump_qualifiers): Likewise.
1411 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1412 (dump_aggr_type): Likewise.
1413 (dump_type_suffix): Likewise.
1414 (dump_simple_decl): Likewise.
1415 (dump_function_decl): Likewise.
1416 (cv_to_string): Likewise.
1417 (dump_type_prefix): Likewise. Adjust return void.
1418 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1420 (pp_cxx_template_keyword_if_needed): Document.
1421 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1422 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1423 MUST_NOT_THROW_EXPR.
1425 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1428 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1429 templates, if their type is non-dependent.
1431 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1433 * call.c (build_op_delete_call): Do not forget the placement
1434 arguments when iterating through mutiple delete operators.
1436 * cp-tree.h (svaed_scope): Remove last_parms.
1437 (NEW_DELETE_OPNAME_P): New macro.
1438 (last_function_parms): Remove.
1439 (do_friend): Adjust prototype.
1440 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1441 using last_function_parms.
1442 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1443 using last_function_parms.
1444 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1445 for class-specific operator new and operator delete.
1446 (grok_op_properties): Do not look for allocation functions with
1448 (start_function): Use DECL_ARGUMENTS instead of
1449 last_function_parms.
1450 * decl.h (last_function_parms): Do not declare.
1451 * decl2.c (grokclassfn): Do not use last_function_parms.
1452 * friend.c (do_friend): Remove parmdecls parameter.
1453 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1454 (pop_from_top_level): Do not restore it.
1455 * pt.c (check_explicit_specialization): Do not adjust
1456 last_function_parms.
1458 * name-lookup.c (do_local_using_decl): Create a local binding for
1459 types brought in via using declarations.
1461 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1462 function declarations correctly.
1464 * semantics.c (finish_id_expression): Correct handling of
1465 conversion operators to dependent types.
1467 * typeck.c (lookup_destructor): Allow the use of destructors from
1470 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1472 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1473 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1474 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1475 the field is named TEMPLATE_TYPE_PARM_INDEX.
1477 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1480 * parser.c (cp_parser_functional_cast): A cast to anything
1481 but integral or enumaration type is not an integral constant
1483 * pt.c (value_dependent_expression_p): Handle cast expressions
1484 without operands (such as "int()").
1486 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1488 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1489 cv-qualification between the type named by the
1490 pseudo-destructor-name and the object-type.
1492 * search.c (accessible_base_p): Handle non-proper bases.
1494 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1495 refers to a single overloaded function, set the type of the
1497 * tree.c (lvalue_type): Simplify.
1498 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1500 (build_unary_op): Handle OVERLOADs with known types.
1502 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1505 * parser.c (cp_parser_postfix_expression): Handle the use of
1506 "typename" in non-dependent contexts. Convert appropriately when
1507 when using a qualified name after "->" or ".".
1509 * call.c (conditional_conversion): Honor the requirement that some
1510 conversions refer to the original object.
1512 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1514 * call.c (build_conditional_expr): Do not call force_rvalue for
1515 operands of void_type when the conditional expression itself has
1517 * name-lookup.c (pushdecl): Don't consider a declaration of a
1518 function named "main" to be an overload of a type named "main".
1519 * parser.c (cp_parser_template_name): Perform name lookup when the
1520 template name is proceeded by "template" if the qualifying scope
1522 * typeck.c (composite_pointer_type_r): Correctly handle
1523 pointer-to-member types.
1524 (build_const_cast): Likewise.
1526 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1528 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1529 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1530 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1531 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1532 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1533 (TYPEOF_TYPE_EXPR): New macro.
1534 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1535 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1536 * pt.c (tsubst): Likewise.
1537 * semantics.c (finish_typeof): Likewise.
1538 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1539 and TEMPLATE_TYPE_PARM.
1540 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1541 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1543 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1546 * cp-tree.h (build_new_op): Change prototype.
1547 (build_x_binary_op): Likewise.
1548 * call.c (build_new_op): Add overloaded_p parameter.
1549 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1550 * parser.c (cp_parser_binary_expression): Note that uses of
1551 overloaded operators prevents an expression from being considered
1552 an integral constant.
1553 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1555 * semantics.c (finish_call_expr): Likewise.
1556 * typeck.c (rationalize_conditional_expr): Likewise.
1557 (build_x_indirect_ref): Likewise.
1558 (build_x_binary_op): Likewise.
1559 (build_x_unary_op): Likewise.
1560 (build_x_compound_expr): Likewise.
1561 (build_modify_expr): Likewise.
1562 * typeck2.c (build_x_arrow): Likewise.
1564 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1566 * cp-lang.c, ptree.c: Update copyright.
1568 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1571 * parser.c (cp_parser_non_integral_constant_expression): Encode
1572 more of the idiom that surrounded calls to this function within
1574 (cp_parser_primary_expression): Adjust accordingly.
1575 (cp_parser_postfix_expression): Likewise.
1576 (cp_parser_unary_expression): Likewise.
1577 (cp_parser_cast_expression): Likewise.
1578 (cp_parser_assignment_expression): Likewise.
1579 (cp_parser_expression): Likewise.
1580 (cp_parser_new_expression): Note that new-expressions are not
1581 allowed in integral constant expressions.
1582 (cp_parser_delete_expression): Likewise.
1584 2004-03-12 Matt Austern <austern@apple.com>
1586 * decl2.c (maybe_make_one_only): Look at
1587 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1588 to make an explicit instantiation weak.
1589 * method.c (use_thunk): Make sure we call comdat_linkage
1591 * pt.c (do_type_instantiation): On systems where weak symbols
1592 don't go in a static archive's TOC, explicit instantiation of a
1593 class must imply *explicit* instantiation of its memeber.
1595 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1597 * call.c, cp-tree.h, pt.c: Fix comment typos.
1599 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1602 * decl.c (xref_tag): Disregard non-type declarations when
1603 looking up a tagged type.
1605 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1608 * call.c (convert_like_real): Build a const qualified temporary,
1609 when testing ctor access.
1611 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1613 * call.c (initialize_reference): Fix typo.
1615 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1618 * pt.c (determine_specialization): For member templates, match also
1622 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1624 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1626 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1629 * call.c (initialize_reference): Handle initializers that are
1630 class-member access expressions applies to rvalues.
1632 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1635 * name-lookup.c (supplement_binding): Ignore functions that are
1636 marked DECL_ANTICIPATED.
1638 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1641 * class.c (check_field_decls): Complain about non-static data
1642 members of reference type in unions. Propagate
1643 CLASSTYPE_REF_FIELDS_NEED_INIT and
1644 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1646 * init.c (perform_member_init): Complain about mbmers with const
1647 type that are not explicitly initialized.
1649 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1651 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1652 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1653 (lang_identifier): Remove implicit_decl and error_locus.
1654 (IDENTIFIER_IMPLICIT_DECL): Remove.
1655 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1656 (IDENTIFIER_ERROR_LOCUS): Likewise.
1657 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1658 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1659 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1660 (implicitly_declare): Remove.
1661 * decl.c (warn_extern_redeclared_static): Remove check of
1662 IDENTIFIER_IMPLICIT_DECL.
1663 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1664 (implicitly_declare): Remove.
1665 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1666 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1667 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1668 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1669 in the innermost scope, rather than at namespace scope.
1670 * name-lookup.c (push_local_binding): Give it external linkage.
1671 (pushdecl): Remove dead code.
1672 * name-lookup.h (push_local_binding): Declare it.
1673 * ptree.c (cxx_print_identifier): Don't print
1674 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1675 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1676 not IDENTIFIER_ERROR_LOCUS.
1677 * typeck.c (build_function_call): Remove dead code.
1679 2004-03-08 Jason Merrill <jason@redhat.com>
1682 * decl.c (xref_tag): Remove attribute handling.
1683 * cp-tree.h: Adjust prototype.
1684 * decl.c, parser.c, rtti.c: Adjust callers.
1685 * parser.c (cp_parser_class_head): Pass back attributes in the
1687 (cp_parser_class_specifier): Adjust.
1689 2004-03-08 Matt Austern <austern@apple.com>
1692 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1693 as static, to static_decls array.
1695 2004-03-05 Jason Merrill <jason@redhat.com>
1697 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1699 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1701 * decl.c (grokfndecl): Update old incorrect comment.
1702 (grokvardecl): Diagnose C++ variables of type with no linkage.
1704 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1707 * pt.c (build_non_dependent_expr): Do not create a
1708 NON_DEPENDENT_EXPR for a THROW_EXPR.
1710 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1713 * error.c (dump_expr): Handle THROW_EXPR.
1715 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1718 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1719 lookup if ordinary name-lookup finds a non-function.
1720 * pt.c (tsubst_copy_and_build): Likewise.
1723 * parser.c (cp_parser_late_parsing_default_args): Check that there
1724 are no extra tokens after the end of the default-argument
1727 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1730 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1731 having C++ linkage for name-mangling purposes.
1734 * parser.c (cp_parser_direct_declarator): Recognize constructor
1735 declarators that use a template-id to name the class being
1739 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1740 (tsubst_expr): Do not call tsubst_copy, even when
1741 processing_template_decl.
1743 2004-03-01 Jeff Law <law@redhat.com>
1745 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1748 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1751 * name-lookup.h (push_scope): Change prototype.
1752 * name-lookup.c (push_scope): Do not reenter the current class
1754 * decl.c (grokfndecl): Check return code from push_scope before
1756 * decl2.c (check_classfn): Likewise.
1757 * parser.c (cp_parser_conversion_function_id): Likewise.
1758 (cp_parser_init_declarator): Likewise.
1759 (cp_parser_direct_declarator): Likewise.
1760 (cp_parser_class_specifier): Likewise.
1761 (cp_parser_class_head): Likewise.
1762 (cp_parser_lookup_name): Likewise.
1763 (cp_parser_constructor_declarator_p): Likewise.
1764 * pt.c (instantiate_class_template): Likewise.
1765 (resolve_typename_type): Likewise.
1767 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1770 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1774 * class.c (update_vtable_entry_for_fn): Do not go through
1775 covariance machinery if the type returned by an overrider is the
1776 same as the original.
1778 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
1780 * call.c: Fix a comment typo.
1782 2004-02-27 Ziemowit Laski <zlaski@apple.com>
1784 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1786 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1789 * parser.c (cp_parser_parameter_declaration_list): Commit
1790 to fewer tentative parses.
1792 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1795 * pt.c (dependent_type_p_r): A template template parameter is a
1798 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1801 * mangle.c (write_template_arg_literal): Don't rely on identity for
1804 2004-02-24 Jason Merrill <jason@redhat.com>
1806 * tree.c (build_exception_variant): Use check_qualified_type.
1808 2004-02-23 Zack Weinberg <zack@codesourcery.com>
1809 Kazu Hirata <kazu@cs.umass.edu>
1811 * decl.c (cxx_init_decl_processing): Don't check
1812 flag_writable_strings.
1814 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
1817 * typeck.c (maybe_warn_about_returning_address_of_location):
1818 Change check for VAR_DECL to use DECL_P instead.
1820 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1823 * cvt.c (build_expr_type_conversion): Type must be complete before
1824 looking up for conversions.
1826 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1829 * name-lookup.c (arg_assoc_class): Don't look into template
1830 arguments if it is not a primary template.
1832 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1835 * method.c (use_thunk): Always clone function argument tree.
1837 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1840 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1843 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1844 for all type variants.
1846 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1849 * decl.c (duplicate_decls): Return error_mark_node for invalid
1851 * name-lookup.c (push_namespace): Ignore the return value from
1853 * pt.c (push_template_decl_real): Robustify.
1856 * name-lookup.c (push_class_level_binding): Do not complain about
1857 adding a binding for a member whose name is the same as the
1858 enclosing class if the member is located in a base class of the
1861 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1864 * parser.c (cp_parser_new_expression): Parse an ill-formed
1865 direct-new-declarator after a parenthesized type-id to emit good
1868 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
1870 * cp-tree.def, cvt.c: Update copyright.
1872 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1875 * cp-tree.h (abi_version_at_least): Remove.
1876 * mangle.c: Include flags.h.
1878 2004-02-15 Mark Mitchell <mark@codesourcery.com>
1881 * call.c (build_conditional_expr): Handle conversions between
1882 class types which result in differently cv-qualified type
1886 * class.c (delete_duplicate_fields_1): Remove.
1887 (delete_duplicate_fields): Likewise.
1888 (finish_struct_anon): Remove check for members with the same name
1889 as their enclosing class.
1890 (check_field_decls): Do not call duplicate_fields.
1891 * decl.c (grokdeclarator): Remove check for static data members
1892 with the same name as their enclosing class.
1893 * name-lookup.c (push_class_level_binding): Check for members with
1894 the same name as their enclosing class.
1896 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1899 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1901 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1904 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1905 has full set of arguments.
1907 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1910 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1912 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1915 * cp-tree.h (delete_sanity): Change prototype.
1916 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1917 Remove dead code. Adjust code to warn about deleting an array.
1918 * typekc.c (decay_conversion): Use build_address and build_nop.
1921 * search.c (accessible_p): Do not check access in thunks.
1924 * call.c (build_conditional_expr): Call force_rvalue on the
1925 non-void operand in the case that one result is a throw-expression
1926 and the other is not.
1928 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
1931 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1932 the type name and look ahead for ::~, and bail out early with a
1933 better error message if the parse is going to fail.
1935 2004-02-12 Mark Mitchell <mark@codesourcery.com>
1937 * call.c (conversion_kind): New type.
1938 (conversion_rank): Likewise.
1939 (conversion): Likewise.
1940 (CONVERSION_RANK): New macro.
1941 (conversion_obstack): New variable.
1942 (obstack_initialized): Likewise.
1943 (z_candidate): Change type of convs and second_conv.
1944 (candidate_warning): New type.
1945 (IDENTITY_RANK): Remove.
1946 (EXACT_RANK): Likewise.
1947 (PROMO_RANK): Likewise.
1948 (STD_RANK): Likewise.
1949 (PBOOL_RANK): Likewise.
1950 (USER_RANK): Likewise.
1951 (ELLIPSIS_RANK): Likewise.
1952 (BAD_RANK): Likewise.
1953 (ICS_RANK): Likewise.
1954 (ICS_STD_RANK): Likewise.
1955 (ICS_USER_FLAG): Likewise.
1956 (ICS_ELLIPSIS_FLAG): Likewise.
1957 (ICS_THIS_FLAG): Likewise.
1958 (ICS_BAD_FLAG): Likewise.
1959 (NEED_TEMPORARY_P): Likewise.
1960 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
1961 (USER_CONV_CAND): Likewise.
1962 (USER_CONV_FN): Likewise.
1963 (conversion_obstack_alloc): New function.
1964 (alloc_conversion): Likewise.
1965 (validate_conversion_obstack): Likewise.
1966 (alloc_conversions): Likewise.
1967 (build_conv): Adjust to deal with new conversion data structures.
1968 (build_identity_conv): New function.
1969 (build_ambiguous_conv): Likewise.
1970 (standard_conversion): Adjust to deal with new conversion data
1972 (convert_class_to_reference): Likewise.
1973 (direct_reference_binding): Likewise.
1974 (reference_binding): Likewise.
1975 (implicit_conversion): Likewise.
1976 (add_candidate): Likewise.
1977 (add_function_candidate): Likewise.
1978 (add_conv_candidate): Likewise.
1979 (build_builtin_candidate): Likewise.
1980 (print_z_candidate): Likewise.
1981 (merge_conversion_sequences): Likewise.
1982 (build_user_type_conversion_1): Likewise.
1983 (build_user_type_conversion): Likewise.
1984 (build_new_function_call): Likewise.
1985 (build_object_call): Likewise.
1986 (conditional_conversion): Likewise.
1987 (build_conditional_expr): Likewise.
1988 (build_new_op): Likewise.
1989 (build_op_delete_call): Likewise.
1990 (convert_like_real): Likewise.
1991 (build_over_call): Likewise.
1992 (build_new_method_call): Likewise.
1993 (is_subseq): Likewise.
1994 (maybe_handle_implicit_object): Likewise.
1995 (maybe_handle_ref_bind): Likewise.
1996 (compare_ics): Likewise.
1997 (source_type): Likewise.
1998 (add_warning): Likewise.
2000 (can_convert_arg): Likewise.
2001 (can_convert_arg_bad): Likewise.
2002 (perform_implicit_conversion): Likewise.
2003 (perform_direct_initialization_if_possible): Likewise.
2004 (initialize_reference): Likewise.
2005 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2006 * cp-tree.def (WRAPPER): Likewise.
2007 (IDENTITY_CONV): Remove.
2008 (LVALUE_CONV): Likewise.
2009 (QUAL_CONV): Likewise.
2010 (STD_CONV): Likewise.
2011 (PTR_CONV): Likewise.
2012 (PMEM_CONV): Likewise.
2013 (BASE_CONV): Likewise.
2014 (REF_BIND): Likewise.
2015 (USER_CONV): Likewise.
2016 (AMBIG_CONV): Likewise.
2017 (RVALUE_CONV): Likewise.
2018 * cp-tree.h (tree_wrapper): Remove.
2019 (WRAPPER_ZC): Remove.
2020 (lang_tree_node): Remove wrapper.
2021 (LOOKUP_SPECULATIVELY): Remove.
2022 (build_op_delete_call): Adjust prototype.
2023 (validate_conversion_obstack): Declare.
2024 (build_zc_wrapper): Remove.
2025 * cvt.c (convert_to_reference): Remove dead code.
2026 (ocp_convert): Likewise.
2027 * decl.c (redeclaration_error_message): Correct handling of
2029 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2030 (cp_tree_node_structure): Remove WRAPPER case.
2031 * decl2.c (finish_file): Call validate_conversion_obstack.
2032 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2033 (build_op_delete_call): Likewise.
2034 (build_x_delete): Likewise.
2035 (build_delete): Adjust call to build_op_delete_call.
2036 * pt.c (tsubst_friend_declaration): Adjust code to determine
2037 whether or not a friend template is a definition.
2038 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2039 * tree.c (build_zc_wrapper): Remove.
2041 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2043 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2044 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2045 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2046 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2048 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2050 * typeck.c (lookup_destructor): Fix typo in error message.
2052 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2054 * call.c, parser.c, tree.c: Fix comment typos.
2056 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2059 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2060 * decl.c (duplicate_decls, start_function): Likewise.
2062 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2064 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2065 * parser.c (free_parser_stacks): Delete.
2067 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2069 * rtti.c: Update copyright.
2071 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2074 * decl.c (require_complete_types_for_parms): Do not insert
2075 error_mark_node in the parameter list.
2077 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2080 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2081 error when terminator can not be found.
2083 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2085 Make-lang.in (po-generated): Delete.
2087 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2089 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2090 targetm.calls.promote_prototypes.
2092 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2096 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2098 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2099 (handle_pragma_implementation): Likewise.
2101 2004-02-05 Mark Mitchell <mark@codesourcery.com>
2104 * typeck.c (lookup_destructor): Tweak error message.
2106 2004-02-05 Jan Hubicka <jh@suse.cz>
2108 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
2111 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2114 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2115 code, only emits the diagnostic now. Added lookup of the identifier
2116 and support for qualified ids.
2117 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2118 Parse an (invalid) type name as id-expression within a declarator.
2119 (cp_parser_simple_declaration): Use it.
2120 (cp_parser_member_declaration): Likewise.
2121 (cp_parser_make_typename_type): New function. Handle errors through
2122 cp_parser_diagnose_invalid_typename.
2123 (cp_parser_elaborated_type_specifier): Use it.
2125 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2128 * call.c (convert_like_real): Use "converting" rather than
2129 "argument" as the descriptive keyword to
2130 dubious_conversion_warnings.
2131 * typeck.c (convert_for_assignment): Do not call
2132 dubious_conversion_warnings.
2134 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2137 * init.c (build_delete): Emit a more informative error message in
2138 case of an incomplete type, and on the correct source line.
2140 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2142 * error.c, search.c: Update copyright.
2144 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2147 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2148 linkage for the typeinfo name string.
2150 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2153 * cp-tree.h (fold_non_dependent_expr): New function.
2154 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2155 (cp_parser_template_argument): Use fold_non_dependent_expr.
2156 (cp_parser_direct_declarator): Likewise.
2157 * pt.c (fold_non_dependent_expr): New function.
2158 (convert_nontype_argument): Use it.
2159 (tsubst_qualified_id): Simplify.
2160 (tsubst_copy_and_build): Likewise.
2162 2004-02-04 Mark Mitchell <mark@codesourcery.com>
2164 * decl.c (cxx_push_function_context): Do not set
2165 current_function_is_thunk.
2166 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2169 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2172 * pt.c (more_specialized_class): Increase processing_template_decl
2173 while partial ordering.
2175 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2178 * decl.c (start_function): Do not call pushdecl for any
2179 instantiation or specialization of a primary template.
2181 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2184 * parser.c (cp_parser_class_name): Robustify.
2187 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2190 * semantics.c (finish_id_expression): Do not return an
2191 IDENTIFIER_NODE when lookup finds a PARM_DECL.
2193 2004-02-03 Mark Mitchell <mark@codesourcery.com>
2196 * pt.c (build_non_dependent_expr): Do not build
2197 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2200 * semantics.c (finish_id_expression): Do not return an
2201 IDENTIFIER_NODE when lookup finds a VAR_DECL.
2204 * parser.c (cp_parser_simple_declaration): When skipping to the
2205 end of the statement swallow the terminating semicolon.
2207 2004-02-02 Mark Mitchell <mark@codesourcery.com>
2210 * init.c (build_offset_ref): Improve error recovery for invalid
2211 uses of non-static member functions.
2214 * cp-tree.h (cp_build_type_attribute_variant): New function.
2215 * class.c (build_clone): Use cp_build_type_attribute_variant.
2216 * decl.c (duplicate_decls): Likewise.
2217 * pt.c (copy_default_args_to_explicit_spec): Likewise.
2218 (tsubst_function_type): Likewise.
2219 * tree.c (build_exception_variant): Check attributes before
2220 concluding that two types are the same.
2221 (cp_build_type-attribute_variant): New method.
2222 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2225 * call.c (convert_class_to_reference): Keep better track of
2226 pedantically invalid user-defined conversions.
2228 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2231 * pt.c (tsubst_qualified_id): Improved error message when a type
2232 is expected but not found.
2234 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
2236 * class.c: Fix comment typos.
2238 * error.c: Likewise.
2239 * parser.c: Likewise.
2241 * search.c: Likewise.
2242 * typeck.c: Likewise.
2244 2004-01-30 Richard Henderson <rth@redhat.com>
2247 * method.c (use_thunk): Don't force_target_expr for void thunks.
2248 * tree.c (build_target_expr_with_type): Assert non-void type.
2249 (force_target_expr): Likewise.
2251 2004-01-30 Michael Matz <matz@suse.de>
2253 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2255 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2259 * decl.c (grokdeclarator): Check immediatly type completeness for
2260 non-dependent types.
2262 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2265 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2266 a sizeof expression.block
2268 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2271 * mangle.c (write_encoding): Correct encoding of member template
2274 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2276 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2277 template name as it was `<::' (digraph typo).
2278 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2279 (cp_parser_id_expression): Use it.
2280 (cp_parser_nested_name_specifier_opt): Likewise.
2281 (cp_parser_template_name): Likewise.
2282 (cp_parser_class_name): Likewise.
2283 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2285 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2288 * typeck.c (merge_types): Do not merge attributes into
2292 * parser.c (cp_parser_direct_declarator): Do not prevent
2293 backtracking inside a parenthesized declarator.
2294 (cp_parser_parameter_declaration): Fix typo in comment.
2296 2004-01-28 Jan Hubicka <jh@suse.cz>
2298 * semantics.c (expand_body) Do emit_associated_thunks before
2301 2004-01-27 Devang Patel <dpatel@apple.com>
2303 * name-lookup.c: Include "debug.h"
2304 (do_namespace_alias): Invoke debug_hooks to emit debug info
2305 for namespace alias.
2306 (do_local_using_decl): Invoke debug_hooks to emit debug info
2308 (do_class_using_decl): Same.
2309 (do_toplevel_using_decl): Same.
2310 (do_using_directive): Same.
2311 (cp_emit_debug_info_for_using): New function.
2312 * Make-lang.in (cp/parser.o): Depend on debug.h
2313 (cp/name-lookup.o): Same.
2315 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2317 * cp-tree.h (language_function, lang_type_header): Use
2319 * name-lookup.h (cp_binding_level): Likewise.
2321 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2324 * semantics.c (finish_for_expr): Check for unresolved overloaded
2327 * class.c (add_method): Just check processing_template_decl to
2328 determine whether or not we are within a template.
2329 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2330 * init.c (decl_constant_value): Check the type of the declaration,
2332 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2333 (push_to_top_level): ... this.
2334 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2335 * pt.c (push_template_decl_real): Reorder condition for speed.
2336 (convert_template_argument): Use dependency-checking functions in
2337 place of uses_template_parms.
2338 (lookup_template_class): Avoid calling uses_template_parms more
2340 (uses_template_parms): Reimplement, using dependency-checking
2342 (instantiate_class_template): Use push_to_top_level, not
2343 maybe_push_to_top_level.
2344 (type_unification_real): Simplify.
2345 (type_dependent_expression_p): Handle OFFSET_REFs and
2347 (any_dependent_template_arguments_p): Handle multiple levels of
2349 * semantics.c (expand_or_defer_fn): Do not check
2350 uses_template_parms for template instantiations.
2351 * typeck.c (comptypes): Avoid calling cp_type_quals.
2353 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2356 * call.c (build_over_call): Do not convert arguments when
2357 processing a template.
2358 * pt.c (build_non_dependent_expr): Do not build a
2359 NON_DEPENDENT_EXPR for arithmetic constants.
2361 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2364 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2365 returns a TYPE_DECL. no further lookup is required.
2366 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2367 is invalid. Rework to give better diagnostics.
2369 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2372 * pt.c (instantiate_class_template): Add an error_mark_node
2374 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2376 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2379 * decl.c (finish_function): Move the call to
2380 finish_fname_decls below the call to
2381 finish_eh_spec_block.
2383 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2385 * optimize.c, typeck2.c: Update copyright.
2387 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2389 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2390 init.c, mangle.c, typeck.c: Update copyright.
2392 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2394 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2396 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2398 * Make-lang.in: Replace $(docdir) with doc.
2399 (c++.info, c++.srcinfo): Dummy entry.
2400 (c++.man, c++.srcman): New rules.
2401 (c++.install-man): Revamp rule.
2403 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2405 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2406 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2407 immediate $(shell) instead of deferred backquote.
2409 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2412 * parser.c (cp_parser_postfix_expression): When encountering
2413 incomplete type on left-hand side of "->" or ".", treat the entire
2414 expression as erroneous.
2417 * call.c (build_field_call): Remove.
2418 (n_build_method_call): Likewise.
2419 (build_method_call): Likewise.
2420 (build_new_method_call): Do not call build_field_call.
2421 * class.c (n_build_method_call): Remove.
2422 (print_class_statistics): Do not print it.
2423 * cp-tree.h (build_method_call): Remove declaration.
2424 (finish_object_call_expr): Likewise.
2425 (build_new_1): Do not use build_method_call.
2426 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2427 when the function appearing on the right-hand-side of "." or "->"
2428 is not actually a function.
2429 * pt.c (tsubst_copy_and_build): Likewise.
2430 * semantics.c (finish_object_call_expr): Remove.
2432 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2435 * pt.c (tsubst): Use finish_typeof.
2437 2004-01-18 Jason Merrill <jason@redhat.com>
2440 * except.c (build_throw): In a template, set
2441 current_function_returns_abnormally.
2443 2004-01-17 Fred Fish <fnf@intrinsity.com>
2446 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2447 except don't call array_type_nelts() with a VECTOR_TYPE.
2449 2004-01-16 Jan Hubicka <jh@suse.cz>
2451 * mangle.c (write_mangled_name): Remove inline modifier.
2453 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2456 * decl.c (compute_array_index_type): Fix grammar in comment.
2457 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2460 * call.c (name_as_c_string): Print conversion operator names
2464 * call.c (initialize_reference): Pass -1 for inner parameter to
2467 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2470 * parser.c (cp_parser_base_specifier): Check for an invalid
2471 keyword `typename' and emit an user-friendly error message.
2473 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2476 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2477 (handle_pragma_implementation): Likewise.
2479 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2482 * typeck.c (build_class_member_access_expr): Allow to access members
2483 of the currently open class.
2484 (finish_class_member_access_expr): Likewise.
2486 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2489 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2490 name by value, instead of computing them.
2491 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2492 arguments. Pass them to validate_nonmember_using_decl.
2493 * name-lookup.h (do_local_using_decl): Adjust.
2494 (do_toplevel_using_decl): Likewise.
2495 * parser.c (cp_parser_using_declaration): Likewise.
2496 * pt.c (tsubst_expr): Likewise.
2498 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2502 * name-lookup.c (qualified_lookup_using_namespace): Search
2503 strongly-associated namespaces first, and only then try other
2506 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2508 * Make-lang.in (c++.srcextra): Dummy entry.
2510 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2513 * parser.c (cp_parser_template_name): Don't try to parse a
2514 conversion-function-id, as it cannot be a template-name.
2515 (cp_parser_simple_type_specifier): Check for invalid template-ids
2516 even after a built-in type.
2518 2004-01-14 Jan Hubicka <jh@suse.cz>
2521 * pt.c (instantiate_decl): Do not increase function_depth.
2523 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2527 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2528 attributes and discard.
2529 * decl.c (xref_tag): Don't overwite existing attributes with
2532 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2535 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2536 is no destructor while looking up a BIT_NOT_EXPR.
2538 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2540 * cxxfilt.c: Remove unused file.
2542 2004-01-14 Jan Hubicka <jh@suse.cz>
2544 Partial fix to PR c++/12850
2545 * decl2.c (mark_used): Do not proactively instantiate templates
2546 when compiling in unit-at-a-time or not optimizing.
2547 * optimize.c (maybe_clone_body): Do not increase function depth.
2549 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2552 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2554 2004-01-12 Steven Bosscher <stevenb@suse.de>
2557 * parser.c (cp_parser_member_declaration): Any non-type is also
2558 not a class or a function.
2560 2004-01-12 Jason Merrill <jason@redhat.com>
2563 * class.c (build_base_path): Do not mark vtable references as
2565 (build_vtbl_ref_1): Likewise.
2567 2004-01-12 Richard Henderson <rth@redhat.com>
2570 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2571 (store_init_value): Use it.
2572 * decl.c (check_initializer): Expect full initialization code
2573 from store_init_value.
2574 * init.c (expand_aggr_init_1): Likewise.
2575 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2577 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2579 * class.c (layout_class_type): For non-POD class types, also copy
2580 the DECL_SIZE and DECL_MODE of fields to the base class type.
2582 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2585 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2586 calling regenerate_decl_from_template.
2588 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2591 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2592 decl-specifier occurring along with a class definition.
2594 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2596 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2597 clauses to comments describing declares_class_or_enum.
2598 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2601 2004-01-12 Jan Hubicka <jh@suse.cz>
2603 * pt.c (for_each_template_parm): Do not check for duplicates.
2604 (for_each_template_parm): Use walk_tree duplicate checking code.
2606 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2609 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2610 is error_mark_node, don't add any more decl_specs.
2611 (cp_parser_init_declarator): After committing to a declaration, if
2612 the decl_specifiers start with error_mark_node, issue an error and
2613 change the type to "int".
2615 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2618 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2620 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2624 * pt.c (tsubst): Substitution must fail if we are attempting to
2625 create an array with element type that is an abstract class type.
2626 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2627 before calling abstract_virtuals_error.
2629 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2631 * name-lookup.c (qualified_lookup_using_namespace): Consider
2632 strong using directives even if we've already found a binding.
2634 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2636 * cp-tree.h (cxx_expand_expr): Change prototype.
2637 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2639 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2642 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2643 looking into them recursively. They can be there because of the
2644 new __offsetof__ extension.
2646 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2648 * parser.c (cp_parser_save_member_function_body): Mark the
2651 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2654 * class.c (build_clone): Copy type attributes from the original
2655 function to the clone.
2658 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2659 references as constant.
2662 * parser.c (cp_parser_explicit_instantiation): Improve error
2664 (cp_parser_require): Improve indication of the error location.
2667 * parser.c (cp_parser_class_head): Reorder logic to check for
2668 invalid qualification.
2670 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2673 * name-lookup.c (lookup_using_namespace): Remove spacesp
2675 (unqualified_namespace_lookup): Likewise.
2676 (lookup_qualified_name): Adjust accordingly.
2677 (lookup_name_real): Likewise.
2678 (lookup_arg_dependent): Do not eliminate the namespace of the
2679 functions found by unqualified name lookup unless that is the
2682 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2684 * semantics.c (push_deferring_access_checks): Fix format.
2685 (resume_deferring_access_checks): Likewise.
2686 (stop_deferring_access_checks): Likewise.
2687 (pop_deferring_access_checks): Likewise.
2688 (get_deferred_access_checks): Likewise.
2689 (pop_to_parent_deferring_access_checks): Likewise.
2690 (perform_deferred_access_checks): Likewise.
2691 (perform_or_defer_access_check): Likewise.
2693 2004-01-04 Richard Henderson <rth@redhat.com>
2695 * call.c (build_over_call): Don't create a save_expr of an
2696 aggregate, but rather its address.
2698 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2701 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2702 an offsetof expression.
2704 * parser.c (cp_parser_parameter_declaration): Fix comment.
2707 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2708 (reference_binding): Set it when appropriate.
2709 (build_temp): New function, split out from ...
2710 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2711 (initialize_reference): Likewise.
2714 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2715 (cp_parser_new): Initialize it.
2716 (cp_parser_postfix_expression): Set it.
2717 (cp_parser_sizeof_operand): Likewise.
2718 (cp_parser_parameteR_declaration): Do not commit early to tenative
2719 parsers when in_type_id_in_expr_p is set.
2721 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2724 * parser.c (cp_parser_template_argument): Don't call
2725 make_unbound_class_template directly.
2726 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2727 UNBOUND_CLASS_TEMPLATE tree node.
2729 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2732 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2734 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2737 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2738 (DECL_FUNCTION_TEMPLATE_P): Use it.
2739 (DECL_CLASS_TEMPLATE_P): Likewise.
2740 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2741 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2742 (cp_parser_template_name): Likewise.
2743 (cp_parser_elaborated_type_specifier): Likewise.
2744 (cp_parser_namespace_name): Likewise.
2745 (cp_parser_class_name): Likewise.
2746 (cp_parser_lookup_name_simple): Likewise.
2748 See ChangeLog.3 for earlier changes.