1 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
3 * typeck.c: Fix a comment typo.
5 2004-11-25 Mark Mitchell <mark@codesourcery.com>
8 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
9 unknown_type as non matching. Tidy up.
10 * pt.c (build_non_dependent_expr): Do not build a
11 NON_DEPENDENT_EXPR for a VAR_DECL.
14 * cp-tree.h (lvalue_or_else): Remove declaration.
15 * tree.c (lvalue_or_else): Remove.
16 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
17 (build_modify_expr): Likewise.
20 * decl.c (duplicate_decls): Return error_mark_node on error, as
24 * decl.c (grokvardecl): Keep track of whether or not a there was
25 explicit qualification.
26 * name-lookup.c (set_decl_namespace): Complain about explicit
27 qualification of a name within its own namespace.
30 * typeck.c (check_return_expr): Robustify.
32 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
34 Friend class name lookup 3/n, PR c++/3332
35 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
36 (lookup_type_scope): Don't deal with name from user declaration
38 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
39 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
42 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
44 Friend class name lookup 2/n, PR c++/14513, c++/15410
45 * name-lookup.c (lookup_name_real): Simplify.
46 (lookup_type_scope): Add SCOPE parameter. Handle friend class
48 * name-lookup.h (tag_scope): New enum type.
49 (lookup_type_scope): Adjust declaration.
50 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
51 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
52 (start_enum): Likewise. Add assertion test that NAME is
53 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
55 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
56 * parser.c (cp_parser_elaborated_type_specifier,
57 cp_parser_class_head): Adjust call to xref_tag.
58 * pt.c (lookup_template_class, instantiate_class_template):
60 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
61 tinfo_base_init, emit_support_tinfos): Likewise.
63 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
65 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
67 2004-11-24 Mark Mitchell <mark@codesourcery.com>
70 * name-lookup.c (supplement_binding): Do not allow typedefs to be
71 redefined in class scope.
74 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
75 redefinitions of builtin types other that "bool" or "wchar_t".
77 2004-11-24 Steven Bosscher <stevenb@suse.de>
79 * decl.c (cxx_init_decl_processing): Don't clear
80 flag_inline_functions.
82 2004-11-24 Mark Mitchell <mark@codesourcery.com>
84 * pt.c (tsubst_function_type): Do not permit function types which
85 return arrays or functions.
88 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
91 * cp-tree.h (CTOR_NAME): Remove.
93 * decl.c (initialize_predefined_identifiers): Add spaces to the
94 end of constructor and destructor names.
96 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
99 * decl.c (start_decl): Check for invalid specialization headers.
101 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
105 * call.c (standard_conversion): Move check for conversions between
107 * typeck.c (ptr_reasonably_similar): ... here.
109 2004-11-23 Ben Elliston <bje@au.ibm.com>
111 * cp-tree.h (context_as_string): Remove extern.
112 * error.c (context_as_string): Remove.
114 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
115 * lex.c (cp_type_qual_from_rid): Remove.
117 * cp-tree.h (do_poplevel): Remove extern.
118 (check_multiple_declarators): Likewise.
119 * semantics.c (do_poplevel): Make static.
120 (check_multiple_declarators): Remove.
122 * cp-tree.h (check_final_overrider): Remove extern.
123 * search.c (check_final_overrider): Make static.
125 * cp-tree.h (build_artificial_parm): Remove extern.
126 * decl2.c (build_artificial_parm): Make static.
128 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
131 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
132 Make sure the result is always a rvalue.
134 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
136 * decl.c (start_preparsed_function): Call check_function_type even
138 (require_complete_types_for_parms): Skip dependent types.
139 (check_function_type): Likewise.
141 2004-11-16 Steven Bosscher <stevenb@suse.de>
143 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
144 * search.c: Don't include it.
146 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
148 * cp-gimplify.c: Include pointer-set.h
149 (cp_genericize_r): Use pointer_sets instead of a hashtable.
150 Also instert the new statement for CLEANUP_STMT.
151 (cp_genericize): Use pointer_sets instead of a hashtable.
152 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
154 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
156 Friend class name lookup 1/n, PR c++/18471
157 * decl.c (lookup_and_check_tag): New function.
158 (xref_tag, start_enum): Use it.
159 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
160 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
162 * name-lookup.c (lookup_name_current_level): Rename to ...
163 (lookup_name_innermost_nonclass_level): ... this.
164 (lookup_type_scope): New function.
165 * name-lookup.h (lookup_name_current_level): Rename to ...
166 (lookup_name_innermost_nonclass_level): ... this.
167 (lookup_type_scope): Add declaration.
169 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
172 * pt.c (coerce_template_parms): Only emit error message about
173 invalid template argument when TF_ERROR.
175 2004-11-12 Mark Mitchell <mark@codesourcery.com>
178 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
179 error_mark_node to indicate errors.
182 * parser.c (cp_parser_direct_declarator): Disallow non-constant
183 array bounds when not inside a function.
186 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
187 unqualified name resolves to a member function.
190 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
191 derived class correctly.
193 * decl2.c (import_export_decl): Fix typo in comment.
194 * tree.c (pod_type_p): Likewise.
196 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
198 * typeck.c (cxx_mark_addressable): Add braces around the first if.
200 2004-11-10 Adam Nemet <anemet@lnxw.com>
203 * typeck.c (cxx_mark_addressable): Issue an error if address of an
204 explicit register variable is requested.
206 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
209 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
210 (struct lang_decl_flags): Add thunk_p flag.
211 (struct lang_decl): Remove separate fixed_offset. Place
212 cloned_function and fixed_offset into union.
213 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
214 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
215 (THUNK_FIXED_OFFSET): Adjust.
216 * method.c (make_thunk): Adjust.
218 2004-11-09 Mark Mitchell <mark@codesourcery.com>
221 * init.c (build_new_1): Handle parenthesized type-ids that name an
224 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
226 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
227 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
228 quoting in diagnostics.
229 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
230 quoting in printf format.
231 * decl.c (duplicate_decls, start_decl): Use %qD instead of
234 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
236 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
237 search.c, typeck2.c: Fix comment formatting.
239 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
241 PR tree-optimization/18184
242 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
243 of different modes or alias-all flags as equivalent.
244 * typeck.c (comptypes): Likewise.
246 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
249 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
250 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
251 TYPE_REFFN_P): Document.
252 (fold_decl_constant_value): New prototype.
253 * pt.c (convert_nontype_argument_function): Rewrite and extract
255 (fold_decl_constant_value, convert_nontype_argument_function): New.
256 (lookup_template_class): Add comment about useless double call.
257 * mangle.c (write_expression): Strip conversions before lowering
259 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
260 enum to enum conversion.
262 2004-11-02 Mark Mitchell <mark@codesourcery.com>
265 * parser.c (cp_parser_type_parameter): Robustify.
268 * parser.c (cp_parser_single_declaration): Disallow template
272 * typeck.c (build_const_cast): Use error_operand_p.
274 2004-11-02 Ziemowit Laski <zlaski@apple.com>
276 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
277 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
278 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
280 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
282 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
284 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
287 * search.c (check_final_overrider): Deprecate gnu covariant extension.
289 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
291 Convert diagnostics to use quoting flag q 9/n
292 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
293 get_delta_difference): Use new quotation style.
294 * repo.c (reopen_repo_file_for_write): Likewise.
295 * pt.c (do_type_instantiation): Likewise.
296 * parser.c (cp_parser_diagnose_invalid_type_name):
297 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
298 * error.c (cp_print_error_function,
299 print_instantiation_full_context): Likewise.
300 * decl.c (define_label, grok_reference_init,
301 maybe_deduce_size_from_array_init, revert_static_member_fn):
302 * decl2.c (check_classfn): Likewise.
303 * class.c (add_method, check_field_decls, layout_class_type,
304 resolve_address_of_overloaded_function): Likewise.
305 * call.c (build_x_va_arg, build_over_call): Likewise.
307 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
309 Convert diagnostics to use quoting flag q 8/n
310 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
311 convert_to_reference, ocp_convert, convert_to_void
312 cp_convert_to_pointer): Use new quotation style.
314 2004-10-31 Mark Mitchell <mark@codesourcery.com>
317 * typeck2.c (store_init_value): Use split_nonconstant_init even
318 for types that require construction.
320 1004-10-28 Matt Austern <austern@apple.com>
323 * cp-tree.h (class_key_or_enum_as_string): Declare.
324 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
325 and remove static qualifier.
326 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
327 union/enum declaration.
329 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
331 * pt.c: Fix a comment typo.
333 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
335 * typeck.c (composite_pointer_type): Remove comment about DR 195.
336 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
337 warning when being pedantic.
338 (build_reinterpet_cast, build_c_cast): Adjust.
340 2004-10-29 Mark Mitchell <mark@codesourcery.com>
343 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
344 appear in a constructor/destructor that will be cloned.
346 1004-10-28 Matt Austern <austern@apple.com>
349 * decl.c (finish_enum): Handle packed attribute.
350 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
352 2004-10-28 Mark Mitchell <mark@codesourcery.com>
355 * pt.c (instantiate_class_template): Increment
356 processing_template_decl when substituting into a member class
359 2004-10-27 Mark Mitchell <mark@codesourcery.com>
362 * call.c (convert_like_real): Fix formatting.
363 (initialize_reference): When binding a temporary to a base class,
364 ensure that the nominal copy made is to the derived class, not the
368 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
371 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
373 * decl.c (bad_specifiers): Move the q after the %.
375 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
377 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
380 2004-10-26 Mark Mitchell <mark@codesourcery.com>
382 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
383 * search.c (current_scope): Fix prototype.
386 * search.c (current_scope): Return the innermost non-block scope,
387 not the innermost non-block, non-namespace scope.
388 (at_namespace_scope_p): Adjust accordingly.
389 (dfs_accessible_post): Do not pass namespaces to is_friend.
390 (dfs_walk_once_accessible_r): Likewise.
391 * decl.c (grokvardecl): Adjust call to current_scope.
392 (build_enumerator): Likewise.
393 * parser.c (cp_parser_using_declaration): Likewise.
394 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
396 (cp_parser_class_head): Adjust call to current_scope.
397 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
401 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
402 their underlying values.
405 * typeck.c (build_binary_op): Honor build_type, even when in a
408 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
410 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
411 padding token checking.
413 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
416 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
417 layout_type as it is already done by create_array_type_for_decl.
419 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
422 * parser.c (eof_token): Make const, correctly initialize rid and
424 (struct cp_lexer): Replace buffer_end pointer with buffer_length
426 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
428 (cp_lexer_new_from_tokens): Adjust.
429 (cp_lexer_grow_buffer): Remove.
430 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
431 cp_lexer_purge_token): Add const casts.
433 2004-10-21 Mark Mitchell <mark@codesourcery.com>
437 * cp-tree.h (convert_to_base): Change prototype.
438 (build_ptrmemfunc): Likewise.
439 (convert_ptrmem): New function.
440 * call.c (struct conversion): Adjust documentation for base_p.
441 (standard_conversion): Set base_p for ck_pmem conversions as
443 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
445 * class.c (convert_to_base): Handle both pointers and objects.
446 Add nonnull parameter.
447 (build_vfield_ref): Adjust call to convert_to_base.
448 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
449 (convert_force): Likewise.
450 * typeck.c (build_unary_op): Likewise.
451 (convert_ptrmem): New function.
452 (build_static_cast_1): Use it.
453 (build_reinterpret_cast): Allow conversions to vector types.
454 (get_delta_difference): Add c_cast_p parameter.
455 (build_ptrmemfunc): Likewise. Adjust calls to
456 get_delta_difference.
458 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
461 * error.c (cp_error_at): Output the context as it might be
462 different file as the other location.
464 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
466 * typeck.c: Fix a comment typo.
468 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
471 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
472 * cp-tree.h (make_unbound_class_template): Adjust prototype.
473 * parser.c (cp_parser_lookup_name): Adjust call to
474 make_unbound_class_template.
475 (cp_parser_single_declaration): Handle member class of class
476 template as template friend parsing correctly.
477 * friend.c (is_friend): Call is_specialization_of_friend for
478 template friend class.
479 (make_friend_class): Handle member class of class template as
481 * pt.c (is_specialization_of_friend): Likewise.
482 (instantiate_class_template): Likewise.
483 (tsubst): Adjust call to make_unbound_class_template.
485 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
487 * typeck.c (composite_pointer_type): Add comment about DR 195
488 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
489 Allow function pointer conversions that DR195 suggests.
490 (build_reinterpret_cast, build_c_cast): Update
491 build_reinterpret_cast_1 calls.
493 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
495 * call.c, typeck.c: Fix comment typos.
497 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
499 * parser.c (cp_token_position): New typedef. Define VEC thereof.
500 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
501 next_token and last_token cp_token_position. Make saved_tokens a
502 VEC(cp_token_position).
503 (eof_token): New static variable.
504 (CP_SAVED_TOKENS_SIZE): Rename to ...
505 (CP_SAVED_TOKEN_STACK): ... here.
506 (cp_lexer_new_main): Adjust main lexer creation and buffer
508 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
509 to the parent buffer. Do not append eof token.
510 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
512 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
513 (cp_lexer_token_position, cp_lexer_token_at): New.
514 (cp_lexer_saving_tokens): Adjust. Make inline.
515 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
516 (cp_lexer_peek_token_emit_debug_info): Fold into ...
517 (cp_lexer_peek_token): ... here.
518 (cp_lexer_peek_nth_token): Don't peek past EOF.
519 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
521 (cp_lexer_purge_token): Adjust eof setting.
522 (cp_lexer_purge_tokens_after): Likewise.
523 (cp_lexer_save_tokens): Push next_token directly.
524 (cp_lexer_commit_tokens): Adjust.
525 (cp_lexer_rollback_tokens): Pop next_token directly.
526 (cp_parser_check_for_invalid_template_id): Adjust token purging.
527 (cp_parser_translation_unit): Do not consume the EOF.
528 (cp_parser_nested_name_specifier_opt): Adjust token purging.
529 (cp_parser_template_id, cp_parser_template_name): Likewise.
531 2004-10-19 Mark Mitchell <mark@codesourcery.com>
534 * call.c (struct conversion): Add base_p.
535 (convert_like): Add c_cast_p argument.
536 (convert_like_with_conversion): Likewise.
537 (build_conv): Clear base_p.
538 (standard_conversion): Set it, for derived-to-base conversions.
539 (convert_like_real): Add c_cast_p parameter. Handle pointer
540 conversions directly rather than relying on ocp_convert.
541 (perform_direct_initialization_if_possible): Add c_cast_p
543 * cp-tree.h (perform_direct_initialization_if_possible): Change
545 (convert_member_func_to_ptr): New function.
546 * typeck.c (check_for_casting_away_constness): Add diag_fn
548 (build_static_cast_1): New function, split out from ...
549 (build_static_cast): ... here. Use build_static_cast_1.
550 (build_reinterpret_cast_1): New function, split out from ...
551 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
552 (build_const_cast_1): New function, split out from ...
553 (build_const_cast): ... here. Use build_const_cast_1.
554 (build_c_cast): Rewrite to use build_const_cast_1,
555 build_static_cast_1, and build_reinterpret_cast_1.
556 (convert_member_func_to_ptr): New function.
558 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
561 * parser.c (enum cp_parser_prec): Give relational expressions
562 a higher precedence than equality expressions.
564 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
566 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
567 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
568 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
569 (enum base_access): Reorganize.
570 (accessible_base_p, accessible_p): Add consider_local_p parameter.
571 * call.c (standard_conversion): Update comment about
573 (enforce_access): Adjust accessible_p call.
574 (build_over_call): Adjust accessible_base_p call.
575 * class.c (convert_to_base): Adjust lookup_base call.
576 (build_vtbl_ref_1): Likewise.
577 (warn_about_ambiguous_bases): Likewise. Add early exit.
578 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
579 * search.c (accessible_base_p): Add consider_local_p parameter.
580 (lookup_base): Pass consider_local_p to accessible_base_p call.
581 (friend_accessible_p): Check whether scope is a class member.
582 Remove unnecessary class template check.
583 (accessible_p): Add consider_local_p parameter. Use it.
584 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
585 * tree.c (maybe_dummy_object): Likewise.
586 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
587 (build_class_member_access_expr): Adjust lookup_base call.
588 * typeck2.c (binfo_or_else): Likewise.
589 * rtti.c (build_dynamic_cast_1): Access can consider friendship
592 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
595 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
597 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
600 * parser.c (cp_parser_parenthesized_expression_list): Fold
601 non-dependent expressions in attribute lists.
603 2004-10-15 Mark Mitchell <mark@codesourcery.com>
606 * decl.c (declare_global_var): Use the return value from pushdecl.
609 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
610 type names if we have already found a valid type.
611 (cp_parser_member_declaration): Likewise.
614 * parser.c (cp_parser_member_specification_opt): Handle
617 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
619 * dump.c, g++spec.c, repo.c: Update copyright.
621 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
623 * decl.c: Fix a comment typo.
625 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
628 * name-lookup.c (parse_using_directive): If we have a
629 error_mark_node, do not set the decl namespace associations
632 2004-10-14 Mark Mitchell <mark@codesourcery.com>
635 * decl.c (cp_finish_decl): Do not call expand_static_init more
636 than once for a single variable.
638 2004-10-14 Matt Austern <austern@apple.com>
640 * Make-lang.in (pt.o): depends on pointer-set.h
641 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
642 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
643 (for_each_template_parm): Convert from htab_t to pointer_set_t.
644 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
646 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
649 * semantics.c (finish_for_expr): Convert expression to void
650 so that we don't create temporaries for a?b:c.
652 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
654 * search.c: Fix a comment typo.
656 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
658 * class.c (dfs_modify_vtables): Simplify condition. Return
659 dfs_skip_bases as appropriate.
660 (modify_all_vtables): Walk in pre-order.
661 * search.c (dfs_walk_all, dfs_walk_once_r,
662 dfs_walk_once_accessible_r): Assert post order function never
663 returns dfs_skip_bases.
665 * search.c (struct lookup_base_data_s): New.
666 (lookup_base_r): Replace with ...
667 (dfs_lookup_base): ... this.
668 (lookup_base): Use dfs_walk_all.
670 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
672 * search.c: Fix comment typos.
674 2004-10-11 Mark Mitchell <mark@codesourcery.com>
677 * parser.c (cp_parser_declarator): Add member_p parameter.
678 (cp_parser_condition): Adjust calls to cp_parser_declarator.
679 (cp_parser_explicit_instantiation): Likewise.
680 (cp_parser_init_declarator): Likewise.
681 (cp_parser_direct_declarator): Add member_p parameter. Do not
682 parse tentatively when parsing the parameters to a member.
683 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
684 (cp_parser_parameter_declaration): Likewise.
685 (cp_parser_member_declaration): Likewise.
686 (cp_parser_exception_declaration): Likewise.
689 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
690 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
691 for members of partial or explicit specializations.
694 * decl2.c (finish_anon_union): Robustify.
696 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
698 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
699 (dcast_base_hint): ... here.
700 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
701 * search.c (struct dcast_data_s): New.
702 (dynamic_cast_base_recurse): Remove. Replace with ...
703 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
704 (get_dynamic_cast_base_type): Rename to ...
705 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
706 (accessible_r): Remove.
707 (dfs_accessible_post): New, broken out of accessible_r.
708 (accessible_p): Use dfs_walk_once_accessible.
709 (dfs_walk_once_accessible_r): New. From accessible_r.
710 (dfs_walk_once_accessible): New. From acessible_p.
712 * cp-tree.h (SAME_BINFO_TYPE_P): New.
713 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
715 (convert_to_base_statically, determine_primary_bases,
716 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
717 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
718 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
719 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
720 * init.c (expand_member_init): Likewise.
721 * search.c (lookup_base_r, dynamic_cast_base_recurse,
722 binfo_via_virtual, copied_binfo, binfo_for_vbase,
723 original_binfo): Likewise.
724 * tree.c (copy_binfo): Likewise.
726 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
728 * semantics.c: Fix comment typos.
730 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
735 * semantics.c (maybe_cleanup_point_expr): Call
736 fold_build_cleanup_point_expr.
737 (maybe_cleanup_point_expr_void): New function.
738 (add_decl_expr): Call maybe_cleanup_point_expr_void.
739 (finish_expr_stmt): Likewise.
740 (finish_return_stmt): Likewise.
741 (finish_for_expr): Likewise.
742 (finish_asm_stmt): Likewise.
743 * typeck.c (condition_conversion): Call
744 fold_build_cleanup_point_expr.
746 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
749 * semantics.c (add_decl_expr): If the decl has a size which
750 has side effects then the decl expression needs a cleanup point.
752 2004-10-10 Mark Mitchell <mark@codesourcery.com>
755 * decl.c (grokdeclarator): Robustify error-recovery on invalid
758 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
760 Convert diagnostics to use quoting flag q 7/n
761 * typeck.c (composite_pointer_type_r, composite_pointer_type,
762 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
763 string_conv_p, build_class_member_access_expr,
764 build_class_member_access_expr, lookup_destructor,
765 finish_class_member_access_expr, build_indirect_ref,
766 get_member_function_from_ptrfunc, build_function_call,
767 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
768 check_for_casting_away_constness, build_static_cast,
769 build_reinterpret_cast, build_const_cast, build_c_cast,
770 build_modify_expr, get_delta_difference, build_ptrmemfunc,
771 dubious_conversion_warnings, convert_for_assignment,
772 convert_for_initialization,
773 maybe_warn_about_returning_address_of_local, check_return_expr):
776 * typeck2.c (error_not_base_type, readonly_error,
777 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
778 store_init_value, digest_init, build_x_arrow,
779 build_m_component_ref, require_complete_eh_spec_types): Likewise.
781 * tree.c (cp_build_qualified_type_real,
782 handle_java_interface_attribute, handle_init_priority_attribute):
785 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
786 finish_pseudo_destructor_expr,
787 check_template_template_default_arg, begin_class_definition,
788 finish_base_specifier, qualified_name_lookup_error,
789 finish_id_expression, finish_typeof): Likewise.
791 * search.c (lookup_base, check_final_overrider,
792 look_for_overrides_r): Likewise.
794 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
796 2004-10-09 Mark Mitchell <mark@codesourcery.com>
799 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
803 * init.c (build_new): Correct comments.
804 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
808 * parser.c (cp_parser_postfix_dot_deref_expression): If the
809 pseduo-destructor-name production does not work, fall back to the
813 * tree.c (cp_tree_equal): Handle a BASELINK.
816 * cp-tree.h (check_var_type): New function.
817 * decl.c (check_var_type): New function, split out from ...
818 (grokdeclarator): ... here.
819 * pt.c (tsubst_decl): Use check_var_type.
822 * decl.c (grokdeclarator): Disallow declarations of operators as
825 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
828 * error.c (dump_expr): Add missing case for RDIV_EXPR.
830 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
832 * pt.c, search.c: Fix comment typos.
834 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
836 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
838 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
839 * class.c (struct find_final_overrider_data): Remove most_derived,
840 vpath_list and vpath fields. Add path field.
841 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
842 (dfs_find_final_overrider): Rename to ...
843 (dfs_find_final_overrider_pre): ... here. Adjust.
844 (dfs_find_final_overrider_post): Adjust.
845 (dfs_find_final_overrider_q): Fold into
846 dfs_find_final_overrider_pre.
847 (find_final_overrider): Adjust dfs searching.
848 (dfs_modify_vtables): Don't mark binfo here.
849 (modify_all_vtables): Use dfs_walk_once.
850 (build_vtt_inits): Likwise. Use dfs_walk_all.
851 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
852 Return dfs_skip_bases as appropriate.
853 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
854 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
855 appropriate. Don't mark binfo here.
856 (initialize_vtbl_ptrs): Use dfs_walk_once.
857 * search.c (struct vbase_info): Remove unused struct.
858 (access_in_type): Use dfs_walk_once.
859 (dfs_access_in_type): Don't mark binfo here.
860 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
862 (accessible_r): ... here. New. Specialize dfs_walk_once.
863 (accessible_p): Use accessible_r.
864 (lookup_field_queue_p): Remove. Fold into ...
865 (lookup_field_r): ... here. Adjust.
866 (lookup_member): Use dfs_walk_all.
867 (dfs_walk_real, dfs_walk): Replace with ...
868 (dfs_walk_all, dfs_walk_once): ... these.
869 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
870 (dfs_unmark, unmarkedp, markedp): Remove.
871 (dfs_get_pure_virtuals): Don't mark binfo here.
872 (get_pure_virtuals): Use dfs_walk_once.
873 (dfs_debug_unmarked_p): Remove. Fold into ...
874 (dfs_debug_mark): ... here.
875 (note_debug_info_needed): Use dfs_walk_all.
877 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
879 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
880 CLEANUP_POINT_EXPR to get the asm expression.
882 2004-10-07 Mark Mitchell <mark@codesourcery.com>
884 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
885 (DECL_MEMBER_TEMPLATE_P): New macro.
886 (is_member_template): Remove.
887 (class_method_index_for_fn): New function.
888 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
889 * class.c (finish_struct_methods): Remove out-of-date comment.
890 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
891 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
892 class_method_index_for_fn.
893 * pt.c (is_member_template): Remove.
894 (is_member_template_class): Likewise.
895 (optimize_specialization_lookup_p): New function.
896 (retrieve_specialization): Optimize lookups for members that are
897 not member templates.
898 (register_specialization): Adjust accordingly.
899 (build_template_decl): Add member_template_p parameter. Set
900 DECL_MEMBER_TEMPLATE_P.
901 (process_partial_specialization): Adjust call to
902 retrieve_specialization.
903 (push_template_decl_real): Determine whether the template is a
905 (lookup_template_class): Use retrieve_specialization.
906 (tsubst_decl): Adjust call to retrieve_specialization.
907 (tsubst_exception_specification): New function.
909 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
910 (instantiate_template): Adjust call to retrieve_specialization.
911 (regenerate_decl_from_template): Do not actually generate a new
913 (instantiate_decl): Adjust call to retrieve_specialization.
914 (class_method_index_for_fn): New method.
916 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
918 * parser.c (cp_parser_asm_definition): Look passed the
919 CLEANUP_POINT_EXPR to get the asm expression.
921 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
924 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
927 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
929 Convert diagnostics to use quoting flag q 6/n
930 * pt.c (finish_member_template_decl, check_specialization_scope,
931 maybe_process_partial_specialization, determine_specialization,
932 check_explicit_specialization, maybe_check_template_type,
933 process_partial_specialization, check_default_tmpl_args,
934 push_template_decl_real, redeclare_class_template,
935 convert_nontype_argument, coerce_template_parms,
936 lookup_template_class, push_tinst_level,
937 instantiate_class_template, tsubst_arg_types,
938 tsubst_function_type, tsubst, tsubst_qualified_id,
939 tsubst_copy_and_build, check_instantiated_args,
940 do_decl_instantiation, do_type_instantiation,
941 invalid_nontype_parm_type_p, check_specialization_namespace,
942 convert_template_argument, determine_specialization,
943 check_template_shadow, tsubst_decl
944 instantiate_pending_templates): Use quoting marks.
946 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
949 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
950 unqualified lookup finds a member function.
952 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
954 Convert diagnostics to use quoting flag q 5/n
955 * parser.c (cp_parser_name_lookup_error,
956 cp_parser_diagnose_invalid_type_name,
957 cp_parser_primary_expression, cp_parser_unqualified_id,
958 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
959 cp_parser_jump_statement, cp_parser_simple_declaration,
960 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
961 cp_parser_type_parameter, cp_parser_template_id,
962 cp_parser_template_name, cp_parser_direct_declarator,
963 cp_parser_parameter_declaration_list, cp_parser_class_head,
964 cp_parser_base_specifier, cp_parser_lookup_name,
965 cp_parser_late_parsing_default_args,
966 cp_parser_optional_template_keyword
967 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
968 cp_parser_check_access_in_redeclaration): Use quoting marks.
970 * name-lookup.c (supplement_binding, pushdecl,
971 check_for_out_of_scope_variable, validate_nonmember_using_decl,
972 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
973 push_namespace, do_namespace_alias, do_using_directive,
974 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
976 * method.c (use_thunk): Likewise.
978 * lex.c (unqualified_name_lookup_error,
979 unqualified_fn_lookup_error): Likewise.
981 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
983 Convert diagnostics to use quoting flag q 4/n
984 * except.c (decl_is_java_type, build_throw,
985 is_admissible_throw_operand, check_handlers_1, check_handlers):
987 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
988 * init.c (sort_mem_initializers, emit_mem_initializers,
989 member_init_ok_or_else, expand_member_init, is_aggr_type,
990 build_offset_ref, build_java_class_ref): Likewise.
992 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
994 Convert diagnostics to use quoting flag q 3/n
995 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
996 redeclaration_error_message, lookup_label, check_goto,
997 make_typename_type, make_unbound_class_template,
998 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
999 grok_reference_init, layout_var_decl, maybe_commonize_var,
1000 check_for_uninitialized_const_var, reshape_init_array,
1001 reshape_init, check_initializer, cp_finish_decl,
1002 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
1003 check_static_variable_definition, compute_array_index_type,
1004 create_array_type_for_decl, check_special_function_return_type,
1005 grokdeclarator, check_default_argument, grokparms,
1006 grok_ctor_properties, grok_op_properties,
1007 check_elaborated_type_specifier, xref_tag, finish_enum,
1008 build_enumerator, check_function_type, start_preparsed_function,
1009 store_parm_decls): Use quoting formats.
1010 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
1011 check_java_method, check_classfn, finish_static_data_member_decl,
1012 grokfield, grokbitfield, grok_function_init,
1013 build_anon_union_vars, coerce_new_type, coerce_delete_type,
1014 check_default_args): Likewise.
1015 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1017 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1019 Convert diagnostics to use quoting flag q 2/n
1020 * class.c (build_base_path, add_method, alter_access,
1021 handle_using_decl, check_bases,
1022 maybe_warn_about_overly_private_class, find_final_overrider,
1023 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
1024 check_bitfield_decl, check_field_decls, layout_empty_base,
1025 build_base_field, check_methods, layout_virtual_bases,
1026 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
1027 resolve_address_of_overloaded_function, instantiate_type,
1028 note_name_declared_in_class): Use format flag "q" for quoting.
1030 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1032 Convert diagnostics to use quoting flag q 1/n
1033 * error.c (locate_error): Ignore quoting flag q.
1034 * call.c (build_user_type_conversion_1, build_operator_new_call,
1035 build_object_call, op_error, build_conditional_expr,
1036 build_new_op, build_op_delete_call, enforce_access,
1037 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
1038 convert_default_arg, build_over_call, build_new_method_call,
1039 joust, perform_implicit_conversion, initialize_reference): Use the
1042 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
1045 * typeck.c (build_reinterpret_cast): Return if the inner type
1048 2004-10-01 Jan Hubicka <jh@suse.cz>
1050 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
1052 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
1054 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
1055 turning operator_code and fixed_offset into bitfields.
1057 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
1059 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
1061 2004-09-29 Jason Merrill <jason@redhat.com>
1063 PR tree-optimization/17697
1064 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
1066 2004-09-28 Jason Merrill <jason@redhat.com>
1069 * class.c (build_base_field): Set TYPE_MODE.
1071 2004-09-28 Roger Sayle <roger@eyesopen.com>
1074 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
1075 than -lc and -lm, may require linking against libstc++.
1077 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
1079 * tree.c: Fix a comment typo.
1081 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
1083 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
1084 (struct secondary_vptr_vtt_init_data_s): New.
1085 (build_vtt_inits): Adjust dfs_walkers.
1086 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
1087 secondary_vptr_vtt_init_data_s structure. Adjust.
1088 (dfs_ctor_vtable_bases_queue_p): Remove.
1089 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
1091 * pt.c (struct get_template_base_data_s): Remove.
1092 (get_template_base_r): Fold into get_template_base.
1093 (get_template_base): Walk base binfos directly in inheritance
1096 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1099 * cp-tree.h (fold_if_not_in_template): New function.
1100 * call.c (build_conditional_expr): Use fold_if_not_in_template.
1101 (build_cxx_call): Likewise.
1102 * cvt.c (convert_to_complex): Likewise.
1103 (ocp_convert): Likewise.
1104 (convert): Likewise.
1105 (convert_force): Likewise.
1106 * decl.c (compute_array_index_type): Clear
1107 processing_template_decl while folding array bounds.
1108 * pt.c (convert_nontype_argument): Clear
1109 processing_template_decl while processing non-type argument
1111 * tree.c (fold_if_not_in_template): New function.
1112 * typeck.c (build_class_member_access_expr): Use
1113 fold_if_not_in_template.
1114 (build_array_ref): Likewise.
1115 (build_binary_op): Likewise. Do not try to optimize computations
1116 when processing templates.
1117 (cp_pointer_int_sum): Use fold_if_not_in_template.
1118 (pointer_diff): Likewise.
1119 (build_unary_op): Likewise.
1120 (build_reinterpret_cast): Likewise.
1121 (get_delta_difference): Likewise.
1122 (expand_ptrmemfunc_cst): Likewise.
1123 (dubious_conversion_warnings): Likewise.
1125 2004-09-27 Matt Austern <austern@apple.com>
1127 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
1128 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
1129 tokens that come from headers that are implicitly extern "C".
1130 (struct cp_parser): new one-bit field, implicit_extern_c.
1131 (cp_parser_new): Set parser's implicit_extern_c to false.
1132 (cp_parser_translation_unit): Pop lang context if we were in a
1133 header that was implicitly extern "C".
1134 (cp_parser_declaration_seq_opt): Push/pop lang context as
1135 required by the token's and parser's implicit_extern_c.
1137 2004-09-27 Mark Mitchell <mark@codesourcery.com>
1140 * cp-tree.h (shared_member_p): Declare.
1141 * search.c (shared_member_p): Give it external linkage.
1142 * semantics.c (finish_qualified_id_expr): Use it.
1143 (finish_id_expression): Likewise.
1146 * semantics.c (finish_id_expression): Do not add "this->" to
1147 static member functions.
1149 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
1152 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
1154 * class.c (struct count_depth_data): Remove.
1155 (dfs_depth_post, dfs_depth_q): Remove.
1156 (find_final_overrider): Use number of vbase classes as depth
1159 * cp-tree.h (types_overlap_p): Remove.
1160 * search.c (struct overlap_info): Remove.
1161 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
1163 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
1164 (get_template_base_recursive): Remove. Replace with ...
1165 (get_template_base_r): ... this.
1166 (struct get_template_base_data_s): New.
1167 (get_template_base): Use get_template_base_r via dfs_walk. Always
1168 return NULL on failure.
1169 (unify): Remove error_mark_node check from get_template_base result.
1171 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
1173 * parser.c (cp_parser_expression_stack): Clarify why it is
1174 an array of NUM_PREC_VALUES elements.
1175 (cp_parser_binary_expression): Clarify why we do not need to
1176 handle stack overflow.
1178 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
1181 * search.c (lookup_field_queue_p): Correct check for hidden base.
1183 * search.c (bfs_walk): Remove.
1184 (lookup_member): Use dfs_walk_real.
1185 (dfs_walk_real): Move and adjust documentation from bfs_walk.
1187 2004-09-23 Zack Weinberg <zack@codesourcery.com>
1189 * decl.c (grokfndecl): If ::main is found not to return int,
1190 correct it after issuing a diagnostic.
1191 (grokdeclarator): If the incoming type was error_mark_node, do
1192 not complain about declaring something with no type.
1193 (start_function): Change check for ::main not returning int to
1194 an assertion, as grokfndecl now catches this when the user did it.
1195 * init.c (perform_member_init, sort_mem_initializers)
1196 (emit_mem_initializers): Make most diagnostics be issued on
1197 the line of current_function_decl, not whatever the current
1199 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
1200 definition and declaration with #ifdef ENABLE_CHECKING.
1201 Avoid unnecessary use of fprintf.
1202 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
1203 definitions to avoid warnings.
1204 (cp_lexer_new_main): Add assertion that first token is not a
1206 (cp_lexer_new_from_token_array): Fold into ...
1207 (cp_lexer_new_from_tokens): ... here. Add assertion that
1208 first token is not a padding token.
1209 (cp_lexer_set_source_position_from_token): Move nearer to callers.
1210 Remove unused lexer argument.
1211 (cp_lexer_peek_token): Just print debugging report (if enabled)
1212 and return lexer->next_token.
1213 (cp_lexer_skip_purged_tokens): Delete.
1214 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
1215 inline, simplify bodies.
1216 (cp_lexer_peek_nth_token): Add debugging report a la
1217 cp_lexer_peek_token.
1218 (cp_lexer_consume_token): Correct commentary. Advance over
1219 purged tokens here. Set current source position here, from
1220 token to be returned. Avoid unnecessary use of fprintf.
1221 (cp_lexer_purge_token): Advance next_token pointer over this and
1222 subsequent purged tokens.
1223 (cp_parser_error): Adjust source position to that of the
1225 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
1226 (cp_parser_string_literal): Remove some excessive cleverness.
1227 (cp_parser_enum_specifier): Call start_enum before consuming
1229 (cp_parser_member_declaration): Make the "extra semicolon"
1230 diagnostic consistently-worded with the other place this is
1231 diagnosed. Explicitly set the diagnostic location to the
1232 location of the offending semicolon.
1233 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
1234 in diagnostics. Do not use cp_parser_require. Set location
1235 of diagnostics about improper use of '>>' to location of
1237 (cp_parser_late_parsing_for_member):
1238 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
1239 (cp_parser_late_parsing_default_args): Likewise. Manually
1240 move some logic outside the loop.
1242 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
1245 * cvt.c (cp_convert_to_pointer): Return early when the type is
1248 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
1252 * decl.c (grokfndecl): Add new argument "attrlist", use it
1253 to call cplus_decl_attributes.
1254 (start_function): Remove call to cplus_decl_attributes.
1255 * cvt.c (ocp_convert): Add support to use type conversion
1256 function to vector type.
1257 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
1260 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
1264 * parser.c (cp_parser_token_tree_map_node,
1265 cp_parser_pm_expression, cp_parser_additive_expression,
1266 cp_parser_multiplicative_expression, cp_parser_shift_expression,
1267 cp_parser_relational_expression, cp_parser_equality_expression,
1268 cp_parser_and_expression, cp_parser_exclusive_or_expression,
1269 cp_parser_inclusive_or_expression,
1270 cp_parser_logical_and_expression,
1271 cp_parser_logical_or_expression): Removed.
1272 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
1273 binops, binops_by_token): New.
1274 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
1275 (cp_parser_new): Initialize binops_by_token.
1276 (cp_parser_binary_expression): Rewritten.
1279 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
1281 * parser.c: Fix a comment typo.
1283 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
1286 * decl.c (xref_basetypes): Look through typedefs before checking
1289 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1291 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
1292 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
1293 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
1294 (init_rtti_processing): Initialize it to something realistic.
1295 (get_tinfo_decl): Adjust pushing the new decl.
1297 * cp-tree.h (struct lang_type_class): Remove marked flags, add
1298 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
1299 (TYPE_MARKED_P): New.
1300 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
1301 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1302 CLEAR_CLASSTYPE_MARKED_N): Remove.
1303 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
1304 CLEAR_CLASSTYPE_MARKED_*): Remove.
1305 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
1306 shaped and repeated base properties.
1307 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
1308 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
1309 class_hint_flags): Remove.
1310 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
1311 CLASSTYPE_DIAMOND_SHAPED_P.
1313 2004-09-21 Ziemowit Laski <zlaski@apple.com>
1315 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
1317 (objcp_tsubst_copy_and_build): Reformat function signature.
1318 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
1319 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
1321 2004-09-21 Zack Weinberg <zack@codesourcery.com>
1323 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
1324 Don't handle CPP_PRAGMA tokens specially.
1325 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
1326 purge the token; do clear token->value after processing. Add
1327 assertion at beginning that token->value is nonzero.
1328 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
1329 CPP_PRAGMA as a full statement or declaration in its own right.
1331 2004-09-21 Matt Austern <austern@apple.com>
1334 * decl.c (grokvardecl): Accept declarations of global variables
1335 using anonymous types.
1337 2004-09-21 Roger Sayle <roger@eyesopen.com>
1340 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
1341 if either operand has side-effects.
1342 * typeck.c (rationalize_conditional_expr): Assert that neither
1343 operand of MIN_EXPR or MAX_EXPR has side-effects.
1344 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
1345 Check that the "lhs" is a valid lvalue, i.e. that neither operand
1346 of a MIN_EXPR or MAX_EXPR has a side-effect.
1348 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
1350 * cp-tree.h (struct lang_type_header): Remove
1351 uses_multiple_inheritance field.
1352 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
1353 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
1354 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
1355 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
1356 (TYPE_CONTAINS_VPTR_P): Likewise.
1357 * call.c (add_template_candidate_real): Use
1358 CLASSTYPE_VBASECLASSES.
1359 (build_special_member_call): Likewise.
1360 * class.c (finish_struct_bits): Remove
1361 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
1363 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1364 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
1366 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
1367 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
1369 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
1370 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1372 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
1373 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1374 * init.c (expand_member, push_base_cleanups): Likewise.
1375 * pt.c (instantiate_class_template): Remove
1376 TYPE_USES_MULTIPLE_INHERITANCE,
1377 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1379 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
1381 * typeck2.c (process_init_constructor): Replace some sorrys with
1384 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
1386 * decl.c (reshape_init_array): Initialize max_index_cst to fix
1389 2004-09-20 Mark Mitchell <mark@codesourcery.com>
1392 * pt.c (tsubst): Fix parentheses to accomodate emacs.
1393 (tsubst_baselink): If we get a single function, mark it as used.
1395 2004-09-20 Matt Austern <austern@apple.com>
1396 Zack Weinberg <zack@codesourcery.com>
1398 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
1399 Apply lbasename to input_filename before passing to get_fileinfo.
1400 * semantics.c (begin_class_definition): Likewise.
1401 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
1402 correct filename. Rename variables to be less confusing.
1403 (handle_pragma_implementation): Likewise. Disable "appears
1404 after file is included" diagnostic.
1406 * parser.c (struct cp_token): Add in_system_header fiag.
1407 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
1408 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
1409 (CPP_NONE, cp_lexer_read_token): Delete.
1410 (struct cp_lexer): Remove first_token, string_tokens,
1411 main_lexer_p fields. Clarify comments.
1412 (struct cp_token_cache): Now just a pair of pointers.
1413 (CP_LEXER_BUFFER_SIZE): New #define.
1414 (CPP_PURGED): New fake token type.
1415 (cp_lexer_new_from_token_array, cp_lexer_destroy)
1416 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
1417 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
1419 (cp_lexer_new_from_tokens): Now a simple wrapper around
1420 cp_lexer_new_from_token_array.
1421 (cp_lexer_set_source_position_from_token): Also update
1423 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
1425 (cp_lexer_token_difference): Dont handle wrapping round.
1426 (cp_lexer_new_main): Enable pragma deferral and raw strings,
1427 read the entire translation unit through c_lex_with_flags into
1428 this lexer's buffer, then turn raw strings back off again.
1429 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
1430 (cp_lexer_get_preprocessor_token): No need to handle not being
1431 the main lexer. Set token->in_system_header too.
1432 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
1433 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
1434 (cp_lexer_peek_nth_token): Likewise.
1435 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
1436 the other tokens down.
1437 (cp_lexer_purge_tokens_after): Likewise.
1438 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
1439 about there being no tokens.
1440 (cp_lexer_print_token): Revise to give useful information on
1442 (struct cp_parser): Add field translate_strings_p.
1443 (cp_parser_new): Initialize it.
1444 (cp_parser_translation_unit): Destroy the lexer when done.
1445 (cp_parser_parameter_declaration): Restructure saving of
1447 (cp_parser_save_member_function_body): Likewise.
1448 (cp_parser_check_for_invalid_template_id)
1449 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
1450 Adjust calls to cp_lexer_advance_token.
1451 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
1452 No need to fiddle c_lex_string_translate.
1453 (cp_parser_primary_expression, cp_parser_linkage_specification)
1454 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
1455 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
1456 Use cp_parser_string_literal.
1457 (cp_parser_attribute_list): Save and restore
1458 parser->translate_strings_p, not c_lex_string_translate.
1459 (cp_parser_cache_group): Delete.
1460 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
1461 not take a cache argument.
1463 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1466 * decl.c (reshape_init): Extract array handling into...
1467 (reshape_init_array): New function. Use integers instead of trees
1468 for indices. Handle out-of-range designated initializers.
1470 2004-09-20 Steven Bosscher <stevenb@suse.de>
1472 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
1475 2004-09-19 Mark Mitchell <mark@codesourcery.com>
1477 * decl2.c (determine_visibility): Allow class visibility
1478 directives to override targetm.cxx.export_class_data.
1480 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
1482 * call.c, semantics.c: Follow spelling conventions.
1483 * class.c: Fix a comment typo.
1485 2004-09-16 Geoffrey Keating <geoffk@apple.com>
1488 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1489 (handle_pragma_implementation): Likewise.
1491 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1492 Zack Weinberg <zack@codesourcery.com>
1494 * cp-tree.def: Use tree_code_class enumeration constants
1495 instead of code letters.
1496 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
1497 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
1498 Update for new tree-class enumeration constants.
1500 2004-09-16 Mark Mitchell <mark@codesourcery.com>
1503 * parser.c (cp_parser_simple_declaration): Commit to tentative
1504 parses after seeing a decl-specifier.
1505 (cp_parser_simple_declaration): Eliminate spurious message.
1506 (cp_parser_init_declarator): Adjust error message.
1509 * lex.c (unqualified_name_lookup_error): Mark the dummy
1510 declaration as used.
1513 * parser.c (cp_parser_nested_name_specifier): Do not resolve
1514 typename types if the user explicitly said "typename".
1516 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
1518 * error.c (dump_decl): Make sure there is lang_specific info before
1519 checking for DTOR and CTOR decls.
1521 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1523 * class.c (copy_virtuals): Remove.
1524 (build_primary_vtable): Use copy_list directly.
1525 (build_secondary_vtable): Likewise.
1526 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
1527 (create_vtable_ptr): Likewise.
1529 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1531 * search.c: Follow spelling conventions.
1533 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1535 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
1537 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
1539 * call.c (build_new_method_call): Don't confirm a pure virtual is
1540 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
1541 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
1542 (fixup_inline_methods, finish_struct): Likewise.
1543 * decl.c (finish_method): Likewise.
1544 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
1545 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
1546 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
1547 vector to avoid repeating the list in error messages.
1549 2004-09-15 Mark Mitchell <mark@codesourcery.com>
1551 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
1552 * cp-tree.h (cxx_comdat_group): Declare.
1553 * decl.c (cxx_comdat_group): New function.
1555 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
1557 * search.c (get_pure_virtuals): Remove unused variables.
1559 * cp-tree.h (struct lang_decl_flags): Remove
1560 needs_final_overrider.
1561 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
1562 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
1563 * class.c (finish_struct_bits): Correct comment about
1564 CLASSTYPE_PURE_VIRTUALS.
1565 * search.c (get_pure_virtuals): Remove useless loop.
1567 2004-09-14 Mark Mitchell <mark@codesourcery.com>
1570 * mangle.c (partially_mangled_name): New variable.
1571 (partially_mangled_name_len): Likewise.
1572 (save_partially_mangled_name): New function.
1573 (restore_partially_mangled_name): Likewise.
1574 (write_encoding): Save and restore partially mangled names around
1575 calls to get_mostly_instantiated_function_type.
1576 (write_unqualified_name): Likewise.
1578 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
1580 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
1582 2004-09-13 Mark Mitchell <mark@codesourcery.com>
1585 * parser.c (cp_parser_id_expression): Correct value for
1587 (cp_parser_nested_name_specifier_opt): Look through typenames as
1589 (cp_parser_template_name): Honor check_dependency_p.
1592 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
1596 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
1599 2004-09-12 Richard Henderson <rth@redhat.com>
1602 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
1603 * typeck.c (condition_conversion): Likewise.
1605 2004-09-11 Richard Henderson <rth@redhat.com>
1608 * pt.c (cur_stmt_expr): Move from tsubst_expr.
1609 (tsubst_expr) <case STMT_EXPR>: Move ...
1610 (tsubst_copy_and_build): ... here.
1612 2004-09-10 Zack Weinberg <zack@codesourcery.com>
1614 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
1615 comment explaining them moved to c-common.h.
1616 * lex.c (interface_only, interface_unknown, extract_interface_info):
1618 (cxx_finish): Don't reset interface_unknown.
1619 (handle_pragma_interface): Don't set interface_only and
1620 interface_unknown; just the like-named fields in finfo.
1621 (handle_pragma_implementation): Adjust comment.
1622 * decl2.c (cp_finish_file): Don't reset interface_only and
1624 * method.c (synthesize_method): Don't reset interface_unknown or
1625 call extract_interface_info.
1626 * pt.c (pop_tinst_level): Don't call extract_interface_info.
1627 * decl.c (start_cleanup_fn): Don't save or restore interface_only
1628 and interface_unknown.
1629 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
1630 and use the result instead of the interface_only/interface_unknown
1632 (start_preparsed_function): Likewise.
1633 * lex.c (cxx_make_type): Likewise.
1634 * semantics.c (begin_class_definition): Likewise.
1635 (expand_body): Don't call extract_interface_info.
1637 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1639 * decl.c (objc_mark_locals_volatile): Make description of
1640 routine more descriptive; only mark VAR_DECLs at each
1643 2004-09-10 Richard Henderson <rth@redhat.com>
1646 * call.c (build_vfield_ref): Move...
1647 * class.c (build_vfield_ref): ... here. Convert datum to the
1648 primary base containing the vptr.
1649 (make_new_vtable): Simplify build_primary_vtable arguments.
1650 (finish_struct_1): Do not duplicate TYPE_VFIELD.
1651 * typeck.c (build_class_member_access_expr): Don't warn for
1652 null object access to base fields.
1654 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1656 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
1657 New functions, to be called from ObjC++.
1659 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
1661 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
1662 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
1665 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1667 * typeck.c (build_c_cast): Preserve the cast if casting
1668 to and from an Objective-C type.
1670 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1672 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
1673 * typeck.c: Include c-common.h.
1674 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
1675 return the result if nonnegative.
1677 2004-09-09 Zack Weinberg <zack@codesourcery.com>
1679 * decl2.c (import_export_class)
1680 * lex.c (handle_pragma_interface):
1681 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
1683 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1685 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
1686 * semantics.c: Include c-common.h.
1687 (finish_compound_stmt): Call objc_clear_super_receiver().
1689 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1691 * cp-tree.h (do_poplevel): New prototype.
1692 * semantics.c (do_poplevel): Make externally visible.
1694 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
1696 * cp-tree.h (tree_pair_s): Define a GC'd vector.
1697 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
1698 * semantics.c (deferred_access): Likewise.
1700 2004-09-06 Daniel Jacobowitz <dan@debian.org>
1702 * semantics.c (expand_body): Assert that we are not nested.
1704 2004-09-06 Zack Weinberg <zack@codesourcery.com>
1706 * decl.c (build_enumerator): Use add_double and int_fits_type_p
1707 instead of cp_build_binary_op, to avoid creating short-lived trees.
1708 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
1709 lookahead instead of backtracking. Move some code to avoid a
1711 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
1712 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1713 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
1714 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1716 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1718 * decl.c (grok_declarator): Remove a redundant semicolon.
1720 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
1721 Correct comments describing function parameters.
1723 2004-09-03 Matt Austern <austern@apple.com>
1724 Compile speed improvement.
1725 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
1726 Otherwise define a stub macro that expands to nothing.
1727 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
1728 define a stub macro that expands to 0.
1729 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
1730 (cp_lexer_stop_debugging): Likewise.
1731 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
1732 define a stub macro that expands to NULL.
1733 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
1734 (cp_lexer_new_from_tokens): Likewise.
1736 2004-09-03 Jan Hubicka <jh@suse.cz>
1738 * decl.c (finish_function): Clean out pointers we no longer need.
1740 2004-09-03 Jan Beulich <jbeulich@novell.com>
1742 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
1745 2004-09-02 Paul Brook <paul@codesourcery.com>
1747 * decl2.c (determine_visibility): Only check data visibility
1750 2004-08-31 Mark Mitchell <mark@codesourcery.com>
1752 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
1753 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
1754 * decl2.c (determine_visibility): Honor
1755 TARGET_CXX_EXPORT_CLASS_DATA.
1757 * class.c (key_method): Rename to ...
1758 (determine_key_method): ... this.
1759 (finish_struct_1): Adjust accordingly.
1760 * cp-tree.h (key_method): Declare.
1761 * decl2.c (maybe_emit_vtables): Determine the key method here if
1762 it has not already been done.
1764 2004-08-31 Ziemowit Laski <zlaski@apple.com>
1766 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
1767 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
1768 (cp/cp-decl.c): Do not depend on gtype-cp.h.
1769 (cp/cp-objcp-common.o): New target.
1770 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
1771 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
1772 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
1773 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
1775 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
1776 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
1777 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
1778 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
1779 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
1780 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
1781 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
1782 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
1783 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
1784 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1785 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1786 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
1787 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
1788 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
1789 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
1790 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
1791 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
1792 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
1793 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
1794 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
1795 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
1796 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
1797 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
1798 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
1799 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
1800 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
1801 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
1802 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1803 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
1804 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
1805 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
1806 hooks to cp-objcp-common.h.
1807 (finish_file): New function.
1808 * cp-objcp-common.c: New file.
1809 * cp-objcp-common.h: New file.
1810 * cp-tree.h (cp_finish_file): New prototype.
1811 * decl.c: Do not include gtype-cp.h.
1812 * decl2.c (finish_file): Rename to cp_finish_file.
1814 2004-08-31 Richard Henderson <rth@redhat.com>
1817 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
1818 (tsubst_copy_and_build): ... here.
1820 2004-08-30 Mark Mitchell <mark@codesourcery.com>
1822 * cp-tree.h (initialize_artificial_var): Declare.
1823 * decl.c (initialize_artifical_var): New function.
1824 * class.c (initialize_array): Remove.
1825 (initialize_vtable): Use initialize_artificial_var.
1826 (build_vtt): Likewise.
1827 (build_ctor_vtbl_group): Likewise.
1829 2004-08-30 Richard Henderson <rth@redhat.com>
1831 * class.c (build_base_path): Use build_address directly.
1832 * typeck.c (build_unary_op): Don't lower &a.b to pointer
1833 arithmetic directly.
1834 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
1835 means !initializer_constant_valid_p.
1837 2004-08-30 Richard Henderson <rth@redhat.com>
1839 * class.c (fixed_type_or_null): Use get_base_address before
1840 assuming an ADDR_EXPR is non-null.
1842 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1844 * name-lookup.c (pop_binding, pushdecl,
1845 set_identifier_type_value_with_scope, push_overloaded_decl,
1846 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
1847 * parser.c (cp_parser_diagnose_invalid_type_name,
1848 cp_parser_postfix_expression, cp_parser_unary_expression,
1849 cp_parser_check_declarator_template_para): Likewise.
1850 * pt.c (push_inline_template_parms_recursive,
1851 check_explicit_specialization, convert_nontype_argument,
1852 coerce_template_template_parms, uses_template_parms,
1853 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
1854 tsubst_expr, instantiate_template,
1855 maybe_adjust_types_for_deduction, type_unification_real,
1856 resolve_overloaded_unification, template_decl_level,
1857 type_dependent_expression_p): Likewise.
1858 * search.c (lookup_base_r): Likewise.
1859 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
1860 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
1861 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
1862 * typeck.c (common_type, get_member_function_from_ptrfunc,
1863 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
1864 * typeck2.c (cxx_incomplete_type_diagnostic,
1865 split_nonconstant_init_1, store_init_value,
1866 process_init_constructor): Likewise.
1868 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1870 * call.c (check_dtor_name): Replace abort with gcc_assert or
1872 (build_call, add_builtin_candidate, build_new_op,
1873 convert_like_real, build_over_call, in_charge_arg_for_name,
1874 source_type, joust): Likewise.
1875 * class.c (build_simple_base_path, get_vcall_index,
1876 finish_struct_1, instantiate_type, get_enclosing_class,
1877 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
1878 * cp-gimplify.c (cp_genericize): Likewise.
1879 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
1880 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
1881 * decl.c (poplevel, make_unbound_class_template, reshape_init,
1882 check_special_function_return_type, grokdeclarator,
1883 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
1884 finish_function): Likewise.
1885 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
1886 * error.c (dump_global_iord, dump_decl, dump_template_decl,
1887 language_to_string): Likewise.
1888 * except.c (choose_personality_routine): Likewise.
1889 * friend.c (do_friend): Likewise.
1890 * g++spec.c (lang_specific_driver): Likewise.
1891 * init.c (build_zero_init, expand_default_init, build_new_1,
1892 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
1893 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
1894 * mangle.c (add_substitution, write_unscoped_name,
1895 write_template_prefix, write_identifier,
1896 write_special_name_destructor, write_type, write_builtin_type,
1897 write_expression, write_template_param,
1898 write_java_integer_type_codes): Likewise.
1899 * method.c (implicitly_declare_fn): Likewise.
1901 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1903 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
1904 (BINFO_INDIRECT_PRIMARY_P): Remove.
1905 * class.c (determine_primary_base): Rename to ...
1906 (determine_primary_bases): ... here. Set all primary bases.
1907 (set_primary_base): Remove.
1908 (mark_primary_bases): Remove.
1909 (build_simple_base_path, walk_subobject_offsets,
1910 propagate_binfo_offsets, end_of_class): Adjust.
1911 (layout_class_type): Rename determine_primary_base call.
1912 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
1914 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
1915 build_rtti_vtbl_entries): Adjust.
1916 * init.c (build_vtbl_address): Adjust.
1918 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
1920 2004-08-28 Ziemowit Laski <zlaski@apple.com>
1922 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
1923 CXX_AND_OBJCXX_OBJS.
1924 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
1925 separately on the link line.
1927 2004-08-28 Jason Merrill <jason@redhat.com>
1929 * decl.c (expand_static_init): Avoid bogus warnings.
1931 2004-08-27 Jason Merrill <jason@redhat.com>
1934 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
1937 * decl.c (expand_static_init): Use thread-safety API.
1938 (register_dtor_fn): Return the call, don't expand it.
1939 * tree.c (add_stmt_to_compound): New fn.
1940 (stabilize_call): Use it.
1942 2004-08-27 Richard Henderson <rth@redhat.com>
1944 * cp-tree.def (OFFSETOF_EXPR): New.
1945 * parser.c (cp_parser_builtin_offsetof): Either built an
1946 OFFSETOF_EXPR, or call fold_offsetof immediately.
1947 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
1949 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
1951 * call.c (validate_conversion_obstack): Replace
1952 my_friendly_assert with gcc_assert or gcc_unreachable.
1953 (direct_reference_binding, merge_conversion_sequences,
1954 build_user_type_conversion_1, perform_overload_resolution,
1955 build_op_delete_call, enforce_access, call_builtin_trap,
1956 build_over_call, build_special_member_call, build_new_method_call,
1957 initialize_reference): Likewise.
1958 * class.c (build_base_path, build_primary_vtable, alter_access,
1959 check_bases, update_vtable_entry_for_fn, layout_empty_base,
1960 clone_function_decl, adjust_clone_args,
1961 type_requires_array_cookie, include_empty_classes,
1962 finish_struct_1, resolve_address_of_overloaded_function,
1963 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
1964 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1965 accumulate_vtbl_inits, build_vtbl_initializer,
1966 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
1967 * cvt.c (build_up_reference, convert_to_reference): Likewise.
1968 * decl.c (poplevel, duplicate_decls, make_typename_type,
1969 cxx_init_decl_processing, reshape_init, check_initializer,
1970 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
1971 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
1972 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
1973 xref_basetypes, start_preparsed_function, save_function_data,
1974 finish_function, finish_method, maybe_register_incomplete_var,
1975 complete_vars): Likewise.
1976 * decl2.c (grok_array_decl, check_member_template,
1977 check_classfn, finish_static_data_member_decl, coerce_new_type,
1978 coerce_delete_type, import_export_class, decl_needed_p,
1979 determine_visibility, import_export_decl, build_cleanup,
1980 start_static_initialization_or_destructi, do_static_destruction,
1981 prune_vars_needing_no_initialization,
1982 build_offset_ref_call_from_tree): Likewise.
1983 * error.c (dump_decl, dump_expr): Likewise.
1984 * init.c (finish_init_stmts, build_zero_init,
1985 expand_virtual_init, expand_default_init, expand_aggr_init_1,
1986 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
1988 * mangle.c (write_method_parms, write_template_args,
1989 write_expression, write_template_arg): Likewise.
1990 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
1991 * name-lookup.c (pop_binding, begin_scope, leave_scope,
1992 resume_scope, push_using_decl, validate_nonmember_using_decl,
1993 is_ancestor, poplevel_class, set_inherited_value_binding_p,
1994 push_class_level_binding, do_class_using_decl, push_namespace,
1995 pop_namespace, add_using_namespace, ambiguous_decl,
1996 lookup_namespace_name, lookup_type_current_level,
1997 maybe_process_template_type_declaration): Likewise.
1998 * parser.c (cp_lexer_peek_nth_token,
1999 cp_parser_parse_and_diagnose_invalid_typ,
2000 cp_parser_translation_unit, cp_parser_template_id,
2001 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
2002 * pt.c (push_access_scope, finish_member_template_decl,
2003 push_inline_template_parms_recursive, add_outermost_template_args,
2004 get_innermost_template_args, begin_explicit_instantiation,
2005 end_explicit_instantiation, retrieve_specialization,
2006 is_specialization_of, is_specialization_of_friend,
2007 register_specialization, check_explicit_specialization,
2008 comp_template_parms, process_template_parm,
2009 process_partial_specialization, convert_nontype_argument,
2010 coerce_template_template_parms, coerce_template_parms,
2011 mangle_class_name_for_template, lookup_template_function,
2012 lookup_template_class, instantiate_class_template, tsubst_decl,
2013 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
2014 instantiate_template, fn_type_unification, type_unification_real,
2015 get_template_base, regenerate_decl_from_template,
2016 template_for_substitution, instantiate_decl,
2017 get_mostly_instantiated_function_type, dependent_scope_ref_p,
2018 value_dependent_expression_p, resolve_typename_type): Likewise.
2019 * repo.c (repo_emit_p): Likewise.
2020 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
2021 create_tinfo_types, emit_tinfo_decl): Likewise.
2022 * search.c (lookup_base_r, lookup_base, lookup_field_1,
2023 dfs_access_in_type, build_baselink, lookup_member,
2024 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
2025 * semantics.c (perform_or_defer_access_check,
2026 finish_non_static_data_member, finish_stmt_expr_expr,
2027 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
2028 finish_template_template_parm, finish_member_declaration,
2029 emit_associated_thunks): Likewise.
2030 * tree.c (build_target_expr_with_type, force_target_expr,
2031 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
2032 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
2033 cxx_sizeof_or_alignof_type, perform_integral_promotions,
2034 build_class_member_access_expr, finish_class_member_access_expr,
2035 build_ptrmemfunc_access_expr, build_unary_op,
2036 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
2037 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
2038 * typeck2.c (complete_type_check_abstract,
2039 abstract_virtuals_error, process_init_constructor,
2040 add_exception_specifier): Likewise.
2042 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
2044 * class.c (build_vtbl_initializer): Use ssize_int.
2045 * decl.c (complete_array_type): Likewise.
2046 * method.c (finish_thunk): Likewise.
2047 * search.c (get_dynamic_base_type): Likewise.
2049 2004-08-26 Richard Henderson <rth@redhat.com>
2051 * cp-tree.h (DECL_FIELD_IS_BASE): New.
2052 * class.c (build_base_field): Set it.
2053 (build_simple_base_path): Use it.
2054 (fixed_type_or_null): Don't consider base fields definitive.
2056 2004-08-25 Roger Sayle <roger@eyesopen.com>
2059 PR tree-optimization/16372
2060 * decl.c (finish_enum): Make the precision of the enumerated type
2061 the same width as the underlying integer type.
2063 2004-08-25 Mark Mitchell <mark@codesourcery.com>
2066 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
2069 * mangle.c (get_identifier_nocopy): Add cast.
2071 * cp-tree.h (mangle_type): Remove.
2072 * mangle.c (globals): GTY it.
2073 (mangle_obstack): New variable.
2074 (name_obstack): Likewise.
2075 (name_base): Likewise.
2076 (write_char): Adjust accordingly.
2077 (write_chars): Likewise.
2078 (write_string): Likewise.
2079 (start_mangling): Initialize G.substitutions only one. Add
2081 (finish_mangling): Use VARRAY_CLEAR to reclaim
2082 storage in G.substitutions. Use obstack_finish.
2083 (init_mangle): Adjust for changes to variable names above.
2084 Initialize G.substitutions.
2085 (mangle_decl_string): Adjust call to start_mangling.
2086 (get_identifier_nocopy): New function.
2087 (mangle_decl): Use it.
2088 (mangle_type_string): Adjust call to start_mangling.
2089 (mangle_special_for_type): Likewise.
2090 (mangle_vtt_for_type): Likewise.
2091 (mangle_ctor_vtbl_for_type): Likewise.
2092 (mangle_thunk): Likewise.
2093 (mangle_guard_variable): Likewise.
2094 (mangle_ref_init_variable): Likewise.
2096 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2099 * pt.c (redeclare_class_template): Check the type of non-type and
2100 template template parameter.
2102 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2104 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
2105 (build_user_type_conversion_1, convert_like_real,
2106 build_java_interface_fn_ref, build_special_member_call): Likewise.
2107 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
2108 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2109 * cvt.c (cp_convert_to_pointer): Likewise.
2110 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2111 * decl2.c (start_static_initialization_or_destruction,
2112 generate_ctor_or_dtor_function): Likewise.
2113 * except.c (build_throw): Likewise.
2114 * mangle.c (write_integer_cst): Likewise.
2115 * method.c (finish_thunk): Likewise.
2116 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2117 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2118 get_pseudo_ti_init): Likewise.
2119 * search.c (get_dynamic_cast_base_type): Likewise.
2121 2004-08-25 Zack Weinberg <zack@codesourcery.com>
2123 * class.c, search.c: Remove references to DWARF_DEBUG.
2125 2004-08-25 Adam Nemet <anemet@lnxw.com>
2127 * repo.c (extract_string): Reset backquote after one character.
2128 (get_base_filename): Fix indentation.
2130 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2132 * decl.c (cxx_init_decl_processing): Adjust
2133 build_common_tree_nodes call.
2135 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2138 * (is_subobject_of_p): Resurrect & optimize.
2139 (lookup_field_r): Use it.
2141 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2144 * search.c (friend_accessible_p): Increment processing_template_decl
2145 when deal with TEMPLATE_DECL of SCOPE.
2147 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2150 * semantics.c (check_accessibility_of_qualified_id): Defer check
2151 if qualifying_type is a template parameter.
2153 2004-08-23 Mark Mitchell <mark@codesourcery.com>
2156 * pt.c (instantiate_decl): Do not try to apply
2157 DECL_DECLARED_INLINED_P to a VAR_DECL.
2159 * search.c (build_baselink): Fix typo in comment.
2161 2004-08-22 Andrew Pinski <apinski@apple.com>
2164 2004-08-22 Andrew Pinski <apinski@apple.com>
2166 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2167 expression is not constant.
2169 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
2171 * name-lookup.c (pushdecl): Rename build_type_copy call.
2172 * tree.c (cp_build_qualified_type_real,
2173 build_exception_variant, handle_java_interface_attribute): Likewise.
2175 2004-08-22 Andrew Pinski <apinski@apple.com>
2178 * typeck.c (build_unary_op): Use &a.b if the folded lowered
2179 expression is not constant.
2181 2004-08-20 Mark Mitchell <mark@codesourcery.com>
2184 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
2186 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
2189 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
2192 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2194 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
2195 before calling comp_template_args.
2197 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
2199 * class.c (build_vtbl_initializer): Use build_int_cst for
2200 negative size types.
2201 * decl.c (complete_array_type): Likewise.
2202 * method.c (finish_thunk): Likewise.
2204 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
2206 * tree.c: Remove unused mark_local_for_remap_r.
2208 2004-08-19 Eric Christopher <echristo@redhat.com>
2210 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
2211 * tree.c (cxx_unsave_expr_now): Delete.
2212 (cp_unsave_r): Ditto.
2214 2004-08-19 Mark Mitchell <mark@codesourcery.com>
2217 * pt.c (push_template_decl_real): Disallow template allocation
2218 functions with fewer than two parameters.
2220 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2222 * cp-tree.h (build_shared_int_cst): Remove.
2223 * tree.c (shared_int_cache): Remove.
2224 (build_shared_int_cst): Remove.
2225 * class.c (finish_struct_1): Use build_int_cst.
2227 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2229 * decl.c (finish_enum): Do not copy value node early, copy
2231 * lex.c (cxx_init): Force null_node to be unique.
2233 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
2236 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
2237 from input for MODOP_EXPR.
2239 2004-08-18 Mark Mitchell <mark@codesourcery.com>
2241 * pt.c (dependent_template_p): Fix typo in commment.
2244 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
2247 2004-08-17 Mark Mitchell <mark@codesourcery.com>
2250 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
2251 arguments have the same type as the corresponding parameter.
2254 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
2255 is set use it for diagnostic purposes.
2256 (cp_parser_pseudo_destructor_name): Remove special-case error
2260 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
2263 * cp-tree.h (qualified_name_lookup_error): Add parameter.
2264 * name-lookup.c (do_class_using_decl): Restrict set of entities
2265 passed to cp_emit_debug_info_for_using more carefully.
2266 (lookup_qualified_name): Allow lookup_member to return sets of
2268 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
2269 (cp_parser_primary_expression): Handle ambiguous lookups.
2270 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
2271 (cp_parser_template_argument): Likewise.
2272 (cp_parser_elaborate_type_specifier): Likewise.
2273 (cp_parser_namespace_name): Likewise.
2274 (cp_parser_class_name): Likewise.
2275 (cp_parser_lookup_name_simple): Likewise.
2276 * pt.c (tsubst_qualified_id): Handle ambiguous results.
2277 (tsubst_expr): Likewise.
2278 * semantics.c (qualified_name_lookup_error): Add decl paramter.
2279 For ambiguous lookups, print candidates.
2281 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2284 * pt.c (instantiate_pending_templates): Add int parameter. Don't
2286 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
2287 * decl2.c (finish_file): Adjust call to
2288 instantiate_pending_templates.
2290 2004-08-15 Roger Sayle <roger@eyesopen.com>
2292 * call.c (build_vfield_ref, build_call, build_conditional_expr,
2293 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
2294 build_java_interface_fn_ref, build_special_member_call,
2295 build_new_method_call, initialize_reference): Replace calls to
2296 build with calls to buildN.
2297 * class.c (build_base_path, convert_to_base_statically,
2298 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
2299 build_vtbl_initializer): Likewise.
2300 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
2301 gimplify_if_stmt, cp_genericize_r): Likewise.
2302 * cvt.c (convert_to_void): Likewise.
2303 * decl.c (check_initializer, finish_constructor_body,
2304 finish_destructor_body): Likewise.
2305 * error.c (dump_expr): Likewise.
2306 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
2308 * init.c (perform_member_init, expand_virtual_init,
2309 expand_cleanup_for_base, build_init, expand_default_init,
2310 build_offset_ref, decl_constant_value, build_new, build_new_1,
2311 build_vec_delete_1, build_vec_init, build_delete,
2312 push_base_cleanups, build_vec_delete): Likewise.
2313 * mangle.c (write_integer_cst): Likewise.
2314 * method.c (thunk_adjust, do_build_copy_constructor,
2315 do_build_assign_ref): Likewise.
2316 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
2317 unify, build_non_dependent_expr): Likewise.
2318 * rtti.c (build_headof, build_typeid, ifnonnull,
2319 build_dyanmic_cast_1, tinfo_base_init): Likewise.
2320 * semantics.c (begin_compound_stmt, finish_call_expr,
2321 finish_pseudo_destructor_expr, finish_id_expression,
2322 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
2323 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
2324 array_type_nelts_total, stabilize_call): Likewise.
2325 * typeck.c (decay_conversion, build_class_member_access_expr,
2326 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
2327 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
2328 build_x_unary_op, build_unary_op, unary_complex_lvalue,
2329 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
2330 check_return_expr): Likewise.
2331 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
2332 split_nonconstant_init, store_init_value, build_m_component_ref):
2335 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2337 * call.c (convert_class_to_reference,
2338 build_user_type_conversion_1, convert_like_real,
2339 build_java_interface_fn_ref, build_special_member_call): Use
2341 * class.c (build_vtbl_initializer): Likewise.
2342 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2343 * cvt.c (cp_convert_to_pointer): Likewise.
2344 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2345 * decl2.c (start_static_initialization_or_destruction,
2346 generate_ctor_or_dtor_function): Likewise.
2347 * except.c (build_throw): Likewise.
2348 * lex.c (cxx_init): Likewise.
2349 * mangle.c (write_integer_cst): Likewise.
2350 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2351 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2352 get_pseudo_ti_init): Likewise.
2353 * search.c (get_dynamic_cast_base_type): Likewise.
2354 * tree.c (build_shared_int_cst): Likewise.
2356 2004-08-12 Mark Mitchell <mark@codesourcery.com>
2359 * class.c (count_depth_data): New type.
2360 (dfs_depth_post): New function.
2361 (dfs_depth_q): Likewise.
2362 (find_final_overrider_data_s): Change type of vpath.
2364 (dfs_find_final_overrider_1): New function.
2365 (dfs_find_final_overrider): Use it.
2366 (dfs_find_final_overrider_q): Adjust use of vpath.
2367 (dfs_find_final_overrider_post): Likewise.
2368 (find_final_overrider): Use dfs_depth. Allocate and deallocate
2371 2004-08-12 Jan Beulich <jbeulich@novell.com>
2373 * parser.c (cp_parser_asm_definition): Properly consume scope operator
2374 tokens preceding the clobbers. Don't check for scope operator
2375 following inputs. Simplify inputs handling to match that now used for
2378 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2381 * except.c (build_throw): Allocate cleanup_type and the function
2382 for __cxa_throw separately.
2385 * call.c (standard_conversion): Do not accept conversions between
2386 pointers to members if the class types are unrelated.
2389 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
2390 char &" instead of just "char &".
2393 * pt.c (tsubst): Just return the unknown_type_node.
2395 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2398 * parser.c (cp_parser_class_specifier): Robustify.
2401 * pt.c (tsubst_copy_and_build): Complain about invalid
2405 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
2406 current_class_ref while tsubsting.
2408 2004-08-10 Mark Mitchell <mark@codesourcery.com>
2411 * parser.c (cp_parser_init_declarator): Robustify.
2413 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
2415 * typeck2.c (process_init_constructor): Guard the missing field warning
2416 with warn_missing_field_initializers rather than extra_warnings.
2418 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
2420 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
2422 2004-08-05 Mark Mitchell <mark@codesourcery.com>
2424 * decl.c (start_preparsed_function): Move determine_visibility
2426 * decl2.c (determine_visibility): Incorporate dllexport testing.
2428 2004-08-05 Geoffrey Keating <geoffk@apple.com>
2430 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
2431 means that libstdc++ is needed.
2433 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
2435 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
2437 2004-08-04 Geoffrey Keating <geoffk@apple.com>
2439 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
2440 than passing it as a parameter to rest_of_decl_compilation.
2441 * decl2.c (grokfield): Use set_user_assembler_name.
2443 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
2445 * decl.c (complete_array_type): Don't gratuitously copy
2446 maxindex. Its type is always set.
2448 2004-08-04 Paul Brook <paul@codesourcery.com>
2450 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
2451 * cp-tree.h (struct language_function): Rename x_dtor_label to
2453 (dtor_label): Rename ...
2454 (cdtor_label): ... to this.
2455 * decl.c (begin_constructor_body): Remove.
2456 (check_special_function_return_type): Maybe change the return type.
2457 (grokdeclarator): Pass the class type.
2458 (start_preparsed_function): Constructors may need a return label.
2459 (finish_constructor_body, finish_destructor_body): Set the return
2461 (begin_function_body): Don't call begin_constructor_body.
2462 (finish_function): Don't warn for constructors or destructors.
2463 (implicitly_declare_fn): Maybe change the return type.
2464 * optimize.c: Include target.h.
2465 (maybe_clone_body): Remap the function result.
2466 * semantics.c: Include target.h.
2467 (finish_return_stmt): Maybe jump to return label for constructors.
2469 2004-08-03 Mark Mitchell <mark@codesourcery.com>
2471 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
2472 (check_field_decls): Or here.
2473 (check_methods): Or here.
2474 (initialize_array): Don't mess with DECL_CONTEXT.
2475 * cp-tree.h (start_decl): Adjust prototype.
2476 (determine_visibility): New function.
2477 * decl.c (duplicate_decls): Remove checks for hidden "operator
2479 (build_library_fn_1): Give all library functions default
2481 (start_decl): Add pop_scope_p parameter. Tidy.
2482 (cp_finish_decl): Do not pop scopes here. Call
2483 determine_visibility for variable definitions.
2484 (start_preparsed_function): Call determine_visibility.
2485 * decl2.c (determine_visibility): New function.
2486 * method.c (use_thunk): Fix formatting.
2487 * parser.c (cp_parser_condition): Adjust calls to start_decl.
2488 (cp_parser_init_declarator): Likewise.
2489 * pt.c (instantiate_decl): Always call pop_nested_class.
2490 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
2491 (tinfo_base_init): Likewise.
2493 2004-08-02 Mark Mitchell <mark@codesourcery.com>
2496 * name-lookup.c (validate_nonmember_using_decl): Robustify.
2498 2004-08-01 Mark Mitchell <mark@codesourcery.com>
2501 * name-lookup.c (decl_namespace): Remove.
2502 (current_decl_namespace): Use decl_namespace_context instead of
2504 (push_decl_namespace): Likewise.
2505 (arg_assoc_class): Likewise.
2506 (arg_assoc_type): Likewise.
2507 * pt.c (check_specialization_namespace): New function.
2508 (maybe_process_partial_specialization): Use it.
2509 (register_specialization): Likewise.
2512 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
2513 * call.c (null_ptr_cst_p): Handle variables with constant
2515 * pt.c (convert_nontype_argument): Use
2516 DECL_INTEGRAL_CONSTANT_VAR_P.
2517 * semantics.c (finish_id_expression): Likewise.
2520 * decl.c (duplicate_decls): Reject duplicate namespace
2524 * typeck.c (build_ptrmemfunc): Loosen assertion.
2526 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2528 * call.c (z_candidate::template_decl): Rename from template.
2529 (add_template_candidate_real): Adjust member reference.
2532 2004-07-29 Mark Mitchell <mark@codesourcery.com>
2534 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
2535 (lang_decl_flags): Narrow the width of "languages". Add
2537 (DECL_NEEDED_P): Remove.
2538 (FOR_EACH_CLONE): New macro.
2539 (DECL_REPO_AVAILABLE_P): Likewise.
2540 (DECL_TINFO_P): Likewise.
2541 (set_linkage_according_to_type): Declare.
2542 (import_export_vtable): Remove.
2543 (import_export_tinfo): Likewise.
2544 (mark_needed): New function.
2545 (decl_needed_p): Likewise.
2546 (note_vauge_linkage_fn): Likewise.
2547 (init_repo): Change prototype.
2548 (repo_template_used): Remove.
2549 (repo_template_instantiated): Likewise.
2550 (repo_emit_p): New function.
2551 (repo_export_class_p): Likewise.
2552 (no_linkage_check): Change prototype.
2553 * class.c (set_linkage_according_to_type): New function.
2554 (build_vtable): Use it. Do not call import_export_vtable. Set
2555 DECL_IGNORED_P if appropriate.
2556 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
2557 (make_rtL_for_nonlocal_decls): Check for template instantiations
2559 (grokfndecl): Adjust call to no_linkage_check.
2560 (set_linkage_for_static_data_member): New function.
2561 (grokvardecl): Use it. Adjust call to no_linkage_check.
2562 (grokdeclarator): Use set_linkage_for_static_data_member.
2563 * decl2.c (note_vague_linkage_fn): New function.
2564 (note_vague_linkage_var): Likewise.
2565 (finish_static_data_member_decl): Use it.
2566 (import_export_vtable): Remove.
2567 (import_export_class): Use repo_export_class_p.
2568 (var_finalized_p): Simplify.
2569 (maybe_emit_vtables): Simplify.
2570 (mark_needed): New function.
2571 (decl_needed_p): Likewise.
2572 (import_export_decl): Add documentation and consistency checks.
2573 Use repo_emit_p. Handle virtual tables and RTTI information
2575 (import_export_tinfo): Remove.
2576 (write_out_vars): Call import_export_decl.
2577 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
2579 (finish_file): Use decl_needed_p. Do not call import_export_decl
2580 for undefined static data members. Do not warn about undefined
2581 inlines when using a repository.
2582 (mark_used): Use note_vague_linkage_fn. Always defer template
2584 * lex.c (cxx_init): Adjust call to init_repo. Always set
2585 flag_unit_at_a-time.
2586 * method.c (synthesize_method): Remove unncessary
2587 import_export_decl call.
2588 (implicitly_declare_fn): Use set_linkage_according_to_type.
2589 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
2590 * pt.c (instantiate_class_template): Don't redundantly add classes
2591 to keyed_classes. Don't call repo_template_used.
2592 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
2593 templates with internal linkage.
2594 (check_instantiated_args): Adjust call to no_linkage_check.
2595 (instantiate_template): Use FOR_EACH_CLONE.
2596 (mark_definable): New function.
2597 (mark_decl_instantiated): Use it.
2598 (do_decl_instantiation): Adjust tests for explicit instantiation
2599 after "extern template".
2600 (instantiate_class_member): Do not use repo_template_instantiated.
2601 (do_type_instantiation): Simplify.
2602 (instantiate_decl): Use mark_definable. Check repo_emit_p.
2604 * repo.c (repo_get_id): Remove.
2605 (original_repo): Remove.
2606 (IDENTIFIER_REPO_USED): Remove.
2607 (IDENTIFIER_REPO_CHOSEN): Remove.
2608 Remove all #if 0'd code.
2609 (repo_template_used): Remove.
2610 (repo_template_instantiated): Remove.
2611 (temporary_obstack_initialized_p): New variable.
2612 (init_repo): Register with lang_post_pch_load. Avoid creating
2613 identifiers unnecessarily. Don't use original_repo. Close the
2615 (reopen_repo_file_for_write): Not here.
2616 (finish_repo): Always write out a new repository file.
2617 (repo_emit_p): New function.
2618 (repo_export_class_p): Likewise.
2619 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
2620 (involves_incomplete_p): New function.
2621 (tinfo_base_init): Use it.
2622 (ptr_initializer): Remove non_public_ptr parameter.
2623 (ptm_initializer): Likewise.
2624 (get_pseudo_ti_init): Likewise.
2625 (unemitted_tinfo_decl_p): Remove.
2626 (emit_tinfo_decl): Use import_export_decl.
2627 * semantics.c (expand_body): Move updates of static_ctors and
2629 (expand_or_defer_fn): ... here.
2630 * tree.c (no_linkage_check): Add relaxed_p parameter.
2632 2004-07-28 Eric Christopher <echristo@redhat.com>
2634 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2636 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
2638 * cp-tree.h (struct tree_pair_s): New.
2639 (typedef tree_pair_p): New.
2640 (DEF_VEC_O(tree_pair_s)): New.
2641 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
2642 (CLASSTYPE_VCALL_INDICES): Update documentation.
2643 * class.c (get_vcall_index): Adjust.
2644 (add_vcall_offset): Adjust.
2646 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
2648 * pt.c, typeck.c: Remove spurious carriage returns.
2650 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2653 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
2654 when the type of ARG is not dependent.
2656 2004-07-26 Geoffrey Keating <geoffk@apple.com>
2658 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
2659 (lang_specific_driver): If the C++ or math library options don't
2660 start with '-l', don't count them as added libraries.
2662 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
2664 * decl.c (xref_basetypes): Adjust base access vector creation.
2665 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
2667 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
2669 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
2670 Brian Ryner <bryner@brianryner.com>
2674 * class.c (check_field_decls): Apply hidden visibility if
2675 -fvisibility-inlines-hidden and inlined unless otherwise specified
2676 (build_vtable): Set vtable visibility to class visibility.
2677 (check_field_decls): Default static member visibility to class
2679 (check_methods): Default method visibility to class visibility.
2680 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
2681 CLASSTYPE_VISIBILITY_SPECIFIED macro.
2682 * decl.c (duplicate_decls): New logic for merging definition decls
2683 with declaration decls. Added ignore & warning when non default
2684 applied to global operator new or delete.
2685 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
2686 wherever VISIBILITY was changed
2687 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
2689 (tinfo_base_init): Set typeinfo name visibility to class visibility.
2691 2004-07-25 Bernardo Innocenti <bernie@develer.com>
2693 * decl.c: Rename all identifiers named `class' to `cl'.
2694 * cp-tree.h: Likewise.
2696 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2698 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
2699 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
2700 * name-lookup.c (binding_entry_make): Use GGC_NEW.
2701 (binding_table_construct): Use GGC_CNEWVEC.
2702 (binding_table_new): Use GGC_NEW.
2703 (cxx_binding_make): Likewise.
2704 (begin_scope): Likewise.
2705 (push_to_top_level): Use GCC_CNEW.
2706 * parser.c (cp_token_cache_new): Likewise.
2707 (cp_token_cache_push_token): Likewise.
2708 (cp_lexer_new_main): Likewise.
2709 (cp_lexer_new_from_tokens): Likewise.
2710 (cp_parser_context_new): Likewise.
2711 (cp_parser_new): Likewise.
2712 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
2713 * lex.c (cxx_make_type): Use GGC_CNEW.
2714 (retrofit_lang_decl): Use GGC_NEWVAR.
2715 (cxx_dup_lang_specific_decl): Likewise.
2716 (copy_lang_type): Likewise.
2717 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
2718 (save_function_data): Likewise.
2719 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
2720 (cxx_push_function_context): Likewise.
2722 2004-07-25 Richard Henderson <rth@redhat.com>
2724 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
2725 DECL_IGNORED_P on RESULT_DECL.
2726 * semantics.c (finalize_nrv): Copy them too.
2728 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
2730 * search.c (lookup_conversion_operator): Avoid two loops.
2731 (add_conversions): Remove.
2732 (check_hidden_convs, split_conversions,
2733 lookup_conversions_r): New.
2734 (lookup_conversions): Use lookup_conversions_r.
2736 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
2738 * pt.c (get_template_base): Check type is completable.
2740 2004-07-21 Eric Christopher <echristo@redhat.com>
2742 * decl.c (poplevel): Inline unused variable checking.
2745 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
2747 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
2750 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2753 * pt.c (check_explicit_specialization): Remove extension to accept
2754 specializations without template headers. Fall-through to normal
2757 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2760 * pt.c (determine_specialization): New parameter template_count.
2761 Disambiguate between member templates and member functions counting
2762 the template headers.
2763 (check_explicit_specialization): Update caller.
2764 (tsubst_friend_function): Likewise.
2766 2004-07-20 Steven Bosscher <stevenb@suse.de>
2768 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
2769 * cp-tree.h (tinst_level_t): New tree type.
2770 (union lang_tree_node): Handle it.
2771 (TINST_LOCATION): New accessor macro.
2772 (make_tinst_level): New prototype.
2773 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
2774 * decl.c (cp_tree_node_structure): Likewise.
2775 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
2776 (print_instantiation_partial_context): Likewise.
2777 * pt.c (pop_tinst_level): Likewise.
2778 (push_tinst_level): Use make_tinst_level.
2779 * tree.c (make_tinst_level): New function.
2780 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
2782 2004-07-20 Mark Mitchell <mark@codesourcery.com>
2784 * parser.c (cp_parser_simple_type_specifier): Fix typo.
2787 * parser.c (cp_parser_simple_type_specifier): Do not record usage
2788 of globally-qualified names.
2790 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2793 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
2796 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2799 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2800 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2801 * class.c (add_implicitly_declared_members): Use
2802 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2803 * method.c (lazily_declare_fn): Clear
2804 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2805 * search.c (lookup_fnfields_1): Check it.
2807 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2809 * cp-tree.h (vec_binfo_member): Remove.
2810 * tree.c (vec_binfo_member): Remove.
2812 * cp-tree.h (struct lang_type_class): Remove vfields field.
2813 (CLASSTYPE_VFIELDS): Remove.
2814 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2815 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
2817 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
2818 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
2819 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
2821 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2823 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
2824 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2826 (BINFO_LANG_SLOTS): Remove.
2827 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
2828 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
2829 * class.c (check_bases): Adjust BINFO accessors.
2830 (determine_primary_base, finish_struct_bits,
2831 maybe_warn_about_overly_private_class, warn_hidden,
2832 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
2833 warn_about_ambiguous_bases, get_vfield_name,
2834 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
2835 add_vcall_offset_vtbl_entries_r): Likewise.
2836 * dump.c (cp_dump_tree): Likewise.
2837 * init.c (sort_mem_initializers, expand_member_init, build_delete,
2838 push_base_cleanups): Likewise.
2839 * method.c (do_build_copy_constructor, do_build_assign_ref,
2840 synthesize_exception_spec): Likewise.
2841 name-lookup.c (arg_assoc_class): Likewise.
2842 * pt.c (instantiate_class_template,
2843 get_template_base_recursive): Likewise.
2844 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
2845 * typeck2.c (process_init_constructor): Likewise.
2846 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2847 dfs_access_in_type, dfs_walk_real, look_for_overrides,
2848 types_overlap_p, copied_binfo, original_binfo): Likewise.
2849 (binfo_for_vtable): Remove
2851 2004-07-20 Steven Bosscher <stevenb@suse.de>
2853 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
2854 thunk_alias, and the access and virtual_offset fields.
2855 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
2856 * decl.c (finish_case_label): Update c_add_case_node call.
2858 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2860 Revert patch for PR c++/16623.
2862 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
2864 * except.c: Remove two spurious carriage returns.
2866 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2869 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2870 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2871 * class.c (add_implicitly_declared_members): Use
2872 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2873 * method.c (lazily_declare_fn): Clear
2874 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2875 * search.c (lookup_fnfields_1): Check it.
2877 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
2879 * class.c (add_method): Delay adding the slot until the end.
2880 (determine_primary_base): Adjust VEC_iterate invokation.
2881 (resort_type_method_vec, finish_struct_methods, warn_hidden,
2882 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
2883 build_vtbl_initializer): Likewise.
2884 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
2885 build_vbase_delete): Likewise.
2886 * method.c (do_build_copy_constructor): Likewise.
2887 * name-lookup.c (new_class_binding, print_binding_level,
2888 poplevel_class, store_class_bindings, push_to_top_level,
2889 pop_from_top_level): Likewise.
2890 * pt.c (check_explicit_specialization): Likewise.
2891 * search.c (lookup_conversion_operator, lookup_fnfields_1,
2892 get_pure_virtuals, add_conversions, dfs_check_overlap,
2893 binfo_for_vbase): Likewise.
2895 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2898 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
2899 innermost set of template arguments during deduction. Simplify.
2901 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
2903 * typeck.c (build_modify_expr, build_x_modify_expr): Set
2904 TREE_NO_WARNING on assignments with an operator other than '='.
2906 2004-07-10 Steven Bosscher <stevenb@suse.de>
2907 Joseph S. Myers <jsm@polyomino.org.uk>
2909 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
2910 * decl2.c (grokfield): Don't check current_class_depth via
2911 unused TREE_COMPLEXITY.
2912 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
2913 to avoid the missing parentheses warning.
2914 Don't set C_SET_EXP_ORIGINAL_CODE.
2916 2004-07-18 Mark Mitchell <mark@codesourcery.com>
2918 * tree.c (no_linkage_helper): Remove.
2919 (no_linkage_check): Don't use walk_tree_without_duplicates.
2921 * mangle.c (write_expression): Issue a sorry for zero-operand
2924 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2927 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2928 TREE_TYPE for non-dependent names.
2929 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
2930 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2931 unknown_type_node as its TREE_TYPE.
2932 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2933 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2934 (dump_expr) <SCOPE_REF case>: Likewise.
2936 2004-07-17 Jason Merrill <jason@redhat.com>
2939 * call.c (type_passed_as): Make the invisible reference type
2941 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
2942 cp_genericize_r. Handle invisible reference lowering.
2943 (is_invisiref_parm): New fn.
2944 (cp_genericize): Adjust the types of invisible reference parms.
2945 Don't repeat the walk for clones.
2946 * decl.c (store_parm_decls): Don't generate any code for clones.
2948 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2950 * cp-tree.h (builtin_function): Declare.
2952 2004-07-16 Mark Mitchell <mark@codesourcery.com>
2954 * class.c (finish_struct_methods): Remove unncessary code.
2955 (add_implicitly_declared_members): Create declarations for default
2956 constructors and copy constructors lazily.
2957 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
2959 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
2960 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
2961 * decl2.c (check_classfn): Robustify.
2962 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
2963 (locate_ctor): Handle lazy default constructors.
2964 (locate_copy): Handle lazy copy constructors.
2965 (implicitly_declare_fn): Make sure we're looking at the
2966 TYPE_MAIN_VARIANT for a class before creating functions. Don't
2967 set TYPE_HAS_CONSTRUCTOR.
2968 (lazily_declare_fn): New function.
2969 * name-lookup.c (constructor_name_full): Simplify.
2970 * search.c (lookup_fnfields_1): Lazily create methods, as
2972 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
2974 2004-07-16 Steven Bosscher <stevenb@suse.de>
2976 * cp-tree.h (struct lang_type): Don't have three GTY options on a
2977 single bit GTY desc.
2979 2004-07-16 Richard Henderson <rth@redhat.com>
2981 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
2982 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
2983 * tree.c (cp_copy_res_decl_for_inlining): Remove.
2985 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
2987 * class.c (finish_struct_bits): Use for loop.
2988 (propagate_binfo_offsets): Do primary binfo outside of loop.
2991 * dump.c (cp_dump_tree): Don't dump the bases if there's no
2994 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
2996 2004-07-15 Mark Mitchell <mark@codesourcery.com>
2998 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
2999 has_abstract_assign_ref. Make methods a VEC(tree) *.
3000 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
3001 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
3002 (CLASSTYPE_DESTRUCTORS): Likewise.
3003 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
3004 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3005 (add_method): Change prototoype.
3006 * class.c (add_method): Remove error_p parameter. Adjust for
3007 changes to CLASSTYPE_METHOD_VEC.
3008 (handle_using_decl): Adjust call to add_method.
3009 (maybe_warn_about_overly_private_class): Adjust for
3010 changes to CLASSTYPE_METHOD_VEC.
3011 (resort_type_method_vec): Likewise.
3012 (finish_struct_methods): Likewise.
3013 (check_for_override): Likewise.
3014 (warn_hidden): Likewise.
3015 (add_implicitly_declared_members): Defer creation of assignment
3016 operators. Adjust call to add_method.
3017 (clone_function_decl): Adjust call to add_method.
3018 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
3019 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
3020 * decl.c (grok_special_member_properties): Don't set
3021 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3022 * decl2.c (check_classfn): Adjust for
3023 changes to CLASSTYPE_METHOD_VEC.
3024 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
3025 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
3026 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
3027 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
3029 * pt.c (check_explicit_specialization): Adjust for
3030 changes to CLASSTYPE_METHOD_VEC.
3031 (instantiate_class_template): Do not set
3032 TYPE_HAS_ABSTRACT_ASSIGN_REF.
3033 * ptree.c (cxx_print_type): Don't try to print
3034 CLASSTYPE_METHOD_VEC.
3035 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
3036 * search.c (lookup_field_r): Adjust for
3037 changes to CLASSTYPE_METHOD_VEC.
3038 (lookup_fnfields): Likewise.
3039 (lookup_conversion_operator): Likewise.
3040 (lookup_fnfields_1): Likewise. Create assignment operators
3042 (look_for_overrides_here): Adjust for
3043 changes to CLASSTYPE_METHOD_VEC.
3044 (add_conversions): Likewise.
3045 * semantics.c (finish_member_declaration): Adjust call to add_method.
3047 2004-07-15 Jason Merrill <jason@redhat.com>
3049 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
3050 references and pointers are compatible.
3052 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3054 * decl.c (xref_basetypes): Refactor.
3055 * tree.c (copy_base_binfos): Replace with ...
3056 (copy_binfo): ... this. Deep copy the given binfo, (not the just
3057 bases of the given base).
3058 * cp-tree.h (copy_base_binfo): Remove.
3059 (copy_binfo): Declare.
3061 2004-07-15 Mark Mitchell <mark@codesourcery.com>
3063 * name-lookup.c (set_inherited_value_binding_p): Add class_type
3065 (get_class_binding): Adjust.
3066 (push_class_level_binding): Don't use set_inherited_value_binding_p.
3068 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
3070 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
3071 * decl.c (xref_basetypes): Set it here.
3073 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
3074 Don't check for incomplete base.
3075 (get_vfield_name): Simplify while loop.
3076 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
3078 2004-07-14 Mark Mitchell <mark@codesourcery.com>
3080 * lex.c (cxx_make_type): Remove call to get_pointer_type.
3082 * cp-tree.h (IDENTIFIER_VALUE): Remove.
3083 (BINFO_PUSHDECLS_MARKED): Likewise.
3084 (maybe_inject_for_scope_var): Likewise.
3085 (push_class_decls): Likewise.
3086 * name-lookup.h (push_class_binding): Remove.
3087 (innermost_non_namespace_value): New function.
3088 (outer_binding): Likewise.
3089 * class.c (add_method): Push bindings before adding to
3091 (restore_class_cache): Do not restore class_shadowed.
3092 (pushclass): Do not add USING_DECLs. Do not call
3094 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
3095 * decl.c (pushdecl): Use outer_binding.
3096 (poplevel): Set the scope for an out-of-scope for-loop declaration
3098 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
3099 * name-lookup.c (new_class_binding): New function.
3100 (push_binding): Use it.
3101 (pushdecl): Use innermost_non_namespace_value.
3102 (maybe_inject_for_scope_var): Remove.
3103 (push_class_binding): Remove.
3104 (set_inherited_value_binding_p): New function.
3105 (get_class_binding): New function.
3106 (push_class_level_binding): Assert that the current_class_type is
3108 (outer_binding): New function.
3109 (innermost_non_namespace_value): Likewise.
3110 (lookup_name_real): Use outer_binding.
3111 (lookup_name_current_level): Ignore out-of-scope variables.
3112 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
3113 (lookup_template_class): Likewise.
3114 * search.c (dfs_push_type_decls): Remove.
3115 (dfs_push_decls): Likewise.
3116 (setup_class_bindings): Likewise.
3117 (lookup_field_1): Handle USING_DECLs from dependent scopes.
3118 (marked_pushdecls_p): Remove.
3119 (unmarked_pushdecls_p): Remove.
3120 (marked_identifiers): Remove.
3121 (setup_class_bindings): Remove.
3122 (dfs_push_type_decls): Remove.
3123 (dfs_push_decls): Remove.
3124 (push_class_decls): Remove.
3126 2004-07-13 Mark Mitchell <mark@codesourcery.com>
3130 * decl.c (grokvardecl): Make declspecs parameter const.
3131 (grokdeclarator): Likewise. Adjust accordingly.
3132 * decl.h (grokdeclarator): Adjust declaration.
3133 * parser.c (cp_parser_init_declarator): Do not clear
3134 decl_specifiers->attributes.
3136 * cp-tree.h (lang_identifier): Remove class_value.
3137 (IDENTIFIER_CLASS_VALUE): Remove.
3138 (pop_class_decls): Likewise.
3139 (init_search_processing): Likewise.
3140 * class.c (handle_using_decl): Use lookup_member, not
3141 IDENTIFIER_CLASS_VALUE.
3142 (restore_class_cache): New function, split out from ...
3143 (pushclass): ... here. Do not call clear_identifier_class_values.
3144 (invalidate_class_lookup_cache): Do not clear
3145 IDENTIFIER_CLASS_VALUE.
3146 (popclass): Do not call pop_class_decls.
3147 (maybe_note_name_used_in_class): Do not save names looked up after
3148 the class is complete. Use lookup_member, not
3149 IDENTIFIER_CLASS_VALUE.
3150 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
3151 * decl.c (cxx_init_decl_processing): Do not call
3152 init_search_processing.
3153 * method.c (do_build_copy_constructor): Remove unnecessary code.
3154 (do_build_assign_ref): Likewise.
3155 * name-lookup.c (pushdecl): Use lookup_member, not
3156 IDENTIFIER_CLASS_VALUE.
3157 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
3159 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
3160 (push_class_binding): Do not set it.
3161 (clear_identifier_class_values): Remove.
3162 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
3163 (store_binding): Do not save it.
3164 (pop_from_top_level): Do not restore it.
3165 * name-lookup.h (cxx_saved_binding): Remove class_value.
3166 (clear_identifier_class_values): Remove.
3167 * ptree.c (cxx_print_identifier): Do not print
3168 IDENTIFIER_CLASS_VALUE.
3169 * search.c (search_obstack): Remove.
3170 (push_stack_level): Remove.
3171 (pop_stack_level): Remove.
3172 (search_level): Remove.
3173 (search_stack): Remove.
3174 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
3175 (setup_class_bindings): Use IDENTIFIER_MARKED, not
3176 IDENTIFIER_CLASS_VALUE.
3177 (marked_identifiers): New variable.
3178 (push_class_decls): Clear IDENTIFIER_MARKED.
3179 (pop_class_decls): Don't call pop_search_level.
3180 (init_search_processing): Remove.
3182 2004-07-12 Mark Mitchell <mark@codesourcery.com>
3184 * cp-tree.h (get_aggr_typedef): Remove.
3185 * init.c (get_aggr_typedef): Likewise.
3187 * name-lookup.c (push_class_level_binding): Simplify.
3189 2004-07-12 Andrew Pinski <apinski@apple.com>
3193 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3195 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3198 2004-07-12 Eric Christopher <echristo@redhat.com>
3200 * parser.c (cp_parser_class_head): Remove unused variable.
3202 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3204 * decl.c (grok_op_properties): Reject [de-]allocation functions
3205 declared in a namespace, or declared as static.
3207 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
3209 * cp-tree.h (make_binfo): Remove.
3210 * decl.c (xref_basetypes): Use make_tree_binfo directly.
3211 * tree.h (copy_base_binfos): Likewise.
3212 (make_binfo): Remove.
3214 * call.c (build_user_type_conversion_1, build_new_op,
3215 check_constructor_callable, build_temp,
3216 perform_direct_initialization_of_possible): Pass type directly to
3217 lookup_fnfields & build_special_member_call.
3218 (build_special_member_call): Accept a type, and complete it.
3219 * class.c (finish_stuct_bits): Copy the BINFOs here.
3220 * cvt.c (ocp_convert): Pass type directly to
3221 build_special_member_call.
3222 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
3223 (xref_basetypes): Allocate the binfo here. Adjust.
3224 * init.c (build_init, build_new_1): Pass type directly to
3225 build_special_member_call.
3226 * lex.c (cxx_make_type): Do not allocate binfo here.
3227 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
3228 * parser.c (cp_parser_class_head): Always call xref_basetypes.
3229 * pt.c (instantiate_class_template): Likewise. Inhibit access
3230 checking for template friends.
3231 * ptree.c (cxx_print_type): Adjust record printing.
3232 * search.c (lookup_base): When taking a type, complete it before
3233 looking for a binfo.
3234 (lookup_member): Delay completing a type.
3235 (push_class_decls): Don't walk an incomplete type.
3236 (lookup_conversions): Likewise.
3237 * semantics.c (finish_stmt_expr_expr): Pass type directly to
3238 build_special_member_call.
3239 * tree.c (copy_base_binfos): Adjust.
3240 (make_binfo): Likewise.
3241 * typeck.c (build_modify_expr): Pass type directly to
3242 build_special_member_call.
3243 * typeck2.c (process_init_constructor): Check a binfo exists.
3244 (build_m_component_ref): Allow accessing an incomplete type.
3245 (build_functional_cast): Pass type directly to
3246 build_special_member_call.
3248 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3251 * config-lang.in (gtfiles): Add typeck2.c.
3252 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
3254 * cp-tree.h: Declare complete_type_check_abstract.
3255 * typeck2.c (pat_calc_hash, pat_compare,
3256 complete_type_check_abstract): New functions.
3257 (abstract_virtuals_error): If the type is abstract, register the
3258 declaration within abstract_pending_vars for further checks.
3259 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
3260 * decl.c (cp_finish_decl): Do not strip array types.
3261 (create_array_type_for_decl): Check for abstractness of the element
3263 (complete_vars): Call complete_type_check_abstract.
3264 * class.c (finish_struct): Prepare a list of virtual functions for
3265 template types, and call complete_vars on it to check for abstractness.
3267 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
3269 PR tree-optimization/14107
3270 * decl.c (finish_function): Remove temporary band-aid.
3272 2004-07-11 Mark Mitchell <mark@codesourcery.com>
3274 * call.c (build_operator_new_call): Avoid using push_to_top_level.
3275 (build_new_op): Adjust call to lookup_function_nonclass.
3276 * name-lookup.c (identifier_type_value): Adjust call to
3278 (lookup_name_real): Add block_p parameter.
3279 (lookup_name_nonclass): Adjust call to lookup_name_real.
3280 (lookup_function_nonclass): Likewise.
3281 (lookup_name): Likewise.
3282 * name-lookup.h (lookup_name_real): Change prototype.
3283 (lookup_name_nonclass): Likewise.
3284 * parser.c (cp_parser_lookup_name): Likewise.
3286 * cp-tree.h (saved_scope): Make old_bindings a vector.
3287 (unuse_fields): Remove.
3288 * name-lookup.h (cxx_saved_binding): Define it.
3289 * class.c (pushclass): Don't use unuse_fields.
3290 * name-lookup.c (cxx_saved_binding_make): Remove.
3291 (store_binding): Add new bindings to a vector, using an
3292 accumulator style, rather than adding them to a list.
3293 (store_bindings): Adjust accordingly.
3294 (store_class_bindings): Likewise.
3295 (push_to_top_level): Likewise.
3296 (pop_from_top_level): Likewise.
3297 * optimize.c (maybe_clone_body): Must push_to_top_level and
3298 pop_from_top_level calls outside of loop.
3299 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
3300 calls here from cp_parser_late_parsing_default_args.
3301 (cp_parser_save_default_args): Record the class type in which the
3302 function is declared.
3303 (cp_parser_late_parsing_default_args): Do not call
3304 push_nested_class/pop_nested_class.
3305 * search.c (dfs_unuse_fields): Remove.
3306 (unuse_fields): Remove.
3308 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
3310 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
3311 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
3312 * cp-tree.h (poplevel): Declare.
3313 (set_block): Remove.
3314 * decl.c (set_block): Remove.
3316 2004-07-10 Mike Stump <mrs@apple.com>
3318 * decl2.c (import_export_class): Never export/import vtables
3319 with inline key functions.
3321 2004-07-09 Steven Bosscher <stevenb@suse.de>
3323 * typeck.c (c_expand_asm_operands): Remove.
3325 2004-07-09 Mike Stump <mrs@apple.com>
3327 * typeck.c (build_class_member_access_expr): Skip null deref
3328 warning when we don't dereference it.
3330 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3334 * class.c (check_field_decls): Improve -Weffc++ warning: do not
3335 warn for pointers to functions/members, or for classes without
3338 2004-07-08 Mark Mitchell <mark@codesourcery.com>
3340 * name-lookup.h (struct cp_binding_level): Update documentation
3343 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3346 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
3347 returning CALL_EXPR, and non-reference return type.
3349 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
3351 * name-lookup.c (push_binding): Use VEC_reserve.
3353 2004-07-08 Richard Henderson <rth@redhat.com>
3355 * cp-tree.h (expand_eh_spec_block): Remove.
3357 2004-07-07 Mark Mitchell <mark@codesourcery.com>
3359 * cp-tree.h (saved_scope): Remove x_previous_class_type and
3360 x_previous_class_values; add x_previous_class_level.
3361 (previous_class_type): Remove.
3362 (previous_class_values): Remove.
3363 (previous_class_level): New macro.
3364 * class.c (pushclass): Restore the identifier cache more
3366 (invalidate_class_lookup_cache): Use vector for class_shadowed and
3367 previous_class_values.
3368 * decl.c (poplevel): Likewise.
3369 * name-lookup.c (cxx_binding_init): New function.
3370 (cxx_binding_make): Use it.
3371 (push_binding): For a binding in a class level, use a vector of
3372 cp_class_binding nodes.
3373 (push_binding_level): New function.
3374 (begin_scope): Use it.
3375 (leave_scope): Do not put class binding levels on the free list.
3376 (print_binding_level): Adjust for the fact that class_shadowed is
3378 (poplevel_class): Likewise.
3379 (clear_identifier_class_values): Likewise.
3380 (push_class_level_binding): Likewise.
3381 (set_class_shadows): Remove.
3382 (store_binding): New function.
3383 (store_class_bindings): New function.
3384 (push_to_top_level): Use store_class_bindings as appropriate.
3385 (pop_from_top_level): Use previous_class_level, not
3386 previous_class_type.
3387 * name-lookup.h (cp_class_binding): New type.
3388 (cp_binding_level): Use a vector object for class_shadowed.
3389 (push_binding_level): Declare.
3390 (set_class_shadows): Remove.
3392 2004-07-07 Andrew Pinski <apinski@apple.com>
3394 * class.c (instantiate_type): BUFFER_REF is dead.
3395 * lex.c (init_operators): IN_EXPR is dead.
3397 2004-07-07 Jason Merrill <jason@redhat.com>
3400 * call.c (build_new_op): Give overload warnings for built-in
3403 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3406 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3409 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
3411 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
3412 * class.c (build_primary_vtable, check_bases,
3413 determine_primary_base, finish_struct_bits,
3414 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
3415 get_basefndecls, warn_hidden, walk_subobject_offsets,
3416 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
3417 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
3418 finish_struct_1, get_vfield_name, contains_empty_class_p,
3419 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
3420 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
3421 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
3423 * decl.c (xref_basetypes): Likewise.
3424 * dump.c (cp_dump_tree): Likewise.
3425 * error.c (dump_expr): Likewise.
3426 * init.c (sort_mem_initializers, expand_member_init,
3427 push_base_cleanups): Likewise.
3428 * method.c (do_build_copy_constructor, do_build_assign_reg,
3429 synthesize_exception_spec): Likewise.
3430 * name-lookup.c (arg_assoc_class): Likewise.
3431 * pt.c (instantiate_class_template, tsubst,
3432 get_template_base_recursive): Likewise.
3433 * ptree.c (cxx_print_type): Likewise.
3434 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
3435 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3436 dfs_access_in_type, access_in_type, lookup_field_queue_p,
3437 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
3438 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
3439 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
3440 binfo_for_vtable, copied_binfo, original_binfo): Likewise
3441 * tree.c (copy_base_binfos, make_binfo): Likewise.
3442 * typeck.c (commmon_base_type): Likewise
3443 * typeck2.c (process_init_constructor): Likewise
3445 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
3447 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
3449 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3452 * pt.c (convert_nontype_argument): Disallow conversions between
3453 different enumeration types.
3455 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
3457 * cp-tree.h (BINFO_MARKED): Remove.
3458 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
3459 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
3460 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
3461 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
3462 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
3463 (mark_primary_bases, determine_primary_base, base_derived_from,
3464 dfs_find_final_overrider, dfs_find_final_overrider_q,
3465 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
3466 dfs_modify_vtables, walk_subobject_offsets,
3467 layout_nonempty_base_or_field, build_base_field,
3468 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
3469 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
3470 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
3471 build_ctor_vtbl_group, accumulate_vtble_inits,
3472 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
3473 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
3474 add_vcall_offset_vtbl_entries_1): Likewise.
3475 * decl.c (xref_basetypes): Incomming virtual base indicated by
3477 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
3478 * init.c (finish_init_stmts, sort_mem_initializers,
3479 emit_mem_initializers, build_vtble_address, expand_member_init,
3480 push_base_cleanups): Likewise.
3481 * method.c (do_build_copy_constructor): Likewise.
3482 * pt.c (instantiate_class_template,
3483 get_template_base_recursive): Likewise.
3484 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
3485 get_pseudo_ti_desc): Likewise.
3486 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3487 binfo_from_vbase, binfo_via_virtual, copied_binfo,
3488 original_binfo): Likewise.
3489 * semantics.c (finish_base_specifier): Virtualness is indicated
3491 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
3493 2004-07-06 Mark Mitchell <mark@codesourcery.com>
3496 2004-06-24 Jason Merrill <jason@redhat.com>
3498 * decl.c (grokparms): Give the PARM_DECL reference type if the
3499 parameter is passed by invisible reference.
3501 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3503 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
3504 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
3505 * pt.c (check_instantiated_args, unify): Likewise.
3507 2004-07-05 Phil Edwards <phil@codesourcery.com>
3509 * Make-lang.in (check-c++, lang_checks): Add some comments.
3511 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3513 * cp-mudflap.c: Delete file.
3514 * Makefile.in: Remove all references to cp-mudflap.o.
3516 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3518 * decl.c (cxx_init_decl_processing): Call
3519 build_common_tree_nodes before creating the global NAMESPACE_DECL.
3521 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3524 * call.c (build_operator_new_call): Look only at global scope.
3526 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
3528 * call.c (enforce_access): Expect TREE_BINFO.
3529 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
3530 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
3531 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3533 (BINFO_LANG_ELTS): Remove.
3534 (BINFO_LANG_SLOTS): New.
3535 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
3536 (CLASSTYPE_TEMPLATE_INFO): Adjust.
3537 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
3538 * search.c (lookup_member): Check TREE_BINFO.
3539 * semantics.c (perform_or_defer_access_check): Likewise.
3540 (check_accessibility_of_qualified_id): Check
3541 deferred_access_no_check.
3542 * tree.c (make_binfo): Use make_tree_binfo.
3544 2004-07-04 Mark Mitchell <mark@codesourcery.com>
3546 * method.c (implicitly_declare_fn): Set linkage of generated
3549 2004-07-04 Richard Henderson <rth@redhat.com>
3551 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
3553 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
3556 * name-lookup.c (push_class_level_binding): Don't pass a
3557 TREE_LIST of ambiguous names to check_template_shadow as it
3558 only handles declarations. Instead, pull the declaration
3561 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3564 * pt.c (check_explicit_specialization): Clarify error message.
3566 2004-07-02 Richard Henderson <rth@redhat.com>
3568 * tree.c (cp_unsave_r): Update remap_save_expr call.
3570 2004-07-02 Mark Mitchell <mark@codesourcery.com>
3573 * mangle.c (write_template_arg): Correct mangling.
3576 * decl.c (grokdeclarator): Robustify.
3578 2004-07-01 Richard Henderson <rth@redhat.com>
3580 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
3581 * method.c (synthesize_method): Don't clear_last_expr.
3582 * name-lookup.c (maybe_push_cleanup_level): Likewise.
3584 2004-07-01 Nick Clifton <nickc@redhat.com>
3586 * decl2.c (import_export_class): Invoke the
3587 import_export_class field in the gcc_target structure if it is not
3590 2004-06-30 Richard Henderson (rth@redhat.com>
3592 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
3593 * method.c (use_thunk): Likewise.
3595 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3597 * call.c (build_over_call), typeck.c (build_function_call): Call
3598 check_function_arguments instead of check_function_format.
3600 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3602 * call.c (build_over_call), typeck.c (build_function_call): Update
3603 calls to check_function_format.
3605 2004-06-30 Richard Henderson <rth@redhat.com>
3607 * call.c (build_over_call): Use __builtin_memcpy for copying
3608 CLASS_AS_BASE rather than funny casting.
3610 2004-06-30 Richard Henderson <rth@redhat.com>
3612 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
3613 TYPE_SIZE_UNIT of full_type.
3615 2004-06-30 Per Bothner <per@bothner.com>
3617 Conditionally compile support for --enable-mapped_location.
3618 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
3619 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
3620 adjustments - which I don't understand.
3621 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
3622 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
3623 (print_instantiation_partial_context): Use expand_location.
3624 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
3625 * name-lookup.c: Likewise.
3626 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
3627 * name-lookup.c: Use input_line macro.
3628 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
3629 (cp_parser_statement): Rename locaal variable statement_locus to
3630 statement_location and use SET_EXPR_LOCATION macro.
3631 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
3632 * tree.c (cp_walk_subtrees): Likewise.
3634 2004-06-29 Per Bothner <per@bothner.com>
3636 * tree.c (build_min_nt, build_min, build_min_non_dep):
3637 Don't set TREE_COMPLEXITY from input_line.
3639 2004-06-29 Paul Brook <paul@codesourcery.com>
3641 * init.c: Include target.h.
3642 (get_cookie_size): Remove and replace with target hook.
3644 (build_new_1): Store the element size in the cookie.
3646 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
3649 * parser.c (cp_parser_template_declaration_after_export): Disable
3650 access checks here ...
3651 (cp_parser_class_specifier): ... not here.
3653 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3655 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3656 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3657 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
3660 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3662 * cp-tree.h (struct deferred_access): Move to ...
3663 * semantics.c (struct deferred_access): ... here. Adjust.
3664 (deferred_access_stack): Make a VEC(deferred_access),
3665 (deferred_access_free_list): Remove.
3666 (deferred_access_no_check): New.
3667 (push_deferring_access_checks, resume_deferring_access_checks,
3668 stop_deferring_access_checks, pop_deferring_access_checks,
3669 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
3670 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
3672 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3675 * call.c (build_temp): Declare.
3676 (check_constructor_callable): New.
3677 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
3678 CONSTRUCTOR_CALLABLE.
3679 (convert_like_real, initialize_reference): Use
3680 check_constructor_callable.
3681 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
3682 (LOOKUP_*): Renumber.
3684 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3686 * friend.c (add_friend): Only perform access checks when context
3688 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
3689 * parser.c (cp_parser_class_specifier): Disable access checks here
3690 when parsing the body of a templated class.
3691 * semantics.c (perform_or_defer_access_checks): Reorder to allow
3692 NULL binfos when not checking access.
3694 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3696 Use vector API for vbase list.
3697 * cp-tree.h: Include vec.h
3698 (DEF_VEC_P (tree)): New type.
3699 (struct lang_type_class): Change vbase's member type.
3700 (binfo_for_vbase): Declare.
3701 * class.c (determine_primary_base, base_derived_from,
3702 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
3703 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
3704 build_vtbl_initializer): Adjust.
3705 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
3707 * init.c (sort_mem_initializers, expand_member_init,
3708 push_base_cleanups): Adjust.
3709 * method.c (do_build_copy_constructor): Adjust.
3710 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
3711 (binfo_for_vbase): New.
3712 * tree.c (copy_base_binfos): Adjust.
3714 2004-06-28 Mark Mitchell <mark@codesourcery.com>
3716 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
3718 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3721 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
3722 paranthesis in case of pointers to array members.
3723 * error.c (dump_type_prefix): Likewise.
3724 (dump_type_suffix): Maybe issue a whitespace when printing
3727 2004-06-27 Mark Mitchell <mark@codesourcery.com>
3730 * parser.c (cp_parser_set_decl_spec_type): Refine test for
3731 redefinition of built-in types.
3733 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3735 * error.c (pp_template_argument_list_start): Remove.
3736 (pp_template_argument_list_end): Likewise.
3737 (pp_separate_with_comma): Use pp_cxx_separate_with.
3738 (reinit_global_formatting_buffer): Remove.
3739 (pp_non_consecutive_character): Likewise.
3740 (dump_scope): Use pp_cxx_colon_colon.
3741 (dump_template_parameter): Use pp_cxx_identifier,
3742 pp_cxx_tree_identifier and pp_cxx_whitespace.
3743 (dump_templat_bindings): Replace use of pp_string with sequence
3744 of pp_cxx_whitespace and pp_equal.
3745 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
3746 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
3748 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
3749 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
3750 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
3751 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
3752 pp_cxx_right_bracket, pp_cxx_identifier throughout,
3753 (dump_decl): Likewise.
3754 (dump_template_decl): Likewise.
3755 (dump_function_decl): Likewise. Set padding as appropriate.
3756 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
3758 (dump_exception_spec): Likewise.
3759 (dump_function_name): Use pp_cxx_tree_identifier and
3761 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
3762 pp_cxx_end_template_argument_list.
3763 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
3764 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
3765 pp_cxx_whitespace throughout.
3766 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
3768 (dump_unary_op): Likewise.
3769 (reinit_cxx_pp): New function.
3770 (type_as_string); Use it.
3771 (expr_as_string): Likewise.
3772 (decl_as_string); Likewise.
3773 (context_as_string): Likewise.
3774 (lang_decl_name): Likewise.
3775 (decl_to_string): Likewise.
3776 (expr_to_string): Likewise.
3777 (parm_to_string): Likewise.
3778 (type_to_string): Likewise.
3779 (args_to_string): Likewise.
3780 (cv_to_string): Likewise.
3782 2004-06-26 Mark Mitchell <mark@codesourcery.com>
3784 * cp-tree.h (cp_cv_quals): New type.
3785 (cp_declarator): Use it instead of "tree" as appropriate.
3786 (grok_method_quals): Adjust prototype.
3787 (grokclassfn): Likewise.
3788 (do_friend): Likewise.
3789 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
3790 (grokdeclarator): Likewise.
3791 * decl2.c (grok_method_quals): Likewise.
3792 (grokclassfn): Likewise.
3793 * friend.c (do_friend): Likewise.
3794 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
3795 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
3796 (make_pointer_declarator): Likewise.
3797 (make_reference_declarator): Likewise.
3798 (make_ptrmem_declarator): Likewise.
3799 (cp_parser_ptr_operator): Likewise.
3800 (cp_parser_cv_qualifier_seq_opt): Likewise.
3801 (cp_parser_cv_qualifier_opt): Remove.
3802 (cp_parser_new_declarator_opt): Adjust call to
3803 cp_parser_ptr_operator.
3804 (cp_parser_conversion_declaration_opt): Likewise.
3805 (cp_parser_declarator): Use cp_cv_quals, not tree.
3806 (cp_parser_direct_declarator): Likewise.
3808 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3810 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
3811 Rename DECL_STMT to DECL_EXPR.
3812 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
3813 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
3814 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
3816 2004-06-26 Jan Hubicka <jh@suse.cz>
3819 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
3820 reachability analysis.
3822 2004-06-25 Mark Mitchell <mark@codesourcery.com>
3824 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
3827 2004-06-25 Paul Brook <paul@codesourcery.com>
3829 * decl2.c (get_guard): Call targetm.cxx.guard_type.
3830 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
3832 2004-06-24 Mark Mitchell <mark@codesourcery.com>
3834 * decl.c (grokdeclarator): Restore error messages about __thread.
3835 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3837 2004-06-24 Jason Merrill <jason@redhat.com>
3840 * decl.c (grokparms): Give the PARM_DECL reference type if the
3841 parameter is passed by invisible reference.
3843 2004-06-24 Andreas Schwab <schwab@suse.de>
3845 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
3847 2004-06-23 Mark Mitchell <mark@codesourcery.com>
3849 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
3850 (cp/decl.o): Likewise.
3851 (cp/decl2.o): Likewise.
3852 (cp/pt.o): Likewise.
3853 (cp/semantics.o): Likewise.
3854 * config-lang.in (gtfiles): Do not reference cp/lex.h.
3855 * class.c: Do not include lex.h.
3856 (add_implicitly_declared_members): Do not use
3857 adding_implicit_members.
3858 (check_bases_and_members): Do not talk about grok_x_components.
3859 * cp/cp-tree.h (adding_implicit_members): Remove.
3860 (cp_storage_class): New type.
3861 (cp_decl_spec): Likewise.
3862 (cp_decl_specifier_seq): Likewise.
3863 (cp_parameter_declarator): Use it for the decl_specifiers field.
3864 (check_tag_decl): Adjust prototype.
3865 (shadow_tag): Likewise.
3866 (groktypename): Likewise.
3867 (start_decl): Likewise.
3868 (start_function): Likewise.
3869 (start_method): Likewise.
3870 (grok_x_components): Remove.
3871 (grokfield): Adjust prototype.
3872 (grokbitfield): Likewise.
3873 (finish_member_class_template): Remove.
3874 * decl.c: Do not include lex.h.
3875 (adding_implicit_members): Do not define.
3876 (check_tag_decl): Do not use trees to represent decl-specifiers.
3877 (shadow_tag): Likewise.
3878 (groktypename): Likewise.
3879 (start_decl): Likewise.
3880 (grokvardecl): Likewise.
3881 (grokdeclarator): Likewise.
3882 (grokparms): Likewise.
3883 (start_function): Likewise.
3884 (start_method): Likewise.
3885 * decl.h (grokdeclarator): Adjust prototype.
3886 * decl2.c: Do not include lex.h.
3887 (grok_x_components): Remove.
3888 (grokfield): Do not use trees to represent decl-specifiers.
3889 (grokbitfield): Likewise.
3890 * lex.c: Do not include lex.h.
3892 * parser.c: Include target.h.
3893 (clear_decl_specs): New function.
3894 (cp_parser_translation_unit): Do not use trees to represent
3896 (cp_parser_postfix_expression): Likewise.
3897 (cp_parser_new_type_id): Likewise.
3898 (cp_parser_condition): Likewise.
3899 (cp_parser_simple_declaration): Likewise.
3900 (cp_parser_decl_specifier_seq): Likewise.
3901 (cp_parser_function_specifier_opt): Likewise.
3902 (cp_parser_conversion_type_id): Likewise.
3903 (cp_parser_template_parameter): Likewise.
3904 (cp_parser_explicit_instantiation): Likewise.
3905 (cp_parser_type_specifier): Likewise.
3906 (cp_parser_simple_type_specifier): Likewise.
3907 (cp_parser_init_declarator): Likewise.
3908 (cp_parser_type_id): Likewise.
3909 (cp_parser_type_specifier_seq): Likewise.
3910 (cp_parser_parameter_declaration): Likewise.
3911 (cp_parser_member_declaration): Likewise.
3912 (cp_parser_exception_declaration): Likewise.
3913 (cp_parser_function_definition_from_specifiers_and_declarator):
3915 (cp_parser_single_declaration): Likewise.
3916 (cp_parser_save_member_function_body): Likewise.
3917 (cp_parser_friend_p): Likewise.
3918 (cp_parser_set_storage_class): New function.
3919 (cp_parser_set_decl_spec_type): Likewise.
3920 * pt.c: Do not include lex.h.
3921 * semantics.c: Likewise.
3922 (finish_member_class_template): Remove.
3924 2004-06-23 Roger Sayle <roger@eyesopen.com>
3926 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
3927 longer take both "args" and "convert_args" as arguments.
3928 (build_op_delete_call): Update call to build_cxx_call.
3929 (build_over_call): Likewise, update call to build_cxx_call.
3930 * cp-tree.h (build_cxx_call): Update funtion prototype.
3931 * typeck.c (build_function_call): Don't call expand_tree_builtin.
3932 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
3933 (throw_bad_typeid): Likewise.
3934 (build_dynamic_cast_1): Likewise.
3936 2004-06-22 Richard Henderson <rth@redhat.com>
3938 * class.c (build_vfn_ref): Take a pointer not object. Build
3940 (cp_fold_obj_type_ref): New.
3941 * call.c (build_over_call): Update build_vfn_ref call.
3942 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
3943 * cp-tree.h (cp_fold_obj_type_ref): Declare.
3945 2004-06-21 Jason Merrill <jason@redhat.com>
3948 * cp-gimplify.c (cp_gimplify_init_expr): Look through
3951 2004-06-21 Mark Mitchell <mark@codesourcery.com>
3953 * cp-tree.def (NEW_EXPR): Add a fourth slot.
3954 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
3955 (TREE_PARMLIST): Likewise.
3956 (CALL_DECLARATOR_PARMS): Likewise.
3957 (CALL_DECLARATOR_QUALS): Likewise.
3958 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3959 (cp_declarator_kind): New type.
3960 (cp_parameter_declarator): Likewise.
3961 (cp_declarator): Likewise.
3962 (cp_error_declarator): Likewise.
3963 (no_parameters): Likewise.
3964 (groktypename): Change prototype.
3965 (start_decl): Likewise.
3966 (start_handler_parms): Likewise.
3967 (get_scope_of_declarator): Likewise.
3968 (start_function): Likewise.
3969 (start_preparsed_function): New function.
3970 (start_function): Change prototype.
3971 (start_method): Likewise.
3972 (grokfield): Likewise.
3973 (grokbitfield): Likewise.
3974 (build_new): Likewise.
3975 (make_pointer_declarator): Remove.
3976 (make_reference_declarator): Likewise.
3977 (make_call_declarator): Likewise.
3978 (set_quals_and_spec): Likewise.
3979 (process_template_parm): Change prototype.
3980 (begin_function_definition): Remove.
3981 (finish_parmlist): Remove.
3982 * decl.c (groktypename): Do not use trees to represent
3984 (start_decl): Likewise.
3985 (start_handler_parms): Remove.
3986 (get_scope_of_declarator): Reimplement.
3987 (grokdeclarator): Do not use trees to represent declarators.
3988 (grokparms): Likewise.
3989 (start_function): Likewise.
3990 (start_method): Likewise.
3991 (build_void_list_mode): Do not use TREE_PARMLIST.
3992 * decl.h (grokdeclarator): Change prototype.
3993 * decl2.c (grok_method_quals): Robustify.
3994 (grok_x_components): Do not use trees to represent declarators.
3995 (grokfield): Likewise.
3996 (grokbitfield): Likewise.
3997 (start_objects): Build FUNCTION_DECLs, not declarators.
3998 (start_static_storage_duration_function): Likewise.
3999 * init.c (build_new): Simplify.
4000 * lex.c (make_pointer_declarator): Remove.
4001 (make_reference_declarator): Likewise.
4002 (make_call_declarator): Likewise.
4003 (set_quals_and_spec): Likewise.
4004 * method.c (use_thunk): Use start_preparsed_function.
4005 (synthesize_method): Likewise.
4006 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
4007 * optimize.c (maybe_clone_body): Use start_preparsed_function.
4008 * parser.c (cp_error_declarator): New variable.
4009 (declarator_obstack): Likewise.
4010 (alloc_declarator): New function.
4011 (make_declarator): Likewise.
4012 (make_id_declarator): Likewise.
4013 (make_pointer_declarator): Likewise.
4014 (make_reference_declarator): Likewise.
4015 (make_ptrmem_declarator): Likewise.
4016 (make_call_declarator): Likewise.
4017 (make_array_declarator): Likewise.
4018 (no_parameters): New variable.
4019 (make_parameter_declarator): Likewise.
4020 (cp_parser_check_for_definition_in_return_type): Do not use trees
4021 to represent declarators.
4022 (cp_parser_translation_unit): Likewise.
4023 (cp_parser_new_expression): Likewise.
4024 (cp_parser_new_type_id): Likewise.
4025 (cp_parser_new_declarator_opt): Likewise.
4026 (cp_parser_direct_new_declarator): Likewise.
4027 (cp_parser_condition): Likewise.
4028 (cp_parser_declaration_statement): Likewise.
4029 (cp_parser_declaration): Likewise.
4030 (cp_parser_conversion_type_id): Likewise.
4031 (cp_parser_conversion_declarator_opt): Likewise.
4032 (cp_parser_template_parameter_list): Likewise.
4033 (cp_parser_template_parameter): Likewise.
4034 (cp_parser_explicit_instantiation): Likewise.
4035 (cp_parser_init_declarator): Likewise.
4036 (cp_parser_declarator): Likewise.
4037 (cp_parser_direct_declarator): Likewise.
4038 (cp_parser_type_id): Likewise.
4039 (cp_parser_parameter_declaration_clause): Likewise.
4040 (cp_parser_parameter_declaration_list): Likewise.
4041 (cp_parser_parameter_declaration): Likewise.
4042 (cp_parser_member_declaration): Likewise.
4043 (cp_parser_exception_declaration): Likewise.
4044 (cp_parser_check_declarator_template_parameters): Likewise.
4045 (cp_parser_function_definition_from_specifiers_and_declarator):
4047 (cp_parser_save_member_function_body): Likewise.
4048 * pt.c (process_template_parm): Add is_non_type parameter.
4049 (convert_template_argument): Adjust call to groktypename.
4050 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
4051 (tsubst): Do not expect declarators.
4052 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
4054 (instantiate_decl): Use start_preparsed_function.
4055 * semantics.c (begin_function_definition): Remove.
4056 (finish_parmlist): Remove.
4057 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
4060 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4062 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
4063 (build_new_method_call): Likewise.
4064 * decl.c (local_variable_p_walkfn): Don't walk into types.
4065 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
4066 (build_anon_union_vars): Add new operand for COMPONENT_REF.
4067 * init.c (buld_new): Add new operand for ARRAY_REF.
4068 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
4069 (do_build_assign_ref): Likewise.
4070 * parser.c (cp_parser_direct_new_declarator): Add new operands
4072 (cp_parser_direct_declarator): Likewise.
4073 * pt.c (tsubst): Likewise.
4074 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
4076 * semantics.c (finish_non_static_data_member): Add new operand
4078 * typeck.c (build_class_member_access_expr): Likewise.
4079 (build_class_member_access_expr, finish_class_member_access_expr):
4081 (build_ptrmemfunc_access_expr): Likewise.
4082 (build_array_ref): Add new operands for ARRAY_REF.
4083 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
4084 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
4086 2004-06-21 Richard Henderson <rth@redhat.com>
4088 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
4089 * parser.c (cp_parser_jump_statement): Update commentary.
4090 * pt.c (tsubst_expr): Use RETURN_EXPR.
4091 * semantics.c (finish_return_stmt): Likewise.
4092 (finalize_nrv_r): Likewise.
4093 * typeck.c, typeck2.c: Update file start commentary.
4095 2004-06-21 Richard Henderson <rth@redhat.com>
4097 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
4099 2004-06-20 Richard Henderson <rth@redhat.com>
4101 * cp-tree.h (add_decl_stmt): Declare.
4102 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
4103 * semantics.c (maybe_cleanup_point_expr): New.
4104 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
4105 finish_for_expr, finish_switch_cond): Use it.
4106 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
4108 2004-06-20 Richard Henderson <rth@redhat.com>
4110 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
4111 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
4112 (cp_gimplify_expr): Call it.
4113 (gimplify_cleanup_stmt): Move from c-gimplify.c.
4114 (cp_genericize): New.
4115 * decl.c (finish_function): Call it.
4116 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
4117 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
4118 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
4119 (cp_genericize): Declare.
4120 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
4121 * dump.c (cp_dump_tree): Likewise.
4122 * semantics.c (push_cleanup): Move from c-semantics.c.
4124 2004-06-20 Zack Weinberg <zack@codesourcery.com>
4126 * cp-lang.c (has_c_linkage): Implement.
4128 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
4129 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
4130 (builtin_function_1): Don't call make_decl_rtl.
4131 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
4132 (grokvardecl): Don't call mangle_decl.
4133 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
4134 DECL_ASSEMBLER_NAME.
4135 * method.c (set_mangled_name_for_decl): Delete.
4136 * name-lookup.c (pushdecl): When a local extern shadows a
4137 file-scope declaration of the same object, give both DECLs the
4139 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
4140 on DECL_ASSEMBLER_NAME.
4142 2004-06-19 Richard Henderson <rth@redhat.com>
4144 * cp-gimplify.c: Remove unnecessary prototypes.
4145 (cp_gimplify_stmt): Merge into ...
4146 (cp_gimplify_expr): ... here. Move to end of file. Handle
4147 stmts_are_full_exprs_p frobbing.
4148 * cp-tree.h (cp_gimplify_stmt): Remove.
4149 * pt.c (tsubst_expr): Merge prep_stmt and unify.
4150 * tree.c (init_tree): Don't set lang_gimplify_stmt.
4152 2004-06-18 Richard Henderson <rth@redhat.com>
4155 * semantics.c (begin_cond): New.
4156 (finish_cond): Rewrite to handle template DECL_STMTs specially.
4157 Assume that non-template decls go land before the conditional.
4158 (simplify_loop_decl_cond): Likewise.
4159 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
4160 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
4161 begin_switch_stmt, finish_switch_cond): Update to match.
4163 2004-06-17 Jason Merrill <jason@redhat.com>
4166 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
4167 (finish_stmt_expr_expr): Update type after conversions.
4168 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
4169 Handle void initializer.
4170 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
4172 2004-06-17 Geoffrey Keating <geoffk@apple.com>
4174 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
4175 * cp-tree.h (defer_fn): Delete.
4176 * decl2.c (defer_fn): Delete.
4177 (finish_file): Simplify deferred_fns loops; check that
4178 only used inline functions get into deferred_fns.
4179 (mark_used): Inline previous contents of defer_fn.
4181 2004-06-16 Richard Henderson <rth@redhat.com>
4183 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
4184 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
4185 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
4186 of CTOR_INITIALIZER ...
4187 (pp_cxx_statement): ... here.
4188 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
4189 (finish_function): Use alloc_stmt_list to zap entire function.
4190 * parser.c (cp_parser_compound_statement): Update commentary.
4191 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
4192 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
4193 (finish_stmt_expr): Don't look through COMPOUND_STMT.
4195 2004-06-16 Geoffrey Keating <geoffk@apple.com>
4197 * pt.c (mark_decl_instantiated): Don't call defer_fn.
4199 2004-06-16 Richard Henderson <rth@redhat.com>
4201 * parser.c (cp_parser_labeled_statement): Update commentary.
4202 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
4203 * tree.c (mark_local_for_remap_r): Likewise.
4205 2004-06-16 Richard Henderson <rth@redhat.com>
4207 * parser.c (cp_parser_asm_definition): Update commentary.
4208 * pt.c (tsubst_expr): Use ASM_EXPR.
4209 * semantics.c (finish_asm_stmt): Likewise.
4211 2004-06-16 Richard Henderson <rth@redhat.com>
4213 * decl.c (finish_destructor_body): Use LABEL_EXPR.
4214 * parser.c (cp_parser_statement): Update commentary.
4215 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
4216 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
4217 * tree.c (mark_local_for_remap_r): Likewise.
4219 2004-06-16 Richard Henderson <rth@redhat.com>
4222 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
4223 statement in FOR_INIT_STMT for templates.
4225 2004-06-15 Richard Henderson <rth@redhat.com>
4227 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
4228 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
4229 (genericize_try_block): Use gimplify_stmt.
4230 (genericize_catch_block, genericize_eh_spec_block): Likewise.
4231 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
4232 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
4233 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
4234 (cp_tree_chain_matters_p): Remove.
4235 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
4236 (COMPOUND_STMT_BODY_BLOCK): New.
4237 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
4238 (EXPR_STMT_STMT_EXPR_RESULT): New.
4239 (building_stmt_tree): Check cur_stmt_list.
4240 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
4241 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
4242 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
4243 (cp_finish_decl): Use push_cleanup.
4244 (start_function, finish_function): Use statement lists.
4245 (finish_stmt): Do nothing.
4246 * except.c (begin_eh_spec_block): Use statement lists.
4247 (check_handlers_1, check_handlers): Likewise.
4248 * init.c (construct_virtual_base): Don't add extra compound stmts.
4249 (build_vec_init): Likewise.
4250 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
4251 * name-lookup.h (struct cp_binding_level): Add statement_list.
4252 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
4253 (cp_parser_labeled_statement, cp_parser_expression_statement,
4254 cp_parser_statement_seq_opt): Likewise.
4255 (cp_parser_compound_statement): Likewise. Take bool for try block.
4256 (cp_parser_selection_statement): Tidy if processing.
4257 (cp_parser_already_scoped_statement): Rewrite to do what it says.
4258 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
4259 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
4260 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
4261 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
4262 (finish_cond): New, rewritten from FINISH_COND.
4263 (simplify_loop_decl_cond): New.
4264 (finish_expr_stmt): Avoid nested EXPR_STMTs.
4265 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
4266 begin_else_clause, finish_else_clause, finish_if_stmt,
4267 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
4268 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
4269 finish_for_cond, finish_for_stmt, begin_switch_stmt,
4270 finish_switch_cond, finish_switch_stmt, begin_try_block,
4271 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
4272 finish_handler_sequence, finish_function_handler_sequence,
4273 begin_handler, finish_handler_parms, finish_handler,
4274 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
4275 using statement lists.
4276 (begin_compound_stmt): Replace has_no_scope argument with flags.
4277 Update all callers. Use statement lists.
4278 (finish_compound_stmt): Likewise.
4279 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
4280 (current_scope_stmt_stack): Remove.
4281 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
4282 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
4283 Rewrite with statement lists.
4285 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
4287 * parser.c: Change all assignments of c_lex_string_translate
4288 to true and false to 1 and 0.
4289 (cp_lexer_read_token): Convert type of the translated string.
4290 (cp_parser_skip_to_closing_parentheses): Preserve original
4291 value of c_lex_string_translate, and set it to -1 while
4293 (cp_parser_cache_group): Likewise.
4294 (cp_parser_cache_group_1): Renamed.
4295 (cp_parser_asm_operand_list): Remove redundant setting of
4296 c_lex_string_translate.
4297 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
4298 Handle chained strings.
4300 2004-06-12 Andrew Pinski <apinski@apple.com>
4304 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4306 * cp-tree.h: Fix typo.
4308 * cp-tree.h: Include cgraph.h
4309 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4310 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4312 2004-06-12 Jason Merrill <jason@redhat.com>
4314 PR tree-optimization/14107
4315 * decl.c (finish_function): Warn about no return in all functions.
4317 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
4319 * cp-tree.h (struct language_function): Remove cannot_inline.
4320 * decl.c (save_function_data): cannot_inline is no more.
4321 (cxx_push_function_context): Likewise.
4322 * decl2.c (start_objects, start_static_storage_duration_function):
4323 Reset DECL_INLINE, set DECL_UNINLINABLE.
4325 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4328 * search.c (lookup_field): Propagate the ambiguity list.
4329 (lookup_fnfields): Likewise.
4331 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4334 * parser.c (cp_parser_template_name): Ctors/dtors never need a
4335 template keyword to disambiguate.
4337 2004-06-14 Mark Mitchell <mark@codesourcery.com>
4340 * decl.c (grokdeclarator): Ignore pointer-to-members when
4341 computing template depth.
4344 * name-lookup.c (pushtag): Do not try to put class declarations in
4345 explicit specialization scopes.
4347 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
4349 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
4351 2004-06-11 Mark Mitchell <mark@codesourcery.com>
4354 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
4355 bindings for undeclared built-ins.
4357 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4359 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
4360 appear at the correct location.
4362 2004-06-10 Jason Merrill <jason@redhat.com>
4366 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4367 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4368 TREE_TYPE for non-dependent names.
4369 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4370 unknown_type_node as its TREE_TYPE.
4371 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4372 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4373 (dump_expr) <SCOPE_REF case>: Likewise.
4375 2004-06-10 Mark Mitchell <mark@codesourcery.com>
4378 * parser.c (cp_parser_direct_declarator): Robustify.
4381 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
4382 constants in non-dependent contexts.
4386 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
4389 2004-06-10 Jakub Jelinek <jakub@redhat.com>
4392 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
4395 2004-06-09 Mark Mitchell <mark@codesourcery.com>
4399 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4400 * lex.c (handle_pragma_interface): Deprecate.
4401 (handle_pragma_implementation): Likewise.
4403 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
4405 * g++spec.c (lang_specific_driver): Remove check for -lm
4406 and -lmath when check it see if it was the math library.
4408 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4411 * parser.c (cp_parser_direct_declarator): Reject constructor named
4412 as qualified template-id.
4414 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4417 * lex.c (handle_pragma_interface): Deprecate.
4418 (handle_pragma_implementation): Likewise.
4420 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4423 * parser.c (cp_parser_iteration_statement): Fix typo in error
4427 * pt.c (tsubst_default_argument): Do not defer access checks
4428 while substituting into the default argument.
4431 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
4432 constant in a non-dependent context.
4435 * except.c (build_throw): Ensure that temp_expr has been
4438 2004-06-06 Roger Sayle <roger@eyesopen.com>
4440 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
4442 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4445 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
4446 'typename', and accept 'template'.
4448 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
4449 Jan Hubicka <jh@suse.cz>
4452 * method.c (use_think): Do not mark thunk as referenced.
4454 2004-06-03 Matt Austern <austern@apple.com>
4457 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
4458 is nonzero, and if we see a noninline definition of a key method,
4459 make the vtables nonweak.
4461 2004-06-02 Matt Austern <austern@apple.com>
4463 * cp-tree.h (instantiate_decl): new boolean parameter,
4464 undefined_ok. Current behavior is equivalent to its being 0.
4465 * decl2.c (mark_used): Add new argument when calling instantiate_decl
4466 * pt.c (mark_decl_instantiated): Unconditionally make
4467 instantiations explicit unconditionally
4468 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
4469 since mark_decl_instantiated now does it.
4470 (instantiate_class_member): New. Instantiate a member of an
4471 explicitly instantiated class template.
4472 (do_type_instantiation): Explicitly instantiate members of an
4473 explicitly instantiated class template.
4474 (instantiate_decl): if undefined_ok is nonzero, and if we're
4475 trying to explicitly instantiated a template with no definition,
4476 change it to an implicit instantiation.
4477 (instantiate_pending_templates): Add new argument to instantiate_decl.
4478 * tree.c (cp_cannot_inline_tree_fn): Likewise.
4480 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4482 * cp-tree.h: Fix typo.
4484 * cp-tree.h: Include cgraph.h
4485 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4486 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4488 2004-06-01 Jason Merrill <jason@redhat.com>
4491 * call.c (call_builtin_trap): Remove type parm.
4492 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
4493 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
4495 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4498 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4499 TREE_TYPE for non-dependent names.
4500 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4501 unknown_type_node as its TREE_TYPE.
4502 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4503 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4504 (dump_expr) <SCOPE_REF case>: Likewise.
4506 2004-06-01 Richard Henderson <rth@redhat.com>
4507 Andrew Pinski <pinskia@physics.uc.edu>
4509 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
4510 * parser.c (struct cp_parser): Remove in_offsetof.
4511 (cp_parser_new): Don't set it.
4512 (cp_parser_unary_expression): Don't check it.
4513 (cp_parser_postfix_open_square_expression): Split out from ...
4514 (cp_parser_postfix_expression): ... here.
4515 (cp_parser_postfix_dot_deref_expression): Likewise.
4516 (cp_parser_builtin_offsetof): New.
4517 (cp_parser_primary_expression): Use it.
4519 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4522 * parser.c (cp_parser_postfix_expression): Allow subscript
4523 operator in offsetof.
4525 2004-05-31 Mark Mitchell <mark@codesourcery.com>
4528 * friend.c (add_friend): Do not try to perform access checks for
4529 functions from dependent classes.
4531 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4533 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
4534 (pp_cxx_begin_template_argument_list): Turn into a function.
4535 (pp_cxx_end_template_argument_list): Likewise.
4536 (pp_cxx_separate_with): Define.
4537 (pp_cxx_unqualified_id): Tidy.
4538 (pp_cxx_primary_expression): Likewise.
4539 (pp_cxx_postfix_expression): Likewise.
4540 (pp_cxx_expression): Likewise.
4541 (pp_cxx_simple_type_specifier): Likewise.
4542 (pp_cxx_type_specifier_seq): Likewise.
4543 (pp_cxx_parameter_declaration_clause): Likewise.
4544 (pp_cxx_exception_specification): Likewise.
4545 (pp_cxx_direct_declarator): Likewise.
4546 (pp_cxx_type_id): Likewise.
4547 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
4549 (pp_cxx_left_paren): Likewise.
4550 (pp_cxx_right_paren): Likewise.
4551 (pp_cxx_left_brace): Likewise.
4552 (pp_cxx_right_brace): Likewise.
4553 (pp_cxx_left_bracket): Likewise.
4554 (pp_cxx_right_bracket): Likewise.
4555 (pp_cxx_dot): Likewise.
4556 (pp_cxx_identifier): Likewise.
4557 (pp_cxx_tree_identifier): Likewise.
4558 (pp_cxx_ampersand): New macro.
4559 (pp_cxx_star): Likewise.
4560 (pp_cxx_arrow): Likewise.
4561 (pp_cxx_semicolon): Likewise.
4562 (pp_cxx_complement): Likewise.
4563 (pp_cxx_begin_template_argument_list): Declaree.
4564 (pp_cxx_end_template_argument_list): Likewise.
4565 (pp_cxx_colon_colon): likewise.
4567 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4569 * parser.c (cp_parser_simple_type_specifier): Explicitly test
4572 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
4574 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
4575 typeck.c: Fix comment formatting.
4577 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
4579 * cp-lang.c (cp_expand_decl): Remove.
4580 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
4582 2004-05-30 Andreas Jaeger <aj@suse.de>
4584 * lang-specs.h: Add missing initializers for .ii.
4586 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
4588 * decl.c (cp_make_fname_decl): Free return value from
4591 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4594 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
4596 * init.c (build_new): Likewise.
4599 * name-lookup.c (arg_assoc): Robustify.
4602 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
4603 when determining the scope to use for a pointer to member.
4604 (lookup_anon_field): Give it external linkage.
4605 * cp-tree.h (lookup_anon_field): Declare it.
4606 * expr.c (cplus_expand_constant): Use it.
4608 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4611 * parser.c (cp_parser_simple_type_specifier): Call
4612 maybe_note_name_used_in_class.
4614 2004-05-28 Tom Marshall <tmarshall@real.com>
4617 * class.c (finish_struct_1): Warn only if the dtor is non-private or
4618 the class has friends.
4620 2004-05-27 Adam Nemet <anemet@lnxw.com>
4623 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
4624 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
4626 2004-05-24 Geoffrey Keating <geoffk@apple.com>
4628 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
4629 if it might be needed.
4630 * pt.c (mark_decl_instantiated): Only call defer_fn if
4631 the function actually needs processing in finish_file.
4632 * decl2.c (finish_file): Add check that elements in
4633 deferred_fns_used are really needed there. Remove unnecessary
4634 test of DECL_SAVED_TREE.
4636 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
4638 * Make-lang.in: No need to specify $(LIBCPP).
4640 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4643 * parser.c (cp_parser_class_head): Robustify.
4646 * parser.c (cp_parser_decl_specifier_seq): Correct error in
4648 (cp_parser_constructor_declarator_p): Treat attributes
4652 * typeck.c (build_unary_op): Do not attempt to resolve casts to
4653 base classes in templates.
4655 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4658 * pt.c (instantiate_template): Robustify.
4660 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4663 * decl.c (xref_tag): Issue errors about redeclaring template
4664 classes as non-template classes.
4666 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4669 * name-lookup.c (supplement_binding): Allow redefinitions of
4673 * parser.c (cp_parser_template_argument): Robustify.
4675 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4677 * class.c (alter_access): Use %E format specifier to print an
4678 identifier node. Avoid looking at the IDENTIFIER_POINTER.
4679 (push_lang_context): Likewise.
4680 * decl.c (lookup_label): Likewise.
4681 (grokdeclarator): Likewise.
4682 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
4683 * pt.c (do_type_instantiation): Likewise.
4684 * tree.c (handle_java_interface_attribute): Likewise.
4685 (handle_com_interface_attribute): Likewise.
4686 (handle_init_priority_attribute): Likewise.
4688 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4692 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
4693 recognized as overloaded functions.
4695 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4698 * class.c (layout_nonempty_base_or_field): Do not try to avoid
4699 layout conflicts for unions.
4702 * typeck.c (build_x_unary_op): Instantiate template class
4703 specializations before looking for "operator &".
4706 * typeck.c (complete_type): Layout non-dependent array types, even
4710 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
4713 2004-05-22 Roger Sayle <roger@eyesopen.com>
4715 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
4716 returning when TREE_TYPE is error_mark_node.
4717 * typeck.c (require_complete_type): Return error_mark_node if
4718 value's type is an error_mark_node.
4720 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
4722 * optimize.c (calls_setjmp_r): Remove.
4723 (calls_setjmp_p): Remove.
4724 * cp-tree.c (calls_setjmp_p): Remove.
4725 * decl.c (finish_function): Do not call calls_setjmp_p.
4727 2004-05-18 Zack Weinberg <zack@codesourcery.com>
4729 * decl.c (cp_finish_decl): Use mark_decl_referenced.
4730 * decl2.c (maybe_make_one_only): Likewise.
4731 * method.c (use_thunk): Likewise.
4733 2004-05-18 Jason Merrill <jason@redhat.com>
4735 * class.c (build_base_path): Tidy a bit.
4737 2004-05-14 Geoffrey Keating <geoffk@apple.com>
4739 * name-lookup.c (struct scope_binding): New.
4740 (EMPTY_SCOPE_BINDING): New.
4741 (lookup_using_namespace): Take a scope_binding instead of a
4743 (qualified_lookup_using_namespace): Likewise.
4744 (cxx_binding_clear): Delete.
4745 (do_nonmember_using_decl): Use a scope_binding instead of a
4747 (lookup_tag): Don't call select_decl.
4748 (ambiguous_decl): Don't return anything (and change callers to match).
4749 Take a scope_binding as the second parameter.
4750 (lookup_namespace_name): Use a scope_binding instead of a
4752 (unqualified_namespace_lookup): Likewise.
4753 (lookup_qualified_name): Likewise.
4754 (select_decl): Take a scope_binding instead of a cxx_binding.
4755 Use macros rather than hand-coding tests for type-ness.
4757 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4759 * cp-gimplify.c: Rename from cp-simplify.c.
4760 * Make-lang.in, optimize.c: Update.
4762 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4764 Merge from tree-ssa-20020619-branch. See
4765 ChangeLog.tree-ssa for details.
4767 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
4768 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
4769 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
4770 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
4772 * cp-mudflap.c: New file.
4773 * cp-simplify.c:: New file.
4775 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4778 * decl2.c (check_classfn): For member templates, compare also the
4779 template parameters to match the declaration.
4780 * cp-tree.h: Adjust declaration of check_classfn.
4781 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
4782 * friend.c (do_friend): Likewise.
4783 * pt.c (tsubst_friend_function): Likewise.
4785 2004-05-01 Zack Weinberg <zack@codesourcery.com>
4787 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
4788 Instead, dig into the representation type to find the array bound.
4790 2004-04-30 Jason Merrill <jason@redhat.com>
4792 Refer to base members using COMPONENT_REFs where possible.
4793 * class.c (build_simple_base_path): New fn.
4794 (build_base_path): Use it for non-virtual base references.
4795 (layout_class_type): Change base fields to their real type
4796 after layout is done.
4797 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
4798 * cp-lang.c (cxx_get_alias_set): Use it.
4800 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
4802 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
4805 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4808 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
4809 used in integral constant expressions.
4811 2004-04-22 Mark Mitchell <mark@codesourcery.com>
4813 * init.c (build_aggr_init): Fix accidental use of C99 construct in
4816 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
4818 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
4819 * decl.c (reshape_init): Use it.
4820 * init.c (perform_member_init): Remove redundant condition.
4821 (build_aggr_init): Adjust to handle brace-enclosed initializers
4823 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4825 * parser.c (cp_parser_initializer_clause): Do not set
4826 TREE_HAS_CONSTRUCTOR on the initializer.
4827 * rtti.c (tinfo_base_init): Likewise.
4828 (generic_initializer): Likewise.
4829 (ptr_initializer): Likewise.
4830 (ptm_initializer): Likewise.
4831 (class_initializer): Likewise.
4832 (get_pseudo_ti_init): Likewise.
4833 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4835 2004-04-22 Alan Modra <amodra@bigpond.net.au>
4837 * name-lookup.c (anonymous_namespace_name): Make static.
4839 2004-04-19 Roger Sayle <roger@eyesopen.com>
4842 * class.c (build_base_path): Call fold whilst building the NULL
4843 pointer check expression trees.
4845 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
4847 * init.c (build_new_1): Don't use type size argument for Java
4848 _Jv_AllocObject call.
4850 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
4852 * method.c (make_alias_for_thunk): Remove preprocessor guard on
4853 declaration and definition.
4855 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
4858 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
4859 than ASM_OUTPUT_DEF.
4861 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4863 * decl2.c (mark_used): Don't segfault if cfun != NULL but
4864 current_function_decl == NULL.
4866 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
4869 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
4872 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4874 * init.c (decl_constant_value): Don't look at DECL_INITIAL
4876 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
4877 or TREE_SIDE_EFFECTS of a type.
4879 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
4882 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
4883 cv-qualifier unification.
4884 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
4886 2004-04-02 Jan Hubicka <jh@suse.cz>
4888 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
4889 * cp-tree.h (cp_update_decl_after_saving): Declare.
4890 * tree.c (cp_update_decl_after_saving): Define.
4892 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4895 * typeck.c (get_delta_difference): Call fold before returning the
4898 2004-04-01 Richard Henderson <rth@redhat.com>
4901 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
4902 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
4904 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4907 * name-lookup.c (maybe_push_cleanup_level): Robustify.
4909 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4911 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
4913 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4915 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
4916 * class.c (check_bitfield_decl): Likewise.
4917 * cvt.c (type_promotes_to): Likewise.
4918 * decl.c (finish_enum): Likewise.
4919 * mangle.c (write_builtin_type): Likewise.
4920 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
4921 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
4922 (build_binary_op): Likewise.
4924 2004-03-31 Jan Hubicka <jh@suse.cz>
4926 * tree.h (optimize_function): Kill prototype.
4927 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
4928 * semantics.c (expand_body): Kill.
4930 2004-03-30 Mark Mitchell <mark@codesourcery.com>
4933 * decl.c (start_decl_1): Do not decide whether or not to create a
4934 new cleanup level until after the type has been completed.
4937 * pt.c (tsubst_default_argument): Clear current_function_decl.
4939 2004-03-30 Zack Weinberg <zack@codesourcery.com>
4941 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
4943 2004-03-29 Zack Weinberg <zack@codesourcery.com>
4945 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
4946 is null, just print the literal name and return.
4948 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
4950 * cxx-pretty-print.c: Fix comment typos.
4952 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
4954 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
4957 2004-03-23 Ziemowit Laski <zlaski@apple.com>
4959 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
4960 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
4963 2004-03-23 Zack Weinberg <zack@codesourcery.com>
4965 PR 12267, 12391, 12560, 13129, 14114, 14133
4966 * cp-lang.c (c_reset_state): Delete.
4967 (push_file_scope, pop_file_scope): New stubs.
4968 * parser.c (c_parse_file): Call sorry() here if called more than once.
4970 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4972 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
4975 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4977 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
4979 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
4981 * error.c (enum pad): Remove.
4982 (dump_qualifiers): Likewise.
4983 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
4984 (dump_aggr_type): Likewise.
4985 (dump_type_suffix): Likewise.
4986 (dump_simple_decl): Likewise.
4987 (dump_function_decl): Likewise.
4988 (cv_to_string): Likewise.
4989 (dump_type_prefix): Likewise. Adjust return void.
4990 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
4992 (pp_cxx_template_keyword_if_needed): Document.
4993 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
4994 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
4995 MUST_NOT_THROW_EXPR.
4997 2004-03-21 Mark Mitchell <mark@codesourcery.com>
5000 * decl.c (cp_finish_decl): Compute the size of arrays declared in
5001 templates, if their type is non-dependent.
5003 2004-03-19 Mark Mitchell <mark@codesourcery.com>
5005 * call.c (build_op_delete_call): Do not forget the placement
5006 arguments when iterating through mutiple delete operators.
5008 * cp-tree.h (svaed_scope): Remove last_parms.
5009 (NEW_DELETE_OPNAME_P): New macro.
5010 (last_function_parms): Remove.
5011 (do_friend): Adjust prototype.
5012 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
5013 using last_function_parms.
5014 (grokfndecl): Take the PARM_DECLs as an argument, rather than
5015 using last_function_parms.
5016 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
5017 for class-specific operator new and operator delete.
5018 (grok_op_properties): Do not look for allocation functions with
5020 (start_function): Use DECL_ARGUMENTS instead of
5021 last_function_parms.
5022 * decl.h (last_function_parms): Do not declare.
5023 * decl2.c (grokclassfn): Do not use last_function_parms.
5024 * friend.c (do_friend): Remove parmdecls parameter.
5025 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
5026 (pop_from_top_level): Do not restore it.
5027 * pt.c (check_explicit_specialization): Do not adjust
5028 last_function_parms.
5030 * name-lookup.c (do_local_using_decl): Create a local binding for
5031 types brought in via using declarations.
5033 * name-lookup.c (lookup_arg_dependent): Handle block-scope
5034 function declarations correctly.
5036 * semantics.c (finish_id_expression): Correct handling of
5037 conversion operators to dependent types.
5039 * typeck.c (lookup_destructor): Allow the use of destructors from
5042 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5044 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
5045 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
5046 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
5047 the field is named TEMPLATE_TYPE_PARM_INDEX.
5049 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5052 * parser.c (cp_parser_functional_cast): A cast to anything
5053 but integral or enumaration type is not an integral constant
5055 * pt.c (value_dependent_expression_p): Handle cast expressions
5056 without operands (such as "int()").
5058 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5060 * semantics.c (finish_pseudo_destructor_expr): Allow differing
5061 cv-qualification between the type named by the
5062 pseudo-destructor-name and the object-type.
5064 * search.c (accessible_base_p): Handle non-proper bases.
5066 * name-lookup.c (do_nonmember_using_decl): If a using declaration
5067 refers to a single overloaded function, set the type of the
5069 * tree.c (lvalue_type): Simplify.
5070 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
5072 (build_unary_op): Handle OVERLOADs with known types.
5074 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
5077 * parser.c (cp_parser_postfix_expression): Handle the use of
5078 "typename" in non-dependent contexts. Convert appropriately when
5079 when using a qualified name after "->" or ".".
5081 * call.c (conditional_conversion): Honor the requirement that some
5082 conversions refer to the original object.
5084 2004-03-18 Mark Mitchell <mark@codesourcery.com>
5086 * call.c (build_conditional_expr): Do not call force_rvalue for
5087 operands of void_type when the conditional expression itself has
5089 * name-lookup.c (pushdecl): Don't consider a declaration of a
5090 function named "main" to be an overload of a type named "main".
5091 * parser.c (cp_parser_template_name): Perform name lookup when the
5092 template name is proceeded by "template" if the qualifying scope
5094 * typeck.c (composite_pointer_type_r): Correctly handle
5095 pointer-to-member types.
5096 (build_const_cast): Likewise.
5098 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5100 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
5101 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
5102 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
5103 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
5104 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
5105 (TYPEOF_TYPE_EXPR): New macro.
5106 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
5107 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
5108 * pt.c (tsubst): Likewise.
5109 * semantics.c (finish_typeof): Likewise.
5110 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
5111 and TEMPLATE_TYPE_PARM.
5112 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
5113 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
5115 2004-03-16 Mark Mitchell <mark@codesourcery.com>
5118 * cp-tree.h (build_new_op): Change prototype.
5119 (build_x_binary_op): Likewise.
5120 * call.c (build_new_op): Add overloaded_p parameter.
5121 * decl2.c (grok_array_decl): Adjust call to build_new_op.
5122 * parser.c (cp_parser_binary_expression): Note that uses of
5123 overloaded operators prevents an expression from being considered
5124 an integral constant.
5125 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
5127 * semantics.c (finish_call_expr): Likewise.
5128 * typeck.c (rationalize_conditional_expr): Likewise.
5129 (build_x_indirect_ref): Likewise.
5130 (build_x_binary_op): Likewise.
5131 (build_x_unary_op): Likewise.
5132 (build_x_compound_expr): Likewise.
5133 (build_modify_expr): Likewise.
5134 * typeck2.c (build_x_arrow): Likewise.
5136 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
5138 * cp-lang.c, ptree.c: Update copyright.
5140 2004-03-13 Mark Mitchell <mark@codesourcery.com>
5143 * parser.c (cp_parser_non_integral_constant_expression): Encode
5144 more of the idiom that surrounded calls to this function within
5146 (cp_parser_primary_expression): Adjust accordingly.
5147 (cp_parser_postfix_expression): Likewise.
5148 (cp_parser_unary_expression): Likewise.
5149 (cp_parser_cast_expression): Likewise.
5150 (cp_parser_assignment_expression): Likewise.
5151 (cp_parser_expression): Likewise.
5152 (cp_parser_new_expression): Note that new-expressions are not
5153 allowed in integral constant expressions.
5154 (cp_parser_delete_expression): Likewise.
5156 2004-03-12 Matt Austern <austern@apple.com>
5158 * decl2.c (maybe_make_one_only): Look at
5159 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
5160 to make an explicit instantiation weak.
5161 * method.c (use_thunk): Make sure we call comdat_linkage
5163 * pt.c (do_type_instantiation): On systems where weak symbols
5164 don't go in a static archive's TOC, explicit instantiation of a
5165 class must imply *explicit* instantiation of its memeber.
5167 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
5169 * call.c, cp-tree.h, pt.c: Fix comment typos.
5171 2004-03-10 Mark Mitchell <mark@codesourcery.com>
5174 * decl.c (xref_tag): Disregard non-type declarations when
5175 looking up a tagged type.
5177 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
5180 * call.c (convert_like_real): Build a const qualified temporary,
5181 when testing ctor access.
5183 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5185 * call.c (initialize_reference): Fix typo.
5187 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5190 * pt.c (determine_specialization): For member templates, match also
5194 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
5196 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
5198 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5201 * call.c (initialize_reference): Handle initializers that are
5202 class-member access expressions applies to rvalues.
5204 2004-03-09 Mark Mitchell <mark@codesourcery.com>
5207 * name-lookup.c (supplement_binding): Ignore functions that are
5208 marked DECL_ANTICIPATED.
5210 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5213 * class.c (check_field_decls): Complain about non-static data
5214 members of reference type in unions. Propagate
5215 CLASSTYPE_REF_FIELDS_NEED_INIT and
5216 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
5218 * init.c (perform_member_init): Complain about mbmers with const
5219 type that are not explicitly initialized.
5221 2004-03-08 Mark Mitchell <mark@codesourcery.com>
5223 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
5224 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
5225 (lang_identifier): Remove implicit_decl and error_locus.
5226 (IDENTIFIER_IMPLICIT_DECL): Remove.
5227 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
5228 (IDENTIFIER_ERROR_LOCUS): Likewise.
5229 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
5230 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
5231 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5232 (implicitly_declare): Remove.
5233 * decl.c (warn_extern_redeclared_static): Remove check of
5234 IDENTIFIER_IMPLICIT_DECL.
5235 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
5236 (implicitly_declare): Remove.
5237 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
5238 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
5239 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
5240 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
5241 in the innermost scope, rather than at namespace scope.
5242 * name-lookup.c (push_local_binding): Give it external linkage.
5243 (pushdecl): Remove dead code.
5244 * name-lookup.h (push_local_binding): Declare it.
5245 * ptree.c (cxx_print_identifier): Don't print
5246 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
5247 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
5248 not IDENTIFIER_ERROR_LOCUS.
5249 * typeck.c (build_function_call): Remove dead code.
5251 2004-03-08 Jason Merrill <jason@redhat.com>
5254 * decl.c (xref_tag): Remove attribute handling.
5255 * cp-tree.h: Adjust prototype.
5256 * decl.c, parser.c, rtti.c: Adjust callers.
5257 * parser.c (cp_parser_class_head): Pass back attributes in the
5259 (cp_parser_class_specifier): Adjust.
5261 2004-03-08 Matt Austern <austern@apple.com>
5264 * name-lookup.c (add_decl_to_level): Add extern variables, as well
5265 as static, to static_decls array.
5267 2004-03-05 Jason Merrill <jason@redhat.com>
5269 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
5271 2004-03-04 Geoffrey Keating <geoffk@apple.com>
5273 * decl.c (grokfndecl): Update old incorrect comment.
5274 (grokvardecl): Diagnose C++ variables of type with no linkage.
5276 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5279 * pt.c (build_non_dependent_expr): Do not create a
5280 NON_DEPENDENT_EXPR for a THROW_EXPR.
5282 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5285 * error.c (dump_expr): Handle THROW_EXPR.
5287 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5290 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
5291 lookup if ordinary name-lookup finds a non-function.
5292 * pt.c (tsubst_copy_and_build): Likewise.
5295 * parser.c (cp_parser_late_parsing_default_args): Check that there
5296 are no extra tokens after the end of the default-argument
5299 2004-03-01 Mark Mitchell <mark@codesourcery.com>
5302 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
5303 having C++ linkage for name-mangling purposes.
5306 * parser.c (cp_parser_direct_declarator): Recognize constructor
5307 declarators that use a template-id to name the class being
5311 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
5312 (tsubst_expr): Do not call tsubst_copy, even when
5313 processing_template_decl.
5315 2004-03-01 Jeff Law <law@redhat.com>
5317 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
5320 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5323 * name-lookup.h (push_scope): Change prototype.
5324 * name-lookup.c (push_scope): Do not reenter the current class
5326 * decl.c (grokfndecl): Check return code from push_scope before
5328 * decl2.c (check_classfn): Likewise.
5329 * parser.c (cp_parser_conversion_function_id): Likewise.
5330 (cp_parser_init_declarator): Likewise.
5331 (cp_parser_direct_declarator): Likewise.
5332 (cp_parser_class_specifier): Likewise.
5333 (cp_parser_class_head): Likewise.
5334 (cp_parser_lookup_name): Likewise.
5335 (cp_parser_constructor_declarator_p): Likewise.
5336 * pt.c (instantiate_class_template): Likewise.
5337 (resolve_typename_type): Likewise.
5339 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5342 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
5346 * class.c (update_vtable_entry_for_fn): Do not go through
5347 covariance machinery if the type returned by an overrider is the
5348 same as the original.
5350 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
5352 * call.c: Fix a comment typo.
5354 2004-02-27 Ziemowit Laski <zlaski@apple.com>
5356 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
5358 2004-02-26 Mark Mitchell <mark@codesourcery.com>
5361 * parser.c (cp_parser_parameter_declaration_list): Commit
5362 to fewer tentative parses.
5364 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5367 * pt.c (dependent_type_p_r): A template template parameter is a
5370 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5373 * mangle.c (write_template_arg_literal): Don't rely on identity for
5376 2004-02-24 Jason Merrill <jason@redhat.com>
5378 * tree.c (build_exception_variant): Use check_qualified_type.
5380 2004-02-23 Zack Weinberg <zack@codesourcery.com>
5381 Kazu Hirata <kazu@cs.umass.edu>
5383 * decl.c (cxx_init_decl_processing): Don't check
5384 flag_writable_strings.
5386 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
5389 * typeck.c (maybe_warn_about_returning_address_of_location):
5390 Change check for VAR_DECL to use DECL_P instead.
5392 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5395 * cvt.c (build_expr_type_conversion): Type must be complete before
5396 looking up for conversions.
5398 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5401 * name-lookup.c (arg_assoc_class): Don't look into template
5402 arguments if it is not a primary template.
5404 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5407 * method.c (use_thunk): Always clone function argument tree.
5409 2004-02-20 Mark Mitchell <mark@codesourcery.com>
5412 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
5415 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
5416 for all type variants.
5418 2004-02-19 Mark Mitchell <mark@codesourcery.com>
5421 * decl.c (duplicate_decls): Return error_mark_node for invalid
5423 * name-lookup.c (push_namespace): Ignore the return value from
5425 * pt.c (push_template_decl_real): Robustify.
5428 * name-lookup.c (push_class_level_binding): Do not complain about
5429 adding a binding for a member whose name is the same as the
5430 enclosing class if the member is located in a base class of the
5433 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5436 * parser.c (cp_parser_new_expression): Parse an ill-formed
5437 direct-new-declarator after a parenthesized type-id to emit good
5440 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
5442 * cp-tree.def, cvt.c: Update copyright.
5444 2004-02-17 Mark Mitchell <mark@codesourcery.com>
5447 * cp-tree.h (abi_version_at_least): Remove.
5448 * mangle.c: Include flags.h.
5450 2004-02-15 Mark Mitchell <mark@codesourcery.com>
5453 * call.c (build_conditional_expr): Handle conversions between
5454 class types which result in differently cv-qualified type
5458 * class.c (delete_duplicate_fields_1): Remove.
5459 (delete_duplicate_fields): Likewise.
5460 (finish_struct_anon): Remove check for members with the same name
5461 as their enclosing class.
5462 (check_field_decls): Do not call duplicate_fields.
5463 * decl.c (grokdeclarator): Remove check for static data members
5464 with the same name as their enclosing class.
5465 * name-lookup.c (push_class_level_binding): Check for members with
5466 the same name as their enclosing class.
5468 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
5471 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
5473 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5476 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
5477 has full set of arguments.
5479 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5482 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
5484 2004-02-13 Mark Mitchell <mark@codesourcery.com>
5487 * cp-tree.h (delete_sanity): Change prototype.
5488 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
5489 Remove dead code. Adjust code to warn about deleting an array.
5490 * typekc.c (decay_conversion): Use build_address and build_nop.
5493 * search.c (accessible_p): Do not check access in thunks.
5496 * call.c (build_conditional_expr): Call force_rvalue on the
5497 non-void operand in the case that one result is a throw-expression
5498 and the other is not.
5500 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
5503 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
5504 the type name and look ahead for ::~, and bail out early with a
5505 better error message if the parse is going to fail.
5507 2004-02-12 Mark Mitchell <mark@codesourcery.com>
5509 * call.c (conversion_kind): New type.
5510 (conversion_rank): Likewise.
5511 (conversion): Likewise.
5512 (CONVERSION_RANK): New macro.
5513 (conversion_obstack): New variable.
5514 (obstack_initialized): Likewise.
5515 (z_candidate): Change type of convs and second_conv.
5516 (candidate_warning): New type.
5517 (IDENTITY_RANK): Remove.
5518 (EXACT_RANK): Likewise.
5519 (PROMO_RANK): Likewise.
5520 (STD_RANK): Likewise.
5521 (PBOOL_RANK): Likewise.
5522 (USER_RANK): Likewise.
5523 (ELLIPSIS_RANK): Likewise.
5524 (BAD_RANK): Likewise.
5525 (ICS_RANK): Likewise.
5526 (ICS_STD_RANK): Likewise.
5527 (ICS_USER_FLAG): Likewise.
5528 (ICS_ELLIPSIS_FLAG): Likewise.
5529 (ICS_THIS_FLAG): Likewise.
5530 (ICS_BAD_FLAG): Likewise.
5531 (NEED_TEMPORARY_P): Likewise.
5532 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
5533 (USER_CONV_CAND): Likewise.
5534 (USER_CONV_FN): Likewise.
5535 (conversion_obstack_alloc): New function.
5536 (alloc_conversion): Likewise.
5537 (validate_conversion_obstack): Likewise.
5538 (alloc_conversions): Likewise.
5539 (build_conv): Adjust to deal with new conversion data structures.
5540 (build_identity_conv): New function.
5541 (build_ambiguous_conv): Likewise.
5542 (standard_conversion): Adjust to deal with new conversion data
5544 (convert_class_to_reference): Likewise.
5545 (direct_reference_binding): Likewise.
5546 (reference_binding): Likewise.
5547 (implicit_conversion): Likewise.
5548 (add_candidate): Likewise.
5549 (add_function_candidate): Likewise.
5550 (add_conv_candidate): Likewise.
5551 (build_builtin_candidate): Likewise.
5552 (print_z_candidate): Likewise.
5553 (merge_conversion_sequences): Likewise.
5554 (build_user_type_conversion_1): Likewise.
5555 (build_user_type_conversion): Likewise.
5556 (build_new_function_call): Likewise.
5557 (build_object_call): Likewise.
5558 (conditional_conversion): Likewise.
5559 (build_conditional_expr): Likewise.
5560 (build_new_op): Likewise.
5561 (build_op_delete_call): Likewise.
5562 (convert_like_real): Likewise.
5563 (build_over_call): Likewise.
5564 (build_new_method_call): Likewise.
5565 (is_subseq): Likewise.
5566 (maybe_handle_implicit_object): Likewise.
5567 (maybe_handle_ref_bind): Likewise.
5568 (compare_ics): Likewise.
5569 (source_type): Likewise.
5570 (add_warning): Likewise.
5572 (can_convert_arg): Likewise.
5573 (can_convert_arg_bad): Likewise.
5574 (perform_implicit_conversion): Likewise.
5575 (perform_direct_initialization_if_possible): Likewise.
5576 (initialize_reference): Likewise.
5577 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
5578 * cp-tree.def (WRAPPER): Likewise.
5579 (IDENTITY_CONV): Remove.
5580 (LVALUE_CONV): Likewise.
5581 (QUAL_CONV): Likewise.
5582 (STD_CONV): Likewise.
5583 (PTR_CONV): Likewise.
5584 (PMEM_CONV): Likewise.
5585 (BASE_CONV): Likewise.
5586 (REF_BIND): Likewise.
5587 (USER_CONV): Likewise.
5588 (AMBIG_CONV): Likewise.
5589 (RVALUE_CONV): Likewise.
5590 * cp-tree.h (tree_wrapper): Remove.
5591 (WRAPPER_ZC): Remove.
5592 (lang_tree_node): Remove wrapper.
5593 (LOOKUP_SPECULATIVELY): Remove.
5594 (build_op_delete_call): Adjust prototype.
5595 (validate_conversion_obstack): Declare.
5596 (build_zc_wrapper): Remove.
5597 * cvt.c (convert_to_reference): Remove dead code.
5598 (ocp_convert): Likewise.
5599 * decl.c (redeclaration_error_message): Correct handling of
5601 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
5602 (cp_tree_node_structure): Remove WRAPPER case.
5603 * decl2.c (finish_file): Call validate_conversion_obstack.
5604 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
5605 (build_op_delete_call): Likewise.
5606 (build_x_delete): Likewise.
5607 (build_delete): Adjust call to build_op_delete_call.
5608 * pt.c (tsubst_friend_declaration): Adjust code to determine
5609 whether or not a friend template is a definition.
5610 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
5611 * tree.c (build_zc_wrapper): Remove.
5613 2004-02-12 Zack Weinberg <zack@codesourcery.com>
5615 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
5616 * cp-tree.h: Don't declare cxx_builtin_type_decls.
5617 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
5618 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
5620 2004-02-10 Mark Mitchell <mark@codesourcery.com>
5622 * typeck.c (lookup_destructor): Fix typo in error message.
5624 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
5626 * call.c, parser.c, tree.c: Fix comment typos.
5628 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5631 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
5632 * decl.c (duplicate_decls, start_function): Likewise.
5634 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5636 * name-lookup.c (pushdecl): Issue shadow warnings directly.
5637 * parser.c (free_parser_stacks): Delete.
5639 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
5641 * rtti.c: Update copyright.
5643 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5646 * decl.c (require_complete_types_for_parms): Do not insert
5647 error_mark_node in the parameter list.
5649 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5652 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
5653 error when terminator can not be found.
5655 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
5657 Make-lang.in (po-generated): Delete.
5659 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
5661 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
5662 targetm.calls.promote_prototypes.
5664 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5668 2004-01-15 Geoffrey Keating <geoffk@apple.com>
5670 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5671 (handle_pragma_implementation): Likewise.
5673 2004-02-05 Mark Mitchell <mark@codesourcery.com>
5676 * typeck.c (lookup_destructor): Tweak error message.
5678 2004-02-05 Jan Hubicka <jh@suse.cz>
5680 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
5683 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5686 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
5687 code, only emits the diagnostic now. Added lookup of the identifier
5688 and support for qualified ids.
5689 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
5690 Parse an (invalid) type name as id-expression within a declarator.
5691 (cp_parser_simple_declaration): Use it.
5692 (cp_parser_member_declaration): Likewise.
5693 (cp_parser_make_typename_type): New function. Handle errors through
5694 cp_parser_diagnose_invalid_typename.
5695 (cp_parser_elaborated_type_specifier): Use it.
5697 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5700 * call.c (convert_like_real): Use "converting" rather than
5701 "argument" as the descriptive keyword to
5702 dubious_conversion_warnings.
5703 * typeck.c (convert_for_assignment): Do not call
5704 dubious_conversion_warnings.
5706 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5709 * init.c (build_delete): Emit a more informative error message in
5710 case of an incomplete type, and on the correct source line.
5712 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
5714 * error.c, search.c: Update copyright.
5716 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5719 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
5720 linkage for the typeinfo name string.
5722 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5725 * cp-tree.h (fold_non_dependent_expr): New function.
5726 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
5727 (cp_parser_template_argument): Use fold_non_dependent_expr.
5728 (cp_parser_direct_declarator): Likewise.
5729 * pt.c (fold_non_dependent_expr): New function.
5730 (convert_nontype_argument): Use it.
5731 (tsubst_qualified_id): Simplify.
5732 (tsubst_copy_and_build): Likewise.
5734 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5736 * decl.c (cxx_push_function_context): Do not set
5737 current_function_is_thunk.
5738 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
5741 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5744 * pt.c (more_specialized_class): Increase processing_template_decl
5745 while partial ordering.
5747 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5750 * decl.c (start_function): Do not call pushdecl for any
5751 instantiation or specialization of a primary template.
5753 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5756 * parser.c (cp_parser_class_name): Robustify.
5759 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
5762 * semantics.c (finish_id_expression): Do not return an
5763 IDENTIFIER_NODE when lookup finds a PARM_DECL.
5765 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5768 * pt.c (build_non_dependent_expr): Do not build
5769 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
5772 * semantics.c (finish_id_expression): Do not return an
5773 IDENTIFIER_NODE when lookup finds a VAR_DECL.
5776 * parser.c (cp_parser_simple_declaration): When skipping to the
5777 end of the statement swallow the terminating semicolon.
5779 2004-02-02 Mark Mitchell <mark@codesourcery.com>
5782 * init.c (build_offset_ref): Improve error recovery for invalid
5783 uses of non-static member functions.
5786 * cp-tree.h (cp_build_type_attribute_variant): New function.
5787 * class.c (build_clone): Use cp_build_type_attribute_variant.
5788 * decl.c (duplicate_decls): Likewise.
5789 * pt.c (copy_default_args_to_explicit_spec): Likewise.
5790 (tsubst_function_type): Likewise.
5791 * tree.c (build_exception_variant): Check attributes before
5792 concluding that two types are the same.
5793 (cp_build_type-attribute_variant): New method.
5794 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
5797 * call.c (convert_class_to_reference): Keep better track of
5798 pedantically invalid user-defined conversions.
5800 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5803 * pt.c (tsubst_qualified_id): Improved error message when a type
5804 is expected but not found.
5806 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
5808 * class.c: Fix comment typos.
5810 * error.c: Likewise.
5811 * parser.c: Likewise.
5813 * search.c: Likewise.
5814 * typeck.c: Likewise.
5816 2004-01-30 Richard Henderson <rth@redhat.com>
5819 * method.c (use_thunk): Don't force_target_expr for void thunks.
5820 * tree.c (build_target_expr_with_type): Assert non-void type.
5821 (force_target_expr): Likewise.
5823 2004-01-30 Michael Matz <matz@suse.de>
5825 * parser.c (cp_parser_labeled_statement): Accept case ranges.
5827 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5831 * decl.c (grokdeclarator): Check immediatly type completeness for
5832 non-dependent types.
5834 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5837 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
5838 a sizeof expression.block
5840 2004-01-29 Mark Mitchell <mark@codesourcery.com>
5843 * mangle.c (write_encoding): Correct encoding of member template
5846 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5848 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
5849 template name as it was `<::' (digraph typo).
5850 (cp_parser_nth_token_starts_template_argument_list_p): New function.
5851 (cp_parser_id_expression): Use it.
5852 (cp_parser_nested_name_specifier_opt): Likewise.
5853 (cp_parser_template_name): Likewise.
5854 (cp_parser_class_name): Likewise.
5855 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
5857 2004-01-28 Mark Mitchell <mark@codesourcery.com>
5860 * typeck.c (merge_types): Do not merge attributes into
5864 * parser.c (cp_parser_direct_declarator): Do not prevent
5865 backtracking inside a parenthesized declarator.
5866 (cp_parser_parameter_declaration): Fix typo in comment.
5868 2004-01-28 Jan Hubicka <jh@suse.cz>
5870 * semantics.c (expand_body) Do emit_associated_thunks before
5873 2004-01-27 Devang Patel <dpatel@apple.com>
5875 * name-lookup.c: Include "debug.h"
5876 (do_namespace_alias): Invoke debug_hooks to emit debug info
5877 for namespace alias.
5878 (do_local_using_decl): Invoke debug_hooks to emit debug info
5880 (do_class_using_decl): Same.
5881 (do_toplevel_using_decl): Same.
5882 (do_using_directive): Same.
5883 (cp_emit_debug_info_for_using): New function.
5884 * Make-lang.in (cp/parser.o): Depend on debug.h
5885 (cp/name-lookup.o): Same.
5887 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5889 * cp-tree.h (language_function, lang_type_header): Use
5891 * name-lookup.h (cp_binding_level): Likewise.
5893 2004-01-26 Mark Mitchell <mark@codesourcery.com>
5896 * semantics.c (finish_for_expr): Check for unresolved overloaded
5899 * class.c (add_method): Just check processing_template_decl to
5900 determine whether or not we are within a template.
5901 * decl2.c (maybe_retrofit_in_chrg): Likewise.
5902 * init.c (decl_constant_value): Check the type of the declaration,
5904 * name-lookup.c (maybe_push_to_top_level): Rename to ...
5905 (push_to_top_level): ... this.
5906 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
5907 * pt.c (push_template_decl_real): Reorder condition for speed.
5908 (convert_template_argument): Use dependency-checking functions in
5909 place of uses_template_parms.
5910 (lookup_template_class): Avoid calling uses_template_parms more
5912 (uses_template_parms): Reimplement, using dependency-checking
5914 (instantiate_class_template): Use push_to_top_level, not
5915 maybe_push_to_top_level.
5916 (type_unification_real): Simplify.
5917 (type_dependent_expression_p): Handle OFFSET_REFs and
5919 (any_dependent_template_arguments_p): Handle multiple levels of
5921 * semantics.c (expand_or_defer_fn): Do not check
5922 uses_template_parms for template instantiations.
5923 * typeck.c (comptypes): Avoid calling cp_type_quals.
5925 2004-01-25 Mark Mitchell <mark@codesourcery.com>
5928 * call.c (build_over_call): Do not convert arguments when
5929 processing a template.
5930 * pt.c (build_non_dependent_expr): Do not build a
5931 NON_DEPENDENT_EXPR for arithmetic constants.
5933 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5936 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
5937 returns a TYPE_DECL. no further lookup is required.
5938 * semantics.c (check_template_template_default_arg): A TYPE_DECL
5939 is invalid. Rework to give better diagnostics.
5941 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5944 * pt.c (instantiate_class_template): Add an error_mark_node
5946 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
5948 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
5951 * decl.c (finish_function): Move the call to
5952 finish_fname_decls below the call to
5953 finish_eh_spec_block.
5955 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5957 * optimize.c, typeck2.c: Update copyright.
5959 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5961 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
5962 init.c, mangle.c, typeck.c: Update copyright.
5964 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5966 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
5968 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5970 * Make-lang.in: Replace $(docdir) with doc.
5971 (c++.info, c++.srcinfo): Dummy entry.
5972 (c++.man, c++.srcman): New rules.
5973 (c++.install-man): Revamp rule.
5975 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5977 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
5978 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
5979 immediate $(shell) instead of deferred backquote.
5981 2004-01-19 Mark Mitchell <mark@codesourcery.com>
5984 * parser.c (cp_parser_postfix_expression): When encountering
5985 incomplete type on left-hand side of "->" or ".", treat the entire
5986 expression as erroneous.
5989 * call.c (build_field_call): Remove.
5990 (n_build_method_call): Likewise.
5991 (build_method_call): Likewise.
5992 (build_new_method_call): Do not call build_field_call.
5993 * class.c (n_build_method_call): Remove.
5994 (print_class_statistics): Do not print it.
5995 * cp-tree.h (build_method_call): Remove declaration.
5996 (finish_object_call_expr): Likewise.
5997 (build_new_1): Do not use build_method_call.
5998 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
5999 when the function appearing on the right-hand-side of "." or "->"
6000 is not actually a function.
6001 * pt.c (tsubst_copy_and_build): Likewise.
6002 * semantics.c (finish_object_call_expr): Remove.
6004 2004-01-18 Mark Mitchell <mark@codesourcery.com>
6007 * pt.c (tsubst): Use finish_typeof.
6009 2004-01-18 Jason Merrill <jason@redhat.com>
6012 * except.c (build_throw): In a template, set
6013 current_function_returns_abnormally.
6015 2004-01-17 Fred Fish <fnf@intrinsity.com>
6018 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
6019 except don't call array_type_nelts() with a VECTOR_TYPE.
6021 2004-01-16 Jan Hubicka <jh@suse.cz>
6023 * mangle.c (write_mangled_name): Remove inline modifier.
6025 2004-01-16 Mark Mitchell <mark@codesourcery.com>
6028 * decl.c (compute_array_index_type): Fix grammar in comment.
6029 * init.c (build_zero_init): Handle zero-sized arrays correctly.
6032 * call.c (name_as_c_string): Print conversion operator names
6036 * call.c (initialize_reference): Pass -1 for inner parameter to
6039 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6042 * parser.c (cp_parser_base_specifier): Check for an invalid
6043 keyword `typename' and emit an user-friendly error message.
6045 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6048 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6049 (handle_pragma_implementation): Likewise.
6051 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6054 * typeck.c (build_class_member_access_expr): Allow to access members
6055 of the currently open class.
6056 (finish_class_member_access_expr): Likewise.
6058 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6061 * name-lookup.c (validate_nonmember_using_decl): Take scope and
6062 name by value, instead of computing them.
6063 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
6064 arguments. Pass them to validate_nonmember_using_decl.
6065 * name-lookup.h (do_local_using_decl): Adjust.
6066 (do_toplevel_using_decl): Likewise.
6067 * parser.c (cp_parser_using_declaration): Likewise.
6068 * pt.c (tsubst_expr): Likewise.
6070 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
6074 * name-lookup.c (qualified_lookup_using_namespace): Search
6075 strongly-associated namespaces first, and only then try other
6078 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6080 * Make-lang.in (c++.srcextra): Dummy entry.
6082 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6085 * parser.c (cp_parser_template_name): Don't try to parse a
6086 conversion-function-id, as it cannot be a template-name.
6087 (cp_parser_simple_type_specifier): Check for invalid template-ids
6088 even after a built-in type.
6090 2004-01-14 Jan Hubicka <jh@suse.cz>
6093 * pt.c (instantiate_decl): Do not increase function_depth.
6095 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
6099 * parser.c (cp_parser_elaborated_type_specifier): Warn about
6100 attributes and discard.
6101 * decl.c (xref_tag): Don't overwite existing attributes with
6104 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6107 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
6108 is no destructor while looking up a BIT_NOT_EXPR.
6110 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
6112 * cxxfilt.c: Remove unused file.
6114 2004-01-14 Jan Hubicka <jh@suse.cz>
6116 Partial fix to PR c++/12850
6117 * decl2.c (mark_used): Do not proactively instantiate templates
6118 when compiling in unit-at-a-time or not optimizing.
6119 * optimize.c (maybe_clone_body): Do not increase function depth.
6121 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6124 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
6126 2004-01-12 Steven Bosscher <stevenb@suse.de>
6129 * parser.c (cp_parser_member_declaration): Any non-type is also
6130 not a class or a function.
6132 2004-01-12 Jason Merrill <jason@redhat.com>
6135 * class.c (build_base_path): Do not mark vtable references as
6137 (build_vtbl_ref_1): Likewise.
6139 2004-01-12 Richard Henderson <rth@redhat.com>
6142 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
6143 (store_init_value): Use it.
6144 * decl.c (check_initializer): Expect full initialization code
6145 from store_init_value.
6146 * init.c (expand_aggr_init_1): Likewise.
6147 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
6149 2004-01-12 Mark Mitchell <mark@codesourcery.com>
6151 * class.c (layout_class_type): For non-POD class types, also copy
6152 the DECL_SIZE and DECL_MODE of fields to the base class type.
6154 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6157 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
6158 calling regenerate_decl_from_template.
6160 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
6163 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
6164 decl-specifier occurring along with a class definition.
6166 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
6168 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
6169 clauses to comments describing declares_class_or_enum.
6170 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
6173 2004-01-12 Jan Hubicka <jh@suse.cz>
6175 * pt.c (for_each_template_parm): Do not check for duplicates.
6176 (for_each_template_parm): Use walk_tree duplicate checking code.
6178 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
6181 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
6182 is error_mark_node, don't add any more decl_specs.
6183 (cp_parser_init_declarator): After committing to a declaration, if
6184 the decl_specifiers start with error_mark_node, issue an error and
6185 change the type to "int".
6187 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6190 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
6192 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6196 * pt.c (tsubst): Substitution must fail if we are attempting to
6197 create an array with element type that is an abstract class type.
6198 * decl.c (cp_finish_decl): Strip pointers and array types recursively
6199 before calling abstract_virtuals_error.
6201 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
6203 * name-lookup.c (qualified_lookup_using_namespace): Consider
6204 strong using directives even if we've already found a binding.
6206 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6208 * cp-tree.h (cxx_expand_expr): Change prototype.
6209 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
6211 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6214 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
6215 looking into them recursively. They can be there because of the
6216 new __offsetof__ extension.
6218 2004-01-07 Zack Weinberg <zack@codesourcery.com>
6220 * parser.c (cp_parser_save_member_function_body): Mark the
6223 2004-01-05 Mark Mitchell <mark@codesourcery.com>
6226 * class.c (build_clone): Copy type attributes from the original
6227 function to the clone.
6230 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
6231 references as constant.
6234 * parser.c (cp_parser_explicit_instantiation): Improve error
6236 (cp_parser_require): Improve indication of the error location.
6239 * parser.c (cp_parser_class_head): Reorder logic to check for
6240 invalid qualification.
6242 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6245 * name-lookup.c (lookup_using_namespace): Remove spacesp
6247 (unqualified_namespace_lookup): Likewise.
6248 (lookup_qualified_name): Adjust accordingly.
6249 (lookup_name_real): Likewise.
6250 (lookup_arg_dependent): Do not eliminate the namespace of the
6251 functions found by unqualified name lookup unless that is the
6254 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
6256 * semantics.c (push_deferring_access_checks): Fix format.
6257 (resume_deferring_access_checks): Likewise.
6258 (stop_deferring_access_checks): Likewise.
6259 (pop_deferring_access_checks): Likewise.
6260 (get_deferred_access_checks): Likewise.
6261 (pop_to_parent_deferring_access_checks): Likewise.
6262 (perform_deferred_access_checks): Likewise.
6263 (perform_or_defer_access_check): Likewise.
6265 2004-01-04 Richard Henderson <rth@redhat.com>
6267 * call.c (build_over_call): Don't create a save_expr of an
6268 aggregate, but rather its address.
6270 2004-01-04 Mark Mitchell <mark@codesourcery.com>
6273 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
6274 an offsetof expression.
6276 * parser.c (cp_parser_parameter_declaration): Fix comment.
6279 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
6280 (reference_binding): Set it when appropriate.
6281 (build_temp): New function, split out from ...
6282 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
6283 (initialize_reference): Likewise.
6286 * parser.c (cp_parser): Add in_type_id_in_expr_p.
6287 (cp_parser_new): Initialize it.
6288 (cp_parser_postfix_expression): Set it.
6289 (cp_parser_sizeof_operand): Likewise.
6290 (cp_parser_parameteR_declaration): Do not commit early to tenative
6291 parsers when in_type_id_in_expr_p is set.
6293 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6296 * parser.c (cp_parser_template_argument): Don't call
6297 make_unbound_class_template directly.
6298 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
6299 UNBOUND_CLASS_TEMPLATE tree node.
6301 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
6304 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
6306 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6309 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
6310 (DECL_FUNCTION_TEMPLATE_P): Use it.
6311 (DECL_CLASS_TEMPLATE_P): Likewise.
6312 * parser.c (cp_parser_lookup_name): Add is_template parameter.
6313 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
6314 (cp_parser_template_name): Likewise.
6315 (cp_parser_elaborated_type_specifier): Likewise.
6316 (cp_parser_namespace_name): Likewise.
6317 (cp_parser_class_name): Likewise.
6318 (cp_parser_lookup_name_simple): Likewise.
6320 See ChangeLog.3 for earlier changes.