1 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
4 * typeck.c (maybe_warn_about_returning_address_of_location):
5 Change check for VAR_DECL to use DECL_P instead.
7 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
10 * cvt.c (build_expr_type_conversion): Type must be complete before
11 looking up for conversions.
13 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
16 * name-lookup.c (arg_assoc_class): Don't look into template
17 arguments if it is not a primary template.
19 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
22 * method.c (use_thunk): Always clone function argument tree.
24 2004-02-20 Mark Mitchell <mark@codesourcery.com>
27 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
30 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
31 for all type variants.
33 2004-02-19 Mark Mitchell <mark@codesourcery.com>
36 * decl.c (duplicate_decls): Return error_mark_node for invalid
38 * name-lookup.c (push_namespace): Ignore the return value from
40 * pt.c (push_template_decl_real): Robustify.
43 * name-lookup.c (push_class_level_binding): Do not complain about
44 adding a binding for a member whose name is the same as the
45 enclosing class if the member is located in a base class of the
48 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
51 * parser.c (cp_parser_new_expression): Parse an ill-formed
52 direct-new-declarator after a parenthesized type-id to emit good
55 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
57 * cp-tree.def, cvt.c: Update copyright.
59 2004-02-17 Mark Mitchell <mark@codesourcery.com>
62 * cp-tree.h (abi_version_at_least): Remove.
63 * mangle.c: Include flags.h.
65 2004-02-15 Mark Mitchell <mark@codesourcery.com>
68 * call.c (build_conditional_expr): Handle conversions between
69 class types which result in differently cv-qualified type
73 * class.c (delete_duplicate_fields_1): Remove.
74 (delete_duplicate_fields): Likewise.
75 (finish_struct_anon): Remove check for members with the same name
76 as their enclosing class.
77 (check_field_decls): Do not call duplicate_fields.
78 * decl.c (grokdeclarator): Remove check for static data members
79 with the same name as their enclosing class.
80 * name-lookup.c (push_class_level_binding): Check for members with
81 the same name as their enclosing class.
83 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
86 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
88 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
91 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
92 has full set of arguments.
94 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
97 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
99 2004-02-13 Mark Mitchell <mark@codesourcery.com>
102 * cp-tree.h (delete_sanity): Change prototype.
103 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
104 Remove dead code. Adjust code to warn about deleting an array.
105 * typekc.c (decay_conversion): Use build_address and build_nop.
108 * search.c (accessible_p): Do not check access in thunks.
111 * call.c (build_conditional_expr): Call force_rvalue on the
112 non-void operand in the case that one result is a throw-expression
113 and the other is not.
115 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
118 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
119 the type name and look ahead for ::~, and bail out early with a
120 better error message if the parse is going to fail.
122 2004-02-12 Mark Mitchell <mark@codesourcery.com>
124 * call.c (conversion_kind): New type.
125 (conversion_rank): Likewise.
126 (conversion): Likewise.
127 (CONVERSION_RANK): New macro.
128 (conversion_obstack): New variable.
129 (obstack_initialized): Likewise.
130 (z_candidate): Change type of convs and second_conv.
131 (candidate_warning): New type.
132 (IDENTITY_RANK): Remove.
133 (EXACT_RANK): Likewise.
134 (PROMO_RANK): Likewise.
135 (STD_RANK): Likewise.
136 (PBOOL_RANK): Likewise.
137 (USER_RANK): Likewise.
138 (ELLIPSIS_RANK): Likewise.
139 (BAD_RANK): Likewise.
140 (ICS_RANK): Likewise.
141 (ICS_STD_RANK): Likewise.
142 (ICS_USER_FLAG): Likewise.
143 (ICS_ELLIPSIS_FLAG): Likewise.
144 (ICS_THIS_FLAG): Likewise.
145 (ICS_BAD_FLAG): Likewise.
146 (NEED_TEMPORARY_P): Likewise.
147 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
148 (USER_CONV_CAND): Likewise.
149 (USER_CONV_FN): Likewise.
150 (conversion_obstack_alloc): New function.
151 (alloc_conversion): Likewise.
152 (validate_conversion_obstack): Likewise.
153 (alloc_conversions): Likewise.
154 (build_conv): Adjust to deal with new conversion data structures.
155 (build_identity_conv): New function.
156 (build_ambiguous_conv): Likewise.
157 (standard_conversion): Adjust to deal with new conversion data
159 (convert_class_to_reference): Likewise.
160 (direct_reference_binding): Likewise.
161 (reference_binding): Likewise.
162 (implicit_conversion): Likewise.
163 (add_candidate): Likewise.
164 (add_function_candidate): Likewise.
165 (add_conv_candidate): Likewise.
166 (build_builtin_candidate): Likewise.
167 (print_z_candidate): Likewise.
168 (merge_conversion_sequences): Likewise.
169 (build_user_type_conversion_1): Likewise.
170 (build_user_type_conversion): Likewise.
171 (build_new_function_call): Likewise.
172 (build_object_call): Likewise.
173 (conditional_conversion): Likewise.
174 (build_conditional_expr): Likewise.
175 (build_new_op): Likewise.
176 (build_op_delete_call): Likewise.
177 (convert_like_real): Likewise.
178 (build_over_call): Likewise.
179 (build_new_method_call): Likewise.
180 (is_subseq): Likewise.
181 (maybe_handle_implicit_object): Likewise.
182 (maybe_handle_ref_bind): Likewise.
183 (compare_ics): Likewise.
184 (source_type): Likewise.
185 (add_warning): Likewise.
187 (can_convert_arg): Likewise.
188 (can_convert_arg_bad): Likewise.
189 (perform_implicit_conversion): Likewise.
190 (perform_direct_initialization_if_possible): Likewise.
191 (initialize_reference): Likewise.
192 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
193 * cp-tree.def (WRAPPER): Likewise.
194 (IDENTITY_CONV): Remove.
195 (LVALUE_CONV): Likewise.
196 (QUAL_CONV): Likewise.
197 (STD_CONV): Likewise.
198 (PTR_CONV): Likewise.
199 (PMEM_CONV): Likewise.
200 (BASE_CONV): Likewise.
201 (REF_BIND): Likewise.
202 (USER_CONV): Likewise.
203 (AMBIG_CONV): Likewise.
204 (RVALUE_CONV): Likewise.
205 * cp-tree.h (tree_wrapper): Remove.
206 (WRAPPER_ZC): Remove.
207 (lang_tree_node): Remove wrapper.
208 (LOOKUP_SPECULATIVELY): Remove.
209 (build_op_delete_call): Adjust prototype.
210 (validate_conversion_obstack): Declare.
211 (build_zc_wrapper): Remove.
212 * cvt.c (convert_to_reference): Remove dead code.
213 (ocp_convert): Likewise.
214 * decl.c (redeclaration_error_message): Correct handling of
216 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
217 (cp_tree_node_structure): Remove WRAPPER case.
218 * decl2.c (finish_file): Call validate_conversion_obstack.
219 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
220 (build_op_delete_call): Likewise.
221 (build_x_delete): Likewise.
222 (build_delete): Adjust call to build_op_delete_call.
223 * pt.c (tsubst_friend_declaration): Adjust code to determine
224 whether or not a friend template is a definition.
225 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
226 * tree.c (build_zc_wrapper): Remove.
228 2004-02-12 Zack Weinberg <zack@codesourcery.com>
230 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
231 * cp-tree.h: Don't declare cxx_builtin_type_decls.
232 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
233 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
235 2004-02-10 Mark Mitchell <mark@codesourcery.com>
237 * typeck.c (lookup_destructor): Fix typo in error message.
239 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
241 * call.c, parser.c, tree.c: Fix comment typos.
243 2004-02-07 Zack Weinberg <zack@codesourcery.com>
246 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
247 * decl.c (duplicate_decls, start_function): Likewise.
249 2004-02-07 Zack Weinberg <zack@codesourcery.com>
251 * name-lookup.c (pushdecl): Issue shadow warnings directly.
252 * parser.c (free_parser_stacks): Delete.
254 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
256 * rtti.c: Update copyright.
258 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
261 * decl.c (require_complete_types_for_parms): Do not insert
262 error_mark_node in the parameter list.
264 2003-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
267 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
268 error when terminator can not be found.
270 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
272 Make-lang.in (po-generated): Delete.
274 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
276 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
277 targetm.calls.promote_prototypes.
279 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
283 2004-01-15 Geoffrey Keating <geoffk@apple.com>
285 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
286 (handle_pragma_implementation): Likewise.
288 2004-02-05 Mark Mitchell <mark@codesourcery.com>
291 * typeck.c (lookup_destructor): Tweak error message.
293 2004-02-05 Jan Hubicka <jh@suse.cz>
295 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
298 2003-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
301 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
302 code, only emits the diagnostic now. Added lookup of the identifier
303 and support for qualified ids.
304 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
305 Parse an (invalid) type name as id-expression within a declarator.
306 (cp_parser_simple_declaration): Use it.
307 (cp_parser_member_declaration): Likewise.
308 (cp_parser_make_typename_type): New function. Handle errors through
309 cp_parser_diagnose_invalid_typename.
310 (cp_parser_elaborated_type_specifier): Use it.
312 2004-02-04 Mark Mitchell <mark@codesourcery.com>
315 * call.c (convert_like_real): Use "converting" rather than
316 "argument" as the descriptive keyword to
317 dubious_conversion_warnings.
318 * typeck.c (convert_for_assignment): Do not call
319 dubious_conversion_warnings.
321 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
324 * init.c (build_delete): Emit a more informative error message in
325 case of an incomplete type, and on the correct source line.
327 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
329 * error.c, search.c: Update copyright.
331 2004-02-04 Mark Mitchell <mark@codesourcery.com>
334 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
335 linkage for the typeinfo name string.
337 2004-02-04 Mark Mitchell <mark@codesourcery.com>
340 * cp-tree.h (fold_non_dependent_expr): New function.
341 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
342 (cp_parser_template_argument): Use fold_non_dependent_expr.
343 (cp_parser_direct_declarator): Likewise.
344 * pt.c (fold_non_dependent_expr): New function.
345 (convert_nontype_argument): Use it.
346 (tsubst_qualified_id): Simplify.
347 (tsubst_copy_and_build): Likewise.
349 2004-02-04 Mark Mitchell <mark@codesourcery.com>
351 * decl.c (cxx_push_function_context): Do not set
352 current_function_is_thunk.
353 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
356 2003-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
359 * pt.c (more_specialized_class): Increase processing_template_decl
360 while partial ordering.
362 2004-02-03 Mark Mitchell <mark@codesourcery.com>
365 * decl.c (start_function): Do not call pushdecl for any
366 instantiation or specialization of a primary template.
368 2004-02-03 Mark Mitchell <mark@codesourcery.com>
371 * parser.c (cp_parser_class_name): Robustify.
374 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
377 * semantics.c (finish_id_expression): Do not return an
378 IDENTIFIER_NODE when lookup finds a PARM_DECL.
380 2004-02-03 Mark Mitchell <mark@codesourcery.com>
383 * pt.c (build_non_dependent_expr): Do not build
384 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
387 * semantics.c (finish_id_expression): Do not return an
388 IDENTIFIER_NODE when lookup finds a VAR_DECL.
391 * parser.c (cp_parser_simple_declaration): When skipping to the
392 end of the statement swallow the terminating semicolon.
394 2004-02-02 Mark Mitchell <mark@codesourcery.com>
397 * init.c (build_offset_ref): Improve error recovery for invalid
398 uses of non-static member functions.
401 * cp-tree.h (cp_build_type_attribute_variant): New function.
402 * class.c (build_clone): Use cp_build_type_attribute_variant.
403 * decl.c (duplicate_decls): Likewise.
404 * pt.c (copy_default_args_to_explicit_spec): Likewise.
405 (tsubst_function_type): Likewise.
406 * tree.c (build_exception_variant): Check attributes before
407 concluding that two types are the same.
408 (cp_build_type-attribute_variant): New method.
409 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
412 * call.c (convert_class_to_reference): Keep better track of
413 pedantically invalid user-defined conversions.
415 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
418 * pt.c (tsubst_qualified_id): Improved error message when a type
419 is expected but not found.
421 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
423 * class.c: Fix comment typos.
426 * parser.c: Likewise.
428 * search.c: Likewise.
429 * typeck.c: Likewise.
431 2004-01-30 Richard Henderson <rth@redhat.com>
434 * method.c (use_thunk): Don't force_target_expr for void thunks.
435 * tree.c (build_target_expr_with_type): Assert non-void type.
436 (force_target_expr): Likewise.
438 2004-01-30 Michael Matz <matz@suse.de>
440 * parser.c (cp_parser_labeled_statement): Accept case ranges.
442 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
446 * decl.c (grokdeclarator): Check immediatly type completeness for
449 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
452 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
453 a sizeof expression.block
455 2004-01-29 Mark Mitchell <mark@codesourcery.com>
458 * mangle.c (write_encoding): Correct encoding of member template
461 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
463 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
464 template name as it was `<::' (digraph typo).
465 (cp_parser_nth_token_starts_template_argument_list_p): New function.
466 (cp_parser_id_expression): Use it.
467 (cp_parser_nested_name_specifier_opt): Likewise.
468 (cp_parser_template_name): Likewise.
469 (cp_parser_class_name): Likewise.
470 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
472 2004-01-28 Mark Mitchell <mark@codesourcery.com>
475 * typeck.c (merge_types): Do not merge attributes into
479 * parser.c (cp_parser_direct_declarator): Do not prevent
480 backtracking inside a parenthesized declarator.
481 (cp_parser_parameter_declaration): Fix typo in comment.
483 2004-01-28 Jan Hubicka <jh@suse.cz>
485 * semantics.c (expand_body) Do emit_associated_thunks before
488 2004-01-27 Devang Patel <dpatel@apple.com>
490 * name-lookup.c: Include "debug.h"
491 (do_namespace_alias): Invoke debug_hooks to emit debug info
493 (do_local_using_decl): Invoke debug_hooks to emit debug info
495 (do_class_using_decl): Same.
496 (do_toplevel_using_decl): Same.
497 (do_using_directive): Same.
498 (cp_emit_debug_info_for_using): New function.
499 * Make-lang.in (cp/parser.o): Depend on debug.h
500 (cp/name-lookup.o): Same.
502 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
504 * cp-tree.h (language_function, lang_type_header): Use
506 * name-lookup.h (cp_binding_level): Likewise.
508 2004-01-26 Mark Mitchell <mark@codesourcery.com>
511 * semantics.c (finish_for_expr): Check for unresolved overloaded
514 * class.c (add_method): Just check processing_template_decl to
515 determine whether or not we are within a template.
516 * decl2.c (maybe_retrofit_in_chrg): Likewise.
517 * init.c (decl_constant_value): Check the type of the declaration,
519 * name-lookup.c (maybe_push_to_top_level): Rename to ...
520 (push_to_top_level): ... this.
521 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
522 * pt.c (push_template_decl_real): Reorder condition for speed.
523 (convert_template_argument): Use dependency-checking functions in
524 place of uses_template_parms.
525 (lookup_template_class): Avoid calling uses_template_parms more
527 (uses_template_parms): Reimplement, using dependency-checking
529 (instantiate_class_template): Use push_to_top_level, not
530 maybe_push_to_top_level.
531 (type_unification_real): Simplify.
532 (type_dependent_expression_p): Handle OFFSET_REFs and
534 (any_dependent_template_arguments_p): Handle multiple levels of
536 * semantics.c (expand_or_defer_fn): Do not check
537 uses_template_parms for template instantiations.
538 * typeck.c (comptypes): Avoid calling cp_type_quals.
540 2004-01-25 Mark Mitchell <mark@codesourcery.com>
543 * call.c (build_over_call): Do not convert arguments when
544 processing a template.
545 * pt.c (build_non_dependent_expr): Do not build a
546 NON_DEPENDENT_EXPR for arithmetic constants.
548 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
551 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
552 returns a TYPE_DECL. no further lookup is required.
553 * semantics.c (check_template_template_default_arg): A TYPE_DECL
554 is invalid. Rework to give better diagnostics.
556 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
559 * pt.c (instantiate_class_template): Add an error_mark_node
561 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
563 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
566 * decl.c (finish_function): Move the call to
567 finish_fname_decls below the call to
568 finish_eh_spec_block.
570 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
572 * optimize.c, typeck2.c: Update copyright.
574 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
576 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
577 init.c, mangle.c, typeck.c: Update copyright.
579 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
581 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
583 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
585 * Make-lang.in: Replace $(docdir) with doc.
586 (c++.info, c++.srcinfo): Dummy entry.
587 (c++.man, c++.srcman): New rules.
588 (c++.install-man): Revamp rule.
590 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
592 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
593 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
594 immediate $(shell) instead of deferred backquote.
596 2004-01-19 Mark Mitchell <mark@codesourcery.com>
599 * parser.c (cp_parser_postfix_expression): When encountering
600 incomplete type on left-hand side of "->" or ".", treat the entire
601 expression as erroneous.
604 * call.c (build_field_call): Remove.
605 (n_build_method_call): Likewise.
606 (build_method_call): Likewise.
607 (build_new_method_call): Do not call build_field_call.
608 * class.c (n_build_method_call): Remove.
609 (print_class_statistics): Do not print it.
610 * cp-tree.h (build_method_call): Remove declaration.
611 (finish_object_call_expr): Likewise.
612 (build_new_1): Do not use build_method_call.
613 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
614 when the function appearing on the right-hand-side of "." or "->"
615 is not actually a function.
616 * pt.c (tsubst_copy_and_build): Likewise.
617 * semantics.c (finish_object_call_expr): Remove.
619 2004-01-18 Mark Mitchell <mark@codesourcery.com>
622 * pt.c (tsubst): Use finish_typeof.
624 2004-01-18 Jason Merrill <jason@redhat.com>
627 * except.c (build_throw): In a template, set
628 current_function_returns_abnormally.
630 2004-01-17 Fred Fish <fnf@intrinsity.com>
633 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
634 except don't call array_type_nelts() with a VECTOR_TYPE.
636 2004-01-16 Jan Hubicka <jh@suse.cz>
638 * mangle.c (write_mangled_name): Remove inline modifier.
640 2004-01-16 Mark Mitchell <mark@codesourcery.com>
643 * decl.c (compute_array_index_type): Fix grammar in comment.
644 * init.c (build_zero_init): Handle zero-sized arrays correctly.
647 * call.c (name_as_c_string): Print conversion operator names
651 * call.c (initialize_reference): Pass -1 for inner parameter to
654 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
657 * parser.c (cp_parser_base_specifier): Check for an invalid
658 keyword `typename' and emit an user-friendly error message.
660 2004-01-15 Geoffrey Keating <geoffk@apple.com>
663 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
664 (handle_pragma_implementation): Likewise.
666 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
669 * typeck.c (build_class_member_access_expr): Allow to access members
670 of the currently open class.
671 (finish_class_member_access_expr): Likewise.
673 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
676 * name-lookup.c (validate_nonmember_using_decl): Take scope and
677 name by value, instead of computing them.
678 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
679 arguments. Pass them to validate_nonmember_using_decl.
680 * name-lookup.h (do_local_using_decl): Adjust.
681 (do_toplevel_using_decl): Likewise.
682 * parser.c (cp_parser_using_declaration): Likewise.
683 * pt.c (tsubst_expr): Likewise.
685 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
689 * name-lookup.c (qualified_lookup_using_namespace): Search
690 strongly-associated namespaces first, and only then try other
693 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
695 * Make-lang.in (c++.srcextra): Dummy entry.
697 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
700 * parser.c (cp_parser_template_name): Don't try to parse a
701 conversion-function-id, as it cannot be a template-name.
702 (cp_parser_simple_type_specifier): Check for invalid template-ids
703 even after a built-in type.
705 2004-01-14 Jan Hubicka <jh@suse.cz>
708 * pt.c (instantiate_decl): Do not increase function_depth.
710 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
714 * parser.c (cp_parser_elaborated_type_specifier): Warn about
715 attributes and discard.
716 * decl.c (xref_tag): Don't overwite existing attributes with
719 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
722 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
723 is no destructor while looking up a BIT_NOT_EXPR.
725 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
727 * cxxfilt.c: Remove unused file.
729 2004-01-14 Jan Hubicka <jh@suse.cz>
731 Partial fix to PR c++/12850
732 * decl2.c (mark_used): Do not proactively instantiate templates
733 when compiling in unit-at-a-time or not optimizing.
734 * optimize.c (maybe_clone_body): Do not increase function depth.
736 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
739 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
741 2003-01-12 Steven Bosscher <stevenb@suse.de>
744 * parser.c (cp_parser_member_declaration): Any non-type is also
745 not a class or a function.
747 2004-01-12 Jason Merrill <jason@redhat.com>
750 * class.c (build_base_path): Do not mark vtable references as
752 (build_vtbl_ref_1): Likewise.
754 2004-01-12 Richard Henderson <rth@redhat.com>
757 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
758 (store_init_value): Use it.
759 * decl.c (check_initializer): Expect full initialization code
760 from store_init_value.
761 * init.c (expand_aggr_init_1): Likewise.
762 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
764 2004-01-12 Mark Mitchell <mark@codesourcery.com>
766 * class.c (layout_class_type): For non-POD class types, also copy
767 the DECL_SIZE and DECL_MODE of fields to the base class type.
769 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
772 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
773 calling regenerate_decl_from_template.
775 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
778 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
779 decl-specifier occurring along with a class definition.
781 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
783 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
784 clauses to comments describing declares_class_or_enum.
785 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
788 2004-01-12 Jan Hubicka <jh@suse.cz>
790 * pt.c (for_each_template_parm): Do not check for duplicates.
791 (for_each_template_parm): Use walk_tree duplicate checking code.
793 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
796 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
797 is error_mark_node, don't add any more decl_specs.
798 (cp_parser_init_declarator): After committing to a declaration, if
799 the decl_specifiers start with error_mark_node, issue an error and
800 change the type to "int".
802 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
805 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
807 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
811 * pt.c (tsubst): Substitution must fail if we are attempting to
812 create an array with element type that is an abstract class type.
813 * decl.c (cp_finish_decl): Strip pointers and array types recursively
814 before calling abstract_virtuals_error.
816 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
818 * name-lookup.c (qualified_lookup_using_namespace): Consider
819 strong using directives even if we've already found a binding.
821 2004-01-09 Mark Mitchell <mark@codesourcery.com>
823 * cp-tree.h (cxx_expand_expr): Change prototype.
824 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
826 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
829 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
830 looking into them recursively. They can be there because of the
831 new __offsetof__ extension.
833 2004-01-07 Zack Weinberg <zack@codesourcery.com>
835 * parser.c (cp_parser_save_member_function_body): Mark the
838 2004-01-05 Mark Mitchell <mark@codesourcery.com>
841 * class.c (build_clone): Copy type attributes from the original
842 function to the clone.
845 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
846 references as constant.
849 * parser.c (cp_parser_explicit_instantiation): Improve error
851 (cp_parser_require): Improve indication of the error location.
854 * parser.c (cp_parser_class_head): Reorder logic to check for
855 invalid qualification.
857 2004-01-04 Mark Mitchell <mark@codesourcery.com>
860 * name-lookup.c (lookup_using_namespace): Remove spacesp
862 (unqualified_namespace_lookup): Likewise.
863 (lookup_qualified_name): Adjust accordingly.
864 (lookup_name_real): Likewise.
865 (lookup_arg_dependent): Do not eliminate the namespace of the
866 functions found by unqualified name lookup unless that is the
869 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
871 * semantics.c (push_deferring_access_checks): Fix format.
872 (resume_deferring_access_checks): Likewise.
873 (stop_deferring_access_checks): Likewise.
874 (pop_deferring_access_checks): Likewise.
875 (get_deferred_access_checks): Likewise.
876 (pop_to_parent_deferring_access_checks): Likewise.
877 (perform_deferred_access_checks): Likewise.
878 (perform_or_defer_access_check): Likewise.
880 2004-01-04 Richard Henderson <rth@redhat.com>
882 * call.c (build_over_call): Don't create a save_expr of an
883 aggregate, but rather its address.
885 2004-01-04 Mark Mitchell <mark@codesourcery.com>
888 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
889 an offsetof expression.
891 * parser.c (cp_parser_parameter_declaration): Fix comment.
894 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
895 (reference_binding): Set it when appropriate.
896 (build_temp): New function, split out from ...
897 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
898 (initialize_reference): Likewise.
901 * parser.c (cp_parser): Add in_type_id_in_expr_p.
902 (cp_parser_new): Initialize it.
903 (cp_parser_postfix_expression): Set it.
904 (cp_parser_sizeof_operand): Likewise.
905 (cp_parser_parameteR_declaration): Do not commit early to tenative
906 parsers when in_type_id_in_expr_p is set.
908 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
911 * parser.c (cp_parser_template_argument): Don't call
912 make_unbound_class_template directly.
913 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
914 UNBOUND_CLASS_TEMPLATE tree node.
916 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
919 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
921 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
924 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
925 (DECL_FUNCTION_TEMPLATE_P): Use it.
926 (DECL_CLASS_TEMPLATE_P): Likewise.
927 * parser.c (cp_parser_lookup_name): Add is_template parameter.
928 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
929 (cp_parser_template_name): Likewise.
930 (cp_parser_elaborated_type_specifier): Likewise.
931 (cp_parser_namespace_name): Likewise.
932 (cp_parser_class_name): Likewise.
933 (cp_parser_lookup_name_simple): Likewise.
935 See ChangeLog.3 for earlier changes.