1 2004-04-18 Release Manager
5 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
8 * method.c (make_alias_for_thunk): Just return function decl
9 for one_only functions if __CYGWIN__ or __MINGW32__
10 (use_thunk): Don't put function and thunk in same one_only
11 section if __CYGWIN__ or __MINGW32__.
13 2004-04-08 Jakub Jelinek <jakub@redhat.com>
15 * decl2.c (mark_used): Don't segfault if cfun != NULL but
16 current_function_decl == NULL.
18 2004-04-01 Mark Mitchell <mark@codesourcery.com>
21 * typeck.c (get_delta_difference): Call fold before returning the
24 2004-04-01 Richard Henderson <rth@redhat.com>
27 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
28 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
30 2004-04-01 Mark Mitchell <mark@codesourcery.com>
33 * name-lookup.c (maybe_push_cleanup_level): Robustify.
35 2004-03-30 Mark Mitchell <mark@codesourcery.com>
38 * decl.c (start_decl_1): Do not decide whether or not to create a
39 new cleanup level until after the type has been completed.
42 * pt.c (tsubst_default_argument): Clear current_function_decl.
44 2004-03-28 Jan Hubicka <jh@suse.cz>
47 * method.c (use_think): Do not mark thunk as referenced.
49 2004-03-21 Mark Mitchell <mark@codesourcery.com>
52 * decl.c (cp_finish_decl): Compute the size of arrays declared in
53 templates, if their type is non-dependent.
55 2004-03-19 Mark Mitchell <mark@codesourcery.com>
57 * call.c (build_op_delete_call): Do not forget the placement
58 arguments when iterating through mutiple delete operators.
60 * cp-tree.h (svaed_scope): Remove last_parms.
61 (NEW_DELETE_OPNAME_P): New macro.
62 (last_function_parms): Remove.
63 (do_friend): Adjust prototype.
64 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
65 using last_function_parms.
66 (grokfndecl): Take the PARM_DECLs as an argument, rather than
67 using last_function_parms.
68 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
69 for class-specific operator new and operator delete.
70 (grok_op_properties): Do not look for allocation functions with
72 (start_function): Use DECL_ARGUMENTS instead of
74 * decl.h (last_function_parms): Do not declare.
75 * decl2.c (grokclassfn): Do not use last_function_parms.
76 * friend.c (do_friend): Remove parmdecls parameter.
77 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
78 (pop_from_top_level): Do not restore it.
79 * pt.c (check_explicit_specialization): Do not adjust
82 * name-lookup.c (do_local_using_decl): Create a local binding for
83 types brought in via using declarations.
85 * name-lookup.c (lookup_arg_dependent): Handle block-scope
86 function declarations correctly.
88 * semantics.c (finish_id_expression): Correct handling of
89 conversion operators to dependent types.
91 * typeck.c (lookup_destructor): Allow the use of destructors from
94 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
97 * parser.c (cp_parser_functional_cast): A cast to anything
98 but integral or enumaration type is not an integral constant
100 * pt.c (value_dependent_expression_p): Handle cast expressions
101 without operands (such as "int()").
103 2004-03-18 Mark Mitchell <mark@codesourcery.com>
105 * semantics.c (finish_pseudo_destructor_expr): Allow differing
106 cv-qualification between the type named by the
107 pseudo-destructor-name and the object-type.
109 * search.c (accessible_base_p): Handle non-proper bases.
111 * name-lookup.c (do_nonmember_using_decl): If a using declaration
112 refers to a single overloaded function, set the type of the
114 * tree.c (lvalue_type): Simplify.
115 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
117 (build_unary_op): Handle OVERLOADs with known types.
119 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
122 * parser.c (cp_parser_postfix_expression): Handle the use of
123 "typename" in non-dependent contexts. Convert appropriately when
124 when using a qualified name after "->" or ".".
126 * call.c (conditional_conversion): Honor the requirement that some
127 conversions refer to the original object.
129 * call.c (build_conditional_expr): Do not call force_rvalue for
130 operands of void_type when the conditional expression itself has
132 * name-lookup.c (pushdecl): Don't consider a declaration of a
133 function named "main" to be an overload of a type named "main".
134 * parser.c (cp_parser_template_name): Perform name lookup when the
135 template name is proceeded by "template" if the qualifying scope
137 * typeck.c (composite_pointer_type_r): Correctly handle
138 pointer-to-member types.
139 (build_const_cast): Likewise.
141 2004-03-16 Mark Mitchell <mark@codesourcery.com>
144 * cp-tree.h (build_new_op): Change prototype.
145 (build_x_binary_op): Likewise.
146 * call.c (build_new_op): Add overloaded_p parameter.
147 * decl2.c (grok_array_decl): Adjust call to build_new_op.
148 * parser.c (cp_parser_binary_expression): Note that uses of
149 overloaded operators prevents an expression from being considered
150 an integral constant.
151 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
153 * semantics.c (finish_call_expr): Likewise.
154 * typeck.c (rationalize_conditional_expr): Likewise.
155 (build_x_indirect_ref): Likewise.
156 (build_x_binary_op): Likewise.
157 (build_x_unary_op): Likewise.
158 (build_x_compound_expr): Likewise.
159 (build_modify_expr): Likewise.
160 * typeck2.c (build_x_arrow): Likewise.
162 2004-03-13 Mark Mitchell <mark@codesourcery.com>
165 * parser.c (cp_parser_non_integral_constant_expression): Encode
166 more of the idiom that surrounded calls to this function within
168 (cp_parser_primary_expression): Adjust accordingly.
169 (cp_parser_postfix_expression): Likewise.
170 (cp_parser_unary_expression): Likewise.
171 (cp_parser_cast_expression): Likewise.
172 (cp_parser_assignment_expression): Likewise.
173 (cp_parser_expression): Likewise.
174 (cp_parser_new_expression): Note that new-expressions are not
175 allowed in integral constant expressions.
176 (cp_parser_delete_expression): Likewise.
178 2004-03-11 Mark Mitchell <mark@codesourcery.com>
181 * decl.c (xref_tag): Do not create dummy ENUMERAL_TYPEs.
183 2004-03-10 Mark Mitchell <mark@codesourcery.com>
186 * decl.c (xref_tag): Disregard non-type declarations when
187 looking up a tagged type.
189 2004-03-10 Jason Merrill <jason@redhat.com>
192 * tree.c (stabilize_init): Return whether or not it worked.
193 * init.c (build_new_1): If not, use a sentry.
194 * cp-tree.h: Adjust prototype.
196 2004-03-09 Nathan Sidwell <nathan@garibaldi.home>
199 * call.c (convert_like_real): Build a const qualified temporary,
200 when testing ctor access.
202 2004-03-09 Mark Mitchell <mark@codesourcery.com>
204 * call.c (initialize_reference): Fix typo.
206 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
209 * pt.c (determine_specialization): For member templates, match also
213 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
215 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
217 2004-03-09 Mark Mitchell <mark@codesourcery.com>
220 * call.c (initialize_reference): Handle initializers that are
221 class-member access expressions applies to rvalues.
224 * name-lookup.c (supplement_binding): Ignore functions that are
225 marked DECL_ANTICIPATED.
227 2004-03-08 Mark Mitchell <mark@codesourcery.com>
230 * class.c (check_field_decls): Complain about non-static data
231 members of reference type in unions. Propagate
232 CLASSTYPE_REF_FIELDS_NEED_INIT and
233 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
235 * init.c (perform_member_init): Complain about mbmers with const
236 type that are not explicitly initialized.
238 2004-03-08 Jason Merrill <jason@redhat.com>
241 * decl.c (xref_tag): Remove attribute handling.
242 * cp-tree.h: Adjust prototype.
243 * decl.c, parser.c, rtti.c: Adjust callers.
244 * parser.c (cp_parser_class_head): Pass back attributes in the
246 (cp_parser_class_specifier): Adjust.
248 2004-03-08 Matt Austern <austern@apple.com>
251 * name-lookup.c (add_decl_to_level): Add extern variables, as well
252 as static, to static_decls array.
254 2004-03-01 Jason Merrill <jason@redhat.com>
257 * except.c (do_free_exception): Remove #if 0 wrapper.
258 (build_throw): Use it if we elide a copy into the
261 * tree.c (stabilize_call): Fix thinko.
263 * init.c (build_new_1): Preevaluate initializer. Simplify EH code.
264 (build_init): Call a constructor rather than call build_aggr_init
266 * except.c (stabilize_throw_expr): Remove.
267 (build_throw): Use stabilize_init instead of stabilize_throw_expr.
268 * tree.c (stabilize_call, stabilize_init): New fns.
269 * call.c (build_over_call): A constructor no longer returns the
270 address of the object.
272 2004-03-01 Mark Mitchell <mark@codesourcery.com>
275 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
276 having C++ linkage for name-mangling purposes.
279 * parser.c (cp_parser_direct_declarator): Recognize constructor
280 declarators that use a template-id to name the class being
284 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
285 (tsubst_expr): Do not call tsubst_copy, even when
286 processing_template_decl.
288 2004-03-01 Mark Mitchell <mark@codesourcery.com>
291 * pt.c (build_non_dependent_expr): Do not create a
292 NON_DEPENDENT_EXPR for a THROW_EXPR.
295 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
296 lookup if ordinary name-lookup finds a non-function.
297 * pt.c (tsubst_copy_and_build): Likewise.
300 * parser.c (cp_parser_late_parsing_default_args): Check that there
301 are no extra tokens after the end of the default-argument
305 Backport 2004-02-12 Mark Mitchell <mark@codesourcery.com>
306 * decl.c (redeclaration_error_message): Correct handling of
308 * pt.c (tsubst_friend_declaration): Adjust code to determine
309 whether or not a friend template is a definition.
310 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
312 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
315 * error.c (dump_expr): Handle THROW_EXPR.
317 2004-02-29 Mark Mitchell <mark@codesourcery.com>
320 * name-lookup.h (push_scope): Change prototype.
321 * name-lookup.c (push_scope): Do not reenter the current class
323 * decl.c (grokfndecl): Check return code from push_scope before
325 * decl2.c (check_classfn): Likewise.
326 * parser.c (cp_parser_conversion_function_id): Likewise.
327 (cp_parser_init_declarator): Likewise.
328 (cp_parser_direct_declarator): Likewise.
329 (cp_parser_class_specifier): Likewise.
330 (cp_parser_class_head): Likewise.
331 (cp_parser_lookup_name): Likewise.
332 (cp_parser_constructor_declarator_p): Likewise.
333 * pt.c (instantiate_class_template): Likewise.
334 (resolve_typename_type): Likewise.
336 2004-02-27 Mark Mitchell <mark@codesourcery.com>
339 * class.c (update_vtable_entry_for_fn): Do not go through
340 covariance machinery if the type returned by an overrider is the
341 same as the original.
343 2004-02-27 Giovanni Bajo <giovannibajo@gcc.gnu.org>
346 * pt.c (dependent_type_p_r): A template template parameter is a
349 2004-02-26 Mark Mitchell <mark@codesourcery.com>
352 * parser.c (cp_parser_parameter_declaration_list): Commit
353 to fewer tentative parses.
355 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
358 * mangle.c (write_template_arg_literal): Don't rely on identity for
361 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
364 * cvt.c (build_expr_type_conversion): Type must be complete before
365 looking up for conversions.
367 2004-02-20 Mark Mitchell <mark@codesourcery.com>
370 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
373 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
374 for all type variants.
376 2004-02-19 Mark Mitchell <mark@codesourcery.com>
379 * name-lookup.c (push_class_level_binding): Do not complain about
380 adding a binding for a member whose name is the same as the
381 enclosing class if the member is located in a base class of the
384 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
387 * parser.c (cp_parser_new_expression): Parse an ill-formed
388 direct-new-declarator after a parenthesized type-id to emit good
391 2004-02-17 Mark Mitchell <mark@codesourcery.com>
394 * cp-tree.h (abi_version_at_least): Remove.
395 * mangle.c: Include flags.h.
397 2004-02-15 Mark Mitchell <mark@codesourcery.com>
400 * call.c (build_conditional_expr): Handle conversions between
401 class types which result in differently cv-qualified type
405 * class.c (delete_duplicate_fields_1): Remove.
406 (delete_duplicate_fields): Likewise.
407 (finish_struct_anon): Remove check for members with the same name
408 as their enclosing class.
409 (check_field_decls): Do not call duplicate_fields.
410 * decl.c (grokdeclarator): Remove check for static data members
411 with the same name as their enclosing class.
412 * name-lookup.c (push_class_level_binding): Check for members with
413 the same name as their enclosing class.
415 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
418 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
420 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
423 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
424 has full set of arguments.
426 2004-02-13 Mark Mitchell <mark@codesourcery.com>
429 * cp-tree.h (delete_sanity): Change prototype.
430 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
431 Remove dead code. Adjust code to warn about deleting an array.
432 * typekc.c (decay_conversion): Use build_address and build_nop.
435 * search.c (accessible_p): Do not check access in thunks.
437 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
440 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
442 2004-02-13 Mark Mitchell <mark@codesourcery.com>
445 * call.c (build_conditional_expr): Call force_rvalue on the
446 non-void operand in the case that one result is a throw-expression
447 and the other is not.
449 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
452 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
453 the type name and look ahead for ::~, and bail out early with a
454 better error message if the parse is going to fail.
456 2004-02-10 Mark Mitchell <mark@codesourcery.com>
458 * typeck.c (lookup_destructor): Fix typo in error message.
460 2004-02-07 Zack Weinberg <zack@codesourcery.com>
463 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
464 * decl.c (duplicate_decls, start_function): Likewise.
466 2004-02-07 Zack Weinberg <zack@codesourcery.com>
468 * name-lookup.c (pushdecl): Issue shadow warnings directly.
469 * parser.c (free_parser_stacks): Delete.
471 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
473 * rtti.c, tree.c: Update copyright.
475 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
478 * decl.c (require_complete_types_for_parms): Do not insert
479 error_mark_node in the parameter list.
481 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
484 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
485 error when terminator can not be found.
487 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
489 Make-lang.in (po-generated): Delete.
491 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
495 2004-01-15 Geoffrey Keating <geoffk@apple.com>
497 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
498 (handle_pragma_implementation): Likewise.
500 2004-02-05 Mark Mitchell <mark@codesourcery.com>
503 * typeck.c (lookup_destructor): Tweak error message.
505 2004-02-05 Paul Brook <paul@codesourcery.com>
507 Backport from mainline.
509 2003-11-05 Mark Mitchell <mark@codesourcery.com>
511 * decl.c (cxx_push_function_context): Do not set
512 current_function_is_thunk.
513 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
516 2004-02-04 Mark Mitchell <mark@codesourcery.com>
519 * call.c (convert_like_real): Use "converting" rather than
520 "argument" as the descriptive keyword to
521 dubious_conversion_warnings.
522 * typeck.c (convert_for_assignment): Do not call
523 dubious_conversion_warnings.
525 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
528 * init.c (build_delete): Emit a more informative error message in
529 case of an incomplete type, and on the correct source line.
531 2004-02-04 Mark Mitchell <mark@codesourcery.com>
534 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
535 linkage for the typeinfo name string.
538 * cp-tree.h (fold_non_dependent_expr): New function.
539 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
540 (cp_parser_template_argument): Use fold_non_dependent_expr.
541 (cp_parser_direct_declarator): Likewise.
542 * pt.c (fold_non_dependent_expr): New function.
543 (convert_nontype_argument): Use it.
544 (tsubst_qualified_id): Simplify.
545 (tsubst_copy_and_build): Likewise.
547 2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
550 * pt.c (more_specialized_class): Increase processing_template_decl
551 while partial ordering.
553 2004-02-03 Mark Mitchell <mark@codesourcery.com>
556 * parser.c (cp_parser_class_name): Robustify.
559 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
561 2004-02-03 Mark Mitchell <mark@codesourcery.com>
564 * decl.c (start_function): Do not call pushdecl for any
565 instantiation or specialization of a primary template.
568 * semantics.c (finish_id_expression): Do not return an
569 IDENTIFIER_NODE when lookup finds a PARM_DECL.
572 * pt.c (build_non_dependent_expr): Do not build
573 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
576 * semantics.c (finish_id_expression): Do not return an
577 IDENTIFIER_NODE when lookup finds a VAR_DECL.
580 * parser.c (cp_parser_simple_declaration): When skipping to the
581 end of the statement swallow the terminating semicolon.
583 2004-02-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
587 * decl.c (grokdeclarator): Check immediatly type completeness for
590 2004-01-30 Mark Mitchell <mark@codesourcery.com>
593 * init.c (build_offset_ref): Improve error recovery for invalid
594 uses of non-static member functions.
597 * cp-tree.h (cp_build_type_attribute_variant): New function.
598 * class.c (build_clone): Use cp_build_type_attribute_variant.
599 * decl.c (duplicate_decls): Likewise.
600 * pt.c (copy_default_args_to_explicit_spec): Likewise.
601 (tsubst_function_type): Likewise.
602 * tree.c (build_exception_variant): Check attributes before
603 concluding that two types are the same.
604 (cp_build_type-attribute_variant): New method.
605 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
608 * call.c (convert_class_to_reference): Keep better track of
609 pedantically invalid user-defined conversions.
611 2004-02-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
614 * pt.c (tsubst_qualified_id): Improved error message when a type
615 is expected but not found.
617 2004-01-30 Michael Matz <matz@suse.de>
619 * parser.c (cp_parser_labeled_statement): Accept case ranges.
621 2004-01-28 Jan Hubicka <jh@suse.czi
623 * semantics.c (expand_body) Do emit_associated_thunks before
626 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
629 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
630 a sizeof expression.block
632 2004-01-29 Giovanni Bajo <giovannibajo@gcc.gnu.org>
634 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
635 template name as it was `<::' (digraph typo).
636 (cp_parser_nth_token_starts_template_argument_list_p): New function.
637 (cp_parser_id_expression): Use it.
638 (cp_parser_nested_name_specifier_opt): Likewise.
639 (cp_parser_template_name): Likewise.
640 (cp_parser_class_name): Likewise.
641 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
643 2004-01-29 Mark Mitchell <mark@codesourcery.com>
646 * mangle.c (write_encoding): Correct encoding of member template
649 2004-01-28 Mark Mitchell <mark@codesourcery.com>
652 * typeck.c (merge_types): Do not merge attributes into
655 2004-01-28 Mark Mitchell <mark@codesourcery.com>
658 * parser.c (cp_parser_direct_declarator): Do not prevent
659 backtracking inside a parenthesized declarator.
660 (cp_parser_parameter_declaration): Fix typo in comment.
662 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
664 * cp-tree.h (language_function, lang_type_header): Use
666 * name-lookup.h (cp_binding_level): Likewise.
668 2004-01-26 Mark Mitchell <mark@codesourcery.com>
671 * semantics.c (finish_for_expr): Check for unresolved overloaded
674 2004-01-26 Mark Mitchell <mark@codesourcery.com>
676 * class.c (add_method): Just check processing_template_decl to
677 determine whether or not we are within a template.
678 * decl2.c (maybe_retrofit_in_chrg): Likewise.
679 * init.c (decl_constant_value): Check the type of the declaration,
681 * name-lookup.c (maybe_push_to_top_level): Rename to ...
682 (push_to_top_level): ... this.
683 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
684 * pt.c (push_template_decl_real): Reorder condition for speed.
685 (convert_template_argument): Use dependency-checking functions in
686 place of uses_template_parms.
687 (lookup_template_class): Avoid calling uses_template_parms more
689 (uses_template_parms): Reimplement, using dependency-checking
691 (instantiate_class_template): Use push_to_top_level, not
692 maybe_push_to_top_level.
693 (type_unification_real): Simplify.
694 (type_dependent_expression_p): Handle OFFSET_REFs and
696 (any_dependent_template_arguments_p): Handle multiple levels of
698 * semantics.c (expand_or_defer_fn): Do not check
699 uses_template_parms for template instantiations.
700 * typeck.c (comptypes): Avoid calling cp_type_quals.
702 2004-01-25 Mark Mitchell <mark@codesourcery.com>
705 * call.c (build_over_call): Do not convert arguments when
706 processing a template.
707 * pt.c (build_non_dependent_expr): Do not build a
708 NON_DEPENDENT_EXPR for arithmetic constants.
710 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
713 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
714 returns a TYPE_DECL. no further lookup is required.
715 * semantics.c (check_template_template_default_arg): A TYPE_DECL
716 is invalid. Rework to give better diagnostics.
718 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
721 * pt.c (instantiate_class_template): Add an error_mark_node
723 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
725 2004-01-24 Kazu Hirata <kazu@cs.umass.edu>
727 * call.c: Update copyright.
730 * except.c: Likewise.
733 * mangle.c: Likewise.
734 * optimize.c: Likewise.
735 * typeck.c: Likewise.
736 * typeck2.c: Likewise.
738 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
741 * decl.c (finish_function): Move the call to
742 finish_fname_decls below the call to
743 finish_eh_spec_block.
745 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
747 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
749 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
751 * Make-lang.in: Replace $(docdir) with doc.
752 (c++.info, c++.srcinfo): Dummy entry.
753 (c++.man, c++.srcman): New rules.
754 (c++.install-man): Revamp rule.
756 2004-01-19 Kelley Cook <kcook@gcc.gnu.org>
758 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
759 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
760 immediate $(shell) instead of deferred backquote.
762 2004-01-19 Mark Mitchell <mark@codesourcery.com>
765 * parser.c (cp_parser_postfix_expression): When encountering
766 incomplete type on left-hand side of "->" or ".", treat the entire
767 expression as erroneous.
769 2004-01-19 Mark Mitchell <mark@codesourcery.com>
772 * call.c (build_field_call): Remove.
773 (n_build_method_call): Likewise.
774 (build_method_call): Likewise.
775 (build_new_method_call): Do not call build_field_call.
776 * class.c (n_build_method_call): Remove.
777 (print_class_statistics): Do not print it.
778 * cp-tree.h (build_method_call): Remove declaration.
779 (finish_object_call_expr): Likewise.
780 (build_new_1): Do not use build_method_call.
781 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
782 when the function appearing on the right-hand-side of "." or "->"
783 is not actually a function.
784 * pt.c (tsubst_copy_and_build): Likewise.
785 * semantics.c (finish_object_call_expr): Remove.
787 2004-01-18 Mark Mitchell <mark@codesourcery.com>
790 * pt.c (tsubst): Use finish_typeof.
792 2004-01-18 Jason Merrill <jason@redhat.com>
795 * except.c (build_throw): In a template, set
796 current_function_returns_abnormally.
798 2004-01-17 Fred Fish <fnf@intrinsity.com>
801 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
802 except don't call array_type_nelts() with a VECTOR_TYPE.
804 2004-01-16 Jan Hubicka <jh@suse.cz>
806 * mangle.c (write_mangled_name): Remove inline modifier.
808 2004-01-16 Mark Mitchell <mark@codesourcery.com>
811 * decl.c (compute_array_index_type): Fix grammar in comment.
812 * init.c (build_zero_init): Handle zero-sized arrays correctly.
815 * call.c (name_as_c_string): Print conversion operator names
819 * call.c (initialize_reference): Pass -1 for inner parameter to
822 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
825 * parser.c (cp_parser_base_specifier): Check for an invalid
826 keyword `typename' and emit an user-friendly error message.
828 2004-01-15 Geoffrey Keating <geoffk@apple.com>
831 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
832 (handle_pragma_implementation): Likewise.
834 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
837 * typeck.c (build_class_member_access_expr): Allow to access members
838 of the currently open class.
839 (finish_class_member_access_expr): Likewise.
841 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
844 * name-lookup.c (validate_nonmember_using_decl): Take scope and
845 name by value, instead of computing them.
846 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
847 arguments. Pass them to validate_nonmember_using_decl.
848 * name-lookup.h (do_local_using_decl): Adjust.
849 (do_toplevel_using_decl): Likewise.
850 * parser.c (cp_parser_using_declaration): Likewise.
851 * pt.c (tsubst_expr): Likewise.
853 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
857 * name-lookup.c (qualified_lookup_using_namespace): Search
858 strongly-associated namespaces first, and only then try other
861 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
863 * Make-lang.in (c++.srcextra): Dummy entry.
865 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
868 * parser.c (cp_parser_template_name): Don't try to parse a
869 conversion-function-id, as it cannot be a template-name.
870 (cp_parser_simple_type_specifier): Check for invalid template-ids
871 even after a built-in type.
873 2004-01-14 Jan Hubicka <jh@suse.cz>
876 * pt.c (instantiate_decl): Do not increase function_depth.
878 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
882 * parser.c (cp_parser_elaborated_type_specifier): Warn about
883 attributes and discard.
884 * decl.c (xref_tag): Don't overwite existing attributes with
887 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
890 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
891 is no destructor while looking up a BIT_NOT_EXPR.
893 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
895 * cxxfilt.c: Remove unused file.
897 2004-01-14 Jan Hubicka <jh@suse.cz>
899 Partial fix to PR c++/12850
900 * decl2.c (mark_used): Do not proactively instantiate templates
901 when compiling in unit-at-a-time or not optimizing.
902 * optimize.c (maybe_clone_body): Do not increase function depth.
904 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
907 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
909 2003-01-12 Steven Bosscher <stevenb@suse.de>
912 * parser.c (cp_parser_member_declaration): Any non-type is also
913 not a class or a function.
915 2004-01-12 Jason Merrill <jason@redhat.com>
918 * class.c (build_base_path): Do not mark vtable references as
920 (build_vtbl_ref_1): Likewise.
922 2004-01-12 Richard Henderson <rth@redhat.com>
925 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
926 (store_init_value): Use it.
927 * decl.c (check_initializer): Expect full initialization code
928 from store_init_value.
929 * init.c (expand_aggr_init_1): Likewise.
930 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
932 2004-01-12 Mark Mitchell <mark@codesourcery.com>
934 * class.c (layout_class_type): For non-POD class types, also copy
935 the DECL_SIZE and DECL_MODE of fields to the base class type.
937 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
940 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
941 calling regenerate_decl_from_template.
943 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
946 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
947 decl-specifier occurring along with a class definition.
949 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
951 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
952 clauses to comments describing declares_class_or_enum.
953 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
956 2004-01-12 Jan Hubicka <jh@suse.cz>
958 * pt.c (for_each_template_parm): Do not check for duplicates.
959 (for_each_template_parm): Use walk_tree duplicate checking code.
961 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
964 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
965 is error_mark_node, don't add any more decl_specs.
966 (cp_parser_init_declarator): After committing to a declaration, if
967 the decl_specifiers start with error_mark_node, issue an error and
968 change the type to "int".
970 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
973 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
975 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
979 * pt.c (tsubst): Substitution must fail if we are attempting to
980 create an array with element type that is an abstract class type.
981 * decl.c (cp_finish_decl): Strip pointers and array types recursively
982 before calling abstract_virtuals_error.
984 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
986 * name-lookup.c (qualified_lookup_using_namespace): Consider
987 strong using directives even if we've already found a binding.
989 2004-01-09 Mark Mitchell <mark@codesourcery.com>
991 * cp-tree.h (cxx_expand_expr): Change prototype.
992 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
994 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
997 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
998 looking into them recursively. They can be there because of the
999 new __offsetof__ extension.
1001 2004-01-07 Zack Weinberg <zack@codesourcery.com>
1003 * parser.c (cp_parser_save_member_function_body): Mark the
1006 2004-01-05 Mark Mitchell <mark@codesourcery.com>
1009 * class.c (build_clone): Copy type attributes from the original
1010 function to the clone.
1013 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
1014 references as constant.
1017 * parser.c (cp_parser_explicit_instantiation): Improve error
1019 (cp_parser_require): Improve indication of the error location.
1022 * parser.c (cp_parser_class_head): Reorder logic to check for
1023 invalid qualification.
1025 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1028 * name-lookup.c (lookup_using_namespace): Remove spacesp
1030 (unqualified_namespace_lookup): Likewise.
1031 (lookup_qualified_name): Adjust accordingly.
1032 (lookup_name_real): Likewise.
1033 (lookup_arg_dependent): Do not eliminate the namespace of the
1034 functions found by unqualified name lookup unless that is the
1037 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
1039 * semantics.c (push_deferring_access_checks): Fix format.
1040 (resume_deferring_access_checks): Likewise.
1041 (stop_deferring_access_checks): Likewise.
1042 (pop_deferring_access_checks): Likewise.
1043 (get_deferred_access_checks): Likewise.
1044 (pop_to_parent_deferring_access_checks): Likewise.
1045 (perform_deferred_access_checks): Likewise.
1046 (perform_or_defer_access_check): Likewise.
1048 2004-01-04 Richard Henderson <rth@redhat.com>
1050 * call.c (build_over_call): Don't create a save_expr of an
1051 aggregate, but rather its address.
1053 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1056 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
1057 an offsetof expression.
1059 * parser.c (cp_parser_parameter_declaration): Fix comment.
1062 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
1063 (reference_binding): Set it when appropriate.
1064 (build_temp): New function, split out from ...
1065 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
1066 (initialize_reference): Likewise.
1069 * parser.c (cp_parser): Add in_type_id_in_expr_p.
1070 (cp_parser_new): Initialize it.
1071 (cp_parser_postfix_expression): Set it.
1072 (cp_parser_sizeof_operand): Likewise.
1073 (cp_parser_parameteR_declaration): Do not commit early to tenative
1074 parsers when in_type_id_in_expr_p is set.
1076 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1079 * parser.c (cp_parser_template_argument): Don't call
1080 make_unbound_class_template directly.
1081 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
1082 UNBOUND_CLASS_TEMPLATE tree node.
1084 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
1087 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
1089 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1092 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
1093 (DECL_FUNCTION_TEMPLATE_P): Use it.
1094 (DECL_CLASS_TEMPLATE_P): Likewise.
1095 * parser.c (cp_parser_lookup_name): Add is_template parameter.
1096 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
1097 (cp_parser_template_name): Likewise.
1098 (cp_parser_elaborated_type_specifier): Likewise.
1099 (cp_parser_namespace_name): Likewise.
1100 (cp_parser_class_name): Likewise.
1101 (cp_parser_lookup_name_simple): Likewise.
1103 See ChangeLog.3 for earlier changes.