1 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4 * parser.c (cp_parser_class_head): Robustify.
7 * parser.c (cp_parser_decl_specifier_seq): Correct error in
9 (cp_parser_constructor_declarator_p): Treat attributes
13 * typeck.c (build_unary_op): Do not attempt to resolve casts to
14 base classes in templates.
17 * pt.c (instantiate_template): Robustify.
20 * decl.c (xref_tag): Issue errors about redeclaring template
21 classes as non-template classes.
24 * name-lookup.c (supplement_binding): Allow redefinitions of
28 * parser.c (cp_parser_template_argument): Robustify.
30 2004-05-22 Mark Mitchell <mark@codesourcery.com>
34 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
35 recognized as overloaded functions.
38 * class.c (layout_nonempty_base_or_field): Do not try to avoid
39 layout conflicts for unions.
42 * typeck.c (build_x_unary_op): Instantiate template class
43 specializations before looking for "operator &".
46 * typeck.c (complete_type): Layout non-dependent array types, even
50 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
53 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
56 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
57 used in integral constant expressions.
59 2004-04-18 Release Manager
63 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
66 * method.c (make_alias_for_thunk): Just return function decl
67 for one_only functions if __CYGWIN__ or __MINGW32__
68 (use_thunk): Don't put function and thunk in same one_only
69 section if __CYGWIN__ or __MINGW32__.
71 2004-04-08 Jakub Jelinek <jakub@redhat.com>
73 * decl2.c (mark_used): Don't segfault if cfun != NULL but
74 current_function_decl == NULL.
76 2004-04-01 Mark Mitchell <mark@codesourcery.com>
79 * typeck.c (get_delta_difference): Call fold before returning the
82 2004-04-01 Richard Henderson <rth@redhat.com>
85 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
86 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
88 2004-04-01 Mark Mitchell <mark@codesourcery.com>
91 * name-lookup.c (maybe_push_cleanup_level): Robustify.
93 2004-03-30 Mark Mitchell <mark@codesourcery.com>
96 * decl.c (start_decl_1): Do not decide whether or not to create a
97 new cleanup level until after the type has been completed.
100 * pt.c (tsubst_default_argument): Clear current_function_decl.
102 2004-03-28 Jan Hubicka <jh@suse.cz>
105 * method.c (use_think): Do not mark thunk as referenced.
107 2004-03-21 Mark Mitchell <mark@codesourcery.com>
110 * decl.c (cp_finish_decl): Compute the size of arrays declared in
111 templates, if their type is non-dependent.
113 2004-03-19 Mark Mitchell <mark@codesourcery.com>
115 * call.c (build_op_delete_call): Do not forget the placement
116 arguments when iterating through mutiple delete operators.
118 * cp-tree.h (svaed_scope): Remove last_parms.
119 (NEW_DELETE_OPNAME_P): New macro.
120 (last_function_parms): Remove.
121 (do_friend): Adjust prototype.
122 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
123 using last_function_parms.
124 (grokfndecl): Take the PARM_DECLs as an argument, rather than
125 using last_function_parms.
126 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
127 for class-specific operator new and operator delete.
128 (grok_op_properties): Do not look for allocation functions with
130 (start_function): Use DECL_ARGUMENTS instead of
132 * decl.h (last_function_parms): Do not declare.
133 * decl2.c (grokclassfn): Do not use last_function_parms.
134 * friend.c (do_friend): Remove parmdecls parameter.
135 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
136 (pop_from_top_level): Do not restore it.
137 * pt.c (check_explicit_specialization): Do not adjust
140 * name-lookup.c (do_local_using_decl): Create a local binding for
141 types brought in via using declarations.
143 * name-lookup.c (lookup_arg_dependent): Handle block-scope
144 function declarations correctly.
146 * semantics.c (finish_id_expression): Correct handling of
147 conversion operators to dependent types.
149 * typeck.c (lookup_destructor): Allow the use of destructors from
152 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
155 * parser.c (cp_parser_functional_cast): A cast to anything
156 but integral or enumaration type is not an integral constant
158 * pt.c (value_dependent_expression_p): Handle cast expressions
159 without operands (such as "int()").
161 2004-03-18 Mark Mitchell <mark@codesourcery.com>
163 * semantics.c (finish_pseudo_destructor_expr): Allow differing
164 cv-qualification between the type named by the
165 pseudo-destructor-name and the object-type.
167 * search.c (accessible_base_p): Handle non-proper bases.
169 * name-lookup.c (do_nonmember_using_decl): If a using declaration
170 refers to a single overloaded function, set the type of the
172 * tree.c (lvalue_type): Simplify.
173 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
175 (build_unary_op): Handle OVERLOADs with known types.
177 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
180 * parser.c (cp_parser_postfix_expression): Handle the use of
181 "typename" in non-dependent contexts. Convert appropriately when
182 when using a qualified name after "->" or ".".
184 * call.c (conditional_conversion): Honor the requirement that some
185 conversions refer to the original object.
187 * call.c (build_conditional_expr): Do not call force_rvalue for
188 operands of void_type when the conditional expression itself has
190 * name-lookup.c (pushdecl): Don't consider a declaration of a
191 function named "main" to be an overload of a type named "main".
192 * parser.c (cp_parser_template_name): Perform name lookup when the
193 template name is proceeded by "template" if the qualifying scope
195 * typeck.c (composite_pointer_type_r): Correctly handle
196 pointer-to-member types.
197 (build_const_cast): Likewise.
199 2004-03-16 Mark Mitchell <mark@codesourcery.com>
202 * cp-tree.h (build_new_op): Change prototype.
203 (build_x_binary_op): Likewise.
204 * call.c (build_new_op): Add overloaded_p parameter.
205 * decl2.c (grok_array_decl): Adjust call to build_new_op.
206 * parser.c (cp_parser_binary_expression): Note that uses of
207 overloaded operators prevents an expression from being considered
208 an integral constant.
209 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
211 * semantics.c (finish_call_expr): Likewise.
212 * typeck.c (rationalize_conditional_expr): Likewise.
213 (build_x_indirect_ref): Likewise.
214 (build_x_binary_op): Likewise.
215 (build_x_unary_op): Likewise.
216 (build_x_compound_expr): Likewise.
217 (build_modify_expr): Likewise.
218 * typeck2.c (build_x_arrow): Likewise.
220 2004-03-13 Mark Mitchell <mark@codesourcery.com>
223 * parser.c (cp_parser_non_integral_constant_expression): Encode
224 more of the idiom that surrounded calls to this function within
226 (cp_parser_primary_expression): Adjust accordingly.
227 (cp_parser_postfix_expression): Likewise.
228 (cp_parser_unary_expression): Likewise.
229 (cp_parser_cast_expression): Likewise.
230 (cp_parser_assignment_expression): Likewise.
231 (cp_parser_expression): Likewise.
232 (cp_parser_new_expression): Note that new-expressions are not
233 allowed in integral constant expressions.
234 (cp_parser_delete_expression): Likewise.
236 2004-03-11 Mark Mitchell <mark@codesourcery.com>
239 * decl.c (xref_tag): Do not create dummy ENUMERAL_TYPEs.
241 2004-03-10 Mark Mitchell <mark@codesourcery.com>
244 * decl.c (xref_tag): Disregard non-type declarations when
245 looking up a tagged type.
247 2004-03-10 Jason Merrill <jason@redhat.com>
250 * tree.c (stabilize_init): Return whether or not it worked.
251 * init.c (build_new_1): If not, use a sentry.
252 * cp-tree.h: Adjust prototype.
254 2004-03-09 Nathan Sidwell <nathan@garibaldi.home>
257 * call.c (convert_like_real): Build a const qualified temporary,
258 when testing ctor access.
260 2004-03-09 Mark Mitchell <mark@codesourcery.com>
262 * call.c (initialize_reference): Fix typo.
264 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
267 * pt.c (determine_specialization): For member templates, match also
271 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
273 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
275 2004-03-09 Mark Mitchell <mark@codesourcery.com>
278 * call.c (initialize_reference): Handle initializers that are
279 class-member access expressions applies to rvalues.
282 * name-lookup.c (supplement_binding): Ignore functions that are
283 marked DECL_ANTICIPATED.
285 2004-03-08 Mark Mitchell <mark@codesourcery.com>
288 * class.c (check_field_decls): Complain about non-static data
289 members of reference type in unions. Propagate
290 CLASSTYPE_REF_FIELDS_NEED_INIT and
291 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
293 * init.c (perform_member_init): Complain about mbmers with const
294 type that are not explicitly initialized.
296 2004-03-08 Jason Merrill <jason@redhat.com>
299 * decl.c (xref_tag): Remove attribute handling.
300 * cp-tree.h: Adjust prototype.
301 * decl.c, parser.c, rtti.c: Adjust callers.
302 * parser.c (cp_parser_class_head): Pass back attributes in the
304 (cp_parser_class_specifier): Adjust.
306 2004-03-08 Matt Austern <austern@apple.com>
309 * name-lookup.c (add_decl_to_level): Add extern variables, as well
310 as static, to static_decls array.
312 2004-03-01 Jason Merrill <jason@redhat.com>
315 * except.c (do_free_exception): Remove #if 0 wrapper.
316 (build_throw): Use it if we elide a copy into the
319 * tree.c (stabilize_call): Fix thinko.
321 * init.c (build_new_1): Preevaluate initializer. Simplify EH code.
322 (build_init): Call a constructor rather than call build_aggr_init
324 * except.c (stabilize_throw_expr): Remove.
325 (build_throw): Use stabilize_init instead of stabilize_throw_expr.
326 * tree.c (stabilize_call, stabilize_init): New fns.
327 * call.c (build_over_call): A constructor no longer returns the
328 address of the object.
330 2004-03-01 Mark Mitchell <mark@codesourcery.com>
333 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
334 having C++ linkage for name-mangling purposes.
337 * parser.c (cp_parser_direct_declarator): Recognize constructor
338 declarators that use a template-id to name the class being
342 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
343 (tsubst_expr): Do not call tsubst_copy, even when
344 processing_template_decl.
346 2004-03-01 Mark Mitchell <mark@codesourcery.com>
349 * pt.c (build_non_dependent_expr): Do not create a
350 NON_DEPENDENT_EXPR for a THROW_EXPR.
353 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
354 lookup if ordinary name-lookup finds a non-function.
355 * pt.c (tsubst_copy_and_build): Likewise.
358 * parser.c (cp_parser_late_parsing_default_args): Check that there
359 are no extra tokens after the end of the default-argument
363 Backport 2004-02-12 Mark Mitchell <mark@codesourcery.com>
364 * decl.c (redeclaration_error_message): Correct handling of
366 * pt.c (tsubst_friend_declaration): Adjust code to determine
367 whether or not a friend template is a definition.
368 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
370 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
373 * error.c (dump_expr): Handle THROW_EXPR.
375 2004-02-29 Mark Mitchell <mark@codesourcery.com>
378 * name-lookup.h (push_scope): Change prototype.
379 * name-lookup.c (push_scope): Do not reenter the current class
381 * decl.c (grokfndecl): Check return code from push_scope before
383 * decl2.c (check_classfn): Likewise.
384 * parser.c (cp_parser_conversion_function_id): Likewise.
385 (cp_parser_init_declarator): Likewise.
386 (cp_parser_direct_declarator): Likewise.
387 (cp_parser_class_specifier): Likewise.
388 (cp_parser_class_head): Likewise.
389 (cp_parser_lookup_name): Likewise.
390 (cp_parser_constructor_declarator_p): Likewise.
391 * pt.c (instantiate_class_template): Likewise.
392 (resolve_typename_type): Likewise.
394 2004-02-27 Mark Mitchell <mark@codesourcery.com>
397 * class.c (update_vtable_entry_for_fn): Do not go through
398 covariance machinery if the type returned by an overrider is the
399 same as the original.
401 2004-02-27 Giovanni Bajo <giovannibajo@gcc.gnu.org>
404 * pt.c (dependent_type_p_r): A template template parameter is a
407 2004-02-26 Mark Mitchell <mark@codesourcery.com>
410 * parser.c (cp_parser_parameter_declaration_list): Commit
411 to fewer tentative parses.
413 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
416 * mangle.c (write_template_arg_literal): Don't rely on identity for
419 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
422 * cvt.c (build_expr_type_conversion): Type must be complete before
423 looking up for conversions.
425 2004-02-20 Mark Mitchell <mark@codesourcery.com>
428 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
431 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
432 for all type variants.
434 2004-02-19 Mark Mitchell <mark@codesourcery.com>
437 * name-lookup.c (push_class_level_binding): Do not complain about
438 adding a binding for a member whose name is the same as the
439 enclosing class if the member is located in a base class of the
442 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
445 * parser.c (cp_parser_new_expression): Parse an ill-formed
446 direct-new-declarator after a parenthesized type-id to emit good
449 2004-02-17 Mark Mitchell <mark@codesourcery.com>
452 * cp-tree.h (abi_version_at_least): Remove.
453 * mangle.c: Include flags.h.
455 2004-02-15 Mark Mitchell <mark@codesourcery.com>
458 * call.c (build_conditional_expr): Handle conversions between
459 class types which result in differently cv-qualified type
463 * class.c (delete_duplicate_fields_1): Remove.
464 (delete_duplicate_fields): Likewise.
465 (finish_struct_anon): Remove check for members with the same name
466 as their enclosing class.
467 (check_field_decls): Do not call duplicate_fields.
468 * decl.c (grokdeclarator): Remove check for static data members
469 with the same name as their enclosing class.
470 * name-lookup.c (push_class_level_binding): Check for members with
471 the same name as their enclosing class.
473 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
476 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
478 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
481 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
482 has full set of arguments.
484 2004-02-13 Mark Mitchell <mark@codesourcery.com>
487 * cp-tree.h (delete_sanity): Change prototype.
488 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
489 Remove dead code. Adjust code to warn about deleting an array.
490 * typekc.c (decay_conversion): Use build_address and build_nop.
493 * search.c (accessible_p): Do not check access in thunks.
495 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
498 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
500 2004-02-13 Mark Mitchell <mark@codesourcery.com>
503 * call.c (build_conditional_expr): Call force_rvalue on the
504 non-void operand in the case that one result is a throw-expression
505 and the other is not.
507 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
510 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
511 the type name and look ahead for ::~, and bail out early with a
512 better error message if the parse is going to fail.
514 2004-02-10 Mark Mitchell <mark@codesourcery.com>
516 * typeck.c (lookup_destructor): Fix typo in error message.
518 2004-02-07 Zack Weinberg <zack@codesourcery.com>
521 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
522 * decl.c (duplicate_decls, start_function): Likewise.
524 2004-02-07 Zack Weinberg <zack@codesourcery.com>
526 * name-lookup.c (pushdecl): Issue shadow warnings directly.
527 * parser.c (free_parser_stacks): Delete.
529 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
531 * rtti.c, tree.c: Update copyright.
533 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
536 * decl.c (require_complete_types_for_parms): Do not insert
537 error_mark_node in the parameter list.
539 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
542 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
543 error when terminator can not be found.
545 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
547 Make-lang.in (po-generated): Delete.
549 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
553 2004-01-15 Geoffrey Keating <geoffk@apple.com>
555 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
556 (handle_pragma_implementation): Likewise.
558 2004-02-05 Mark Mitchell <mark@codesourcery.com>
561 * typeck.c (lookup_destructor): Tweak error message.
563 2004-02-05 Paul Brook <paul@codesourcery.com>
565 Backport from mainline.
567 2003-11-05 Mark Mitchell <mark@codesourcery.com>
569 * decl.c (cxx_push_function_context): Do not set
570 current_function_is_thunk.
571 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
574 2004-02-04 Mark Mitchell <mark@codesourcery.com>
577 * call.c (convert_like_real): Use "converting" rather than
578 "argument" as the descriptive keyword to
579 dubious_conversion_warnings.
580 * typeck.c (convert_for_assignment): Do not call
581 dubious_conversion_warnings.
583 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
586 * init.c (build_delete): Emit a more informative error message in
587 case of an incomplete type, and on the correct source line.
589 2004-02-04 Mark Mitchell <mark@codesourcery.com>
592 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
593 linkage for the typeinfo name string.
596 * cp-tree.h (fold_non_dependent_expr): New function.
597 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
598 (cp_parser_template_argument): Use fold_non_dependent_expr.
599 (cp_parser_direct_declarator): Likewise.
600 * pt.c (fold_non_dependent_expr): New function.
601 (convert_nontype_argument): Use it.
602 (tsubst_qualified_id): Simplify.
603 (tsubst_copy_and_build): Likewise.
605 2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
608 * pt.c (more_specialized_class): Increase processing_template_decl
609 while partial ordering.
611 2004-02-03 Mark Mitchell <mark@codesourcery.com>
614 * parser.c (cp_parser_class_name): Robustify.
617 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
619 2004-02-03 Mark Mitchell <mark@codesourcery.com>
622 * decl.c (start_function): Do not call pushdecl for any
623 instantiation or specialization of a primary template.
626 * semantics.c (finish_id_expression): Do not return an
627 IDENTIFIER_NODE when lookup finds a PARM_DECL.
630 * pt.c (build_non_dependent_expr): Do not build
631 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
634 * semantics.c (finish_id_expression): Do not return an
635 IDENTIFIER_NODE when lookup finds a VAR_DECL.
638 * parser.c (cp_parser_simple_declaration): When skipping to the
639 end of the statement swallow the terminating semicolon.
641 2004-02-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
645 * decl.c (grokdeclarator): Check immediatly type completeness for
648 2004-01-30 Mark Mitchell <mark@codesourcery.com>
651 * init.c (build_offset_ref): Improve error recovery for invalid
652 uses of non-static member functions.
655 * cp-tree.h (cp_build_type_attribute_variant): New function.
656 * class.c (build_clone): Use cp_build_type_attribute_variant.
657 * decl.c (duplicate_decls): Likewise.
658 * pt.c (copy_default_args_to_explicit_spec): Likewise.
659 (tsubst_function_type): Likewise.
660 * tree.c (build_exception_variant): Check attributes before
661 concluding that two types are the same.
662 (cp_build_type-attribute_variant): New method.
663 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
666 * call.c (convert_class_to_reference): Keep better track of
667 pedantically invalid user-defined conversions.
669 2004-02-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
672 * pt.c (tsubst_qualified_id): Improved error message when a type
673 is expected but not found.
675 2004-01-30 Michael Matz <matz@suse.de>
677 * parser.c (cp_parser_labeled_statement): Accept case ranges.
679 2004-01-28 Jan Hubicka <jh@suse.czi
681 * semantics.c (expand_body) Do emit_associated_thunks before
684 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
687 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
688 a sizeof expression.block
690 2004-01-29 Giovanni Bajo <giovannibajo@gcc.gnu.org>
692 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
693 template name as it was `<::' (digraph typo).
694 (cp_parser_nth_token_starts_template_argument_list_p): New function.
695 (cp_parser_id_expression): Use it.
696 (cp_parser_nested_name_specifier_opt): Likewise.
697 (cp_parser_template_name): Likewise.
698 (cp_parser_class_name): Likewise.
699 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
701 2004-01-29 Mark Mitchell <mark@codesourcery.com>
704 * mangle.c (write_encoding): Correct encoding of member template
707 2004-01-28 Mark Mitchell <mark@codesourcery.com>
710 * typeck.c (merge_types): Do not merge attributes into
713 2004-01-28 Mark Mitchell <mark@codesourcery.com>
716 * parser.c (cp_parser_direct_declarator): Do not prevent
717 backtracking inside a parenthesized declarator.
718 (cp_parser_parameter_declaration): Fix typo in comment.
720 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
722 * cp-tree.h (language_function, lang_type_header): Use
724 * name-lookup.h (cp_binding_level): Likewise.
726 2004-01-26 Mark Mitchell <mark@codesourcery.com>
729 * semantics.c (finish_for_expr): Check for unresolved overloaded
732 2004-01-26 Mark Mitchell <mark@codesourcery.com>
734 * class.c (add_method): Just check processing_template_decl to
735 determine whether or not we are within a template.
736 * decl2.c (maybe_retrofit_in_chrg): Likewise.
737 * init.c (decl_constant_value): Check the type of the declaration,
739 * name-lookup.c (maybe_push_to_top_level): Rename to ...
740 (push_to_top_level): ... this.
741 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
742 * pt.c (push_template_decl_real): Reorder condition for speed.
743 (convert_template_argument): Use dependency-checking functions in
744 place of uses_template_parms.
745 (lookup_template_class): Avoid calling uses_template_parms more
747 (uses_template_parms): Reimplement, using dependency-checking
749 (instantiate_class_template): Use push_to_top_level, not
750 maybe_push_to_top_level.
751 (type_unification_real): Simplify.
752 (type_dependent_expression_p): Handle OFFSET_REFs and
754 (any_dependent_template_arguments_p): Handle multiple levels of
756 * semantics.c (expand_or_defer_fn): Do not check
757 uses_template_parms for template instantiations.
758 * typeck.c (comptypes): Avoid calling cp_type_quals.
760 2004-01-25 Mark Mitchell <mark@codesourcery.com>
763 * call.c (build_over_call): Do not convert arguments when
764 processing a template.
765 * pt.c (build_non_dependent_expr): Do not build a
766 NON_DEPENDENT_EXPR for arithmetic constants.
768 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
771 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
772 returns a TYPE_DECL. no further lookup is required.
773 * semantics.c (check_template_template_default_arg): A TYPE_DECL
774 is invalid. Rework to give better diagnostics.
776 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
779 * pt.c (instantiate_class_template): Add an error_mark_node
781 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
783 2004-01-24 Kazu Hirata <kazu@cs.umass.edu>
785 * call.c: Update copyright.
788 * except.c: Likewise.
791 * mangle.c: Likewise.
792 * optimize.c: Likewise.
793 * typeck.c: Likewise.
794 * typeck2.c: Likewise.
796 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
799 * decl.c (finish_function): Move the call to
800 finish_fname_decls below the call to
801 finish_eh_spec_block.
803 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
805 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
807 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
809 * Make-lang.in: Replace $(docdir) with doc.
810 (c++.info, c++.srcinfo): Dummy entry.
811 (c++.man, c++.srcman): New rules.
812 (c++.install-man): Revamp rule.
814 2004-01-19 Kelley Cook <kcook@gcc.gnu.org>
816 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
817 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
818 immediate $(shell) instead of deferred backquote.
820 2004-01-19 Mark Mitchell <mark@codesourcery.com>
823 * parser.c (cp_parser_postfix_expression): When encountering
824 incomplete type on left-hand side of "->" or ".", treat the entire
825 expression as erroneous.
827 2004-01-19 Mark Mitchell <mark@codesourcery.com>
830 * call.c (build_field_call): Remove.
831 (n_build_method_call): Likewise.
832 (build_method_call): Likewise.
833 (build_new_method_call): Do not call build_field_call.
834 * class.c (n_build_method_call): Remove.
835 (print_class_statistics): Do not print it.
836 * cp-tree.h (build_method_call): Remove declaration.
837 (finish_object_call_expr): Likewise.
838 (build_new_1): Do not use build_method_call.
839 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
840 when the function appearing on the right-hand-side of "." or "->"
841 is not actually a function.
842 * pt.c (tsubst_copy_and_build): Likewise.
843 * semantics.c (finish_object_call_expr): Remove.
845 2004-01-18 Mark Mitchell <mark@codesourcery.com>
848 * pt.c (tsubst): Use finish_typeof.
850 2004-01-18 Jason Merrill <jason@redhat.com>
853 * except.c (build_throw): In a template, set
854 current_function_returns_abnormally.
856 2004-01-17 Fred Fish <fnf@intrinsity.com>
859 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
860 except don't call array_type_nelts() with a VECTOR_TYPE.
862 2004-01-16 Jan Hubicka <jh@suse.cz>
864 * mangle.c (write_mangled_name): Remove inline modifier.
866 2004-01-16 Mark Mitchell <mark@codesourcery.com>
869 * decl.c (compute_array_index_type): Fix grammar in comment.
870 * init.c (build_zero_init): Handle zero-sized arrays correctly.
873 * call.c (name_as_c_string): Print conversion operator names
877 * call.c (initialize_reference): Pass -1 for inner parameter to
880 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
883 * parser.c (cp_parser_base_specifier): Check for an invalid
884 keyword `typename' and emit an user-friendly error message.
886 2004-01-15 Geoffrey Keating <geoffk@apple.com>
889 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
890 (handle_pragma_implementation): Likewise.
892 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
895 * typeck.c (build_class_member_access_expr): Allow to access members
896 of the currently open class.
897 (finish_class_member_access_expr): Likewise.
899 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
902 * name-lookup.c (validate_nonmember_using_decl): Take scope and
903 name by value, instead of computing them.
904 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
905 arguments. Pass them to validate_nonmember_using_decl.
906 * name-lookup.h (do_local_using_decl): Adjust.
907 (do_toplevel_using_decl): Likewise.
908 * parser.c (cp_parser_using_declaration): Likewise.
909 * pt.c (tsubst_expr): Likewise.
911 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
915 * name-lookup.c (qualified_lookup_using_namespace): Search
916 strongly-associated namespaces first, and only then try other
919 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
921 * Make-lang.in (c++.srcextra): Dummy entry.
923 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
926 * parser.c (cp_parser_template_name): Don't try to parse a
927 conversion-function-id, as it cannot be a template-name.
928 (cp_parser_simple_type_specifier): Check for invalid template-ids
929 even after a built-in type.
931 2004-01-14 Jan Hubicka <jh@suse.cz>
934 * pt.c (instantiate_decl): Do not increase function_depth.
936 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
940 * parser.c (cp_parser_elaborated_type_specifier): Warn about
941 attributes and discard.
942 * decl.c (xref_tag): Don't overwite existing attributes with
945 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
948 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
949 is no destructor while looking up a BIT_NOT_EXPR.
951 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
953 * cxxfilt.c: Remove unused file.
955 2004-01-14 Jan Hubicka <jh@suse.cz>
957 Partial fix to PR c++/12850
958 * decl2.c (mark_used): Do not proactively instantiate templates
959 when compiling in unit-at-a-time or not optimizing.
960 * optimize.c (maybe_clone_body): Do not increase function depth.
962 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
965 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
967 2003-01-12 Steven Bosscher <stevenb@suse.de>
970 * parser.c (cp_parser_member_declaration): Any non-type is also
971 not a class or a function.
973 2004-01-12 Jason Merrill <jason@redhat.com>
976 * class.c (build_base_path): Do not mark vtable references as
978 (build_vtbl_ref_1): Likewise.
980 2004-01-12 Richard Henderson <rth@redhat.com>
983 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
984 (store_init_value): Use it.
985 * decl.c (check_initializer): Expect full initialization code
986 from store_init_value.
987 * init.c (expand_aggr_init_1): Likewise.
988 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
990 2004-01-12 Mark Mitchell <mark@codesourcery.com>
992 * class.c (layout_class_type): For non-POD class types, also copy
993 the DECL_SIZE and DECL_MODE of fields to the base class type.
995 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
998 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
999 calling regenerate_decl_from_template.
1001 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
1004 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
1005 decl-specifier occurring along with a class definition.
1007 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
1009 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
1010 clauses to comments describing declares_class_or_enum.
1011 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
1014 2004-01-12 Jan Hubicka <jh@suse.cz>
1016 * pt.c (for_each_template_parm): Do not check for duplicates.
1017 (for_each_template_parm): Use walk_tree duplicate checking code.
1019 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
1022 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
1023 is error_mark_node, don't add any more decl_specs.
1024 (cp_parser_init_declarator): After committing to a declaration, if
1025 the decl_specifiers start with error_mark_node, issue an error and
1026 change the type to "int".
1028 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
1031 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
1033 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1037 * pt.c (tsubst): Substitution must fail if we are attempting to
1038 create an array with element type that is an abstract class type.
1039 * decl.c (cp_finish_decl): Strip pointers and array types recursively
1040 before calling abstract_virtuals_error.
1042 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
1044 * name-lookup.c (qualified_lookup_using_namespace): Consider
1045 strong using directives even if we've already found a binding.
1047 2004-01-09 Mark Mitchell <mark@codesourcery.com>
1049 * cp-tree.h (cxx_expand_expr): Change prototype.
1050 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
1052 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1055 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
1056 looking into them recursively. They can be there because of the
1057 new __offsetof__ extension.
1059 2004-01-07 Zack Weinberg <zack@codesourcery.com>
1061 * parser.c (cp_parser_save_member_function_body): Mark the
1064 2004-01-05 Mark Mitchell <mark@codesourcery.com>
1067 * class.c (build_clone): Copy type attributes from the original
1068 function to the clone.
1071 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
1072 references as constant.
1075 * parser.c (cp_parser_explicit_instantiation): Improve error
1077 (cp_parser_require): Improve indication of the error location.
1080 * parser.c (cp_parser_class_head): Reorder logic to check for
1081 invalid qualification.
1083 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1086 * name-lookup.c (lookup_using_namespace): Remove spacesp
1088 (unqualified_namespace_lookup): Likewise.
1089 (lookup_qualified_name): Adjust accordingly.
1090 (lookup_name_real): Likewise.
1091 (lookup_arg_dependent): Do not eliminate the namespace of the
1092 functions found by unqualified name lookup unless that is the
1095 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
1097 * semantics.c (push_deferring_access_checks): Fix format.
1098 (resume_deferring_access_checks): Likewise.
1099 (stop_deferring_access_checks): Likewise.
1100 (pop_deferring_access_checks): Likewise.
1101 (get_deferred_access_checks): Likewise.
1102 (pop_to_parent_deferring_access_checks): Likewise.
1103 (perform_deferred_access_checks): Likewise.
1104 (perform_or_defer_access_check): Likewise.
1106 2004-01-04 Richard Henderson <rth@redhat.com>
1108 * call.c (build_over_call): Don't create a save_expr of an
1109 aggregate, but rather its address.
1111 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1114 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
1115 an offsetof expression.
1117 * parser.c (cp_parser_parameter_declaration): Fix comment.
1120 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
1121 (reference_binding): Set it when appropriate.
1122 (build_temp): New function, split out from ...
1123 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
1124 (initialize_reference): Likewise.
1127 * parser.c (cp_parser): Add in_type_id_in_expr_p.
1128 (cp_parser_new): Initialize it.
1129 (cp_parser_postfix_expression): Set it.
1130 (cp_parser_sizeof_operand): Likewise.
1131 (cp_parser_parameteR_declaration): Do not commit early to tenative
1132 parsers when in_type_id_in_expr_p is set.
1134 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1137 * parser.c (cp_parser_template_argument): Don't call
1138 make_unbound_class_template directly.
1139 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
1140 UNBOUND_CLASS_TEMPLATE tree node.
1142 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
1145 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
1147 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1150 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
1151 (DECL_FUNCTION_TEMPLATE_P): Use it.
1152 (DECL_CLASS_TEMPLATE_P): Likewise.
1153 * parser.c (cp_parser_lookup_name): Add is_template parameter.
1154 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
1155 (cp_parser_template_name): Likewise.
1156 (cp_parser_elaborated_type_specifier): Likewise.
1157 (cp_parser_namespace_name): Likewise.
1158 (cp_parser_class_name): Likewise.
1159 (cp_parser_lookup_name_simple): Likewise.
1161 See ChangeLog.3 for earlier changes.