1 2004-03-12 Matt Austern <austern@apple.com>
3 * decl2.c (maybe_make_one_only): Look at
4 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
5 to make an explicit instantiation weak.
6 * method.c (use_thunk): Make sure we call comdat_linkage
8 * pt.c (do_type_instantiation): On systems where weak symbols
9 don't go in a static archive's TOC, explicit instantiation of a
10 class must imply *explicit* instantiation of its memeber.
12 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
14 * call.c, cp-tree.h, pt.c: Fix comment typos.
16 2004-03-10 Mark Mitchell <mark@codesourcery.com>
19 * decl.c (xref_tag): Disregard non-type declarations when
20 looking up a tagged type.
22 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
25 * call.c (convert_like_real): Build a const qualified temporary,
26 when testing ctor access.
28 2004-03-09 Mark Mitchell <mark@codesourcery.com>
30 * call.c (initialize_reference): Fix typo.
32 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
35 * pt.c (determine_specialization): For member templates, match also
39 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
41 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
43 2004-03-09 Mark Mitchell <mark@codesourcery.com>
46 * call.c (initialize_reference): Handle initializers that are
47 class-member access expressions applies to rvalues.
49 2004-03-09 Mark Mitchell <mark@codesourcery.com>
52 * name-lookup.c (supplement_binding): Ignore functions that are
53 marked DECL_ANTICIPATED.
55 2004-03-08 Mark Mitchell <mark@codesourcery.com>
58 * class.c (check_field_decls): Complain about non-static data
59 members of reference type in unions. Propagate
60 CLASSTYPE_REF_FIELDS_NEED_INIT and
61 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
63 * init.c (perform_member_init): Complain about mbmers with const
64 type that are not explicitly initialized.
66 2004-03-08 Mark Mitchell <mark@codesourcery.com>
68 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
69 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
70 (lang_identifier): Remove implicit_decl and error_locus.
71 (IDENTIFIER_IMPLICIT_DECL): Remove.
72 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
73 (IDENTIFIER_ERROR_LOCUS): Likewise.
74 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
75 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
76 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
77 (implicitly_declare): Remove.
78 * decl.c (warn_extern_redeclared_static): Remove check of
79 IDENTIFIER_IMPLICIT_DECL.
80 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
81 (implicitly_declare): Remove.
82 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
83 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
84 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
85 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
86 in the innermost scope, rather than at namespace scope.
87 * name-lookup.c (push_local_binding): Give it external linkage.
88 (pushdecl): Remove dead code.
89 * name-lookup.h (push_local_binding): Declare it.
90 * ptree.c (cxx_print_identifier): Don't print
91 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
92 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
93 not IDENTIFIER_ERROR_LOCUS.
94 * typeck.c (build_function_call): Remove dead code.
96 2004-03-08 Jason Merrill <jason@redhat.com>
99 * decl.c (xref_tag): Remove attribute handling.
100 * cp-tree.h: Adjust prototype.
101 * decl.c, parser.c, rtti.c: Adjust callers.
102 * parser.c (cp_parser_class_head): Pass back attributes in the
104 (cp_parser_class_specifier): Adjust.
106 2004-03-08 Matt Austern <austern@apple.com>
109 * name-lookup.c (add_decl_to_level): Add extern variables, as well
110 as static, to static_decls array.
112 2004-03-05 Jason Merrill <jason@redhat.com>
114 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
116 2004-03-04 Geoffrey Keating <geoffk@apple.com>
118 * decl.c (grokfndecl): Update old incorrect comment.
119 (grokvardecl): Diagnose C++ variables of type with no linkage.
121 2004-03-01 Mark Mitchell <mark@codesourcery.com>
124 * pt.c (build_non_dependent_expr): Do not create a
125 NON_DEPENDENT_EXPR for a THROW_EXPR.
127 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
130 * error.c (dump_expr): Handle THROW_EXPR.
132 2004-03-01 Mark Mitchell <mark@codesourcery.com>
135 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
136 lookup if ordinary name-lookup finds a non-function.
137 * pt.c (tsubst_copy_and_build): Likewise.
140 * parser.c (cp_parser_late_parsing_default_args): Check that there
141 are no extra tokens after the end of the default-argument
144 2004-03-01 Mark Mitchell <mark@codesourcery.com>
147 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
148 having C++ linkage for name-mangling purposes.
151 * parser.c (cp_parser_direct_declarator): Recognize constructor
152 declarators that use a template-id to name the class being
156 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
157 (tsubst_expr): Do not call tsubst_copy, even when
158 processing_template_decl.
160 2004-03-01 Jeff Law <law@redhat.com>
162 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
165 2004-02-29 Mark Mitchell <mark@codesourcery.com>
168 * name-lookup.h (push_scope): Change prototype.
169 * name-lookup.c (push_scope): Do not reenter the current class
171 * decl.c (grokfndecl): Check return code from push_scope before
173 * decl2.c (check_classfn): Likewise.
174 * parser.c (cp_parser_conversion_function_id): Likewise.
175 (cp_parser_init_declarator): Likewise.
176 (cp_parser_direct_declarator): Likewise.
177 (cp_parser_class_specifier): Likewise.
178 (cp_parser_class_head): Likewise.
179 (cp_parser_lookup_name): Likewise.
180 (cp_parser_constructor_declarator_p): Likewise.
181 * pt.c (instantiate_class_template): Likewise.
182 (resolve_typename_type): Likewise.
184 2004-02-29 Mark Mitchell <mark@codesourcery.com>
187 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
191 * class.c (update_vtable_entry_for_fn): Do not go through
192 covariance machinery if the type returned by an overrider is the
193 same as the original.
195 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
197 * call.c: Fix a comment typo.
199 2004-02-27 Ziemowit Laski <zlaski@apple.com>
201 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
203 2004-02-26 Mark Mitchell <mark@codesourcery.com>
206 * parser.c (cp_parser_parameter_declaration_list): Commit
207 to fewer tentative parses.
209 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
212 * pt.c (dependent_type_p_r): A template template parameter is a
215 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
218 * mangle.c (write_template_arg_literal): Don't rely on identity for
221 2004-02-24 Jason Merrill <jason@redhat.com>
223 * tree.c (build_exception_variant): Use check_qualified_type.
225 2004-02-23 Zack Weinberg <zack@codesourcery.com>
226 Kazu Hirata <kazu@cs.umass.edu>
228 * decl.c (cxx_init_decl_processing): Don't check
229 flag_writable_strings.
231 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
234 * typeck.c (maybe_warn_about_returning_address_of_location):
235 Change check for VAR_DECL to use DECL_P instead.
237 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
240 * cvt.c (build_expr_type_conversion): Type must be complete before
241 looking up for conversions.
243 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
246 * name-lookup.c (arg_assoc_class): Don't look into template
247 arguments if it is not a primary template.
249 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
252 * method.c (use_thunk): Always clone function argument tree.
254 2004-02-20 Mark Mitchell <mark@codesourcery.com>
257 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
260 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
261 for all type variants.
263 2004-02-19 Mark Mitchell <mark@codesourcery.com>
266 * decl.c (duplicate_decls): Return error_mark_node for invalid
268 * name-lookup.c (push_namespace): Ignore the return value from
270 * pt.c (push_template_decl_real): Robustify.
273 * name-lookup.c (push_class_level_binding): Do not complain about
274 adding a binding for a member whose name is the same as the
275 enclosing class if the member is located in a base class of the
278 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
281 * parser.c (cp_parser_new_expression): Parse an ill-formed
282 direct-new-declarator after a parenthesized type-id to emit good
285 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
287 * cp-tree.def, cvt.c: Update copyright.
289 2004-02-17 Mark Mitchell <mark@codesourcery.com>
292 * cp-tree.h (abi_version_at_least): Remove.
293 * mangle.c: Include flags.h.
295 2004-02-15 Mark Mitchell <mark@codesourcery.com>
298 * call.c (build_conditional_expr): Handle conversions between
299 class types which result in differently cv-qualified type
303 * class.c (delete_duplicate_fields_1): Remove.
304 (delete_duplicate_fields): Likewise.
305 (finish_struct_anon): Remove check for members with the same name
306 as their enclosing class.
307 (check_field_decls): Do not call duplicate_fields.
308 * decl.c (grokdeclarator): Remove check for static data members
309 with the same name as their enclosing class.
310 * name-lookup.c (push_class_level_binding): Check for members with
311 the same name as their enclosing class.
313 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
316 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
318 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
321 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
322 has full set of arguments.
324 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
327 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
329 2004-02-13 Mark Mitchell <mark@codesourcery.com>
332 * cp-tree.h (delete_sanity): Change prototype.
333 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
334 Remove dead code. Adjust code to warn about deleting an array.
335 * typekc.c (decay_conversion): Use build_address and build_nop.
338 * search.c (accessible_p): Do not check access in thunks.
341 * call.c (build_conditional_expr): Call force_rvalue on the
342 non-void operand in the case that one result is a throw-expression
343 and the other is not.
345 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
348 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
349 the type name and look ahead for ::~, and bail out early with a
350 better error message if the parse is going to fail.
352 2004-02-12 Mark Mitchell <mark@codesourcery.com>
354 * call.c (conversion_kind): New type.
355 (conversion_rank): Likewise.
356 (conversion): Likewise.
357 (CONVERSION_RANK): New macro.
358 (conversion_obstack): New variable.
359 (obstack_initialized): Likewise.
360 (z_candidate): Change type of convs and second_conv.
361 (candidate_warning): New type.
362 (IDENTITY_RANK): Remove.
363 (EXACT_RANK): Likewise.
364 (PROMO_RANK): Likewise.
365 (STD_RANK): Likewise.
366 (PBOOL_RANK): Likewise.
367 (USER_RANK): Likewise.
368 (ELLIPSIS_RANK): Likewise.
369 (BAD_RANK): Likewise.
370 (ICS_RANK): Likewise.
371 (ICS_STD_RANK): Likewise.
372 (ICS_USER_FLAG): Likewise.
373 (ICS_ELLIPSIS_FLAG): Likewise.
374 (ICS_THIS_FLAG): Likewise.
375 (ICS_BAD_FLAG): Likewise.
376 (NEED_TEMPORARY_P): Likewise.
377 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
378 (USER_CONV_CAND): Likewise.
379 (USER_CONV_FN): Likewise.
380 (conversion_obstack_alloc): New function.
381 (alloc_conversion): Likewise.
382 (validate_conversion_obstack): Likewise.
383 (alloc_conversions): Likewise.
384 (build_conv): Adjust to deal with new conversion data structures.
385 (build_identity_conv): New function.
386 (build_ambiguous_conv): Likewise.
387 (standard_conversion): Adjust to deal with new conversion data
389 (convert_class_to_reference): Likewise.
390 (direct_reference_binding): Likewise.
391 (reference_binding): Likewise.
392 (implicit_conversion): Likewise.
393 (add_candidate): Likewise.
394 (add_function_candidate): Likewise.
395 (add_conv_candidate): Likewise.
396 (build_builtin_candidate): Likewise.
397 (print_z_candidate): Likewise.
398 (merge_conversion_sequences): Likewise.
399 (build_user_type_conversion_1): Likewise.
400 (build_user_type_conversion): Likewise.
401 (build_new_function_call): Likewise.
402 (build_object_call): Likewise.
403 (conditional_conversion): Likewise.
404 (build_conditional_expr): Likewise.
405 (build_new_op): Likewise.
406 (build_op_delete_call): Likewise.
407 (convert_like_real): Likewise.
408 (build_over_call): Likewise.
409 (build_new_method_call): Likewise.
410 (is_subseq): Likewise.
411 (maybe_handle_implicit_object): Likewise.
412 (maybe_handle_ref_bind): Likewise.
413 (compare_ics): Likewise.
414 (source_type): Likewise.
415 (add_warning): Likewise.
417 (can_convert_arg): Likewise.
418 (can_convert_arg_bad): Likewise.
419 (perform_implicit_conversion): Likewise.
420 (perform_direct_initialization_if_possible): Likewise.
421 (initialize_reference): Likewise.
422 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
423 * cp-tree.def (WRAPPER): Likewise.
424 (IDENTITY_CONV): Remove.
425 (LVALUE_CONV): Likewise.
426 (QUAL_CONV): Likewise.
427 (STD_CONV): Likewise.
428 (PTR_CONV): Likewise.
429 (PMEM_CONV): Likewise.
430 (BASE_CONV): Likewise.
431 (REF_BIND): Likewise.
432 (USER_CONV): Likewise.
433 (AMBIG_CONV): Likewise.
434 (RVALUE_CONV): Likewise.
435 * cp-tree.h (tree_wrapper): Remove.
436 (WRAPPER_ZC): Remove.
437 (lang_tree_node): Remove wrapper.
438 (LOOKUP_SPECULATIVELY): Remove.
439 (build_op_delete_call): Adjust prototype.
440 (validate_conversion_obstack): Declare.
441 (build_zc_wrapper): Remove.
442 * cvt.c (convert_to_reference): Remove dead code.
443 (ocp_convert): Likewise.
444 * decl.c (redeclaration_error_message): Correct handling of
446 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
447 (cp_tree_node_structure): Remove WRAPPER case.
448 * decl2.c (finish_file): Call validate_conversion_obstack.
449 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
450 (build_op_delete_call): Likewise.
451 (build_x_delete): Likewise.
452 (build_delete): Adjust call to build_op_delete_call.
453 * pt.c (tsubst_friend_declaration): Adjust code to determine
454 whether or not a friend template is a definition.
455 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
456 * tree.c (build_zc_wrapper): Remove.
458 2004-02-12 Zack Weinberg <zack@codesourcery.com>
460 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
461 * cp-tree.h: Don't declare cxx_builtin_type_decls.
462 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
463 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
465 2004-02-10 Mark Mitchell <mark@codesourcery.com>
467 * typeck.c (lookup_destructor): Fix typo in error message.
469 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
471 * call.c, parser.c, tree.c: Fix comment typos.
473 2004-02-07 Zack Weinberg <zack@codesourcery.com>
476 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
477 * decl.c (duplicate_decls, start_function): Likewise.
479 2004-02-07 Zack Weinberg <zack@codesourcery.com>
481 * name-lookup.c (pushdecl): Issue shadow warnings directly.
482 * parser.c (free_parser_stacks): Delete.
484 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
486 * rtti.c: Update copyright.
488 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
491 * decl.c (require_complete_types_for_parms): Do not insert
492 error_mark_node in the parameter list.
494 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
497 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
498 error when terminator can not be found.
500 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
502 Make-lang.in (po-generated): Delete.
504 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
506 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
507 targetm.calls.promote_prototypes.
509 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
513 2004-01-15 Geoffrey Keating <geoffk@apple.com>
515 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
516 (handle_pragma_implementation): Likewise.
518 2004-02-05 Mark Mitchell <mark@codesourcery.com>
521 * typeck.c (lookup_destructor): Tweak error message.
523 2004-02-05 Jan Hubicka <jh@suse.cz>
525 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
528 2003-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
531 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
532 code, only emits the diagnostic now. Added lookup of the identifier
533 and support for qualified ids.
534 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
535 Parse an (invalid) type name as id-expression within a declarator.
536 (cp_parser_simple_declaration): Use it.
537 (cp_parser_member_declaration): Likewise.
538 (cp_parser_make_typename_type): New function. Handle errors through
539 cp_parser_diagnose_invalid_typename.
540 (cp_parser_elaborated_type_specifier): Use it.
542 2004-02-04 Mark Mitchell <mark@codesourcery.com>
545 * call.c (convert_like_real): Use "converting" rather than
546 "argument" as the descriptive keyword to
547 dubious_conversion_warnings.
548 * typeck.c (convert_for_assignment): Do not call
549 dubious_conversion_warnings.
551 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
554 * init.c (build_delete): Emit a more informative error message in
555 case of an incomplete type, and on the correct source line.
557 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
559 * error.c, search.c: Update copyright.
561 2004-02-04 Mark Mitchell <mark@codesourcery.com>
564 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
565 linkage for the typeinfo name string.
567 2004-02-04 Mark Mitchell <mark@codesourcery.com>
570 * cp-tree.h (fold_non_dependent_expr): New function.
571 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
572 (cp_parser_template_argument): Use fold_non_dependent_expr.
573 (cp_parser_direct_declarator): Likewise.
574 * pt.c (fold_non_dependent_expr): New function.
575 (convert_nontype_argument): Use it.
576 (tsubst_qualified_id): Simplify.
577 (tsubst_copy_and_build): Likewise.
579 2004-02-04 Mark Mitchell <mark@codesourcery.com>
581 * decl.c (cxx_push_function_context): Do not set
582 current_function_is_thunk.
583 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
586 2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
589 * pt.c (more_specialized_class): Increase processing_template_decl
590 while partial ordering.
592 2004-02-03 Mark Mitchell <mark@codesourcery.com>
595 * decl.c (start_function): Do not call pushdecl for any
596 instantiation or specialization of a primary template.
598 2004-02-03 Mark Mitchell <mark@codesourcery.com>
601 * parser.c (cp_parser_class_name): Robustify.
604 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
607 * semantics.c (finish_id_expression): Do not return an
608 IDENTIFIER_NODE when lookup finds a PARM_DECL.
610 2004-02-03 Mark Mitchell <mark@codesourcery.com>
613 * pt.c (build_non_dependent_expr): Do not build
614 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
617 * semantics.c (finish_id_expression): Do not return an
618 IDENTIFIER_NODE when lookup finds a VAR_DECL.
621 * parser.c (cp_parser_simple_declaration): When skipping to the
622 end of the statement swallow the terminating semicolon.
624 2004-02-02 Mark Mitchell <mark@codesourcery.com>
627 * init.c (build_offset_ref): Improve error recovery for invalid
628 uses of non-static member functions.
631 * cp-tree.h (cp_build_type_attribute_variant): New function.
632 * class.c (build_clone): Use cp_build_type_attribute_variant.
633 * decl.c (duplicate_decls): Likewise.
634 * pt.c (copy_default_args_to_explicit_spec): Likewise.
635 (tsubst_function_type): Likewise.
636 * tree.c (build_exception_variant): Check attributes before
637 concluding that two types are the same.
638 (cp_build_type-attribute_variant): New method.
639 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
642 * call.c (convert_class_to_reference): Keep better track of
643 pedantically invalid user-defined conversions.
645 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
648 * pt.c (tsubst_qualified_id): Improved error message when a type
649 is expected but not found.
651 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
653 * class.c: Fix comment typos.
656 * parser.c: Likewise.
658 * search.c: Likewise.
659 * typeck.c: Likewise.
661 2004-01-30 Richard Henderson <rth@redhat.com>
664 * method.c (use_thunk): Don't force_target_expr for void thunks.
665 * tree.c (build_target_expr_with_type): Assert non-void type.
666 (force_target_expr): Likewise.
668 2004-01-30 Michael Matz <matz@suse.de>
670 * parser.c (cp_parser_labeled_statement): Accept case ranges.
672 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
676 * decl.c (grokdeclarator): Check immediatly type completeness for
679 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
682 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
683 a sizeof expression.block
685 2004-01-29 Mark Mitchell <mark@codesourcery.com>
688 * mangle.c (write_encoding): Correct encoding of member template
691 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
693 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
694 template name as it was `<::' (digraph typo).
695 (cp_parser_nth_token_starts_template_argument_list_p): New function.
696 (cp_parser_id_expression): Use it.
697 (cp_parser_nested_name_specifier_opt): Likewise.
698 (cp_parser_template_name): Likewise.
699 (cp_parser_class_name): Likewise.
700 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
702 2004-01-28 Mark Mitchell <mark@codesourcery.com>
705 * typeck.c (merge_types): Do not merge attributes into
709 * parser.c (cp_parser_direct_declarator): Do not prevent
710 backtracking inside a parenthesized declarator.
711 (cp_parser_parameter_declaration): Fix typo in comment.
713 2004-01-28 Jan Hubicka <jh@suse.cz>
715 * semantics.c (expand_body) Do emit_associated_thunks before
718 2004-01-27 Devang Patel <dpatel@apple.com>
720 * name-lookup.c: Include "debug.h"
721 (do_namespace_alias): Invoke debug_hooks to emit debug info
723 (do_local_using_decl): Invoke debug_hooks to emit debug info
725 (do_class_using_decl): Same.
726 (do_toplevel_using_decl): Same.
727 (do_using_directive): Same.
728 (cp_emit_debug_info_for_using): New function.
729 * Make-lang.in (cp/parser.o): Depend on debug.h
730 (cp/name-lookup.o): Same.
732 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
734 * cp-tree.h (language_function, lang_type_header): Use
736 * name-lookup.h (cp_binding_level): Likewise.
738 2004-01-26 Mark Mitchell <mark@codesourcery.com>
741 * semantics.c (finish_for_expr): Check for unresolved overloaded
744 * class.c (add_method): Just check processing_template_decl to
745 determine whether or not we are within a template.
746 * decl2.c (maybe_retrofit_in_chrg): Likewise.
747 * init.c (decl_constant_value): Check the type of the declaration,
749 * name-lookup.c (maybe_push_to_top_level): Rename to ...
750 (push_to_top_level): ... this.
751 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
752 * pt.c (push_template_decl_real): Reorder condition for speed.
753 (convert_template_argument): Use dependency-checking functions in
754 place of uses_template_parms.
755 (lookup_template_class): Avoid calling uses_template_parms more
757 (uses_template_parms): Reimplement, using dependency-checking
759 (instantiate_class_template): Use push_to_top_level, not
760 maybe_push_to_top_level.
761 (type_unification_real): Simplify.
762 (type_dependent_expression_p): Handle OFFSET_REFs and
764 (any_dependent_template_arguments_p): Handle multiple levels of
766 * semantics.c (expand_or_defer_fn): Do not check
767 uses_template_parms for template instantiations.
768 * typeck.c (comptypes): Avoid calling cp_type_quals.
770 2004-01-25 Mark Mitchell <mark@codesourcery.com>
773 * call.c (build_over_call): Do not convert arguments when
774 processing a template.
775 * pt.c (build_non_dependent_expr): Do not build a
776 NON_DEPENDENT_EXPR for arithmetic constants.
778 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
781 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
782 returns a TYPE_DECL. no further lookup is required.
783 * semantics.c (check_template_template_default_arg): A TYPE_DECL
784 is invalid. Rework to give better diagnostics.
786 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
789 * pt.c (instantiate_class_template): Add an error_mark_node
791 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
793 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
796 * decl.c (finish_function): Move the call to
797 finish_fname_decls below the call to
798 finish_eh_spec_block.
800 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
802 * optimize.c, typeck2.c: Update copyright.
804 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
806 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
807 init.c, mangle.c, typeck.c: Update copyright.
809 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
811 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
813 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
815 * Make-lang.in: Replace $(docdir) with doc.
816 (c++.info, c++.srcinfo): Dummy entry.
817 (c++.man, c++.srcman): New rules.
818 (c++.install-man): Revamp rule.
820 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
822 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
823 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
824 immediate $(shell) instead of deferred backquote.
826 2004-01-19 Mark Mitchell <mark@codesourcery.com>
829 * parser.c (cp_parser_postfix_expression): When encountering
830 incomplete type on left-hand side of "->" or ".", treat the entire
831 expression as erroneous.
834 * call.c (build_field_call): Remove.
835 (n_build_method_call): Likewise.
836 (build_method_call): Likewise.
837 (build_new_method_call): Do not call build_field_call.
838 * class.c (n_build_method_call): Remove.
839 (print_class_statistics): Do not print it.
840 * cp-tree.h (build_method_call): Remove declaration.
841 (finish_object_call_expr): Likewise.
842 (build_new_1): Do not use build_method_call.
843 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
844 when the function appearing on the right-hand-side of "." or "->"
845 is not actually a function.
846 * pt.c (tsubst_copy_and_build): Likewise.
847 * semantics.c (finish_object_call_expr): Remove.
849 2004-01-18 Mark Mitchell <mark@codesourcery.com>
852 * pt.c (tsubst): Use finish_typeof.
854 2004-01-18 Jason Merrill <jason@redhat.com>
857 * except.c (build_throw): In a template, set
858 current_function_returns_abnormally.
860 2004-01-17 Fred Fish <fnf@intrinsity.com>
863 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
864 except don't call array_type_nelts() with a VECTOR_TYPE.
866 2004-01-16 Jan Hubicka <jh@suse.cz>
868 * mangle.c (write_mangled_name): Remove inline modifier.
870 2004-01-16 Mark Mitchell <mark@codesourcery.com>
873 * decl.c (compute_array_index_type): Fix grammar in comment.
874 * init.c (build_zero_init): Handle zero-sized arrays correctly.
877 * call.c (name_as_c_string): Print conversion operator names
881 * call.c (initialize_reference): Pass -1 for inner parameter to
884 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
887 * parser.c (cp_parser_base_specifier): Check for an invalid
888 keyword `typename' and emit an user-friendly error message.
890 2004-01-15 Geoffrey Keating <geoffk@apple.com>
893 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
894 (handle_pragma_implementation): Likewise.
896 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
899 * typeck.c (build_class_member_access_expr): Allow to access members
900 of the currently open class.
901 (finish_class_member_access_expr): Likewise.
903 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
906 * name-lookup.c (validate_nonmember_using_decl): Take scope and
907 name by value, instead of computing them.
908 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
909 arguments. Pass them to validate_nonmember_using_decl.
910 * name-lookup.h (do_local_using_decl): Adjust.
911 (do_toplevel_using_decl): Likewise.
912 * parser.c (cp_parser_using_declaration): Likewise.
913 * pt.c (tsubst_expr): Likewise.
915 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
919 * name-lookup.c (qualified_lookup_using_namespace): Search
920 strongly-associated namespaces first, and only then try other
923 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
925 * Make-lang.in (c++.srcextra): Dummy entry.
927 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
930 * parser.c (cp_parser_template_name): Don't try to parse a
931 conversion-function-id, as it cannot be a template-name.
932 (cp_parser_simple_type_specifier): Check for invalid template-ids
933 even after a built-in type.
935 2004-01-14 Jan Hubicka <jh@suse.cz>
938 * pt.c (instantiate_decl): Do not increase function_depth.
940 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
944 * parser.c (cp_parser_elaborated_type_specifier): Warn about
945 attributes and discard.
946 * decl.c (xref_tag): Don't overwite existing attributes with
949 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
952 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
953 is no destructor while looking up a BIT_NOT_EXPR.
955 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
957 * cxxfilt.c: Remove unused file.
959 2004-01-14 Jan Hubicka <jh@suse.cz>
961 Partial fix to PR c++/12850
962 * decl2.c (mark_used): Do not proactively instantiate templates
963 when compiling in unit-at-a-time or not optimizing.
964 * optimize.c (maybe_clone_body): Do not increase function depth.
966 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
969 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
971 2003-01-12 Steven Bosscher <stevenb@suse.de>
974 * parser.c (cp_parser_member_declaration): Any non-type is also
975 not a class or a function.
977 2004-01-12 Jason Merrill <jason@redhat.com>
980 * class.c (build_base_path): Do not mark vtable references as
982 (build_vtbl_ref_1): Likewise.
984 2004-01-12 Richard Henderson <rth@redhat.com>
987 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
988 (store_init_value): Use it.
989 * decl.c (check_initializer): Expect full initialization code
990 from store_init_value.
991 * init.c (expand_aggr_init_1): Likewise.
992 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
994 2004-01-12 Mark Mitchell <mark@codesourcery.com>
996 * class.c (layout_class_type): For non-POD class types, also copy
997 the DECL_SIZE and DECL_MODE of fields to the base class type.
999 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1002 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
1003 calling regenerate_decl_from_template.
1005 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
1008 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
1009 decl-specifier occurring along with a class definition.
1011 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
1013 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
1014 clauses to comments describing declares_class_or_enum.
1015 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
1018 2004-01-12 Jan Hubicka <jh@suse.cz>
1020 * pt.c (for_each_template_parm): Do not check for duplicates.
1021 (for_each_template_parm): Use walk_tree duplicate checking code.
1023 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
1026 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
1027 is error_mark_node, don't add any more decl_specs.
1028 (cp_parser_init_declarator): After committing to a declaration, if
1029 the decl_specifiers start with error_mark_node, issue an error and
1030 change the type to "int".
1032 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
1035 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
1037 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1041 * pt.c (tsubst): Substitution must fail if we are attempting to
1042 create an array with element type that is an abstract class type.
1043 * decl.c (cp_finish_decl): Strip pointers and array types recursively
1044 before calling abstract_virtuals_error.
1046 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
1048 * name-lookup.c (qualified_lookup_using_namespace): Consider
1049 strong using directives even if we've already found a binding.
1051 2004-01-09 Mark Mitchell <mark@codesourcery.com>
1053 * cp-tree.h (cxx_expand_expr): Change prototype.
1054 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
1056 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1059 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
1060 looking into them recursively. They can be there because of the
1061 new __offsetof__ extension.
1063 2004-01-07 Zack Weinberg <zack@codesourcery.com>
1065 * parser.c (cp_parser_save_member_function_body): Mark the
1068 2004-01-05 Mark Mitchell <mark@codesourcery.com>
1071 * class.c (build_clone): Copy type attributes from the original
1072 function to the clone.
1075 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
1076 references as constant.
1079 * parser.c (cp_parser_explicit_instantiation): Improve error
1081 (cp_parser_require): Improve indication of the error location.
1084 * parser.c (cp_parser_class_head): Reorder logic to check for
1085 invalid qualification.
1087 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1090 * name-lookup.c (lookup_using_namespace): Remove spacesp
1092 (unqualified_namespace_lookup): Likewise.
1093 (lookup_qualified_name): Adjust accordingly.
1094 (lookup_name_real): Likewise.
1095 (lookup_arg_dependent): Do not eliminate the namespace of the
1096 functions found by unqualified name lookup unless that is the
1099 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
1101 * semantics.c (push_deferring_access_checks): Fix format.
1102 (resume_deferring_access_checks): Likewise.
1103 (stop_deferring_access_checks): Likewise.
1104 (pop_deferring_access_checks): Likewise.
1105 (get_deferred_access_checks): Likewise.
1106 (pop_to_parent_deferring_access_checks): Likewise.
1107 (perform_deferred_access_checks): Likewise.
1108 (perform_or_defer_access_check): Likewise.
1110 2004-01-04 Richard Henderson <rth@redhat.com>
1112 * call.c (build_over_call): Don't create a save_expr of an
1113 aggregate, but rather its address.
1115 2004-01-04 Mark Mitchell <mark@codesourcery.com>
1118 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
1119 an offsetof expression.
1121 * parser.c (cp_parser_parameter_declaration): Fix comment.
1124 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
1125 (reference_binding): Set it when appropriate.
1126 (build_temp): New function, split out from ...
1127 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
1128 (initialize_reference): Likewise.
1131 * parser.c (cp_parser): Add in_type_id_in_expr_p.
1132 (cp_parser_new): Initialize it.
1133 (cp_parser_postfix_expression): Set it.
1134 (cp_parser_sizeof_operand): Likewise.
1135 (cp_parser_parameteR_declaration): Do not commit early to tenative
1136 parsers when in_type_id_in_expr_p is set.
1138 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1141 * parser.c (cp_parser_template_argument): Don't call
1142 make_unbound_class_template directly.
1143 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
1144 UNBOUND_CLASS_TEMPLATE tree node.
1146 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
1149 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
1151 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1154 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
1155 (DECL_FUNCTION_TEMPLATE_P): Use it.
1156 (DECL_CLASS_TEMPLATE_P): Likewise.
1157 * parser.c (cp_parser_lookup_name): Add is_template parameter.
1158 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
1159 (cp_parser_template_name): Likewise.
1160 (cp_parser_elaborated_type_specifier): Likewise.
1161 (cp_parser_namespace_name): Likewise.
1162 (cp_parser_class_name): Likewise.
1163 (cp_parser_lookup_name_simple): Likewise.
1165 See ChangeLog.3 for earlier changes.