1 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
3 PR c++/19203, implement DR 214
4 * call.c (joust): Use more_specialized_fn.
5 * cp-tree.h (DEDUCE_ORDER): Remove.
6 (more_specialized): Replace with ...
7 (more_specialized_fn): ... this.
8 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
10 (type_unification_real): Remove DEDUCE_ORDER case.
11 (more_specialized): Replace with ...
12 (more_specialized_fn): ... this. Implement DR 214.
13 (most_specialized_instantiation): Use get_bindings_real directly.
15 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
18 * call.c (build_new_op): Remove check for -Wsynth.
20 2005-03-31 Jan Hubicka <jh@suse.cz>
22 * decl2.c (finish_objects): Mark ctor as needed.
23 (cp_finish_file): Output variables only in nonunit-at-a-time.
25 2005-03-29 Richard Henderson <rth@redhat.com>
28 * decl.c (cp_complete_array_type): Rename from complete_array_type.
29 Use the new complete_array_type in c-common.c. Update all callers.
30 * cp-tree.h (cp_complete_array_type): Update to match.
32 2005-03-24 Geoffrey Keating <geoffk@apple.com>
34 * typeck.c (build_static_cast_1): Allow scalar_cast between
35 any integral, floating, or enumeration type.
37 2005-03-24 Steven Bosscher <stevenb@suse.de>
39 * typeck.c (comptypes): First determine if the types are compatible
40 from a target-independent point of view. Check target attributes
43 * class.c (build_base_path):
44 (build_vbase_offset_vtbl_entries):
45 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
46 * error.c (dump_expr): Likewise.
47 * init.c (build_zero_init, expand_cleanup_for_base,
48 build_vec_delete_1): Likewise.
49 * mangle.c (write_integer_cst): Likewise.
50 * method.c (thunk_adjust): Likewise.
51 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
52 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
53 * typeck.c (build_ptrmemfunc_access_expr,
54 (get_member_function_from_ptrfunc): Likewise.
56 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
58 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
60 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
62 * cp-tree.h (perform_integral_promotions): Remove.
63 (default_conversion): Add.
65 2005-03-22 Mark Mitchell <mark@codesourcery.com>
67 * parser.c (cp_parser_warn_min_max): New function.
68 (cp_parser_binary_expression): Use it.
69 (cp_parser_assignment_operator_opt): Likewise.
70 (cp_parser_operator): Likewise.
72 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
75 * decl.c (start_preparsed_function): Robustify.
77 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
80 * parser.c (cp_parser_class_head): Return NULL_TREE when
81 encountering a redefinition.
83 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
87 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
90 2005-03-21 Paolo Carlini <pcarlini@suse.de>
94 * init.c (emit_mem_initializers): Don't crash on undefined
97 2005-03-21 Paolo Carlini <pcarlini@suse.de>
100 * semantics.c (finish_stmt_expr_expr): Return immediately
101 if error_operand_p (expr).
103 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
105 * cp-tree.h (lvalue_or_else, lvalue_p): New.
106 * typeck.c (lvalue_or_else): New. Call lvalue_error.
108 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
111 * decl.c (decls_match): Compare context of VAR_DECL.
113 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
116 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
117 Check the return value of cp_parser_nested_name_specifier.
119 2005-03-18 Paolo Carlini <pcarlini@suse.de>
122 * parser.c (cp_parser_diagnose_invalid_type_name):
123 Check TYPE_BINFO (current_class_type) before attempting
124 to emit inform messages.
126 2005-03-17 Paolo Carlini <pcarlini@suse.de>
129 * cp-tree.h (grok_op_properties): Change return type to void.
130 * decl.c (grok_op_properties): Return early - don't check the
131 arity - in case of a static member or an operator that cannot
132 be non-member; tidy a bit.
134 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
137 * pt.c (contains_dependent_cast_p): Remove.
138 (fold_non_dependent_expr): Don't use it.
139 (value_dependent_expression_p): Use a switch statement.
140 reference_exprs can be dependent.
142 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
146 * name-lookup.c (pushtag): Skip template parameter scope when
147 scope is ts_global. Don't push tag into template parameter
149 * pt.c (instantiate_class_template): Reorder friend class
150 template substitution to handle non-dependent friend class
151 that hasn't been previously declared.
153 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
155 Friend class name lookup 5/n
157 * cp-tree.h (pushtag): Adjust declaration.
158 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
160 (xref_tag): Adjust call to pushtag. Make hidden class visible.
161 (start_enum): Adjust call to pushtag.
162 * name-lookup.c (ambiguous_decl): Ignore hidden names.
163 (qualify_lookup): Change return type to bool.
164 (hidden_name_p): New function.
165 (lookup_namespace_name, unqualified_namespace_lookup,
166 lookup_name_real): Use it.
167 (lookup_type_scope): Update comments.
168 (maybe_process_template_type_declaration): Change parameter name
169 from globalize to is_friend.
170 (pushtag): Change globalize parameter of type int to tag_scope.
171 Hide name if introduced by friend declaration.
172 * name-lookup.h (hidden_name_p): Add declaration.
173 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
175 * pt.c (push_template_decl_real): Make hidden class template
177 (lookup_template_class, instantiate_class_template): Adjust call
179 * semantics.c (begin_class_definition): Likewise.
180 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
181 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
184 2005-03-13 Mark Mitchell <mark@codesourcery.com>
187 * pt.c (determine_specialization): Reject non-specializations.
189 2005-03-11 Per Bothner <per@bothner.com>
191 * cp-tree.h (struct cp_declarator): New id_loc field.
192 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
193 location using c_lex_with_flags, instead of input_location.
194 (cp_parser_direct_declarator): Set declarator's id_loc from
197 2005-03-10 Jakub Jelinek <jakub@redhat.com>
199 PR c++/18384, c++/18327
200 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
201 and index. Convert max_index to size_type_node if it isn't
204 2005-03-09 Mark Mitchell <mark@codesourcery.com>
207 * pt.c (tsubst_decl): Apply array-to-pointer and
208 function-to-pointer conversions to function arguments.
209 (regenerate_decl_from_template): Likewise.
211 2005-03-09 Paolo Carlini <pcarlini@suse.de>
214 * decl.c (complete_array_type): In pedantic mode, return
215 3 for an empty initializer list as the initializer for an
216 array of unknown bound (8.5.1/4).
217 (maybe_deduce_size_from_array_init): Fix final test to use
220 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
223 * pt.c (contains_dependent_cast_p): New.
224 (fold_non_dependent_expr): Call it.
226 2005-03-08 Mark Mitchell <mark@codesourcery.com>
229 * cp-tree.h (target_type): Remove.
230 * decl.c (layout_var_decl): Remove #if 0'd code.
231 (cp_finish_decl): Remove dead code.
232 * init.c (build_vec_init): When determining whether or not the
233 element type has an asignment operator, look through all array
235 * typeck.c (target_type): Remove.
237 2005-03-07 Mark Mitchell <mark@codesourcery.com>
239 * class.c (finish_struct_1): Do not warn about non-virtual
240 destructors in Java classes.
242 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
245 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
246 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
248 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
249 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
250 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
253 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
255 * name-lookup.c (push_overloaded_decl): Don't error if the new
256 decl matches the old one.
257 * decl.c (redeclaration_error_message): Likewise.
259 2005-03-01 Per Bothner <per@bothner.com>
261 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
262 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
264 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
267 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
270 * cp-tree.g (THUNK_TARGET): Expand comment.
271 * method.c (use_thunk): Make sure we also use the target, if that
274 2005-02-27 Jakub Jelinek <jakub@redhat.com>
277 * decl.c (cxx_comdat_group): Put thunks for
278 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
279 comdat group as the thunk target.
281 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
283 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
284 parser.c: Fix comment typo(s).
286 2005-02-24 Jakub Jelinek <jakub@redhat.com>
289 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
290 initializes a char/wchar_t array.
292 2005-02-23 Mark Mitchell <mark@codesourcery.com>
295 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
296 with internal linkage.
298 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
300 * decl.c (grokvardecl): Don't exempt anonymous types from having
301 linkage for variables that have linkage other than "C".
303 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
305 * cp-objcp-common.h, error.c: Update copyright.
307 2005-02-22 Mark Mitchell <mark@codesourcery.com>
310 * decl.c (start_decl_1): Don't clear TREE_READONLY.
311 (cp_finish_decl): Likewise.
312 (complete_vars): Call cp_apply_type_quals_to_decl.
313 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
314 cases where that's not valid.
317 * init.c (integral_constant_value): Iterate if the value of a decl
318 is itself a constant.
321 * parser.c (cp_parser_class_head): Check for redefintions here.
322 * semantics.c (begin_class_definition): Not here.
325 * decl2.c (build_anon_union_vars): Add type parameter.
326 (finish_anon_union): Pass it.
329 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
330 Handle STATEMENT_LIST.
333 * parser.c (cp_parser_direct_declarator): Always complain about
334 non-constant array bounds when in a function scope.
335 * semantics.c (finish_id_expression): Do not mark dependent names
338 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
342 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
343 * decl.c (grokdeclarator): Pedwarn about qualifying a function
345 Add qualifiers when declaring a typedef of a function type.
346 Member function pointers pick up the qualifiers of the typedef
347 used to declare them.
348 Don't complain about creating cv-qualified function types.
349 Complain about qualified function typedefs that are used to
350 declare non-static member functions or free functions.
351 Use cp_apply_type_quals_to_decl.
352 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
353 (grokclassfn): Use cp_apply_type_quals_to_decl.
354 * error.c (dump_type_suffix): Print qualifiers for function
356 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
357 (tsubst): When substituting a function type into a member
358 pointer type, pass along the qualifiers.
359 (unify): Unify member pointers to member function pointers.
360 * tree.c (cp_build_qualified_type_real): Function types may be
361 qualified. This includes restrict qualifiers.
362 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
363 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
364 added to function types.
366 2005-02-20 Zack Weinberg <zack@codesourcery.com>
369 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
370 c_common_to_target_charset. Delete bogus comment.
372 2005-02-18 Richard Henderson <rth@redhat.com>
375 * except.c (do_get_exception_ptr): New.
376 (expand_start_catch_block): Use it.
378 2005-02-19 Jakub Jelinek <jakub@redhat.com>
380 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
381 if type is not error_mark_node.
383 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
386 * decl2.c (grokfield): Do not apply attributes to template parameters
387 as they are ignored by tsubst anyway.
389 2005-02-18 Jakub Jelinek <jakub@redhat.com>
392 * decl.c (start_decl_1): Clear TREE_READONLY flag if
393 its type has TYPE_NEEDS_CONSTRUCTING.
394 (complete_vars): Likewise.
396 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
399 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
400 template along with TYPE_SIZE.
403 * semantics.c (perform_deferred_access_checks): Use
404 get_deferred_access_checks to get the top of the stack.
406 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
409 * class.c (add_implicitly_declared_members, check_field_decl)
410 (check_field_decls, check_bases): Remove arguments, tests and
411 assignments of cant_have_default_ctor-related variables.
413 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
415 * decl2.c (mark_used): Set the source location of the used decl to
416 the current input location here...
417 * method.c (synthesize_method): ... not here. Set input_location
418 from the decl instead.
420 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
423 * parser.c (cp_parser_late_parsing_for_member): Use
424 current_function_decl as scope to push to and from.
427 * pt.c (check_explicit_specialization): Make sure namespace
428 binding lookup found an overloaded function.
429 (lookup_template_function): Just assert FNS is an overloaded
433 * decl.c (grokdeclarator): Check for error mark node in ptrmem
436 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
439 * decl.c (redeclaration_error_message): Report redefinition of
440 pure virtual function.
442 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
445 * class.c (build_simple_base_path): Build the component_ref
447 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
448 rather than using lookup_base.
449 * search.c (dfs_walk_once): Add non-recursive assert check.
450 * typeck.c (build_class_member_access_expr): It is possible for
451 the member type to be both const and volatile.
453 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
457 * pt.c (maybe_check_template_type): Remove.
458 * cp-tree.h (maybe_check_template_type): Remove prototype.
459 * name-lookup.c (maybe_process_template_type_declaration): Don't
460 use maybe_check_template_type.
462 2005-02-11 Richard Henderson <rth@redhat.com>
465 * pt.c (get_mostly_instantiated_function_type): Save and restore
466 flag_access_control instead of push/pop_access_scope.
468 2005-02-10 Mark Mitchell <mark@codesourcery.com>
471 * decl.c (reshape_init): Issue warnings about missing braces.
473 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
475 * cp-tree.def, except.c, ptree.c: Update copyright.
477 2005-02-09 Mark Mitchell <mark@codesourcery.com>
480 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
481 attempting name lookup.
483 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
486 * call.c (initialize_reference): Robustify.
489 * decl.c (grokdeclarator): Check for invalid use of destructor
493 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
494 names with invalid types.
497 * parser.c (cp_parser_direct_declarator): Allow type-dependent
498 expressions as array bounds.
501 * parser.c (cp_parser_attributes_list): Allow empty lists.
503 2005-02-08 Mark Mitchell <mark@codesourcery.com>
506 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
507 (check_bases): Give warnings about a base class with a
508 non-virtual destructor, even if it is implicit.
509 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
510 (maybe_warn_about_overly_private_class): Don't use
512 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
513 (check_for_override): Give it external linkage.
514 (add_implicitly_declared_members): Generate destructors lazily.
515 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
517 (check_bases_and_members): Call check_methods before
519 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
521 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
522 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
523 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
524 (lang_type_class): Add lazy_destructor.
525 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
526 (CLASSTYPE_DESTRUCTORS): Robustify.
527 (TYPE_HAS_DESTRUCTOR): Remove.
528 (check_for_override): Declare.
529 (build_vbase_delete): Remove.
530 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
532 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
533 * except.c (dtor_nothrow): Lazily create destructors if necessary.
534 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
535 * init.c (build_delete): Lazily create destructors, if necessary.
536 (build_vbase_delete): Remove.
537 * method.c (locate_dtor): Simplify.
538 (implicitly_declare_fn): Add support for destructors.
539 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
541 * pt.c (check_explicit_specialization): Don't use
543 (instantiate_class_template): Likewise.
544 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
545 * rtti.c (emit_support_tinfos): Robustify.
546 * search.c (lookup_fnfields_1): Lazily create destructors.
547 * typeck.c (build_class_member_access_expr): Remove
548 PSEUDO_DTOR_EXPR handling.
549 (lookup_destructor): Likewise.
551 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
553 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
556 2005-02-07 Mark Mitchell <mark@codesourcery.com>
558 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
559 on boolean variables.
560 (cp_lexer_stop_debugging): Likewise.
562 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
565 * parser.c (cp_parser_pure_specifier): Emit a specific error
566 message with an invalid pure specifier.
567 * decl2.c (grok_function_init): Remove.
568 (grokfield): An initializer for a method is a always a pure
571 2005-02-02 Matt Austern <austern@apple.com>
574 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
575 * parser.c (cp_parser_postfix_expression): Accept function call in
576 constant expression if builtin_valid_in_constant_expr_p is true
578 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
579 * semantics.c (finish_id_expression): Accept function call in constant
580 expression if builtin_valid_in_constant_expr_p is true for that
582 * tree.c (builtin_valid_in_constant_expr_p): New.
584 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
587 * pt.c (check_instantiated_args): Improve error message.
588 Fix logic when to print its second part.
590 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
592 * cp-tree.h (complete_type_or_else): Remove macro.
593 (complete_type_or_diagnostic): Rename to complete_type_or_else
594 and remove last argument.
595 * typeck.c (complete_type_or_diagnostic): Rename to
596 complete_type_or_else and remove last argument.
598 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
600 * cp-tree.h (commonparms): Remove prototype.
601 (convert_arguments): Likewise.
602 (PFN_FROM_PTRMEMFUNC): Remove.
603 * typeck.c (commonparms): Make static.
604 (convert_arguments): Add prototype. Make static.
605 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
607 2005-01-31 Mark Mitchell <mark@codesourcery.com>
609 * parser.c (cp_parser_primary_expression): Don't complain about
610 floating-point literals in integral constant expressions when
613 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
615 * parser.c (cp_parser_template_id): Revert comment patch too.
620 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
621 Issue an error when creating the template id.
622 * pt.c (fn_type_unification): Return early if the explicit
623 template arg list is an error_mark_node.
625 2005-01-31 Mark Mitchell <mark@codesourcery.com>
627 * decl.c (build_enumerator): Do not issue duplicate error messages
628 about invalid enumeration constants.
629 * parser.c (cp_parser_non_integral_constant_expression): Always
630 set parser->non_integral_constant_expression_p.
631 (cp_parser_primary_expression): Add cast_p parameter. Issue
632 errors about invalid uses of floating-point literals in
634 (cp_parser_postfix_expression): Add cast_p parameter.
635 (cp_parser_open_square_expression): Pass it.
636 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
637 (cp_parser_unary_expression): Likewise.
638 (cp_parser_new_placement): Pass it.
639 (cp_parser_direct_new_declarator): Likewise.
640 (cp_parser_new_initializer): Likewise.
641 (cp_parser_cast_expression): Add cast_p parameter.
642 (cp_parser_binary_expression): Likewise.
643 (cp_parser_question_colon_clause): Likewise.
644 (cp_parser_assignment_expression): Likewise.
645 (cp_parser_expression): Likewise.
646 (cp_parser_constant_expression): If an integral constant
647 expression is invalid, return error_mark_node.
648 (cp_parser_expression_statement): Pass cast_p.
649 (cp_parser_condition): Likewise.
650 (cp_parser_iteration_statement): Likewise.
651 (cp_parser_jump_statement): Likewise.
652 (cp_parser_mem_initializer): Likewise.
653 (cp_parser_template_argument): Likewise.
654 (cp_parser_parameter_declaration): Likewise.
655 (cp_parser_initializer): Likewise.
656 (cp_parser_throw_expression): Likewise.
657 (cp_parser_attribute_list): Likewise.
658 (cp_parser_simple_cast_expression): Likewise.
659 (cp_parser_functional_cast): Likewise.
660 (cp_parser_late_parsing_default_args): Likewise.
661 (cp_parser_sizeof_operand): Save/restore
662 non_integral_constant_expression_p.
664 2005-01-31 Mike Stump <mrs@apple.com>
666 * parser.c (cp_lexer_new_main): Get the first token, first, before
669 2005-01-31 Mark Mitchell <mark@codesourcery.com>
671 * decl.c (start_decl): Add missing parentheses.
673 2005-01-30 Mark Mitchell <mark@codesourcery.com>
676 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
677 * decl.c (duplicate_decls): Do not discard
678 DECL_IMPLICIT_INSTANTIATION when merging declarations.
679 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
680 variables that do not have DECL_USE_TEMPLATE.
683 * decl.c (grokdeclarator): Refactor code so that qualified names
684 are never allowed as the declarator in a typedef.
687 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
688 builtin declarations.
691 * call.c (convert_like_real): Inline call to
692 dubious_conversion_warnings here.
693 * cp-tree.h (dubious_conversion_warnings): Remove.
694 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
695 setting TREE_NEGATED_INT.
696 * typeck.c (dubious_conversion_warnings): Remove.
699 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
702 2005-01-28 Mark Mitchell <mark@codesourcery.com>
705 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
709 * pt.c (redeclare_class_template): Robustify.
711 2005-01-27 Steven Bosscher <stevenb@suse.de>
713 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
714 instead of SWITCH_EXPR ones.
715 * pt.c (tsubst_expr): Likewise.
716 * semantics.c (begin_switch_stmt, finish_switch_cond,
717 finish_switch_stmt): Likewise.
719 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
722 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
724 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
726 * class.c (abort_fndecl_addr): New variable.
727 (build_vtbl_initializer): If we have a pure virtual function
728 share the abort function's address.
729 Include gt-cp-class.h at the end.
730 * config-lang.in (gtfiles): Add cp/class.c.
732 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
734 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
735 (pp_cxx_function_definition): Make static.
736 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
737 (pp_cxx_function_definition): Likewise.
739 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
741 * name-lookup.c (print_binding_level): Make static.
742 (constructor_name_full): Make static inline.
743 (current_decl_namespace): Make static.
744 * name-lookup.h (constructor_name_full): Remove prototype.
745 (print_binding_level): Likewise.
746 (current_decl_namespace): Likewise.
748 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
750 * decl.h (debug_bindings_indentation): Remove.
752 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
754 * typeck.c: Fix a comment typo.
756 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
759 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
761 (tsubst): Use fold_decl_constant_value in place of a bare call to
762 integral_constant_value.
764 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
766 * typeck.c (more_qualified_p): Remove.
767 * cp-tree.h: Remove the corresponding prototype.
769 2005-01-19 Matt Austern <austern@apple.com>
771 * typeck.c (comptypes): Handle return code from objc_comptypes
774 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
776 * cp-tree.h, name-lookup.h: Remove unused prototypes.
778 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
781 * semantics.c (finish_id_expression): Disable access checking for
782 already lookuped FIELD_DECL.
784 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
786 * decl.c (delete_block): Remove.
787 * cp-tree.h: Remove the corresponding prototype.
789 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
790 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
792 * cp-tree.h: Remove the corresponding prototypes.
794 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
795 cp_update_decl_after_saving, name_p): Remove.
796 * cp-tree.h: Remove the corresponding prototypes.
798 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
801 * semantics.c (finish_asm_stmt): Strip nops off
802 input memory operands.
804 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
806 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
807 typeck2.c: Update copyright.
809 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
811 * class.c (get_enclosing_class): Remove.
812 * cp-tree.h: Remove the corresponding prototypes.
814 * cvt.c (convert_lvalue): Remove.
815 * cp-tree.h: Remove the corresponding prototype.
817 * pt.c (tinst_for_decl): Remove.
818 * cp-tree.h: Remove the corresponding prototypes.
820 * tree.c (hash_chainon): Remove.
821 * cp-tree.h: Remove the corresponding prototypes.
823 2005-01-15 Jakub Jelinek <jakub@redhat.com>
826 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
827 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
829 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
831 * Make-lang.in (cp-warn): Don't append $(WERROR).
833 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
835 * cp-tree.h: Fix a comment typo.
837 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
840 * pt.c (tsubst_qualified_id): Call convert_from_reference.
842 2005-01-06 Mark Mitchell <mark@codesourcery.com>
845 * class.c (add_implicitly_declared_members): Remove dead code.
846 * decl.c (grokfndecl): Add sfk parameter. Use it do set
848 (grokdeclarator): Adjust calls to grokfndecl.
849 * method.c (implicitly_declare_fn): Improve documentation.
850 * parser.c (cp_parser_direct_declarator): Do not consider a
851 function to be a constructor if the containing class was
852 originally anonymous.
854 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
857 * search.c (lookup_field_1): Handle using declaration in
858 class template partial specialization.
860 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
863 * pt.c (push_access_scope): Handle friend defined in class.
864 (pop_access_scope): Likewise.
866 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
869 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
870 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
871 array-new handling code. Use build_x_binary_op.
873 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
876 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
877 * name-lookup.h (push_scope): Return pushed scope, not flag.
878 * name-lookup.c (push_scope): Return scope that should be popped,
880 * decl.c (start_decl): Adjust.
881 (grokfndecl): Adjust scope push and pop.
882 * decl2.c (check_classfn): Likewise.
883 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
884 cp_parser_init_declarator, cp_parser_direct_declarator,
885 cp_parser_class_specifier, cp_parser_class_head,
886 cp_parser_lookup_name,
887 cp_parser_constructor_declarator_p): Likewise.
888 * pt.c (instantiate_class_template,
889 resolve_typename_type): Likewise.
891 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
894 * parser.c (cp_parser_unqualified_id): Do not issue error message
895 for typedef-name as destructor declarator when performing an
896 uncommitted tentative parse.
898 2005-01-01 Steven Bosscher <stevenb@suse.de>
901 * decl.c (finish_function): Fix comment. Annotate the compiler
902 generated return with the current file name and line 0.
904 2004-12-31 Richard Henderson <rth@redhat.com>
907 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
908 * class.c (build_vtable): Don't conditionallize setting it
909 based on DWARF2_DEBUG.
910 (layout_class_type): Set DECL_IGNORED_P.
911 * decl2.c (get_guard): Likewise.
912 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
913 * tree.c (build_local_temp): Likewise.
915 2004-12-30 Mark Mitchell <mark@codesourcery.com>
917 * cp-tree.h (cp_declarator): Split "name" field into
918 qualifying_scope and unqualified_name.
919 * decl.c (get_scope_of_declarator): Adjust accordingly.
920 (grokdeclarator): Likewise.
921 * decl2.c (grokfield): Likewise, and adjust call to
923 * name-lookup.c (do_class_using_decl): Split "decl" into
924 "scope" and "name". Remove unnecessary code.
925 * name-lookup.h (do_class_using_decl): Adjust declaration.
926 * parser.c (make_id_declarator): Split "id" into qualifying_scope
927 and unqualified_name.
928 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
929 (cp_parser_direct_declarator): Adjust to handle the fact that
930 cp_parser_declarator_id no longer returns a SCOPE_REF.
931 (cp_parser_direct_declarator): Likewise.
932 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
934 (cp_parser_member_declaration): Adjust call to make_id_declarator.
935 (cp_parser_check_declarator_template_parameters): Do not expect a
938 * decl.c (duplicate_decls): Call ggc_free on declarations we will
939 not be needing any longer.
942 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
944 2004-12-28 Richard Henderson <rth@redhat.com>
947 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
948 constraints. Mark memory inputs addressable.
950 2004-12-27 Jason Merrill <jason@redhat.com>
952 * decl.c (expand_static_init): Don't use shortcut if
953 targetm.relaxed_ordering.
955 2004-12-27 Mark Mitchell <mark@codesourcery.com>
958 * decl.c (check_tag_decl): Robustify.
960 2004-12-23 Mark Mitchell <mark@codesourcery.com>
963 * parser.c (cp_parser_error): Issue better messages about
964 #pragma in locations where it is not permitted.
967 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
969 * cvt.c (convert_to_void): Fix typo in comment.
971 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
974 * pt.c (check_explicit_specialization): Use the argument list from
975 the definition in a template function specialization definition.
977 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
980 * pt.c (check_explicit_specialization): Use special logic to validate
981 befriended specializations.
983 2004-12-22 Mark Mitchell <mark@codesourcery.com>
985 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
988 * call.c (build_this): In templates, do not bother with
990 * typeck.c (unary_complex_lvalue): In a template, always refuse
994 * cp-gimplify.c (cp_genericize): Relax assertion.
997 * cvt.c (convert_to_void): Warn about unused values.
1000 * rtti.c (emit_support_tinfos): On systems without weak symbols,
1001 emit the runtime library type-info objects as non-COMDAT.
1003 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1006 * call.c (convert_like_real): Do not permit the use of a copy
1007 constructor to copy a packed field.
1010 * decl.c (grokdeclarator): Return error_mark_node, not
1011 void_type_node, to indicate errors.
1012 * parser.c (cp_parser_template_parameter_list): Robustify.
1013 (cp_parser_template_parameter): Likewise.
1016 * tree.c (cp_tree_equal): Handle OVERLOAD.
1018 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1020 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1021 * name-lookup.c (pushdecl_class_level): Likewise.
1023 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1025 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1027 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
1030 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1031 check to see if contains the pointer. Insert the statement before
1034 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
1037 * decl.c (check_initializer): Check string initializer of array is
1039 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1040 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1041 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1043 * cp-tree.def (TEMPLATE_TYPE_PARM,
1044 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1045 for better code efficiency.
1046 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1047 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1048 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1049 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1050 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1051 TYPE_PTROBV_P): Likewise.
1054 * method.c (do_build_copy_constructor): Refactor. Don't const
1055 qualify a mutable field.
1056 (do_build_assign_ref): Likewise.
1058 2004-12-20 Matt Austern <austern@apple.com>
1061 * decl.c (make_rtl_for_nonlocal_decl): Use
1062 set_builtin_user_assembler_name.
1064 2004-12-19 Mark Mitchell <mark@codesourcery.com>
1066 * cp-tree.h (note_decl_for_pch): New function.
1067 * class.c (build_clone): Call note_decl_for_pch.
1068 * semantics.c (finish_member_declaration): Likewise.
1069 (note_decl_for_pch): New function.
1071 2004-12-17 Steven Bosscher <stevenb@suse.de>
1073 * init.c (build_zero_init): max_index is the number of
1076 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
1079 * class.c (add_method): Do not push conversion operators into a
1082 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1083 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1085 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
1088 * cp-tree.h (integral_constant_value): Declare.
1089 * call.c (null_ptr_cst_p): Use integral_constant_value, not
1090 decl_constant_value.
1091 (convert_like_real): Likewise.
1092 * class.c (check_bitfield_decl): Likewise.
1093 * cvt.c (ocp_convert): Likewise.
1094 (convert): Remove unnecessary decl_constant_value call.
1095 * decl.c (compute_array_index_type): Use integral_constant_value,
1096 not decl_constant_value.
1097 (build_enumerator): Likewise.
1098 * decl2.c (grokfield): Likewise.
1099 * init.c (decl_constant_value): Simplify.
1100 (integral_constant_value): New.
1101 * pt.c (fold_decl_constant_value): Use integral_constant_value,
1102 remove subsequent check.
1103 (tsubst): Use integral_constant_value, not decl_constant_value.
1104 (tsubst_copy, unify): Likewise.
1105 * typeck.c (decay_conversion): Likewise.
1106 (build_compound_expr): Remove unnecessary decl_constant_value
1108 (build_static_cast_1, build_reinterpret_cast_1):
1109 (convert_for_assignment): Remove comment about not calling
1110 decl_constant_value.
1112 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1115 * pt.c (instantiate_class_template): Set input_location for
1117 (tsubst_friend_function): Don't set input_location here.
1118 Make sure the context is complete if necessary.
1120 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
1123 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1126 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1129 * decl.c (make_typename_type): Do not handle namespace-scoped
1131 (tag_name): Handle typename_type.
1132 (check_elaborated_type_specifier): Handle typenames.
1133 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1135 (cp_parser_elaborated_type_specifier): Use
1136 cp_parser_diagnose_invalid_type_name.
1138 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
1141 * init.c (build_zero_init): If the max_index is 0, there is no
1142 need to create a RANGE_EXPR.
1144 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1147 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1149 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
1152 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1153 REFERENCE_REF_P is dereferencing a reference type.
1154 * typeck.c (build_static_cast): Convert from reference even in a
1156 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1158 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1160 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1161 (cp_parser_name_lookup_error): Use it.
1162 (cp_parser_check_for_invalid_template_id): Likewise.
1163 (cp_parser_skip_to_closing_parenthesis): Likewise.
1164 (cp_parser_nested_name_specifier_opt): Likewise.
1165 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1166 (cp_parser_parameter_declaration_list): Likewise.
1167 (cp_parser_parameter_declaration): Likewise.
1168 (cp_parser_template_name): Let cp_parser_simulate_error perform
1170 (cp_parser_committed_to_tentative_parse): Remove.
1172 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
1175 * class.c (build_base_path): Convert the zero constant to the correct
1176 type when comparing.
1178 2004-12-13 Mark Mitchell <mark@codesourcery.com>
1181 * class.c (layout_class_type): Determine the visibility of static
1184 2004-12-12 Roger Sayle <roger@eyesopen.com>
1187 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1188 condition is a constant and the unexecuted clause is empty.
1190 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1193 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1195 2004-12-09 Matt Austern <austern@apple.com>
1198 * name-lookup.c (do_nonmember_using_decl): A real function
1199 declaration takes precedence over an anticipated declaration.
1201 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1203 * parser.c (cp_parser_member_declaration): Fix comment typo.
1205 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
1208 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1211 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1214 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1216 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
1219 * init.c (build_zero_init): Build a RANGE_EXPR for an array
1222 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
1224 * typeck.c: Remove DOS line endings.
1226 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1229 * decl.c (lookup_and_check_tag): Diagnose nested class with
1230 the same name as enclosing class.
1232 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
1235 * cp-tree.h (REFERENCE_REF_P): New.
1236 (CPTI_TYPE_INFO_TYPE): Rename to ...
1237 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1238 (CPTI_TYPE_INFO_REF_TYPE): Remove.
1239 (type_info_type_node): Rename to ...
1240 (const_type_info_type_node): ... here.
1241 (type_info_ref_type): Remove.
1242 * call.c (build_user_type_conversion): Reformat.
1243 (resolve_args): Do not convert_from_reference.
1244 (build_object_call): Call convert_from_reference.
1245 (prep_operand): Do not convert_from_reference.
1246 (build_new_method_call): Likewise.
1247 * class.c (build_vfield_ref): Likewise.
1248 * cvt.c (convert_to_reference): Likewise.
1249 (convert_from_reference): Build INDIRECT_REF here, not with
1251 (convert_force): Do not convert_from_reference.
1252 (build_expr_type_conversion): Likewise.
1253 * decl.c (grok_reference_init): Likewise.
1254 * decl2.c (delete_sanity): Likewise.
1255 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1256 * init.c (build_dtor_call): Do not convert_from_reference.
1257 * parser.c (cp_parser_template_argument): Unwrap indirected
1258 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1259 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1260 convert_from_reference, if indicated.
1261 <case CALL_EXPR>: Do not convert_from_reference.
1262 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1263 (tsubst_initializer_list): Do not convert_from_reference.
1264 * rtti.c (init_rtti_processing): Adjust node creation.
1265 (throw_bad_typeid): Use const_type_info_type_node.
1266 Do not convert_from_reference.
1267 (typeid_ok_p): Use const_type_info_type_node.
1268 (build_typeid, get_typeid): Always return type_info typed node.
1269 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1270 * semantics.c (finish_stmt_expr_expr): Do not
1271 convert_from_reference.
1272 (finish_id_expression): Convert_from_reference as appropriate.
1273 * typeck.c (decay_conversion): Do not convert_from_reference.
1274 (finish_class_member_access_expr): Likewise.
1275 (build_indirect_ref): Use POINTER_TYPE_P.
1276 (convert_arguments): Do not convert_from_reference.
1277 (build_modify_expr): Likewise.
1278 (convert_for_initialization): Likewise.
1279 * typeck2.c (build_x_arrow): Likewise.
1281 2004-12-07 Ziemowit Laski <zlaski@apple.com>
1283 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1284 field to 'objc_info'.
1286 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
1288 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1290 2004-12-07 Roger Sayle <roger@eyesopen.com>
1292 * name-lookup.c (leave_scope): We only need to update
1293 class_binding_level when leaving a class scope.
1295 2004-12-06 Ziemowit Laski <zlaski@apple.com>
1297 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1299 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1301 PR c++/17011, c++/17971
1302 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1304 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1305 error_mark_node after member substitution.
1306 * semantics.c (finish_id_expression): Call
1307 finish_non_static_data_member for non-dependent FIELD_DECL.
1309 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
1312 * decl.c (grokdeclarator): Make sure class in pointer to member is
1315 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1318 * parser.c (cp_parser_new_type_id): Move array size expression
1319 checks from here ...
1320 * init.c (build_new): ... to here.
1322 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1325 * parser.c (cp_parser_class_head): Return NULL_TREE when
1326 push_template_decl fails. Update comment.
1328 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1330 PR c++/15664, c++/18276
1331 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
1332 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1334 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1337 * parser.c (cp_parser_type_specifier): Catch template declaration
1340 2004-12-01 Matt Austern <austern@apple.com>
1342 * name-lookup.c (namespace_binding): Omit alias check for global
1345 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
1348 * parser.c (cp_parser_class_name): Check decl's type is not
1352 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1353 derived to base conversion when checking constructor
1355 (implicit_conversion): Pass FLAGS to standard_conversion.
1356 (check_constructir_callable): Disallow conversion functions.
1358 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
1360 * parser.c: Fix comment typos.
1362 2004-11-27 Mark Mitchell <mark@codesourcery.com>
1365 * parser.c (cp_parser_check_for_definition_in_return_type): Take
1366 the defined type as a parameter, and inform the user about the
1367 possibility of a missing semicolon.
1368 (cp_parser_explicit_instantiation): Adjust call to
1369 cp_parser_check_for_definition_in_return_type.
1370 (cp_parser_init_declarator): Likewise.
1371 (cp_parser_member_declaration): Likewise.
1374 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1375 typename from comments.
1376 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1377 (TYPENAME_IS_CLASS_P): Likewise.
1378 (make_typename_type): Change prototype.
1379 * decl.c (struct_typename_info): New type.
1380 (typename_compare): Expect the second argument to be a
1381 typename_info, not a tree.
1382 (build_typename_type): Add tag_type parameter. Do not create a
1383 new type until necessary.
1384 (make_typename_type): Add tag_type parameter.
1385 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1387 * friend.c (make_friend_class): Adjust call to make_typename_type.
1388 * parser.c (cp_parser_make_typename_type): Likewise.
1389 (cp_parser_primary_expression): Adjust call to
1390 cp_parser_lookup_name.
1391 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1392 (cp_parser_class_or_namespace_name): Likewise.
1393 (cp_parser_postfix_expression): Adjust calls to
1395 (cp_parser_mem_initializer_id): Adjust calls to
1396 cp_parser_class_name.
1397 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1398 (cp_parser_template_name): Likewise.
1399 (cp_parser_template_argument): Likewise.
1400 (cp_parser_type_name): Adjust call to cp_parser_class_name.
1401 (cp_parser_elaborated_type_specifier): Adjust calls to
1402 make_typename_type and cp_parser_lookup_name.
1403 (cp_parser_namespace_name): Likewise.
1404 (cp_parser_class_name): Replace type_p parameter with tag_type.
1405 Adjust calls to make_typename_type and cp_parser_lookup_name.
1406 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1407 (cp_parser_base_specifier): Likewise.
1408 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1409 Adjust calls to make_typename_type and lookup_qualified_name.
1410 (cp_parser_lookup_name_simple): Adjust call to
1411 cp_parser_lookup_name.
1412 (cp_parser_constructor_declarator_p): Adjust call to
1413 cp_parser_class_name.
1414 * pt.c (convert_template_argument): Adjust all to
1416 (tsubst_decl): Do not pre-substitute the type of the declaration.
1417 (tsubst): Hand off declarations more quickly. Adjust call to
1421 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1423 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
1426 * Make-lang.in (cp/decl2.o): Update dependencies.
1427 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1429 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1432 * name-lookup.c (pushtag): Change return type to tree.
1433 * cp-tree.h (pushtag): Adjust declaration.
1434 * decl.c (xref_tag, start_enum): Use return value of pushtag.
1435 * pt.c (push_template_decl_real): Return immediately if
1436 pushdecl_namespace_level returns error_mark_node.
1438 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1440 * pt.c: Fix a comment typo.
1442 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1444 Friend class name lookup 4/n
1445 * class.c (pushclass): Don't call cxx_remember_type_decls.
1446 * cp-tree.h (clear_anon_tags): Remove declaration.
1447 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
1448 * name-lookup.c (binding_entry_free, binding_table_free): Comment
1450 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
1451 binding_table_remove_anonymous_types, cxx_remember_type_decls,
1452 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1453 lookup_tag_reverse): Remove
1454 (begin_scope, leave_scope, kept_level_p, print_binding_level):
1455 Don't use type_decls field in cp_binding_level.
1456 (maybe_process_template_type_declaration, pushtag): Set
1457 CLASSTYPE_NESTED_UTDS directly.
1458 * name-lookup.h (binding_table_remove_anonymous_types,
1459 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1461 (cp_binding_level): Remove type_decls field.
1463 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
1465 * typeck.c: Fix a comment typo.
1467 2004-11-25 Mark Mitchell <mark@codesourcery.com>
1470 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1471 unknown_type as non matching. Tidy up.
1472 * pt.c (build_non_dependent_expr): Do not build a
1473 NON_DEPENDENT_EXPR for a VAR_DECL.
1476 * cp-tree.h (lvalue_or_else): Remove declaration.
1477 * tree.c (lvalue_or_else): Remove.
1478 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1479 (build_modify_expr): Likewise.
1482 * decl.c (duplicate_decls): Return error_mark_node on error, as
1486 * decl.c (grokvardecl): Keep track of whether or not a there was
1487 explicit qualification.
1488 * name-lookup.c (set_decl_namespace): Complain about explicit
1489 qualification of a name within its own namespace.
1492 * typeck.c (check_return_expr): Robustify.
1494 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1496 Friend class name lookup 3/n, PR c++/3332
1497 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1498 (lookup_type_scope): Don't deal with name from user declaration
1500 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1501 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1504 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1506 Friend class name lookup 2/n, PR c++/14513, c++/15410
1507 * name-lookup.c (lookup_name_real): Simplify.
1508 (lookup_type_scope): Add SCOPE parameter. Handle friend class
1510 * name-lookup.h (tag_scope): New enum type.
1511 (lookup_type_scope): Adjust declaration.
1512 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1513 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1514 (start_enum): Likewise. Add assertion test that NAME is
1515 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
1517 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1518 * parser.c (cp_parser_elaborated_type_specifier,
1519 cp_parser_class_head): Adjust call to xref_tag.
1520 * pt.c (lookup_template_class, instantiate_class_template):
1522 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1523 tinfo_base_init, emit_support_tinfos): Likewise.
1525 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1527 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1529 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1532 * name-lookup.c (supplement_binding): Do not allow typedefs to be
1533 redefined in class scope.
1536 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1537 redefinitions of builtin types other that "bool" or "wchar_t".
1539 2004-11-24 Steven Bosscher <stevenb@suse.de>
1541 * decl.c (cxx_init_decl_processing): Don't clear
1542 flag_inline_functions.
1544 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1546 * pt.c (tsubst_function_type): Do not permit function types which
1547 return arrays or functions.
1550 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1553 * cp-tree.h (CTOR_NAME): Remove.
1554 (DTOR_NAME): Remove.
1555 * decl.c (initialize_predefined_identifiers): Add spaces to the
1556 end of constructor and destructor names.
1558 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1561 * decl.c (start_decl): Check for invalid specialization headers.
1563 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
1567 * call.c (standard_conversion): Move check for conversions between
1569 * typeck.c (ptr_reasonably_similar): ... here.
1571 2004-11-23 Ben Elliston <bje@au.ibm.com>
1573 * cp-tree.h (context_as_string): Remove extern.
1574 * error.c (context_as_string): Remove.
1576 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
1577 * lex.c (cp_type_qual_from_rid): Remove.
1579 * cp-tree.h (do_poplevel): Remove extern.
1580 (check_multiple_declarators): Likewise.
1581 * semantics.c (do_poplevel): Make static.
1582 (check_multiple_declarators): Remove.
1584 * cp-tree.h (check_final_overrider): Remove extern.
1585 * search.c (check_final_overrider): Make static.
1587 * cp-tree.h (build_artificial_parm): Remove extern.
1588 * decl2.c (build_artificial_parm): Make static.
1590 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1593 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
1594 Make sure the result is always a rvalue.
1596 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1598 * decl.c (start_preparsed_function): Call check_function_type even
1600 (require_complete_types_for_parms): Skip dependent types.
1601 (check_function_type): Likewise.
1603 2004-11-16 Steven Bosscher <stevenb@suse.de>
1605 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
1606 * search.c: Don't include it.
1608 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
1610 * cp-gimplify.c: Include pointer-set.h
1611 (cp_genericize_r): Use pointer_sets instead of a hashtable.
1612 Also instert the new statement for CLEANUP_STMT.
1613 (cp_genericize): Use pointer_sets instead of a hashtable.
1614 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
1616 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1618 Friend class name lookup 1/n, PR c++/18471
1619 * decl.c (lookup_and_check_tag): New function.
1620 (xref_tag, start_enum): Use it.
1621 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
1622 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
1624 * name-lookup.c (lookup_name_current_level): Rename to ...
1625 (lookup_name_innermost_nonclass_level): ... this.
1626 (lookup_type_scope): New function.
1627 * name-lookup.h (lookup_name_current_level): Rename to ...
1628 (lookup_name_innermost_nonclass_level): ... this.
1629 (lookup_type_scope): Add declaration.
1631 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1634 * pt.c (coerce_template_parms): Only emit error message about
1635 invalid template argument when TF_ERROR.
1637 2004-11-12 Mark Mitchell <mark@codesourcery.com>
1640 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
1641 error_mark_node to indicate errors.
1644 * parser.c (cp_parser_direct_declarator): Disallow non-constant
1645 array bounds when not inside a function.
1648 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
1649 unqualified name resolves to a member function.
1652 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
1653 derived class correctly.
1655 * decl2.c (import_export_decl): Fix typo in comment.
1656 * tree.c (pod_type_p): Likewise.
1658 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
1660 * typeck.c (cxx_mark_addressable): Add braces around the first if.
1662 2004-11-10 Adam Nemet <anemet@lnxw.com>
1665 * typeck.c (cxx_mark_addressable): Issue an error if address of an
1666 explicit register variable is requested.
1668 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
1671 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
1672 (struct lang_decl_flags): Add thunk_p flag.
1673 (struct lang_decl): Remove separate fixed_offset. Place
1674 cloned_function and fixed_offset into union.
1675 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
1676 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
1677 (THUNK_FIXED_OFFSET): Adjust.
1678 * method.c (make_thunk): Adjust.
1680 2004-11-09 Mark Mitchell <mark@codesourcery.com>
1683 * init.c (build_new_1): Handle parenthesized type-ids that name an
1686 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1688 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
1689 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
1690 quoting in diagnostics.
1691 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
1692 quoting in printf format.
1693 * decl.c (duplicate_decls, start_decl): Use %qD instead of
1696 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1698 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
1699 search.c, typeck2.c: Fix comment formatting.
1701 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
1703 PR tree-optimization/18184
1704 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
1705 of different modes or alias-all flags as equivalent.
1706 * typeck.c (comptypes): Likewise.
1708 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1711 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
1712 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
1713 TYPE_REFFN_P): Document.
1714 (fold_decl_constant_value): New prototype.
1715 * pt.c (convert_nontype_argument_function): Rewrite and extract
1717 (fold_decl_constant_value, convert_nontype_argument_function): New.
1718 (lookup_template_class): Add comment about useless double call.
1719 * mangle.c (write_expression): Strip conversions before lowering
1721 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1722 enum to enum conversion.
1724 2004-11-02 Mark Mitchell <mark@codesourcery.com>
1727 * parser.c (cp_parser_type_parameter): Robustify.
1730 * parser.c (cp_parser_single_declaration): Disallow template
1734 * typeck.c (build_const_cast): Use error_operand_p.
1736 2004-11-02 Ziemowit Laski <zlaski@apple.com>
1738 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1739 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1740 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1742 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1744 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1746 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
1749 * search.c (check_final_overrider): Deprecate gnu covariant extension.
1751 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1753 Convert diagnostics to use quoting flag q 9/n
1754 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
1755 get_delta_difference): Use new quotation style.
1756 * repo.c (reopen_repo_file_for_write): Likewise.
1757 * pt.c (do_type_instantiation): Likewise.
1758 * parser.c (cp_parser_diagnose_invalid_type_name):
1759 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
1760 * error.c (cp_print_error_function,
1761 print_instantiation_full_context): Likewise.
1762 * decl.c (define_label, grok_reference_init,
1763 maybe_deduce_size_from_array_init, revert_static_member_fn):
1764 * decl2.c (check_classfn): Likewise.
1765 * class.c (add_method, check_field_decls, layout_class_type,
1766 resolve_address_of_overloaded_function): Likewise.
1767 * call.c (build_x_va_arg, build_over_call): Likewise.
1769 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1771 Convert diagnostics to use quoting flag q 8/n
1772 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
1773 convert_to_reference, ocp_convert, convert_to_void
1774 cp_convert_to_pointer): Use new quotation style.
1776 2004-10-31 Mark Mitchell <mark@codesourcery.com>
1779 * typeck2.c (store_init_value): Use split_nonconstant_init even
1780 for types that require construction.
1782 1004-10-28 Matt Austern <austern@apple.com>
1785 * cp-tree.h (class_key_or_enum_as_string): Declare.
1786 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1787 and remove static qualifier.
1788 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1789 union/enum declaration.
1791 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
1793 * pt.c: Fix a comment typo.
1795 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
1797 * typeck.c (composite_pointer_type): Remove comment about DR 195.
1798 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1799 warning when being pedantic.
1800 (build_reinterpet_cast, build_c_cast): Adjust.
1802 2004-10-29 Mark Mitchell <mark@codesourcery.com>
1805 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1806 appear in a constructor/destructor that will be cloned.
1808 1004-10-28 Matt Austern <austern@apple.com>
1811 * decl.c (finish_enum): Handle packed attribute.
1812 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1814 2004-10-28 Mark Mitchell <mark@codesourcery.com>
1817 * pt.c (instantiate_class_template): Increment
1818 processing_template_decl when substituting into a member class
1821 2004-10-27 Mark Mitchell <mark@codesourcery.com>
1824 * call.c (convert_like_real): Fix formatting.
1825 (initialize_reference): When binding a temporary to a base class,
1826 ensure that the nominal copy made is to the derived class, not the
1830 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1833 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1835 * decl.c (bad_specifiers): Move the q after the %.
1837 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1839 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1842 2004-10-26 Mark Mitchell <mark@codesourcery.com>
1844 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1845 * search.c (current_scope): Fix prototype.
1848 * search.c (current_scope): Return the innermost non-block scope,
1849 not the innermost non-block, non-namespace scope.
1850 (at_namespace_scope_p): Adjust accordingly.
1851 (dfs_accessible_post): Do not pass namespaces to is_friend.
1852 (dfs_walk_once_accessible_r): Likewise.
1853 * decl.c (grokvardecl): Adjust call to current_scope.
1854 (build_enumerator): Likewise.
1855 * parser.c (cp_parser_using_declaration): Likewise.
1856 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1858 (cp_parser_class_head): Adjust call to current_scope.
1859 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1863 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1864 their underlying values.
1867 * typeck.c (build_binary_op): Honor build_type, even when in a
1870 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
1872 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1873 padding token checking.
1875 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
1878 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1879 layout_type as it is already done by create_array_type_for_decl.
1881 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
1884 * parser.c (eof_token): Make const, correctly initialize rid and
1886 (struct cp_lexer): Replace buffer_end pointer with buffer_length
1888 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
1890 (cp_lexer_new_from_tokens): Adjust.
1891 (cp_lexer_grow_buffer): Remove.
1892 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1893 cp_lexer_purge_token): Add const casts.
1895 2004-10-21 Mark Mitchell <mark@codesourcery.com>
1899 * cp-tree.h (convert_to_base): Change prototype.
1900 (build_ptrmemfunc): Likewise.
1901 (convert_ptrmem): New function.
1902 * call.c (struct conversion): Adjust documentation for base_p.
1903 (standard_conversion): Set base_p for ck_pmem conversions as
1905 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1907 * class.c (convert_to_base): Handle both pointers and objects.
1908 Add nonnull parameter.
1909 (build_vfield_ref): Adjust call to convert_to_base.
1910 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1911 (convert_force): Likewise.
1912 * typeck.c (build_unary_op): Likewise.
1913 (convert_ptrmem): New function.
1914 (build_static_cast_1): Use it.
1915 (build_reinterpret_cast): Allow conversions to vector types.
1916 (get_delta_difference): Add c_cast_p parameter.
1917 (build_ptrmemfunc): Likewise. Adjust calls to
1918 get_delta_difference.
1920 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
1923 * error.c (cp_error_at): Output the context as it might be
1924 different file as the other location.
1926 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
1928 * typeck.c: Fix a comment typo.
1930 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1933 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1934 * cp-tree.h (make_unbound_class_template): Adjust prototype.
1935 * parser.c (cp_parser_lookup_name): Adjust call to
1936 make_unbound_class_template.
1937 (cp_parser_single_declaration): Handle member class of class
1938 template as template friend parsing correctly.
1939 * friend.c (is_friend): Call is_specialization_of_friend for
1940 template friend class.
1941 (make_friend_class): Handle member class of class template as
1943 * pt.c (is_specialization_of_friend): Likewise.
1944 (instantiate_class_template): Likewise.
1945 (tsubst): Adjust call to make_unbound_class_template.
1947 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1949 * typeck.c (composite_pointer_type): Add comment about DR 195
1950 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1951 Allow function pointer conversions that DR195 suggests.
1952 (build_reinterpret_cast, build_c_cast): Update
1953 build_reinterpret_cast_1 calls.
1955 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
1957 * call.c, typeck.c: Fix comment typos.
1959 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1961 * parser.c (cp_token_position): New typedef. Define VEC thereof.
1962 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1963 next_token and last_token cp_token_position. Make saved_tokens a
1964 VEC(cp_token_position).
1965 (eof_token): New static variable.
1966 (CP_SAVED_TOKENS_SIZE): Rename to ...
1967 (CP_SAVED_TOKEN_STACK): ... here.
1968 (cp_lexer_new_main): Adjust main lexer creation and buffer
1970 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1971 to the parent buffer. Do not append eof token.
1972 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1974 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1975 (cp_lexer_token_position, cp_lexer_token_at): New.
1976 (cp_lexer_saving_tokens): Adjust. Make inline.
1977 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1978 (cp_lexer_peek_token_emit_debug_info): Fold into ...
1979 (cp_lexer_peek_token): ... here.
1980 (cp_lexer_peek_nth_token): Don't peek past EOF.
1981 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1983 (cp_lexer_purge_token): Adjust eof setting.
1984 (cp_lexer_purge_tokens_after): Likewise.
1985 (cp_lexer_save_tokens): Push next_token directly.
1986 (cp_lexer_commit_tokens): Adjust.
1987 (cp_lexer_rollback_tokens): Pop next_token directly.
1988 (cp_parser_check_for_invalid_template_id): Adjust token purging.
1989 (cp_parser_translation_unit): Do not consume the EOF.
1990 (cp_parser_nested_name_specifier_opt): Adjust token purging.
1991 (cp_parser_template_id, cp_parser_template_name): Likewise.
1993 2004-10-19 Mark Mitchell <mark@codesourcery.com>
1996 * call.c (struct conversion): Add base_p.
1997 (convert_like): Add c_cast_p argument.
1998 (convert_like_with_conversion): Likewise.
1999 (build_conv): Clear base_p.
2000 (standard_conversion): Set it, for derived-to-base conversions.
2001 (convert_like_real): Add c_cast_p parameter. Handle pointer
2002 conversions directly rather than relying on ocp_convert.
2003 (perform_direct_initialization_if_possible): Add c_cast_p
2005 * cp-tree.h (perform_direct_initialization_if_possible): Change
2007 (convert_member_func_to_ptr): New function.
2008 * typeck.c (check_for_casting_away_constness): Add diag_fn
2010 (build_static_cast_1): New function, split out from ...
2011 (build_static_cast): ... here. Use build_static_cast_1.
2012 (build_reinterpret_cast_1): New function, split out from ...
2013 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
2014 (build_const_cast_1): New function, split out from ...
2015 (build_const_cast): ... here. Use build_const_cast_1.
2016 (build_c_cast): Rewrite to use build_const_cast_1,
2017 build_static_cast_1, and build_reinterpret_cast_1.
2018 (convert_member_func_to_ptr): New function.
2020 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
2023 * parser.c (enum cp_parser_prec): Give relational expressions
2024 a higher precedence than equality expressions.
2026 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
2028 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2029 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2030 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2031 (enum base_access): Reorganize.
2032 (accessible_base_p, accessible_p): Add consider_local_p parameter.
2033 * call.c (standard_conversion): Update comment about
2035 (enforce_access): Adjust accessible_p call.
2036 (build_over_call): Adjust accessible_base_p call.
2037 * class.c (convert_to_base): Adjust lookup_base call.
2038 (build_vtbl_ref_1): Likewise.
2039 (warn_about_ambiguous_bases): Likewise. Add early exit.
2040 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2041 * search.c (accessible_base_p): Add consider_local_p parameter.
2042 (lookup_base): Pass consider_local_p to accessible_base_p call.
2043 (friend_accessible_p): Check whether scope is a class member.
2044 Remove unnecessary class template check.
2045 (accessible_p): Add consider_local_p parameter. Use it.
2046 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2047 * tree.c (maybe_dummy_object): Likewise.
2048 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2049 (build_class_member_access_expr): Adjust lookup_base call.
2050 * typeck2.c (binfo_or_else): Likewise.
2051 * rtti.c (build_dynamic_cast_1): Access can consider friendship
2054 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2057 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2059 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2062 * parser.c (cp_parser_parenthesized_expression_list): Fold
2063 non-dependent expressions in attribute lists.
2065 2004-10-15 Mark Mitchell <mark@codesourcery.com>
2068 * decl.c (declare_global_var): Use the return value from pushdecl.
2071 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2072 type names if we have already found a valid type.
2073 (cp_parser_member_declaration): Likewise.
2076 * parser.c (cp_parser_member_specification_opt): Handle
2079 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2081 * dump.c, g++spec.c, repo.c: Update copyright.
2083 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2085 * decl.c: Fix a comment typo.
2087 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2090 * name-lookup.c (parse_using_directive): If we have a
2091 error_mark_node, do not set the decl namespace associations
2094 2004-10-14 Mark Mitchell <mark@codesourcery.com>
2097 * decl.c (cp_finish_decl): Do not call expand_static_init more
2098 than once for a single variable.
2100 2004-10-14 Matt Austern <austern@apple.com>
2102 * Make-lang.in (pt.o): depends on pointer-set.h
2103 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2104 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2105 (for_each_template_parm): Convert from htab_t to pointer_set_t.
2106 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2108 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2111 * semantics.c (finish_for_expr): Convert expression to void
2112 so that we don't create temporaries for a?b:c.
2114 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
2116 * search.c: Fix a comment typo.
2118 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
2120 * class.c (dfs_modify_vtables): Simplify condition. Return
2121 dfs_skip_bases as appropriate.
2122 (modify_all_vtables): Walk in pre-order.
2123 * search.c (dfs_walk_all, dfs_walk_once_r,
2124 dfs_walk_once_accessible_r): Assert post order function never
2125 returns dfs_skip_bases.
2127 * search.c (struct lookup_base_data_s): New.
2128 (lookup_base_r): Replace with ...
2129 (dfs_lookup_base): ... this.
2130 (lookup_base): Use dfs_walk_all.
2132 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
2134 * search.c: Fix comment typos.
2136 2004-10-11 Mark Mitchell <mark@codesourcery.com>
2139 * parser.c (cp_parser_declarator): Add member_p parameter.
2140 (cp_parser_condition): Adjust calls to cp_parser_declarator.
2141 (cp_parser_explicit_instantiation): Likewise.
2142 (cp_parser_init_declarator): Likewise.
2143 (cp_parser_direct_declarator): Add member_p parameter. Do not
2144 parse tentatively when parsing the parameters to a member.
2145 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2146 (cp_parser_parameter_declaration): Likewise.
2147 (cp_parser_member_declaration): Likewise.
2148 (cp_parser_exception_declaration): Likewise.
2151 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2152 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2153 for members of partial or explicit specializations.
2156 * decl2.c (finish_anon_union): Robustify.
2158 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
2160 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2161 (dcast_base_hint): ... here.
2162 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2163 * search.c (struct dcast_data_s): New.
2164 (dynamic_cast_base_recurse): Remove. Replace with ...
2165 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2166 (get_dynamic_cast_base_type): Rename to ...
2167 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
2168 (accessible_r): Remove.
2169 (dfs_accessible_post): New, broken out of accessible_r.
2170 (accessible_p): Use dfs_walk_once_accessible.
2171 (dfs_walk_once_accessible_r): New. From accessible_r.
2172 (dfs_walk_once_accessible): New. From acessible_p.
2174 * cp-tree.h (SAME_BINFO_TYPE_P): New.
2175 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2177 (convert_to_base_statically, determine_primary_bases,
2178 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2179 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2180 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2181 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2182 * init.c (expand_member_init): Likewise.
2183 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2184 binfo_via_virtual, copied_binfo, binfo_for_vbase,
2185 original_binfo): Likewise.
2186 * tree.c (copy_binfo): Likewise.
2188 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
2190 * semantics.c: Fix comment typos.
2192 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2197 * semantics.c (maybe_cleanup_point_expr): Call
2198 fold_build_cleanup_point_expr.
2199 (maybe_cleanup_point_expr_void): New function.
2200 (add_decl_expr): Call maybe_cleanup_point_expr_void.
2201 (finish_expr_stmt): Likewise.
2202 (finish_return_stmt): Likewise.
2203 (finish_for_expr): Likewise.
2204 (finish_asm_stmt): Likewise.
2205 * typeck.c (condition_conversion): Call
2206 fold_build_cleanup_point_expr.
2208 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2211 * semantics.c (add_decl_expr): If the decl has a size which
2212 has side effects then the decl expression needs a cleanup point.
2214 2004-10-10 Mark Mitchell <mark@codesourcery.com>
2217 * decl.c (grokdeclarator): Robustify error-recovery on invalid
2220 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2222 Convert diagnostics to use quoting flag q 7/n
2223 * typeck.c (composite_pointer_type_r, composite_pointer_type,
2224 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2225 string_conv_p, build_class_member_access_expr,
2226 build_class_member_access_expr, lookup_destructor,
2227 finish_class_member_access_expr, build_indirect_ref,
2228 get_member_function_from_ptrfunc, build_function_call,
2229 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2230 check_for_casting_away_constness, build_static_cast,
2231 build_reinterpret_cast, build_const_cast, build_c_cast,
2232 build_modify_expr, get_delta_difference, build_ptrmemfunc,
2233 dubious_conversion_warnings, convert_for_assignment,
2234 convert_for_initialization,
2235 maybe_warn_about_returning_address_of_local, check_return_expr):
2238 * typeck2.c (error_not_base_type, readonly_error,
2239 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2240 store_init_value, digest_init, build_x_arrow,
2241 build_m_component_ref, require_complete_eh_spec_types): Likewise.
2243 * tree.c (cp_build_qualified_type_real,
2244 handle_java_interface_attribute, handle_init_priority_attribute):
2247 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2248 finish_pseudo_destructor_expr,
2249 check_template_template_default_arg, begin_class_definition,
2250 finish_base_specifier, qualified_name_lookup_error,
2251 finish_id_expression, finish_typeof): Likewise.
2253 * search.c (lookup_base, check_final_overrider,
2254 look_for_overrides_r): Likewise.
2256 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2258 2004-10-09 Mark Mitchell <mark@codesourcery.com>
2261 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2265 * init.c (build_new): Correct comments.
2266 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2270 * parser.c (cp_parser_postfix_dot_deref_expression): If the
2271 pseduo-destructor-name production does not work, fall back to the
2272 ordinary production.
2275 * tree.c (cp_tree_equal): Handle a BASELINK.
2278 * cp-tree.h (check_var_type): New function.
2279 * decl.c (check_var_type): New function, split out from ...
2280 (grokdeclarator): ... here.
2281 * pt.c (tsubst_decl): Use check_var_type.
2284 * decl.c (grokdeclarator): Disallow declarations of operators as
2287 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2290 * error.c (dump_expr): Add missing case for RDIV_EXPR.
2292 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
2294 * pt.c, search.c: Fix comment typos.
2296 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
2298 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2300 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2301 * class.c (struct find_final_overrider_data): Remove most_derived,
2302 vpath_list and vpath fields. Add path field.
2303 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2304 (dfs_find_final_overrider): Rename to ...
2305 (dfs_find_final_overrider_pre): ... here. Adjust.
2306 (dfs_find_final_overrider_post): Adjust.
2307 (dfs_find_final_overrider_q): Fold into
2308 dfs_find_final_overrider_pre.
2309 (find_final_overrider): Adjust dfs searching.
2310 (dfs_modify_vtables): Don't mark binfo here.
2311 (modify_all_vtables): Use dfs_walk_once.
2312 (build_vtt_inits): Likwise. Use dfs_walk_all.
2313 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2314 Return dfs_skip_bases as appropriate.
2315 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2316 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2317 appropriate. Don't mark binfo here.
2318 (initialize_vtbl_ptrs): Use dfs_walk_once.
2319 * search.c (struct vbase_info): Remove unused struct.
2320 (access_in_type): Use dfs_walk_once.
2321 (dfs_access_in_type): Don't mark binfo here.
2322 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2324 (accessible_r): ... here. New. Specialize dfs_walk_once.
2325 (accessible_p): Use accessible_r.
2326 (lookup_field_queue_p): Remove. Fold into ...
2327 (lookup_field_r): ... here. Adjust.
2328 (lookup_member): Use dfs_walk_all.
2329 (dfs_walk_real, dfs_walk): Replace with ...
2330 (dfs_walk_all, dfs_walk_once): ... these.
2331 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2332 (dfs_unmark, unmarkedp, markedp): Remove.
2333 (dfs_get_pure_virtuals): Don't mark binfo here.
2334 (get_pure_virtuals): Use dfs_walk_once.
2335 (dfs_debug_unmarked_p): Remove. Fold into ...
2336 (dfs_debug_mark): ... here.
2337 (note_debug_info_needed): Use dfs_walk_all.
2339 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2341 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2342 CLEANUP_POINT_EXPR to get the asm expression.
2344 2004-10-07 Mark Mitchell <mark@codesourcery.com>
2346 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2347 (DECL_MEMBER_TEMPLATE_P): New macro.
2348 (is_member_template): Remove.
2349 (class_method_index_for_fn): New function.
2350 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2351 * class.c (finish_struct_methods): Remove out-of-date comment.
2352 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2353 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2354 class_method_index_for_fn.
2355 * pt.c (is_member_template): Remove.
2356 (is_member_template_class): Likewise.
2357 (optimize_specialization_lookup_p): New function.
2358 (retrieve_specialization): Optimize lookups for members that are
2359 not member templates.
2360 (register_specialization): Adjust accordingly.
2361 (build_template_decl): Add member_template_p parameter. Set
2362 DECL_MEMBER_TEMPLATE_P.
2363 (process_partial_specialization): Adjust call to
2364 retrieve_specialization.
2365 (push_template_decl_real): Determine whether the template is a
2367 (lookup_template_class): Use retrieve_specialization.
2368 (tsubst_decl): Adjust call to retrieve_specialization.
2369 (tsubst_exception_specification): New function.
2371 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2372 (instantiate_template): Adjust call to retrieve_specialization.
2373 (regenerate_decl_from_template): Do not actually generate a new
2375 (instantiate_decl): Adjust call to retrieve_specialization.
2376 (class_method_index_for_fn): New method.
2378 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2380 * parser.c (cp_parser_asm_definition): Look passed the
2381 CLEANUP_POINT_EXPR to get the asm expression.
2383 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
2386 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2389 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2391 Convert diagnostics to use quoting flag q 6/n
2392 * pt.c (finish_member_template_decl, check_specialization_scope,
2393 maybe_process_partial_specialization, determine_specialization,
2394 check_explicit_specialization, maybe_check_template_type,
2395 process_partial_specialization, check_default_tmpl_args,
2396 push_template_decl_real, redeclare_class_template,
2397 convert_nontype_argument, coerce_template_parms,
2398 lookup_template_class, push_tinst_level,
2399 instantiate_class_template, tsubst_arg_types,
2400 tsubst_function_type, tsubst, tsubst_qualified_id,
2401 tsubst_copy_and_build, check_instantiated_args,
2402 do_decl_instantiation, do_type_instantiation,
2403 invalid_nontype_parm_type_p, check_specialization_namespace,
2404 convert_template_argument, determine_specialization,
2405 check_template_shadow, tsubst_decl
2406 instantiate_pending_templates): Use quoting marks.
2408 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
2411 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2412 unqualified lookup finds a member function.
2414 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2416 Convert diagnostics to use quoting flag q 5/n
2417 * parser.c (cp_parser_name_lookup_error,
2418 cp_parser_diagnose_invalid_type_name,
2419 cp_parser_primary_expression, cp_parser_unqualified_id,
2420 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2421 cp_parser_jump_statement, cp_parser_simple_declaration,
2422 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2423 cp_parser_type_parameter, cp_parser_template_id,
2424 cp_parser_template_name, cp_parser_direct_declarator,
2425 cp_parser_parameter_declaration_list, cp_parser_class_head,
2426 cp_parser_base_specifier, cp_parser_lookup_name,
2427 cp_parser_late_parsing_default_args,
2428 cp_parser_optional_template_keyword
2429 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2430 cp_parser_check_access_in_redeclaration): Use quoting marks.
2432 * name-lookup.c (supplement_binding, pushdecl,
2433 check_for_out_of_scope_variable, validate_nonmember_using_decl,
2434 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2435 push_namespace, do_namespace_alias, do_using_directive,
2436 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2438 * method.c (use_thunk): Likewise.
2440 * lex.c (unqualified_name_lookup_error,
2441 unqualified_fn_lookup_error): Likewise.
2443 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2445 Convert diagnostics to use quoting flag q 4/n
2446 * except.c (decl_is_java_type, build_throw,
2447 is_admissible_throw_operand, check_handlers_1, check_handlers):
2448 Use quoting formats.
2449 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
2450 * init.c (sort_mem_initializers, emit_mem_initializers,
2451 member_init_ok_or_else, expand_member_init, is_aggr_type,
2452 build_offset_ref, build_java_class_ref): Likewise.
2454 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2456 Convert diagnostics to use quoting flag q 3/n
2457 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2458 redeclaration_error_message, lookup_label, check_goto,
2459 make_typename_type, make_unbound_class_template,
2460 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
2461 grok_reference_init, layout_var_decl, maybe_commonize_var,
2462 check_for_uninitialized_const_var, reshape_init_array,
2463 reshape_init, check_initializer, cp_finish_decl,
2464 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
2465 check_static_variable_definition, compute_array_index_type,
2466 create_array_type_for_decl, check_special_function_return_type,
2467 grokdeclarator, check_default_argument, grokparms,
2468 grok_ctor_properties, grok_op_properties,
2469 check_elaborated_type_specifier, xref_tag, finish_enum,
2470 build_enumerator, check_function_type, start_preparsed_function,
2471 store_parm_decls): Use quoting formats.
2472 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
2473 check_java_method, check_classfn, finish_static_data_member_decl,
2474 grokfield, grokbitfield, grok_function_init,
2475 build_anon_union_vars, coerce_new_type, coerce_delete_type,
2476 check_default_args): Likewise.
2477 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2479 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2481 Convert diagnostics to use quoting flag q 2/n
2482 * class.c (build_base_path, add_method, alter_access,
2483 handle_using_decl, check_bases,
2484 maybe_warn_about_overly_private_class, find_final_overrider,
2485 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2486 check_bitfield_decl, check_field_decls, layout_empty_base,
2487 build_base_field, check_methods, layout_virtual_bases,
2488 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2489 resolve_address_of_overloaded_function, instantiate_type,
2490 note_name_declared_in_class): Use format flag "q" for quoting.
2492 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2494 Convert diagnostics to use quoting flag q 1/n
2495 * error.c (locate_error): Ignore quoting flag q.
2496 * call.c (build_user_type_conversion_1, build_operator_new_call,
2497 build_object_call, op_error, build_conditional_expr,
2498 build_new_op, build_op_delete_call, enforce_access,
2499 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2500 convert_default_arg, build_over_call, build_new_method_call,
2501 joust, perform_implicit_conversion, initialize_reference): Use the
2504 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
2507 * typeck.c (build_reinterpret_cast): Return if the inner type
2510 2004-10-01 Jan Hubicka <jh@suse.cz>
2512 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2514 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
2516 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2517 turning operator_code and fixed_offset into bitfields.
2519 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
2521 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2523 2004-09-29 Jason Merrill <jason@redhat.com>
2525 PR tree-optimization/17697
2526 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2528 2004-09-28 Jason Merrill <jason@redhat.com>
2531 * class.c (build_base_field): Set TYPE_MODE.
2533 2004-09-28 Roger Sayle <roger@eyesopen.com>
2536 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2537 than -lc and -lm, may require linking against libstc++.
2539 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
2541 * tree.c: Fix a comment typo.
2543 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
2545 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2546 (struct secondary_vptr_vtt_init_data_s): New.
2547 (build_vtt_inits): Adjust dfs_walkers.
2548 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2549 secondary_vptr_vtt_init_data_s structure. Adjust.
2550 (dfs_ctor_vtable_bases_queue_p): Remove.
2551 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2553 * pt.c (struct get_template_base_data_s): Remove.
2554 (get_template_base_r): Fold into get_template_base.
2555 (get_template_base): Walk base binfos directly in inheritance
2558 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2561 * cp-tree.h (fold_if_not_in_template): New function.
2562 * call.c (build_conditional_expr): Use fold_if_not_in_template.
2563 (build_cxx_call): Likewise.
2564 * cvt.c (convert_to_complex): Likewise.
2565 (ocp_convert): Likewise.
2566 (convert): Likewise.
2567 (convert_force): Likewise.
2568 * decl.c (compute_array_index_type): Clear
2569 processing_template_decl while folding array bounds.
2570 * pt.c (convert_nontype_argument): Clear
2571 processing_template_decl while processing non-type argument
2573 * tree.c (fold_if_not_in_template): New function.
2574 * typeck.c (build_class_member_access_expr): Use
2575 fold_if_not_in_template.
2576 (build_array_ref): Likewise.
2577 (build_binary_op): Likewise. Do not try to optimize computations
2578 when processing templates.
2579 (cp_pointer_int_sum): Use fold_if_not_in_template.
2580 (pointer_diff): Likewise.
2581 (build_unary_op): Likewise.
2582 (build_reinterpret_cast): Likewise.
2583 (get_delta_difference): Likewise.
2584 (expand_ptrmemfunc_cst): Likewise.
2585 (dubious_conversion_warnings): Likewise.
2587 2004-09-27 Matt Austern <austern@apple.com>
2589 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
2590 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
2591 tokens that come from headers that are implicitly extern "C".
2592 (struct cp_parser): new one-bit field, implicit_extern_c.
2593 (cp_parser_new): Set parser's implicit_extern_c to false.
2594 (cp_parser_translation_unit): Pop lang context if we were in a
2595 header that was implicitly extern "C".
2596 (cp_parser_declaration_seq_opt): Push/pop lang context as
2597 required by the token's and parser's implicit_extern_c.
2599 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2602 * cp-tree.h (shared_member_p): Declare.
2603 * search.c (shared_member_p): Give it external linkage.
2604 * semantics.c (finish_qualified_id_expr): Use it.
2605 (finish_id_expression): Likewise.
2608 * semantics.c (finish_id_expression): Do not add "this->" to
2609 static member functions.
2611 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
2614 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
2616 * class.c (struct count_depth_data): Remove.
2617 (dfs_depth_post, dfs_depth_q): Remove.
2618 (find_final_overrider): Use number of vbase classes as depth
2621 * cp-tree.h (types_overlap_p): Remove.
2622 * search.c (struct overlap_info): Remove.
2623 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
2625 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
2626 (get_template_base_recursive): Remove. Replace with ...
2627 (get_template_base_r): ... this.
2628 (struct get_template_base_data_s): New.
2629 (get_template_base): Use get_template_base_r via dfs_walk. Always
2630 return NULL on failure.
2631 (unify): Remove error_mark_node check from get_template_base result.
2633 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
2635 * parser.c (cp_parser_expression_stack): Clarify why it is
2636 an array of NUM_PREC_VALUES elements.
2637 (cp_parser_binary_expression): Clarify why we do not need to
2638 handle stack overflow.
2640 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
2643 * search.c (lookup_field_queue_p): Correct check for hidden base.
2645 * search.c (bfs_walk): Remove.
2646 (lookup_member): Use dfs_walk_real.
2647 (dfs_walk_real): Move and adjust documentation from bfs_walk.
2649 2004-09-23 Zack Weinberg <zack@codesourcery.com>
2651 * decl.c (grokfndecl): If ::main is found not to return int,
2652 correct it after issuing a diagnostic.
2653 (grokdeclarator): If the incoming type was error_mark_node, do
2654 not complain about declaring something with no type.
2655 (start_function): Change check for ::main not returning int to
2656 an assertion, as grokfndecl now catches this when the user did it.
2657 * init.c (perform_member_init, sort_mem_initializers)
2658 (emit_mem_initializers): Make most diagnostics be issued on
2659 the line of current_function_decl, not whatever the current
2661 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
2662 definition and declaration with #ifdef ENABLE_CHECKING.
2663 Avoid unnecessary use of fprintf.
2664 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
2665 definitions to avoid warnings.
2666 (cp_lexer_new_main): Add assertion that first token is not a
2668 (cp_lexer_new_from_token_array): Fold into ...
2669 (cp_lexer_new_from_tokens): ... here. Add assertion that
2670 first token is not a padding token.
2671 (cp_lexer_set_source_position_from_token): Move nearer to callers.
2672 Remove unused lexer argument.
2673 (cp_lexer_peek_token): Just print debugging report (if enabled)
2674 and return lexer->next_token.
2675 (cp_lexer_skip_purged_tokens): Delete.
2676 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
2677 inline, simplify bodies.
2678 (cp_lexer_peek_nth_token): Add debugging report a la
2679 cp_lexer_peek_token.
2680 (cp_lexer_consume_token): Correct commentary. Advance over
2681 purged tokens here. Set current source position here, from
2682 token to be returned. Avoid unnecessary use of fprintf.
2683 (cp_lexer_purge_token): Advance next_token pointer over this and
2684 subsequent purged tokens.
2685 (cp_parser_error): Adjust source position to that of the
2687 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
2688 (cp_parser_string_literal): Remove some excessive cleverness.
2689 (cp_parser_enum_specifier): Call start_enum before consuming
2691 (cp_parser_member_declaration): Make the "extra semicolon"
2692 diagnostic consistently-worded with the other place this is
2693 diagnosed. Explicitly set the diagnostic location to the
2694 location of the offending semicolon.
2695 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
2696 in diagnostics. Do not use cp_parser_require. Set location
2697 of diagnostics about improper use of '>>' to location of
2699 (cp_parser_late_parsing_for_member):
2700 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
2701 (cp_parser_late_parsing_default_args): Likewise. Manually
2702 move some logic outside the loop.
2704 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
2707 * cvt.c (cp_convert_to_pointer): Return early when the type is
2710 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
2714 * decl.c (grokfndecl): Add new argument "attrlist", use it
2715 to call cplus_decl_attributes.
2716 (start_function): Remove call to cplus_decl_attributes.
2717 * cvt.c (ocp_convert): Add support to use type conversion
2718 function to vector type.
2719 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2722 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
2726 * parser.c (cp_parser_token_tree_map_node,
2727 cp_parser_pm_expression, cp_parser_additive_expression,
2728 cp_parser_multiplicative_expression, cp_parser_shift_expression,
2729 cp_parser_relational_expression, cp_parser_equality_expression,
2730 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2731 cp_parser_inclusive_or_expression,
2732 cp_parser_logical_and_expression,
2733 cp_parser_logical_or_expression): Removed.
2734 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2735 binops, binops_by_token): New.
2736 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2737 (cp_parser_new): Initialize binops_by_token.
2738 (cp_parser_binary_expression): Rewritten.
2741 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
2743 * parser.c: Fix a comment typo.
2745 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
2748 * decl.c (xref_basetypes): Look through typedefs before checking
2751 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2753 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2754 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2755 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2756 (init_rtti_processing): Initialize it to something realistic.
2757 (get_tinfo_decl): Adjust pushing the new decl.
2759 * cp-tree.h (struct lang_type_class): Remove marked flags, add
2760 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
2761 (TYPE_MARKED_P): New.
2762 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2763 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2764 CLEAR_CLASSTYPE_MARKED_N): Remove.
2765 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2766 CLEAR_CLASSTYPE_MARKED_*): Remove.
2767 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2768 shaped and repeated base properties.
2769 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2770 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2771 class_hint_flags): Remove.
2772 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2773 CLASSTYPE_DIAMOND_SHAPED_P.
2775 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2777 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2779 (objcp_tsubst_copy_and_build): Reformat function signature.
2780 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2781 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2783 2004-09-21 Zack Weinberg <zack@codesourcery.com>
2785 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2786 Don't handle CPP_PRAGMA tokens specially.
2787 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
2788 purge the token; do clear token->value after processing. Add
2789 assertion at beginning that token->value is nonzero.
2790 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2791 CPP_PRAGMA as a full statement or declaration in its own right.
2793 2004-09-21 Matt Austern <austern@apple.com>
2796 * decl.c (grokvardecl): Accept declarations of global variables
2797 using anonymous types.
2799 2004-09-21 Roger Sayle <roger@eyesopen.com>
2802 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
2803 if either operand has side-effects.
2804 * typeck.c (rationalize_conditional_expr): Assert that neither
2805 operand of MIN_EXPR or MAX_EXPR has side-effects.
2806 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
2807 Check that the "lhs" is a valid lvalue, i.e. that neither operand
2808 of a MIN_EXPR or MAX_EXPR has a side-effect.
2810 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
2812 * cp-tree.h (struct lang_type_header): Remove
2813 uses_multiple_inheritance field.
2814 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2815 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2816 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2817 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2818 (TYPE_CONTAINS_VPTR_P): Likewise.
2819 * call.c (add_template_candidate_real): Use
2820 CLASSTYPE_VBASECLASSES.
2821 (build_special_member_call): Likewise.
2822 * class.c (finish_struct_bits): Remove
2823 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2825 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2826 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2828 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2829 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2831 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2832 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2834 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2835 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2836 * init.c (expand_member, push_base_cleanups): Likewise.
2837 * pt.c (instantiate_class_template): Remove
2838 TYPE_USES_MULTIPLE_INHERITANCE,
2839 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2841 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2843 * typeck2.c (process_init_constructor): Replace some sorrys with
2846 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
2848 * decl.c (reshape_init_array): Initialize max_index_cst to fix
2851 2004-09-20 Mark Mitchell <mark@codesourcery.com>
2854 * pt.c (tsubst): Fix parentheses to accomodate emacs.
2855 (tsubst_baselink): If we get a single function, mark it as used.
2857 2004-09-20 Matt Austern <austern@apple.com>
2858 Zack Weinberg <zack@codesourcery.com>
2860 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2861 Apply lbasename to input_filename before passing to get_fileinfo.
2862 * semantics.c (begin_class_definition): Likewise.
2863 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2864 correct filename. Rename variables to be less confusing.
2865 (handle_pragma_implementation): Likewise. Disable "appears
2866 after file is included" diagnostic.
2868 * parser.c (struct cp_token): Add in_system_header fiag.
2869 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2870 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2871 (CPP_NONE, cp_lexer_read_token): Delete.
2872 (struct cp_lexer): Remove first_token, string_tokens,
2873 main_lexer_p fields. Clarify comments.
2874 (struct cp_token_cache): Now just a pair of pointers.
2875 (CP_LEXER_BUFFER_SIZE): New #define.
2876 (CPP_PURGED): New fake token type.
2877 (cp_lexer_new_from_token_array, cp_lexer_destroy)
2878 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2879 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2881 (cp_lexer_new_from_tokens): Now a simple wrapper around
2882 cp_lexer_new_from_token_array.
2883 (cp_lexer_set_source_position_from_token): Also update
2885 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2887 (cp_lexer_token_difference): Dont handle wrapping round.
2888 (cp_lexer_new_main): Enable pragma deferral and raw strings,
2889 read the entire translation unit through c_lex_with_flags into
2890 this lexer's buffer, then turn raw strings back off again.
2891 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2892 (cp_lexer_get_preprocessor_token): No need to handle not being
2893 the main lexer. Set token->in_system_header too.
2894 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
2895 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
2896 (cp_lexer_peek_nth_token): Likewise.
2897 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2898 the other tokens down.
2899 (cp_lexer_purge_tokens_after): Likewise.
2900 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2901 about there being no tokens.
2902 (cp_lexer_print_token): Revise to give useful information on
2904 (struct cp_parser): Add field translate_strings_p.
2905 (cp_parser_new): Initialize it.
2906 (cp_parser_translation_unit): Destroy the lexer when done.
2907 (cp_parser_parameter_declaration): Restructure saving of
2909 (cp_parser_save_member_function_body): Likewise.
2910 (cp_parser_check_for_invalid_template_id)
2911 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2912 Adjust calls to cp_lexer_advance_token.
2913 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2914 No need to fiddle c_lex_string_translate.
2915 (cp_parser_primary_expression, cp_parser_linkage_specification)
2916 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2917 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2918 Use cp_parser_string_literal.
2919 (cp_parser_attribute_list): Save and restore
2920 parser->translate_strings_p, not c_lex_string_translate.
2921 (cp_parser_cache_group): Delete.
2922 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
2923 not take a cache argument.
2925 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2928 * decl.c (reshape_init): Extract array handling into...
2929 (reshape_init_array): New function. Use integers instead of trees
2930 for indices. Handle out-of-range designated initializers.
2932 2004-09-20 Steven Bosscher <stevenb@suse.de>
2934 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2937 2004-09-19 Mark Mitchell <mark@codesourcery.com>
2939 * decl2.c (determine_visibility): Allow class visibility
2940 directives to override targetm.cxx.export_class_data.
2942 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
2944 * call.c, semantics.c: Follow spelling conventions.
2945 * class.c: Fix a comment typo.
2947 2004-09-16 Geoffrey Keating <geoffk@apple.com>
2950 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2951 (handle_pragma_implementation): Likewise.
2953 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2954 Zack Weinberg <zack@codesourcery.com>
2956 * cp-tree.def: Use tree_code_class enumeration constants
2957 instead of code letters.
2958 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2959 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2960 Update for new tree-class enumeration constants.
2962 2004-09-16 Mark Mitchell <mark@codesourcery.com>
2965 * parser.c (cp_parser_simple_declaration): Commit to tentative
2966 parses after seeing a decl-specifier.
2967 (cp_parser_simple_declaration): Eliminate spurious message.
2968 (cp_parser_init_declarator): Adjust error message.
2971 * lex.c (unqualified_name_lookup_error): Mark the dummy
2972 declaration as used.
2975 * parser.c (cp_parser_nested_name_specifier): Do not resolve
2976 typename types if the user explicitly said "typename".
2978 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
2980 * error.c (dump_decl): Make sure there is lang_specific info before
2981 checking for DTOR and CTOR decls.
2983 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2985 * class.c (copy_virtuals): Remove.
2986 (build_primary_vtable): Use copy_list directly.
2987 (build_secondary_vtable): Likewise.
2988 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2989 (create_vtable_ptr): Likewise.
2991 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2993 * search.c: Follow spelling conventions.
2995 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2997 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2999 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3001 * call.c (build_new_method_call): Don't confirm a pure virtual is
3002 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
3003 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3004 (fixup_inline_methods, finish_struct): Likewise.
3005 * decl.c (finish_method): Likewise.
3006 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3007 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3008 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3009 vector to avoid repeating the list in error messages.
3011 2004-09-15 Mark Mitchell <mark@codesourcery.com>
3013 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3014 * cp-tree.h (cxx_comdat_group): Declare.
3015 * decl.c (cxx_comdat_group): New function.
3017 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
3019 * search.c (get_pure_virtuals): Remove unused variables.
3021 * cp-tree.h (struct lang_decl_flags): Remove
3022 needs_final_overrider.
3023 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3024 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3025 * class.c (finish_struct_bits): Correct comment about
3026 CLASSTYPE_PURE_VIRTUALS.
3027 * search.c (get_pure_virtuals): Remove useless loop.
3029 2004-09-14 Mark Mitchell <mark@codesourcery.com>
3032 * mangle.c (partially_mangled_name): New variable.
3033 (partially_mangled_name_len): Likewise.
3034 (save_partially_mangled_name): New function.
3035 (restore_partially_mangled_name): Likewise.
3036 (write_encoding): Save and restore partially mangled names around
3037 calls to get_mostly_instantiated_function_type.
3038 (write_unqualified_name): Likewise.
3040 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
3042 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3044 2004-09-13 Mark Mitchell <mark@codesourcery.com>
3047 * parser.c (cp_parser_id_expression): Correct value for
3049 (cp_parser_nested_name_specifier_opt): Look through typenames as
3051 (cp_parser_template_name): Honor check_dependency_p.
3054 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3058 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
3061 2004-09-12 Richard Henderson <rth@redhat.com>
3064 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3065 * typeck.c (condition_conversion): Likewise.
3067 2004-09-11 Richard Henderson <rth@redhat.com>
3070 * pt.c (cur_stmt_expr): Move from tsubst_expr.
3071 (tsubst_expr) <case STMT_EXPR>: Move ...
3072 (tsubst_copy_and_build): ... here.
3074 2004-09-10 Zack Weinberg <zack@codesourcery.com>
3076 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3077 comment explaining them moved to c-common.h.
3078 * lex.c (interface_only, interface_unknown, extract_interface_info):
3080 (cxx_finish): Don't reset interface_unknown.
3081 (handle_pragma_interface): Don't set interface_only and
3082 interface_unknown; just the like-named fields in finfo.
3083 (handle_pragma_implementation): Adjust comment.
3084 * decl2.c (cp_finish_file): Don't reset interface_only and
3086 * method.c (synthesize_method): Don't reset interface_unknown or
3087 call extract_interface_info.
3088 * pt.c (pop_tinst_level): Don't call extract_interface_info.
3089 * decl.c (start_cleanup_fn): Don't save or restore interface_only
3090 and interface_unknown.
3091 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3092 and use the result instead of the interface_only/interface_unknown
3094 (start_preparsed_function): Likewise.
3095 * lex.c (cxx_make_type): Likewise.
3096 * semantics.c (begin_class_definition): Likewise.
3097 (expand_body): Don't call extract_interface_info.
3099 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3101 * decl.c (objc_mark_locals_volatile): Make description of
3102 routine more descriptive; only mark VAR_DECLs at each
3105 2004-09-10 Richard Henderson <rth@redhat.com>
3108 * call.c (build_vfield_ref): Move...
3109 * class.c (build_vfield_ref): ... here. Convert datum to the
3110 primary base containing the vptr.
3111 (make_new_vtable): Simplify build_primary_vtable arguments.
3112 (finish_struct_1): Do not duplicate TYPE_VFIELD.
3113 * typeck.c (build_class_member_access_expr): Don't warn for
3114 null object access to base fields.
3116 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3118 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3119 New functions, to be called from ObjC++.
3121 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
3123 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3124 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3127 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3129 * typeck.c (build_c_cast): Preserve the cast if casting
3130 to and from an Objective-C type.
3132 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3134 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3135 * typeck.c: Include c-common.h.
3136 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3137 return the result if nonnegative.
3139 2004-09-09 Zack Weinberg <zack@codesourcery.com>
3141 * decl2.c (import_export_class)
3142 * lex.c (handle_pragma_interface):
3143 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3145 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3147 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3148 * semantics.c: Include c-common.h.
3149 (finish_compound_stmt): Call objc_clear_super_receiver().
3151 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3153 * cp-tree.h (do_poplevel): New prototype.
3154 * semantics.c (do_poplevel): Make externally visible.
3156 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
3158 * cp-tree.h (tree_pair_s): Define a GC'd vector.
3159 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3160 * semantics.c (deferred_access): Likewise.
3162 2004-09-06 Daniel Jacobowitz <dan@debian.org>
3164 * semantics.c (expand_body): Assert that we are not nested.
3166 2004-09-06 Zack Weinberg <zack@codesourcery.com>
3168 * decl.c (build_enumerator): Use add_double and int_fits_type_p
3169 instead of cp_build_binary_op, to avoid creating short-lived trees.
3170 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3171 lookahead instead of backtracking. Move some code to avoid a
3173 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3174 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3175 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3176 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3178 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3180 * decl.c (grok_declarator): Remove a redundant semicolon.
3182 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3183 Correct comments describing function parameters.
3185 2004-09-03 Matt Austern <austern@apple.com>
3186 Compile speed improvement.
3187 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3188 Otherwise define a stub macro that expands to nothing.
3189 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
3190 define a stub macro that expands to 0.
3191 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3192 (cp_lexer_stop_debugging): Likewise.
3193 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
3194 define a stub macro that expands to NULL.
3195 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3196 (cp_lexer_new_from_tokens): Likewise.
3198 2004-09-03 Jan Hubicka <jh@suse.cz>
3200 * decl.c (finish_function): Clean out pointers we no longer need.
3202 2004-09-03 Jan Beulich <jbeulich@novell.com>
3204 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3207 2004-09-02 Paul Brook <paul@codesourcery.com>
3209 * decl2.c (determine_visibility): Only check data visibility
3212 2004-08-31 Mark Mitchell <mark@codesourcery.com>
3214 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3215 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3216 * decl2.c (determine_visibility): Honor
3217 TARGET_CXX_EXPORT_CLASS_DATA.
3219 * class.c (key_method): Rename to ...
3220 (determine_key_method): ... this.
3221 (finish_struct_1): Adjust accordingly.
3222 * cp-tree.h (key_method): Declare.
3223 * decl2.c (maybe_emit_vtables): Determine the key method here if
3224 it has not already been done.
3226 2004-08-31 Ziemowit Laski <zlaski@apple.com>
3228 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3229 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3230 (cp/cp-decl.c): Do not depend on gtype-cp.h.
3231 (cp/cp-objcp-common.o): New target.
3232 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3233 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3234 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3235 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3237 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3238 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3239 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3240 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3241 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3242 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3243 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3244 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3245 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3246 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3247 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3248 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3249 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3250 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3251 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3252 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3253 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3254 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3255 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3256 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3257 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3258 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3259 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3260 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3261 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3262 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3263 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3264 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3265 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3266 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3267 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3268 hooks to cp-objcp-common.h.
3269 (finish_file): New function.
3270 * cp-objcp-common.c: New file.
3271 * cp-objcp-common.h: New file.
3272 * cp-tree.h (cp_finish_file): New prototype.
3273 * decl.c: Do not include gtype-cp.h.
3274 * decl2.c (finish_file): Rename to cp_finish_file.
3276 2004-08-31 Richard Henderson <rth@redhat.com>
3279 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3280 (tsubst_copy_and_build): ... here.
3282 2004-08-30 Mark Mitchell <mark@codesourcery.com>
3284 * cp-tree.h (initialize_artificial_var): Declare.
3285 * decl.c (initialize_artifical_var): New function.
3286 * class.c (initialize_array): Remove.
3287 (initialize_vtable): Use initialize_artificial_var.
3288 (build_vtt): Likewise.
3289 (build_ctor_vtbl_group): Likewise.
3291 2004-08-30 Richard Henderson <rth@redhat.com>
3293 * class.c (build_base_path): Use build_address directly.
3294 * typeck.c (build_unary_op): Don't lower &a.b to pointer
3295 arithmetic directly.
3296 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3297 means !initializer_constant_valid_p.
3299 2004-08-30 Richard Henderson <rth@redhat.com>
3301 * class.c (fixed_type_or_null): Use get_base_address before
3302 assuming an ADDR_EXPR is non-null.
3304 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3306 * name-lookup.c (pop_binding, pushdecl,
3307 set_identifier_type_value_with_scope, push_overloaded_decl,
3308 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3309 * parser.c (cp_parser_diagnose_invalid_type_name,
3310 cp_parser_postfix_expression, cp_parser_unary_expression,
3311 cp_parser_check_declarator_template_para): Likewise.
3312 * pt.c (push_inline_template_parms_recursive,
3313 check_explicit_specialization, convert_nontype_argument,
3314 coerce_template_template_parms, uses_template_parms,
3315 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3316 tsubst_expr, instantiate_template,
3317 maybe_adjust_types_for_deduction, type_unification_real,
3318 resolve_overloaded_unification, template_decl_level,
3319 type_dependent_expression_p): Likewise.
3320 * search.c (lookup_base_r): Likewise.
3321 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3322 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3323 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3324 * typeck.c (common_type, get_member_function_from_ptrfunc,
3325 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3326 * typeck2.c (cxx_incomplete_type_diagnostic,
3327 split_nonconstant_init_1, store_init_value,
3328 process_init_constructor): Likewise.
3330 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3332 * call.c (check_dtor_name): Replace abort with gcc_assert or
3334 (build_call, add_builtin_candidate, build_new_op,
3335 convert_like_real, build_over_call, in_charge_arg_for_name,
3336 source_type, joust): Likewise.
3337 * class.c (build_simple_base_path, get_vcall_index,
3338 finish_struct_1, instantiate_type, get_enclosing_class,
3339 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3340 * cp-gimplify.c (cp_genericize): Likewise.
3341 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3342 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3343 * decl.c (poplevel, make_unbound_class_template, reshape_init,
3344 check_special_function_return_type, grokdeclarator,
3345 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3346 finish_function): Likewise.
3347 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3348 * error.c (dump_global_iord, dump_decl, dump_template_decl,
3349 language_to_string): Likewise.
3350 * except.c (choose_personality_routine): Likewise.
3351 * friend.c (do_friend): Likewise.
3352 * g++spec.c (lang_specific_driver): Likewise.
3353 * init.c (build_zero_init, expand_default_init, build_new_1,
3354 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3355 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3356 * mangle.c (add_substitution, write_unscoped_name,
3357 write_template_prefix, write_identifier,
3358 write_special_name_destructor, write_type, write_builtin_type,
3359 write_expression, write_template_param,
3360 write_java_integer_type_codes): Likewise.
3361 * method.c (implicitly_declare_fn): Likewise.
3363 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3365 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3366 (BINFO_INDIRECT_PRIMARY_P): Remove.
3367 * class.c (determine_primary_base): Rename to ...
3368 (determine_primary_bases): ... here. Set all primary bases.
3369 (set_primary_base): Remove.
3370 (mark_primary_bases): Remove.
3371 (build_simple_base_path, walk_subobject_offsets,
3372 propagate_binfo_offsets, end_of_class): Adjust.
3373 (layout_class_type): Rename determine_primary_base call.
3374 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3376 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3377 build_rtti_vtbl_entries): Adjust.
3378 * init.c (build_vtbl_address): Adjust.
3380 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3382 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3384 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3385 CXX_AND_OBJCXX_OBJS.
3386 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3387 separately on the link line.
3389 2004-08-28 Jason Merrill <jason@redhat.com>
3391 * decl.c (expand_static_init): Avoid bogus warnings.
3393 2004-08-27 Jason Merrill <jason@redhat.com>
3396 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3399 * decl.c (expand_static_init): Use thread-safety API.
3400 (register_dtor_fn): Return the call, don't expand it.
3401 * tree.c (add_stmt_to_compound): New fn.
3402 (stabilize_call): Use it.
3404 2004-08-27 Richard Henderson <rth@redhat.com>
3406 * cp-tree.def (OFFSETOF_EXPR): New.
3407 * parser.c (cp_parser_builtin_offsetof): Either built an
3408 OFFSETOF_EXPR, or call fold_offsetof immediately.
3409 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3411 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3413 * call.c (validate_conversion_obstack): Replace
3414 my_friendly_assert with gcc_assert or gcc_unreachable.
3415 (direct_reference_binding, merge_conversion_sequences,
3416 build_user_type_conversion_1, perform_overload_resolution,
3417 build_op_delete_call, enforce_access, call_builtin_trap,
3418 build_over_call, build_special_member_call, build_new_method_call,
3419 initialize_reference): Likewise.
3420 * class.c (build_base_path, build_primary_vtable, alter_access,
3421 check_bases, update_vtable_entry_for_fn, layout_empty_base,
3422 clone_function_decl, adjust_clone_args,
3423 type_requires_array_cookie, include_empty_classes,
3424 finish_struct_1, resolve_address_of_overloaded_function,
3425 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3426 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3427 accumulate_vtbl_inits, build_vtbl_initializer,
3428 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3429 * cvt.c (build_up_reference, convert_to_reference): Likewise.
3430 * decl.c (poplevel, duplicate_decls, make_typename_type,
3431 cxx_init_decl_processing, reshape_init, check_initializer,
3432 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3433 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3434 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3435 xref_basetypes, start_preparsed_function, save_function_data,
3436 finish_function, finish_method, maybe_register_incomplete_var,
3437 complete_vars): Likewise.
3438 * decl2.c (grok_array_decl, check_member_template,
3439 check_classfn, finish_static_data_member_decl, coerce_new_type,
3440 coerce_delete_type, import_export_class, decl_needed_p,
3441 determine_visibility, import_export_decl, build_cleanup,
3442 start_static_initialization_or_destructi, do_static_destruction,
3443 prune_vars_needing_no_initialization,
3444 build_offset_ref_call_from_tree): Likewise.
3445 * error.c (dump_decl, dump_expr): Likewise.
3446 * init.c (finish_init_stmts, build_zero_init,
3447 expand_virtual_init, expand_default_init, expand_aggr_init_1,
3448 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
3450 * mangle.c (write_method_parms, write_template_args,
3451 write_expression, write_template_arg): Likewise.
3452 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3453 * name-lookup.c (pop_binding, begin_scope, leave_scope,
3454 resume_scope, push_using_decl, validate_nonmember_using_decl,
3455 is_ancestor, poplevel_class, set_inherited_value_binding_p,
3456 push_class_level_binding, do_class_using_decl, push_namespace,
3457 pop_namespace, add_using_namespace, ambiguous_decl,
3458 lookup_namespace_name, lookup_type_current_level,
3459 maybe_process_template_type_declaration): Likewise.
3460 * parser.c (cp_lexer_peek_nth_token,
3461 cp_parser_parse_and_diagnose_invalid_typ,
3462 cp_parser_translation_unit, cp_parser_template_id,
3463 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3464 * pt.c (push_access_scope, finish_member_template_decl,
3465 push_inline_template_parms_recursive, add_outermost_template_args,
3466 get_innermost_template_args, begin_explicit_instantiation,
3467 end_explicit_instantiation, retrieve_specialization,
3468 is_specialization_of, is_specialization_of_friend,
3469 register_specialization, check_explicit_specialization,
3470 comp_template_parms, process_template_parm,
3471 process_partial_specialization, convert_nontype_argument,
3472 coerce_template_template_parms, coerce_template_parms,
3473 mangle_class_name_for_template, lookup_template_function,
3474 lookup_template_class, instantiate_class_template, tsubst_decl,
3475 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3476 instantiate_template, fn_type_unification, type_unification_real,
3477 get_template_base, regenerate_decl_from_template,
3478 template_for_substitution, instantiate_decl,
3479 get_mostly_instantiated_function_type, dependent_scope_ref_p,
3480 value_dependent_expression_p, resolve_typename_type): Likewise.
3481 * repo.c (repo_emit_p): Likewise.
3482 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3483 create_tinfo_types, emit_tinfo_decl): Likewise.
3484 * search.c (lookup_base_r, lookup_base, lookup_field_1,
3485 dfs_access_in_type, build_baselink, lookup_member,
3486 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3487 * semantics.c (perform_or_defer_access_check,
3488 finish_non_static_data_member, finish_stmt_expr_expr,
3489 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3490 finish_template_template_parm, finish_member_declaration,
3491 emit_associated_thunks): Likewise.
3492 * tree.c (build_target_expr_with_type, force_target_expr,
3493 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3494 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3495 cxx_sizeof_or_alignof_type, perform_integral_promotions,
3496 build_class_member_access_expr, finish_class_member_access_expr,
3497 build_ptrmemfunc_access_expr, build_unary_op,
3498 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3499 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3500 * typeck2.c (complete_type_check_abstract,
3501 abstract_virtuals_error, process_init_constructor,
3502 add_exception_specifier): Likewise.
3504 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3506 * class.c (build_vtbl_initializer): Use ssize_int.
3507 * decl.c (complete_array_type): Likewise.
3508 * method.c (finish_thunk): Likewise.
3509 * search.c (get_dynamic_base_type): Likewise.
3511 2004-08-26 Richard Henderson <rth@redhat.com>
3513 * cp-tree.h (DECL_FIELD_IS_BASE): New.
3514 * class.c (build_base_field): Set it.
3515 (build_simple_base_path): Use it.
3516 (fixed_type_or_null): Don't consider base fields definitive.
3518 2004-08-25 Roger Sayle <roger@eyesopen.com>
3521 PR tree-optimization/16372
3522 * decl.c (finish_enum): Make the precision of the enumerated type
3523 the same width as the underlying integer type.
3525 2004-08-25 Mark Mitchell <mark@codesourcery.com>
3528 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3531 * mangle.c (get_identifier_nocopy): Add cast.
3533 * cp-tree.h (mangle_type): Remove.
3534 * mangle.c (globals): GTY it.
3535 (mangle_obstack): New variable.
3536 (name_obstack): Likewise.
3537 (name_base): Likewise.
3538 (write_char): Adjust accordingly.
3539 (write_chars): Likewise.
3540 (write_string): Likewise.
3541 (start_mangling): Initialize G.substitutions only one. Add
3543 (finish_mangling): Use VARRAY_CLEAR to reclaim
3544 storage in G.substitutions. Use obstack_finish.
3545 (init_mangle): Adjust for changes to variable names above.
3546 Initialize G.substitutions.
3547 (mangle_decl_string): Adjust call to start_mangling.
3548 (get_identifier_nocopy): New function.
3549 (mangle_decl): Use it.
3550 (mangle_type_string): Adjust call to start_mangling.
3551 (mangle_special_for_type): Likewise.
3552 (mangle_vtt_for_type): Likewise.
3553 (mangle_ctor_vtbl_for_type): Likewise.
3554 (mangle_thunk): Likewise.
3555 (mangle_guard_variable): Likewise.
3556 (mangle_ref_init_variable): Likewise.
3558 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3561 * pt.c (redeclare_class_template): Check the type of non-type and
3562 template template parameter.
3564 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3566 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
3567 (build_user_type_conversion_1, convert_like_real,
3568 build_java_interface_fn_ref, build_special_member_call): Likewise.
3569 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
3570 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3571 * cvt.c (cp_convert_to_pointer): Likewise.
3572 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3573 * decl2.c (start_static_initialization_or_destruction,
3574 generate_ctor_or_dtor_function): Likewise.
3575 * except.c (build_throw): Likewise.
3576 * mangle.c (write_integer_cst): Likewise.
3577 * method.c (finish_thunk): Likewise.
3578 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3579 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3580 get_pseudo_ti_init): Likewise.
3581 * search.c (get_dynamic_cast_base_type): Likewise.
3583 2004-08-25 Zack Weinberg <zack@codesourcery.com>
3585 * class.c, search.c: Remove references to DWARF_DEBUG.
3587 2004-08-25 Adam Nemet <anemet@lnxw.com>
3589 * repo.c (extract_string): Reset backquote after one character.
3590 (get_base_filename): Fix indentation.
3592 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3594 * decl.c (cxx_init_decl_processing): Adjust
3595 build_common_tree_nodes call.
3597 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3600 * (is_subobject_of_p): Resurrect & optimize.
3601 (lookup_field_r): Use it.
3603 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3606 * search.c (friend_accessible_p): Increment processing_template_decl
3607 when deal with TEMPLATE_DECL of SCOPE.
3609 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3612 * semantics.c (check_accessibility_of_qualified_id): Defer check
3613 if qualifying_type is a template parameter.
3615 2004-08-23 Mark Mitchell <mark@codesourcery.com>
3618 * pt.c (instantiate_decl): Do not try to apply
3619 DECL_DECLARED_INLINED_P to a VAR_DECL.
3621 * search.c (build_baselink): Fix typo in comment.
3623 2004-08-22 Andrew Pinski <apinski@apple.com>
3626 2004-08-22 Andrew Pinski <apinski@apple.com>
3628 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3629 expression is not constant.
3631 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3633 * name-lookup.c (pushdecl): Rename build_type_copy call.
3634 * tree.c (cp_build_qualified_type_real,
3635 build_exception_variant, handle_java_interface_attribute): Likewise.
3637 2004-08-22 Andrew Pinski <apinski@apple.com>
3640 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3641 expression is not constant.
3643 2004-08-20 Mark Mitchell <mark@codesourcery.com>
3646 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
3648 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
3651 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
3654 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3656 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
3657 before calling comp_template_args.
3659 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3661 * class.c (build_vtbl_initializer): Use build_int_cst for
3662 negative size types.
3663 * decl.c (complete_array_type): Likewise.
3664 * method.c (finish_thunk): Likewise.
3666 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
3668 * tree.c: Remove unused mark_local_for_remap_r.
3670 2004-08-19 Eric Christopher <echristo@redhat.com>
3672 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
3673 * tree.c (cxx_unsave_expr_now): Delete.
3674 (cp_unsave_r): Ditto.
3676 2004-08-19 Mark Mitchell <mark@codesourcery.com>
3679 * pt.c (push_template_decl_real): Disallow template allocation
3680 functions with fewer than two parameters.
3682 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3684 * cp-tree.h (build_shared_int_cst): Remove.
3685 * tree.c (shared_int_cache): Remove.
3686 (build_shared_int_cst): Remove.
3687 * class.c (finish_struct_1): Use build_int_cst.
3689 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3691 * decl.c (finish_enum): Do not copy value node early, copy
3693 * lex.c (cxx_init): Force null_node to be unique.
3695 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
3698 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
3699 from input for MODOP_EXPR.
3701 2004-08-18 Mark Mitchell <mark@codesourcery.com>
3703 * pt.c (dependent_template_p): Fix typo in commment.
3706 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
3709 2004-08-17 Mark Mitchell <mark@codesourcery.com>
3712 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
3713 arguments have the same type as the corresponding parameter.
3716 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
3717 is set use it for diagnostic purposes.
3718 (cp_parser_pseudo_destructor_name): Remove special-case error
3722 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3725 * cp-tree.h (qualified_name_lookup_error): Add parameter.
3726 * name-lookup.c (do_class_using_decl): Restrict set of entities
3727 passed to cp_emit_debug_info_for_using more carefully.
3728 (lookup_qualified_name): Allow lookup_member to return sets of
3730 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3731 (cp_parser_primary_expression): Handle ambiguous lookups.
3732 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3733 (cp_parser_template_argument): Likewise.
3734 (cp_parser_elaborate_type_specifier): Likewise.
3735 (cp_parser_namespace_name): Likewise.
3736 (cp_parser_class_name): Likewise.
3737 (cp_parser_lookup_name_simple): Likewise.
3738 * pt.c (tsubst_qualified_id): Handle ambiguous results.
3739 (tsubst_expr): Likewise.
3740 * semantics.c (qualified_name_lookup_error): Add decl paramter.
3741 For ambiguous lookups, print candidates.
3743 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3746 * pt.c (instantiate_pending_templates): Add int parameter. Don't
3748 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3749 * decl2.c (finish_file): Adjust call to
3750 instantiate_pending_templates.
3752 2004-08-15 Roger Sayle <roger@eyesopen.com>
3754 * call.c (build_vfield_ref, build_call, build_conditional_expr,
3755 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3756 build_java_interface_fn_ref, build_special_member_call,
3757 build_new_method_call, initialize_reference): Replace calls to
3758 build with calls to buildN.
3759 * class.c (build_base_path, convert_to_base_statically,
3760 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3761 build_vtbl_initializer): Likewise.
3762 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
3763 gimplify_if_stmt, cp_genericize_r): Likewise.
3764 * cvt.c (convert_to_void): Likewise.
3765 * decl.c (check_initializer, finish_constructor_body,
3766 finish_destructor_body): Likewise.
3767 * error.c (dump_expr): Likewise.
3768 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
3770 * init.c (perform_member_init, expand_virtual_init,
3771 expand_cleanup_for_base, build_init, expand_default_init,
3772 build_offset_ref, decl_constant_value, build_new, build_new_1,
3773 build_vec_delete_1, build_vec_init, build_delete,
3774 push_base_cleanups, build_vec_delete): Likewise.
3775 * mangle.c (write_integer_cst): Likewise.
3776 * method.c (thunk_adjust, do_build_copy_constructor,
3777 do_build_assign_ref): Likewise.
3778 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
3779 unify, build_non_dependent_expr): Likewise.
3780 * rtti.c (build_headof, build_typeid, ifnonnull,
3781 build_dyanmic_cast_1, tinfo_base_init): Likewise.
3782 * semantics.c (begin_compound_stmt, finish_call_expr,
3783 finish_pseudo_destructor_expr, finish_id_expression,
3784 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
3785 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
3786 array_type_nelts_total, stabilize_call): Likewise.
3787 * typeck.c (decay_conversion, build_class_member_access_expr,
3788 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
3789 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
3790 build_x_unary_op, build_unary_op, unary_complex_lvalue,
3791 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
3792 check_return_expr): Likewise.
3793 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
3794 split_nonconstant_init, store_init_value, build_m_component_ref):
3797 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3799 * call.c (convert_class_to_reference,
3800 build_user_type_conversion_1, convert_like_real,
3801 build_java_interface_fn_ref, build_special_member_call): Use
3803 * class.c (build_vtbl_initializer): Likewise.
3804 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3805 * cvt.c (cp_convert_to_pointer): Likewise.
3806 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3807 * decl2.c (start_static_initialization_or_destruction,
3808 generate_ctor_or_dtor_function): Likewise.
3809 * except.c (build_throw): Likewise.
3810 * lex.c (cxx_init): Likewise.
3811 * mangle.c (write_integer_cst): Likewise.
3812 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3813 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3814 get_pseudo_ti_init): Likewise.
3815 * search.c (get_dynamic_cast_base_type): Likewise.
3816 * tree.c (build_shared_int_cst): Likewise.
3818 2004-08-12 Mark Mitchell <mark@codesourcery.com>
3821 * class.c (count_depth_data): New type.
3822 (dfs_depth_post): New function.
3823 (dfs_depth_q): Likewise.
3824 (find_final_overrider_data_s): Change type of vpath.
3826 (dfs_find_final_overrider_1): New function.
3827 (dfs_find_final_overrider): Use it.
3828 (dfs_find_final_overrider_q): Adjust use of vpath.
3829 (dfs_find_final_overrider_post): Likewise.
3830 (find_final_overrider): Use dfs_depth. Allocate and deallocate
3833 2004-08-12 Jan Beulich <jbeulich@novell.com>
3835 * parser.c (cp_parser_asm_definition): Properly consume scope operator
3836 tokens preceding the clobbers. Don't check for scope operator
3837 following inputs. Simplify inputs handling to match that now used for
3840 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3843 * except.c (build_throw): Allocate cleanup_type and the function
3844 for __cxa_throw separately.
3847 * call.c (standard_conversion): Do not accept conversions between
3848 pointers to members if the class types are unrelated.
3851 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
3852 char &" instead of just "char &".
3855 * pt.c (tsubst): Just return the unknown_type_node.
3857 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3860 * parser.c (cp_parser_class_specifier): Robustify.
3863 * pt.c (tsubst_copy_and_build): Complain about invalid
3867 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
3868 current_class_ref while tsubsting.
3870 2004-08-10 Mark Mitchell <mark@codesourcery.com>
3873 * parser.c (cp_parser_init_declarator): Robustify.
3875 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
3877 * typeck2.c (process_init_constructor): Guard the missing field warning
3878 with warn_missing_field_initializers rather than extra_warnings.
3880 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
3882 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
3884 2004-08-05 Mark Mitchell <mark@codesourcery.com>
3886 * decl.c (start_preparsed_function): Move determine_visibility
3888 * decl2.c (determine_visibility): Incorporate dllexport testing.
3890 2004-08-05 Geoffrey Keating <geoffk@apple.com>
3892 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
3893 means that libstdc++ is needed.
3895 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
3897 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
3899 2004-08-04 Geoffrey Keating <geoffk@apple.com>
3901 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
3902 than passing it as a parameter to rest_of_decl_compilation.
3903 * decl2.c (grokfield): Use set_user_assembler_name.
3905 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
3907 * decl.c (complete_array_type): Don't gratuitously copy
3908 maxindex. Its type is always set.
3910 2004-08-04 Paul Brook <paul@codesourcery.com>
3912 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
3913 * cp-tree.h (struct language_function): Rename x_dtor_label to
3915 (dtor_label): Rename ...
3916 (cdtor_label): ... to this.
3917 * decl.c (begin_constructor_body): Remove.
3918 (check_special_function_return_type): Maybe change the return type.
3919 (grokdeclarator): Pass the class type.
3920 (start_preparsed_function): Constructors may need a return label.
3921 (finish_constructor_body, finish_destructor_body): Set the return
3923 (begin_function_body): Don't call begin_constructor_body.
3924 (finish_function): Don't warn for constructors or destructors.
3925 (implicitly_declare_fn): Maybe change the return type.
3926 * optimize.c: Include target.h.
3927 (maybe_clone_body): Remap the function result.
3928 * semantics.c: Include target.h.
3929 (finish_return_stmt): Maybe jump to return label for constructors.
3931 2004-08-03 Mark Mitchell <mark@codesourcery.com>
3933 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
3934 (check_field_decls): Or here.
3935 (check_methods): Or here.
3936 (initialize_array): Don't mess with DECL_CONTEXT.
3937 * cp-tree.h (start_decl): Adjust prototype.
3938 (determine_visibility): New function.
3939 * decl.c (duplicate_decls): Remove checks for hidden "operator
3941 (build_library_fn_1): Give all library functions default
3943 (start_decl): Add pop_scope_p parameter. Tidy.
3944 (cp_finish_decl): Do not pop scopes here. Call
3945 determine_visibility for variable definitions.
3946 (start_preparsed_function): Call determine_visibility.
3947 * decl2.c (determine_visibility): New function.
3948 * method.c (use_thunk): Fix formatting.
3949 * parser.c (cp_parser_condition): Adjust calls to start_decl.
3950 (cp_parser_init_declarator): Likewise.
3951 * pt.c (instantiate_decl): Always call pop_nested_class.
3952 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
3953 (tinfo_base_init): Likewise.
3955 2004-08-02 Mark Mitchell <mark@codesourcery.com>
3958 * name-lookup.c (validate_nonmember_using_decl): Robustify.
3960 2004-08-01 Mark Mitchell <mark@codesourcery.com>
3963 * name-lookup.c (decl_namespace): Remove.
3964 (current_decl_namespace): Use decl_namespace_context instead of
3966 (push_decl_namespace): Likewise.
3967 (arg_assoc_class): Likewise.
3968 (arg_assoc_type): Likewise.
3969 * pt.c (check_specialization_namespace): New function.
3970 (maybe_process_partial_specialization): Use it.
3971 (register_specialization): Likewise.
3974 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
3975 * call.c (null_ptr_cst_p): Handle variables with constant
3977 * pt.c (convert_nontype_argument): Use
3978 DECL_INTEGRAL_CONSTANT_VAR_P.
3979 * semantics.c (finish_id_expression): Likewise.
3982 * decl.c (duplicate_decls): Reject duplicate namespace
3986 * typeck.c (build_ptrmemfunc): Loosen assertion.
3988 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3990 * call.c (z_candidate::template_decl): Rename from template.
3991 (add_template_candidate_real): Adjust member reference.
3994 2004-07-29 Mark Mitchell <mark@codesourcery.com>
3996 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
3997 (lang_decl_flags): Narrow the width of "languages". Add
3999 (DECL_NEEDED_P): Remove.
4000 (FOR_EACH_CLONE): New macro.
4001 (DECL_REPO_AVAILABLE_P): Likewise.
4002 (DECL_TINFO_P): Likewise.
4003 (set_linkage_according_to_type): Declare.
4004 (import_export_vtable): Remove.
4005 (import_export_tinfo): Likewise.
4006 (mark_needed): New function.
4007 (decl_needed_p): Likewise.
4008 (note_vauge_linkage_fn): Likewise.
4009 (init_repo): Change prototype.
4010 (repo_template_used): Remove.
4011 (repo_template_instantiated): Likewise.
4012 (repo_emit_p): New function.
4013 (repo_export_class_p): Likewise.
4014 (no_linkage_check): Change prototype.
4015 * class.c (set_linkage_according_to_type): New function.
4016 (build_vtable): Use it. Do not call import_export_vtable. Set
4017 DECL_IGNORED_P if appropriate.
4018 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4019 (make_rtL_for_nonlocal_decls): Check for template instantiations
4021 (grokfndecl): Adjust call to no_linkage_check.
4022 (set_linkage_for_static_data_member): New function.
4023 (grokvardecl): Use it. Adjust call to no_linkage_check.
4024 (grokdeclarator): Use set_linkage_for_static_data_member.
4025 * decl2.c (note_vague_linkage_fn): New function.
4026 (note_vague_linkage_var): Likewise.
4027 (finish_static_data_member_decl): Use it.
4028 (import_export_vtable): Remove.
4029 (import_export_class): Use repo_export_class_p.
4030 (var_finalized_p): Simplify.
4031 (maybe_emit_vtables): Simplify.
4032 (mark_needed): New function.
4033 (decl_needed_p): Likewise.
4034 (import_export_decl): Add documentation and consistency checks.
4035 Use repo_emit_p. Handle virtual tables and RTTI information
4037 (import_export_tinfo): Remove.
4038 (write_out_vars): Call import_export_decl.
4039 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4041 (finish_file): Use decl_needed_p. Do not call import_export_decl
4042 for undefined static data members. Do not warn about undefined
4043 inlines when using a repository.
4044 (mark_used): Use note_vague_linkage_fn. Always defer template
4046 * lex.c (cxx_init): Adjust call to init_repo. Always set
4047 flag_unit_at_a-time.
4048 * method.c (synthesize_method): Remove unncessary
4049 import_export_decl call.
4050 (implicitly_declare_fn): Use set_linkage_according_to_type.
4051 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4052 * pt.c (instantiate_class_template): Don't redundantly add classes
4053 to keyed_classes. Don't call repo_template_used.
4054 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4055 templates with internal linkage.
4056 (check_instantiated_args): Adjust call to no_linkage_check.
4057 (instantiate_template): Use FOR_EACH_CLONE.
4058 (mark_definable): New function.
4059 (mark_decl_instantiated): Use it.
4060 (do_decl_instantiation): Adjust tests for explicit instantiation
4061 after "extern template".
4062 (instantiate_class_member): Do not use repo_template_instantiated.
4063 (do_type_instantiation): Simplify.
4064 (instantiate_decl): Use mark_definable. Check repo_emit_p.
4066 * repo.c (repo_get_id): Remove.
4067 (original_repo): Remove.
4068 (IDENTIFIER_REPO_USED): Remove.
4069 (IDENTIFIER_REPO_CHOSEN): Remove.
4070 Remove all #if 0'd code.
4071 (repo_template_used): Remove.
4072 (repo_template_instantiated): Remove.
4073 (temporary_obstack_initialized_p): New variable.
4074 (init_repo): Register with lang_post_pch_load. Avoid creating
4075 identifiers unnecessarily. Don't use original_repo. Close the
4077 (reopen_repo_file_for_write): Not here.
4078 (finish_repo): Always write out a new repository file.
4079 (repo_emit_p): New function.
4080 (repo_export_class_p): Likewise.
4081 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4082 (involves_incomplete_p): New function.
4083 (tinfo_base_init): Use it.
4084 (ptr_initializer): Remove non_public_ptr parameter.
4085 (ptm_initializer): Likewise.
4086 (get_pseudo_ti_init): Likewise.
4087 (unemitted_tinfo_decl_p): Remove.
4088 (emit_tinfo_decl): Use import_export_decl.
4089 * semantics.c (expand_body): Move updates of static_ctors and
4091 (expand_or_defer_fn): ... here.
4092 * tree.c (no_linkage_check): Add relaxed_p parameter.
4094 2004-07-28 Eric Christopher <echristo@redhat.com>
4096 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4098 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
4100 * cp-tree.h (struct tree_pair_s): New.
4101 (typedef tree_pair_p): New.
4102 (DEF_VEC_O(tree_pair_s)): New.
4103 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4104 (CLASSTYPE_VCALL_INDICES): Update documentation.
4105 * class.c (get_vcall_index): Adjust.
4106 (add_vcall_offset): Adjust.
4108 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
4110 * pt.c, typeck.c: Remove spurious carriage returns.
4112 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4115 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4116 when the type of ARG is not dependent.
4118 2004-07-26 Geoffrey Keating <geoffk@apple.com>
4120 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4121 (lang_specific_driver): If the C++ or math library options don't
4122 start with '-l', don't count them as added libraries.
4124 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
4126 * decl.c (xref_basetypes): Adjust base access vector creation.
4127 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4129 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4131 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
4132 Brian Ryner <bryner@brianryner.com>
4136 * class.c (check_field_decls): Apply hidden visibility if
4137 -fvisibility-inlines-hidden and inlined unless otherwise specified
4138 (build_vtable): Set vtable visibility to class visibility.
4139 (check_field_decls): Default static member visibility to class
4141 (check_methods): Default method visibility to class visibility.
4142 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4143 CLASSTYPE_VISIBILITY_SPECIFIED macro.
4144 * decl.c (duplicate_decls): New logic for merging definition decls
4145 with declaration decls. Added ignore & warning when non default
4146 applied to global operator new or delete.
4147 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4148 wherever VISIBILITY was changed
4149 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4151 (tinfo_base_init): Set typeinfo name visibility to class visibility.
4153 2004-07-25 Bernardo Innocenti <bernie@develer.com>
4155 * decl.c: Rename all identifiers named `class' to `cl'.
4156 * cp-tree.h: Likewise.
4158 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4160 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4161 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4162 * name-lookup.c (binding_entry_make): Use GGC_NEW.
4163 (binding_table_construct): Use GGC_CNEWVEC.
4164 (binding_table_new): Use GGC_NEW.
4165 (cxx_binding_make): Likewise.
4166 (begin_scope): Likewise.
4167 (push_to_top_level): Use GCC_CNEW.
4168 * parser.c (cp_token_cache_new): Likewise.
4169 (cp_token_cache_push_token): Likewise.
4170 (cp_lexer_new_main): Likewise.
4171 (cp_lexer_new_from_tokens): Likewise.
4172 (cp_parser_context_new): Likewise.
4173 (cp_parser_new): Likewise.
4174 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4175 * lex.c (cxx_make_type): Use GGC_CNEW.
4176 (retrofit_lang_decl): Use GGC_NEWVAR.
4177 (cxx_dup_lang_specific_decl): Likewise.
4178 (copy_lang_type): Likewise.
4179 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4180 (save_function_data): Likewise.
4181 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4182 (cxx_push_function_context): Likewise.
4184 2004-07-25 Richard Henderson <rth@redhat.com>
4186 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4187 DECL_IGNORED_P on RESULT_DECL.
4188 * semantics.c (finalize_nrv): Copy them too.
4190 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
4192 * search.c (lookup_conversion_operator): Avoid two loops.
4193 (add_conversions): Remove.
4194 (check_hidden_convs, split_conversions,
4195 lookup_conversions_r): New.
4196 (lookup_conversions): Use lookup_conversions_r.
4198 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
4200 * pt.c (get_template_base): Check type is completable.
4202 2004-07-21 Eric Christopher <echristo@redhat.com>
4204 * decl.c (poplevel): Inline unused variable checking.
4207 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
4209 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4212 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4215 * pt.c (check_explicit_specialization): Remove extension to accept
4216 specializations without template headers. Fall-through to normal
4219 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4222 * pt.c (determine_specialization): New parameter template_count.
4223 Disambiguate between member templates and member functions counting
4224 the template headers.
4225 (check_explicit_specialization): Update caller.
4226 (tsubst_friend_function): Likewise.
4228 2004-07-20 Steven Bosscher <stevenb@suse.de>
4230 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4231 * cp-tree.h (tinst_level_t): New tree type.
4232 (union lang_tree_node): Handle it.
4233 (TINST_LOCATION): New accessor macro.
4234 (make_tinst_level): New prototype.
4235 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4236 * decl.c (cp_tree_node_structure): Likewise.
4237 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4238 (print_instantiation_partial_context): Likewise.
4239 * pt.c (pop_tinst_level): Likewise.
4240 (push_tinst_level): Use make_tinst_level.
4241 * tree.c (make_tinst_level): New function.
4242 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4244 2004-07-20 Mark Mitchell <mark@codesourcery.com>
4246 * parser.c (cp_parser_simple_type_specifier): Fix typo.
4249 * parser.c (cp_parser_simple_type_specifier): Do not record usage
4250 of globally-qualified names.
4252 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4255 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4258 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4261 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4262 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4263 * class.c (add_implicitly_declared_members): Use
4264 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4265 * method.c (lazily_declare_fn): Clear
4266 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4267 * search.c (lookup_fnfields_1): Check it.
4269 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4271 * cp-tree.h (vec_binfo_member): Remove.
4272 * tree.c (vec_binfo_member): Remove.
4274 * cp-tree.h (struct lang_type_class): Remove vfields field.
4275 (CLASSTYPE_VFIELDS): Remove.
4276 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4277 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4279 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4280 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4281 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4283 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4285 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4286 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4288 (BINFO_LANG_SLOTS): Remove.
4289 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4290 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4291 * class.c (check_bases): Adjust BINFO accessors.
4292 (determine_primary_base, finish_struct_bits,
4293 maybe_warn_about_overly_private_class, warn_hidden,
4294 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4295 warn_about_ambiguous_bases, get_vfield_name,
4296 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4297 add_vcall_offset_vtbl_entries_r): Likewise.
4298 * dump.c (cp_dump_tree): Likewise.
4299 * init.c (sort_mem_initializers, expand_member_init, build_delete,
4300 push_base_cleanups): Likewise.
4301 * method.c (do_build_copy_constructor, do_build_assign_ref,
4302 synthesize_exception_spec): Likewise.
4303 name-lookup.c (arg_assoc_class): Likewise.
4304 * pt.c (instantiate_class_template,
4305 get_template_base_recursive): Likewise.
4306 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4307 * typeck2.c (process_init_constructor): Likewise.
4308 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4309 dfs_access_in_type, dfs_walk_real, look_for_overrides,
4310 types_overlap_p, copied_binfo, original_binfo): Likewise.
4311 (binfo_for_vtable): Remove
4313 2004-07-20 Steven Bosscher <stevenb@suse.de>
4315 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4316 thunk_alias, and the access and virtual_offset fields.
4317 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4318 * decl.c (finish_case_label): Update c_add_case_node call.
4320 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4322 Revert patch for PR c++/16623.
4324 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
4326 * except.c: Remove two spurious carriage returns.
4328 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4331 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4332 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4333 * class.c (add_implicitly_declared_members): Use
4334 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4335 * method.c (lazily_declare_fn): Clear
4336 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4337 * search.c (lookup_fnfields_1): Check it.
4339 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
4341 * class.c (add_method): Delay adding the slot until the end.
4342 (determine_primary_base): Adjust VEC_iterate invokation.
4343 (resort_type_method_vec, finish_struct_methods, warn_hidden,
4344 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4345 build_vtbl_initializer): Likewise.
4346 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4347 build_vbase_delete): Likewise.
4348 * method.c (do_build_copy_constructor): Likewise.
4349 * name-lookup.c (new_class_binding, print_binding_level,
4350 poplevel_class, store_class_bindings, push_to_top_level,
4351 pop_from_top_level): Likewise.
4352 * pt.c (check_explicit_specialization): Likewise.
4353 * search.c (lookup_conversion_operator, lookup_fnfields_1,
4354 get_pure_virtuals, add_conversions, dfs_check_overlap,
4355 binfo_for_vbase): Likewise.
4357 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4360 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4361 innermost set of template arguments during deduction. Simplify.
4363 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
4365 * typeck.c (build_modify_expr, build_x_modify_expr): Set
4366 TREE_NO_WARNING on assignments with an operator other than '='.
4368 2004-07-10 Steven Bosscher <stevenb@suse.de>
4369 Joseph S. Myers <jsm@polyomino.org.uk>
4371 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4372 * decl2.c (grokfield): Don't check current_class_depth via
4373 unused TREE_COMPLEXITY.
4374 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4375 to avoid the missing parentheses warning.
4376 Don't set C_SET_EXP_ORIGINAL_CODE.
4378 2004-07-18 Mark Mitchell <mark@codesourcery.com>
4380 * tree.c (no_linkage_helper): Remove.
4381 (no_linkage_check): Don't use walk_tree_without_duplicates.
4383 * mangle.c (write_expression): Issue a sorry for zero-operand
4386 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4389 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4390 TREE_TYPE for non-dependent names.
4391 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4392 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4393 unknown_type_node as its TREE_TYPE.
4394 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4395 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4396 (dump_expr) <SCOPE_REF case>: Likewise.
4398 2004-07-17 Jason Merrill <jason@redhat.com>
4401 * call.c (type_passed_as): Make the invisible reference type
4403 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4404 cp_genericize_r. Handle invisible reference lowering.
4405 (is_invisiref_parm): New fn.
4406 (cp_genericize): Adjust the types of invisible reference parms.
4407 Don't repeat the walk for clones.
4408 * decl.c (store_parm_decls): Don't generate any code for clones.
4410 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4412 * cp-tree.h (builtin_function): Declare.
4414 2004-07-16 Mark Mitchell <mark@codesourcery.com>
4416 * class.c (finish_struct_methods): Remove unncessary code.
4417 (add_implicitly_declared_members): Create declarations for default
4418 constructors and copy constructors lazily.
4419 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
4421 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
4422 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
4423 * decl2.c (check_classfn): Robustify.
4424 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
4425 (locate_ctor): Handle lazy default constructors.
4426 (locate_copy): Handle lazy copy constructors.
4427 (implicitly_declare_fn): Make sure we're looking at the
4428 TYPE_MAIN_VARIANT for a class before creating functions. Don't
4429 set TYPE_HAS_CONSTRUCTOR.
4430 (lazily_declare_fn): New function.
4431 * name-lookup.c (constructor_name_full): Simplify.
4432 * search.c (lookup_fnfields_1): Lazily create methods, as
4434 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
4436 2004-07-16 Steven Bosscher <stevenb@suse.de>
4438 * cp-tree.h (struct lang_type): Don't have three GTY options on a
4439 single bit GTY desc.
4441 2004-07-16 Richard Henderson <rth@redhat.com>
4443 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
4444 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
4445 * tree.c (cp_copy_res_decl_for_inlining): Remove.
4447 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
4449 * class.c (finish_struct_bits): Use for loop.
4450 (propagate_binfo_offsets): Do primary binfo outside of loop.
4453 * dump.c (cp_dump_tree): Don't dump the bases if there's no
4456 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
4458 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4460 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
4461 has_abstract_assign_ref. Make methods a VEC(tree) *.
4462 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
4463 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
4464 (CLASSTYPE_DESTRUCTORS): Likewise.
4465 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
4466 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4467 (add_method): Change prototoype.
4468 * class.c (add_method): Remove error_p parameter. Adjust for
4469 changes to CLASSTYPE_METHOD_VEC.
4470 (handle_using_decl): Adjust call to add_method.
4471 (maybe_warn_about_overly_private_class): Adjust for
4472 changes to CLASSTYPE_METHOD_VEC.
4473 (resort_type_method_vec): Likewise.
4474 (finish_struct_methods): Likewise.
4475 (check_for_override): Likewise.
4476 (warn_hidden): Likewise.
4477 (add_implicitly_declared_members): Defer creation of assignment
4478 operators. Adjust call to add_method.
4479 (clone_function_decl): Adjust call to add_method.
4480 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
4481 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
4482 * decl.c (grok_special_member_properties): Don't set
4483 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4484 * decl2.c (check_classfn): Adjust for
4485 changes to CLASSTYPE_METHOD_VEC.
4486 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
4487 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
4488 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
4489 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
4491 * pt.c (check_explicit_specialization): Adjust for
4492 changes to CLASSTYPE_METHOD_VEC.
4493 (instantiate_class_template): Do not set
4494 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4495 * ptree.c (cxx_print_type): Don't try to print
4496 CLASSTYPE_METHOD_VEC.
4497 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
4498 * search.c (lookup_field_r): Adjust for
4499 changes to CLASSTYPE_METHOD_VEC.
4500 (lookup_fnfields): Likewise.
4501 (lookup_conversion_operator): Likewise.
4502 (lookup_fnfields_1): Likewise. Create assignment operators
4504 (look_for_overrides_here): Adjust for
4505 changes to CLASSTYPE_METHOD_VEC.
4506 (add_conversions): Likewise.
4507 * semantics.c (finish_member_declaration): Adjust call to add_method.
4509 2004-07-15 Jason Merrill <jason@redhat.com>
4511 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4512 references and pointers are compatible.
4514 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4516 * decl.c (xref_basetypes): Refactor.
4517 * tree.c (copy_base_binfos): Replace with ...
4518 (copy_binfo): ... this. Deep copy the given binfo, (not the just
4519 bases of the given base).
4520 * cp-tree.h (copy_base_binfo): Remove.
4521 (copy_binfo): Declare.
4523 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4525 * name-lookup.c (set_inherited_value_binding_p): Add class_type
4527 (get_class_binding): Adjust.
4528 (push_class_level_binding): Don't use set_inherited_value_binding_p.
4530 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4532 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4533 * decl.c (xref_basetypes): Set it here.
4535 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4536 Don't check for incomplete base.
4537 (get_vfield_name): Simplify while loop.
4538 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
4540 2004-07-14 Mark Mitchell <mark@codesourcery.com>
4542 * lex.c (cxx_make_type): Remove call to get_pointer_type.
4544 * cp-tree.h (IDENTIFIER_VALUE): Remove.
4545 (BINFO_PUSHDECLS_MARKED): Likewise.
4546 (maybe_inject_for_scope_var): Likewise.
4547 (push_class_decls): Likewise.
4548 * name-lookup.h (push_class_binding): Remove.
4549 (innermost_non_namespace_value): New function.
4550 (outer_binding): Likewise.
4551 * class.c (add_method): Push bindings before adding to
4553 (restore_class_cache): Do not restore class_shadowed.
4554 (pushclass): Do not add USING_DECLs. Do not call
4556 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
4557 * decl.c (pushdecl): Use outer_binding.
4558 (poplevel): Set the scope for an out-of-scope for-loop declaration
4560 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
4561 * name-lookup.c (new_class_binding): New function.
4562 (push_binding): Use it.
4563 (pushdecl): Use innermost_non_namespace_value.
4564 (maybe_inject_for_scope_var): Remove.
4565 (push_class_binding): Remove.
4566 (set_inherited_value_binding_p): New function.
4567 (get_class_binding): New function.
4568 (push_class_level_binding): Assert that the current_class_type is
4570 (outer_binding): New function.
4571 (innermost_non_namespace_value): Likewise.
4572 (lookup_name_real): Use outer_binding.
4573 (lookup_name_current_level): Ignore out-of-scope variables.
4574 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
4575 (lookup_template_class): Likewise.
4576 * search.c (dfs_push_type_decls): Remove.
4577 (dfs_push_decls): Likewise.
4578 (setup_class_bindings): Likewise.
4579 (lookup_field_1): Handle USING_DECLs from dependent scopes.
4580 (marked_pushdecls_p): Remove.
4581 (unmarked_pushdecls_p): Remove.
4582 (marked_identifiers): Remove.
4583 (setup_class_bindings): Remove.
4584 (dfs_push_type_decls): Remove.
4585 (dfs_push_decls): Remove.
4586 (push_class_decls): Remove.
4588 2004-07-13 Mark Mitchell <mark@codesourcery.com>
4592 * decl.c (grokvardecl): Make declspecs parameter const.
4593 (grokdeclarator): Likewise. Adjust accordingly.
4594 * decl.h (grokdeclarator): Adjust declaration.
4595 * parser.c (cp_parser_init_declarator): Do not clear
4596 decl_specifiers->attributes.
4598 * cp-tree.h (lang_identifier): Remove class_value.
4599 (IDENTIFIER_CLASS_VALUE): Remove.
4600 (pop_class_decls): Likewise.
4601 (init_search_processing): Likewise.
4602 * class.c (handle_using_decl): Use lookup_member, not
4603 IDENTIFIER_CLASS_VALUE.
4604 (restore_class_cache): New function, split out from ...
4605 (pushclass): ... here. Do not call clear_identifier_class_values.
4606 (invalidate_class_lookup_cache): Do not clear
4607 IDENTIFIER_CLASS_VALUE.
4608 (popclass): Do not call pop_class_decls.
4609 (maybe_note_name_used_in_class): Do not save names looked up after
4610 the class is complete. Use lookup_member, not
4611 IDENTIFIER_CLASS_VALUE.
4612 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
4613 * decl.c (cxx_init_decl_processing): Do not call
4614 init_search_processing.
4615 * method.c (do_build_copy_constructor): Remove unnecessary code.
4616 (do_build_assign_ref): Likewise.
4617 * name-lookup.c (pushdecl): Use lookup_member, not
4618 IDENTIFIER_CLASS_VALUE.
4619 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
4621 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
4622 (push_class_binding): Do not set it.
4623 (clear_identifier_class_values): Remove.
4624 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
4625 (store_binding): Do not save it.
4626 (pop_from_top_level): Do not restore it.
4627 * name-lookup.h (cxx_saved_binding): Remove class_value.
4628 (clear_identifier_class_values): Remove.
4629 * ptree.c (cxx_print_identifier): Do not print
4630 IDENTIFIER_CLASS_VALUE.
4631 * search.c (search_obstack): Remove.
4632 (push_stack_level): Remove.
4633 (pop_stack_level): Remove.
4634 (search_level): Remove.
4635 (search_stack): Remove.
4636 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
4637 (setup_class_bindings): Use IDENTIFIER_MARKED, not
4638 IDENTIFIER_CLASS_VALUE.
4639 (marked_identifiers): New variable.
4640 (push_class_decls): Clear IDENTIFIER_MARKED.
4641 (pop_class_decls): Don't call pop_search_level.
4642 (init_search_processing): Remove.
4644 2004-07-12 Mark Mitchell <mark@codesourcery.com>
4646 * cp-tree.h (get_aggr_typedef): Remove.
4647 * init.c (get_aggr_typedef): Likewise.
4649 * name-lookup.c (push_class_level_binding): Simplify.
4651 2004-07-12 Andrew Pinski <apinski@apple.com>
4655 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
4657 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4660 2004-07-12 Eric Christopher <echristo@redhat.com>
4662 * parser.c (cp_parser_class_head): Remove unused variable.
4664 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4666 * decl.c (grok_op_properties): Reject [de-]allocation functions
4667 declared in a namespace, or declared as static.
4669 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
4671 * cp-tree.h (make_binfo): Remove.
4672 * decl.c (xref_basetypes): Use make_tree_binfo directly.
4673 * tree.h (copy_base_binfos): Likewise.
4674 (make_binfo): Remove.
4676 * call.c (build_user_type_conversion_1, build_new_op,
4677 check_constructor_callable, build_temp,
4678 perform_direct_initialization_of_possible): Pass type directly to
4679 lookup_fnfields & build_special_member_call.
4680 (build_special_member_call): Accept a type, and complete it.
4681 * class.c (finish_stuct_bits): Copy the BINFOs here.
4682 * cvt.c (ocp_convert): Pass type directly to
4683 build_special_member_call.
4684 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
4685 (xref_basetypes): Allocate the binfo here. Adjust.
4686 * init.c (build_init, build_new_1): Pass type directly to
4687 build_special_member_call.
4688 * lex.c (cxx_make_type): Do not allocate binfo here.
4689 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
4690 * parser.c (cp_parser_class_head): Always call xref_basetypes.
4691 * pt.c (instantiate_class_template): Likewise. Inhibit access
4692 checking for template friends.
4693 * ptree.c (cxx_print_type): Adjust record printing.
4694 * search.c (lookup_base): When taking a type, complete it before
4695 looking for a binfo.
4696 (lookup_member): Delay completing a type.
4697 (push_class_decls): Don't walk an incomplete type.
4698 (lookup_conversions): Likewise.
4699 * semantics.c (finish_stmt_expr_expr): Pass type directly to
4700 build_special_member_call.
4701 * tree.c (copy_base_binfos): Adjust.
4702 (make_binfo): Likewise.
4703 * typeck.c (build_modify_expr): Pass type directly to
4704 build_special_member_call.
4705 * typeck2.c (process_init_constructor): Check a binfo exists.
4706 (build_m_component_ref): Allow accessing an incomplete type.
4707 (build_functional_cast): Pass type directly to
4708 build_special_member_call.
4710 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4713 * config-lang.in (gtfiles): Add typeck2.c.
4714 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
4716 * cp-tree.h: Declare complete_type_check_abstract.
4717 * typeck2.c (pat_calc_hash, pat_compare,
4718 complete_type_check_abstract): New functions.
4719 (abstract_virtuals_error): If the type is abstract, register the
4720 declaration within abstract_pending_vars for further checks.
4721 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
4722 * decl.c (cp_finish_decl): Do not strip array types.
4723 (create_array_type_for_decl): Check for abstractness of the element
4725 (complete_vars): Call complete_type_check_abstract.
4726 * class.c (finish_struct): Prepare a list of virtual functions for
4727 template types, and call complete_vars on it to check for abstractness.
4729 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
4731 PR tree-optimization/14107
4732 * decl.c (finish_function): Remove temporary band-aid.
4734 2004-07-11 Mark Mitchell <mark@codesourcery.com>
4736 * call.c (build_operator_new_call): Avoid using push_to_top_level.
4737 (build_new_op): Adjust call to lookup_function_nonclass.
4738 * name-lookup.c (identifier_type_value): Adjust call to
4740 (lookup_name_real): Add block_p parameter.
4741 (lookup_name_nonclass): Adjust call to lookup_name_real.
4742 (lookup_function_nonclass): Likewise.
4743 (lookup_name): Likewise.
4744 * name-lookup.h (lookup_name_real): Change prototype.
4745 (lookup_name_nonclass): Likewise.
4746 * parser.c (cp_parser_lookup_name): Likewise.
4748 * cp-tree.h (saved_scope): Make old_bindings a vector.
4749 (unuse_fields): Remove.
4750 * name-lookup.h (cxx_saved_binding): Define it.
4751 * class.c (pushclass): Don't use unuse_fields.
4752 * name-lookup.c (cxx_saved_binding_make): Remove.
4753 (store_binding): Add new bindings to a vector, using an
4754 accumulator style, rather than adding them to a list.
4755 (store_bindings): Adjust accordingly.
4756 (store_class_bindings): Likewise.
4757 (push_to_top_level): Likewise.
4758 (pop_from_top_level): Likewise.
4759 * optimize.c (maybe_clone_body): Must push_to_top_level and
4760 pop_from_top_level calls outside of loop.
4761 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
4762 calls here from cp_parser_late_parsing_default_args.
4763 (cp_parser_save_default_args): Record the class type in which the
4764 function is declared.
4765 (cp_parser_late_parsing_default_args): Do not call
4766 push_nested_class/pop_nested_class.
4767 * search.c (dfs_unuse_fields): Remove.
4768 (unuse_fields): Remove.
4770 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4772 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
4773 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
4774 * cp-tree.h (poplevel): Declare.
4775 (set_block): Remove.
4776 * decl.c (set_block): Remove.
4778 2004-07-10 Mike Stump <mrs@apple.com>
4780 * decl2.c (import_export_class): Never export/import vtables
4781 with inline key functions.
4783 2004-07-09 Steven Bosscher <stevenb@suse.de>
4785 * typeck.c (c_expand_asm_operands): Remove.
4787 2004-07-09 Mike Stump <mrs@apple.com>
4789 * typeck.c (build_class_member_access_expr): Skip null deref
4790 warning when we don't dereference it.
4792 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4796 * class.c (check_field_decls): Improve -Weffc++ warning: do not
4797 warn for pointers to functions/members, or for classes without
4800 2004-07-08 Mark Mitchell <mark@codesourcery.com>
4802 * name-lookup.h (struct cp_binding_level): Update documentation
4805 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4808 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
4809 returning CALL_EXPR, and non-reference return type.
4811 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
4813 * name-lookup.c (push_binding): Use VEC_reserve.
4815 2004-07-08 Richard Henderson <rth@redhat.com>
4817 * cp-tree.h (expand_eh_spec_block): Remove.
4819 2004-07-07 Mark Mitchell <mark@codesourcery.com>
4821 * cp-tree.h (saved_scope): Remove x_previous_class_type and
4822 x_previous_class_values; add x_previous_class_level.
4823 (previous_class_type): Remove.
4824 (previous_class_values): Remove.
4825 (previous_class_level): New macro.
4826 * class.c (pushclass): Restore the identifier cache more
4828 (invalidate_class_lookup_cache): Use vector for class_shadowed and
4829 previous_class_values.
4830 * decl.c (poplevel): Likewise.
4831 * name-lookup.c (cxx_binding_init): New function.
4832 (cxx_binding_make): Use it.
4833 (push_binding): For a binding in a class level, use a vector of
4834 cp_class_binding nodes.
4835 (push_binding_level): New function.
4836 (begin_scope): Use it.
4837 (leave_scope): Do not put class binding levels on the free list.
4838 (print_binding_level): Adjust for the fact that class_shadowed is
4840 (poplevel_class): Likewise.
4841 (clear_identifier_class_values): Likewise.
4842 (push_class_level_binding): Likewise.
4843 (set_class_shadows): Remove.
4844 (store_binding): New function.
4845 (store_class_bindings): New function.
4846 (push_to_top_level): Use store_class_bindings as appropriate.
4847 (pop_from_top_level): Use previous_class_level, not
4848 previous_class_type.
4849 * name-lookup.h (cp_class_binding): New type.
4850 (cp_binding_level): Use a vector object for class_shadowed.
4851 (push_binding_level): Declare.
4852 (set_class_shadows): Remove.
4854 2004-07-07 Andrew Pinski <apinski@apple.com>
4856 * class.c (instantiate_type): BUFFER_REF is dead.
4857 * lex.c (init_operators): IN_EXPR is dead.
4859 2004-07-07 Jason Merrill <jason@redhat.com>
4862 * call.c (build_new_op): Give overload warnings for built-in
4865 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
4868 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4871 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
4873 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
4874 * class.c (build_primary_vtable, check_bases,
4875 determine_primary_base, finish_struct_bits,
4876 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
4877 get_basefndecls, warn_hidden, walk_subobject_offsets,
4878 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
4879 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
4880 finish_struct_1, get_vfield_name, contains_empty_class_p,
4881 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
4882 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
4883 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
4885 * decl.c (xref_basetypes): Likewise.
4886 * dump.c (cp_dump_tree): Likewise.
4887 * error.c (dump_expr): Likewise.
4888 * init.c (sort_mem_initializers, expand_member_init,
4889 push_base_cleanups): Likewise.
4890 * method.c (do_build_copy_constructor, do_build_assign_reg,
4891 synthesize_exception_spec): Likewise.
4892 * name-lookup.c (arg_assoc_class): Likewise.
4893 * pt.c (instantiate_class_template, tsubst,
4894 get_template_base_recursive): Likewise.
4895 * ptree.c (cxx_print_type): Likewise.
4896 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
4897 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4898 dfs_access_in_type, access_in_type, lookup_field_queue_p,
4899 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
4900 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
4901 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
4902 binfo_for_vtable, copied_binfo, original_binfo): Likewise
4903 * tree.c (copy_base_binfos, make_binfo): Likewise.
4904 * typeck.c (commmon_base_type): Likewise
4905 * typeck2.c (process_init_constructor): Likewise
4907 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
4909 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
4911 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4914 * pt.c (convert_nontype_argument): Disallow conversions between
4915 different enumeration types.
4917 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4919 * cp-tree.h (BINFO_MARKED): Remove.
4920 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
4921 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
4922 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
4923 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
4924 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
4925 (mark_primary_bases, determine_primary_base, base_derived_from,
4926 dfs_find_final_overrider, dfs_find_final_overrider_q,
4927 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
4928 dfs_modify_vtables, walk_subobject_offsets,
4929 layout_nonempty_base_or_field, build_base_field,
4930 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
4931 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
4932 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
4933 build_ctor_vtbl_group, accumulate_vtble_inits,
4934 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
4935 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
4936 add_vcall_offset_vtbl_entries_1): Likewise.
4937 * decl.c (xref_basetypes): Incomming virtual base indicated by
4939 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
4940 * init.c (finish_init_stmts, sort_mem_initializers,
4941 emit_mem_initializers, build_vtble_address, expand_member_init,
4942 push_base_cleanups): Likewise.
4943 * method.c (do_build_copy_constructor): Likewise.
4944 * pt.c (instantiate_class_template,
4945 get_template_base_recursive): Likewise.
4946 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
4947 get_pseudo_ti_desc): Likewise.
4948 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4949 binfo_from_vbase, binfo_via_virtual, copied_binfo,
4950 original_binfo): Likewise.
4951 * semantics.c (finish_base_specifier): Virtualness is indicated
4953 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
4955 2004-07-06 Mark Mitchell <mark@codesourcery.com>
4958 2004-06-24 Jason Merrill <jason@redhat.com>
4960 * decl.c (grokparms): Give the PARM_DECL reference type if the
4961 parameter is passed by invisible reference.
4963 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4965 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
4966 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
4967 * pt.c (check_instantiated_args, unify): Likewise.
4969 2004-07-05 Phil Edwards <phil@codesourcery.com>
4971 * Make-lang.in (check-c++, lang_checks): Add some comments.
4973 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4975 * cp-mudflap.c: Delete file.
4976 * Makefile.in: Remove all references to cp-mudflap.o.
4978 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4980 * decl.c (cxx_init_decl_processing): Call
4981 build_common_tree_nodes before creating the global NAMESPACE_DECL.
4983 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4986 * call.c (build_operator_new_call): Look only at global scope.
4988 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
4990 * call.c (enforce_access): Expect TREE_BINFO.
4991 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
4992 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
4993 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4995 (BINFO_LANG_ELTS): Remove.
4996 (BINFO_LANG_SLOTS): New.
4997 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
4998 (CLASSTYPE_TEMPLATE_INFO): Adjust.
4999 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5000 * search.c (lookup_member): Check TREE_BINFO.
5001 * semantics.c (perform_or_defer_access_check): Likewise.
5002 (check_accessibility_of_qualified_id): Check
5003 deferred_access_no_check.
5004 * tree.c (make_binfo): Use make_tree_binfo.
5006 2004-07-04 Mark Mitchell <mark@codesourcery.com>
5008 * method.c (implicitly_declare_fn): Set linkage of generated
5011 2004-07-04 Richard Henderson <rth@redhat.com>
5013 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5015 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
5018 * name-lookup.c (push_class_level_binding): Don't pass a
5019 TREE_LIST of ambiguous names to check_template_shadow as it
5020 only handles declarations. Instead, pull the declaration
5023 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5026 * pt.c (check_explicit_specialization): Clarify error message.
5028 2004-07-02 Richard Henderson <rth@redhat.com>
5030 * tree.c (cp_unsave_r): Update remap_save_expr call.
5032 2004-07-02 Mark Mitchell <mark@codesourcery.com>
5035 * mangle.c (write_template_arg): Correct mangling.
5038 * decl.c (grokdeclarator): Robustify.
5040 2004-07-01 Richard Henderson <rth@redhat.com>
5042 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5043 * method.c (synthesize_method): Don't clear_last_expr.
5044 * name-lookup.c (maybe_push_cleanup_level): Likewise.
5046 2004-07-01 Nick Clifton <nickc@redhat.com>
5048 * decl2.c (import_export_class): Invoke the
5049 import_export_class field in the gcc_target structure if it is not
5052 2004-06-30 Richard Henderson (rth@redhat.com>
5054 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5055 * method.c (use_thunk): Likewise.
5057 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5059 * call.c (build_over_call), typeck.c (build_function_call): Call
5060 check_function_arguments instead of check_function_format.
5062 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5064 * call.c (build_over_call), typeck.c (build_function_call): Update
5065 calls to check_function_format.
5067 2004-06-30 Richard Henderson <rth@redhat.com>
5069 * call.c (build_over_call): Use __builtin_memcpy for copying
5070 CLASS_AS_BASE rather than funny casting.
5072 2004-06-30 Richard Henderson <rth@redhat.com>
5074 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5075 TYPE_SIZE_UNIT of full_type.
5077 2004-06-30 Per Bothner <per@bothner.com>
5079 Conditionally compile support for --enable-mapped_location.
5080 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
5081 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
5082 adjustments - which I don't understand.
5083 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
5084 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
5085 (print_instantiation_partial_context): Use expand_location.
5086 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
5087 * name-lookup.c: Likewise.
5088 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
5089 * name-lookup.c: Use input_line macro.
5090 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
5091 (cp_parser_statement): Rename locaal variable statement_locus to
5092 statement_location and use SET_EXPR_LOCATION macro.
5093 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
5094 * tree.c (cp_walk_subtrees): Likewise.
5096 2004-06-29 Per Bothner <per@bothner.com>
5098 * tree.c (build_min_nt, build_min, build_min_non_dep):
5099 Don't set TREE_COMPLEXITY from input_line.
5101 2004-06-29 Paul Brook <paul@codesourcery.com>
5103 * init.c: Include target.h.
5104 (get_cookie_size): Remove and replace with target hook.
5106 (build_new_1): Store the element size in the cookie.
5108 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
5111 * parser.c (cp_parser_template_declaration_after_export): Disable
5112 access checks here ...
5113 (cp_parser_class_specifier): ... not here.
5115 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5117 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5118 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5119 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5122 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5124 * cp-tree.h (struct deferred_access): Move to ...
5125 * semantics.c (struct deferred_access): ... here. Adjust.
5126 (deferred_access_stack): Make a VEC(deferred_access),
5127 (deferred_access_free_list): Remove.
5128 (deferred_access_no_check): New.
5129 (push_deferring_access_checks, resume_deferring_access_checks,
5130 stop_deferring_access_checks, pop_deferring_access_checks,
5131 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5132 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5134 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5137 * call.c (build_temp): Declare.
5138 (check_constructor_callable): New.
5139 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5140 CONSTRUCTOR_CALLABLE.
5141 (convert_like_real, initialize_reference): Use
5142 check_constructor_callable.
5143 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5144 (LOOKUP_*): Renumber.
5146 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5148 * friend.c (add_friend): Only perform access checks when context
5150 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5151 * parser.c (cp_parser_class_specifier): Disable access checks here
5152 when parsing the body of a templated class.
5153 * semantics.c (perform_or_defer_access_checks): Reorder to allow
5154 NULL binfos when not checking access.
5156 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5158 Use vector API for vbase list.
5159 * cp-tree.h: Include vec.h
5160 (DEF_VEC_P (tree)): New type.
5161 (struct lang_type_class): Change vbase's member type.
5162 (binfo_for_vbase): Declare.
5163 * class.c (determine_primary_base, base_derived_from,
5164 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5165 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5166 build_vtbl_initializer): Adjust.
5167 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5169 * init.c (sort_mem_initializers, expand_member_init,
5170 push_base_cleanups): Adjust.
5171 * method.c (do_build_copy_constructor): Adjust.
5172 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5173 (binfo_for_vbase): New.
5174 * tree.c (copy_base_binfos): Adjust.
5176 2004-06-28 Mark Mitchell <mark@codesourcery.com>
5178 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5180 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5183 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5184 paranthesis in case of pointers to array members.
5185 * error.c (dump_type_prefix): Likewise.
5186 (dump_type_suffix): Maybe issue a whitespace when printing
5189 2004-06-27 Mark Mitchell <mark@codesourcery.com>
5192 * parser.c (cp_parser_set_decl_spec_type): Refine test for
5193 redefinition of built-in types.
5195 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5197 * error.c (pp_template_argument_list_start): Remove.
5198 (pp_template_argument_list_end): Likewise.
5199 (pp_separate_with_comma): Use pp_cxx_separate_with.
5200 (reinit_global_formatting_buffer): Remove.
5201 (pp_non_consecutive_character): Likewise.
5202 (dump_scope): Use pp_cxx_colon_colon.
5203 (dump_template_parameter): Use pp_cxx_identifier,
5204 pp_cxx_tree_identifier and pp_cxx_whitespace.
5205 (dump_templat_bindings): Replace use of pp_string with sequence
5206 of pp_cxx_whitespace and pp_equal.
5207 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5208 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
5210 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5211 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
5212 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5213 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5214 pp_cxx_right_bracket, pp_cxx_identifier throughout,
5215 (dump_decl): Likewise.
5216 (dump_template_decl): Likewise.
5217 (dump_function_decl): Likewise. Set padding as appropriate.
5218 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5220 (dump_exception_spec): Likewise.
5221 (dump_function_name): Use pp_cxx_tree_identifier and
5223 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5224 pp_cxx_end_template_argument_list.
5225 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5226 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5227 pp_cxx_whitespace throughout.
5228 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5230 (dump_unary_op): Likewise.
5231 (reinit_cxx_pp): New function.
5232 (type_as_string); Use it.
5233 (expr_as_string): Likewise.
5234 (decl_as_string); Likewise.
5235 (context_as_string): Likewise.
5236 (lang_decl_name): Likewise.
5237 (decl_to_string): Likewise.
5238 (expr_to_string): Likewise.
5239 (parm_to_string): Likewise.
5240 (type_to_string): Likewise.
5241 (args_to_string): Likewise.
5242 (cv_to_string): Likewise.
5244 2004-06-26 Mark Mitchell <mark@codesourcery.com>
5246 * cp-tree.h (cp_cv_quals): New type.
5247 (cp_declarator): Use it instead of "tree" as appropriate.
5248 (grok_method_quals): Adjust prototype.
5249 (grokclassfn): Likewise.
5250 (do_friend): Likewise.
5251 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5252 (grokdeclarator): Likewise.
5253 * decl2.c (grok_method_quals): Likewise.
5254 (grokclassfn): Likewise.
5255 * friend.c (do_friend): Likewise.
5256 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5257 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5258 (make_pointer_declarator): Likewise.
5259 (make_reference_declarator): Likewise.
5260 (make_ptrmem_declarator): Likewise.
5261 (cp_parser_ptr_operator): Likewise.
5262 (cp_parser_cv_qualifier_seq_opt): Likewise.
5263 (cp_parser_cv_qualifier_opt): Remove.
5264 (cp_parser_new_declarator_opt): Adjust call to
5265 cp_parser_ptr_operator.
5266 (cp_parser_conversion_declaration_opt): Likewise.
5267 (cp_parser_declarator): Use cp_cv_quals, not tree.
5268 (cp_parser_direct_declarator): Likewise.
5270 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5272 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5273 Rename DECL_STMT to DECL_EXPR.
5274 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5275 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5276 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5278 2004-06-26 Jan Hubicka <jh@suse.cz>
5281 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
5282 reachability analysis.
5284 2004-06-25 Mark Mitchell <mark@codesourcery.com>
5286 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5289 2004-06-25 Paul Brook <paul@codesourcery.com>
5291 * decl2.c (get_guard): Call targetm.cxx.guard_type.
5292 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5294 2004-06-24 Mark Mitchell <mark@codesourcery.com>
5296 * decl.c (grokdeclarator): Restore error messages about __thread.
5297 * parser.c (cp_parser_decl_specifier_seq): Likewise.
5299 2004-06-24 Jason Merrill <jason@redhat.com>
5302 * decl.c (grokparms): Give the PARM_DECL reference type if the
5303 parameter is passed by invisible reference.
5305 2004-06-24 Andreas Schwab <schwab@suse.de>
5307 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5309 2004-06-23 Mark Mitchell <mark@codesourcery.com>
5311 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5312 (cp/decl.o): Likewise.
5313 (cp/decl2.o): Likewise.
5314 (cp/pt.o): Likewise.
5315 (cp/semantics.o): Likewise.
5316 * config-lang.in (gtfiles): Do not reference cp/lex.h.
5317 * class.c: Do not include lex.h.
5318 (add_implicitly_declared_members): Do not use
5319 adding_implicit_members.
5320 (check_bases_and_members): Do not talk about grok_x_components.
5321 * cp/cp-tree.h (adding_implicit_members): Remove.
5322 (cp_storage_class): New type.
5323 (cp_decl_spec): Likewise.
5324 (cp_decl_specifier_seq): Likewise.
5325 (cp_parameter_declarator): Use it for the decl_specifiers field.
5326 (check_tag_decl): Adjust prototype.
5327 (shadow_tag): Likewise.
5328 (groktypename): Likewise.
5329 (start_decl): Likewise.
5330 (start_function): Likewise.
5331 (start_method): Likewise.
5332 (grok_x_components): Remove.
5333 (grokfield): Adjust prototype.
5334 (grokbitfield): Likewise.
5335 (finish_member_class_template): Remove.
5336 * decl.c: Do not include lex.h.
5337 (adding_implicit_members): Do not define.
5338 (check_tag_decl): Do not use trees to represent decl-specifiers.
5339 (shadow_tag): Likewise.
5340 (groktypename): Likewise.
5341 (start_decl): Likewise.
5342 (grokvardecl): Likewise.
5343 (grokdeclarator): Likewise.
5344 (grokparms): Likewise.
5345 (start_function): Likewise.
5346 (start_method): Likewise.
5347 * decl.h (grokdeclarator): Adjust prototype.
5348 * decl2.c: Do not include lex.h.
5349 (grok_x_components): Remove.
5350 (grokfield): Do not use trees to represent decl-specifiers.
5351 (grokbitfield): Likewise.
5352 * lex.c: Do not include lex.h.
5354 * parser.c: Include target.h.
5355 (clear_decl_specs): New function.
5356 (cp_parser_translation_unit): Do not use trees to represent
5358 (cp_parser_postfix_expression): Likewise.
5359 (cp_parser_new_type_id): Likewise.
5360 (cp_parser_condition): Likewise.
5361 (cp_parser_simple_declaration): Likewise.
5362 (cp_parser_decl_specifier_seq): Likewise.
5363 (cp_parser_function_specifier_opt): Likewise.
5364 (cp_parser_conversion_type_id): Likewise.
5365 (cp_parser_template_parameter): Likewise.
5366 (cp_parser_explicit_instantiation): Likewise.
5367 (cp_parser_type_specifier): Likewise.
5368 (cp_parser_simple_type_specifier): Likewise.
5369 (cp_parser_init_declarator): Likewise.
5370 (cp_parser_type_id): Likewise.
5371 (cp_parser_type_specifier_seq): Likewise.
5372 (cp_parser_parameter_declaration): Likewise.
5373 (cp_parser_member_declaration): Likewise.
5374 (cp_parser_exception_declaration): Likewise.
5375 (cp_parser_function_definition_from_specifiers_and_declarator):
5377 (cp_parser_single_declaration): Likewise.
5378 (cp_parser_save_member_function_body): Likewise.
5379 (cp_parser_friend_p): Likewise.
5380 (cp_parser_set_storage_class): New function.
5381 (cp_parser_set_decl_spec_type): Likewise.
5382 * pt.c: Do not include lex.h.
5383 * semantics.c: Likewise.
5384 (finish_member_class_template): Remove.
5386 2004-06-23 Roger Sayle <roger@eyesopen.com>
5388 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
5389 longer take both "args" and "convert_args" as arguments.
5390 (build_op_delete_call): Update call to build_cxx_call.
5391 (build_over_call): Likewise, update call to build_cxx_call.
5392 * cp-tree.h (build_cxx_call): Update funtion prototype.
5393 * typeck.c (build_function_call): Don't call expand_tree_builtin.
5394 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5395 (throw_bad_typeid): Likewise.
5396 (build_dynamic_cast_1): Likewise.
5398 2004-06-22 Richard Henderson <rth@redhat.com>
5400 * class.c (build_vfn_ref): Take a pointer not object. Build
5402 (cp_fold_obj_type_ref): New.
5403 * call.c (build_over_call): Update build_vfn_ref call.
5404 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5405 * cp-tree.h (cp_fold_obj_type_ref): Declare.
5407 2004-06-21 Jason Merrill <jason@redhat.com>
5410 * cp-gimplify.c (cp_gimplify_init_expr): Look through
5413 2004-06-21 Mark Mitchell <mark@codesourcery.com>
5415 * cp-tree.def (NEW_EXPR): Add a fourth slot.
5416 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
5417 (TREE_PARMLIST): Likewise.
5418 (CALL_DECLARATOR_PARMS): Likewise.
5419 (CALL_DECLARATOR_QUALS): Likewise.
5420 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5421 (cp_declarator_kind): New type.
5422 (cp_parameter_declarator): Likewise.
5423 (cp_declarator): Likewise.
5424 (cp_error_declarator): Likewise.
5425 (no_parameters): Likewise.
5426 (groktypename): Change prototype.
5427 (start_decl): Likewise.
5428 (start_handler_parms): Likewise.
5429 (get_scope_of_declarator): Likewise.
5430 (start_function): Likewise.
5431 (start_preparsed_function): New function.
5432 (start_function): Change prototype.
5433 (start_method): Likewise.
5434 (grokfield): Likewise.
5435 (grokbitfield): Likewise.
5436 (build_new): Likewise.
5437 (make_pointer_declarator): Remove.
5438 (make_reference_declarator): Likewise.
5439 (make_call_declarator): Likewise.
5440 (set_quals_and_spec): Likewise.
5441 (process_template_parm): Change prototype.
5442 (begin_function_definition): Remove.
5443 (finish_parmlist): Remove.
5444 * decl.c (groktypename): Do not use trees to represent
5446 (start_decl): Likewise.
5447 (start_handler_parms): Remove.
5448 (get_scope_of_declarator): Reimplement.
5449 (grokdeclarator): Do not use trees to represent declarators.
5450 (grokparms): Likewise.
5451 (start_function): Likewise.
5452 (start_method): Likewise.
5453 (build_void_list_mode): Do not use TREE_PARMLIST.
5454 * decl.h (grokdeclarator): Change prototype.
5455 * decl2.c (grok_method_quals): Robustify.
5456 (grok_x_components): Do not use trees to represent declarators.
5457 (grokfield): Likewise.
5458 (grokbitfield): Likewise.
5459 (start_objects): Build FUNCTION_DECLs, not declarators.
5460 (start_static_storage_duration_function): Likewise.
5461 * init.c (build_new): Simplify.
5462 * lex.c (make_pointer_declarator): Remove.
5463 (make_reference_declarator): Likewise.
5464 (make_call_declarator): Likewise.
5465 (set_quals_and_spec): Likewise.
5466 * method.c (use_thunk): Use start_preparsed_function.
5467 (synthesize_method): Likewise.
5468 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
5469 * optimize.c (maybe_clone_body): Use start_preparsed_function.
5470 * parser.c (cp_error_declarator): New variable.
5471 (declarator_obstack): Likewise.
5472 (alloc_declarator): New function.
5473 (make_declarator): Likewise.
5474 (make_id_declarator): Likewise.
5475 (make_pointer_declarator): Likewise.
5476 (make_reference_declarator): Likewise.
5477 (make_ptrmem_declarator): Likewise.
5478 (make_call_declarator): Likewise.
5479 (make_array_declarator): Likewise.
5480 (no_parameters): New variable.
5481 (make_parameter_declarator): Likewise.
5482 (cp_parser_check_for_definition_in_return_type): Do not use trees
5483 to represent declarators.
5484 (cp_parser_translation_unit): Likewise.
5485 (cp_parser_new_expression): Likewise.
5486 (cp_parser_new_type_id): Likewise.
5487 (cp_parser_new_declarator_opt): Likewise.
5488 (cp_parser_direct_new_declarator): Likewise.
5489 (cp_parser_condition): Likewise.
5490 (cp_parser_declaration_statement): Likewise.
5491 (cp_parser_declaration): Likewise.
5492 (cp_parser_conversion_type_id): Likewise.
5493 (cp_parser_conversion_declarator_opt): Likewise.
5494 (cp_parser_template_parameter_list): Likewise.
5495 (cp_parser_template_parameter): Likewise.
5496 (cp_parser_explicit_instantiation): Likewise.
5497 (cp_parser_init_declarator): Likewise.
5498 (cp_parser_declarator): Likewise.
5499 (cp_parser_direct_declarator): Likewise.
5500 (cp_parser_type_id): Likewise.
5501 (cp_parser_parameter_declaration_clause): Likewise.
5502 (cp_parser_parameter_declaration_list): Likewise.
5503 (cp_parser_parameter_declaration): Likewise.
5504 (cp_parser_member_declaration): Likewise.
5505 (cp_parser_exception_declaration): Likewise.
5506 (cp_parser_check_declarator_template_parameters): Likewise.
5507 (cp_parser_function_definition_from_specifiers_and_declarator):
5509 (cp_parser_save_member_function_body): Likewise.
5510 * pt.c (process_template_parm): Add is_non_type parameter.
5511 (convert_template_argument): Adjust call to groktypename.
5512 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
5513 (tsubst): Do not expect declarators.
5514 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
5516 (instantiate_decl): Use start_preparsed_function.
5517 * semantics.c (begin_function_definition): Remove.
5518 (finish_parmlist): Remove.
5519 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
5522 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5524 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
5525 (build_new_method_call): Likewise.
5526 * decl.c (local_variable_p_walkfn): Don't walk into types.
5527 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
5528 (build_anon_union_vars): Add new operand for COMPONENT_REF.
5529 * init.c (buld_new): Add new operand for ARRAY_REF.
5530 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
5531 (do_build_assign_ref): Likewise.
5532 * parser.c (cp_parser_direct_new_declarator): Add new operands
5534 (cp_parser_direct_declarator): Likewise.
5535 * pt.c (tsubst): Likewise.
5536 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
5538 * semantics.c (finish_non_static_data_member): Add new operand
5540 * typeck.c (build_class_member_access_expr): Likewise.
5541 (build_class_member_access_expr, finish_class_member_access_expr):
5543 (build_ptrmemfunc_access_expr): Likewise.
5544 (build_array_ref): Add new operands for ARRAY_REF.
5545 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
5546 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
5548 2004-06-21 Richard Henderson <rth@redhat.com>
5550 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
5551 * parser.c (cp_parser_jump_statement): Update commentary.
5552 * pt.c (tsubst_expr): Use RETURN_EXPR.
5553 * semantics.c (finish_return_stmt): Likewise.
5554 (finalize_nrv_r): Likewise.
5555 * typeck.c, typeck2.c: Update file start commentary.
5557 2004-06-21 Richard Henderson <rth@redhat.com>
5559 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
5561 2004-06-20 Richard Henderson <rth@redhat.com>
5563 * cp-tree.h (add_decl_stmt): Declare.
5564 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
5565 * semantics.c (maybe_cleanup_point_expr): New.
5566 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
5567 finish_for_expr, finish_switch_cond): Use it.
5568 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
5570 2004-06-20 Richard Henderson <rth@redhat.com>
5572 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
5573 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
5574 (cp_gimplify_expr): Call it.
5575 (gimplify_cleanup_stmt): Move from c-gimplify.c.
5576 (cp_genericize): New.
5577 * decl.c (finish_function): Call it.
5578 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
5579 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
5580 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
5581 (cp_genericize): Declare.
5582 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
5583 * dump.c (cp_dump_tree): Likewise.
5584 * semantics.c (push_cleanup): Move from c-semantics.c.
5586 2004-06-20 Zack Weinberg <zack@codesourcery.com>
5588 * cp-lang.c (has_c_linkage): Implement.
5590 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
5591 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
5592 (builtin_function_1): Don't call make_decl_rtl.
5593 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
5594 (grokvardecl): Don't call mangle_decl.
5595 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
5596 DECL_ASSEMBLER_NAME.
5597 * method.c (set_mangled_name_for_decl): Delete.
5598 * name-lookup.c (pushdecl): When a local extern shadows a
5599 file-scope declaration of the same object, give both DECLs the
5601 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
5602 on DECL_ASSEMBLER_NAME.
5604 2004-06-19 Richard Henderson <rth@redhat.com>
5606 * cp-gimplify.c: Remove unnecessary prototypes.
5607 (cp_gimplify_stmt): Merge into ...
5608 (cp_gimplify_expr): ... here. Move to end of file. Handle
5609 stmts_are_full_exprs_p frobbing.
5610 * cp-tree.h (cp_gimplify_stmt): Remove.
5611 * pt.c (tsubst_expr): Merge prep_stmt and unify.
5612 * tree.c (init_tree): Don't set lang_gimplify_stmt.
5614 2004-06-18 Richard Henderson <rth@redhat.com>
5617 * semantics.c (begin_cond): New.
5618 (finish_cond): Rewrite to handle template DECL_STMTs specially.
5619 Assume that non-template decls go land before the conditional.
5620 (simplify_loop_decl_cond): Likewise.
5621 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
5622 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
5623 begin_switch_stmt, finish_switch_cond): Update to match.
5625 2004-06-17 Jason Merrill <jason@redhat.com>
5628 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
5629 (finish_stmt_expr_expr): Update type after conversions.
5630 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
5631 Handle void initializer.
5632 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
5634 2004-06-17 Geoffrey Keating <geoffk@apple.com>
5636 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
5637 * cp-tree.h (defer_fn): Delete.
5638 * decl2.c (defer_fn): Delete.
5639 (finish_file): Simplify deferred_fns loops; check that
5640 only used inline functions get into deferred_fns.
5641 (mark_used): Inline previous contents of defer_fn.
5643 2004-06-16 Richard Henderson <rth@redhat.com>
5645 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
5646 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
5647 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
5648 of CTOR_INITIALIZER ...
5649 (pp_cxx_statement): ... here.
5650 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
5651 (finish_function): Use alloc_stmt_list to zap entire function.
5652 * parser.c (cp_parser_compound_statement): Update commentary.
5653 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
5654 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
5655 (finish_stmt_expr): Don't look through COMPOUND_STMT.
5657 2004-06-16 Geoffrey Keating <geoffk@apple.com>
5659 * pt.c (mark_decl_instantiated): Don't call defer_fn.
5661 2004-06-16 Richard Henderson <rth@redhat.com>
5663 * parser.c (cp_parser_labeled_statement): Update commentary.
5664 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
5665 * tree.c (mark_local_for_remap_r): Likewise.
5667 2004-06-16 Richard Henderson <rth@redhat.com>
5669 * parser.c (cp_parser_asm_definition): Update commentary.
5670 * pt.c (tsubst_expr): Use ASM_EXPR.
5671 * semantics.c (finish_asm_stmt): Likewise.
5673 2004-06-16 Richard Henderson <rth@redhat.com>
5675 * decl.c (finish_destructor_body): Use LABEL_EXPR.
5676 * parser.c (cp_parser_statement): Update commentary.
5677 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
5678 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
5679 * tree.c (mark_local_for_remap_r): Likewise.
5681 2004-06-16 Richard Henderson <rth@redhat.com>
5684 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
5685 statement in FOR_INIT_STMT for templates.
5687 2004-06-15 Richard Henderson <rth@redhat.com>
5689 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
5690 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
5691 (genericize_try_block): Use gimplify_stmt.
5692 (genericize_catch_block, genericize_eh_spec_block): Likewise.
5693 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
5694 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
5695 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
5696 (cp_tree_chain_matters_p): Remove.
5697 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
5698 (COMPOUND_STMT_BODY_BLOCK): New.
5699 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
5700 (EXPR_STMT_STMT_EXPR_RESULT): New.
5701 (building_stmt_tree): Check cur_stmt_list.
5702 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
5703 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
5704 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
5705 (cp_finish_decl): Use push_cleanup.
5706 (start_function, finish_function): Use statement lists.
5707 (finish_stmt): Do nothing.
5708 * except.c (begin_eh_spec_block): Use statement lists.
5709 (check_handlers_1, check_handlers): Likewise.
5710 * init.c (construct_virtual_base): Don't add extra compound stmts.
5711 (build_vec_init): Likewise.
5712 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
5713 * name-lookup.h (struct cp_binding_level): Add statement_list.
5714 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
5715 (cp_parser_labeled_statement, cp_parser_expression_statement,
5716 cp_parser_statement_seq_opt): Likewise.
5717 (cp_parser_compound_statement): Likewise. Take bool for try block.
5718 (cp_parser_selection_statement): Tidy if processing.
5719 (cp_parser_already_scoped_statement): Rewrite to do what it says.
5720 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
5721 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
5722 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
5723 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
5724 (finish_cond): New, rewritten from FINISH_COND.
5725 (simplify_loop_decl_cond): New.
5726 (finish_expr_stmt): Avoid nested EXPR_STMTs.
5727 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
5728 begin_else_clause, finish_else_clause, finish_if_stmt,
5729 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
5730 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
5731 finish_for_cond, finish_for_stmt, begin_switch_stmt,
5732 finish_switch_cond, finish_switch_stmt, begin_try_block,
5733 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
5734 finish_handler_sequence, finish_function_handler_sequence,
5735 begin_handler, finish_handler_parms, finish_handler,
5736 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
5737 using statement lists.
5738 (begin_compound_stmt): Replace has_no_scope argument with flags.
5739 Update all callers. Use statement lists.
5740 (finish_compound_stmt): Likewise.
5741 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
5742 (current_scope_stmt_stack): Remove.
5743 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
5744 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
5745 Rewrite with statement lists.
5747 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
5749 * parser.c: Change all assignments of c_lex_string_translate
5750 to true and false to 1 and 0.
5751 (cp_lexer_read_token): Convert type of the translated string.
5752 (cp_parser_skip_to_closing_parentheses): Preserve original
5753 value of c_lex_string_translate, and set it to -1 while
5755 (cp_parser_cache_group): Likewise.
5756 (cp_parser_cache_group_1): Renamed.
5757 (cp_parser_asm_operand_list): Remove redundant setting of
5758 c_lex_string_translate.
5759 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
5760 Handle chained strings.
5762 2004-06-12 Andrew Pinski <apinski@apple.com>
5766 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5768 * cp-tree.h: Fix typo.
5770 * cp-tree.h: Include cgraph.h
5771 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5772 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5774 2004-06-12 Jason Merrill <jason@redhat.com>
5776 PR tree-optimization/14107
5777 * decl.c (finish_function): Warn about no return in all functions.
5779 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5781 * cp-tree.h (struct language_function): Remove cannot_inline.
5782 * decl.c (save_function_data): cannot_inline is no more.
5783 (cxx_push_function_context): Likewise.
5784 * decl2.c (start_objects, start_static_storage_duration_function):
5785 Reset DECL_INLINE, set DECL_UNINLINABLE.
5787 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5790 * search.c (lookup_field): Propagate the ambiguity list.
5791 (lookup_fnfields): Likewise.
5793 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5796 * parser.c (cp_parser_template_name): Ctors/dtors never need a
5797 template keyword to disambiguate.
5799 2004-06-14 Mark Mitchell <mark@codesourcery.com>
5802 * decl.c (grokdeclarator): Ignore pointer-to-members when
5803 computing template depth.
5806 * name-lookup.c (pushtag): Do not try to put class declarations in
5807 explicit specialization scopes.
5809 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
5811 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
5813 2004-06-11 Mark Mitchell <mark@codesourcery.com>
5816 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
5817 bindings for undeclared built-ins.
5819 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5821 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
5822 appear at the correct location.
5824 2004-06-10 Jason Merrill <jason@redhat.com>
5828 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5829 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5830 TREE_TYPE for non-dependent names.
5831 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5832 unknown_type_node as its TREE_TYPE.
5833 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5834 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5835 (dump_expr) <SCOPE_REF case>: Likewise.
5837 2004-06-10 Mark Mitchell <mark@codesourcery.com>
5840 * parser.c (cp_parser_direct_declarator): Robustify.
5843 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
5844 constants in non-dependent contexts.
5848 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
5851 2004-06-10 Jakub Jelinek <jakub@redhat.com>
5854 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
5857 2004-06-09 Mark Mitchell <mark@codesourcery.com>
5861 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5862 * lex.c (handle_pragma_interface): Deprecate.
5863 (handle_pragma_implementation): Likewise.
5865 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
5867 * g++spec.c (lang_specific_driver): Remove check for -lm
5868 and -lmath when check it see if it was the math library.
5870 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5873 * parser.c (cp_parser_direct_declarator): Reject constructor named
5874 as qualified template-id.
5876 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5879 * lex.c (handle_pragma_interface): Deprecate.
5880 (handle_pragma_implementation): Likewise.
5882 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5885 * parser.c (cp_parser_iteration_statement): Fix typo in error
5889 * pt.c (tsubst_default_argument): Do not defer access checks
5890 while substituting into the default argument.
5893 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
5894 constant in a non-dependent context.
5897 * except.c (build_throw): Ensure that temp_expr has been
5900 2004-06-06 Roger Sayle <roger@eyesopen.com>
5902 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
5904 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5907 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
5908 'typename', and accept 'template'.
5910 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
5911 Jan Hubicka <jh@suse.cz>
5914 * method.c (use_think): Do not mark thunk as referenced.
5916 2004-06-03 Matt Austern <austern@apple.com>
5919 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
5920 is nonzero, and if we see a noninline definition of a key method,
5921 make the vtables nonweak.
5923 2004-06-02 Matt Austern <austern@apple.com>
5925 * cp-tree.h (instantiate_decl): new boolean parameter,
5926 undefined_ok. Current behavior is equivalent to its being 0.
5927 * decl2.c (mark_used): Add new argument when calling instantiate_decl
5928 * pt.c (mark_decl_instantiated): Unconditionally make
5929 instantiations explicit unconditionally
5930 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
5931 since mark_decl_instantiated now does it.
5932 (instantiate_class_member): New. Instantiate a member of an
5933 explicitly instantiated class template.
5934 (do_type_instantiation): Explicitly instantiate members of an
5935 explicitly instantiated class template.
5936 (instantiate_decl): if undefined_ok is nonzero, and if we're
5937 trying to explicitly instantiated a template with no definition,
5938 change it to an implicit instantiation.
5939 (instantiate_pending_templates): Add new argument to instantiate_decl.
5940 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5942 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5944 * cp-tree.h: Fix typo.
5946 * cp-tree.h: Include cgraph.h
5947 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5948 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5950 2004-06-01 Jason Merrill <jason@redhat.com>
5953 * call.c (call_builtin_trap): Remove type parm.
5954 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
5955 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
5957 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5960 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5961 TREE_TYPE for non-dependent names.
5962 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5963 unknown_type_node as its TREE_TYPE.
5964 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5965 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5966 (dump_expr) <SCOPE_REF case>: Likewise.
5968 2004-06-01 Richard Henderson <rth@redhat.com>
5969 Andrew Pinski <pinskia@physics.uc.edu>
5971 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
5972 * parser.c (struct cp_parser): Remove in_offsetof.
5973 (cp_parser_new): Don't set it.
5974 (cp_parser_unary_expression): Don't check it.
5975 (cp_parser_postfix_open_square_expression): Split out from ...
5976 (cp_parser_postfix_expression): ... here.
5977 (cp_parser_postfix_dot_deref_expression): Likewise.
5978 (cp_parser_builtin_offsetof): New.
5979 (cp_parser_primary_expression): Use it.
5981 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5984 * parser.c (cp_parser_postfix_expression): Allow subscript
5985 operator in offsetof.
5987 2004-05-31 Mark Mitchell <mark@codesourcery.com>
5990 * friend.c (add_friend): Do not try to perform access checks for
5991 functions from dependent classes.
5993 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5995 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
5996 (pp_cxx_begin_template_argument_list): Turn into a function.
5997 (pp_cxx_end_template_argument_list): Likewise.
5998 (pp_cxx_separate_with): Define.
5999 (pp_cxx_unqualified_id): Tidy.
6000 (pp_cxx_primary_expression): Likewise.
6001 (pp_cxx_postfix_expression): Likewise.
6002 (pp_cxx_expression): Likewise.
6003 (pp_cxx_simple_type_specifier): Likewise.
6004 (pp_cxx_type_specifier_seq): Likewise.
6005 (pp_cxx_parameter_declaration_clause): Likewise.
6006 (pp_cxx_exception_specification): Likewise.
6007 (pp_cxx_direct_declarator): Likewise.
6008 (pp_cxx_type_id): Likewise.
6009 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6011 (pp_cxx_left_paren): Likewise.
6012 (pp_cxx_right_paren): Likewise.
6013 (pp_cxx_left_brace): Likewise.
6014 (pp_cxx_right_brace): Likewise.
6015 (pp_cxx_left_bracket): Likewise.
6016 (pp_cxx_right_bracket): Likewise.
6017 (pp_cxx_dot): Likewise.
6018 (pp_cxx_identifier): Likewise.
6019 (pp_cxx_tree_identifier): Likewise.
6020 (pp_cxx_ampersand): New macro.
6021 (pp_cxx_star): Likewise.
6022 (pp_cxx_arrow): Likewise.
6023 (pp_cxx_semicolon): Likewise.
6024 (pp_cxx_complement): Likewise.
6025 (pp_cxx_begin_template_argument_list): Declaree.
6026 (pp_cxx_end_template_argument_list): Likewise.
6027 (pp_cxx_colon_colon): likewise.
6029 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6031 * parser.c (cp_parser_simple_type_specifier): Explicitly test
6034 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
6036 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6037 typeck.c: Fix comment formatting.
6039 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
6041 * cp-lang.c (cp_expand_decl): Remove.
6042 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6044 2004-05-30 Andreas Jaeger <aj@suse.de>
6046 * lang-specs.h: Add missing initializers for .ii.
6048 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
6050 * decl.c (cp_make_fname_decl): Free return value from
6053 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6056 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6058 * init.c (build_new): Likewise.
6061 * name-lookup.c (arg_assoc): Robustify.
6064 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6065 when determining the scope to use for a pointer to member.
6066 (lookup_anon_field): Give it external linkage.
6067 * cp-tree.h (lookup_anon_field): Declare it.
6068 * expr.c (cplus_expand_constant): Use it.
6070 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6073 * parser.c (cp_parser_simple_type_specifier): Call
6074 maybe_note_name_used_in_class.
6076 2004-05-28 Tom Marshall <tmarshall@real.com>
6079 * class.c (finish_struct_1): Warn only if the dtor is non-private or
6080 the class has friends.
6082 2004-05-27 Adam Nemet <anemet@lnxw.com>
6085 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6086 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6088 2004-05-24 Geoffrey Keating <geoffk@apple.com>
6090 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6091 if it might be needed.
6092 * pt.c (mark_decl_instantiated): Only call defer_fn if
6093 the function actually needs processing in finish_file.
6094 * decl2.c (finish_file): Add check that elements in
6095 deferred_fns_used are really needed there. Remove unnecessary
6096 test of DECL_SAVED_TREE.
6098 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6100 * Make-lang.in: No need to specify $(LIBCPP).
6102 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6105 * parser.c (cp_parser_class_head): Robustify.
6108 * parser.c (cp_parser_decl_specifier_seq): Correct error in
6110 (cp_parser_constructor_declarator_p): Treat attributes
6114 * typeck.c (build_unary_op): Do not attempt to resolve casts to
6115 base classes in templates.
6117 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6120 * pt.c (instantiate_template): Robustify.
6122 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6125 * decl.c (xref_tag): Issue errors about redeclaring template
6126 classes as non-template classes.
6128 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6131 * name-lookup.c (supplement_binding): Allow redefinitions of
6135 * parser.c (cp_parser_template_argument): Robustify.
6137 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6139 * class.c (alter_access): Use %E format specifier to print an
6140 identifier node. Avoid looking at the IDENTIFIER_POINTER.
6141 (push_lang_context): Likewise.
6142 * decl.c (lookup_label): Likewise.
6143 (grokdeclarator): Likewise.
6144 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6145 * pt.c (do_type_instantiation): Likewise.
6146 * tree.c (handle_java_interface_attribute): Likewise.
6147 (handle_com_interface_attribute): Likewise.
6148 (handle_init_priority_attribute): Likewise.
6150 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6154 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6155 recognized as overloaded functions.
6157 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6160 * class.c (layout_nonempty_base_or_field): Do not try to avoid
6161 layout conflicts for unions.
6164 * typeck.c (build_x_unary_op): Instantiate template class
6165 specializations before looking for "operator &".
6168 * typeck.c (complete_type): Layout non-dependent array types, even
6172 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6175 2004-05-22 Roger Sayle <roger@eyesopen.com>
6177 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6178 returning when TREE_TYPE is error_mark_node.
6179 * typeck.c (require_complete_type): Return error_mark_node if
6180 value's type is an error_mark_node.
6182 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
6184 * optimize.c (calls_setjmp_r): Remove.
6185 (calls_setjmp_p): Remove.
6186 * cp-tree.c (calls_setjmp_p): Remove.
6187 * decl.c (finish_function): Do not call calls_setjmp_p.
6189 2004-05-18 Zack Weinberg <zack@codesourcery.com>
6191 * decl.c (cp_finish_decl): Use mark_decl_referenced.
6192 * decl2.c (maybe_make_one_only): Likewise.
6193 * method.c (use_thunk): Likewise.
6195 2004-05-18 Jason Merrill <jason@redhat.com>
6197 * class.c (build_base_path): Tidy a bit.
6199 2004-05-14 Geoffrey Keating <geoffk@apple.com>
6201 * name-lookup.c (struct scope_binding): New.
6202 (EMPTY_SCOPE_BINDING): New.
6203 (lookup_using_namespace): Take a scope_binding instead of a
6205 (qualified_lookup_using_namespace): Likewise.
6206 (cxx_binding_clear): Delete.
6207 (do_nonmember_using_decl): Use a scope_binding instead of a
6209 (lookup_tag): Don't call select_decl.
6210 (ambiguous_decl): Don't return anything (and change callers to match).
6211 Take a scope_binding as the second parameter.
6212 (lookup_namespace_name): Use a scope_binding instead of a
6214 (unqualified_namespace_lookup): Likewise.
6215 (lookup_qualified_name): Likewise.
6216 (select_decl): Take a scope_binding instead of a cxx_binding.
6217 Use macros rather than hand-coding tests for type-ness.
6219 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6221 * cp-gimplify.c: Rename from cp-simplify.c.
6222 * Make-lang.in, optimize.c: Update.
6224 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6226 Merge from tree-ssa-20020619-branch. See
6227 ChangeLog.tree-ssa for details.
6229 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6230 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6231 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6232 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6234 * cp-mudflap.c: New file.
6235 * cp-simplify.c:: New file.
6237 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6240 * decl2.c (check_classfn): For member templates, compare also the
6241 template parameters to match the declaration.
6242 * cp-tree.h: Adjust declaration of check_classfn.
6243 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6244 * friend.c (do_friend): Likewise.
6245 * pt.c (tsubst_friend_function): Likewise.
6247 2004-05-01 Zack Weinberg <zack@codesourcery.com>
6249 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6250 Instead, dig into the representation type to find the array bound.
6252 2004-04-30 Jason Merrill <jason@redhat.com>
6254 Refer to base members using COMPONENT_REFs where possible.
6255 * class.c (build_simple_base_path): New fn.
6256 (build_base_path): Use it for non-virtual base references.
6257 (layout_class_type): Change base fields to their real type
6258 after layout is done.
6259 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6260 * cp-lang.c (cxx_get_alias_set): Use it.
6262 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
6264 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6267 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6270 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6271 used in integral constant expressions.
6273 2004-04-22 Mark Mitchell <mark@codesourcery.com>
6275 * init.c (build_aggr_init): Fix accidental use of C99 construct in
6278 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6280 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6281 * decl.c (reshape_init): Use it.
6282 * init.c (perform_member_init): Remove redundant condition.
6283 (build_aggr_init): Adjust to handle brace-enclosed initializers
6285 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6287 * parser.c (cp_parser_initializer_clause): Do not set
6288 TREE_HAS_CONSTRUCTOR on the initializer.
6289 * rtti.c (tinfo_base_init): Likewise.
6290 (generic_initializer): Likewise.
6291 (ptr_initializer): Likewise.
6292 (ptm_initializer): Likewise.
6293 (class_initializer): Likewise.
6294 (get_pseudo_ti_init): Likewise.
6295 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6297 2004-04-22 Alan Modra <amodra@bigpond.net.au>
6299 * name-lookup.c (anonymous_namespace_name): Make static.
6301 2004-04-19 Roger Sayle <roger@eyesopen.com>
6304 * class.c (build_base_path): Call fold whilst building the NULL
6305 pointer check expression trees.
6307 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6309 * init.c (build_new_1): Don't use type size argument for Java
6310 _Jv_AllocObject call.
6312 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
6314 * method.c (make_alias_for_thunk): Remove preprocessor guard on
6315 declaration and definition.
6317 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
6320 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6321 than ASM_OUTPUT_DEF.
6323 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6325 * decl2.c (mark_used): Don't segfault if cfun != NULL but
6326 current_function_decl == NULL.
6328 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
6331 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6334 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6336 * init.c (decl_constant_value): Don't look at DECL_INITIAL
6338 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6339 or TREE_SIDE_EFFECTS of a type.
6341 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
6344 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6345 cv-qualifier unification.
6346 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6348 2004-04-02 Jan Hubicka <jh@suse.cz>
6350 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6351 * cp-tree.h (cp_update_decl_after_saving): Declare.
6352 * tree.c (cp_update_decl_after_saving): Define.
6354 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6357 * typeck.c (get_delta_difference): Call fold before returning the
6360 2004-04-01 Richard Henderson <rth@redhat.com>
6363 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6364 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6366 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6369 * name-lookup.c (maybe_push_cleanup_level): Robustify.
6371 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6373 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6375 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6377 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6378 * class.c (check_bitfield_decl): Likewise.
6379 * cvt.c (type_promotes_to): Likewise.
6380 * decl.c (finish_enum): Likewise.
6381 * mangle.c (write_builtin_type): Likewise.
6382 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6383 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6384 (build_binary_op): Likewise.
6386 2004-03-31 Jan Hubicka <jh@suse.cz>
6388 * tree.h (optimize_function): Kill prototype.
6389 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6390 * semantics.c (expand_body): Kill.
6392 2004-03-30 Mark Mitchell <mark@codesourcery.com>
6395 * decl.c (start_decl_1): Do not decide whether or not to create a
6396 new cleanup level until after the type has been completed.
6399 * pt.c (tsubst_default_argument): Clear current_function_decl.
6401 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6403 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6405 2004-03-29 Zack Weinberg <zack@codesourcery.com>
6407 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
6408 is null, just print the literal name and return.
6410 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
6412 * cxx-pretty-print.c: Fix comment typos.
6414 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
6416 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
6419 2004-03-23 Ziemowit Laski <zlaski@apple.com>
6421 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
6422 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
6425 2004-03-23 Zack Weinberg <zack@codesourcery.com>
6427 PR 12267, 12391, 12560, 13129, 14114, 14133
6428 * cp-lang.c (c_reset_state): Delete.
6429 (push_file_scope, pop_file_scope): New stubs.
6430 * parser.c (c_parse_file): Call sorry() here if called more than once.
6432 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6434 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
6437 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6439 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
6441 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6443 * error.c (enum pad): Remove.
6444 (dump_qualifiers): Likewise.
6445 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
6446 (dump_aggr_type): Likewise.
6447 (dump_type_suffix): Likewise.
6448 (dump_simple_decl): Likewise.
6449 (dump_function_decl): Likewise.
6450 (cv_to_string): Likewise.
6451 (dump_type_prefix): Likewise. Adjust return void.
6452 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
6454 (pp_cxx_template_keyword_if_needed): Document.
6455 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
6456 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
6457 MUST_NOT_THROW_EXPR.
6459 2004-03-21 Mark Mitchell <mark@codesourcery.com>
6462 * decl.c (cp_finish_decl): Compute the size of arrays declared in
6463 templates, if their type is non-dependent.
6465 2004-03-19 Mark Mitchell <mark@codesourcery.com>
6467 * call.c (build_op_delete_call): Do not forget the placement
6468 arguments when iterating through mutiple delete operators.
6470 * cp-tree.h (svaed_scope): Remove last_parms.
6471 (NEW_DELETE_OPNAME_P): New macro.
6472 (last_function_parms): Remove.
6473 (do_friend): Adjust prototype.
6474 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
6475 using last_function_parms.
6476 (grokfndecl): Take the PARM_DECLs as an argument, rather than
6477 using last_function_parms.
6478 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
6479 for class-specific operator new and operator delete.
6480 (grok_op_properties): Do not look for allocation functions with
6482 (start_function): Use DECL_ARGUMENTS instead of
6483 last_function_parms.
6484 * decl.h (last_function_parms): Do not declare.
6485 * decl2.c (grokclassfn): Do not use last_function_parms.
6486 * friend.c (do_friend): Remove parmdecls parameter.
6487 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
6488 (pop_from_top_level): Do not restore it.
6489 * pt.c (check_explicit_specialization): Do not adjust
6490 last_function_parms.
6492 * name-lookup.c (do_local_using_decl): Create a local binding for
6493 types brought in via using declarations.
6495 * name-lookup.c (lookup_arg_dependent): Handle block-scope
6496 function declarations correctly.
6498 * semantics.c (finish_id_expression): Correct handling of
6499 conversion operators to dependent types.
6501 * typeck.c (lookup_destructor): Allow the use of destructors from
6504 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6506 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
6507 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
6508 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
6509 the field is named TEMPLATE_TYPE_PARM_INDEX.
6511 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6514 * parser.c (cp_parser_functional_cast): A cast to anything
6515 but integral or enumaration type is not an integral constant
6517 * pt.c (value_dependent_expression_p): Handle cast expressions
6518 without operands (such as "int()").
6520 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6522 * semantics.c (finish_pseudo_destructor_expr): Allow differing
6523 cv-qualification between the type named by the
6524 pseudo-destructor-name and the object-type.
6526 * search.c (accessible_base_p): Handle non-proper bases.
6528 * name-lookup.c (do_nonmember_using_decl): If a using declaration
6529 refers to a single overloaded function, set the type of the
6531 * tree.c (lvalue_type): Simplify.
6532 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
6534 (build_unary_op): Handle OVERLOADs with known types.
6536 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
6539 * parser.c (cp_parser_postfix_expression): Handle the use of
6540 "typename" in non-dependent contexts. Convert appropriately when
6541 when using a qualified name after "->" or ".".
6543 * call.c (conditional_conversion): Honor the requirement that some
6544 conversions refer to the original object.
6546 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6548 * call.c (build_conditional_expr): Do not call force_rvalue for
6549 operands of void_type when the conditional expression itself has
6551 * name-lookup.c (pushdecl): Don't consider a declaration of a
6552 function named "main" to be an overload of a type named "main".
6553 * parser.c (cp_parser_template_name): Perform name lookup when the
6554 template name is proceeded by "template" if the qualifying scope
6556 * typeck.c (composite_pointer_type_r): Correctly handle
6557 pointer-to-member types.
6558 (build_const_cast): Likewise.
6560 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6562 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
6563 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
6564 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
6565 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
6566 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
6567 (TYPEOF_TYPE_EXPR): New macro.
6568 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
6569 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
6570 * pt.c (tsubst): Likewise.
6571 * semantics.c (finish_typeof): Likewise.
6572 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
6573 and TEMPLATE_TYPE_PARM.
6574 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
6575 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
6577 2004-03-16 Mark Mitchell <mark@codesourcery.com>
6580 * cp-tree.h (build_new_op): Change prototype.
6581 (build_x_binary_op): Likewise.
6582 * call.c (build_new_op): Add overloaded_p parameter.
6583 * decl2.c (grok_array_decl): Adjust call to build_new_op.
6584 * parser.c (cp_parser_binary_expression): Note that uses of
6585 overloaded operators prevents an expression from being considered
6586 an integral constant.
6587 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
6589 * semantics.c (finish_call_expr): Likewise.
6590 * typeck.c (rationalize_conditional_expr): Likewise.
6591 (build_x_indirect_ref): Likewise.
6592 (build_x_binary_op): Likewise.
6593 (build_x_unary_op): Likewise.
6594 (build_x_compound_expr): Likewise.
6595 (build_modify_expr): Likewise.
6596 * typeck2.c (build_x_arrow): Likewise.
6598 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
6600 * cp-lang.c, ptree.c: Update copyright.
6602 2004-03-13 Mark Mitchell <mark@codesourcery.com>
6605 * parser.c (cp_parser_non_integral_constant_expression): Encode
6606 more of the idiom that surrounded calls to this function within
6608 (cp_parser_primary_expression): Adjust accordingly.
6609 (cp_parser_postfix_expression): Likewise.
6610 (cp_parser_unary_expression): Likewise.
6611 (cp_parser_cast_expression): Likewise.
6612 (cp_parser_assignment_expression): Likewise.
6613 (cp_parser_expression): Likewise.
6614 (cp_parser_new_expression): Note that new-expressions are not
6615 allowed in integral constant expressions.
6616 (cp_parser_delete_expression): Likewise.
6618 2004-03-12 Matt Austern <austern@apple.com>
6620 * decl2.c (maybe_make_one_only): Look at
6621 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
6622 to make an explicit instantiation weak.
6623 * method.c (use_thunk): Make sure we call comdat_linkage
6625 * pt.c (do_type_instantiation): On systems where weak symbols
6626 don't go in a static archive's TOC, explicit instantiation of a
6627 class must imply *explicit* instantiation of its memeber.
6629 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
6631 * call.c, cp-tree.h, pt.c: Fix comment typos.
6633 2004-03-10 Mark Mitchell <mark@codesourcery.com>
6636 * decl.c (xref_tag): Disregard non-type declarations when
6637 looking up a tagged type.
6639 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
6642 * call.c (convert_like_real): Build a const qualified temporary,
6643 when testing ctor access.
6645 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6647 * call.c (initialize_reference): Fix typo.
6649 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6652 * pt.c (determine_specialization): For member templates, match also
6656 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
6658 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
6660 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6663 * call.c (initialize_reference): Handle initializers that are
6664 class-member access expressions applies to rvalues.
6666 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6669 * name-lookup.c (supplement_binding): Ignore functions that are
6670 marked DECL_ANTICIPATED.
6672 2004-03-08 Mark Mitchell <mark@codesourcery.com>
6675 * class.c (check_field_decls): Complain about non-static data
6676 members of reference type in unions. Propagate
6677 CLASSTYPE_REF_FIELDS_NEED_INIT and
6678 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
6680 * init.c (perform_member_init): Complain about mbmers with const
6681 type that are not explicitly initialized.
6683 2004-03-08 Mark Mitchell <mark@codesourcery.com>
6685 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
6686 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
6687 (lang_identifier): Remove implicit_decl and error_locus.
6688 (IDENTIFIER_IMPLICIT_DECL): Remove.
6689 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
6690 (IDENTIFIER_ERROR_LOCUS): Likewise.
6691 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
6692 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
6693 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6694 (implicitly_declare): Remove.
6695 * decl.c (warn_extern_redeclared_static): Remove check of
6696 IDENTIFIER_IMPLICIT_DECL.
6697 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
6698 (implicitly_declare): Remove.
6699 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
6700 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
6701 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
6702 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
6703 in the innermost scope, rather than at namespace scope.
6704 * name-lookup.c (push_local_binding): Give it external linkage.
6705 (pushdecl): Remove dead code.
6706 * name-lookup.h (push_local_binding): Declare it.
6707 * ptree.c (cxx_print_identifier): Don't print
6708 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
6709 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
6710 not IDENTIFIER_ERROR_LOCUS.
6711 * typeck.c (build_function_call): Remove dead code.
6713 2004-03-08 Jason Merrill <jason@redhat.com>
6716 * decl.c (xref_tag): Remove attribute handling.
6717 * cp-tree.h: Adjust prototype.
6718 * decl.c, parser.c, rtti.c: Adjust callers.
6719 * parser.c (cp_parser_class_head): Pass back attributes in the
6721 (cp_parser_class_specifier): Adjust.
6723 2004-03-08 Matt Austern <austern@apple.com>
6726 * name-lookup.c (add_decl_to_level): Add extern variables, as well
6727 as static, to static_decls array.
6729 2004-03-05 Jason Merrill <jason@redhat.com>
6731 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
6733 2004-03-04 Geoffrey Keating <geoffk@apple.com>
6735 * decl.c (grokfndecl): Update old incorrect comment.
6736 (grokvardecl): Diagnose C++ variables of type with no linkage.
6738 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6741 * pt.c (build_non_dependent_expr): Do not create a
6742 NON_DEPENDENT_EXPR for a THROW_EXPR.
6744 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
6747 * error.c (dump_expr): Handle THROW_EXPR.
6749 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6752 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
6753 lookup if ordinary name-lookup finds a non-function.
6754 * pt.c (tsubst_copy_and_build): Likewise.
6757 * parser.c (cp_parser_late_parsing_default_args): Check that there
6758 are no extra tokens after the end of the default-argument
6761 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6764 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
6765 having C++ linkage for name-mangling purposes.
6768 * parser.c (cp_parser_direct_declarator): Recognize constructor
6769 declarators that use a template-id to name the class being
6773 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
6774 (tsubst_expr): Do not call tsubst_copy, even when
6775 processing_template_decl.
6777 2004-03-01 Jeff Law <law@redhat.com>
6779 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
6782 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6785 * name-lookup.h (push_scope): Change prototype.
6786 * name-lookup.c (push_scope): Do not reenter the current class
6788 * decl.c (grokfndecl): Check return code from push_scope before
6790 * decl2.c (check_classfn): Likewise.
6791 * parser.c (cp_parser_conversion_function_id): Likewise.
6792 (cp_parser_init_declarator): Likewise.
6793 (cp_parser_direct_declarator): Likewise.
6794 (cp_parser_class_specifier): Likewise.
6795 (cp_parser_class_head): Likewise.
6796 (cp_parser_lookup_name): Likewise.
6797 (cp_parser_constructor_declarator_p): Likewise.
6798 * pt.c (instantiate_class_template): Likewise.
6799 (resolve_typename_type): Likewise.
6801 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6804 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
6808 * class.c (update_vtable_entry_for_fn): Do not go through
6809 covariance machinery if the type returned by an overrider is the
6810 same as the original.
6812 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
6814 * call.c: Fix a comment typo.
6816 2004-02-27 Ziemowit Laski <zlaski@apple.com>
6818 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
6820 2004-02-26 Mark Mitchell <mark@codesourcery.com>
6823 * parser.c (cp_parser_parameter_declaration_list): Commit
6824 to fewer tentative parses.
6826 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6829 * pt.c (dependent_type_p_r): A template template parameter is a
6832 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6835 * mangle.c (write_template_arg_literal): Don't rely on identity for
6838 2004-02-24 Jason Merrill <jason@redhat.com>
6840 * tree.c (build_exception_variant): Use check_qualified_type.
6842 2004-02-23 Zack Weinberg <zack@codesourcery.com>
6843 Kazu Hirata <kazu@cs.umass.edu>
6845 * decl.c (cxx_init_decl_processing): Don't check
6846 flag_writable_strings.
6848 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
6851 * typeck.c (maybe_warn_about_returning_address_of_location):
6852 Change check for VAR_DECL to use DECL_P instead.
6854 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6857 * cvt.c (build_expr_type_conversion): Type must be complete before
6858 looking up for conversions.
6860 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6863 * name-lookup.c (arg_assoc_class): Don't look into template
6864 arguments if it is not a primary template.
6866 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6869 * method.c (use_thunk): Always clone function argument tree.
6871 2004-02-20 Mark Mitchell <mark@codesourcery.com>
6874 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
6877 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
6878 for all type variants.
6880 2004-02-19 Mark Mitchell <mark@codesourcery.com>
6883 * decl.c (duplicate_decls): Return error_mark_node for invalid
6885 * name-lookup.c (push_namespace): Ignore the return value from
6887 * pt.c (push_template_decl_real): Robustify.
6890 * name-lookup.c (push_class_level_binding): Do not complain about
6891 adding a binding for a member whose name is the same as the
6892 enclosing class if the member is located in a base class of the
6895 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6898 * parser.c (cp_parser_new_expression): Parse an ill-formed
6899 direct-new-declarator after a parenthesized type-id to emit good
6902 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
6904 * cp-tree.def, cvt.c: Update copyright.
6906 2004-02-17 Mark Mitchell <mark@codesourcery.com>
6909 * cp-tree.h (abi_version_at_least): Remove.
6910 * mangle.c: Include flags.h.
6912 2004-02-15 Mark Mitchell <mark@codesourcery.com>
6915 * call.c (build_conditional_expr): Handle conversions between
6916 class types which result in differently cv-qualified type
6920 * class.c (delete_duplicate_fields_1): Remove.
6921 (delete_duplicate_fields): Likewise.
6922 (finish_struct_anon): Remove check for members with the same name
6923 as their enclosing class.
6924 (check_field_decls): Do not call duplicate_fields.
6925 * decl.c (grokdeclarator): Remove check for static data members
6926 with the same name as their enclosing class.
6927 * name-lookup.c (push_class_level_binding): Check for members with
6928 the same name as their enclosing class.
6930 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
6933 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
6935 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6938 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
6939 has full set of arguments.
6941 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6944 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
6946 2004-02-13 Mark Mitchell <mark@codesourcery.com>
6949 * cp-tree.h (delete_sanity): Change prototype.
6950 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
6951 Remove dead code. Adjust code to warn about deleting an array.
6952 * typekc.c (decay_conversion): Use build_address and build_nop.
6955 * search.c (accessible_p): Do not check access in thunks.
6958 * call.c (build_conditional_expr): Call force_rvalue on the
6959 non-void operand in the case that one result is a throw-expression
6960 and the other is not.
6962 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
6965 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
6966 the type name and look ahead for ::~, and bail out early with a
6967 better error message if the parse is going to fail.
6969 2004-02-12 Mark Mitchell <mark@codesourcery.com>
6971 * call.c (conversion_kind): New type.
6972 (conversion_rank): Likewise.
6973 (conversion): Likewise.
6974 (CONVERSION_RANK): New macro.
6975 (conversion_obstack): New variable.
6976 (obstack_initialized): Likewise.
6977 (z_candidate): Change type of convs and second_conv.
6978 (candidate_warning): New type.
6979 (IDENTITY_RANK): Remove.
6980 (EXACT_RANK): Likewise.
6981 (PROMO_RANK): Likewise.
6982 (STD_RANK): Likewise.
6983 (PBOOL_RANK): Likewise.
6984 (USER_RANK): Likewise.
6985 (ELLIPSIS_RANK): Likewise.
6986 (BAD_RANK): Likewise.
6987 (ICS_RANK): Likewise.
6988 (ICS_STD_RANK): Likewise.
6989 (ICS_USER_FLAG): Likewise.
6990 (ICS_ELLIPSIS_FLAG): Likewise.
6991 (ICS_THIS_FLAG): Likewise.
6992 (ICS_BAD_FLAG): Likewise.
6993 (NEED_TEMPORARY_P): Likewise.
6994 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
6995 (USER_CONV_CAND): Likewise.
6996 (USER_CONV_FN): Likewise.
6997 (conversion_obstack_alloc): New function.
6998 (alloc_conversion): Likewise.
6999 (validate_conversion_obstack): Likewise.
7000 (alloc_conversions): Likewise.
7001 (build_conv): Adjust to deal with new conversion data structures.
7002 (build_identity_conv): New function.
7003 (build_ambiguous_conv): Likewise.
7004 (standard_conversion): Adjust to deal with new conversion data
7006 (convert_class_to_reference): Likewise.
7007 (direct_reference_binding): Likewise.
7008 (reference_binding): Likewise.
7009 (implicit_conversion): Likewise.
7010 (add_candidate): Likewise.
7011 (add_function_candidate): Likewise.
7012 (add_conv_candidate): Likewise.
7013 (build_builtin_candidate): Likewise.
7014 (print_z_candidate): Likewise.
7015 (merge_conversion_sequences): Likewise.
7016 (build_user_type_conversion_1): Likewise.
7017 (build_user_type_conversion): Likewise.
7018 (build_new_function_call): Likewise.
7019 (build_object_call): Likewise.
7020 (conditional_conversion): Likewise.
7021 (build_conditional_expr): Likewise.
7022 (build_new_op): Likewise.
7023 (build_op_delete_call): Likewise.
7024 (convert_like_real): Likewise.
7025 (build_over_call): Likewise.
7026 (build_new_method_call): Likewise.
7027 (is_subseq): Likewise.
7028 (maybe_handle_implicit_object): Likewise.
7029 (maybe_handle_ref_bind): Likewise.
7030 (compare_ics): Likewise.
7031 (source_type): Likewise.
7032 (add_warning): Likewise.
7034 (can_convert_arg): Likewise.
7035 (can_convert_arg_bad): Likewise.
7036 (perform_implicit_conversion): Likewise.
7037 (perform_direct_initialization_if_possible): Likewise.
7038 (initialize_reference): Likewise.
7039 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7040 * cp-tree.def (WRAPPER): Likewise.
7041 (IDENTITY_CONV): Remove.
7042 (LVALUE_CONV): Likewise.
7043 (QUAL_CONV): Likewise.
7044 (STD_CONV): Likewise.
7045 (PTR_CONV): Likewise.
7046 (PMEM_CONV): Likewise.
7047 (BASE_CONV): Likewise.
7048 (REF_BIND): Likewise.
7049 (USER_CONV): Likewise.
7050 (AMBIG_CONV): Likewise.
7051 (RVALUE_CONV): Likewise.
7052 * cp-tree.h (tree_wrapper): Remove.
7053 (WRAPPER_ZC): Remove.
7054 (lang_tree_node): Remove wrapper.
7055 (LOOKUP_SPECULATIVELY): Remove.
7056 (build_op_delete_call): Adjust prototype.
7057 (validate_conversion_obstack): Declare.
7058 (build_zc_wrapper): Remove.
7059 * cvt.c (convert_to_reference): Remove dead code.
7060 (ocp_convert): Likewise.
7061 * decl.c (redeclaration_error_message): Correct handling of
7063 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7064 (cp_tree_node_structure): Remove WRAPPER case.
7065 * decl2.c (finish_file): Call validate_conversion_obstack.
7066 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7067 (build_op_delete_call): Likewise.
7068 (build_x_delete): Likewise.
7069 (build_delete): Adjust call to build_op_delete_call.
7070 * pt.c (tsubst_friend_declaration): Adjust code to determine
7071 whether or not a friend template is a definition.
7072 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7073 * tree.c (build_zc_wrapper): Remove.
7075 2004-02-12 Zack Weinberg <zack@codesourcery.com>
7077 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7078 * cp-tree.h: Don't declare cxx_builtin_type_decls.
7079 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7080 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7082 2004-02-10 Mark Mitchell <mark@codesourcery.com>
7084 * typeck.c (lookup_destructor): Fix typo in error message.
7086 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
7088 * call.c, parser.c, tree.c: Fix comment typos.
7090 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7093 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7094 * decl.c (duplicate_decls, start_function): Likewise.
7096 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7098 * name-lookup.c (pushdecl): Issue shadow warnings directly.
7099 * parser.c (free_parser_stacks): Delete.
7101 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
7103 * rtti.c: Update copyright.
7105 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7108 * decl.c (require_complete_types_for_parms): Do not insert
7109 error_mark_node in the parameter list.
7111 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7114 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7115 error when terminator can not be found.
7117 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
7119 Make-lang.in (po-generated): Delete.
7121 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
7123 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7124 targetm.calls.promote_prototypes.
7126 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7130 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7132 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7133 (handle_pragma_implementation): Likewise.
7135 2004-02-05 Mark Mitchell <mark@codesourcery.com>
7138 * typeck.c (lookup_destructor): Tweak error message.
7140 2004-02-05 Jan Hubicka <jh@suse.cz>
7142 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
7145 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7148 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7149 code, only emits the diagnostic now. Added lookup of the identifier
7150 and support for qualified ids.
7151 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7152 Parse an (invalid) type name as id-expression within a declarator.
7153 (cp_parser_simple_declaration): Use it.
7154 (cp_parser_member_declaration): Likewise.
7155 (cp_parser_make_typename_type): New function. Handle errors through
7156 cp_parser_diagnose_invalid_typename.
7157 (cp_parser_elaborated_type_specifier): Use it.
7159 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7162 * call.c (convert_like_real): Use "converting" rather than
7163 "argument" as the descriptive keyword to
7164 dubious_conversion_warnings.
7165 * typeck.c (convert_for_assignment): Do not call
7166 dubious_conversion_warnings.
7168 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7171 * init.c (build_delete): Emit a more informative error message in
7172 case of an incomplete type, and on the correct source line.
7174 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
7176 * error.c, search.c: Update copyright.
7178 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7181 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7182 linkage for the typeinfo name string.
7184 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7187 * cp-tree.h (fold_non_dependent_expr): New function.
7188 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7189 (cp_parser_template_argument): Use fold_non_dependent_expr.
7190 (cp_parser_direct_declarator): Likewise.
7191 * pt.c (fold_non_dependent_expr): New function.
7192 (convert_nontype_argument): Use it.
7193 (tsubst_qualified_id): Simplify.
7194 (tsubst_copy_and_build): Likewise.
7196 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7198 * decl.c (cxx_push_function_context): Do not set
7199 current_function_is_thunk.
7200 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7203 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7206 * pt.c (more_specialized_class): Increase processing_template_decl
7207 while partial ordering.
7209 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7212 * decl.c (start_function): Do not call pushdecl for any
7213 instantiation or specialization of a primary template.
7215 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7218 * parser.c (cp_parser_class_name): Robustify.
7221 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7224 * semantics.c (finish_id_expression): Do not return an
7225 IDENTIFIER_NODE when lookup finds a PARM_DECL.
7227 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7230 * pt.c (build_non_dependent_expr): Do not build
7231 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7234 * semantics.c (finish_id_expression): Do not return an
7235 IDENTIFIER_NODE when lookup finds a VAR_DECL.
7238 * parser.c (cp_parser_simple_declaration): When skipping to the
7239 end of the statement swallow the terminating semicolon.
7241 2004-02-02 Mark Mitchell <mark@codesourcery.com>
7244 * init.c (build_offset_ref): Improve error recovery for invalid
7245 uses of non-static member functions.
7248 * cp-tree.h (cp_build_type_attribute_variant): New function.
7249 * class.c (build_clone): Use cp_build_type_attribute_variant.
7250 * decl.c (duplicate_decls): Likewise.
7251 * pt.c (copy_default_args_to_explicit_spec): Likewise.
7252 (tsubst_function_type): Likewise.
7253 * tree.c (build_exception_variant): Check attributes before
7254 concluding that two types are the same.
7255 (cp_build_type-attribute_variant): New method.
7256 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7259 * call.c (convert_class_to_reference): Keep better track of
7260 pedantically invalid user-defined conversions.
7262 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7265 * pt.c (tsubst_qualified_id): Improved error message when a type
7266 is expected but not found.
7268 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
7270 * class.c: Fix comment typos.
7272 * error.c: Likewise.
7273 * parser.c: Likewise.
7275 * search.c: Likewise.
7276 * typeck.c: Likewise.
7278 2004-01-30 Richard Henderson <rth@redhat.com>
7281 * method.c (use_thunk): Don't force_target_expr for void thunks.
7282 * tree.c (build_target_expr_with_type): Assert non-void type.
7283 (force_target_expr): Likewise.
7285 2004-01-30 Michael Matz <matz@suse.de>
7287 * parser.c (cp_parser_labeled_statement): Accept case ranges.
7289 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7293 * decl.c (grokdeclarator): Check immediatly type completeness for
7294 non-dependent types.
7296 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7299 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7300 a sizeof expression.block
7302 2004-01-29 Mark Mitchell <mark@codesourcery.com>
7305 * mangle.c (write_encoding): Correct encoding of member template
7308 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7310 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7311 template name as it was `<::' (digraph typo).
7312 (cp_parser_nth_token_starts_template_argument_list_p): New function.
7313 (cp_parser_id_expression): Use it.
7314 (cp_parser_nested_name_specifier_opt): Likewise.
7315 (cp_parser_template_name): Likewise.
7316 (cp_parser_class_name): Likewise.
7317 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7319 2004-01-28 Mark Mitchell <mark@codesourcery.com>
7322 * typeck.c (merge_types): Do not merge attributes into
7326 * parser.c (cp_parser_direct_declarator): Do not prevent
7327 backtracking inside a parenthesized declarator.
7328 (cp_parser_parameter_declaration): Fix typo in comment.
7330 2004-01-28 Jan Hubicka <jh@suse.cz>
7332 * semantics.c (expand_body) Do emit_associated_thunks before
7335 2004-01-27 Devang Patel <dpatel@apple.com>
7337 * name-lookup.c: Include "debug.h"
7338 (do_namespace_alias): Invoke debug_hooks to emit debug info
7339 for namespace alias.
7340 (do_local_using_decl): Invoke debug_hooks to emit debug info
7342 (do_class_using_decl): Same.
7343 (do_toplevel_using_decl): Same.
7344 (do_using_directive): Same.
7345 (cp_emit_debug_info_for_using): New function.
7346 * Make-lang.in (cp/parser.o): Depend on debug.h
7347 (cp/name-lookup.o): Same.
7349 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7351 * cp-tree.h (language_function, lang_type_header): Use
7353 * name-lookup.h (cp_binding_level): Likewise.
7355 2004-01-26 Mark Mitchell <mark@codesourcery.com>
7358 * semantics.c (finish_for_expr): Check for unresolved overloaded
7361 * class.c (add_method): Just check processing_template_decl to
7362 determine whether or not we are within a template.
7363 * decl2.c (maybe_retrofit_in_chrg): Likewise.
7364 * init.c (decl_constant_value): Check the type of the declaration,
7366 * name-lookup.c (maybe_push_to_top_level): Rename to ...
7367 (push_to_top_level): ... this.
7368 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7369 * pt.c (push_template_decl_real): Reorder condition for speed.
7370 (convert_template_argument): Use dependency-checking functions in
7371 place of uses_template_parms.
7372 (lookup_template_class): Avoid calling uses_template_parms more
7374 (uses_template_parms): Reimplement, using dependency-checking
7376 (instantiate_class_template): Use push_to_top_level, not
7377 maybe_push_to_top_level.
7378 (type_unification_real): Simplify.
7379 (type_dependent_expression_p): Handle OFFSET_REFs and
7381 (any_dependent_template_arguments_p): Handle multiple levels of
7383 * semantics.c (expand_or_defer_fn): Do not check
7384 uses_template_parms for template instantiations.
7385 * typeck.c (comptypes): Avoid calling cp_type_quals.
7387 2004-01-25 Mark Mitchell <mark@codesourcery.com>
7390 * call.c (build_over_call): Do not convert arguments when
7391 processing a template.
7392 * pt.c (build_non_dependent_expr): Do not build a
7393 NON_DEPENDENT_EXPR for arithmetic constants.
7395 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7398 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7399 returns a TYPE_DECL. no further lookup is required.
7400 * semantics.c (check_template_template_default_arg): A TYPE_DECL
7401 is invalid. Rework to give better diagnostics.
7403 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7406 * pt.c (instantiate_class_template): Add an error_mark_node
7408 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
7410 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
7413 * decl.c (finish_function): Move the call to
7414 finish_fname_decls below the call to
7415 finish_eh_spec_block.
7417 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7419 * optimize.c, typeck2.c: Update copyright.
7421 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7423 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
7424 init.c, mangle.c, typeck.c: Update copyright.
7426 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
7428 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
7430 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7432 * Make-lang.in: Replace $(docdir) with doc.
7433 (c++.info, c++.srcinfo): Dummy entry.
7434 (c++.man, c++.srcman): New rules.
7435 (c++.install-man): Revamp rule.
7437 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7439 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
7440 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
7441 immediate $(shell) instead of deferred backquote.
7443 2004-01-19 Mark Mitchell <mark@codesourcery.com>
7446 * parser.c (cp_parser_postfix_expression): When encountering
7447 incomplete type on left-hand side of "->" or ".", treat the entire
7448 expression as erroneous.
7451 * call.c (build_field_call): Remove.
7452 (n_build_method_call): Likewise.
7453 (build_method_call): Likewise.
7454 (build_new_method_call): Do not call build_field_call.
7455 * class.c (n_build_method_call): Remove.
7456 (print_class_statistics): Do not print it.
7457 * cp-tree.h (build_method_call): Remove declaration.
7458 (finish_object_call_expr): Likewise.
7459 (build_new_1): Do not use build_method_call.
7460 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
7461 when the function appearing on the right-hand-side of "." or "->"
7462 is not actually a function.
7463 * pt.c (tsubst_copy_and_build): Likewise.
7464 * semantics.c (finish_object_call_expr): Remove.
7466 2004-01-18 Mark Mitchell <mark@codesourcery.com>
7469 * pt.c (tsubst): Use finish_typeof.
7471 2004-01-18 Jason Merrill <jason@redhat.com>
7474 * except.c (build_throw): In a template, set
7475 current_function_returns_abnormally.
7477 2004-01-17 Fred Fish <fnf@intrinsity.com>
7480 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
7481 except don't call array_type_nelts() with a VECTOR_TYPE.
7483 2004-01-16 Jan Hubicka <jh@suse.cz>
7485 * mangle.c (write_mangled_name): Remove inline modifier.
7487 2004-01-16 Mark Mitchell <mark@codesourcery.com>
7490 * decl.c (compute_array_index_type): Fix grammar in comment.
7491 * init.c (build_zero_init): Handle zero-sized arrays correctly.
7494 * call.c (name_as_c_string): Print conversion operator names
7498 * call.c (initialize_reference): Pass -1 for inner parameter to
7501 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7504 * parser.c (cp_parser_base_specifier): Check for an invalid
7505 keyword `typename' and emit an user-friendly error message.
7507 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7510 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7511 (handle_pragma_implementation): Likewise.
7513 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7516 * typeck.c (build_class_member_access_expr): Allow to access members
7517 of the currently open class.
7518 (finish_class_member_access_expr): Likewise.
7520 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7523 * name-lookup.c (validate_nonmember_using_decl): Take scope and
7524 name by value, instead of computing them.
7525 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
7526 arguments. Pass them to validate_nonmember_using_decl.
7527 * name-lookup.h (do_local_using_decl): Adjust.
7528 (do_toplevel_using_decl): Likewise.
7529 * parser.c (cp_parser_using_declaration): Likewise.
7530 * pt.c (tsubst_expr): Likewise.
7532 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7536 * name-lookup.c (qualified_lookup_using_namespace): Search
7537 strongly-associated namespaces first, and only then try other
7540 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
7542 * Make-lang.in (c++.srcextra): Dummy entry.
7544 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7547 * parser.c (cp_parser_template_name): Don't try to parse a
7548 conversion-function-id, as it cannot be a template-name.
7549 (cp_parser_simple_type_specifier): Check for invalid template-ids
7550 even after a built-in type.
7552 2004-01-14 Jan Hubicka <jh@suse.cz>
7555 * pt.c (instantiate_decl): Do not increase function_depth.
7557 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
7561 * parser.c (cp_parser_elaborated_type_specifier): Warn about
7562 attributes and discard.
7563 * decl.c (xref_tag): Don't overwite existing attributes with
7566 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7569 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
7570 is no destructor while looking up a BIT_NOT_EXPR.
7572 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7574 * cxxfilt.c: Remove unused file.
7576 2004-01-14 Jan Hubicka <jh@suse.cz>
7578 Partial fix to PR c++/12850
7579 * decl2.c (mark_used): Do not proactively instantiate templates
7580 when compiling in unit-at-a-time or not optimizing.
7581 * optimize.c (maybe_clone_body): Do not increase function depth.
7583 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7586 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
7588 2004-01-12 Steven Bosscher <stevenb@suse.de>
7591 * parser.c (cp_parser_member_declaration): Any non-type is also
7592 not a class or a function.
7594 2004-01-12 Jason Merrill <jason@redhat.com>
7597 * class.c (build_base_path): Do not mark vtable references as
7599 (build_vtbl_ref_1): Likewise.
7601 2004-01-12 Richard Henderson <rth@redhat.com>
7604 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
7605 (store_init_value): Use it.
7606 * decl.c (check_initializer): Expect full initialization code
7607 from store_init_value.
7608 * init.c (expand_aggr_init_1): Likewise.
7609 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
7611 2004-01-12 Mark Mitchell <mark@codesourcery.com>
7613 * class.c (layout_class_type): For non-POD class types, also copy
7614 the DECL_SIZE and DECL_MODE of fields to the base class type.
7616 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7619 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
7620 calling regenerate_decl_from_template.
7622 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
7625 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
7626 decl-specifier occurring along with a class definition.
7628 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
7630 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
7631 clauses to comments describing declares_class_or_enum.
7632 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
7635 2004-01-12 Jan Hubicka <jh@suse.cz>
7637 * pt.c (for_each_template_parm): Do not check for duplicates.
7638 (for_each_template_parm): Use walk_tree duplicate checking code.
7640 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
7643 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
7644 is error_mark_node, don't add any more decl_specs.
7645 (cp_parser_init_declarator): After committing to a declaration, if
7646 the decl_specifiers start with error_mark_node, issue an error and
7647 change the type to "int".
7649 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
7652 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
7654 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7658 * pt.c (tsubst): Substitution must fail if we are attempting to
7659 create an array with element type that is an abstract class type.
7660 * decl.c (cp_finish_decl): Strip pointers and array types recursively
7661 before calling abstract_virtuals_error.
7663 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
7665 * name-lookup.c (qualified_lookup_using_namespace): Consider
7666 strong using directives even if we've already found a binding.
7668 2004-01-09 Mark Mitchell <mark@codesourcery.com>
7670 * cp-tree.h (cxx_expand_expr): Change prototype.
7671 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
7673 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7676 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
7677 looking into them recursively. They can be there because of the
7678 new __offsetof__ extension.
7680 2004-01-07 Zack Weinberg <zack@codesourcery.com>
7682 * parser.c (cp_parser_save_member_function_body): Mark the
7685 2004-01-05 Mark Mitchell <mark@codesourcery.com>
7688 * class.c (build_clone): Copy type attributes from the original
7689 function to the clone.
7692 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
7693 references as constant.
7696 * parser.c (cp_parser_explicit_instantiation): Improve error
7698 (cp_parser_require): Improve indication of the error location.
7701 * parser.c (cp_parser_class_head): Reorder logic to check for
7702 invalid qualification.
7704 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7707 * name-lookup.c (lookup_using_namespace): Remove spacesp
7709 (unqualified_namespace_lookup): Likewise.
7710 (lookup_qualified_name): Adjust accordingly.
7711 (lookup_name_real): Likewise.
7712 (lookup_arg_dependent): Do not eliminate the namespace of the
7713 functions found by unqualified name lookup unless that is the
7716 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
7718 * semantics.c (push_deferring_access_checks): Fix format.
7719 (resume_deferring_access_checks): Likewise.
7720 (stop_deferring_access_checks): Likewise.
7721 (pop_deferring_access_checks): Likewise.
7722 (get_deferred_access_checks): Likewise.
7723 (pop_to_parent_deferring_access_checks): Likewise.
7724 (perform_deferred_access_checks): Likewise.
7725 (perform_or_defer_access_check): Likewise.
7727 2004-01-04 Richard Henderson <rth@redhat.com>
7729 * call.c (build_over_call): Don't create a save_expr of an
7730 aggregate, but rather its address.
7732 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7735 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
7736 an offsetof expression.
7738 * parser.c (cp_parser_parameter_declaration): Fix comment.
7741 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
7742 (reference_binding): Set it when appropriate.
7743 (build_temp): New function, split out from ...
7744 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
7745 (initialize_reference): Likewise.
7748 * parser.c (cp_parser): Add in_type_id_in_expr_p.
7749 (cp_parser_new): Initialize it.
7750 (cp_parser_postfix_expression): Set it.
7751 (cp_parser_sizeof_operand): Likewise.
7752 (cp_parser_parameteR_declaration): Do not commit early to tenative
7753 parsers when in_type_id_in_expr_p is set.
7755 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7758 * parser.c (cp_parser_template_argument): Don't call
7759 make_unbound_class_template directly.
7760 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
7761 UNBOUND_CLASS_TEMPLATE tree node.
7763 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
7766 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
7768 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7771 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
7772 (DECL_FUNCTION_TEMPLATE_P): Use it.
7773 (DECL_CLASS_TEMPLATE_P): Likewise.
7774 * parser.c (cp_parser_lookup_name): Add is_template parameter.
7775 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
7776 (cp_parser_template_name): Likewise.
7777 (cp_parser_elaborated_type_specifier): Likewise.
7778 (cp_parser_namespace_name): Likewise.
7779 (cp_parser_class_name): Likewise.
7780 (cp_parser_lookup_name_simple): Likewise.
7782 See ChangeLog.3 for earlier changes.