1 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
3 * cp-lang.c, ptree.c: Update copyright.
5 2004-03-13 Mark Mitchell <mark@codesourcery.com>
8 * parser.c (cp_parser_non_integral_constant_expression): Encode
9 more of the idiom that surrounded calls to this function within
11 (cp_parser_primary_expression): Adjust accordingly.
12 (cp_parser_postfix_expression): Likewise.
13 (cp_parser_unary_expression): Likewise.
14 (cp_parser_cast_expression): Likewise.
15 (cp_parser_assignment_expression): Likewise.
16 (cp_parser_expression): Likewise.
17 (cp_parser_new_expression): Note that new-expressions are not
18 allowed in integral constant expressions.
19 (cp_parser_delete_expression): Likewise.
21 2004-03-12 Matt Austern <austern@apple.com>
23 * decl2.c (maybe_make_one_only): Look at
24 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
25 to make an explicit instantiation weak.
26 * method.c (use_thunk): Make sure we call comdat_linkage
28 * pt.c (do_type_instantiation): On systems where weak symbols
29 don't go in a static archive's TOC, explicit instantiation of a
30 class must imply *explicit* instantiation of its memeber.
32 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
34 * call.c, cp-tree.h, pt.c: Fix comment typos.
36 2004-03-10 Mark Mitchell <mark@codesourcery.com>
39 * decl.c (xref_tag): Disregard non-type declarations when
40 looking up a tagged type.
42 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
45 * call.c (convert_like_real): Build a const qualified temporary,
46 when testing ctor access.
48 2004-03-09 Mark Mitchell <mark@codesourcery.com>
50 * call.c (initialize_reference): Fix typo.
52 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
55 * pt.c (determine_specialization): For member templates, match also
59 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
61 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
63 2004-03-09 Mark Mitchell <mark@codesourcery.com>
66 * call.c (initialize_reference): Handle initializers that are
67 class-member access expressions applies to rvalues.
69 2004-03-09 Mark Mitchell <mark@codesourcery.com>
72 * name-lookup.c (supplement_binding): Ignore functions that are
73 marked DECL_ANTICIPATED.
75 2004-03-08 Mark Mitchell <mark@codesourcery.com>
78 * class.c (check_field_decls): Complain about non-static data
79 members of reference type in unions. Propagate
80 CLASSTYPE_REF_FIELDS_NEED_INIT and
81 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
83 * init.c (perform_member_init): Complain about mbmers with const
84 type that are not explicitly initialized.
86 2004-03-08 Mark Mitchell <mark@codesourcery.com>
88 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
89 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
90 (lang_identifier): Remove implicit_decl and error_locus.
91 (IDENTIFIER_IMPLICIT_DECL): Remove.
92 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
93 (IDENTIFIER_ERROR_LOCUS): Likewise.
94 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
95 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
96 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
97 (implicitly_declare): Remove.
98 * decl.c (warn_extern_redeclared_static): Remove check of
99 IDENTIFIER_IMPLICIT_DECL.
100 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
101 (implicitly_declare): Remove.
102 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
103 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
104 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
105 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
106 in the innermost scope, rather than at namespace scope.
107 * name-lookup.c (push_local_binding): Give it external linkage.
108 (pushdecl): Remove dead code.
109 * name-lookup.h (push_local_binding): Declare it.
110 * ptree.c (cxx_print_identifier): Don't print
111 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
112 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
113 not IDENTIFIER_ERROR_LOCUS.
114 * typeck.c (build_function_call): Remove dead code.
116 2004-03-08 Jason Merrill <jason@redhat.com>
119 * decl.c (xref_tag): Remove attribute handling.
120 * cp-tree.h: Adjust prototype.
121 * decl.c, parser.c, rtti.c: Adjust callers.
122 * parser.c (cp_parser_class_head): Pass back attributes in the
124 (cp_parser_class_specifier): Adjust.
126 2004-03-08 Matt Austern <austern@apple.com>
129 * name-lookup.c (add_decl_to_level): Add extern variables, as well
130 as static, to static_decls array.
132 2004-03-05 Jason Merrill <jason@redhat.com>
134 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
136 2004-03-04 Geoffrey Keating <geoffk@apple.com>
138 * decl.c (grokfndecl): Update old incorrect comment.
139 (grokvardecl): Diagnose C++ variables of type with no linkage.
141 2004-03-01 Mark Mitchell <mark@codesourcery.com>
144 * pt.c (build_non_dependent_expr): Do not create a
145 NON_DEPENDENT_EXPR for a THROW_EXPR.
147 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
150 * error.c (dump_expr): Handle THROW_EXPR.
152 2004-03-01 Mark Mitchell <mark@codesourcery.com>
155 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
156 lookup if ordinary name-lookup finds a non-function.
157 * pt.c (tsubst_copy_and_build): Likewise.
160 * parser.c (cp_parser_late_parsing_default_args): Check that there
161 are no extra tokens after the end of the default-argument
164 2004-03-01 Mark Mitchell <mark@codesourcery.com>
167 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
168 having C++ linkage for name-mangling purposes.
171 * parser.c (cp_parser_direct_declarator): Recognize constructor
172 declarators that use a template-id to name the class being
176 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
177 (tsubst_expr): Do not call tsubst_copy, even when
178 processing_template_decl.
180 2004-03-01 Jeff Law <law@redhat.com>
182 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
185 2004-02-29 Mark Mitchell <mark@codesourcery.com>
188 * name-lookup.h (push_scope): Change prototype.
189 * name-lookup.c (push_scope): Do not reenter the current class
191 * decl.c (grokfndecl): Check return code from push_scope before
193 * decl2.c (check_classfn): Likewise.
194 * parser.c (cp_parser_conversion_function_id): Likewise.
195 (cp_parser_init_declarator): Likewise.
196 (cp_parser_direct_declarator): Likewise.
197 (cp_parser_class_specifier): Likewise.
198 (cp_parser_class_head): Likewise.
199 (cp_parser_lookup_name): Likewise.
200 (cp_parser_constructor_declarator_p): Likewise.
201 * pt.c (instantiate_class_template): Likewise.
202 (resolve_typename_type): Likewise.
204 2004-02-29 Mark Mitchell <mark@codesourcery.com>
207 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
211 * class.c (update_vtable_entry_for_fn): Do not go through
212 covariance machinery if the type returned by an overrider is the
213 same as the original.
215 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
217 * call.c: Fix a comment typo.
219 2004-02-27 Ziemowit Laski <zlaski@apple.com>
221 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
223 2004-02-26 Mark Mitchell <mark@codesourcery.com>
226 * parser.c (cp_parser_parameter_declaration_list): Commit
227 to fewer tentative parses.
229 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
232 * pt.c (dependent_type_p_r): A template template parameter is a
235 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
238 * mangle.c (write_template_arg_literal): Don't rely on identity for
241 2004-02-24 Jason Merrill <jason@redhat.com>
243 * tree.c (build_exception_variant): Use check_qualified_type.
245 2004-02-23 Zack Weinberg <zack@codesourcery.com>
246 Kazu Hirata <kazu@cs.umass.edu>
248 * decl.c (cxx_init_decl_processing): Don't check
249 flag_writable_strings.
251 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
254 * typeck.c (maybe_warn_about_returning_address_of_location):
255 Change check for VAR_DECL to use DECL_P instead.
257 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
260 * cvt.c (build_expr_type_conversion): Type must be complete before
261 looking up for conversions.
263 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
266 * name-lookup.c (arg_assoc_class): Don't look into template
267 arguments if it is not a primary template.
269 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
272 * method.c (use_thunk): Always clone function argument tree.
274 2004-02-20 Mark Mitchell <mark@codesourcery.com>
277 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
280 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
281 for all type variants.
283 2004-02-19 Mark Mitchell <mark@codesourcery.com>
286 * decl.c (duplicate_decls): Return error_mark_node for invalid
288 * name-lookup.c (push_namespace): Ignore the return value from
290 * pt.c (push_template_decl_real): Robustify.
293 * name-lookup.c (push_class_level_binding): Do not complain about
294 adding a binding for a member whose name is the same as the
295 enclosing class if the member is located in a base class of the
298 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
301 * parser.c (cp_parser_new_expression): Parse an ill-formed
302 direct-new-declarator after a parenthesized type-id to emit good
305 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
307 * cp-tree.def, cvt.c: Update copyright.
309 2004-02-17 Mark Mitchell <mark@codesourcery.com>
312 * cp-tree.h (abi_version_at_least): Remove.
313 * mangle.c: Include flags.h.
315 2004-02-15 Mark Mitchell <mark@codesourcery.com>
318 * call.c (build_conditional_expr): Handle conversions between
319 class types which result in differently cv-qualified type
323 * class.c (delete_duplicate_fields_1): Remove.
324 (delete_duplicate_fields): Likewise.
325 (finish_struct_anon): Remove check for members with the same name
326 as their enclosing class.
327 (check_field_decls): Do not call duplicate_fields.
328 * decl.c (grokdeclarator): Remove check for static data members
329 with the same name as their enclosing class.
330 * name-lookup.c (push_class_level_binding): Check for members with
331 the same name as their enclosing class.
333 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
336 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
338 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
341 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
342 has full set of arguments.
344 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
347 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
349 2004-02-13 Mark Mitchell <mark@codesourcery.com>
352 * cp-tree.h (delete_sanity): Change prototype.
353 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
354 Remove dead code. Adjust code to warn about deleting an array.
355 * typekc.c (decay_conversion): Use build_address and build_nop.
358 * search.c (accessible_p): Do not check access in thunks.
361 * call.c (build_conditional_expr): Call force_rvalue on the
362 non-void operand in the case that one result is a throw-expression
363 and the other is not.
365 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
368 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
369 the type name and look ahead for ::~, and bail out early with a
370 better error message if the parse is going to fail.
372 2004-02-12 Mark Mitchell <mark@codesourcery.com>
374 * call.c (conversion_kind): New type.
375 (conversion_rank): Likewise.
376 (conversion): Likewise.
377 (CONVERSION_RANK): New macro.
378 (conversion_obstack): New variable.
379 (obstack_initialized): Likewise.
380 (z_candidate): Change type of convs and second_conv.
381 (candidate_warning): New type.
382 (IDENTITY_RANK): Remove.
383 (EXACT_RANK): Likewise.
384 (PROMO_RANK): Likewise.
385 (STD_RANK): Likewise.
386 (PBOOL_RANK): Likewise.
387 (USER_RANK): Likewise.
388 (ELLIPSIS_RANK): Likewise.
389 (BAD_RANK): Likewise.
390 (ICS_RANK): Likewise.
391 (ICS_STD_RANK): Likewise.
392 (ICS_USER_FLAG): Likewise.
393 (ICS_ELLIPSIS_FLAG): Likewise.
394 (ICS_THIS_FLAG): Likewise.
395 (ICS_BAD_FLAG): Likewise.
396 (NEED_TEMPORARY_P): Likewise.
397 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
398 (USER_CONV_CAND): Likewise.
399 (USER_CONV_FN): Likewise.
400 (conversion_obstack_alloc): New function.
401 (alloc_conversion): Likewise.
402 (validate_conversion_obstack): Likewise.
403 (alloc_conversions): Likewise.
404 (build_conv): Adjust to deal with new conversion data structures.
405 (build_identity_conv): New function.
406 (build_ambiguous_conv): Likewise.
407 (standard_conversion): Adjust to deal with new conversion data
409 (convert_class_to_reference): Likewise.
410 (direct_reference_binding): Likewise.
411 (reference_binding): Likewise.
412 (implicit_conversion): Likewise.
413 (add_candidate): Likewise.
414 (add_function_candidate): Likewise.
415 (add_conv_candidate): Likewise.
416 (build_builtin_candidate): Likewise.
417 (print_z_candidate): Likewise.
418 (merge_conversion_sequences): Likewise.
419 (build_user_type_conversion_1): Likewise.
420 (build_user_type_conversion): Likewise.
421 (build_new_function_call): Likewise.
422 (build_object_call): Likewise.
423 (conditional_conversion): Likewise.
424 (build_conditional_expr): Likewise.
425 (build_new_op): Likewise.
426 (build_op_delete_call): Likewise.
427 (convert_like_real): Likewise.
428 (build_over_call): Likewise.
429 (build_new_method_call): Likewise.
430 (is_subseq): Likewise.
431 (maybe_handle_implicit_object): Likewise.
432 (maybe_handle_ref_bind): Likewise.
433 (compare_ics): Likewise.
434 (source_type): Likewise.
435 (add_warning): Likewise.
437 (can_convert_arg): Likewise.
438 (can_convert_arg_bad): Likewise.
439 (perform_implicit_conversion): Likewise.
440 (perform_direct_initialization_if_possible): Likewise.
441 (initialize_reference): Likewise.
442 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
443 * cp-tree.def (WRAPPER): Likewise.
444 (IDENTITY_CONV): Remove.
445 (LVALUE_CONV): Likewise.
446 (QUAL_CONV): Likewise.
447 (STD_CONV): Likewise.
448 (PTR_CONV): Likewise.
449 (PMEM_CONV): Likewise.
450 (BASE_CONV): Likewise.
451 (REF_BIND): Likewise.
452 (USER_CONV): Likewise.
453 (AMBIG_CONV): Likewise.
454 (RVALUE_CONV): Likewise.
455 * cp-tree.h (tree_wrapper): Remove.
456 (WRAPPER_ZC): Remove.
457 (lang_tree_node): Remove wrapper.
458 (LOOKUP_SPECULATIVELY): Remove.
459 (build_op_delete_call): Adjust prototype.
460 (validate_conversion_obstack): Declare.
461 (build_zc_wrapper): Remove.
462 * cvt.c (convert_to_reference): Remove dead code.
463 (ocp_convert): Likewise.
464 * decl.c (redeclaration_error_message): Correct handling of
466 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
467 (cp_tree_node_structure): Remove WRAPPER case.
468 * decl2.c (finish_file): Call validate_conversion_obstack.
469 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
470 (build_op_delete_call): Likewise.
471 (build_x_delete): Likewise.
472 (build_delete): Adjust call to build_op_delete_call.
473 * pt.c (tsubst_friend_declaration): Adjust code to determine
474 whether or not a friend template is a definition.
475 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
476 * tree.c (build_zc_wrapper): Remove.
478 2004-02-12 Zack Weinberg <zack@codesourcery.com>
480 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
481 * cp-tree.h: Don't declare cxx_builtin_type_decls.
482 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
483 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
485 2004-02-10 Mark Mitchell <mark@codesourcery.com>
487 * typeck.c (lookup_destructor): Fix typo in error message.
489 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
491 * call.c, parser.c, tree.c: Fix comment typos.
493 2004-02-07 Zack Weinberg <zack@codesourcery.com>
496 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
497 * decl.c (duplicate_decls, start_function): Likewise.
499 2004-02-07 Zack Weinberg <zack@codesourcery.com>
501 * name-lookup.c (pushdecl): Issue shadow warnings directly.
502 * parser.c (free_parser_stacks): Delete.
504 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
506 * rtti.c: Update copyright.
508 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
511 * decl.c (require_complete_types_for_parms): Do not insert
512 error_mark_node in the parameter list.
514 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
517 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
518 error when terminator can not be found.
520 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
522 Make-lang.in (po-generated): Delete.
524 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
526 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
527 targetm.calls.promote_prototypes.
529 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
533 2004-01-15 Geoffrey Keating <geoffk@apple.com>
535 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
536 (handle_pragma_implementation): Likewise.
538 2004-02-05 Mark Mitchell <mark@codesourcery.com>
541 * typeck.c (lookup_destructor): Tweak error message.
543 2004-02-05 Jan Hubicka <jh@suse.cz>
545 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
548 2003-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
551 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
552 code, only emits the diagnostic now. Added lookup of the identifier
553 and support for qualified ids.
554 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
555 Parse an (invalid) type name as id-expression within a declarator.
556 (cp_parser_simple_declaration): Use it.
557 (cp_parser_member_declaration): Likewise.
558 (cp_parser_make_typename_type): New function. Handle errors through
559 cp_parser_diagnose_invalid_typename.
560 (cp_parser_elaborated_type_specifier): Use it.
562 2004-02-04 Mark Mitchell <mark@codesourcery.com>
565 * call.c (convert_like_real): Use "converting" rather than
566 "argument" as the descriptive keyword to
567 dubious_conversion_warnings.
568 * typeck.c (convert_for_assignment): Do not call
569 dubious_conversion_warnings.
571 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
574 * init.c (build_delete): Emit a more informative error message in
575 case of an incomplete type, and on the correct source line.
577 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
579 * error.c, search.c: Update copyright.
581 2004-02-04 Mark Mitchell <mark@codesourcery.com>
584 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
585 linkage for the typeinfo name string.
587 2004-02-04 Mark Mitchell <mark@codesourcery.com>
590 * cp-tree.h (fold_non_dependent_expr): New function.
591 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
592 (cp_parser_template_argument): Use fold_non_dependent_expr.
593 (cp_parser_direct_declarator): Likewise.
594 * pt.c (fold_non_dependent_expr): New function.
595 (convert_nontype_argument): Use it.
596 (tsubst_qualified_id): Simplify.
597 (tsubst_copy_and_build): Likewise.
599 2004-02-04 Mark Mitchell <mark@codesourcery.com>
601 * decl.c (cxx_push_function_context): Do not set
602 current_function_is_thunk.
603 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
606 2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
609 * pt.c (more_specialized_class): Increase processing_template_decl
610 while partial ordering.
612 2004-02-03 Mark Mitchell <mark@codesourcery.com>
615 * decl.c (start_function): Do not call pushdecl for any
616 instantiation or specialization of a primary template.
618 2004-02-03 Mark Mitchell <mark@codesourcery.com>
621 * parser.c (cp_parser_class_name): Robustify.
624 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
627 * semantics.c (finish_id_expression): Do not return an
628 IDENTIFIER_NODE when lookup finds a PARM_DECL.
630 2004-02-03 Mark Mitchell <mark@codesourcery.com>
633 * pt.c (build_non_dependent_expr): Do not build
634 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
637 * semantics.c (finish_id_expression): Do not return an
638 IDENTIFIER_NODE when lookup finds a VAR_DECL.
641 * parser.c (cp_parser_simple_declaration): When skipping to the
642 end of the statement swallow the terminating semicolon.
644 2004-02-02 Mark Mitchell <mark@codesourcery.com>
647 * init.c (build_offset_ref): Improve error recovery for invalid
648 uses of non-static member functions.
651 * cp-tree.h (cp_build_type_attribute_variant): New function.
652 * class.c (build_clone): Use cp_build_type_attribute_variant.
653 * decl.c (duplicate_decls): Likewise.
654 * pt.c (copy_default_args_to_explicit_spec): Likewise.
655 (tsubst_function_type): Likewise.
656 * tree.c (build_exception_variant): Check attributes before
657 concluding that two types are the same.
658 (cp_build_type-attribute_variant): New method.
659 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
662 * call.c (convert_class_to_reference): Keep better track of
663 pedantically invalid user-defined conversions.
665 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
668 * pt.c (tsubst_qualified_id): Improved error message when a type
669 is expected but not found.
671 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
673 * class.c: Fix comment typos.
676 * parser.c: Likewise.
678 * search.c: Likewise.
679 * typeck.c: Likewise.
681 2004-01-30 Richard Henderson <rth@redhat.com>
684 * method.c (use_thunk): Don't force_target_expr for void thunks.
685 * tree.c (build_target_expr_with_type): Assert non-void type.
686 (force_target_expr): Likewise.
688 2004-01-30 Michael Matz <matz@suse.de>
690 * parser.c (cp_parser_labeled_statement): Accept case ranges.
692 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
696 * decl.c (grokdeclarator): Check immediatly type completeness for
699 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
702 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
703 a sizeof expression.block
705 2004-01-29 Mark Mitchell <mark@codesourcery.com>
708 * mangle.c (write_encoding): Correct encoding of member template
711 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
713 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
714 template name as it was `<::' (digraph typo).
715 (cp_parser_nth_token_starts_template_argument_list_p): New function.
716 (cp_parser_id_expression): Use it.
717 (cp_parser_nested_name_specifier_opt): Likewise.
718 (cp_parser_template_name): Likewise.
719 (cp_parser_class_name): Likewise.
720 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
722 2004-01-28 Mark Mitchell <mark@codesourcery.com>
725 * typeck.c (merge_types): Do not merge attributes into
729 * parser.c (cp_parser_direct_declarator): Do not prevent
730 backtracking inside a parenthesized declarator.
731 (cp_parser_parameter_declaration): Fix typo in comment.
733 2004-01-28 Jan Hubicka <jh@suse.cz>
735 * semantics.c (expand_body) Do emit_associated_thunks before
738 2004-01-27 Devang Patel <dpatel@apple.com>
740 * name-lookup.c: Include "debug.h"
741 (do_namespace_alias): Invoke debug_hooks to emit debug info
743 (do_local_using_decl): Invoke debug_hooks to emit debug info
745 (do_class_using_decl): Same.
746 (do_toplevel_using_decl): Same.
747 (do_using_directive): Same.
748 (cp_emit_debug_info_for_using): New function.
749 * Make-lang.in (cp/parser.o): Depend on debug.h
750 (cp/name-lookup.o): Same.
752 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
754 * cp-tree.h (language_function, lang_type_header): Use
756 * name-lookup.h (cp_binding_level): Likewise.
758 2004-01-26 Mark Mitchell <mark@codesourcery.com>
761 * semantics.c (finish_for_expr): Check for unresolved overloaded
764 * class.c (add_method): Just check processing_template_decl to
765 determine whether or not we are within a template.
766 * decl2.c (maybe_retrofit_in_chrg): Likewise.
767 * init.c (decl_constant_value): Check the type of the declaration,
769 * name-lookup.c (maybe_push_to_top_level): Rename to ...
770 (push_to_top_level): ... this.
771 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
772 * pt.c (push_template_decl_real): Reorder condition for speed.
773 (convert_template_argument): Use dependency-checking functions in
774 place of uses_template_parms.
775 (lookup_template_class): Avoid calling uses_template_parms more
777 (uses_template_parms): Reimplement, using dependency-checking
779 (instantiate_class_template): Use push_to_top_level, not
780 maybe_push_to_top_level.
781 (type_unification_real): Simplify.
782 (type_dependent_expression_p): Handle OFFSET_REFs and
784 (any_dependent_template_arguments_p): Handle multiple levels of
786 * semantics.c (expand_or_defer_fn): Do not check
787 uses_template_parms for template instantiations.
788 * typeck.c (comptypes): Avoid calling cp_type_quals.
790 2004-01-25 Mark Mitchell <mark@codesourcery.com>
793 * call.c (build_over_call): Do not convert arguments when
794 processing a template.
795 * pt.c (build_non_dependent_expr): Do not build a
796 NON_DEPENDENT_EXPR for arithmetic constants.
798 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
801 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
802 returns a TYPE_DECL. no further lookup is required.
803 * semantics.c (check_template_template_default_arg): A TYPE_DECL
804 is invalid. Rework to give better diagnostics.
806 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
809 * pt.c (instantiate_class_template): Add an error_mark_node
811 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
813 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
816 * decl.c (finish_function): Move the call to
817 finish_fname_decls below the call to
818 finish_eh_spec_block.
820 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
822 * optimize.c, typeck2.c: Update copyright.
824 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
826 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
827 init.c, mangle.c, typeck.c: Update copyright.
829 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
831 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
833 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
835 * Make-lang.in: Replace $(docdir) with doc.
836 (c++.info, c++.srcinfo): Dummy entry.
837 (c++.man, c++.srcman): New rules.
838 (c++.install-man): Revamp rule.
840 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
842 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
843 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
844 immediate $(shell) instead of deferred backquote.
846 2004-01-19 Mark Mitchell <mark@codesourcery.com>
849 * parser.c (cp_parser_postfix_expression): When encountering
850 incomplete type on left-hand side of "->" or ".", treat the entire
851 expression as erroneous.
854 * call.c (build_field_call): Remove.
855 (n_build_method_call): Likewise.
856 (build_method_call): Likewise.
857 (build_new_method_call): Do not call build_field_call.
858 * class.c (n_build_method_call): Remove.
859 (print_class_statistics): Do not print it.
860 * cp-tree.h (build_method_call): Remove declaration.
861 (finish_object_call_expr): Likewise.
862 (build_new_1): Do not use build_method_call.
863 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
864 when the function appearing on the right-hand-side of "." or "->"
865 is not actually a function.
866 * pt.c (tsubst_copy_and_build): Likewise.
867 * semantics.c (finish_object_call_expr): Remove.
869 2004-01-18 Mark Mitchell <mark@codesourcery.com>
872 * pt.c (tsubst): Use finish_typeof.
874 2004-01-18 Jason Merrill <jason@redhat.com>
877 * except.c (build_throw): In a template, set
878 current_function_returns_abnormally.
880 2004-01-17 Fred Fish <fnf@intrinsity.com>
883 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
884 except don't call array_type_nelts() with a VECTOR_TYPE.
886 2004-01-16 Jan Hubicka <jh@suse.cz>
888 * mangle.c (write_mangled_name): Remove inline modifier.
890 2004-01-16 Mark Mitchell <mark@codesourcery.com>
893 * decl.c (compute_array_index_type): Fix grammar in comment.
894 * init.c (build_zero_init): Handle zero-sized arrays correctly.
897 * call.c (name_as_c_string): Print conversion operator names
901 * call.c (initialize_reference): Pass -1 for inner parameter to
904 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
907 * parser.c (cp_parser_base_specifier): Check for an invalid
908 keyword `typename' and emit an user-friendly error message.
910 2004-01-15 Geoffrey Keating <geoffk@apple.com>
913 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
914 (handle_pragma_implementation): Likewise.
916 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
919 * typeck.c (build_class_member_access_expr): Allow to access members
920 of the currently open class.
921 (finish_class_member_access_expr): Likewise.
923 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
926 * name-lookup.c (validate_nonmember_using_decl): Take scope and
927 name by value, instead of computing them.
928 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
929 arguments. Pass them to validate_nonmember_using_decl.
930 * name-lookup.h (do_local_using_decl): Adjust.
931 (do_toplevel_using_decl): Likewise.
932 * parser.c (cp_parser_using_declaration): Likewise.
933 * pt.c (tsubst_expr): Likewise.
935 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
939 * name-lookup.c (qualified_lookup_using_namespace): Search
940 strongly-associated namespaces first, and only then try other
943 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
945 * Make-lang.in (c++.srcextra): Dummy entry.
947 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
950 * parser.c (cp_parser_template_name): Don't try to parse a
951 conversion-function-id, as it cannot be a template-name.
952 (cp_parser_simple_type_specifier): Check for invalid template-ids
953 even after a built-in type.
955 2004-01-14 Jan Hubicka <jh@suse.cz>
958 * pt.c (instantiate_decl): Do not increase function_depth.
960 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
964 * parser.c (cp_parser_elaborated_type_specifier): Warn about
965 attributes and discard.
966 * decl.c (xref_tag): Don't overwite existing attributes with
969 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
972 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
973 is no destructor while looking up a BIT_NOT_EXPR.
975 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
977 * cxxfilt.c: Remove unused file.
979 2004-01-14 Jan Hubicka <jh@suse.cz>
981 Partial fix to PR c++/12850
982 * decl2.c (mark_used): Do not proactively instantiate templates
983 when compiling in unit-at-a-time or not optimizing.
984 * optimize.c (maybe_clone_body): Do not increase function depth.
986 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
989 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
991 2003-01-12 Steven Bosscher <stevenb@suse.de>
994 * parser.c (cp_parser_member_declaration): Any non-type is also
995 not a class or a function.
997 2004-01-12 Jason Merrill <jason@redhat.com>
1000 * class.c (build_base_path): Do not mark vtable references as
1002 (build_vtbl_ref_1): Likewise.
1004 2004-01-12 Richard Henderson <rth@redhat.com>
1007 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
1008 (store_init_value): Use it.
1009 * decl.c (check_initializer): Expect full initialization code
1010 from store_init_value.
1011 * init.c (expand_aggr_init_1): Likewise.
1012 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
1014 2004-01-12 Mark Mitchell <mark@codesourcery.com>
1016 * class.c (layout_class_type): For non-POD class types, also copy
1017 the DECL_SIZE and DECL_MODE of fields to the base class type.
1019 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1022 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
1023 calling regenerate_decl_from_template.
1025 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
1028 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
1029 decl-specifier occurring along with a class definition.
1031 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
1033 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
1034 clauses to comments describing declares_class_or_enum.
1035 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
1038 2004-01-12 Jan Hubicka <jh@suse.cz>
1040 * pt.c (for_each_template_parm): Do not check for duplicates.
1041 (for_each_template_parm): Use walk_tree duplicate checking code.
1043 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
1046 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
1047 is error_mark_node, don't add any more decl_specs.
1048 (cp_parser_init_declarator): After committing to a declaration, if
1049 the decl_specifiers start with error_mark_node, issue an error and
1050 change the type to "int".
1052 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
1055 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
1057 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1061 * pt.c (tsubst): Substitution must fail if we are attempting to
1062 create an array with element type that is an abstract class type.
1063 * decl.c (cp_finish_decl): Strip pointers and array types recursively
1064 before calling abstract_virtuals_error.
1066 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
1068 * name-lookup.c (qualified_lookup_using_namespace): Consider
1069 strong using directives even if we've already found a binding.
1071 2004-01-09 Mark Mitchell <mark@codesourcery.com>
1073 * cp-tree.h (cxx_expand_expr): Change prototype.
1074 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
1076 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1079 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
1080 looking into them recursively. They can be there because of the
1081 new __offsetof__ extension.
1083 2004-01-07 Zack Weinberg <zack@codesourcery.com>
1085 * parser.c (cp_parser_save_member_function_body): Mark the
1088 2004-01-05 Mark Mitchell <mark@codesourcery.com>
1091 * class.c (build_clone): Copy type attributes from the original
1092 function to the clone.
1095 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
1096 references as constant.
1099 * parser.c (cp_parser_explicit_instantiation): Improve error
1101 (cp_parser_require): Improve indication of the error location.
1104 * parser.c (cp_parser_class_head): Reorder logic to check for
1105 invalid qualification.
1107 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1110 * name-lookup.c (lookup_using_namespace): Remove spacesp
1112 (unqualified_namespace_lookup): Likewise.
1113 (lookup_qualified_name): Adjust accordingly.
1114 (lookup_name_real): Likewise.
1115 (lookup_arg_dependent): Do not eliminate the namespace of the
1116 functions found by unqualified name lookup unless that is the
1119 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
1121 * semantics.c (push_deferring_access_checks): Fix format.
1122 (resume_deferring_access_checks): Likewise.
1123 (stop_deferring_access_checks): Likewise.
1124 (pop_deferring_access_checks): Likewise.
1125 (get_deferred_access_checks): Likewise.
1126 (pop_to_parent_deferring_access_checks): Likewise.
1127 (perform_deferred_access_checks): Likewise.
1128 (perform_or_defer_access_check): Likewise.
1130 2004-01-04 Richard Henderson <rth@redhat.com>
1132 * call.c (build_over_call): Don't create a save_expr of an
1133 aggregate, but rather its address.
1135 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1138 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
1139 an offsetof expression.
1141 * parser.c (cp_parser_parameter_declaration): Fix comment.
1144 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
1145 (reference_binding): Set it when appropriate.
1146 (build_temp): New function, split out from ...
1147 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
1148 (initialize_reference): Likewise.
1151 * parser.c (cp_parser): Add in_type_id_in_expr_p.
1152 (cp_parser_new): Initialize it.
1153 (cp_parser_postfix_expression): Set it.
1154 (cp_parser_sizeof_operand): Likewise.
1155 (cp_parser_parameteR_declaration): Do not commit early to tenative
1156 parsers when in_type_id_in_expr_p is set.
1158 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1161 * parser.c (cp_parser_template_argument): Don't call
1162 make_unbound_class_template directly.
1163 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
1164 UNBOUND_CLASS_TEMPLATE tree node.
1166 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
1169 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
1171 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1174 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
1175 (DECL_FUNCTION_TEMPLATE_P): Use it.
1176 (DECL_CLASS_TEMPLATE_P): Likewise.
1177 * parser.c (cp_parser_lookup_name): Add is_template parameter.
1178 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
1179 (cp_parser_template_name): Likewise.
1180 (cp_parser_elaborated_type_specifier): Likewise.
1181 (cp_parser_namespace_name): Likewise.
1182 (cp_parser_class_name): Likewise.
1183 (cp_parser_lookup_name_simple): Likewise.
1185 See ChangeLog.3 for earlier changes.