1 2005-05-19 Release Manager
5 2005-05-08 Nathan Sidwell <nathan@codesourcery.com>
8 Backport 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
9 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
12 * cp-tree.h (THUNK_TARGET): Expand comment.
13 * method.c (use_thunk): Make sure we also use the target, if that
16 Backport 2005-02-11 Nathan Sidwell <nathan@codesourcery.com>
17 * class.c (update_vtable_entry_for_fn): Walk the covariant's binfo
18 chain rather than using lookup_base.
20 2005-05-04 Mark Mitchell <mark@codesourcery.com>
23 2004-12-21 Mark Mitchell <mark@codesourcery.com>
25 * tree.c (cp_tree_equal): Handle OVERLOAD.
27 2005-05-02 Mark Mitchell <mark@codesourcery.com>
30 2005-05-01 Mark Mitchell <mark@codesourcery.com>
31 * typeck.c (unary_complex_lvalue): In a template, always refuse
34 2005-05-01 Mark Mitchell <mark@codesourcery.com>
37 2005-02-22 Mark Mitchell <mark@codesourcery.com>
39 * init.c (decl_constant_value): Iterate if the value of a decl
42 2005-05-01 Mark Mitchell <mark@codesourcery.com>
45 2004-12-22 Mark Mitchell <mark@codesourcery.com>
47 * call.c (build_this): In templates, do not bother with
49 * typeck.c (unary_complex_lvalue): In a template, always refuse
52 2005-04-25 Roger Sayle <roger@eyesopen.com>
53 Mark Mitchell <mark@codesourcery.com>
56 Partial backport from mainline.
57 2004-09-27 Mark Mitchell <mark@codesourcery.com>
58 * tree.c (fold_if_not_in_template): New function.
59 * cp-tree.h (fold_if_not_in_template): Prototype here.
60 * call.c (build_conditional_expr): Use fold_if_not_in_template.
61 * typeck.c (build_binary_op): Likewise.
63 2005-04-16 Mark Mitchell <mark@codesourcery.com>
66 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
67 which sizeof/alignof is dependent, rather than just whether we are
68 processing_template_decl.
70 2005-04-06 Jason Merrill <jason@redhat.com>
73 * tree.c (stabilize_init): Don't bother trying to stabilize
74 something with no side-effects.
76 2005-04-04 Mark Mitchell <mark@codesourcery.com>
79 * parser.c (cp_parser_template_name): Fix thinko.
81 2005-04-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
84 * call.c (build_new_op): Remove check for -Wsynth.
86 2005-03-21 Paolo Carlini <pcarlini@suse.de>
89 * semantics.c (finish_stmt_expr_expr): Return immediately
90 if error_operand_p (expr).
92 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
95 * decl.c (decls_match): Compare context of VAR_DECL.
97 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
100 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
101 Check the return value of cp_parser_nested_name_specifier.
103 2005-03-08 Mark Mitchell <mark@codesourcery.com>
106 * init.c (build_vec_init): When determining whether or not the
107 element type has an asignment operator, look through all array
110 2005-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
113 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
114 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
116 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
117 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
118 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
121 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
123 * name-lookup.c (push_overloaded_decl): Don't error if the new
124 decl matches the old one.
125 * decl.c (redeclaration_error_message): Likewise.
127 2005-02-24 Jakub Jelinek <jakub@redhat.com>
130 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
131 initializes a char/wchar_t array.
133 2005-02-21 Alexandre Oliva <aoliva@redhat.com>
136 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
137 template along with TYPE_SIZE.
139 2005-02-14 Mark Mitchell <mark@codesourcery.com>
141 * decl.c (reshape_init): Use explicit quotes in error message
144 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
148 * pt.c (maybe_check_template_type): Remove.
149 * cp-tree.h (maybe_check_template_type): Remove prototype.
150 * name-lookup.c (maybe_process_template_type_declaration): Don't
151 use maybe_check_template_type.
153 2005-02-10 Mark Mitchell <mark@codesourcery.com>
156 * decl.c (reshape_init): Issue warnings about missing braces.
158 2005-02-09 Mark Mitchell <mark@codesourcery.com>
160 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
163 * call.c (initialize_reference): Robustify.
166 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
167 names with invalid types.
170 * parser.c (cp_parser_attributes_list): Allow empty lists.
172 2005-02-08 Mark Mitchell <mark@codesourcery.com>
175 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
178 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
183 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
184 Issue an error when creating the template id.
185 * pt.c (fn_type_unification): Return early if the explicit
186 template arg list is an error_mark_node.
188 2005-01-27 J"orn Rennecke <joern.rennecke@st.com>
191 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
193 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
196 * semantics.c (finish_id_expression): Disable access checking for
197 already lookuped FIELD_DECL.
199 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
202 * parser.c (cp_parser_late_parsing_default_args): Handle friend
204 * pt.c (push_access_scope, pop_access_scope): Likewise.
206 2005-01-15 Jakub Jelinek <jakub@redhat.com>
209 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
210 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
211 Store code to *pcode.
213 2004-12-28 Jakub Jelinek <jakub@redhat.com>
215 PR c++/18384, c++/18327
216 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
217 and index. Convert max_index to size_type_node if it isn't
220 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
223 * pt.c (check_explicit_specialization): Use the argument list from
224 the definition in a template function specialization definition.
226 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
229 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
232 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
235 * method.c (do_build_copy_constructor): Refactor. Don't const
236 qualify a mutable field.
237 (do_build_assign_ref): Likewise.
239 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
242 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
244 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
247 * init.c (build_zero_init): Build a RANGE_EXPR for an array
250 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
253 * name-lookup.c (push_class_level_binding): Diagnose nested
254 class template with the same name as enclosing class.
256 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
258 PR c++/17011, c++/17971
259 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
261 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
262 error_mark_node after member substitution.
263 * semantics.c (finish_id_expression): Call
264 finish_non_static_data_member for dependent FIELD_DECL.
266 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
269 * parser.c (cp_parser_type_specifier): Don't create new enum
270 type if it is not in the form 'enum [identifier] { [...] };'.
271 Catch template declaration of enum.
273 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
276 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
277 derived to base conversion when checking constructor
279 (implicit_conversion): Pass FLAGS to standard_conversion.
280 (check_constructir_callable): Disallow conversion functions.
282 2004-11-12 Mark Mitchell <mark@codesourcery.com>
285 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
286 error_mark_node to indicate errors.
289 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
290 unqualified name resolves to a member function.
293 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
294 derived class correctly.
296 2004-11-04 Release Manager
298 * GCC 3.4.3 released.
300 2004-10-31 Mark Mitchell <mark@codesourcery.com>
303 * typeck2.c (store_init_value): Use split_nonconstant_init even
304 for types that require construction.
306 2004-10-28 Mark Mitchell <mark@codesourcery.com>
309 * pt.c (instantiate_class_template): Increment
310 processing_template_decl when substituting into a member class
313 2004-10-27 Mark Mitchell <mark@codesourcery.com>
316 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
319 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
322 * error.c (cp_error_at): Output the context as it might be
323 different file as the other location.
325 2004-10-26 Mark Mitchell <mark@codesourcery.com>
328 * search.c (current_scope): Return the innermost non-block scope,
329 not the innermost non-block, non-namespace scope.
330 (at_namespace_scope_p): Adjust accordingly.
331 (dfs_accessible_post): Do not pass namespaces to is_friend.
332 (dfs_walk_once_accessible_r): Likewise.
333 * decl.c (grokvardecl): Adjust call to current_scope.
334 (build_enumerator): Likewise.
335 * parser.c (cp_parser_using_declaration): Likewise.
336 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
338 (cp_parser_class_head): Adjust call to current_scope.
339 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
343 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
344 their underlying values.
346 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
349 * name-lookup.c (parse_using_directive): If we have a
350 error_mark_node, do not set the decl namespace associations
353 2004-10-14 Mark Mitchell <mark@codesourcery.com>
356 * decl.c (cp_finish_decl): Do not call expand_static_init more
357 than once for a single variable.
359 2004-10-11 Mark Mitchell <mark@codesourcery.com>
362 * parser.c (cp_parser_declarator): Add member_p parameter.
363 (cp_parser_condition): Adjust calls to cp_parser_declarator.
364 (cp_parser_explicit_instantiation): Likewise.
365 (cp_parser_init_declarator): Likewise.
366 (cp_parser_direct_declarator): Add member_p parameter. Do not
367 parse tentatively when parsing the parameters to a member.
368 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
369 (cp_parser_parameter_declaration): Likewise.
370 (cp_parser_member_declaration): Likewise.
371 (cp_parser_exception_declaration): Likewise.
373 2004-10-11 Mark Mitchell <mark@codesourcery.com>
375 * decl2.c (finish_anon_union): Robustify.
377 2004-10-10 Mark Mitchell <mark@codesourcery.com>
380 * decl.c (grokdeclarator): Robustify error-recovery on invalid
383 2004-10-09 Mark Mitchell <mark@codesourcery.com>
386 * parser.c (cp_parser_postfix_dot_deref_expression): If the
387 pseduo-destructor-name production does not work, fall back to the
391 * tree.c (cp_tree_equal): Handle a BASELINK.
393 2004-10-09 Mark Mitchell <mark@codesourcery.com>
396 * cp-tree.h (check_var_type): New function.
397 * decl.c (check_var_type): New function, split out from ...
398 (grokdeclarator): ... here.
399 * pt.c (tsubst_decl): Use check_var_type.
402 * decl.c (grokdeclarator): Disallow declarations of operators as
405 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
408 * error.c (dump_expr): Add missing case for RDIV_EXPR.
410 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
413 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
414 unqualified lookup finds a member function.
416 2004-09-28 Roger Sayle <roger@eyesopen.com>
419 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
420 than -lc and -lm, may require linking against libstc++.
422 2004-09-27 Mark Mitchell <mark@codesourcery.com>
425 * cp-tree.h (shared_member_p): Declare.
426 * search.c (shared_member_p): Give it external linkage.
427 * semantics.c (finish_qualified_id_expr): Use it.
428 (finish_id_expression): Likewise.
430 2004-09-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
433 * parser.c (cp_parser_initializer): Speed up parsing of simple
434 literals as initializers.
436 2004-09-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
439 * decl.c (reshape_init): Extract array handling into...
440 (reshape_init_array): New function. Use integers instead of trees
441 for indices. Handle out-of-range designated initializers.
443 2004-09-16 Mark Mitchell <mark@codesourcery.com>
446 * parser.c (cp_parser_nested_name_specifier): Do not resolve
447 typename types if the user explicitly said "typename".
449 2004-09-13 Mark Mitchell <mark@codesourcery.com>
452 * parser.c (cp_parser_id_expression): Correct value for
454 (cp_parser_nested_name_specifier_opt): Look through typenames as
456 (cp_parser_template_name): Honor check_dependency_p.
458 2004-09-13 Mark Mitchell <mark@codesourcery.com>
461 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
464 2004-09-06 Release Manager
466 * GCC 3.4.2 released.
468 2004-08-25 Roger Sayle <roger@eyesopen.com>
471 PR tree-optimization/16372
472 * decl.c (finish_enum): Make the precision of the enumerated type
473 the same width as the underlying integer type.
475 2004-08-24 Jason Merrill <jason@redhat.com>
478 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
481 * semantics.c (nullify_returns_r): Replace a DECL_STMT
482 for the NRV with an INIT_EXPR.
484 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
487 * (is_subobject_of_p): Resurrect & optimize.
488 (lookup_field_r): Use it.
490 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
493 * search.c (friend_accessible_p): Increment processing_template_decl
494 when deal with TEMPLATE_DECL of SCOPE.
496 2004-08-23 Janis Johnson <janis187@us.ibm.com>
498 Backports from mainline:
500 2004-02-27 Ziemowit Laski <zlaski@apple.com>
501 2004-03-24 Ziemowit Laski <zlaski@apple.com>
503 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
504 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
506 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
508 2004-08-19 Mark Mitchell <mark@codesourcery.com>
511 * pt.c (push_template_decl_real): Disallow template allocation
512 functions with fewer than two parameters.
514 2004-08-18 Mark Mitchell <mark@codesourcery.com>
517 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
520 2004-08-17 Mark Mitchell <mark@codesourcery.com>
523 * pt.c (unify): Make sure that non-type arguments have the same
524 type as the corresponding parameter.
526 2004-08-12 Mark Mitchell <mark@codesourcery.com>
529 * class.c (count_depth_data): New type.
530 (dfs_depth_post): New function.
531 (dfs_depth_q): Likewise.
532 (find_final_overrider_data_s): Change type of vpath.
534 (dfs_find_final_overrider_1): New function.
535 (dfs_find_final_overrider): Use it.
536 (dfs_find_final_overrider_q): Adjust use of vpath.
537 (dfs_find_final_overrider_post): Likewise.
538 (find_final_overrider): Use dfs_depth. Allocate and deallocate
541 2004-08-12 Jan Beulich <jbeulich@novell.com>
543 * parser.c (cp_parser_asm_definition): Properly consume scope operator
544 tokens preceding the clobbers. Don't check for scope operator
545 following inputs. Simplify inputs handling to match that now used for
548 2004-08-11 Mark Mitchell <mark@codesourcery.com>
551 * except.c (build_throw): Allocate cleanup_type and the function
552 for __cxa_throw separately.
554 2004-08-11 Mark Mitchell <mark@codesourcery.com>
557 * semantics.c (expand_body): Do not update static_ctors and
559 (expand_or_defer_fn): Do it here, instead.
562 * call.c (standard_conversion): Do not accept conversions between
563 pointers to members if the class types are unrelated.
566 * pt.c (tsubst): Just return the unknown_type_node.
569 * parser.c (cp_parser_class_specifier): Robustify.
572 * pt.c (tsubst_copy_and_build): Complain about invalid
576 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
577 current_class_ref while tsubsting.
579 2004-08-01 Mark Mitchell <mark@codesourcery.com>
582 * name-lookup.c (decl_namespace): Remove.
583 (current_decl_namespace): Use decl_namespace_context instead of
585 (push_decl_namespace): Likewise.
586 (arg_assoc_class): Likewise.
587 (arg_assoc_type): Likewise.
588 * pt.c (check_specialization_namespace): New function.
589 (maybe_process_partial_specialization): Use it.
590 (register_specialization): Likewise.
592 2004-08-01 Mark Mitchell <mark@codesourcery.com>
595 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
596 * call.c (null_ptr_cst_p): Handle variables with constant
598 * pt.c (convert_nontype_argument): Use
599 DECL_INTEGRAL_CONSTANT_VAR_P.
600 * semantics.c (finish_id_expression): Likewise.
603 * decl.c (duplicate_decls): Reject duplicate namespace
607 * typeck.c (build_ptrmemfunc): Loosen assertion.
609 2004-07-28 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
612 * init.c (build_offset_ref): Build SCOPE_REF with non-null
613 TREE_TYPE for non-dependent names.
614 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
615 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
616 unknown_type_node as its TREE_TYPE.
617 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
618 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
619 (dump_expr) <SCOPE_REF case>: Likewise.
621 2004-07-21 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
624 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
627 2004-07-20 Mark Mitchell <mark@codesourcery.com>
629 (cp_parser_simple_type_specifier): Fix typo.
632 * parser.c (cp_parser_simple_type_specifier): Do not record usage
633 of globally-qualified names.
635 2004-07-12 Andrew Pinski <apinski@apple.com>
639 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
641 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
645 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
648 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
651 2004-07-01 Release Manager
653 * GCC 3.4.1 released.
655 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
658 * call.c (build_temp): Declare.
659 (check_constructor_callable): New.
660 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
661 CONSTRUCTOR_CALLABLE.
662 (convert_like_real, initialize_reference): Use
663 check_constructor_callable.
664 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
665 (LOOKUP_*): Renumber.
667 2004-06-25 Jan Hubicka <jh@suse.cz>
670 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
671 reachability analysis.
673 2004-06-22 Jan Hubicka <jh@suse.cz>
676 * pt.c (instantiate_decl): Clean TI_PENDING_TEMPLATE_FLAG before
677 expanding the function.
679 2004-06-21 Nathan Sidwell <nathan@codesourcery.com>
682 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
686 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
687 cv-qualifier unification.
688 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
690 2004-06-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
693 * search.c (build_new_1): Robustify.
695 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
698 * parser.c (cp_parser_template_name): Ctors/dtors never need a
699 template keyword to disambiguate.
701 2004-06-14 Mark Mitchell <mark@codesourcery.com>
704 * decl.c (grokdeclarator): Ignore pointer-to-members when
705 computing template depth.
708 * name-lookup.c (pushtag): Do not try to put class declarations in
709 explicit specialization scopes.
711 i2004-06-11 Mark Mitchell <mark@codesourcery.com>
714 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
715 bindings for undeclared built-ins.
717 2004-06-10 Jason Merrill <jason@redhat.com>
721 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
722 * init.c (build_offset_ref): Build SCOPE_REF with non-null
723 TREE_TYPE for non-dependent names.
724 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
725 unknown_type_node as its TREE_TYPE.
726 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
727 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
728 (dump_expr) <SCOPE_REF case>: Likewise.
730 2004-06-10 Mark Mitchell <mark@codesourcery.com>
733 * parser.c (cp_parser_direct_declarator): Robustify.
736 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
737 constants in non-dependent contexts.
741 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
744 2004-06-09 Mark Mitchell <mark@codesourcery.com>
748 2004-06-07 Mark Mitchell <mark@codesourcery.com>
749 * lex.c (handle_pragma_interface): Deprecate.
750 (handle_pragma_implementation): Likewise.
752 2004-06-07 Dan Kegel <dank@kegel.com>
755 * method.c (make_alias_for_thunk, use_thunk): Use TARGET_IS_PE_COFF
756 instead of __CYWGIN__ and __MINGW32__.
758 2004-06-07 Mark Mitchell <mark@codesourcery.com>
761 * lex.c (handle_pragma_interface): Deprecate.
762 (handle_pragma_implementation): Likewise.
765 * parser.c (cp_parser_iteration_statement): Fix typo in error
769 * pt.c (tsubst_default_argument): Do not defer access checks
770 while substituting into the default argument.
773 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
774 constant in a non-dependent context.
777 * except.c (build_throw): Ensure that temp_expr has been
780 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
783 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
784 'typename', and accept 'template'.
786 2004-06-01 Jason Merrill <jason@redhat.com>
789 * call.c (call_builtin_trap): Remove type parm.
790 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
791 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
793 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
796 * init.c (build_offset_ref): Build SCOPE_REF with non-null
797 TREE_TYPE for non-dependent names.
798 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
799 unknown_type_node as its TREE_TYPE.
800 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
801 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
802 (dump_expr) <SCOPE_REF case>: Likewise.
804 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
807 * parser.c (cp_parser_postfix_expression): Allow subscript
808 operator in offsetof.
810 2004-05-31 Mark Mitchell <mark@codesourcery.com>
813 * friend.c (add_friend): Do not try to perform access checks for
814 functions from dependent classes.
817 * call.c (build_over_call): Set
818 current_function_returns_abnormally even in template functions.
821 * cp-tree.h (invalid_nonstatic_memfn_p): New function.
822 * cvt.c (convert_to_void): Use it.
823 * typeck.c (invalid_nonstatic_memfn_p): New function.
824 (decay_conversion): Use it.
827 * pt.c (tsubst_decl): Set DECL_FRIEND_CONTEXT for instantiated
831 * name-lookup.c (arg_assoc_class): Do not find template
835 * tree.c (lvalue_p_1): Only consider the right-hand side of "."
836 expressions when determining whether or not an express is packed.
838 2004-05-28 Mark Mitchell <mark@codesourcery.com>
841 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
843 * init.c (build_new): Likewise.
846 * name-lookup.c (arg_assoc): Robustify.
849 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
850 when determining the scope to use for a pointer to member.
851 (lookup_anon_field): Give it external linkage.
852 * cp-tree.h (lookup_anon_field): Declare it.
853 * expr.c (cplus_expand_constant): Use it.
856 * parser.c (cp_parser_simple_type_specifier): Call
857 maybe_note_name_used_in_class.
859 2004-05-23 Mark Mitchell <mark@codesourcery.com>
862 * parser.c (cp_parser_class_head): Robustify.
865 * parser.c (cp_parser_decl_specifier_seq): Correct error in
867 (cp_parser_constructor_declarator_p): Treat attributes
871 * typeck.c (build_unary_op): Do not attempt to resolve casts to
872 base classes in templates.
875 * pt.c (instantiate_template): Robustify.
878 * decl.c (xref_tag): Issue errors about redeclaring template
879 classes as non-template classes.
882 * name-lookup.c (supplement_binding): Allow redefinitions of
886 * parser.c (cp_parser_template_argument): Robustify.
888 2004-05-22 Mark Mitchell <mark@codesourcery.com>
892 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
893 recognized as overloaded functions.
896 * class.c (layout_nonempty_base_or_field): Do not try to avoid
897 layout conflicts for unions.
900 * typeck.c (build_x_unary_op): Instantiate template class
901 specializations before looking for "operator &".
904 * typeck.c (complete_type): Layout non-dependent array types, even
908 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
911 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
914 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
915 used in integral constant expressions.
917 2004-04-18 Release Manager
919 * GCC 3.4.0 released.
921 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
924 * method.c (make_alias_for_thunk): Just return function decl
925 for one_only functions if __CYGWIN__ or __MINGW32__
926 (use_thunk): Don't put function and thunk in same one_only
927 section if __CYGWIN__ or __MINGW32__.
929 2004-04-08 Jakub Jelinek <jakub@redhat.com>
931 * decl2.c (mark_used): Don't segfault if cfun != NULL but
932 current_function_decl == NULL.
934 2004-04-01 Mark Mitchell <mark@codesourcery.com>
937 * typeck.c (get_delta_difference): Call fold before returning the
940 2004-04-01 Richard Henderson <rth@redhat.com>
943 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
944 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
946 2004-04-01 Mark Mitchell <mark@codesourcery.com>
949 * name-lookup.c (maybe_push_cleanup_level): Robustify.
951 2004-03-30 Mark Mitchell <mark@codesourcery.com>
954 * decl.c (start_decl_1): Do not decide whether or not to create a
955 new cleanup level until after the type has been completed.
958 * pt.c (tsubst_default_argument): Clear current_function_decl.
960 2004-03-28 Jan Hubicka <jh@suse.cz>
963 * method.c (use_think): Do not mark thunk as referenced.
965 2004-03-21 Mark Mitchell <mark@codesourcery.com>
968 * decl.c (cp_finish_decl): Compute the size of arrays declared in
969 templates, if their type is non-dependent.
971 2004-03-19 Mark Mitchell <mark@codesourcery.com>
973 * call.c (build_op_delete_call): Do not forget the placement
974 arguments when iterating through mutiple delete operators.
976 * cp-tree.h (svaed_scope): Remove last_parms.
977 (NEW_DELETE_OPNAME_P): New macro.
978 (last_function_parms): Remove.
979 (do_friend): Adjust prototype.
980 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
981 using last_function_parms.
982 (grokfndecl): Take the PARM_DECLs as an argument, rather than
983 using last_function_parms.
984 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
985 for class-specific operator new and operator delete.
986 (grok_op_properties): Do not look for allocation functions with
988 (start_function): Use DECL_ARGUMENTS instead of
990 * decl.h (last_function_parms): Do not declare.
991 * decl2.c (grokclassfn): Do not use last_function_parms.
992 * friend.c (do_friend): Remove parmdecls parameter.
993 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
994 (pop_from_top_level): Do not restore it.
995 * pt.c (check_explicit_specialization): Do not adjust
998 * name-lookup.c (do_local_using_decl): Create a local binding for
999 types brought in via using declarations.
1001 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1002 function declarations correctly.
1004 * semantics.c (finish_id_expression): Correct handling of
1005 conversion operators to dependent types.
1007 * typeck.c (lookup_destructor): Allow the use of destructors from
1010 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1013 * parser.c (cp_parser_functional_cast): A cast to anything
1014 but integral or enumaration type is not an integral constant
1016 * pt.c (value_dependent_expression_p): Handle cast expressions
1017 without operands (such as "int()").
1019 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1021 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1022 cv-qualification between the type named by the
1023 pseudo-destructor-name and the object-type.
1025 * search.c (accessible_base_p): Handle non-proper bases.
1027 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1028 refers to a single overloaded function, set the type of the
1030 * tree.c (lvalue_type): Simplify.
1031 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1033 (build_unary_op): Handle OVERLOADs with known types.
1035 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1038 * parser.c (cp_parser_postfix_expression): Handle the use of
1039 "typename" in non-dependent contexts. Convert appropriately when
1040 when using a qualified name after "->" or ".".
1042 * call.c (conditional_conversion): Honor the requirement that some
1043 conversions refer to the original object.
1045 * call.c (build_conditional_expr): Do not call force_rvalue for
1046 operands of void_type when the conditional expression itself has
1048 * name-lookup.c (pushdecl): Don't consider a declaration of a
1049 function named "main" to be an overload of a type named "main".
1050 * parser.c (cp_parser_template_name): Perform name lookup when the
1051 template name is proceeded by "template" if the qualifying scope
1053 * typeck.c (composite_pointer_type_r): Correctly handle
1054 pointer-to-member types.
1055 (build_const_cast): Likewise.
1057 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1060 * cp-tree.h (build_new_op): Change prototype.
1061 (build_x_binary_op): Likewise.
1062 * call.c (build_new_op): Add overloaded_p parameter.
1063 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1064 * parser.c (cp_parser_binary_expression): Note that uses of
1065 overloaded operators prevents an expression from being considered
1066 an integral constant.
1067 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1069 * semantics.c (finish_call_expr): Likewise.
1070 * typeck.c (rationalize_conditional_expr): Likewise.
1071 (build_x_indirect_ref): Likewise.
1072 (build_x_binary_op): Likewise.
1073 (build_x_unary_op): Likewise.
1074 (build_x_compound_expr): Likewise.
1075 (build_modify_expr): Likewise.
1076 * typeck2.c (build_x_arrow): Likewise.
1078 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1081 * parser.c (cp_parser_non_integral_constant_expression): Encode
1082 more of the idiom that surrounded calls to this function within
1084 (cp_parser_primary_expression): Adjust accordingly.
1085 (cp_parser_postfix_expression): Likewise.
1086 (cp_parser_unary_expression): Likewise.
1087 (cp_parser_cast_expression): Likewise.
1088 (cp_parser_assignment_expression): Likewise.
1089 (cp_parser_expression): Likewise.
1090 (cp_parser_new_expression): Note that new-expressions are not
1091 allowed in integral constant expressions.
1092 (cp_parser_delete_expression): Likewise.
1094 2004-03-11 Mark Mitchell <mark@codesourcery.com>
1097 * decl.c (xref_tag): Do not create dummy ENUMERAL_TYPEs.
1099 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1102 * decl.c (xref_tag): Disregard non-type declarations when
1103 looking up a tagged type.
1105 2004-03-10 Jason Merrill <jason@redhat.com>
1108 * tree.c (stabilize_init): Return whether or not it worked.
1109 * init.c (build_new_1): If not, use a sentry.
1110 * cp-tree.h: Adjust prototype.
1112 2004-03-09 Nathan Sidwell <nathan@garibaldi.home>
1115 * call.c (convert_like_real): Build a const qualified temporary,
1116 when testing ctor access.
1118 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1120 * call.c (initialize_reference): Fix typo.
1122 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1125 * pt.c (determine_specialization): For member templates, match also
1129 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1131 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1133 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1136 * call.c (initialize_reference): Handle initializers that are
1137 class-member access expressions applies to rvalues.
1140 * name-lookup.c (supplement_binding): Ignore functions that are
1141 marked DECL_ANTICIPATED.
1143 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1146 * class.c (check_field_decls): Complain about non-static data
1147 members of reference type in unions. Propagate
1148 CLASSTYPE_REF_FIELDS_NEED_INIT and
1149 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1151 * init.c (perform_member_init): Complain about mbmers with const
1152 type that are not explicitly initialized.
1154 2004-03-08 Jason Merrill <jason@redhat.com>
1157 * decl.c (xref_tag): Remove attribute handling.
1158 * cp-tree.h: Adjust prototype.
1159 * decl.c, parser.c, rtti.c: Adjust callers.
1160 * parser.c (cp_parser_class_head): Pass back attributes in the
1162 (cp_parser_class_specifier): Adjust.
1164 2004-03-08 Matt Austern <austern@apple.com>
1167 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1168 as static, to static_decls array.
1170 2004-03-01 Jason Merrill <jason@redhat.com>
1173 * except.c (do_free_exception): Remove #if 0 wrapper.
1174 (build_throw): Use it if we elide a copy into the
1177 * tree.c (stabilize_call): Fix thinko.
1179 * init.c (build_new_1): Preevaluate initializer. Simplify EH code.
1180 (build_init): Call a constructor rather than call build_aggr_init
1182 * except.c (stabilize_throw_expr): Remove.
1183 (build_throw): Use stabilize_init instead of stabilize_throw_expr.
1184 * tree.c (stabilize_call, stabilize_init): New fns.
1185 * call.c (build_over_call): A constructor no longer returns the
1186 address of the object.
1188 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1191 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1192 having C++ linkage for name-mangling purposes.
1195 * parser.c (cp_parser_direct_declarator): Recognize constructor
1196 declarators that use a template-id to name the class being
1200 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1201 (tsubst_expr): Do not call tsubst_copy, even when
1202 processing_template_decl.
1204 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1207 * pt.c (build_non_dependent_expr): Do not create a
1208 NON_DEPENDENT_EXPR for a THROW_EXPR.
1211 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1212 lookup if ordinary name-lookup finds a non-function.
1213 * pt.c (tsubst_copy_and_build): Likewise.
1216 * parser.c (cp_parser_late_parsing_default_args): Check that there
1217 are no extra tokens after the end of the default-argument
1221 Backport 2004-02-12 Mark Mitchell <mark@codesourcery.com>
1222 * decl.c (redeclaration_error_message): Correct handling of
1224 * pt.c (tsubst_friend_declaration): Adjust code to determine
1225 whether or not a friend template is a definition.
1226 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
1228 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1231 * error.c (dump_expr): Handle THROW_EXPR.
1233 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1236 * name-lookup.h (push_scope): Change prototype.
1237 * name-lookup.c (push_scope): Do not reenter the current class
1239 * decl.c (grokfndecl): Check return code from push_scope before
1241 * decl2.c (check_classfn): Likewise.
1242 * parser.c (cp_parser_conversion_function_id): Likewise.
1243 (cp_parser_init_declarator): Likewise.
1244 (cp_parser_direct_declarator): Likewise.
1245 (cp_parser_class_specifier): Likewise.
1246 (cp_parser_class_head): Likewise.
1247 (cp_parser_lookup_name): Likewise.
1248 (cp_parser_constructor_declarator_p): Likewise.
1249 * pt.c (instantiate_class_template): Likewise.
1250 (resolve_typename_type): Likewise.
1252 2004-02-27 Mark Mitchell <mark@codesourcery.com>
1255 * class.c (update_vtable_entry_for_fn): Do not go through
1256 covariance machinery if the type returned by an overrider is the
1257 same as the original.
1259 2004-02-27 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1262 * pt.c (dependent_type_p_r): A template template parameter is a
1265 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1268 * parser.c (cp_parser_parameter_declaration_list): Commit
1269 to fewer tentative parses.
1271 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1274 * mangle.c (write_template_arg_literal): Don't rely on identity for
1277 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1280 * cvt.c (build_expr_type_conversion): Type must be complete before
1281 looking up for conversions.
1283 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1286 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1289 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1290 for all type variants.
1292 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1295 * name-lookup.c (push_class_level_binding): Do not complain about
1296 adding a binding for a member whose name is the same as the
1297 enclosing class if the member is located in a base class of the
1300 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1303 * parser.c (cp_parser_new_expression): Parse an ill-formed
1304 direct-new-declarator after a parenthesized type-id to emit good
1307 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1310 * cp-tree.h (abi_version_at_least): Remove.
1311 * mangle.c: Include flags.h.
1313 2004-02-15 Mark Mitchell <mark@codesourcery.com>
1316 * call.c (build_conditional_expr): Handle conversions between
1317 class types which result in differently cv-qualified type
1321 * class.c (delete_duplicate_fields_1): Remove.
1322 (delete_duplicate_fields): Likewise.
1323 (finish_struct_anon): Remove check for members with the same name
1324 as their enclosing class.
1325 (check_field_decls): Do not call duplicate_fields.
1326 * decl.c (grokdeclarator): Remove check for static data members
1327 with the same name as their enclosing class.
1328 * name-lookup.c (push_class_level_binding): Check for members with
1329 the same name as their enclosing class.
1331 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1334 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1336 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1339 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1340 has full set of arguments.
1342 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1345 * cp-tree.h (delete_sanity): Change prototype.
1346 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1347 Remove dead code. Adjust code to warn about deleting an array.
1348 * typekc.c (decay_conversion): Use build_address and build_nop.
1351 * search.c (accessible_p): Do not check access in thunks.
1353 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1356 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1358 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1361 * call.c (build_conditional_expr): Call force_rvalue on the
1362 non-void operand in the case that one result is a throw-expression
1363 and the other is not.
1365 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
1368 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1369 the type name and look ahead for ::~, and bail out early with a
1370 better error message if the parse is going to fail.
1372 2004-02-10 Mark Mitchell <mark@codesourcery.com>
1374 * typeck.c (lookup_destructor): Fix typo in error message.
1376 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1379 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
1380 * decl.c (duplicate_decls, start_function): Likewise.
1382 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1384 * name-lookup.c (pushdecl): Issue shadow warnings directly.
1385 * parser.c (free_parser_stacks): Delete.
1387 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
1389 * rtti.c, tree.c: Update copyright.
1391 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1394 * decl.c (require_complete_types_for_parms): Do not insert
1395 error_mark_node in the parameter list.
1397 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1400 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
1401 error when terminator can not be found.
1403 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
1405 Make-lang.in (po-generated): Delete.
1407 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1411 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1413 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1414 (handle_pragma_implementation): Likewise.
1416 2004-02-05 Mark Mitchell <mark@codesourcery.com>
1419 * typeck.c (lookup_destructor): Tweak error message.
1421 2004-02-05 Paul Brook <paul@codesourcery.com>
1423 Backport from mainline.
1425 2003-11-05 Mark Mitchell <mark@codesourcery.com>
1427 * decl.c (cxx_push_function_context): Do not set
1428 current_function_is_thunk.
1429 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
1432 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1435 * call.c (convert_like_real): Use "converting" rather than
1436 "argument" as the descriptive keyword to
1437 dubious_conversion_warnings.
1438 * typeck.c (convert_for_assignment): Do not call
1439 dubious_conversion_warnings.
1441 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1444 * init.c (build_delete): Emit a more informative error message in
1445 case of an incomplete type, and on the correct source line.
1447 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1450 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
1451 linkage for the typeinfo name string.
1454 * cp-tree.h (fold_non_dependent_expr): New function.
1455 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
1456 (cp_parser_template_argument): Use fold_non_dependent_expr.
1457 (cp_parser_direct_declarator): Likewise.
1458 * pt.c (fold_non_dependent_expr): New function.
1459 (convert_nontype_argument): Use it.
1460 (tsubst_qualified_id): Simplify.
1461 (tsubst_copy_and_build): Likewise.
1463 2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1466 * pt.c (more_specialized_class): Increase processing_template_decl
1467 while partial ordering.
1469 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1472 * parser.c (cp_parser_class_name): Robustify.
1475 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
1477 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1480 * decl.c (start_function): Do not call pushdecl for any
1481 instantiation or specialization of a primary template.
1484 * semantics.c (finish_id_expression): Do not return an
1485 IDENTIFIER_NODE when lookup finds a PARM_DECL.
1488 * pt.c (build_non_dependent_expr): Do not build
1489 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1492 * semantics.c (finish_id_expression): Do not return an
1493 IDENTIFIER_NODE when lookup finds a VAR_DECL.
1496 * parser.c (cp_parser_simple_declaration): When skipping to the
1497 end of the statement swallow the terminating semicolon.
1499 2004-02-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1503 * decl.c (grokdeclarator): Check immediatly type completeness for
1504 non-dependent types.
1506 2004-01-30 Mark Mitchell <mark@codesourcery.com>
1509 * init.c (build_offset_ref): Improve error recovery for invalid
1510 uses of non-static member functions.
1513 * cp-tree.h (cp_build_type_attribute_variant): New function.
1514 * class.c (build_clone): Use cp_build_type_attribute_variant.
1515 * decl.c (duplicate_decls): Likewise.
1516 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1517 (tsubst_function_type): Likewise.
1518 * tree.c (build_exception_variant): Check attributes before
1519 concluding that two types are the same.
1520 (cp_build_type-attribute_variant): New method.
1521 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1524 * call.c (convert_class_to_reference): Keep better track of
1525 pedantically invalid user-defined conversions.
1527 2004-02-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1530 * pt.c (tsubst_qualified_id): Improved error message when a type
1531 is expected but not found.
1533 2004-01-30 Michael Matz <matz@suse.de>
1535 * parser.c (cp_parser_labeled_statement): Accept case ranges.
1537 2004-01-28 Jan Hubicka <jh@suse.czi
1539 * semantics.c (expand_body) Do emit_associated_thunks before
1542 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1545 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
1546 a sizeof expression.block
1548 2004-01-29 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1550 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
1551 template name as it was `<::' (digraph typo).
1552 (cp_parser_nth_token_starts_template_argument_list_p): New function.
1553 (cp_parser_id_expression): Use it.
1554 (cp_parser_nested_name_specifier_opt): Likewise.
1555 (cp_parser_template_name): Likewise.
1556 (cp_parser_class_name): Likewise.
1557 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
1559 2004-01-29 Mark Mitchell <mark@codesourcery.com>
1562 * mangle.c (write_encoding): Correct encoding of member template
1565 2004-01-28 Mark Mitchell <mark@codesourcery.com>
1568 * typeck.c (merge_types): Do not merge attributes into
1571 2004-01-28 Mark Mitchell <mark@codesourcery.com>
1574 * parser.c (cp_parser_direct_declarator): Do not prevent
1575 backtracking inside a parenthesized declarator.
1576 (cp_parser_parameter_declaration): Fix typo in comment.
1578 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1580 * cp-tree.h (language_function, lang_type_header): Use
1582 * name-lookup.h (cp_binding_level): Likewise.
1584 2004-01-26 Mark Mitchell <mark@codesourcery.com>
1587 * semantics.c (finish_for_expr): Check for unresolved overloaded
1590 2004-01-26 Mark Mitchell <mark@codesourcery.com>
1592 * class.c (add_method): Just check processing_template_decl to
1593 determine whether or not we are within a template.
1594 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1595 * init.c (decl_constant_value): Check the type of the declaration,
1597 * name-lookup.c (maybe_push_to_top_level): Rename to ...
1598 (push_to_top_level): ... this.
1599 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
1600 * pt.c (push_template_decl_real): Reorder condition for speed.
1601 (convert_template_argument): Use dependency-checking functions in
1602 place of uses_template_parms.
1603 (lookup_template_class): Avoid calling uses_template_parms more
1605 (uses_template_parms): Reimplement, using dependency-checking
1607 (instantiate_class_template): Use push_to_top_level, not
1608 maybe_push_to_top_level.
1609 (type_unification_real): Simplify.
1610 (type_dependent_expression_p): Handle OFFSET_REFs and
1612 (any_dependent_template_arguments_p): Handle multiple levels of
1614 * semantics.c (expand_or_defer_fn): Do not check
1615 uses_template_parms for template instantiations.
1616 * typeck.c (comptypes): Avoid calling cp_type_quals.
1618 2004-01-25 Mark Mitchell <mark@codesourcery.com>
1621 * call.c (build_over_call): Do not convert arguments when
1622 processing a template.
1623 * pt.c (build_non_dependent_expr): Do not build a
1624 NON_DEPENDENT_EXPR for arithmetic constants.
1626 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1629 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
1630 returns a TYPE_DECL. no further lookup is required.
1631 * semantics.c (check_template_template_default_arg): A TYPE_DECL
1632 is invalid. Rework to give better diagnostics.
1634 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1637 * pt.c (instantiate_class_template): Add an error_mark_node
1639 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
1641 2004-01-24 Kazu Hirata <kazu@cs.umass.edu>
1643 * call.c: Update copyright.
1644 * class.c: Likewise.
1645 * decl2.c: Likewise.
1646 * except.c: Likewise.
1649 * mangle.c: Likewise.
1650 * optimize.c: Likewise.
1651 * typeck.c: Likewise.
1652 * typeck2.c: Likewise.
1654 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
1657 * decl.c (finish_function): Move the call to
1658 finish_fname_decls below the call to
1659 finish_eh_spec_block.
1661 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1663 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
1665 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1667 * Make-lang.in: Replace $(docdir) with doc.
1668 (c++.info, c++.srcinfo): Dummy entry.
1669 (c++.man, c++.srcman): New rules.
1670 (c++.install-man): Revamp rule.
1672 2004-01-19 Kelley Cook <kcook@gcc.gnu.org>
1674 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
1675 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
1676 immediate $(shell) instead of deferred backquote.
1678 2004-01-19 Mark Mitchell <mark@codesourcery.com>
1681 * parser.c (cp_parser_postfix_expression): When encountering
1682 incomplete type on left-hand side of "->" or ".", treat the entire
1683 expression as erroneous.
1685 2004-01-19 Mark Mitchell <mark@codesourcery.com>
1688 * call.c (build_field_call): Remove.
1689 (n_build_method_call): Likewise.
1690 (build_method_call): Likewise.
1691 (build_new_method_call): Do not call build_field_call.
1692 * class.c (n_build_method_call): Remove.
1693 (print_class_statistics): Do not print it.
1694 * cp-tree.h (build_method_call): Remove declaration.
1695 (finish_object_call_expr): Likewise.
1696 (build_new_1): Do not use build_method_call.
1697 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
1698 when the function appearing on the right-hand-side of "." or "->"
1699 is not actually a function.
1700 * pt.c (tsubst_copy_and_build): Likewise.
1701 * semantics.c (finish_object_call_expr): Remove.
1703 2004-01-18 Mark Mitchell <mark@codesourcery.com>
1706 * pt.c (tsubst): Use finish_typeof.
1708 2004-01-18 Jason Merrill <jason@redhat.com>
1711 * except.c (build_throw): In a template, set
1712 current_function_returns_abnormally.
1714 2004-01-17 Fred Fish <fnf@intrinsity.com>
1717 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
1718 except don't call array_type_nelts() with a VECTOR_TYPE.
1720 2004-01-16 Jan Hubicka <jh@suse.cz>
1722 * mangle.c (write_mangled_name): Remove inline modifier.
1724 2004-01-16 Mark Mitchell <mark@codesourcery.com>
1727 * decl.c (compute_array_index_type): Fix grammar in comment.
1728 * init.c (build_zero_init): Handle zero-sized arrays correctly.
1731 * call.c (name_as_c_string): Print conversion operator names
1735 * call.c (initialize_reference): Pass -1 for inner parameter to
1738 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1741 * parser.c (cp_parser_base_specifier): Check for an invalid
1742 keyword `typename' and emit an user-friendly error message.
1744 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1747 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1748 (handle_pragma_implementation): Likewise.
1750 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1753 * typeck.c (build_class_member_access_expr): Allow to access members
1754 of the currently open class.
1755 (finish_class_member_access_expr): Likewise.
1757 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
1760 * name-lookup.c (validate_nonmember_using_decl): Take scope and
1761 name by value, instead of computing them.
1762 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
1763 arguments. Pass them to validate_nonmember_using_decl.
1764 * name-lookup.h (do_local_using_decl): Adjust.
1765 (do_toplevel_using_decl): Likewise.
1766 * parser.c (cp_parser_using_declaration): Likewise.
1767 * pt.c (tsubst_expr): Likewise.
1769 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
1773 * name-lookup.c (qualified_lookup_using_namespace): Search
1774 strongly-associated namespaces first, and only then try other
1777 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
1779 * Make-lang.in (c++.srcextra): Dummy entry.
1781 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1784 * parser.c (cp_parser_template_name): Don't try to parse a
1785 conversion-function-id, as it cannot be a template-name.
1786 (cp_parser_simple_type_specifier): Check for invalid template-ids
1787 even after a built-in type.
1789 2004-01-14 Jan Hubicka <jh@suse.cz>
1792 * pt.c (instantiate_decl): Do not increase function_depth.
1794 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
1798 * parser.c (cp_parser_elaborated_type_specifier): Warn about
1799 attributes and discard.
1800 * decl.c (xref_tag): Don't overwite existing attributes with
1803 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1806 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
1807 is no destructor while looking up a BIT_NOT_EXPR.
1809 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
1811 * cxxfilt.c: Remove unused file.
1813 2004-01-14 Jan Hubicka <jh@suse.cz>
1815 Partial fix to PR c++/12850
1816 * decl2.c (mark_used): Do not proactively instantiate templates
1817 when compiling in unit-at-a-time or not optimizing.
1818 * optimize.c (maybe_clone_body): Do not increase function depth.
1820 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1823 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
1825 2003-01-12 Steven Bosscher <stevenb@suse.de>
1828 * parser.c (cp_parser_member_declaration): Any non-type is also
1829 not a class or a function.
1831 2004-01-12 Jason Merrill <jason@redhat.com>
1834 * class.c (build_base_path): Do not mark vtable references as
1836 (build_vtbl_ref_1): Likewise.
1838 2004-01-12 Richard Henderson <rth@redhat.com>
1841 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
1842 (store_init_value): Use it.
1843 * decl.c (check_initializer): Expect full initialization code
1844 from store_init_value.
1845 * init.c (expand_aggr_init_1): Likewise.
1846 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
1848 2004-01-12 Mark Mitchell <mark@codesourcery.com>
1850 * class.c (layout_class_type): For non-POD class types, also copy
1851 the DECL_SIZE and DECL_MODE of fields to the base class type.
1853 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1856 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
1857 calling regenerate_decl_from_template.
1859 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
1862 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
1863 decl-specifier occurring along with a class definition.
1865 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
1867 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
1868 clauses to comments describing declares_class_or_enum.
1869 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
1872 2004-01-12 Jan Hubicka <jh@suse.cz>
1874 * pt.c (for_each_template_parm): Do not check for duplicates.
1875 (for_each_template_parm): Use walk_tree duplicate checking code.
1877 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
1880 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
1881 is error_mark_node, don't add any more decl_specs.
1882 (cp_parser_init_declarator): After committing to a declaration, if
1883 the decl_specifiers start with error_mark_node, issue an error and
1884 change the type to "int".
1886 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
1889 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
1891 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1895 * pt.c (tsubst): Substitution must fail if we are attempting to
1896 create an array with element type that is an abstract class type.
1897 * decl.c (cp_finish_decl): Strip pointers and array types recursively
1898 before calling abstract_virtuals_error.
1900 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
1902 * name-lookup.c (qualified_lookup_using_namespace): Consider
1903 strong using directives even if we've already found a binding.
1905 2004-01-09 Mark Mitchell <mark@codesourcery.com>
1907 * cp-tree.h (cxx_expand_expr): Change prototype.
1908 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
1910 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1913 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
1914 looking into them recursively. They can be there because of the
1915 new __offsetof__ extension.
1917 2004-01-07 Zack Weinberg <zack@codesourcery.com>
1919 * parser.c (cp_parser_save_member_function_body): Mark the
1922 2004-01-05 Mark Mitchell <mark@codesourcery.com>
1925 * class.c (build_clone): Copy type attributes from the original
1926 function to the clone.
1929 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
1930 references as constant.
1933 * parser.c (cp_parser_explicit_instantiation): Improve error
1935 (cp_parser_require): Improve indication of the error location.
1938 * parser.c (cp_parser_class_head): Reorder logic to check for
1939 invalid qualification.
1941 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1944 * name-lookup.c (lookup_using_namespace): Remove spacesp
1946 (unqualified_namespace_lookup): Likewise.
1947 (lookup_qualified_name): Adjust accordingly.
1948 (lookup_name_real): Likewise.
1949 (lookup_arg_dependent): Do not eliminate the namespace of the
1950 functions found by unqualified name lookup unless that is the
1953 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
1955 * semantics.c (push_deferring_access_checks): Fix format.
1956 (resume_deferring_access_checks): Likewise.
1957 (stop_deferring_access_checks): Likewise.
1958 (pop_deferring_access_checks): Likewise.
1959 (get_deferred_access_checks): Likewise.
1960 (pop_to_parent_deferring_access_checks): Likewise.
1961 (perform_deferred_access_checks): Likewise.
1962 (perform_or_defer_access_check): Likewise.
1964 2004-01-04 Richard Henderson <rth@redhat.com>
1966 * call.c (build_over_call): Don't create a save_expr of an
1967 aggregate, but rather its address.
1969 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1972 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
1973 an offsetof expression.
1975 * parser.c (cp_parser_parameter_declaration): Fix comment.
1978 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
1979 (reference_binding): Set it when appropriate.
1980 (build_temp): New function, split out from ...
1981 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
1982 (initialize_reference): Likewise.
1985 * parser.c (cp_parser): Add in_type_id_in_expr_p.
1986 (cp_parser_new): Initialize it.
1987 (cp_parser_postfix_expression): Set it.
1988 (cp_parser_sizeof_operand): Likewise.
1989 (cp_parser_parameteR_declaration): Do not commit early to tenative
1990 parsers when in_type_id_in_expr_p is set.
1992 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1995 * parser.c (cp_parser_template_argument): Don't call
1996 make_unbound_class_template directly.
1997 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
1998 UNBOUND_CLASS_TEMPLATE tree node.
2000 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2003 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2005 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2008 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2009 (DECL_FUNCTION_TEMPLATE_P): Use it.
2010 (DECL_CLASS_TEMPLATE_P): Likewise.
2011 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2012 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2013 (cp_parser_template_name): Likewise.
2014 (cp_parser_elaborated_type_specifier): Likewise.
2015 (cp_parser_namespace_name): Likewise.
2016 (cp_parser_class_name): Likewise.
2017 (cp_parser_lookup_name_simple): Likewise.
2019 See ChangeLog.3 for earlier changes.