1 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
4 * method.c (make_alias_for_thunk): Just return function decl
5 for one_only functions if __CYGWIN__ or __MINGW32__
6 (use_thunk): Don't put function and thunk in same one_only
7 section if __CYGWIN__ or __MINGW32__.
9 2004-04-08 Jakub Jelinek <jakub@redhat.com>
11 * decl2.c (mark_used): Don't segfault if cfun != NULL but
12 current_function_decl == NULL.
14 2004-04-01 Mark Mitchell <mark@codesourcery.com>
17 * typeck.c (get_delta_difference): Call fold before returning the
20 2004-04-01 Richard Henderson <rth@redhat.com>
23 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
24 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
26 2004-04-01 Mark Mitchell <mark@codesourcery.com>
29 * name-lookup.c (maybe_push_cleanup_level): Robustify.
31 2004-03-30 Mark Mitchell <mark@codesourcery.com>
34 * decl.c (start_decl_1): Do not decide whether or not to create a
35 new cleanup level until after the type has been completed.
38 * pt.c (tsubst_default_argument): Clear current_function_decl.
40 2004-03-28 Jan Hubicka <jh@suse.cz>
43 * method.c (use_think): Do not mark thunk as referenced.
45 2004-03-21 Mark Mitchell <mark@codesourcery.com>
48 * decl.c (cp_finish_decl): Compute the size of arrays declared in
49 templates, if their type is non-dependent.
51 2004-03-19 Mark Mitchell <mark@codesourcery.com>
53 * call.c (build_op_delete_call): Do not forget the placement
54 arguments when iterating through mutiple delete operators.
56 * cp-tree.h (svaed_scope): Remove last_parms.
57 (NEW_DELETE_OPNAME_P): New macro.
58 (last_function_parms): Remove.
59 (do_friend): Adjust prototype.
60 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
61 using last_function_parms.
62 (grokfndecl): Take the PARM_DECLs as an argument, rather than
63 using last_function_parms.
64 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
65 for class-specific operator new and operator delete.
66 (grok_op_properties): Do not look for allocation functions with
68 (start_function): Use DECL_ARGUMENTS instead of
70 * decl.h (last_function_parms): Do not declare.
71 * decl2.c (grokclassfn): Do not use last_function_parms.
72 * friend.c (do_friend): Remove parmdecls parameter.
73 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
74 (pop_from_top_level): Do not restore it.
75 * pt.c (check_explicit_specialization): Do not adjust
78 * name-lookup.c (do_local_using_decl): Create a local binding for
79 types brought in via using declarations.
81 * name-lookup.c (lookup_arg_dependent): Handle block-scope
82 function declarations correctly.
84 * semantics.c (finish_id_expression): Correct handling of
85 conversion operators to dependent types.
87 * typeck.c (lookup_destructor): Allow the use of destructors from
90 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
93 * parser.c (cp_parser_functional_cast): A cast to anything
94 but integral or enumaration type is not an integral constant
96 * pt.c (value_dependent_expression_p): Handle cast expressions
97 without operands (such as "int()").
99 2004-03-18 Mark Mitchell <mark@codesourcery.com>
101 * semantics.c (finish_pseudo_destructor_expr): Allow differing
102 cv-qualification between the type named by the
103 pseudo-destructor-name and the object-type.
105 * search.c (accessible_base_p): Handle non-proper bases.
107 * name-lookup.c (do_nonmember_using_decl): If a using declaration
108 refers to a single overloaded function, set the type of the
110 * tree.c (lvalue_type): Simplify.
111 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
113 (build_unary_op): Handle OVERLOADs with known types.
115 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
118 * parser.c (cp_parser_postfix_expression): Handle the use of
119 "typename" in non-dependent contexts. Convert appropriately when
120 when using a qualified name after "->" or ".".
122 * call.c (conditional_conversion): Honor the requirement that some
123 conversions refer to the original object.
125 * call.c (build_conditional_expr): Do not call force_rvalue for
126 operands of void_type when the conditional expression itself has
128 * name-lookup.c (pushdecl): Don't consider a declaration of a
129 function named "main" to be an overload of a type named "main".
130 * parser.c (cp_parser_template_name): Perform name lookup when the
131 template name is proceeded by "template" if the qualifying scope
133 * typeck.c (composite_pointer_type_r): Correctly handle
134 pointer-to-member types.
135 (build_const_cast): Likewise.
137 2004-03-16 Mark Mitchell <mark@codesourcery.com>
140 * cp-tree.h (build_new_op): Change prototype.
141 (build_x_binary_op): Likewise.
142 * call.c (build_new_op): Add overloaded_p parameter.
143 * decl2.c (grok_array_decl): Adjust call to build_new_op.
144 * parser.c (cp_parser_binary_expression): Note that uses of
145 overloaded operators prevents an expression from being considered
146 an integral constant.
147 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
149 * semantics.c (finish_call_expr): Likewise.
150 * typeck.c (rationalize_conditional_expr): Likewise.
151 (build_x_indirect_ref): Likewise.
152 (build_x_binary_op): Likewise.
153 (build_x_unary_op): Likewise.
154 (build_x_compound_expr): Likewise.
155 (build_modify_expr): Likewise.
156 * typeck2.c (build_x_arrow): Likewise.
158 2004-03-13 Mark Mitchell <mark@codesourcery.com>
161 * parser.c (cp_parser_non_integral_constant_expression): Encode
162 more of the idiom that surrounded calls to this function within
164 (cp_parser_primary_expression): Adjust accordingly.
165 (cp_parser_postfix_expression): Likewise.
166 (cp_parser_unary_expression): Likewise.
167 (cp_parser_cast_expression): Likewise.
168 (cp_parser_assignment_expression): Likewise.
169 (cp_parser_expression): Likewise.
170 (cp_parser_new_expression): Note that new-expressions are not
171 allowed in integral constant expressions.
172 (cp_parser_delete_expression): Likewise.
174 2004-03-11 Mark Mitchell <mark@codesourcery.com>
177 * decl.c (xref_tag): Do not create dummy ENUMERAL_TYPEs.
179 2004-03-10 Mark Mitchell <mark@codesourcery.com>
182 * decl.c (xref_tag): Disregard non-type declarations when
183 looking up a tagged type.
185 2004-03-10 Jason Merrill <jason@redhat.com>
188 * tree.c (stabilize_init): Return whether or not it worked.
189 * init.c (build_new_1): If not, use a sentry.
190 * cp-tree.h: Adjust prototype.
192 2004-03-09 Nathan Sidwell <nathan@garibaldi.home>
195 * call.c (convert_like_real): Build a const qualified temporary,
196 when testing ctor access.
198 2004-03-09 Mark Mitchell <mark@codesourcery.com>
200 * call.c (initialize_reference): Fix typo.
202 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
205 * pt.c (determine_specialization): For member templates, match also
209 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
211 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
213 2004-03-09 Mark Mitchell <mark@codesourcery.com>
216 * call.c (initialize_reference): Handle initializers that are
217 class-member access expressions applies to rvalues.
220 * name-lookup.c (supplement_binding): Ignore functions that are
221 marked DECL_ANTICIPATED.
223 2004-03-08 Mark Mitchell <mark@codesourcery.com>
226 * class.c (check_field_decls): Complain about non-static data
227 members of reference type in unions. Propagate
228 CLASSTYPE_REF_FIELDS_NEED_INIT and
229 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
231 * init.c (perform_member_init): Complain about mbmers with const
232 type that are not explicitly initialized.
234 2004-03-08 Jason Merrill <jason@redhat.com>
237 * decl.c (xref_tag): Remove attribute handling.
238 * cp-tree.h: Adjust prototype.
239 * decl.c, parser.c, rtti.c: Adjust callers.
240 * parser.c (cp_parser_class_head): Pass back attributes in the
242 (cp_parser_class_specifier): Adjust.
244 2004-03-08 Matt Austern <austern@apple.com>
247 * name-lookup.c (add_decl_to_level): Add extern variables, as well
248 as static, to static_decls array.
250 2004-03-01 Jason Merrill <jason@redhat.com>
253 * except.c (do_free_exception): Remove #if 0 wrapper.
254 (build_throw): Use it if we elide a copy into the
257 * tree.c (stabilize_call): Fix thinko.
259 * init.c (build_new_1): Preevaluate initializer. Simplify EH code.
260 (build_init): Call a constructor rather than call build_aggr_init
262 * except.c (stabilize_throw_expr): Remove.
263 (build_throw): Use stabilize_init instead of stabilize_throw_expr.
264 * tree.c (stabilize_call, stabilize_init): New fns.
265 * call.c (build_over_call): A constructor no longer returns the
266 address of the object.
268 2004-03-01 Mark Mitchell <mark@codesourcery.com>
271 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
272 having C++ linkage for name-mangling purposes.
275 * parser.c (cp_parser_direct_declarator): Recognize constructor
276 declarators that use a template-id to name the class being
280 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
281 (tsubst_expr): Do not call tsubst_copy, even when
282 processing_template_decl.
284 2004-03-01 Mark Mitchell <mark@codesourcery.com>
287 * pt.c (build_non_dependent_expr): Do not create a
288 NON_DEPENDENT_EXPR for a THROW_EXPR.
291 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
292 lookup if ordinary name-lookup finds a non-function.
293 * pt.c (tsubst_copy_and_build): Likewise.
296 * parser.c (cp_parser_late_parsing_default_args): Check that there
297 are no extra tokens after the end of the default-argument
301 Backport 2004-02-12 Mark Mitchell <mark@codesourcery.com>
302 * decl.c (redeclaration_error_message): Correct handling of
304 * pt.c (tsubst_friend_declaration): Adjust code to determine
305 whether or not a friend template is a definition.
306 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
308 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
311 * error.c (dump_expr): Handle THROW_EXPR.
313 2004-02-29 Mark Mitchell <mark@codesourcery.com>
316 * name-lookup.h (push_scope): Change prototype.
317 * name-lookup.c (push_scope): Do not reenter the current class
319 * decl.c (grokfndecl): Check return code from push_scope before
321 * decl2.c (check_classfn): Likewise.
322 * parser.c (cp_parser_conversion_function_id): Likewise.
323 (cp_parser_init_declarator): Likewise.
324 (cp_parser_direct_declarator): Likewise.
325 (cp_parser_class_specifier): Likewise.
326 (cp_parser_class_head): Likewise.
327 (cp_parser_lookup_name): Likewise.
328 (cp_parser_constructor_declarator_p): Likewise.
329 * pt.c (instantiate_class_template): Likewise.
330 (resolve_typename_type): Likewise.
332 2004-02-27 Mark Mitchell <mark@codesourcery.com>
335 * class.c (update_vtable_entry_for_fn): Do not go through
336 covariance machinery if the type returned by an overrider is the
337 same as the original.
339 2004-02-27 Giovanni Bajo <giovannibajo@gcc.gnu.org>
342 * pt.c (dependent_type_p_r): A template template parameter is a
345 2004-02-26 Mark Mitchell <mark@codesourcery.com>
348 * parser.c (cp_parser_parameter_declaration_list): Commit
349 to fewer tentative parses.
351 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
354 * mangle.c (write_template_arg_literal): Don't rely on identity for
357 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
360 * cvt.c (build_expr_type_conversion): Type must be complete before
361 looking up for conversions.
363 2004-02-20 Mark Mitchell <mark@codesourcery.com>
366 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
369 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
370 for all type variants.
372 2004-02-19 Mark Mitchell <mark@codesourcery.com>
375 * name-lookup.c (push_class_level_binding): Do not complain about
376 adding a binding for a member whose name is the same as the
377 enclosing class if the member is located in a base class of the
380 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
383 * parser.c (cp_parser_new_expression): Parse an ill-formed
384 direct-new-declarator after a parenthesized type-id to emit good
387 2004-02-17 Mark Mitchell <mark@codesourcery.com>
390 * cp-tree.h (abi_version_at_least): Remove.
391 * mangle.c: Include flags.h.
393 2004-02-15 Mark Mitchell <mark@codesourcery.com>
396 * call.c (build_conditional_expr): Handle conversions between
397 class types which result in differently cv-qualified type
401 * class.c (delete_duplicate_fields_1): Remove.
402 (delete_duplicate_fields): Likewise.
403 (finish_struct_anon): Remove check for members with the same name
404 as their enclosing class.
405 (check_field_decls): Do not call duplicate_fields.
406 * decl.c (grokdeclarator): Remove check for static data members
407 with the same name as their enclosing class.
408 * name-lookup.c (push_class_level_binding): Check for members with
409 the same name as their enclosing class.
411 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
414 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
416 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
419 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
420 has full set of arguments.
422 2004-02-13 Mark Mitchell <mark@codesourcery.com>
425 * cp-tree.h (delete_sanity): Change prototype.
426 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
427 Remove dead code. Adjust code to warn about deleting an array.
428 * typekc.c (decay_conversion): Use build_address and build_nop.
431 * search.c (accessible_p): Do not check access in thunks.
433 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
436 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
438 2004-02-13 Mark Mitchell <mark@codesourcery.com>
441 * call.c (build_conditional_expr): Call force_rvalue on the
442 non-void operand in the case that one result is a throw-expression
443 and the other is not.
445 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
448 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
449 the type name and look ahead for ::~, and bail out early with a
450 better error message if the parse is going to fail.
452 2004-02-10 Mark Mitchell <mark@codesourcery.com>
454 * typeck.c (lookup_destructor): Fix typo in error message.
456 2004-02-07 Zack Weinberg <zack@codesourcery.com>
459 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
460 * decl.c (duplicate_decls, start_function): Likewise.
462 2004-02-07 Zack Weinberg <zack@codesourcery.com>
464 * name-lookup.c (pushdecl): Issue shadow warnings directly.
465 * parser.c (free_parser_stacks): Delete.
467 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
469 * rtti.c, tree.c: Update copyright.
471 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
474 * decl.c (require_complete_types_for_parms): Do not insert
475 error_mark_node in the parameter list.
477 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
480 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
481 error when terminator can not be found.
483 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
485 Make-lang.in (po-generated): Delete.
487 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
491 2004-01-15 Geoffrey Keating <geoffk@apple.com>
493 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
494 (handle_pragma_implementation): Likewise.
496 2004-02-05 Mark Mitchell <mark@codesourcery.com>
499 * typeck.c (lookup_destructor): Tweak error message.
501 2004-02-05 Paul Brook <paul@codesourcery.com>
503 Backport from mainline.
505 2003-11-05 Mark Mitchell <mark@codesourcery.com>
507 * decl.c (cxx_push_function_context): Do not set
508 current_function_is_thunk.
509 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
512 2004-02-04 Mark Mitchell <mark@codesourcery.com>
515 * call.c (convert_like_real): Use "converting" rather than
516 "argument" as the descriptive keyword to
517 dubious_conversion_warnings.
518 * typeck.c (convert_for_assignment): Do not call
519 dubious_conversion_warnings.
521 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
524 * init.c (build_delete): Emit a more informative error message in
525 case of an incomplete type, and on the correct source line.
527 2004-02-04 Mark Mitchell <mark@codesourcery.com>
530 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
531 linkage for the typeinfo name string.
534 * cp-tree.h (fold_non_dependent_expr): New function.
535 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
536 (cp_parser_template_argument): Use fold_non_dependent_expr.
537 (cp_parser_direct_declarator): Likewise.
538 * pt.c (fold_non_dependent_expr): New function.
539 (convert_nontype_argument): Use it.
540 (tsubst_qualified_id): Simplify.
541 (tsubst_copy_and_build): Likewise.
543 2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
546 * pt.c (more_specialized_class): Increase processing_template_decl
547 while partial ordering.
549 2004-02-03 Mark Mitchell <mark@codesourcery.com>
552 * parser.c (cp_parser_class_name): Robustify.
555 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
557 2004-02-03 Mark Mitchell <mark@codesourcery.com>
560 * decl.c (start_function): Do not call pushdecl for any
561 instantiation or specialization of a primary template.
564 * semantics.c (finish_id_expression): Do not return an
565 IDENTIFIER_NODE when lookup finds a PARM_DECL.
568 * pt.c (build_non_dependent_expr): Do not build
569 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
572 * semantics.c (finish_id_expression): Do not return an
573 IDENTIFIER_NODE when lookup finds a VAR_DECL.
576 * parser.c (cp_parser_simple_declaration): When skipping to the
577 end of the statement swallow the terminating semicolon.
579 2004-02-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
583 * decl.c (grokdeclarator): Check immediatly type completeness for
586 2004-01-30 Mark Mitchell <mark@codesourcery.com>
589 * init.c (build_offset_ref): Improve error recovery for invalid
590 uses of non-static member functions.
593 * cp-tree.h (cp_build_type_attribute_variant): New function.
594 * class.c (build_clone): Use cp_build_type_attribute_variant.
595 * decl.c (duplicate_decls): Likewise.
596 * pt.c (copy_default_args_to_explicit_spec): Likewise.
597 (tsubst_function_type): Likewise.
598 * tree.c (build_exception_variant): Check attributes before
599 concluding that two types are the same.
600 (cp_build_type-attribute_variant): New method.
601 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
604 * call.c (convert_class_to_reference): Keep better track of
605 pedantically invalid user-defined conversions.
607 2004-02-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
610 * pt.c (tsubst_qualified_id): Improved error message when a type
611 is expected but not found.
613 2004-01-30 Michael Matz <matz@suse.de>
615 * parser.c (cp_parser_labeled_statement): Accept case ranges.
617 2004-01-28 Jan Hubicka <jh@suse.czi
619 * semantics.c (expand_body) Do emit_associated_thunks before
622 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
625 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
626 a sizeof expression.block
628 2004-01-29 Giovanni Bajo <giovannibajo@gcc.gnu.org>
630 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
631 template name as it was `<::' (digraph typo).
632 (cp_parser_nth_token_starts_template_argument_list_p): New function.
633 (cp_parser_id_expression): Use it.
634 (cp_parser_nested_name_specifier_opt): Likewise.
635 (cp_parser_template_name): Likewise.
636 (cp_parser_class_name): Likewise.
637 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
639 2004-01-29 Mark Mitchell <mark@codesourcery.com>
642 * mangle.c (write_encoding): Correct encoding of member template
645 2004-01-28 Mark Mitchell <mark@codesourcery.com>
648 * typeck.c (merge_types): Do not merge attributes into
651 2004-01-28 Mark Mitchell <mark@codesourcery.com>
654 * parser.c (cp_parser_direct_declarator): Do not prevent
655 backtracking inside a parenthesized declarator.
656 (cp_parser_parameter_declaration): Fix typo in comment.
658 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
660 * cp-tree.h (language_function, lang_type_header): Use
662 * name-lookup.h (cp_binding_level): Likewise.
664 2004-01-26 Mark Mitchell <mark@codesourcery.com>
667 * semantics.c (finish_for_expr): Check for unresolved overloaded
670 2004-01-26 Mark Mitchell <mark@codesourcery.com>
672 * class.c (add_method): Just check processing_template_decl to
673 determine whether or not we are within a template.
674 * decl2.c (maybe_retrofit_in_chrg): Likewise.
675 * init.c (decl_constant_value): Check the type of the declaration,
677 * name-lookup.c (maybe_push_to_top_level): Rename to ...
678 (push_to_top_level): ... this.
679 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
680 * pt.c (push_template_decl_real): Reorder condition for speed.
681 (convert_template_argument): Use dependency-checking functions in
682 place of uses_template_parms.
683 (lookup_template_class): Avoid calling uses_template_parms more
685 (uses_template_parms): Reimplement, using dependency-checking
687 (instantiate_class_template): Use push_to_top_level, not
688 maybe_push_to_top_level.
689 (type_unification_real): Simplify.
690 (type_dependent_expression_p): Handle OFFSET_REFs and
692 (any_dependent_template_arguments_p): Handle multiple levels of
694 * semantics.c (expand_or_defer_fn): Do not check
695 uses_template_parms for template instantiations.
696 * typeck.c (comptypes): Avoid calling cp_type_quals.
698 2004-01-25 Mark Mitchell <mark@codesourcery.com>
701 * call.c (build_over_call): Do not convert arguments when
702 processing a template.
703 * pt.c (build_non_dependent_expr): Do not build a
704 NON_DEPENDENT_EXPR for arithmetic constants.
706 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
709 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
710 returns a TYPE_DECL. no further lookup is required.
711 * semantics.c (check_template_template_default_arg): A TYPE_DECL
712 is invalid. Rework to give better diagnostics.
714 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
717 * pt.c (instantiate_class_template): Add an error_mark_node
719 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
721 2004-01-24 Kazu Hirata <kazu@cs.umass.edu>
723 * call.c: Update copyright.
726 * except.c: Likewise.
729 * mangle.c: Likewise.
730 * optimize.c: Likewise.
731 * typeck.c: Likewise.
732 * typeck2.c: Likewise.
734 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
737 * decl.c (finish_function): Move the call to
738 finish_fname_decls below the call to
739 finish_eh_spec_block.
741 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
743 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
745 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
747 * Make-lang.in: Replace $(docdir) with doc.
748 (c++.info, c++.srcinfo): Dummy entry.
749 (c++.man, c++.srcman): New rules.
750 (c++.install-man): Revamp rule.
752 2004-01-19 Kelley Cook <kcook@gcc.gnu.org>
754 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
755 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
756 immediate $(shell) instead of deferred backquote.
758 2004-01-19 Mark Mitchell <mark@codesourcery.com>
761 * parser.c (cp_parser_postfix_expression): When encountering
762 incomplete type on left-hand side of "->" or ".", treat the entire
763 expression as erroneous.
765 2004-01-19 Mark Mitchell <mark@codesourcery.com>
768 * call.c (build_field_call): Remove.
769 (n_build_method_call): Likewise.
770 (build_method_call): Likewise.
771 (build_new_method_call): Do not call build_field_call.
772 * class.c (n_build_method_call): Remove.
773 (print_class_statistics): Do not print it.
774 * cp-tree.h (build_method_call): Remove declaration.
775 (finish_object_call_expr): Likewise.
776 (build_new_1): Do not use build_method_call.
777 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
778 when the function appearing on the right-hand-side of "." or "->"
779 is not actually a function.
780 * pt.c (tsubst_copy_and_build): Likewise.
781 * semantics.c (finish_object_call_expr): Remove.
783 2004-01-18 Mark Mitchell <mark@codesourcery.com>
786 * pt.c (tsubst): Use finish_typeof.
788 2004-01-18 Jason Merrill <jason@redhat.com>
791 * except.c (build_throw): In a template, set
792 current_function_returns_abnormally.
794 2004-01-17 Fred Fish <fnf@intrinsity.com>
797 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
798 except don't call array_type_nelts() with a VECTOR_TYPE.
800 2004-01-16 Jan Hubicka <jh@suse.cz>
802 * mangle.c (write_mangled_name): Remove inline modifier.
804 2004-01-16 Mark Mitchell <mark@codesourcery.com>
807 * decl.c (compute_array_index_type): Fix grammar in comment.
808 * init.c (build_zero_init): Handle zero-sized arrays correctly.
811 * call.c (name_as_c_string): Print conversion operator names
815 * call.c (initialize_reference): Pass -1 for inner parameter to
818 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
821 * parser.c (cp_parser_base_specifier): Check for an invalid
822 keyword `typename' and emit an user-friendly error message.
824 2004-01-15 Geoffrey Keating <geoffk@apple.com>
827 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
828 (handle_pragma_implementation): Likewise.
830 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
833 * typeck.c (build_class_member_access_expr): Allow to access members
834 of the currently open class.
835 (finish_class_member_access_expr): Likewise.
837 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
840 * name-lookup.c (validate_nonmember_using_decl): Take scope and
841 name by value, instead of computing them.
842 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
843 arguments. Pass them to validate_nonmember_using_decl.
844 * name-lookup.h (do_local_using_decl): Adjust.
845 (do_toplevel_using_decl): Likewise.
846 * parser.c (cp_parser_using_declaration): Likewise.
847 * pt.c (tsubst_expr): Likewise.
849 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
853 * name-lookup.c (qualified_lookup_using_namespace): Search
854 strongly-associated namespaces first, and only then try other
857 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
859 * Make-lang.in (c++.srcextra): Dummy entry.
861 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
864 * parser.c (cp_parser_template_name): Don't try to parse a
865 conversion-function-id, as it cannot be a template-name.
866 (cp_parser_simple_type_specifier): Check for invalid template-ids
867 even after a built-in type.
869 2004-01-14 Jan Hubicka <jh@suse.cz>
872 * pt.c (instantiate_decl): Do not increase function_depth.
874 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
878 * parser.c (cp_parser_elaborated_type_specifier): Warn about
879 attributes and discard.
880 * decl.c (xref_tag): Don't overwite existing attributes with
883 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
886 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
887 is no destructor while looking up a BIT_NOT_EXPR.
889 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
891 * cxxfilt.c: Remove unused file.
893 2004-01-14 Jan Hubicka <jh@suse.cz>
895 Partial fix to PR c++/12850
896 * decl2.c (mark_used): Do not proactively instantiate templates
897 when compiling in unit-at-a-time or not optimizing.
898 * optimize.c (maybe_clone_body): Do not increase function depth.
900 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
903 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
905 2003-01-12 Steven Bosscher <stevenb@suse.de>
908 * parser.c (cp_parser_member_declaration): Any non-type is also
909 not a class or a function.
911 2004-01-12 Jason Merrill <jason@redhat.com>
914 * class.c (build_base_path): Do not mark vtable references as
916 (build_vtbl_ref_1): Likewise.
918 2004-01-12 Richard Henderson <rth@redhat.com>
921 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
922 (store_init_value): Use it.
923 * decl.c (check_initializer): Expect full initialization code
924 from store_init_value.
925 * init.c (expand_aggr_init_1): Likewise.
926 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
928 2004-01-12 Mark Mitchell <mark@codesourcery.com>
930 * class.c (layout_class_type): For non-POD class types, also copy
931 the DECL_SIZE and DECL_MODE of fields to the base class type.
933 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
936 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
937 calling regenerate_decl_from_template.
939 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
942 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
943 decl-specifier occurring along with a class definition.
945 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
947 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
948 clauses to comments describing declares_class_or_enum.
949 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
952 2004-01-12 Jan Hubicka <jh@suse.cz>
954 * pt.c (for_each_template_parm): Do not check for duplicates.
955 (for_each_template_parm): Use walk_tree duplicate checking code.
957 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
960 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
961 is error_mark_node, don't add any more decl_specs.
962 (cp_parser_init_declarator): After committing to a declaration, if
963 the decl_specifiers start with error_mark_node, issue an error and
964 change the type to "int".
966 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
969 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
971 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
975 * pt.c (tsubst): Substitution must fail if we are attempting to
976 create an array with element type that is an abstract class type.
977 * decl.c (cp_finish_decl): Strip pointers and array types recursively
978 before calling abstract_virtuals_error.
980 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
982 * name-lookup.c (qualified_lookup_using_namespace): Consider
983 strong using directives even if we've already found a binding.
985 2004-01-09 Mark Mitchell <mark@codesourcery.com>
987 * cp-tree.h (cxx_expand_expr): Change prototype.
988 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
990 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
993 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
994 looking into them recursively. They can be there because of the
995 new __offsetof__ extension.
997 2004-01-07 Zack Weinberg <zack@codesourcery.com>
999 * parser.c (cp_parser_save_member_function_body): Mark the
1002 2004-01-05 Mark Mitchell <mark@codesourcery.com>
1005 * class.c (build_clone): Copy type attributes from the original
1006 function to the clone.
1009 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
1010 references as constant.
1013 * parser.c (cp_parser_explicit_instantiation): Improve error
1015 (cp_parser_require): Improve indication of the error location.
1018 * parser.c (cp_parser_class_head): Reorder logic to check for
1019 invalid qualification.
1021 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1024 * name-lookup.c (lookup_using_namespace): Remove spacesp
1026 (unqualified_namespace_lookup): Likewise.
1027 (lookup_qualified_name): Adjust accordingly.
1028 (lookup_name_real): Likewise.
1029 (lookup_arg_dependent): Do not eliminate the namespace of the
1030 functions found by unqualified name lookup unless that is the
1033 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
1035 * semantics.c (push_deferring_access_checks): Fix format.
1036 (resume_deferring_access_checks): Likewise.
1037 (stop_deferring_access_checks): Likewise.
1038 (pop_deferring_access_checks): Likewise.
1039 (get_deferred_access_checks): Likewise.
1040 (pop_to_parent_deferring_access_checks): Likewise.
1041 (perform_deferred_access_checks): Likewise.
1042 (perform_or_defer_access_check): Likewise.
1044 2004-01-04 Richard Henderson <rth@redhat.com>
1046 * call.c (build_over_call): Don't create a save_expr of an
1047 aggregate, but rather its address.
1049 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1052 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
1053 an offsetof expression.
1055 * parser.c (cp_parser_parameter_declaration): Fix comment.
1058 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
1059 (reference_binding): Set it when appropriate.
1060 (build_temp): New function, split out from ...
1061 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
1062 (initialize_reference): Likewise.
1065 * parser.c (cp_parser): Add in_type_id_in_expr_p.
1066 (cp_parser_new): Initialize it.
1067 (cp_parser_postfix_expression): Set it.
1068 (cp_parser_sizeof_operand): Likewise.
1069 (cp_parser_parameteR_declaration): Do not commit early to tenative
1070 parsers when in_type_id_in_expr_p is set.
1072 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1075 * parser.c (cp_parser_template_argument): Don't call
1076 make_unbound_class_template directly.
1077 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
1078 UNBOUND_CLASS_TEMPLATE tree node.
1080 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
1083 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
1085 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1088 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
1089 (DECL_FUNCTION_TEMPLATE_P): Use it.
1090 (DECL_CLASS_TEMPLATE_P): Likewise.
1091 * parser.c (cp_parser_lookup_name): Add is_template parameter.
1092 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
1093 (cp_parser_template_name): Likewise.
1094 (cp_parser_elaborated_type_specifier): Likewise.
1095 (cp_parser_namespace_name): Likewise.
1096 (cp_parser_class_name): Likewise.
1097 (cp_parser_lookup_name_simple): Likewise.
1099 See ChangeLog.3 for earlier changes.