1 2003-12-30 Nathan Sidwell <nathan@codesourcery.com>
4 * decl.c (duplicate_decls): Use build_type_attribute_variant to
8 * tree.c (build_cplus_array_type_1): Only build a minimal array
9 type for dependent types or domains.
11 2003-12-29 Nathan Sidwell <nathan@codesourcery.com>
14 * typeck.c (comp_array_types): Fold non-dependent domains for
17 2003-12-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
20 * semantics.c (finish_id_expression): Only check if the type of
21 a template argument is integral or enumeration when it is not
24 2003-12-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
27 * parser.c (cp_parser_template_declaration_after_export): Set up
28 template specialization scope in case of explicit specialization.
30 2003-12-28 Mark Mitchell <mark@codesourcery.com>
33 * decl.c (duplicate_decls): Preserve inline-ness when redeclaring
37 * decl.c (reshape_init): Reject GNU colon-style designated
38 initializers in arrays.
41 * call.c (build_special_member_call): Do not assume that we have a
42 pointer to the complete object in an assignment operator.
44 2003-12-28 Roger Sayle <roger@eyesopen.com>
47 * decl.c (duplicate_decls): When setting the type of an anticipated
48 declaration, merge the existing type attributes.
50 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
52 PR c++/13268, c++/13339
53 * class.c (add_method): Return early when method is error_mark_node.
54 * pt.c (tsubst_friend_function): Return early when new_friend is
57 2003-12-23 Mark Mitchell <mark@codesourcery.com>
59 * cp-lang.c (cp_expr_size): Return zero for empty classes.
61 * cp-tree.h (warn_if_uknown_interface): Remove unused function.
62 * decl2.c (warn_if_unknown_interface): Likewise.
64 2003-12-23 Nathan Sidwell <nathan@codesourcery.com>
67 * cp-lang.c (cxx_get_alias_set): Correct logic for a base type.
69 2003-12-22 Mark Mitchell <mark@codesourcery.com>
71 * decl.c (start_function): Do not check
72 flag_alt_external_templates or flag_external_templates.
73 * decl2.c (warn_if_unknown_interface): Likewise.
74 * lex.c (extract_interface_info): Likewise.
75 * pt.c (lookup_template_class): Likewise.
78 * name-lookup.c (pushdecl): Look up all namespace-scope entities
79 in their corresponding namespace.
82 * typeck.c (finish_class_member_access_expr): Don't tree
83 IDENTIFIER_NODEs as non-dependent expressions.
85 2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
88 * tree.c (cp_start_inlining): Remove.
89 (cp_end_inlining): Remove.
90 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define.
91 (LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define.
92 * cp-tree.h (cp_start_inlining): Do not declare.
93 (cp_end_inlining): Do not declare.
95 2003-12-22 Mark Mitchell <mark@codesourcery.com>
98 * parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;"
99 pedwarn when not in a system header.
101 2003-12-21 Mark Mitchell <mark@codesourcery.com>
103 * cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE,
104 CPTI_UNION_TYPE, CPTI_ENUM_TYPE.
105 (record_type_node): Remove.
106 (union_type_node): Likewise.
107 (enum_type_node): Likewise.
108 * decl.c: Remove mention of above tree nodes in comment.
109 * lex.c (cxx_init): Do not assign to record_type_node,
110 union_type_node, or enum_type_node. Simplify handling of
114 * init.c (sort_mem_initializers): Add warning.
116 2003-12-21 Kazu Hirata <kazu@cs.umass.edu>
118 * call.c: Fix comment formatting.
120 * cp-tree.h: Likewise.
122 * cxx-pretty-print.c: Likewise.
126 * except.c: Likewise.
128 * name-lookup.c: Likewise.
129 * parser.c: Likewise.
132 * semantics.c: Likewise.
133 * typeck.c: Likewise.
134 * typeck2.c: Likewise.
136 2003-12-19 Kazu Hirata <kazu@cs.umass.edu>
138 * cvt.c: Remove uses of "register" specifier in
139 declarations of arguments and local variables.
143 * friend.c: Likewise.
145 * name-lookup.c: Likewise.
147 * search.c: Likewise.
149 * typeck.c: Likewise.
150 * typeck2.c: Likewise.
152 2003-12-19 Mark Mitchell <mark@codesourcery.com>
155 * name-lookup.c (pushdecl): Do not treated any functions as being
158 2003-12-19 Jason Merrill <jason@redhat.com>
161 * typeck.c (build_modify_expr): Stabilize lhs if we're narrowing.
162 * cvt.c (convert_to_void): Don't warn about the RHS of a comma
163 being useless if TREE_NO_UNUSED_WARNING is set.
165 2003-12-18 Richard Henderson <rth@redhat.com>
167 * cp-tree.h (struct lang_type_header): Remove __extension__.
169 2003-12-18 Jason Merrill <jason@redhat.com>
172 * init.c (build_vec_init): Initialization of an element from
173 an initializer list is also a full-expression.
175 * parser.c, pt.c, semantics.c: Rename constant_expression_p
176 to integral_constant_expression_p.
178 2003-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
181 * pt.c (instantiate_decl): Wrap push_nested_class and
182 pop_nested_class around cp_finish_decl call for static member
185 2003-12-18 Giovanni Bajo <giovannibajo@gcc.gnu.org>
188 * parser.c (cp_parser_template_argument): A type-id followed by '>>'
189 is just an user typo, and should be accepted as last resort if any
191 (cp_parser_enclosed_template_argument_list): If the argument list is
192 parsed correctly, but the next token is '>>', emit a diagnostic.
193 (cp_parser_next_token_ends_template_argument): Accept '>>' as
194 delimiter of template argument, it will be later detected as a typo.
196 2003-12-17 Kelley Cook <kcook@gcc.gnu.org>
198 * Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1.
200 2003-12-17 Mark Mitchell <mark@codesourcery.com>
204 * parser.c (cp_parser_error): Help c_parse_error print good
205 messages if the next token is a keyword.
206 (cp_parser_parameter_declaration_list): When resynchronizing after
207 a bad parameter declaration, stop if a comma is found.
208 (cp_parser_parameter_declaration): Avoid backtracking.
210 2003-12-16 Mark Mitchell <mark@codesourcery.com>
213 * decl.c (reshape_init): Recover quickly from errors.
215 2003-12-16 Nathan Sidwell <nathan@codesourcery.com>
218 C++ ABI change: Mangling array indices in templates.
219 * decl.c (compute_array_index_type): Reorganize for earlier
220 template errors. Use value_dependent_expression_p for abi-2.
221 * mangle.c (write_array_type): Check broken mangling for
222 expression indices on abi-1
224 2003-12-16 Mark Mitchell <mark@codesourcery.com>
227 * decl.c (reshape_init): Recover quickly from errors.
230 * lex.c (reswords): Add "__offsetof" and "__offsetof__".
231 * parser.c (cp_parser): Add in_offsetof_p.
232 (cp_parser_new): Initialize it.
233 (cp_parser_primary_expression): Handle __offsetof__ (...).
234 (cp_parser_postfix_expression): Allow casts to pointer type and
235 uses of "->" in a constant expression if implementing offsetof.
236 (cp_parser_unary_expression): Allow the use of "&" in a constant
237 expression if implementing offsetof.
239 2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
242 * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
243 if the declaration comes from an using declaration.
245 2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
247 * semantics.c (finish_id_expression): Refactor the code to handle
248 template parameters, and emit a more informative error message
249 when they are used within an integral constant expression.
251 2003-12-16 Nathan Sidwell <nathan@codesourcery.com>
254 * class.c (finish_struct_1): Compute mode and alias set for
256 * call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial
257 assignment of a class, as necessary.
258 * cp-lang.c (cxx_get_alias_set): The alias set as a base is the
259 same as for the complete type.
262 C++ ABI change. Mangling template parameters of reference type
263 * mangle.c (write_template_args): Remove unreachable code.
264 (write_template_arg): Look through an argument of reference type.
266 2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
269 * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
270 if the declaration comes from an using declaration.
272 2003-12-15 Mark Mitchell <mark@codesourcery.com>
275 * decl2.c (grokfield): Robustify.
278 * parser.c (cp_parser_throw_expression): Determine whether or not
279 an assignment-expression is present by doing one-token lookahead.
282 * parser.c (cp_parser_function_definition_after_declarator): Stop
283 scanning tokens when reaching EOF.
286 * typeck.c (cxx_sizeof_or_alignof_expr): Robustify.
289 * pt.c (dependent_template_p): Handle OVERLOADs.
291 2003-12-15 Mark Mitchell <mark@codesourcery.com>
295 * parser.c (cp_parser_postfix_expression): Tighten handling of
296 integral constant expressions.
297 (cp_parser_unary_expression): Likewise.
298 * pt.c (value_dependent_expression_p): Remove handling for
301 2003-12-15 Nathan Sidwell <nathan@codesourcery.com>
303 * class.c (add_method): Disallow destructor for java classes.
304 * decl.c (xref_basetypes): Check java class inheritance.
305 * decl2.c (check_java_method): Skip artificial params.
308 C++ ABI change. Mangling of symbols in expressions.
309 * mangle.c (write_mangled_name): Add top_level flag. Rework for
310 nested and unnested mangling. Deal with abi version 1 and version
312 (write_expression): Adjust write_mangled_name call.
313 (mangle_decl_string): Use write_mangled_name for all non-type decls.
315 2003-12-14 Mark Mitchell <mark@codesourcery.com>
319 * parser.c (struct cp_parser): Add in_template_argument_list_p.
320 (cp_parser_error): Use c_parse_error.
321 (cp_parser_name_lookup_error): New function.
322 (cp_parser_new): Initialize it.
323 (cp_parser_declarator): Add parenthesized_p parameter.
324 (cp_parser_nested_name_specifier_opt): Use
325 cp_parser_name_lookup_error.
326 (cp_parser_parenthesized_expression_list): Improve comments.
327 (cp_parser_condition): Adjust call to cp_parser_declarator.
328 (cp_parser_template_parameter): Adjust call to
329 cp_parser_parameter_declaration.
330 (cp_parser_template_argument_list): Set
331 in_template_argument_list_p.
332 (cp_parser_explicit_instantiation): Adjust call to
333 cp_parser_declarator.
334 (cp_parser_simple_type_specifier): Remove unncessary code.
335 (cp_parser_using_declaration): Use cp_parser_name_lookup_error.
336 (cp_parser_init_declarator): Handle member function definitions.
337 (cp_parser_direct_declarator): Adjust call to
338 cp_parser_declarator.
339 (cp_parser_type_id): Adjust call to cp_parser_declarator.
340 (cp_parser_parameter_declaration_list): Avoid backtracking where
342 (cp_parser_parameter_declaration): Add parenthesized_p parameter.
343 (cp_parser_function_definition): Remove.
344 (cp_parser_member_declaration): Do not backtrack to look for
345 function definitions.
346 (cp_parser_exception_declaration): Adjust call to
347 cp_parser_declarator.
348 (cp_parser_single_declaration): Handle function definitions via
349 cp_parser_init_declarator.
350 (cp_parser_save_member_function_body): New function.
352 2003-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
355 * decl.c (finish_function): Check if return type is dependent before
356 issuing no return statement warning.
358 2003-12-12 Nathan Sidwell <nathan@codesourcery.com>
361 * cp-tree.h (lang_decl_u): Add thunk_alias member.
362 (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL.
363 (THUNK_ALIAS_P): Remove.
364 (THUNK_ALIAS): Adjust.
365 * class.c (update_vtable_entry_for_fn): Get the vbase within the
366 overriding function's return type.
367 (dump_thunk): Adjust THUNK_ALIAS printing.
368 (build_vtbl_initializer): Adjust THUNK_ALIAS use.
369 * method.c (make_thunk): Revert 12881 test change. Clear
371 (finish_thunk): Adjust THUNK_ALIAS setting.
372 (use_thunk): Adjust THUNK_ALIAS use.
373 * semantics.c (emit_associated_thunks): Likewise.
375 PR c++/13114, c++/13115
376 * class.c (layout_empty_base): Propagate the move of an empty base
380 * method.c (make_thunk): Deal with thunk aliases when searching
381 for a thunk. Robustify assertion.
383 2003-12-11 Nathan Sidwell <nathan@codesourcery.com>
385 * mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only.
386 (hash_type): Use TYPE_UID of the identifier's type.
387 (compare_type): Adjust.
388 (mangle_conv_op_name_for_type): Store identifier nodes only, use
389 TYPE_UID has hash value.
391 2003-12-10 Mark Mitchell <mark@codesourcery.com>
393 * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.
395 2003-12-08 Matt Austern <austern@apple.com>
398 * decl.c (duplicate_decls): Copy visibility flag when appropriate.
400 2003-12-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
402 * init.c (build_new_1): Deal with an OVERLOAD set when
403 looking up for _Jv_AllocObject.
404 * except.c (build_throw): Likewise for _Jv_Throw.
406 2003-12-08 Jason Merrill <jason@redhat.com>
409 * tree.c (build_local_temp): Split out from build_cplus_new.
410 (force_target_expr): New fn.
411 * call.c (call_builtin_trap): Call it. Take a type parm.
412 (convert_arg_to_ellipsis): Pass it.
413 (build_x_va_arg): Use call_builtin_trap.
416 * call.c (magic_varargs_p): New fn.
417 (build_over_call): Do no ellipsis conversions for arguments to
418 functions with magic varargs.
420 * name-lookup.c, init.c, except.c: Revert Giovanni's patch from
423 Give the anonymous namespace a null DECL_NAME.
424 * cp-tree.h: Don't declare anonymous_namespace_name.
425 * decl.c: Don't define it.
426 * dump.c (cp_dump_tree): Don't check for it.
427 * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
428 * error.c (dump_decl): Likewise.
429 * name-lookup.c: Define it here.
430 (push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
431 * mangle.c (write_unqualified_name): Adjust.
433 2003-12-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
436 * name-lookup.c (push_overloaded_decl): Always construct an
437 OVERLOAD unless the declaration is a built-in.
438 (set_namespace_binding): While binding OVERLOADs with only one
439 declaration, we still need to call supplement_binding.
440 * init.c (build_new_1): Deal with an OVERLOAD set when
441 looking up for _Jv_AllocObject.
442 * except.c (build_throw): Likewise for _Jv_Throw.
444 2003-12-06 Mark Mitchell <mark@codesourcery.com>
447 * class.c (same_signature_p): Handle conversion operators
449 (check_for_override): Likewise.
451 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
453 * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
454 (c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
455 (c++.uninstall): Likewise.
457 2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
458 Mark Mitchell <mark@codesourcery.com>
461 * parser.c (cp_parser_elaborated_type_specifier): Accept
464 2003-12-05 Mark Mitchell <mark@codesourcery.com>
467 * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
469 (cp_parser_class_head): Likewise.
471 2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
474 * parser.c (cp_parser_late_parsing_default_args): Make sure the
475 context is a class before calling push_nested_class and
478 2003-12-03 James E Wilson <wilson@specifixinc.com>
480 * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
483 2003-12-03 Mark Mitchell <mark@codesourcery.com>
486 * cp-tree.h (at_namespace_scope_p): New function.
487 * parser.c (cp_parser_class_head): Handle invalid explicit
489 * search.c (at_namespace_scope_p): New function.
492 * semantics.c (finish_handler_parms): Do not call eh_type_info for
493 types used in templates.
496 * parser.c (cp_parser_check_for_invalid_template_id): New
498 (cp_parser_simple_type_specifier): Use it.
499 (cp_parser_elaborated_type_specifier): Likewise.
500 (cp_parser_class_head): Likewise.
502 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
505 * pt.c (convert_nontype_argument): Handle default conversions
506 while converting a pointer to member function.
508 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
511 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
512 looking into them recursively.
514 2003-12-02 Richard Henderson <rth@redhat.com>
516 * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
517 * parser.c (struct cp_token): Likewise.
518 (struct cp_parser_token_tree_map_node): Likewise.
519 * lex.c (struct resword): Move const after ENUM_BITFIELD.
521 2003-11-30 Mark Mitchell <mark@codesourcery.com>
524 * parser.c (cp_lexer_prev_token): New function.
525 (cp_parser_skip_to_closing_parenthesis): Add consume_paren
527 (cp_parser_nested_name_specifier_opt): Add is_declaration
529 (cp_parser_nested_name_specifier): Likewise.
530 (cp_parser_class_or_namespace_name): Likewise.
531 (cp_parser_class_name): Likewise.
532 (cp_parser_template_id): Likewise.
533 (cp_parser_template_name): Likewise.
534 (cp_parser_id_expression): Adjust calls to
535 cp_parser_nested_name_specifier_op, cp_parser_template_id,
536 cp_parser_class_name.
537 (cp_parser_unqualified_id): Likewise.
538 (cp_parser_postfix_expression): Likewise.
539 (cp_parser_pseudo_destructor_name): Likewise.
540 (cp_parser_cast_expression): Likewise.
541 (cp_parser_mem_initializer_id): Likewise.
542 (cp_parser_simple_type_specifier): Likewise.
543 (cp_parser_type_name): Likewise.
544 (cp_parser_elaborated_type_specifier): Likewise.
545 (cp_parser_qualified_namespace_specifier): Likewise.
546 (cp_parser_using_declaration): Likewise.
547 (cp_parser_using_directive): Likewise.
548 (cp_parser_ptr_operator): Likewise.
549 (cp_parser_declarator_id): Likewise.
550 (cp_parser_class_head): Likewise.
551 (cp_parser_base_specifier): Likewise.
552 (cp_parser_constructor_declarator_p): Likewise.
553 (cp_parser_direct_declarator): Fix typo in comment.
554 (cp_parser_parenthesized_expression_list): Adjust call to
555 cp_parser_skip_to_closing_parenthesis.
556 (cp_parser_selection_statement): Likewise.
558 2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
561 * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
562 with OVERLOAD and DECL nodes as the first operand.
564 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
566 * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
568 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
571 * friend.c (is_friend): Handle member function of a class
572 template as template friend.
573 (do_friend): Likewise.
574 * decl2.c (check_classfn): Add template_header_p parameter.
575 * decl.c (start_decl): Adjust check_classfn call.
576 (grokfndecl): Likewise.
577 * pt.c (is_specialization_of_friend): New function.
578 (uses_template_parms_level): Likewise.
579 (push_template_decl_real): Use uses_template_parms_level.
580 (tsubst_friend_function): Adjust check_classfn call.
581 * cp-tree.h (check_classfn): Adjust declaration.
582 (uses_template_parms_level): Add declaration.
583 (is_specialization_of_friend): Likewise.
585 2003-11-21 Mark Mitchell <mark@codesourcery.com>
588 * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
591 2003-11-21 Jan Hubicka <jh@suse.cz>
593 * parser.c (cp_parser_postfix_expression): Initialize 's' to
596 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
598 * Make-lang.in (c++.extraclean): Delete.
600 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
602 * Make-lang.in (check-g++, lang_checks): Add.
604 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
607 * class.c (currently_open_derived_class): Check if
608 current_class_type is NULL_TREE.
609 * semantics.c (finish_call_expr): Check if
610 currently_open_derived_class returns NULL_TREE.
611 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
614 2003-11-17 Jason Merrill <jason@redhat.com>
616 * init.c (build_new_1): Preevaluate placement args.
617 * call.c (build_op_delete_call): Don't expose placement args to
620 2003-11-16 Jason Merrill <jason@redhat.com>
622 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
623 and TAGS files that include them for each front end.
625 2003-11-15 Bernardo Innocenti <bernie@develer.com>
628 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
629 build failure on libjava.
631 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
634 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
635 unless the declaration is a built-in.
636 (set_namespace_binding): While binding OVERLOADs with only one
637 declaration, we still need to call supplement_binding.
639 2003-11-14 Mark Mitchell <mark@codesourcery.com>
642 * parser.c (cp_parser_enclosed_template_argument_list): New
644 (cp_parser_template_id): Use it.
645 (cp_parser_simple_type_specifier): Recognize invalid template
648 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
651 * pt.c (unify): Add support for PTRMEM_CST and
652 FIELD_DECL unification.
654 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
656 * decl.c (grokfndecl): Change OK to type tree.
658 2003-11-12 Mark Mitchell <mark@codesourcery.com>
660 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
663 * decl.c (cp_make_fname_decl): When creating a top-level
664 __FUNCTION__-like symbol, do register it with pushdecl.
666 * decl.c (finish_case_label): Do not check that we are within a
667 switch statement here.
668 * parser.c (struct cp_parser): Add in_iteration_statement_p and
669 in_switch_statement_p.
670 (cp_parser_new): Initialize them.
671 (cp_parser_labeled_statement): Check validity of case labels
673 (cp_parser_selection_statement): Set in_switch_statement_p.
674 (cp_parser_iteration_statement): Set in_iteration_statement_p.
675 (cp_parser_jump_statement): Check validity of break/continue
679 * cp-tree.h (duplicate_decls): Return a tree.
680 * decl.c (duplicate_decls): Clarify documentation. Return
681 error_mark_node to indicate a failed redeclaration.
682 * friend.c (do_friend): Handle that case.
683 * name-lookup.c (pushdecl): Likewise.
685 2003-11-11 Jason Merrill <jason@redhat.com>
687 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
688 * name-lookup.c (parse_using_directive): New fn.
689 (is_associated_namespace): New fn.
690 (arg_assoc_namespace): Also check associated namespaces.
691 * name-lookup.h: Declare new fns.
692 * pt.c (maybe_process_partial_specialization): Allow
693 specialization in associated namespace.
694 * parser.c (cp_parser_using_directive): Accept attributes. Use
695 parse_using_directive.
697 2003-11-10 Richard Henderson <rth@redhat.com>
699 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
701 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
704 * name-lookup.c (supplement_binding): Gracefully handle names
705 used at non-class scope prior declaration.
707 2003-11-06 Matt Austern <austern@apple.com>
709 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
710 * method.c (use_thunk): give thunk same visibility as function.
711 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
713 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
716 * pt.c (instantiate_pending_templates): Save and restore
719 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
722 * friend.c (add_friend): Don't display previous declaration in
723 case of duplicate friend warning.
725 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
728 * call.c (build_over_call): Check access using primary template
729 if FN is a member function template.
731 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
734 * class.c (handle_using_decl): Set input_location before calling
737 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
740 * semantics.c (finish_non_static_data_member): Handle when
741 both processing_template_decl and qualifying_scope are true.
743 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
746 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
747 * parser.c (cp_parser_direct_declarator): Only resolve typename for
748 namespace scope declarations.
750 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
752 PR c++/12698, c++/12699, c++/12700, c++/12566
753 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
754 (debug_class, debug_thunks): New.
755 * class.c (dump_class_hierarchy_1): New break out from ...
756 (dump_class_hierarchy): ... here.
757 (dump_thunk, debug_thunks, debug_class): New.
758 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
759 continued search for primary binfo via virtual.
760 (build_vtbl_initializer): Follow covariant thunk alias.
761 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
762 (finish_thunk): Look for an alias of the covariant thunk and point
764 (use_thunk): We should never use an alias.
765 * semantics.c (emit_associated_thunks): Do not emit aliases.
768 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
769 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
770 create an ad-hoc ERROR_MARK.
771 (cp_make_fname_decl): Adjust.
772 * pt.c (tsubst_expr): Adjust.
774 2003-10-23 Jason Merrill <jason@redhat.com>
777 * tree.c (build_target_expr_with_type): Don't call force_rvalue
780 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
782 * call.c: Fix comment formatting.
784 * cxx-pretty-print.c: Likewise.
786 * parser.c: Likewise.
788 * semantics.c: Likewise.
790 * typeck.c: Likewise.
791 * typeck2.c: Likewise.
793 2003-10-21 Mark Mitchell <mark@codesourcery.com>
796 * typeck.c (build_x_conditional_expr): Handle missing middle
797 operands in templates.
798 * mangle.c (write_expression): Issue errors about attempts to
799 mangle a non-existant middle operator to the ?: operator.
801 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
802 * decl.c (cp_finish_decl): Remove clause intended for asm directives
803 in struct or class fields: this code is never executed.
805 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
807 * decl.c (start_decl): Exit if push_template_decl returns
810 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
812 * ChangeLog: Fix typos.
813 * call.c: Fix comment typos.
815 * cp-tree.h: Likewise.
817 * cxx-pretty-print.c: Likewise.
821 * mangle.c: Likewise.
822 * name-lookup.c: Likewise.
823 * parser.c: Likewise.
824 * search.c: Likewise.
825 * semantics.c: Likewise.
827 * typeck.c: Likewise.
829 2003-10-20 Jan Hubicka <jh@suse.cz>
831 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
834 2003-10-20 Mark Mitchell <mark@codesourcery.com>
836 * Make-lang.in (c++.install-info): Remove.
838 2003-10-20 Jason Merrill <jason@redhat.com>
840 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
843 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
845 PR c++/9781, c++/10583, c++/11862
846 * decl.c (cp_finish_decl): Exit immediately if decl is an
848 * pt.c (push_template_decl_real): Return error_mark_node for
849 invalid template declaration of variable.
851 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
854 * pt.c (lookup_template_class): Handle when current_class_type
857 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
860 * decl.c (make_typename_type): Use dependent_type_p.
861 (make_unbound_class_template): Likewise.
862 * pt.c (instantiate_class_template): Increment
863 processing_template_decl during substitution of template friend
864 function. Preincrement processing_template_decl rather than
866 (get_mostly_instantiated_function_type): Increment
867 processing_template_decl during partial substitution of function
870 2003-10-15 Jan Hubicka <jh@suse.cz>
873 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
875 2003-10-14 Jason Merrill <jason@redhat.com>
878 * tree.c (build_target_expr_with_type): Call force_rvalue for
879 classes with non-trivial copy ctors.
882 * typeck.c (build_modify_expr): Call convert rather than abort.
884 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
886 Breack out decl.c (3/n)
887 * name-lookup.c: Include flags.h
888 (lookup_name_current_level): Make static.
889 (add_decl_to_level): Likewise.
890 (push_local_binding): Likewise.
891 (push_overloaded_decl): Likewise.
892 (lookup_using_namespace): Likewise.
893 (qualified_lookup_using_namespace): Likewise.
894 (lookup_type_current_level): Likewise.
895 (unqualified_namespace_lookup): Likewise.
896 (namespace_ancestor): Likewise.
897 (push_using_directive): Likewise.
898 * decl.c (pushdecl): Move to name-lookup.c.
899 (pushdecl_top_level_1): Likewise.
900 (pushdecl_top_level): Likewise.
901 (pushdecl_top_level_and_finish): Likewise.
902 (maybe_push_decl): Likewise.
903 (push_using_decl): Likewise.
904 (push_overloaded_decl): Likewise.
905 (make_anon_name): Likewise.
906 (anon_cnt): Likewise.
907 (clear_anon_tags): Likewise.
908 (maybe_inject_for_scope_var): Likewise.
909 (check_for_out_of_scope_variable): Likewise.
910 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
911 * decl.c (warn_extern_redeclared_static): Export.
912 * cp-tree.h (warn_extern_redeclared_static): Declare.
914 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
916 * Make-lang.in: Replace uses of $(target_alias) with
917 $(target_noncanonical).
919 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
921 * ChangeLog: Add PR number to patch for PR c++/12370.
923 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
925 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
926 (binding_for_name): Likewise.
927 (cxx_binding_clear): Move to name-lookup.c.
928 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
929 (binding_for_name): Likewise.
930 * decl2.c (is_ancestor): Move to name-lookup.c
931 (namespace_ancestor): Likewise.
932 (add_using_namespace): Likewise.
933 (ambiguous_decl): Likewise.
934 (lookup_using_namespace): Likewise.
935 (qualified_lookup_using_namespace): Likewise.
936 (set_decl_namespace): Likewise.
937 (decl_namespace): Likewise.
938 (current_decl_namespace): Likewise.
939 (push_decl_namespace): Likewise.
940 (pop_decl_namespace): Likewise.
941 (push_scope): Likewise.
942 (pop_scope): Likewise.
943 (struct arg_lookup): Likewise.
944 (arg_assoc): Likewise.
945 (arg_assoc_args): Likewise.
946 (arg_assoc_type): Likewise.
947 (add_function): Likewise.
948 (arg_assoc_namespace): Likewise.
949 (arg_assoc_class): Likewise.
950 (arg_assoc_template_arg): Likewise.
951 (do_namespace_alias): Likewise.
952 (validate_nonmember_using_decl): Likewise.
953 (do_nonmember_using_decl): Likewise.
954 (do_toplevel_using_decl): Likewise.
955 (do_local_using_decl): Likewise.
956 (do_class_using_decl): Likewise.
957 (do_using_directive): Likewise.
958 (constructor_name_full): Likewise.
959 (constructor_name): Likewise.
960 (constructor_name_p): Likewise.
962 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
964 Break out decl.c (2/n)
965 * name-lookup.c: Include diagnostic.h
966 (cxx_binding_free): Make static.
967 (cxx_binding_make): Likewise.
968 (binding_table_new): Likewise
969 (binding_table_free): Likewise.
970 (binding_table_insert): Likewise.
971 (binding_table_find_anon_type): Likewise.
972 (binding_table_reverse_maybe_remap): Likewise.
973 (supplement_binding): Likewise.
974 * name-lookup.h (global_scope_name): Declare extern.
975 (global_type_node): Likewise.
976 (cxx_binding_free): Don't export.
977 (cxx_binding_make): Likewise.
978 (binding_table_new): Likewise.
979 (binding_table_free): Likewise.
980 (binding_table_insert): Likewise.
981 (binding_table_find_anon_type): Likewise.
982 (binding_table_reverse_maybe_remap): Likewise.
983 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
984 * decl.c (lookup_namespace_name): Move to name-lookup.c
985 (select_decl): Likewise.
986 (unqualified_namespace_lookup): Likewise.
987 (lookup_qualified_name): Likewise.
988 (lookup_name_real): Likewise.
989 (lookup_name_nonclass): Likewise.
990 (lookup_function_nonclass): Likewise.
991 (lookup_name): Likewise.
992 (lookup_name_current_level): Likewise.
993 (lookup_type_current_level): Likewise.
994 (lookup_flags): Likewise.
995 (qualify_lookup): Likewise.
996 (lookup_tag): Likewise.
997 (lookup_tag_reverse): Likewise.
998 (getdecls): Likewise.
999 (storedecls): Remove.
1000 (cxx_remember_type_decls): Move to name-lookup.c.
1001 (global_bindings_p): Likewise.
1002 (innermost_nonclass_level): Likewise.
1003 (toplevel_bindings_p): Likewise.
1004 (namespace_bindings_p): Likewise.
1005 (kept_level_p): Likewise.
1006 (innermost_scope_kind): Likewise.
1007 (template_parm_scope_p): Likewise.
1008 (push_binding): Likewise.
1009 (push_local_binding): Likewise.
1010 (add_decl_to_level): Likewise. Make extern.
1011 (push_class_binding): Move to name-lookup.c.
1012 (resume_level): Likewise. Rename to resume_scope.
1013 (begin_scope): Move to name-lookup.c.
1015 (binding_depth): Likewise.
1016 (is_class_level): Likewise.
1017 (cxx_scope_descriptor): Likewise.
1018 (cxx_scope_debug): Likewise.
1019 (namespace_scope_ht_size): Likewise.
1020 (leave_scope): Likewise.
1021 (pushlevel_class): Likewise.
1022 (poplevel_class): Likewise.
1023 (clear_identifier_class_values): Likewise.
1024 (pushdecl_with_scope): Likewise.
1025 (pushdecl_namespace_level): Likewise.
1026 (pushdecl_class_level): Likewise.
1027 (push_class_level_binding): Likewise.
1028 (push_using_directive): Likewise.
1029 (identifier_global_value): Likewise.
1030 (keep_next_level_flag): Likewise.
1031 (keep_next_level): Likewise.
1032 (free_binding_level): Likewise.
1033 (set_class_shadows): Likewise.
1034 (maybe_push_cleanup_level): Likewise.
1035 (cp_namespace_decls): Likewise.
1036 (bt_print_entry): Likewise.
1037 (print_binding_level): Likewise.
1038 (print_other_binding_stack): Likewise.
1039 (print_binding_stack): Likewise.
1040 (push_namespace): Likewise.
1041 (pop_namespace): Likewise.
1042 (push_nested_namespace): Likewise.
1043 (pop_nested_namespace): Likewise.
1044 (cxx_saved_binding_make): Likewise.
1045 (struct cxx_saved_binding_make): Likewise.
1046 (store_bindings): Likewise.
1047 (maybe_push_to_top_level): Likewise.
1048 (push_to_top_level): Likewise.
1049 (pop_from_top_level): Likewise.
1050 (identifier_type_value): Likewise.
1051 (set_identifier_type_value): Likewise.
1052 (set_identifier_type_value_with_scope): Likewise.
1053 (pop_everything): Likewise.
1054 (pushtag): Likewise.
1055 (follow_tag_typedef): Likewise.
1056 (maybe_process_template_type_declaration): Likewise.
1057 (pop_binding): Likewise.
1058 * cp-tree.h: Move corresponding declarations to name-lookup.h
1060 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
1062 * cvt.c (ocp_convert): Move warning to C common code.
1064 2003-10-09 Jason Merrill <jason@redhat.com>
1067 * tree.c (build_cplus_array_type): Handle all quals the same.
1068 (cp_build_qualified_type_real): Look through arrays first.
1070 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
1071 (build_target_expr_with_type): Likewise.
1073 * pt.c (instantiate_class_template): Sanity check that our
1074 enclosing class has been instantiated.
1076 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
1078 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
1079 * error.c (dump_function_decl): Use it to skip the dump of the
1081 (dump_expr): When dumping a declaration found within an
1082 expression, always set TFF_NO_FUNCTION_ARGUMENTS
1085 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
1088 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
1091 2003-10-06 Mark Mitchell <mark@codesourcery.com>
1094 * call.c (initialize_reference): Tweak error message.
1095 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
1096 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
1097 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
1098 qualified entities using qualified names.
1101 * init.c (build_new_1): Make sure that the expression returned is
1104 PR c++/12344, c++/12236, c++/8656
1105 * decl.c (start_function): Do not ignore attributes embedded in a
1106 function declarator.
1108 2003-10-06 Mark Mitchell <mark@codesourcery.com>
1110 * Make-lang.in (c++.info): Remove.
1112 (c++.generated-manpages): Replace with ...
1113 (generated-manpages): ... this.
1115 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1117 * decl.c (struct cp_binding_level): Move to name-lookup.h
1118 (current_binding_level): Likewise.
1119 (class_binding_level): Likewise.
1120 * cp-tree.h (enum scope_kind): Likewise.
1122 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1124 * name-lookup.c (binding_entry_free): Nullify name and type
1127 2003-10-02 Mark Mitchell <mark@codesourcery.com>
1130 * typeck.c (finish_class_member_access_expr): Issue diagnostic
1131 on erroneous use of qualified name.
1133 2003-09-30 Richard Henderson <rth@redhat.com>
1136 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
1138 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
1140 * g++spec.c: Convert to ISO C90 prototypes.
1141 * parser.c: Likewise.
1143 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1145 * decl.c (pop_binding): Don't mess with nullifying binding->scope
1147 * name-lookup.c: Re-format.
1148 (cxx_binding_free): Nullify binding->scope.
1150 2003-09-29 Jan Hubicka <jh@suse.cz>
1153 * except.c (build_eh_type_type): Call mark_used on the type.
1155 2003-09-28 Richard Henderson <rth@redhat.com>
1157 * typeck.c (c_expand_asm_operands): Take location_t, instead of
1158 individual file and line.
1160 2003-09-28 Andreas Jaeger <aj@suse.de>
1162 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
1164 * init.c (push_base_cleanups): Likewise.
1165 * decl2.c (finish_file): Likewise.
1166 * mangle.c (init_mangle): Likewise.
1167 (dump_substitution_candidates): Likewise.
1168 * search.c: Likewise.
1170 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1172 * name-lookup.h (get_global_value_if_present): New function.
1173 (is_typename_at_global_scope): Likewise.
1174 * except.c (do_begin_catch): Use get_global_value_if_present.
1175 (do_end_catch): Likewise.
1176 (do_allocate_exception): Likewise.
1177 (do_free_exception): Likewise.
1178 (build_throw): Likewise.
1179 * parser.c (cp_parser_member_declaration): Likewise.
1180 * rtti.c (throw_bad_cast): Likewise.
1181 (throw_bad_typeid): Likewise.
1182 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
1183 (grokdeclarator): Likewise.
1184 * cp-tree.h (global_namespace): Move to name-lookup.h
1185 * call.c (call_builtin_trap): Tidy.
1187 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1190 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
1191 error message when parser->scope is global_namespace.
1193 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1195 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
1196 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
1198 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
1200 * decl.c (pop_binding_level, suspend_binding_level,
1201 find_class_binding_level): Merge into leave_scope. Remove.
1202 (leave_scope): New function.
1204 (poplevel_class): Likewise.
1205 (pop_namespace): Likewise.
1207 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1210 * parser.c (cp_parser_check_access_in_redeclaration): New function.
1211 (cp_parser_member_declaration): Use it.
1212 (cp_parser_template_declaration_after_export): Likewise.
1214 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1216 * cp-tree.h (scope_kind): Add new enumerator.
1217 (keep_next_level): Change parameter type to bool.
1218 (begin_scope): Change prototype.
1219 (pushlevel): Remove declaration.
1220 * decl.c (push_binding_level): Fold in begin_scope. Remove.
1221 (struct cp_binding_level): Remove tag_tranparent field. Make keep
1223 (keep_next_level_flag): Make a bool.
1224 (cxx_scope_descriptor): Update scope names table
1225 (make_cxx_scope): Fold in begin_scope. Remove..
1226 (namespace_scope_ht_size): New function.
1227 (begin_scope): Change prototype. Return a scope. Tidy.
1228 (kept_level_p): Update.
1229 (pushlevel): Remove.
1230 (maybe_push_cleanup_level): Simplify.
1231 (poplevel): Update for sk_cleanup and keep change.
1232 (print_binding_level): Likewise.
1233 (initial_push_namespace_scope): Fold in begin_scope. Remove.
1234 (push_namespace): Update.
1235 (pushtag): Likewise.
1236 (lookup_tag): Likewise.
1237 (lookup_name_current_level): Likewise.
1238 (lookup_type_current_level): Likewise.
1239 (cxx_init_decl_processing): Likewise.
1240 (start_function): Likewise.
1241 (begin_function_body): Likewise.
1242 (start_method): Likewise.
1243 * pt.c (push_inline_template_parms_recursive): Likewise.
1244 (begin_template_parm_list): Likewise.
1245 (begin_specialization): Likewise.
1246 * semantics.c (do_pushlevel): Likewise.
1247 (begin_compound_stmt): Likewise.
1248 (begin_stmt_expr): Likewise.
1250 2003-09-21 Richard Henderson <rth@redhat.com>
1252 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
1253 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
1255 2003-09-21 Richard Henderson <rth@redhat.com>
1257 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
1258 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
1259 DECL_SOURCE_LOCATION rename and change to const.
1261 2003-09-20 Richard Henderson <rth@redhat.com>
1263 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
1265 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1268 * parser.c (cp_parser_direct_declarator): Clear
1269 parser->num_template_parameter_lists when parsing function
1271 (cp_parser_constructor_declarator_p): Likewise.
1273 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1276 * pt.c (tsubst_friend_class): Only use innermost template
1277 arguments for the injected friend class template.
1279 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1282 * pt.c (instantiate_class_template): Increment
1283 processing_template_decl around the tsubst of a template member
1286 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1288 * decl.c (cxx_scope_descriptor): Fix thinko.
1289 (struct cp_binding_level): Adjust type of binding_depth field.
1291 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
1294 * call.c (type_passed_as): Check for incomplete type.
1295 (convert_for_arg_passing): Likewise.
1297 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
1300 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
1302 * semantics.c (expand_body): Set it here on the remaining clones.
1304 2003-09-18 Roger Sayle <roger@eyesopen.com>
1306 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
1307 * class.c (instantiate_type): Remove FFS_EXPR case.
1309 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1311 * ChangeLog: Fix recent commit.
1313 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1315 * ChangeLog: Add PR number to patch for PR c++/12316.
1317 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
1319 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
1321 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
1323 2003-09-17 Richard Henderson <rth@redhat.com>
1325 * semantics.c (expand_body): Don't save/restore input_location.
1327 2003-09-17 Mark Mitchell <mark@codesourcery.com>
1330 * cp-tree.h (tsubst_flags_t): Add tf_conv.
1331 * class.c (standard_conversion): Pass tf_conv to
1333 (resolve_address_of_overloaded_function): Do not call mark_used
1334 when just checking conversions.
1337 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
1338 * cp-tree.h (cxx_builtin_type_decls): Declare.
1339 * decl.c (builtin_type_decls): New variables.
1340 (cxx_builtin_type_decls): New function.
1341 (record_builtin_type): Add to builtin_type_decls.
1343 2003-09-17 Richard Henderson <rth@redhat.com>
1346 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
1348 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1351 * typeck.c (comptypes): Don't ICE when its first argument is
1353 (compparms): Reverse the arguments of same_type_p.
1355 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
1358 * typeck.c (convert_arguments): Return error_mark_node for an
1359 incomplete parameter. Make error message more informative.
1361 2003-09-12 Mark Mitchell <mark@codesourcery.com>
1364 * class.c (maybe_note_name_used_in_class): Refine test for whether
1365 or not we are in a class scope.
1367 * cp-tree.h (language_function): Remove x_expanding_p.
1368 (expanding_p): Remove.
1369 (doing_semantic_analysis_p): Remove.
1370 (scope_kind): Add sk_function_parms, sk_class,
1372 (innermost_scope_kind): New method.
1373 * call.c (cxx_type_promotes_to): Use type_decays_to.
1374 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
1375 (LANG_HOOKS_POPLEVEL): Likewise.
1376 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
1377 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
1378 is_catch_scope. Add kind and explicit_spec_p.
1379 (cxx_scope_descriptor): Use a lookup table.
1380 (find_class_binding_level): Use "kind" field in binding_level, not
1382 (pop_binding_level): Likewise.
1383 (innermost_nonclass_level): Likewise.
1384 (toplevel_bindings_p): Likewise.
1385 (namespace_bindings_p): Likewise.
1386 (template_parm_scope_p): Likewise.
1387 (innermost_scope_kind): New method.
1388 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
1390 (pushlevel): Remove check for doing_semantic_analysis_p.
1391 (begin_scope): Simplify.
1392 (add_decl_to_level): Use "kind" field in binding_level, not
1394 (push_local_binding): Likewise.
1395 (pop_label): Remove check for doing_semantic_analysis_p.
1396 (poplevel): Use "kind" field in binding_level, not
1398 (set_block): Remove check for doing_semantic_analysis_p.
1399 (pushlevel_class): Use "kind" field in binding_level, not
1401 (poplevel_class): Likewise.
1402 (initial_push_namespace_scope): Likewise.
1403 (maybe_push_to_top_level): Likewise.
1404 (set_identifier_type_value_with_scope): Likewise.
1405 (pop_everything): Likewise.
1406 (maybe_process_template_type_declaration): Likewise.
1407 (pushtag): Likewise.
1408 (pushdecl): Likewise.
1409 (pushdecl_with_scope): Likewise.
1410 (check_previous_goto_1): Likewise.
1411 (define_label): Likewise.
1412 (finish_case_label): Likewise.
1413 (lookup_tag): Likewise.
1414 (unqualified_namespace_lookup): Likewise.
1415 (lookup_name_real): Likewise.
1416 (lookup_name_current_level): Likewise.
1417 (lookup_type_current_level): Likewise.
1418 (record_builtin_type): Likewise.
1419 (cp_make_fname_decl): Likewise.
1420 (maybe_inject_for_scope_var): Likewise.
1421 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
1422 (start_function): Use begin_scope, not pushlevel.
1423 (finish_function): Use "kind" field in binding_level, not
1425 (start_method): Use begin_scope, not pushlevel.
1426 (make_label_decl): Do not check expanding_p.
1427 (save_function-data): Do not set expanding_p.
1428 (cxx_push_function_context): Do not clear expanding_p.
1429 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
1431 2003-09-14 Mark Mitchell <mark@codesourcery.com>
1433 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
1434 an bit-field whose width exceeds that of its type.
1436 2003-09-14 Geoffrey Keating <geoffk@apple.com>
1438 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
1440 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
1442 * ChangeLog: Follow spelling conventions.
1443 * parser.c: Likewise.
1445 2003-09-13 Richard Henderson <rth@redhat.com>
1447 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
1448 during relaxation loop.
1450 2003-09-11 David Edelsohn <edelsohn@gnu.org>
1452 * decl2.c (var_finalized_p): Swap arms of conditional.
1454 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
1457 * typeck.c (build_address): If it is a function, mark it used.
1458 (build_unary_op): Do not lose object's side-effects when taking
1459 address of static member function.
1460 * class.c (resolve_address_of_overloaded_function): Use
1461 tsubst_flags_t parameter. Only expect overload sets. Adjust.
1462 (instantiate_type): Adjust flags passing. Do not lose object's
1463 side-effects when taking address of static member function.
1465 2003-09-11 Richard Henderson <rth@redhat.com>
1467 * semantics.c (expand_or_defer_fn): Update for new
1468 cgraph_finalize_function argument.
1470 2003-09-10 Richard Henderson <rth@redhat.com>
1472 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1474 2003-09-10 Jan Hubicka <jh@suse.cz>
1476 * decl2.c (var_finalized_p): New.
1477 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1479 2003-09-10 Richard Henderson <rth@redhat.com>
1481 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1482 mark_member_pointers.
1483 (lower_function): Remove.
1484 * cp-tree.h: Update to match.
1485 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1486 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1488 2003-09-09 Richard Henderson <rth@redhat.com>
1490 * semantics.c (expand_or_defer_fn): Update call to
1491 cgraph_finalize_function.
1493 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1496 * decl2.c (finish_file): Avoid out-of-bounds array reference
1499 2003-09-09 Richard Henderson <rth@redhat.com>
1501 * decl2.c (mark_member_pointers): Rename from
1502 mark_member_pointers_and_eh_handlers and don't check eh handlers.
1504 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
1507 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1509 2003-09-08 Mark Mitchell <mark@codesourcery.com>
1511 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1512 c_register_builtin_type.
1515 * decl2.c (add_function): Do not complain about seeing the same
1517 * semantics.c (perform_koenig_lookup): Improve documentation.
1520 * pt.c (try_one_overload): Add addr_p parameter.
1521 (resolve_overloaded_unification): Pass it.
1523 2003-09-08 Richard Henderson <rth@redhat.com>
1525 * optimize.c (maybe_clone_body): Inc/dec function_depth.
1527 2003-09-08 Richard Henderson <rth@redhat.com>
1529 * decl.c (finish_function): Clear current_function_decl.
1530 * decl2.c (mark_used): Don't push/pop gc context.
1531 * optimize.c (optimize_function): Likewise.
1532 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1533 * pt.c (instantiate_decl): Inc/dec function_depth instead.
1534 * semantics.c (expand_body): Update for tree_rest_of_compilation
1537 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
1540 * error.c (dump_decl): Handle namespace-alias-definition.
1541 * decl.c (warn_extern_redeclared_static): There is no point in
1542 checking changes in storage class specifier for a namespace
1544 (duplicate_decls): Tidy diagnostic message.
1545 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1546 (pp_cxx_right_brace): Likewise.
1547 (pp_cxx_original_namespace_definition): New function.
1548 (pp_cxx_namespace_alias_definition): Likewise.
1549 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
1551 2003-09-07 Jan Hubicka <jh@suse.cz>
1553 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1554 Avoid re-emitting variables in unit-at-a-time mode.
1556 2003-09-06 Mark Mitchell <mark@codesourcery.com>
1559 * call.c (standard_conversion): Improve comments.
1560 (perform_direct_initialization): Make sure we return an expression
1561 of the correct type.
1562 * typeck.c (build_static_cast): Check for ambiguity and
1563 accessibility when performing conversions.
1565 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
1567 * cp-tree.h (add_binding): Remove declaration.
1568 * name-lookup.h (supplement_binding): Declare.
1569 * decl.c (add_binding): Move to name-lookup.c.
1570 (push_local_binding): Adjust.
1571 (push_class_binding): Likewise.
1572 (set_identifier_type_value_with_scope): Likewise.
1573 * name-lookup.c (supplement_binding): Rename from add_binding.
1574 Return a bool. Improve documentation.
1575 (set_namespace_binding): Adjust.
1576 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1578 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1581 * class.c (pushclass): Push dependent using decls for nested
1582 classes of templates too.
1584 2003-09-06 Roger Sayle <roger@eyesopen.com>
1587 * class.c (resolve_address_of_overloaded_function): When building
1588 list of matching non-template function decls, ignore anticipated
1589 declarations of undeclared or shadowed GCC builtins.
1591 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
1594 * decl.c (define_label): Remove unreachable timevar pop.
1595 Always return the decl, even if the definition is invalid.
1597 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1600 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1601 unparsed functions queue.
1603 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1606 * call.c (perform_direct_initialization): Correct logic for
1607 direct-initialization of a class type.
1610 * pt.c (lookup_template_function): Robustify.
1612 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1615 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1616 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1617 is_type_p to lookup_qualified_name.
1619 * semantics.c (finish_call_expr): Refactor some code.
1622 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1623 (build_min_non_dep): Declare.
1624 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1625 (build_min_non_dep): New.
1626 * cvt.c (convert_to_void): Don't explicitly copy
1627 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1628 * call.c (build_new_method_call): Use build_min_non_dep.
1629 * decl2.c (grok_array_decl): Likewise.
1630 (build_offset_ref_call_from_tree): Likewise.
1631 * typeck.c (finish_class_member_access_expr,
1632 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1633 build_x_conditional_expr, build_x_compound_expr): Likewise.
1634 (build_static_cast, build_reinterpret_cast,
1635 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1636 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1637 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1639 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1640 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1641 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1643 2003-09-04 Richard Henderson <rth@redhat.com>
1645 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1646 change in cgraph_mark_needed_node arguments.
1648 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1651 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1652 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1654 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1656 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1657 (expr_sizeof): Replace with ...
1658 (cxx_sizeof_or_alignof_expr): ... here.
1659 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1660 * parser.c (cp_parser_unary_expression): Commonize alignof and
1662 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1664 * semantics.c (finish_sizeof, finish_alignof): Remove.
1665 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1666 becomes bool. Set TREE_READONLY.
1667 (expr_sizeof): Replace with ...
1668 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1670 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1672 Remove cast-as-lvalue extension.
1673 * call.c (build_conditional_expr): Correct formatting.
1674 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1675 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1676 * cp-tree.h (non_cast_lvalue_p): Remove.
1677 (real_non_cast_lvalue_p): Remove.
1678 (non_cast_lvalue_or_else): Remove.
1679 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1680 (real_lvalue_p): Adjust call to lvalue_p_1.
1681 (non_cast_lvalue_p): Remove.
1682 (non_cast_lvalue_or_else): Remove.
1683 (lvalue_p): Adjust call to lvalue_p_1.
1684 (lvalue_or_else): Simplify.
1685 * typeck.c (build_unary_op): Use lvalue_or_else, not
1686 non_cast_lvalue_or_else.
1687 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1689 2003-09-03 DJ Delorie <dj@redhat.com>
1691 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1693 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1696 * class.c (include_empty_classes): Correct logic for ABI version 1.
1698 2003-09-03 Richard Henderson <rth@redhat.com>
1700 * optimize.c (optimize_function): Push/pop ggc context around
1701 the call to optimize_inline_calls.
1703 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1706 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1707 duplicate friend decl-specifier.
1709 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1712 * pt.c (convert_nontype_argument): Correct representation of
1713 REFERENCE_TYPE expressions.
1716 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1717 (finish_call_expr): Change prototype.
1718 * parser.c (cp_parser_postfix_expression): Adjust call to
1720 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1721 * semantics.c (finish_call_expr): Add koenig_p parameter.
1723 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1726 * cp-tree.h (initialize_reference): Change prototype.
1727 * call.c (initialize_reference): Add cleanup parameter.
1728 * decl.c (grok_reference_init): Likewise.
1729 (check_initializer): Likewise.
1730 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1731 (duplicate_decls): When replacing an anticipated builtin, do not
1733 * typeck.c (convert_for_initialization): Correct call to
1734 initialize_reference.
1737 * pt.c (dependent_type_p_r): Pass only the innermost template
1738 arguments to any_dependent_template_arguments_p.
1740 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1742 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1743 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1744 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1745 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1746 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1748 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1751 * pt.c (build_non_dependent_expr): Do not build a
1752 NON_DEPENDENT_EXPR for a STRING_CST.
1755 * search.c (add_conversions): Avoid adding two conversion
1756 operators for the same type.
1758 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1761 * pt.c (tsubst_copy_and_build): Correct handling of
1762 address-of-label extension.
1763 * semantics.c (finish_goto_stmt): The address of a label must go
1764 through the lvalue-to-rvalue conversion.
1766 2003-08-29 Richard Henderson <rth@redhat.com>
1767 Jason Merrill <jason@redhat.com>
1769 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1770 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1771 * cp-tree.h (cxx_expand_function_start): Declare.
1772 * decl.c (start_function): Use allocate_struct_function.
1773 Move stmts_are_full_exprs_p assertion from expand_body.
1774 Do not free_after_parsing or free_after_compilation.
1775 (cxx_push_function_context): Move code to set struct function
1776 data from genrtl_start_function.
1777 * optimize.c (optimize_function): Don't inc/dec function_depth.
1778 * semantics.c (expand_body): Use tree_rest_of_compilation.
1779 (cxx_expand_function_start): Rename from genrtl_start_function,
1780 omit bits done by tree_rest_of_compilation.
1781 (genrtl_finish_function): Remove.
1782 (clear_decl_rtl): Move to ../tree-optimize.c.
1784 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1787 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1789 * cxx-pretty-print.h: Declare.
1790 * error.c (dump_template_parameter): Use it.
1791 (dump_type): Likewise.
1793 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1795 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1796 * call.c (build_conditional_expr): Revert previous patch.
1798 PR optimization/5079
1799 * call.c (build_conditional_expr): Use decl_constant_value to
1800 simplify the arguments.
1802 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1804 * parser.c (struct cp_token): Use enum bitfields.
1805 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1806 512B allocation unit.
1807 (cp_parser_token_tree_map_node): Use enum bitfields.
1809 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1812 * decl.c (push_class_level_binding): Correct old_decl value from
1813 my 2003-07-29 reorganization.
1815 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1816 (build_new_method_call): Add goto finish.
1817 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1818 TREE_SIDE_EFFECTS on a call.
1820 2003-08-25 Richard Henderson <rth@redhat.com>
1822 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1824 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1826 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1827 (cxx_pretty_printer): Adjust base type.
1828 (pp_cxx_function_specifier): Declare.
1829 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1830 (pp_cxx_left_paren): Likewise.
1831 (pp_cxx_right_paren): Likewise.
1832 (pp_cxx_dot): Likewise.
1833 (pp_cxx_arrow): Likewise.
1834 (pp_cxx_semicolon): Likewise.
1835 (pp_cxx_identifier): Likewise.
1836 (pp_cxx_cv_qualifier_seq): Likewise.
1837 (pp_cxx_storage_class_specifier): Likewise.
1838 (pp_cxx_expression_list): Likewise.
1839 (pp_cxx_space_for_pointer_operator): Likewise.
1840 (pp_cxx_init_declarator): Likewise.
1841 (pp_cxx_call_argument_list): Likewise.
1842 (pp_cxx_nonconsecutive_character): Tidy.
1843 (pp_cxx_conversion_function_id): New function.
1844 (pp_cxx_template_id): Likewise.
1845 (pp_cxx_template_keyword_if_needed): Likewise.
1846 (pp_cxx_nested_name_specifier): Likewise.
1847 (pp_cxx_unqualified_id): Tidy
1848 (pp_cxx_qualified_id): Handle more nodes.
1849 (pp_cxx_primary_expression): Tidy.
1850 (pp_cxx_postfix_expression): Likewise.
1851 (pp_cxx_new_expression): Tidy.
1852 (pp_cxx_delete_expression): Likewise.
1853 (pp_cxx_cast_expression): New function.
1854 (pp_cxx_pm_expression): Tidy.
1855 (pp_cxx_conditional_expression): Likewise.
1856 (pp_cxx_assignment_operator): New function.
1857 (pp_cxx_assignment_expression): Tidy.
1858 (pp_cxx_expression): New function.
1859 (pp_cxx_function_specifier): Likewise.
1860 (pp_cxx_decl_specifier_seq): Likewise.
1861 (pp_cxx_simple_type_specifier): Tidy.
1862 (pp_cxx_type_specifier_seq): Likewise.
1863 (pp_cxx_ptr_operator): New function.
1864 (pp_cxx_implicit_parameter_type): Likewise.
1865 (pp_cxx_parameter_declaration): Tidy.
1866 (pp_cxx_parameter_declaration_clause): New function.
1867 (pp_cxx_exception_specification): Likewise.
1868 (pp_cxx_direct_declarator): Tidy.
1869 (pp_cxx_declarator): Likewise.
1870 (pp_cxx_ctor_initializer): New function.
1871 (pp_cxx_function_definition): Likewise.
1872 (pp_cxx_abstract_declarator): Tidy.
1873 (pp_cxx_direct_abstract_declarator): Likewise.
1874 (pp_cxx_type_id): Likewise.
1875 (pp_cxx_exception_declaration): New function.
1876 (pp_cxx_statement): Likewise.
1877 (pp_cxx_simple_declaration): Likewise.
1878 (pp_cxx_template_parameter_list): Likewise.
1879 (pp_cxx_template_parameter): Likewise.
1880 (pp_cxx_template_declaration): Likewise.
1881 (pp_cxx_explicit_specialization): Likewise.
1882 (pp_cxx_explicit_instantiation): Likewise.
1883 (pp_cxx_declaration): Tidy.
1884 (pp_cxx_pretty_printer_init): Initialize more fields.
1886 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1889 * cp-tree.h (build_cplus_method_type): Remove.
1890 * call.c (standard_conversion): Use build_method_type_directly
1891 instead of build_cplus_method_type.
1892 * class.c (build_clone): Likewise.
1893 (adjust_clone_args): Likewise.
1894 * decl.c (build_ptrmem_type): Likewise.
1895 (grokdeclarator): Likewise.
1896 (check_function_type): Likewise.
1897 * decl2.c (grok_method_quals): Likewise.
1898 (maybe_retrofit_in_chrg): Likewise.
1899 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1900 (tsubst_function_type): Likewise.
1902 * tree.c (build_cplus_method_type): Remove.
1903 * typeck.c (merge_types): Use build_method_type_directly.
1905 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1908 * search.c (dfs_access_in_type): Fix typo in comment.
1909 (dfs_accessible_queue_p): Likewise.
1910 (dfs_accessible_p): Only terminate when a friend is found.
1911 (accessible_p): Return immediately if access_in_type allows
1914 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1916 PR c++/641, c++/11876
1917 * friend.c (add_friend): Add complain parameter.
1918 (make_friend_class): Likewise.
1919 (do_friend): Adjust add_friend call.
1920 * decl.c (grokdeclarator): Adjust make_friend_class call.
1921 * parser.c (cp_parser_member_declaration): Likewise.
1922 (cp_parser_template_declaration_after_export): Likewise.
1923 * pt.c (instantiate_class_template): Adjust make_friend_class
1924 and add_friend call.
1925 * cp-tree.h (make_friend_class): Adjust declaration.
1926 (add_friend): Likewise.
1928 2003-08-21 Jason Merrill <jason@redhat.com>
1931 * call.c (build_conditional_expr): Ignore cv-qual differences for
1934 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1937 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1938 (cp_parser_primary_expression): Adjust call to
1939 cp_parser_id_expression.
1940 (cp_parser_unqualified_id): Complain about the use of
1941 typedef-names in a destructor declarator.
1942 (cp_parser_postfix_expression): Adjust call to
1943 cp_parser_id_expression.
1944 (cp_parser_type_parameter): Likewise.
1945 (cp_parser_template_argument): Likewise.
1946 (cp_parser_declarator_id): Likewise.
1949 * call.c (standard_conversion): Use same_type_p, not pointer
1950 equality, to compare types.
1953 * parser.c (cp_parser_using_declaration): Check for invalid uses
1954 of template-ids here...
1955 * decl2.c (do_class_using_decl): ... rather than here.
1957 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1960 * pt.c (more_specialized): Bump processing_template_decl.
1962 2003-08-21 Jason Merrill <jason@redhat.com>
1965 * decl.c (grokdeclarator): Recognize a flexible array based on the
1966 type, not the form of the declarator.
1968 2003-08-20 Jason Merrill <jason@redhat.com>
1970 * semantics.c (simplify_aggr_init_expr): Split out from
1971 simplify_aggr_init_exprs_r. Convert slot address to match
1973 * cp-tree.h: Declare it.
1974 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1975 DECL_NAME of a user variable.
1977 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1980 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1982 * semantics.c (finish_expr_stmt): Always convert to void.
1983 * typeck.c (build_x_compound_exp): Always convert to void.
1985 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1988 * cp-tree.h (grok_op_properties): Change prototype.
1989 * decl.c (grok_op_properties): Add complain parameter.
1990 (grokfndecl): Pass it.
1991 * pt.c (tsubst_decl): Adjust accordingly.
1994 * decl.c (start_method): Return immediately if push_template_decl
1995 does not like the declaration.
1996 * pt.c (push_template_decl_real): Disallow member template
2000 * cp-tree.h (add_binding): Add prototype.
2001 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
2002 (maybe_warn_about_overly_private_class): Use
2003 CLASSTYPE_DESTRUCTORS.
2004 (pushclass): Adjust call to set_identifier_type_value.
2005 * decl.c (add_binding): Give it external linkage.
2006 (push_local_binding): Adjust call to add_binding.
2007 (push_class_binding): Likewise.
2008 (set_identifier_type_value_with_scope): Change prototype. Use
2009 add_binding for global bindings.
2010 (set_identifier_type_value): Adjust accordingly.
2011 (pushtag): Likewise.
2012 (pushdecl): Use set_identifier_type_value, not
2013 set_identifier_type_value_with_scope.
2014 (pushdecl_namespace_level): Adjust calls to
2015 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
2016 (pushdecl_class_level): Likewise.
2017 (lookup_tag): Use select_decl.
2018 (select_decl): Improve comment.
2019 (record_builtin_type): Do not call pushdecl.
2020 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
2021 (cp_finish_decl): Adjust call to set_identifier_type_value.
2022 (check_elaborated_type_specifier): Improve checks for invalid uses
2024 (xref_tag): Adjust call to check_elaborated_type_specifier.
2025 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
2026 * name-lookup.c (set_namespace_binding): Use add_binding.
2027 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
2028 rather than an IDENTIFIER_NODE, to represent built-in types, if
2029 requested by the caller.
2030 (cp_parser_postfix_expression): Adjust call.
2031 (cp_parser_type_specifier): Likewise.
2032 (cp_parser_elaborated_type_specifier): Adjust call to
2033 check_elaborated_type_specifier.
2034 * typeck2.c (build_functional_cast): Do not perform name lookups.
2037 * decl.c (expand_static_init): Remove unnecessary code.
2039 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
2041 PR c++/10538, PR c/5582
2042 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
2044 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2047 * init.c (build_offset_ref): Perform access checking for
2048 pointer to member correctly.
2050 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
2052 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
2054 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
2057 * cp-tree.h (finish_stmt_expr): Add bool parameter.
2058 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
2059 adjust the stmt_expr here.
2060 (build_vec_init): Use finish_stmt_expr_expr, convert result to
2062 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
2064 * pt.c (tsubst_copy): Likewise.
2065 * semantics.c (finish_stmt_expr): Add parameter.
2067 * pt.c (instantiate_class_template): Push to class's scope before
2070 2003-08-17 Jan Hubicka <jh@suse.cz>
2073 * semantics.c (finish_id_expression): Mark all functions as used.
2075 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
2078 * cvt.c (convert_to_void): Indicate which side of conditional has
2079 no effects, and rhs of comma operator. Test for no sideeffect
2080 expressions here and always build a convert expr.
2081 * init.c (expand_default_init): Convert the init to void.
2082 * typeck.c (build_x_compound_expr): Do not check for side effects
2084 (build_compound_expr): Do not convert lhs when building a
2087 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
2089 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
2090 * decl2.c (build_offset_ref_call_from_tree): Use
2091 build_non_dependent_expr.
2092 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
2093 * pt.c (build_non_dependent_expr): Set operand.
2095 2003-08-14 Jan Hubicka <jh@suse.cz>
2097 * decl2.c (mark_member_pointers): Rename to...
2098 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
2099 (lower_function): Update call.
2100 * except.c (eh_type_info): Break out from ...
2101 (build_eh_type): ... here; tinfo is already used.
2102 (finish_eh_spec_block): Mark tinfos as used.
2103 * semantics.c (finish_handler_params): Mark tinfo as used.
2104 * cp-tree.h (eh_type_info): Declare.
2106 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
2108 * pt.c (instantiate_class_template): Set location before
2111 * decl.c (make_typename_type): Use my_friendly_assert.
2112 * pt.c (tsubst_aggr_type): Rearrange context substitution.
2114 2003-08-14 Jan Hubicka <jh@suse.cz>
2116 * method.c (use_thunk): Expand body directly.
2118 2003-08-12 Mark Mitchell <mark@codesourcery.com>
2121 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
2122 determine whether or not to promote types.
2123 (convert_for_arg_passing): Likewise.
2124 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
2126 * pt.c (tsubst_decl): Do not expect it to be set.
2130 * cp-tree.h (check_elaborated_type_specifier): Declare.
2131 (handle_class_head): Remove.
2132 (note_got_semicolon): Likewise.
2133 (note_list_got_semicolon): Likewise.
2134 (finish_class_definition): Likewise.
2135 * decl.c (check_elaborated_type_specifier): Make it public.
2137 (handle_class_head): Remove.
2138 * parser.c (cp_parser_elaborated_type_specifier): Use
2139 check_elaborated_type_specifier.
2140 (cp_parser_class_specifier): Do not call finish_class_definition.
2141 (cp_parser_class_head): Or handle_class_head. Check for
2142 over-qualified names.
2143 * semantics.c (finish_class_definition): Remove.
2145 * parser.c (cp_parser_check_for_definition_in_return_type): New
2147 (cp_parser_simple_declaration): Adjust call to
2148 cp_parser_init_declarator.
2149 (cp_parser_decl_specifier_seq): Change type of
2150 declares_class_or_enum parameter.
2151 (cp_parser_explicit_instantiation): Adjust accordingly.
2152 (cp_parser_type_specifier): Change type of
2153 declares_class_or_enum parameter.
2154 (cp_parser_init_declarator): Add declares_class_or_enum
2156 (cp_parser_parameter_declaration): Adjust call to
2157 cp_parser_decl_specifier_seq.
2158 (cp_parser_function_definition): Likewise.
2159 (cp_parser_member_declaration): Likewise.
2160 (cp_parser_single_declaration): Likewise.
2162 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
2163 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
2164 (TYPE_OVERLOADS_CALL_EXPR): Remove.
2165 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
2166 (TYPE_OVERLOADS_ARROW): Likewise.
2167 (CLASSTYPE_GOT_SEMICOLON): Likewise.
2168 * class.c (check_bases): Do not set them.
2169 (finish_struct_1): Likewise.
2170 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
2171 (build_ptrmemfunc_type): Likewise.
2172 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
2173 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
2174 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
2175 * lex.c (note_got_semicolon): Remove.
2176 (note_list_got_semicolon): Likewise.
2177 * parser.c (cp_parser_simple_declaration): Do not call
2178 note_list_got_semicolon.
2179 * pt.c (list_eq): Remove.
2180 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
2181 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
2182 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
2183 * ptree.c (cxx_print_type): Do not print them.
2184 * semantics.c (finish_member_class_template): Do not call
2185 note_list_got_semicolon.
2187 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
2189 * call.c (standard_conversion): Opaque pointers interconvert.
2191 * testsuite/g++.dg/other/opaque-3.C: New.
2193 2003-08-11 Mark Mitchell <mark@codesourcery.com>
2195 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
2198 2003-08-10 Mark Mitchell <mark@codesourcery.com>
2201 * cp-tree.h (get_vbase): Remove.
2202 (get_vbase_types): Remove.
2203 * init.c (expand_member_init): Correct logic for looking up base
2206 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2208 * error.c (dump_expr): Tidy.
2209 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
2210 (pp_cxx_begin_template_argument_list): Likewise.
2211 (pp_cxx_end_template_argument_list): Likewise.
2212 (is_destructor_name): Likewise.
2213 (pp_cxx_unqualified_id): Likewise.
2214 (pp_cxx_qualified_id): Likewise.
2215 (pp_cxx_id_expression): Likewise.
2216 (pp_cxx_new_expression): Likewise.
2217 (pp_cxx_delete_expression): Likewise.
2218 (pp_cxx_pm_expression): Likewise.
2219 (pp_cxx_type_specifier): Rework.
2220 (pp_cxx_type_id): Likewise.
2221 (pp_cxx_primary_expression): Likewise.
2222 (pp_cxx_postfix_expression): Likewise.
2223 (pp_cxx_unary_expression): Likewise.
2224 (pp_cxx_multiplicative_expression): Likewise.
2225 (pp_cxx_conditional_expression): Likewise.
2226 (pp_cxx_assignment_expression): Likewise.
2227 (pp_cxx_pretty_printer_init): Tidy.
2229 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
2231 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
2232 NODE is always a TREE_VEC of nonzero size.
2233 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
2234 * decl2.c (arg_assoc): Template args will be a vec.
2235 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
2236 dump_template_argument_list.
2237 (dump_template_parms): Args will be a vec.
2238 * parser.c (cp_parser_template_argument_list): Produce a
2240 * pt.c (coerce_template_parms): Args are always vectors.
2241 (mangle_class_name_for_template): Likewise.
2242 (lookup_template_function): Likewise.
2243 (lookup_template_class): Likewise.
2244 (tsubst_template_args): Likewise.
2245 (tsubst_baselink): Use tsubst_template_args.
2246 (tsubst_qualified_id): Likewise.
2247 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
2248 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
2249 (any_dependent_template_args_p): Args are always vectors.
2250 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
2253 * call.c (convert_like_real): Add rvalue binding error message.
2254 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
2258 * pt.c (dependent_type_p_r): A dependent template-id is a class
2259 type with dependent template arguments, or a bound template
2261 (type_dependent_expression_p): A template function decl cannot
2262 have a dependent context.
2264 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2267 * parser.c (cp_parser_class_name): Return immediately when scope
2270 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
2272 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
2274 * cp/call.c (standard_conversion): Support opaque types.
2276 (strip_top_quals): Use cp_build_qualified_type instead of
2279 * cp/typeck.c (convert_for_assignment): Support opaque types.
2281 * testsuite/g++.dg/other/opaque-1.C: New.
2283 * testsuite/g++.dg/other/opaque-2.C: New.
2285 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
2287 * decl.c (grokparms): Use cp_build_qualified_type instead
2290 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2292 * cxx-pretty-print.h: New file.
2293 * cxx-pretty-print.c: Likewise.
2294 * error.c (scratch_pretty_printer): Change type.
2296 (dump_aggr_type): Likewise.
2297 (dump_global_iord): Likewise.
2298 (dump_expr): Likewise.
2299 (dump_char): Remove.
2300 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
2301 (cxx_initialize_diagnostics): New function.
2302 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
2303 (CXX_PRETTY_PRINT_H): New variable.
2304 (cp/cxx-pretty-print.o): New rule.
2305 (cp/cp-lang.o): Update dependence.
2306 (cp/error.o): Likewise.
2308 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
2310 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
2311 (DECL_DECLARED_INLINE_P): Remove.
2312 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
2313 if decl is a FUNCTION_DECL. This never made sense, but now it is
2314 required to avoid a tree check failure.
2315 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
2316 * optimize.c (maybe_clone_body): Likewise.
2318 2003-08-04 Roger Sayle <roger@eyesopen.com>
2320 * decl.c (cxx_insert_default_attributes): Delete.
2321 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
2322 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
2324 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
2327 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
2331 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
2334 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
2337 * cp-tree.def (USING_DECL): Document its type.
2338 * class.c (pushclass): If we're entering a template, push any
2339 dependent using decls it has.
2340 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
2342 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
2343 (tsubst): Remove USING_DECL checks.
2344 (type_dependent_expression_p): Remove USING_DECL case.
2345 * semantics.c (finish_member_declaration): A USING_DECL's type
2346 indicates whether it is dependent.
2348 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
2350 * cp-tree.h (pushclass): Remove unneeded parameter.
2351 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
2352 (push_nested_class): Adjust pushclass call.
2353 * pt.c (instantiate_class_template): Likewise.
2354 * semantics.c (begin_class_definition): Likewise.
2356 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
2358 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
2360 2003-08-01 Mark Mitchell <mark@codesourcery.com>
2363 * decl.c (decls_match): Don't ignore the types of template
2367 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
2369 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2371 PR c++/8442, c++/8806
2372 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
2374 (check_elaborated_type_specifier): Add allow_template_p
2375 parameter. Check tag mismatch and class template.
2376 (xref_tag): Add template_header_p parameter. Add assertion
2377 that name is an IDENTIFIER_NODE. Remove implicit typename
2378 warning. Simplify lookup process if globalize is true.
2379 (cxx_init_decl_processing): Adjust call to xref_tag.
2380 (xref_tag_from_type): Likewise.
2381 * decl2.c (handle_class_head): Likewise.
2382 * parser.c (cp_parser_elaborated_type_specifier,
2383 cp_parser_class_head): Likewise.
2384 * rtti.c (init_rtti_processing, build_dynamic_cast1,
2385 tinfo_base_init, emit_support_tinfos): Likewise.
2386 * class.c (is_base_of_enclosing_class): Remove.
2387 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
2388 template template argument.
2389 * cp-tree.h (xref_tag): Adjust declaration.
2390 (is_base_of_enclosing_class): Remove.
2391 * NEWS: Document template template argument change.
2393 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
2395 * parser.c (cp_parser_init_declarator,
2396 cp_paser_member_declaration): Reformat.
2397 * pt.c (lookup_template_class, type_unification_real, unify,
2398 type_dependent_expression_p): Reformat.
2401 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
2403 (finish_stmt_expr_expr): Declare.
2404 * parser.c (cp_parser_primary_expression): Tell
2405 cp_parser_compount_statement that it is a statement expression.
2406 (cp_parser_statement, cp_parser_labeled_statement,
2407 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
2408 in_statement_expr_p parameter.
2409 (cp_parser_expression_statement): Likewise. Call
2410 finish_stmt_expr_expr for final expression of a statement
2412 (cp_parser_for_init_statement,
2413 cp_parser_implicitly_scoped_statement,
2414 cp_parser_already_scoped_statement, cp_parser_function_definition,
2415 cp_parser_try_block, cp_parser_handled): Adjust.
2416 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
2417 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
2418 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
2419 * semantics.c (finish_expr_stmt): Do not deal with statement
2421 (begin_stmt_expr): Clear last_expr_type.
2422 (finish_stmt_expr_expr): New.
2423 (finish_stmt_expr): Process the value expression.
2425 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
2426 compound expr inside the target's initializer.
2429 * parser.c (cp_parser_primary_expression): Do not set
2430 non-constant-p merely because it is a dependent scope.
2433 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
2434 * semantics.c (finish_expr_stmt): Do not convert to void in a
2437 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
2439 * pt.c (coerce_template_parms): Refactor.
2440 (fn_type_unification): Increment processing_template_decl when
2441 tsubsting an incomplete set of explicit args.
2444 * pt.c (instantiate_class_template): Increment
2445 processing_template_decl around the tsubst of a template member
2447 (tsubst_qualified_id): Assert we do not have a dependent scope.
2449 * pt.c (coerce_template_template_parms, lookup_template_class,
2450 can_complete_type_without_circularity, instantiate_class_template,
2451 tsubst_decl, unify): Reformat.
2453 2003-07-31 Jan Hubicka <jh@suse.cz>
2455 * decl2.c (maybe_make_one_only): Use mark_referenced.
2456 * method.c (use_thunk): Likewsie.
2458 2003-07-30 Jan Hubicka <jh@suse.cz>
2460 * class.c (build_vtable_entry_ref): Kill.
2461 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
2462 (build_vfn_ref): Do not call build_vtable_entry_ref.
2463 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
2464 * cp-tree.h (prepare_assemble_variable): Kill.
2465 * cp-decl.c (prepare_assemble_variable): Kill.
2467 2003-07-29 Geoffrey Keating <geoffk@apple.com>
2469 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2470 of setting valid_pch by hand.
2472 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2474 * decl.c (finish_enum): Initialize underlying_type.
2476 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
2479 * decl.c (add_binding): Add bval local variable.
2480 (push_class_level_binding): Likewise. Allow a USING_DECL to be
2482 * decl2.c (do_class_using_decl): The type of a using decl is
2484 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2485 function call lookup code.
2486 * pt.c (tsubst): A USING_DECL will have unknown type.
2487 (tsubst_copy_and_build): Allow a using decl.
2488 (type_dependent_expression_p): A USING_DECL will make it
2490 * semantics.c (finish_member_declaration): Push a dependent using
2493 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2496 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2497 * semantics.c (finish_id_expression): Call mark_used for all
2500 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2503 * call.c (standard_conversion): Allow all integral->enumeral
2504 conversions, after marking them as bad.
2505 * decl.c (finish_enum): Make sure that all enumerators are
2506 properly converted to the underlying type.
2507 (build_enumerator): Set DECL_CONTEXT for namespace-scope
2509 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2510 (tsubst_enum): Tidy.
2512 * Make-lang.in (typeck.o): Depend on convert.h.
2513 (class.o): Likewise.
2515 * call.c: Include convert.h.
2516 (convert_arg_to_ellipsis): Use convert_to_real.
2517 * class.c: Include convert.h.
2518 (build_base_path): Use convert_to_integer.
2519 * rtti.c: Include convert.h.
2520 (build_headof): Use convert_to_integer.
2521 * typeck.c: Include convert.h.
2522 (decay_conversion): Use convert_to_integer.
2523 (build_unary_op): Use build_nop.
2524 (get_delta_difference): Use convert_to_integer.
2525 (build_ptrmemfunc): Avoid unnecessary conversions.
2527 2003-07-28 Jan Hubicka <jh@suse.cz>
2529 * decl2.c (mark_member_pointers): Verify that member pointer points to
2532 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
2534 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2535 (finish_compound_stmt): Remove no scope arg.
2536 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2537 end_compound_stmt calls.
2538 (expand_static_init, begin_destructor_body, begin_function_body,
2539 finish_function_body): Likewise.
2540 * decl2.c (start_objects, finish_objects,
2541 start_static_storage_duration_function,
2542 finish_static_storage_duration_function): Likewise.
2543 * init.c (begin_init_stmts, finish_init_stmts,
2544 construct_virtual_base, build_vec_init): Likewise.
2545 * method.c (do_build_assign_ref, synthesize_method): Likewise.
2546 * parser.c (cp_parser_compound_statement,
2547 cp_parser_implicitly_scoped_statement,
2548 cp_parser_already_scoped_statement): Likewise.
2549 * pt.c (tsubst_expr): Likewise.
2550 * semantics.c (begin_compound_stmt): No scope arg is a bool.
2551 (finish_compound_stmt): Remove no scope arg.
2553 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2556 2003-07-27 Mark Mitchell <mark@codesourcery.com>
2558 * call.c (standard_conversion): Tweak handling of
2559 pointer-to-member types.
2560 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2561 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2562 pointer-to-data member types.
2564 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
2566 * parser.c (cp_parser_type_parameter): Reformat.
2567 (cp_parser_parameter_declaration): Deprecate default args where
2570 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
2574 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2575 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2576 * init.c (begin_init_stmts): Make static. Return is_global
2577 value. Always call begin_stmt_expr.
2578 (finish_init_stmts): Make static. Add is_global parm. Always
2579 building a stmt tree.
2580 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2581 (build_vec_init): Likewise. Always building a stmt tree.
2582 (expand_default_init): Always building a stmt tree.
2583 (get_temp_regvar): Likewise.
2584 * semantics.c (begin_global_stmt_expr,
2585 finish_global_stmt_expr): Remove.
2587 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2589 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2590 (build_x_compound_expr_from_list): Declare.
2591 * typeck.c (build_x_compound_expr_from_list): New.
2592 (build_x_compound_expr): Adjust.
2593 (build_compound_expr): Remove unreachable code. Take two
2595 * decl.c (grok_reference_init): Use
2596 build_x_compound_expr_from_list.
2597 (expand_static_init): Adjust build_compound_expr call.
2598 (cxx_maybe_build_cleanup): Likewise.
2599 * init.c (perform_member_init): Use
2600 build_x_compound_expr_from_list.
2601 (build_new_1): Likewise.
2602 (build_vec_delete): Adjust build_compound_expr calls.
2603 (build_vbase_delete): Likewise.
2604 * typeck2.c (store_init_value): Use
2605 build_x_compound_expr_from_list.
2606 (build_functional_cast): Likewise.
2608 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2610 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2611 * decl.c (make_typename_type): Pass it.
2612 * pt.c (lookup_template_class): Use it.
2613 (resolve_typename_type): Pass it.
2614 * semantics.c (finish_template_type): Pass it.
2616 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2619 * cp-tree.h (qualified_name_lookup_error): Declare.
2620 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2622 (tsubst_expr) <DECL_STMT case>: Likewise.
2623 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2624 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2625 (finish_id_expression): ... here. Use it.
2627 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2629 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2631 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2634 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2635 (tsubst_template_arg): New.
2636 (tsubst_template_arg_vector): Rename to ...
2637 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2638 tsubst_template_arg.
2639 (coerce_template_parms): Use tsubst_template_arg for default
2641 (tsubst_template_parms): Likewise.
2642 (tsubst_aggr_type): Adjust.
2643 (tsubst_decl): Likewise.
2644 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2645 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2647 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2649 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2650 * error.c: Use the new pretty-printer framework.
2652 2003-07-24 Per Bothner <pbothner@apple.com>
2654 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2655 which causes errors messages to incorrectly mention included files.
2657 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2659 * cp-tree.h (convert_to_base_statically): Declare.
2660 * call.c (build_special_member_call): Convert INSTANCE to the base
2662 * class.c (convert_to_base_statically): New method.
2663 * init.c (construct_virtual_base): Use it.
2664 * method.c (do_build_assign_ref): Fix typo in comment.
2666 2003-07-24 Jason Merrill <jason@redhat.com>
2668 * decl.c: Just set truthvalue_* to boolean_*.
2670 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2672 * decl.c (reshape_init): Remove unreachable code.
2674 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2677 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2679 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2682 * cp-tree.h (accessible_base_p): Declare.
2683 * call.c (build_over_call): Use it.
2684 * search.c (accessible_base_p): New function, split out from ...
2685 (lookup_base): ... here.
2688 * call.c (build_conditional_expr): Use perform_implicit_conversion
2689 and error_operand_p. Robustify.
2690 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2692 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2695 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2697 (cp_parser_elaborated_type_specifier): Likewise.
2699 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2701 Eliminate use of POINTER_TYPE for pointers-to-members.
2702 * call.c (standard_conversion): Rework pointer-to-member handling.
2704 (add_builtin_candidate): Likewise.
2705 (resolve_scoped_fn_name): Remove.
2706 (build_conditional_expr): Rework pointer-to-member handling.
2707 (compare_ics): Likewise.
2708 * class.c (check_field_decls): Use TYPE_PTR_P.
2709 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2711 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2712 (TYPE_PTRMEM_P): Add comment.
2713 (TYPE_PTR_P): Simplify.
2714 (TYPE_PTROB_P): Correct definition.
2715 (TYPE_PTR_TO_MEMBER_P): New macro.
2716 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2717 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2718 (resolved_scoped_fn_name): Remove declaration.
2719 (build_offset_ref): Change prototype.
2720 (resolve_offset_ref): Remove.
2721 (comp_target_types): Remove.
2722 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2724 (convert_to_reference): Use can_convert.
2725 (ocp_convert): Improve error handling. Rework pointer-to-member
2727 (perform_qualification_conversions): Rework pointer-to-member
2729 * decl.c (build_ptrmem_type): Handle functions too.
2730 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2731 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2732 (grokparms): Remove OFFSET_TYPE error message.
2733 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2734 * error.c (dump_type_prefix): Likewise.
2735 * expr.c (cplus_expand_constant): Use build_nop.
2736 * init.c (build_offset_ref): Add address_p parameter. Fold in
2737 necessary bits from resolve_offset_ref.
2738 (resolve_offset_ref): Remove.
2739 * parser.c (cp_parser_postfix_expression): Remove special case
2740 code for OFFSET_TYPE.
2741 * pt.c (convert_nontype_argument): Rework pointer-to-member
2743 (convert_template_argument): Likewise.
2745 (invalid_nontype_parm_type_p): Likewise.
2746 (dependent_type_p_r): Likewise.
2747 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2748 (target_incomplete_p_): Rework pointer-to-member
2750 (get_pseudo_ti_init): Likewise.
2751 (get_pseudo_ti_desc): Likewise.
2752 * semantics.c (finish_qualified_id_expr): Adjust call to
2753 build_offset_ref. Remove use of resolve_offset_ref.
2754 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2755 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2756 (type_unknown_p): Remove obsolete code about the time before
2757 non-dependent expressions were handled correctly.
2758 (qualify_type_recursive): Remove.
2759 (composite_pointer_type_r): New function.
2760 (composite_pointer_type): Use it.
2761 (merge_types): Remove dead comments.
2762 (comp_cv_target_types): Remove.
2763 (comp_target_types): Likewise.
2764 (comp_target_parms): Likewise.
2765 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2766 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2767 (build_binary_op): Do not use of comp_target_types.
2768 (pointer_diff): Remove OFFSET_TYPE case.
2769 (build_unary_op): Adjust pointer-to-member handling.
2770 (unary_complex_lvalue): Likewise.
2771 (check_for_casting_away_constness): Add description parameter.
2772 (build_static_cast): Pass it.
2773 (build_reinterpret_cast): Use check_for_casting_away_constness.
2774 (build_const_cast): Adjust pointer-to-member handling.
2775 (build_c_cast): Likewise.
2776 (convert_for_assignment): Remove OFFSET_TYPE error message.
2777 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2778 (comp_ptr_ttypes_reinterpret): Remove.
2779 (casts_away_constness_r): Adjust pointer-to-member handling.
2780 (casts_away_constness): Liekwise.
2781 (strip_all_pointer_quals): Remove.
2782 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2783 (build_m_component_ref): Likewise.
2785 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2787 * lex.c (unqualified_fn_lookup_error): Mention that the error
2788 message needs to be kept in synch with the manual.
2790 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2793 * decl.c (grokdeclarator): An array member is only a flexible
2794 array member if the field itself is the array.
2796 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2799 * decl.c (xref_basetypes): Handle error_mark_node.
2801 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2803 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2804 * tree.c (lvalue_p_1): Set it.
2805 * class.c (check_field): Don't allow non-packed non-POD fields to
2807 * call.c (reference_binding): Need a temporary for all bitfield
2809 (convert_like_real): Check it is ok to make a temporary here.
2811 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2813 * cp-tree.h (hack_identifier): Remove.
2814 * method.c (hack_identifier): Remove.
2815 * semantics.c (finish_id_expression): Expand hack_identifier
2818 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2820 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2821 semantics.c typeck.c: Remove unnecessary casts.
2823 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2825 * cp-tree.h (hack_identifier): Remove.
2826 * method.c (hack_identifier): Remove.
2827 * semantics.c (finish_id_expression): Expand hack_identifier
2830 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2832 * cp-tree.h (finish_non_static_data_member): Add object param.
2833 * method.c (hack_identifier): Adjust.
2834 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2835 again for a FIELD_DECL.
2836 * semantics.c (finish_non_static_data_member): Add object
2837 parameter. Always save the DECL in the COMPONENT_REF.
2838 * call.c (resolve_scoped_fn_name): Adjust.
2840 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2842 * pt.c (get_bindings): Make definition consistent with
2843 forward declaration.
2845 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2848 * friend.c (add_friend): Check access for member functions
2851 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2854 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2856 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2859 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2861 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2862 * decl.c (duplicate_decls): Merge
2863 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2864 * parser.c (cp_parser_postfix_expression): Adjust call to
2865 cp_parser_initializer_list and
2866 cp_parser_parenthesized_expression_list.
2867 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2868 (cp_parser_new_placement): Adjust call to
2869 cp_parser_parenthesized_expression_list.
2870 (cp_parser_direct_new_declarator): Likewise.
2871 (cp_parser_conditional_expression): Remove.
2872 (cp_parser_constant_expression): Parse an assignment-expression,
2873 not a conditional-expression.
2874 (cp_parser_simple_declaration): Resolve expression/declaration
2875 ambiguity more quickly.
2876 (cp_parser_mem_initializer): Adjust call to
2877 cp_parser_parenthesized_expression_list.
2878 (cp_parser_init_declarator): Keep track of whether or not the
2879 initializer is a constant-expression.
2880 (cp_parser_initializer): Add non_constant_p parameter.
2881 (cp_parser_initializer_clause): Likewise.
2882 (cp_parser_initializer_list): Likewise.
2883 (cp_parser_attribute_list): Adjust call to
2884 cp_parser_parenthesized_expression_list.
2885 (cp_parser_functional_cast): Likewise.
2886 * pt.c (tsubst_decl): Copy
2887 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2888 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2889 * semantics.c (finish_id_expression): Use
2890 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2892 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2894 * lang-options.h: Remove.
2896 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2899 * class.c (field_decl_cmp): Remove.
2900 (resort_field_decl_cmp): Remove.
2901 (resort_sorted_fields): Remove.
2902 (add_fields_to_vec): Rename to ...
2903 (add_fields_to_record_type): this.
2904 (finish_struct_1): Change to be using
2905 sorted_fields_type's fields.
2906 * cp-tree.h (lang_decl): In lang_decl_u3
2907 change sorted_fields to be a pointer to
2909 (resort_sorted_fields): Remove prototype.
2910 * search.c (lookup_field_1): Change to be using
2911 sorted_fields_type's fields.
2913 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2916 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2917 is a member of other class.
2918 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2919 is a specialization of function template.
2921 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2924 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2927 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2929 * cp-tree.def (LOOKUP_EXPR): Remove.
2930 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2931 (LOOKUP_EXPR_GLOBAL): Remove.
2932 (get_bindings): Remove.
2933 (is_aggr_type_2): Remove.
2934 * call.c (resolved_scoped_fn_name): Remove support for
2936 * decl.c (grokfndecl): Likewise.
2937 (grokdeclarator): Likewise.
2938 * error.c (dump_decl): Likewise.
2939 (dump_expr): Likewise.
2940 * friend.c (do_friend): Likewise.
2941 * init.c (build_offset_ref): Likewise.
2942 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2944 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2945 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2947 * pt.c (get_bindings): Give it internal linkage.
2948 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2949 (lookup_template_function): Likewise.
2950 (for_each_tempalte_parm_r): Likewise.
2951 (tsubst_decl): Likewise.
2952 (tsubst_qualified_id): Handle template template parameters.
2953 (tsubst_copy): Remove support for LOOKUP_EXPR.
2954 (tsubst_copy_and_build): Likewise.
2955 (most_general_template): Likewise.
2956 (value_dependent_expression_p): Likewise.
2957 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2959 * semantics.c (perform_koenig_lookup): Do not create
2961 (finish_fname): Likewise.
2962 (finish_id_expression): Likewise.
2963 * tree.c (is_aggr_type_2): Remove.
2965 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2968 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2970 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2973 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2976 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2979 * pt.c (dependent_scope_ref_p): New function.
2980 (value_dependent_expression_p): Use it.
2981 (type_dependent_expression_p): Likewise.
2983 * pt.c (tsubst_friend_function): Use reregister_specialization.
2986 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2987 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2988 call to is_aggr_type.
2989 * parser.c (cp_parser_lookup_name): Adjust call to
2990 lookup_qualified_name.
2991 * pt.c (tsubst_qualified_id): Likewise.
2992 (tsubst_copy_and_build): Likewise.
2993 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2996 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2999 * call.c (op_error): Properly format REALPART_EXPR and
3001 * error.c (dump_expr): Likewise.
3003 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
3005 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
3007 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
3010 * call.c (initialize_reference): Improve diagnostic.
3012 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3015 * pt.c (more_specialized_class): Add full_args parameter.
3016 (most_specialized_class): Adjust calls to more_specialized_class.
3017 * cp-tree.h (more_specialized_class): Adjust declaration.
3019 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
3021 * lex.c (enum tree_node_kind): Delete.
3023 2003-07-13 Mark Mitchell <mark@codesourcery.com>
3026 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
3027 (SET_DECL_SELF_REFERENCE_P): Likewise.
3028 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
3029 * pt.c (tsubst_decl): Copy it.
3030 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
3032 * pt.c (reregister_specialization): Fix thinko in previous change.
3034 * cp-tree.h (cp_id_kind): New type.
3035 (unqualified_name_lookup_error): Change prototype.
3036 (unqualified_fn_lookup_error): New function.
3037 (do_identifier): Remove.
3038 (do_scoped_id): Likewise.
3039 (tsubst_copy_and_build): Change prototype.
3040 (reregister_specialization): New function.
3041 (perform_koenig_lookup): Likewise.
3042 (finish_id_expression): Likewise.
3043 * call.c (build_method_call): Adjust call to
3044 unqualified_name_lookup_error.
3045 * decl.c (duplicate_decls): Use reregister_specialization.
3046 * lex.c (is_global): Remove.
3047 (unqualified_name_lookup_error): Return a value.
3048 (do_identifier): Remove.
3049 (do_scoped_id): Likewise.
3050 (identifier_typedecl_value): Remove.
3051 (unqualified_fn_lookup_error): New function.
3052 * parser.c (cp_parser_id_kind): Remove.
3053 (cp_parser_non_constant_id_expression): Remove.
3054 (cp_parser_primary_expression): Use finish_id_expression.
3055 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
3057 (cp_parser_postfix_expression): Use perform_koenig_lookup.
3058 (cp_parser_template_argument): Use cp_id_kind.
3059 (cp_parser_fold_non_dependent_expr): Adjust call to
3060 tsubst_copy_and_build.
3061 * pt.c (unregister_specialization): Rename to ...
3062 (reregister_specialization): This.
3063 (tsubst_friend_function): Use it.
3064 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
3065 (tsubst_qualified_id): Likewise.
3066 (tsubst_expr): Likewise.
3067 (tsubst_copy_and_build): Add function_p parameter. Use
3068 finish_id_expression. Introduce RECUR macro.
3069 (tsubst_non_call_postfix_expression): New function.
3070 (regenerate_decl_from_template): Use reregister_specialization.
3071 * semantics.c (perform_koenig_lookup): New function.
3072 (finish_id_expression): Likewise.
3074 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3076 * pt.c (push_access_scope_real): Remove.
3077 (push_access_scope): Move code from push_access_scope_real.
3078 (pop_access_scope): Don't check for TEMPLATE_DECL.
3079 (instantiate_template): Defer access checking during template
3081 (regenerate_decl_from_template): Tidy.
3083 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
3086 * operators.def: Add definitions for __imag__, __real__.
3088 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
3091 * parser.c (cp_parser_expression_list): Rename to ...
3092 (cp_parser_parenthesized_expression_list): ... here. Add attribute
3093 parameter, parse the surounding parentheses.
3094 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
3095 parameters. Return int.
3096 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
3097 (cp_parser_postfix_expression): Adjust function call parsing.
3098 (cp_parser_new_placement): Adjust.
3099 (cp_parser_new_initializer): Likewise.
3100 (cp_parser_cast_expression): Likewise.
3101 (cp_parser_selection_statement): Likewise.
3102 (cp_parser_mem_initializer): Likewise.
3103 (cp_parser_asm_definition): Likewise.
3104 (cp_parser_init_declarator): Likewise.
3105 (cp_parser_declarator): Make
3106 cdtor_or_conv_p an int ptr.
3107 (cp_parser_direct_declarator): Likewise. Check for a parameter
3108 list on cdtors & conv functions.
3109 (cp_parser_initializer): Adjust.
3110 (cp_parser_member_declaration): Adjust.
3111 (cp_parser_attribute_list): Move code into
3112 cp_parser_parens_expression_list.
3113 (cp_parser_functional_cast): Adjust.
3114 * pt.c (type_dependent_expression_p): Erroneous expressions are
3117 2003-07-11 Geoffrey Keating <geoffk@apple.com>
3119 * decl.c (cp_finish_decl): Handle 'used' attribute.
3121 * cp-lang.c (c_reset_state): New dummy routine.
3122 * cp-tree.h (finish_file): Move prototype to c-common.h.
3123 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
3125 2003-07-11 Mark Mitchell <mark@codesourcery.com>
3128 * pt.c (tsubst_qualified_id): Implement suggested resolution for
3130 (type_dependent_expression_p): Likewise.
3132 2003-07-10 Mark Mitchell <mark@codesourcery.com>
3134 * typeck.c (build_binary_op): Do not warn about signed
3135 vs. unsigned comparisons in the bodies of templates.
3138 * parser.c (cp_parser_postfix_expression): Check dependency of
3141 2003-07-09 Mark Mitchell <mark@codesourcery.com>
3144 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
3148 * error.c (decl_to_string): Do not print default argument
3151 * cp-tree.h (break_out_calls): Remove declaration.
3152 * tree.c (break_out_calls): Remove.
3153 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
3155 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
3158 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
3159 * decl2.c (constructor_name_p): Avoid repeated constructor_name
3161 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
3163 2003-07-09 Mark Mitchell <mark@codesourcery.com>
3165 * typeck.c (build_x_unary_op): Take note of the fact that
3166 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
3169 * parser.c (cp_parser_primary_expression): Preserve the form of
3170 qualified expressions in templates, even if they are not
3172 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
3173 (tsubst_qualified_id): Likewise.
3174 * search.c (accessible_p): Treat everything in the body of a
3175 template as accessible.
3177 2003-07-08 Mark Mitchell <mark@codesourcery.com>
3179 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
3180 * cp-tree.h (build_call_from_tree): Remove.
3181 (build_member_call): Likewise.
3182 (dependent_template_arg_p): Remove.
3183 (any_dependent_template_arguments_p): New function.
3184 (dependent_template_id_p): Likewise.
3185 (any_type_dependent_arguments_p): Likewise.
3186 (build_non_dependent_expr): Likewise.
3187 (build_non_dependent_args): Likewise.
3188 (build_x_compound_expr): Adjust prototype.
3189 * call.c (build_new_method_call): Handle non-dependent expressions
3191 * decl2.c (grok_array_decl): Likewise.
3192 (build_offset_ref_call_from_tree): Likewise.
3193 (build_call_from_tree): Remove.
3194 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
3195 (dump_expr): Likewise.
3196 * init.c (build_member_call): Remove.
3197 * mangle.c (write_expression): Update handling for template-ids.
3198 * parser.c (cp_parser_primary_expression): Use
3199 any_dependent_template_arguments_p. Update constant-expression
3201 (cp_parser_postfix_expression): Use
3202 any_type_dependent_arguments_p. Simplify call processing.
3203 (cp_parser_unary_expression): Simplify.
3204 (cp_parser_expression): Adjust for changes to
3205 build_x_compound_expr.
3206 (cp_parser_template_argument): Implement standard-conforming
3207 parsing of non-type template arguments.
3208 (cp_parser_direct_declarator): Use
3209 cp_parser_fold_non_dependent_expr.
3210 (cp_parser_fold_non_dependent_expr): New function.
3211 (cp_parser_next_token_ends_template_argument_p): Likewise.
3212 * pt.c (convert_template_argument): Do not call
3213 maybe_fold_nontype_arg.
3214 (tsubst_baselink): Likewise.
3215 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
3216 processing work correctly for non-dependent expressions. Adjust
3217 handling of COMPOUND_EXPR. Simplify call processing.
3218 (value_dependent_expression_p): Deal with functional casts and
3219 sizeof/alignof correctly.
3220 (type_dependent_expression_p): Handle overloaded functions.
3221 (any_type_dependent_arguments_p): New function.
3222 (any_dependent_template_arguments_p): Likewise.
3223 (dependent_template_p): Treat SCOPE_REFs as dependent.
3224 (dependent_template_id_p): Simplify.
3225 (build_non_dependent_expr): New function.
3226 (build_non_dependent_args): Likewise.
3227 * semantics.c (finish_stmt_expr): Don't make dependent
3228 statement-expresions have void type.
3229 (finish_call_expr): Handle non-dependent expressions
3231 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
3232 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
3233 type size_t, even in templates.
3234 (expr_sizeof): Likewise.
3235 (finish_class_member_access_expr): Handle non-dependent expressions
3237 (build_x_indirect_ref): Likewise.
3238 (build_x_binary_op): Likewise.
3239 (build_x_unary_op): Likewise.
3240 (build_x_conditional_expr): Likewise.
3241 (build_x_compound_expr): Likewise.
3242 * typeck2.c (build_x_arrow): Likewise.
3244 2003-07-09 Jan Hubicka <jh@suse.cz>
3246 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
3247 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
3248 (start_function): Use DECL_ESTIMATED_INSNS.
3249 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
3251 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
3254 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3257 * pt.c (instantiate_class_template): Don't call xref_tag to
3258 inject name when the friend class is a specialization.
3260 2003-07-07 Mark Mitchell <mark@codesourcery.com>
3262 * cp-tree.h (build_scoped_method_call): Remove.
3263 (lookup_qualified_name): Remove parameter.
3264 (tsubst_copy_and_build): Declare.
3265 (finish_qualified_object_call_expr): Remove.
3266 (check_accessibility_of_qualified_id): New function.
3267 (finish_qualified_id_expr): Likewise.
3268 (non_reference): Likewise.
3269 (build_expr_from-tree): Remove.
3270 * call.c (non_reference): Remove.
3271 (build_scoped_method_call): Likewise.
3272 (build_method_call): Use error_operand_p. Assert that we are not
3273 processing a template.
3274 (standard_conversion): Use non_reference.
3275 * class.c (build_vtbl_entry_ref): Likewise.
3276 (build_vtbl_ref_1): Likewise.
3277 * cvt.c (build_expr_type_conversion): Use non_reference.
3278 * decl.c (lookup_qualified_name): Remove flags parameter.
3279 (grok_op_properties): Use non_reference.
3280 * decl2.c (grok_array_decl): Likewise.
3281 (build_expr_from_tree): Remove.
3282 (build_offset_ref_call_from_tree): Update comment.
3283 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
3284 * except.c (prepare_eh_types): Use non_reference.
3285 (can_convert_eh): Likewise.
3286 * init.c (build_dtor_call): Avoid using build_method_call.
3287 * mangle.c (write_template_param): Remove misleading comment.
3288 * method.c (locate_copy): Use non_reference.
3289 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
3290 (cp_parser_primary_expression): Do not create SCOPE_REFs is
3291 non-dependent contexts.
3292 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
3293 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
3294 build_expr_from_tree.
3295 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
3296 Use check_accessibility_of_qualified_id.
3297 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
3298 build_expr_from_tree.
3299 (tsubst_baselink): New function.
3300 (tsubst_qualified_id): Likewise.
3301 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
3302 (tsubst_expr): Adjust call to lookup_qualified_name.
3303 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
3304 handling of CALL_EXPRs.
3305 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
3306 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
3307 * search.c (check_final_overrider): Likewise.
3308 * semantics.c (check_accessibility_of_qualified_id): New function.
3309 (finish_qualified_object_call_expr): Remove.
3310 * typeck.c (target_type): Use non_reference.
3311 (cxx_sizeof_or_alignof_type): Likewise.
3312 (dubious_conversion_warnings): Likewise.
3313 (convert_for_initialization): Likewise.
3314 (non_reference): New function.
3316 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3318 * decl.c (print_binding_level, print_other_binding_stack,
3319 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
3321 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
3323 2003-07-07 Andreas Jaeger <aj@suse.de>
3325 * friend.c: Convert to ISO C90 prototypes.
3327 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
3329 * cfns.h: Regenerate.
3331 * typeck.c: Convert remaining prototypes to ISO C90.
3332 * search.c: Likewise.
3334 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
3335 * semantics.c (expand_or_defer_fn): Likewise
3336 * mangle.c (discriminator_for_string_literal): Likewise.
3337 * g++spec.c (lang_specific_driver): Likewise.
3339 * search.c (lookup_base_r): Remove unused variable.
3341 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
3343 * semantics.c: (genrtl_try_block) Adjust emit_line_note
3346 2003-07-07 Andreas Jaeger <aj@suse.de>
3348 * search.c (lookup_base_r): Remove unused variable.
3350 2003-07-06 Michael Chastain <mec@shout.net>
3353 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
3354 assigning to input_filename directly.
3356 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
3358 * call.c: Fix comment formatting.
3359 * class.c: Likewise.
3360 * cp-tree.h: Likewise.
3362 * decl2.c: Likewise.
3363 * error.c: Likewise.
3364 * method.c: Likewise.
3365 * name-lookup.c: Likewise.
3366 * parser.c: Likewise.
3369 * search.c: Likewise.
3370 * typeck.c: Likewise.
3372 2003-07-06 Mark Mitchell <mark@codesourcery.com>
3375 * search.c (lookup_base_r): Remove is_non_public and
3376 within_current_scope parameters. Remove other dead code.
3377 (lookup_base): Adjust call to lookup_base_r.
3378 (adjust_result_of_qualified_name_lookup): Improve comment.
3379 * semantics.c (finish_call_expr): Use maybe_dummy_object.
3381 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
3383 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
3384 LANG_HOOKS_MISSING_ARGUMENT): Override.
3386 2003-07-05 Mark Mitchell <mark@codesourcery.com>
3389 * typeck.c (build_static_cast): Check for reference conversions
3392 2003-07-04 Mark Mitchell <mark@codesourcery.com>
3394 * cp-tree.h (perform_integral_promotions): Declare.
3395 * call.c (build_addr_func): Use decay_conversion.
3396 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
3397 (convert_for_arg_passing): Use perform_integral_promotions.
3398 * cvt.c (build_expr_type_conversion): Use decay_conversion.
3399 (type_promotes_to): Do not return a cv-qualified type.
3400 * decl.c (grok_reference_init): Fix formatting.
3401 (get_atexit_node): Use decay_conversion.
3402 (build_enumerator): Use perform_integral_promotions.
3403 * init.c (build_vec_init): Use decay_conversion.
3404 * semantics.c (finish_expr_stmt): Likewise.
3405 (finish_switch_cond): Use perform_integral_promotions.
3406 * typeck.c (default_conversion): Likewise.
3407 (perform_integral_promotions): New function.
3408 (build_indirect_ref): Use decay_conversion.
3409 (build_array_ref): Use perform_integral_promotions.
3410 (convert_arguments): Use decay_conversion.
3411 (build_unary_op): Use perform_integral_promotions.
3412 (build_c_cast): Use decay_conversion.
3413 (build_modify_expr): Likewise.
3414 (convert_for_initialization): Likewise.
3415 * typeck2.c (build_x_arrow): Likewise.
3417 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
3419 * call.c: Fix comment typos.
3420 * class.c: Likewise.
3421 * cp-tree.h: Likewise.
3423 * decl2.c: Likewise.
3426 * mangle.c: Likewise.
3427 * parser.c: Likewise.
3429 * search.c: Likewise.
3430 * semantics.c: Likewise.
3432 * typeck.c: Likewise.
3434 2003-07-04 Zack Weinberg <zack@codesourcery.com>
3436 * parser.c (cp_lexer_read_token): No need to handle string
3437 constant concatenation.
3439 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3441 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
3442 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
3443 ATTRIBUTE_GCC_CXXDIAG.
3445 2003-07-03 Mark Mitchell <mark@codesourcery.com>
3447 * call.c (build_addr_func): Handle bound pointers-to-members.
3448 (build_method_call): Do not call resolve_offset_ref.
3449 (implicit_conversion): Likewise.
3450 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
3452 (resolve_args): Do not call resolve_offset_ref.
3453 (build_conditional_expr): Likewise.
3454 (build_new_method_call): Likewise.
3455 * cp-tree.def (OFFSET_REF): Update documentation.
3456 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
3457 pointers to members to pointers.
3458 (ocp_convert): Do not call resolve_offset_ref.
3459 (convert_to_void): Likewise.
3460 (build_expr_type_conversion): Likewise.
3461 * decl2.c (delete_sanity): Likewise.
3462 * init.c (resolve_offset_ref): Simplify greatly.
3463 (build_vec_delete): Do not call resolve_offset_ref.
3464 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
3466 (cp_parser_unary_expression): Use
3467 cp_parser_simple_cast_expression.
3468 (cp_parser_delete_expression): Likewise.
3469 (cp_parser_cast_expression): Likewise.
3470 (cp_parser_pm_expression): Use cp_parser_binary_op.
3471 (cp_parser_simple_cast_expression): New function.
3472 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3473 * semantics.c (finish_increment_expr): Likewise.
3474 (finish_typeof): Likewise.
3475 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3476 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3477 (decay_conversion): Do not call resolve_offset_ref.
3478 (finish_class_member_access_expr): Likewise.
3479 (convert_arguments): Likewise.
3480 (build_x_binary_op): Handle DOTSTAR_EXPR.
3481 (condition_conversion): Do not call resolve_offset_ref.
3482 (unary_complex_lvalue): Likewise.
3483 (build_static_cast): Likewise.
3484 (build_reinterpret_cast): Likewise.
3485 (build_const_cast): Likewise.
3486 (build_c_cast): Likewise.
3487 (build_modify_expr): Likewise.
3488 (convert_for_assignment): Likewise.
3489 (convert_for_initialization): Likewise.
3490 * typeck2.c (build_x_arrow): Likewise.
3491 (build_m_component_ref): Simplify.
3493 * call.c (build_scoped_method_call): Use convert_to_void.
3494 (build_method_call): Likewise.
3495 * class.c (check_field_decls): Remove dead code.
3496 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3497 * decl2.c (grok_array_decl): Remove dead code.
3498 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3499 as pointer-to-member representation.
3500 * init.c (build_offset_ref): Tidy.
3501 (build_vec_delete_1): Use convert_to_void.
3502 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3503 as pointer-to-member representation.
3505 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
3508 * decl.c (grokdeclarator): Return friend decls, not
3510 * decl2.c (grokfield): Alter friend decl check.
3511 * parser.c (struct cp_parser): Document default_arg chain on
3512 unparsed_functions_queue.
3513 (cp_parser_save_default_args): New.
3514 (cp_parser_init_declarator, cp_parser_function_definition,
3515 cp_parser_member_declaration): Call it.
3516 (cp_parser_class_specifier): Remove unused variable. Alter
3517 processing of unparsed_functions_queue.
3519 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3521 * class.c (add_method, check_field_decl): Fix format specifier.
3522 * decl.c (duplicate_decls, pushdecl, check_goto,
3523 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3524 start_enum): Likewise.
3525 * decl2.c (ambiguous_decl): Likewise.
3526 * pt.c (redeclare_class_template): Likewise.
3528 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
3531 * pt.c (type_unification_real): Don't unify exprs of error type.
3532 * tree.c (error_type): Don't die on error_type.
3535 * decl2.c (arg_assoc_class): Don't die on NULL type.
3536 * typeck.c (type_unknown_p): Don't die on untyped expressions.
3538 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3541 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3544 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3546 * error.c (locate_error): %P takes an `int', not a `tree'.
3548 2003-07-02 Jan Hubicka <jh@suse.cz>
3550 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3551 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3552 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3555 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3556 (expand_or_defer_fn): Declare.
3557 (lower_function): Declare.
3558 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3559 * decl2.c: Include cgraph.h and varpool.h
3560 (maybe_emit_vtables): Make explicit instantations as needed.
3561 (mark_member_pointers, lower_function): New functions.
3562 (finish_file): Do unit-at-a-time.
3563 * method.c (synthesize_method): Use expand_or_defer_fn.
3564 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3565 * parser.c (cp_parser_function_definition_after_decl): Use
3567 * pt.c (instantiate_decl): Likewise.
3568 * semantics.c: Include cgraph.h
3569 (expand_or_defer_fn): Break out from ...
3570 (expand_body): ... here; deal with unit-at-a-time.
3571 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3572 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3574 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3576 * call.c (resolve_scoped_fn_name): Return error_mark_node for
3579 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3582 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3585 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
3588 * error.c (dump_decl): Handle BIT_NOT_EXPR as
3589 pseudo destructor calls.
3591 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3593 * cp-tree.h (define_label): Replace filename and lineno
3594 arguments with a location_t.
3595 * decl.c (pop_label): Adjust define_label call.
3596 (define_label): Replace filename and lineno arguments with a
3598 * semantics.c (finish_label): Adjust define_label call.
3600 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3603 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3606 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3608 * Make-lang.in: Update.
3609 * cp-lang.c (c_language): Define.
3610 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3611 * cp-tree.h (cxx_init_options): Remove.
3612 * lex.c: Don't include diagnostic.h.
3613 (cxx_init_options): Remove.
3615 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3618 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3619 tree generated within a template. Use dump_expr to dump an
3622 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3624 * mangle.c (write_expression): Exit gracefully when trying to
3627 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3630 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3631 (value- or type-) dependent expression as DECL_INITIAL is a
3632 valid constant-expression (at parser time).
3634 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3637 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3638 USING_DECL, instead of print_tree_identifier.
3640 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3642 * cp-tree.h (language_to_string): Adjust declaration.
3643 * dump.c (cp_dump_tree): Adjust usage.
3644 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3645 (parm_to_string): Lose unused parameter. Tidy.
3646 (expr_to_string): Likewise.
3647 (code_to_string): Likewise.
3648 (language_to_string): Likewise.
3649 (op_to_string): Likewise.
3650 (assop_to_string): Likewise.
3651 (digit_buffer): Remove.
3652 (dump_type): Format builtin vector type as __vector__.
3654 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3656 * error.c (print_integer): Remove.
3657 (dump_type_suffix): Adjust.
3658 (dump_expr): Likewise.
3660 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3662 * error.c (print_instantiation_partial_context): Take a
3664 (print_instantiation_full_context): Adjust.
3665 (print_instantiation_context): Adjust.
3667 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3668 * error.c (cp_line_of, cp_file_of): Merge into ...
3669 (location_of): ... here. Make static, return a location_t.
3670 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3672 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3675 * call.c (joust): Move warn_conversion check outwards.
3677 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3679 * decl.c (build_typename_type)
3680 * mangle.c (write_template_template_arg)
3681 * parser.c (cp_parser_scope_through_which_access_occurs)
3682 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3683 * repo.c (get_base_filename)
3684 * semantics.c (maybe_convert_cond):
3685 Mark the definition static, matching the forward declaration.
3687 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3690 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3692 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3695 * decl.c (finish_enum): Implement DR377.
3697 * decl.c (cp_finish_decl): Don't make variables with reference
3698 type readonly while they are being initialized.
3700 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3703 * typeck.c (build_static_cast): Avoid returning expressions with
3706 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3708 * call.c (build_op_delete_call): Use strip_array_call. Correct
3709 error message to say 'delete' or 'delete[]'.
3711 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3714 * pt.c (check_explicit_specialization): When looking up a
3715 template function from an identifier outside class-scope, bind
3716 it to CP_DECL_CONTEXT.
3718 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3721 * search.c (lookup_base_r): Rely on accessible_p, rather than
3722 trying to emulate that logic here.
3725 * call.c (convert_like): Pass issue_conversion_warnings.
3726 (convert_like_with_context): Likewise.
3727 (convert_like_real): Add issue_conversion_warnings parameter.
3728 (perform_direct_initialization_if_possible): New function.
3729 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3730 * typeck.c (check_for_casting_away_constness): New function.
3731 (build_static_cast): Rewrite.
3733 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3735 * call.c (enforce_access): Assert we get a binfo.
3736 (build_op_delete_call): Pass a binfo to
3737 perform_or_defer_access_check.
3738 * class.c (alter_access): Likewise.
3739 * decl.c (make_typename_type): Likewise.
3740 (make_unbound_class_template): Likewise.
3741 * lex.c (do_identifier): Likewise.
3742 * method.c (hack_identifier): Likewise.
3743 * parser.c (cp_parser_lookup_name): Likewise.
3744 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3746 * semantics.c (finish_non_static_data_member): Likewise.
3747 (perform_or_defer_access_check): Expect a binfo.
3748 * typeck.c (comptypes): Expect types.
3750 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3751 * friend.c (make_friend_class): Likewise.
3752 * pt.c (check_default_tmpl_args): Likewise.
3753 (lookup_template_class): Likewise.
3755 2003-06-24 Jan Hubicka <jh@suse.cz>
3757 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3760 2003-06-24 Jan Hubicka <jh@suse.cz>
3762 * class.c (build_vtable): Make vtables.
3763 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3764 * decl2.c (output_vtable_inherit): Rename to ...
3765 (prepare_assemble_variable): ... this one; change interface.
3766 (maybe_emit_vtables): Do not call output_vtable_inherit.
3767 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3768 * cp-tree.h (prepare_assemble_variable): New.
3770 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3772 * method.c: add prototype for make_alias_for_thunk.
3773 (thunk_labelno, make_alias_for_thunk): only define
3774 if ASM_OUTPUT_DEF is defined.
3776 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3778 * method.c (thunk_labelno): New variable.
3779 (make_alias_for_thunk): New function.
3780 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3781 into the same section as the function it is calling.
3782 Include gt-cp-method.h.
3783 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3784 (cp/method.o): Depend on gt-cp-method.h.
3785 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3787 2003-06-23 Jan Hubicka <jh@suse.cz>
3789 * decl.c (register_dtor_fn): Mark cleanup as used.
3790 * decl2.c (mark_vtable_entries): Skip nops.
3791 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3792 (build_dynamic_cast_1): Likewise.
3793 (tinfo_base_init): Likewise.
3794 (emit_tinfo_decl): Likewise.
3796 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3798 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3801 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3804 * call.c (joust): Warn about choosing conversion sequence only if
3807 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3810 * call.c (op_error): Tidy.
3811 * error.c (dump_expr): Properly format 'T()' when T is an
3814 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3817 * decl.c (grok_op_properties): Warn possible confusing conversion
3818 only if -Wconversion.
3820 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3823 * parser.c (cp_parser_class_head): See through dependent names
3824 when parsing a class-head.
3827 * pt.c (try_class_unification): Correct handling of member class
3830 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3832 * semantics.c (genrtl_finish_function): Adjust
3833 expand_function_end call.
3835 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3838 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3840 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3843 * cp-tree.h (pushdecl_class_level): Change prototype.
3844 (push_class_level_binding): Likewise.
3845 * decl.c (add_binding): Reject duplicate static data members.
3846 (pushdecl_class_level): Return a value indicating whether or not
3847 the binding was valid.
3848 (push_class_level_binding): Likewise.
3849 * semantics.c (finish_member_declaration): Don't keep invalid
3853 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3854 temporary variables.
3855 * cp-tree.h (static_aggregates): Declare.
3856 (pushdecl_top_level_and_finish): Likewise.
3857 * decl.c (pushdecl_top_level_1): New function.
3858 (pushdecl_top_level): Use it.
3859 (pushdecl_top_level_and_finish): New function.
3860 (initialize_local_var): Remove redundant code.
3861 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3863 * decl.h (static_aggregates): Remove.
3864 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3865 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3866 (tinfo_base_init): Likewise.
3868 2003-06-19 Matt Austern <austern@apple.com>
3871 * init.c (build_zero_init): Assert that number of array elements
3872 is an integer constant.
3873 (build_default_init) Don't use build_zero_init for arrays with
3874 variable number of elements.
3876 2003-06-19 Andreas Jaeger <aj@suse.de>
3878 * cp-tree.h: Remove duplicated declarations.
3880 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3882 * pt.c: Convert to ISO C.
3883 * semantics.c: Convert to ISO C.
3885 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3887 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3888 at_least_as_qualified_p, more_qualified_p): Return bool.
3889 * typeck.c: ANSIFY function definitions.
3890 (comp_array_types): Take redeclaration bool parameter.
3891 (comptypes): Rearrange STRICT handling.
3892 (at_least_as_qualified_p, more_qualified_p,
3893 comp_cv_qualification): Cache cv quals.
3894 (compparms): Rearrange loop.
3896 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3898 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3899 (COMPARE_DERIVED): ... here. Adjust comment.
3900 (resolve_typename_type_in_current_instantiation): Remove.
3901 (cp_tree_equal, comptypes): Return a bool.
3902 * cvt.c (convert_to_reference): Adjust comptypes call.
3903 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3904 (resolve_typename_type_in_current_instantiation): Remove.
3905 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3906 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3907 calls. Refactor code.
3908 * typeck.c (comp_array_types): Return bool. Lose callback.
3909 parameter. Adjust cp_tree_equal calls.
3910 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3911 enumeration and java type handling. Deal with typename types here.
3912 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3914 (comp_target_types): Remove unreachable code. Adjust
3915 same_or_base_type_p calls.
3916 (ptr_reasonably_similar): Adjust base and derived check.
3918 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3920 (check_return_expr): Adjust error messages.
3921 * cp-tree.def (SCOPE_REF): Correct comment.
3923 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3925 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3928 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3930 * optimize.c (dump_function): Form complete flag name by
3931 prefixing 'fdump-' to string returned by dump_flag_name().
3933 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3935 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3938 2003-06-17 Jason Merrill <jason@redhat.com>
3941 * decl.c (grokfndecl): Don't mark a function inline for
3942 -finline-functions if it isn't defined.
3944 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3947 * class.c (handle_using_decl): Robustify.
3950 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3951 * mangle.c (struct globals): Remove internal_mangling_p.
3952 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3953 (write_template_parm): Don't write out the level number.
3954 (conv_type_names): New variable.
3955 (hash_type): New function.
3956 (compare_type): Likewise.
3957 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3959 * search.c (lookup_conversion_operator): New function.
3960 (lookup_fnfields_1): Use it.
3962 2003-06-17 Andreas Jaeger <aj@suse.de>
3964 * except.c: Remove duplicate declaration of push_eh_cleanup.
3966 * call.c: Remove extra declaration of inhibit_warnings.
3968 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3970 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3971 * mangle.c: Convert to ISO C.
3973 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3975 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3978 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3980 * tree.c: Convert to ISO C.
3982 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3984 * cp-tree.h: Follow spelling conventions.
3985 * mangle.c: Likewise.
3986 * method.c: Likewise.
3987 * parser.c: Likewise.
3989 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3991 * decl.c (start_function): Adjust init_function_start call.
3992 * method.c (use_thunk): Likewise.
3993 * semantics.c (genrtl_start_function): Likewise.
3995 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3997 * Make-lang.in: Remove c-options.o.
3999 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
4001 * lex.c: Convert to ISO C.
4003 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
4004 * init.c: removes use of PARAMS macro. Use ISO style function
4005 declarations. (Not copyright-significant change.)
4007 * rtti.c: Remove PARAMS.
4009 * typeck2.c: Convert to ISO C.
4011 2003-06-12 Mark Mitchell <mark@codesourcery.com>
4014 * typeck.c (build_c_cast): Check that the destination type is
4017 2003-06-11 Mark Mitchell <mark@codesourcery.com>
4020 * cp-tree.h (finish_declarator): Remove.
4021 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
4022 erroneous declarations.
4023 * semantics.c (finish_declarator): Remove.
4025 2003-06-11 Roger Sayle <roger@eyesopen.com>
4027 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
4028 global static constructor/destructor if it will be empty, i.e.
4029 either doesn't call any ctors/dtors or only calls pure or const
4032 2003-06-11 Mark Mitchell <mark@codesourcery.com>
4034 * mangle.c (tm_p.h): Include it.
4035 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
4038 * tree.c (cp_cannot_inline_fn): Check for "inline" before
4041 2003-06-10 Jason Merrill <jason@redhat.com>
4044 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
4046 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
4048 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
4049 (start_cleanup_cnt): New.
4051 2003-06-10 Mark Mitchell <mark@codesourcery.com>
4054 * cp-tree.h (template_for_substitution): Declare.
4055 * decl2.c (mark_used): Use it when figuring out whether or not a
4057 * pt.c (template_for_substitution): Give it external linkage.
4058 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
4061 2003-06-09 Zack Weinberg <zack@codesourcery.com>
4064 * mangle.c (write_real_cst): New function. Implement
4065 ABI-compliant mangling of floating-point literals when
4066 -fabi-version>=2; provide backward compatibility with 3.3 when
4067 -fabi-version=1 (with warning). Clarify commentary.
4068 (write_template_arg_literal): Use write_real_cst.
4070 2003-06-07 Andreas Jaeger <aj@suse.de>
4072 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
4074 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
4076 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
4077 (LANG_HOOKS_HANDLE_OPTION): Override.
4078 * cp-tree.h (cxx_init_options): Update.
4079 * lex.c (cxx_init_options): Update.
4081 2003-06-05 Jan Hubicka <jh@suse.cz>
4083 * Make-lang.in: Add support for stageprofile and stagefeedback
4085 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
4087 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
4089 2003-06-04 Andreas Jaeger <aj@suse.de>
4091 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
4093 2003-06-03 Jason Merrill <jason@redhat.com>
4095 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
4097 * cp/decl.c (reshape_init): Handle vectors.
4099 * testsuite/g++.dg/init/array10.C: New.
4101 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4104 * pt.c (check_explicit_specialization): Check for 'static'
4107 2003-05-31 Diego Novillo <dnovillo@redhat.com>
4109 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
4110 the operand of a CONSTRUCTOR node.
4112 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4114 * decl.c (cp_binding_level::this_entity): Rename from this_class.
4115 (cxx_scope_descriptor): New function.
4116 (cxx_scope_debug): Likewise.
4117 (push_binding_level): Use it.
4118 (pop_binding_level): Likewise.
4119 (suspend_binding_level): Likewise.
4120 (resume_binding_level): Likewise.
4121 (pushlevel_class): Adjust use of this_class.
4122 (pushtag): Likewise.
4123 (lookup_name_real): Likewise.
4124 (global_scope_name): New variable.
4125 (initialize_predefined_identifiers): Initialize it.
4126 (push_namespace): Use it.
4127 (make_cxx_scope): New function.
4128 (pushlevel): Use it.
4129 (pushlevel_class): Likewise.
4130 (push_binding_level): Simplify. Loose the last two arguments.
4131 (make_binding_level): Remove.
4132 (initial_push__namespace_scope): New function.
4133 (push_namespace): Use it. Simplify.
4134 (cxx_init_decl_processing): Likewise.
4135 (declare_namespace_level): Remove.
4137 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4140 * pt.c (instantiate_decl): Don't use full template arguments if
4141 we are dealing with specializations.
4143 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
4145 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
4146 (binding_depth): Unconditionally define.
4147 (is_class_level): Likewise.
4148 (indent): Likewise. Take an indenting parameter.
4149 (push_binding_level): Remove conditional definittion.
4150 (pop_binding_level): Likewise.
4151 (suspend_binding_level): Likewise.
4152 (resume_binding_level): Likewise.
4153 (pushlevel): Likewise.
4154 (pushlevel_class): Likewise.
4155 (poplevel_class): Likewise.
4156 (pop_everything): Likewise.
4158 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4160 * name-lookup.h (global_scope_p): New macro.
4161 * decl.c (pop_binding_level): Use it. Don't refer directly to
4162 global_binding_level.
4163 (suspend_binding_level): Likewise.
4164 (global_bindings_p): Likewise.
4165 (print_other_binding_stack): Likewise.
4166 (print_binding_stack): Likewise.
4167 (maybe_push_to_top_level): Likewise.
4168 (pushdecl_namespace_level): Likewise.
4169 (cxx_init_decl_processing): Likewise.
4170 (start_decl): Likewise.
4171 (cp_finish_decl): Likewise.
4172 (start_function): Likewise.
4173 (global_binding_level): Remove.
4175 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4177 * parser.c (cp_parser_explicit_instantiation): Restore old
4178 access before template instantiation.
4180 2003-05-23 Geoffrey Keating <geoffk@apple.com>
4182 * lang-specs.h: Use -o to specify preprocessor's output file.
4183 Make -no-integrated-cpp work when building PCH files.
4185 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4188 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
4189 check for implicitly created typedef to an enum.
4191 2003-05-21 Jason Merrill <jason@redhat.com>
4193 * init.c (build_vec_delete): Copy the address into a temporary
4194 variable before calling build_vec_delete_1.
4195 * decl2.c (delete_sanity): Don't call stabilize_reference.
4197 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
4199 * pt.c (register_specialization): Update the decl's location,
4201 (check_explicit_specialization): Likewise.
4203 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4205 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
4207 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
4210 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
4211 if the old decl had instantiated DECL_RTL.
4212 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
4214 2003-05-19 Matt Austern <austern@apple.com>
4216 * lang-options.h: Document -Wno-invalid-offsetof
4217 * typeck.c (build_class_member_access_expr): Don't complain about
4218 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
4220 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
4222 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
4223 (binding_entry_make): Make entry->chain NULL after getting an entry.
4224 fix the spelling of chain in a comment.
4225 (binding_table_free): speed up by having temporary variable.
4226 (binding_table_new): set table->chain to be NULL after allocating
4228 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
4229 binding->previous to NULL after getting an binding for speed.
4231 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
4233 * cp-tree.h (struct lang_type_class): Replace data member tags
4234 with hash-table nested_udts.
4235 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
4236 * class.c (unreverse_member_declarations): Don't touch
4238 (pushclass): Use cxx_remember_type_decls.
4239 * decl.c (struct cp_binding_level): Replace data member tags with
4240 hash-table type_decls.
4241 (pop_binding_level): Handle level->type_decls.
4242 (kept_level_p): Adjust.
4243 (poplevel): Remove unused local variable.
4244 (bt_print_entry): New function.
4245 (print_binding_level): Use it.
4246 (push_namespace): Build current_binding_level->type_decls.
4247 (maybe_process_template_type_declaration): Adjust.
4248 (pushtag): Likewise.
4249 (clear_anon_tags): Use binding_table_remove_anonymous_types.
4251 (cxx_remember_type_decls): Rename from storetags. Adjust.
4252 (lookup_tag): Use binding_table_find_anon_type. Tidy.
4253 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
4254 (cxx_init_decl_processing): Build global_binding_level->type_decls.
4255 (store_parm_decls): Remove pointless code.
4256 * name-lookup.c (free_binding_entry): New variable.
4257 (ENTRY_INDEX): New macro.
4258 (struct binding_table_s): New datatype.
4259 (binding_entry_make): New function.
4260 (binding_entry_free): Likewise.
4261 (binding_table_construct): Likewise.
4262 (binding_table_free): Likewise.
4263 (binding_table_new): Likewise.
4264 (binding_table_expand): Likewise.
4265 (binding_table_insert): Likewise.
4266 (binding_table_find): Likewise.
4267 (binding_table_find_anon_type): Likewise.
4268 (binding_table_reverse_maybe_remap): Likewise.
4269 (binding_table_remove_anonymous_types): Likewise.
4270 (binding_table_foreach): Likewise.
4271 * name-lookup.h (binding_table): New type.
4272 (binding_entry): Likewise.
4273 (bt_foreach_proc): Likewise.
4274 (struct binding_entry_s): New datatype.
4275 (SCOPE_DEFAULT_HT_SIZE): New macro.
4276 (CLASS_SCOPE_HT_SIZE): Likewise.
4277 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
4278 (NAMESPACE_STD_HT_SIZE): Likewise.
4279 (GLOBAL_SCOPE_HT_SIZE): Likewise.
4280 (binding_table_new): Declare.
4281 (binding_table_free): Likewise.
4282 (binding_table_insert): Likewise.
4283 (binding_table_find_anon_type): Likewise.
4284 (binding_table_reverse_maybe_remap): Likewise.
4285 (binding_table_remove_anonymous_types): Likewise.
4286 (binding_table_foreach): Likewise.
4287 (binding_table_find): Likewise.
4288 (cxx_remember_type_decls): Likewise.
4289 * pt.c (bt_instantiate_type_proc): New function.
4290 (do_type_instantiation): Use it.
4291 * search.c (lookup_field_r): Use binding_table_find.
4293 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4295 * semantics.c (perform_deferred_access_checks): Don't discard
4298 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4300 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
4301 libiberty VA_ macros, always use stdarg.
4302 * rtti.c (create_pseudo_type_info): Likewise.
4303 * tree.c (build_min_nt, build_min): Likewise.
4305 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4307 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
4308 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
4309 collapse multiple function calls into one.
4310 * tree.c (debug_binfo): Likewise.
4312 2003-05-15 Jason Merrill <jason@redhat.com>
4315 * call.c (conditional_conversion): Don't consider implicit
4316 conversions if T2 is a base of T1.
4317 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
4318 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
4320 * parser.c (cp_parser_primary_expression): Convert a static data
4321 member from reference.
4323 2003-05-15 Mark Mitchell <mark@codesourcery.com>
4325 * call.c (build_op_delete_call): Avoid creating unnecessary types.
4326 * class.c (instantiate_type): Remove tests for tf_no_attributes.
4327 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
4328 (COMPARE_NO_ATTRIBUTES): Remove.
4329 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
4332 * semantics.c (finish_typeof): Refine type-dependency check.
4334 2003-05-13 Jason Merrill <jason@redhat.com>
4336 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
4337 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
4339 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4341 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
4343 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4345 PR c++/10230, c++/10481
4346 * semantics.c (finish_non_static_data_member): Handle when the
4347 non-static member is not from a base of the current class type.
4349 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4352 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
4353 template and has dependent context.
4355 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4357 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
4359 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4362 * cp-tree.h (saved_scope): Remove check_access field.
4363 (tsubst_flags_t): Remove tf_parsing.
4364 * decl.c (maybe_push_to_top_level): Don't initialize
4365 scope_chain->check_access.
4366 (make_typename_type, make_unbound_class_template): Don't use
4368 (register_dtor_fn): Use push/pop_deferring_access_checks
4369 instead of scope_chain->check_access.
4370 * method.c (use_thunk): Likewise.
4371 * parser.c (cp_parser_explicit_instantiation
4372 (cp_parser_constructor_declarator_p): Don't call
4373 push/pop_deferring_access_checks here.
4374 (cp_parser_template_argument, cp_parser_class_name): Don't use
4376 (yyparse): Check flag_access_control.
4377 * pt.c (instantiate_class_template): Call
4378 push/pop_deferring_access_checks.
4379 * semantics.c (push_deferring_access_checks): Propagate
4381 (perform_or_defer_access_check): Make sure basetype_path is
4382 a type before comparison.
4383 * call.c (build_op_delete_call, build_over_call): Use
4384 perform_or_defer_access_check.
4385 * class.c (alter_access): Likewise.
4386 * init.c (build_offset_ref): Likewise.
4387 * lex.c (do_identifier): Likewise.
4388 * method.c (hack_identifier): Likewise.
4389 * search.c (lookup_member): Likewise.
4390 * semantics.c (finish_non_static_data_member): Likewise.
4391 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
4392 instead of flag_access_control.
4394 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4397 * parser.c (cp_parser_class_name): Remove check_access parameter.
4398 All caller adjusted. Update declaration.
4399 (cp_parser_lookup_name): Likewise.
4400 * semantics.c (push_deferring_access_checks): Change parameter type
4401 to enum deferring_kind. All caller adjusted.
4402 (resume_deferring_access_checks): Adjust to use new enum.
4403 (stop_deferring_access_checks): Likewise.
4404 (perform_or_defer_access_check): Likewise.
4405 * cp-tree.h (deferring_kind): New enum.
4406 (deferred_access): Adjust field type.
4407 (push_deferring_access_checks): Update declaration.
4409 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4411 PR c++/10555, c++/10576
4412 * pt.c (lookup_template_class): Handle class template with
4413 multiple levels of parameters when one of the levels contain
4416 2003-05-08 Jason Merrill <jason@redhat.com>
4418 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
4419 expression. Undo some of the recent reorg.
4421 2003-05-07 Richard Henderson <rth@redhat.com>
4424 * cfns.gperf: Comment out POSIX thread cancellation points,
4425 plus abort and raise.
4426 * cfns.h: Regenerate.
4428 2003-05-07 Jason Merrill <jason@redhat.com>
4430 * call.c (build_conditional_expr): Don't assume that the folded
4431 expression has result_type.
4433 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4435 * typeck.c (build_unary_op): Deal with const qualifier in
4436 invalid pointer-to-member earlier.
4438 2003-05-05 Jason Merrill <jason@redhat.com>
4441 * call.c (conditional_conversion): Build an RVALUE_CONV if
4442 we're just changing the cv-quals.
4443 (build_conditional_expr): Don't call convert to change
4446 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4449 * typeck.c (build_unary_op): Don't output const qualifier when
4450 output invalid pointer-to-member diagnostics.
4452 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4454 * decl.c: Fix typos.
4456 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4459 * decl.c (start_function): Use same_type_p to check return type
4462 2003-05-03 Zack Weinberg <zack@codesourcery.com>
4465 * cp/typeck.c (build_x_compound_expr): No need to check
4466 extra_warnings as well as warn_unused_value.
4468 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4470 PR c++/9364, c++/10553, c++/10586
4471 * decl.c (make_typename_type): Don't crash on illegal code.
4473 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
4475 * class.c (finish_struct): Use location_t and input_location
4477 * decl.c (make_label_decl): Likewise.
4478 (use_label): Likewise.
4479 * decl2.c (warn_if_unknown_interface): Likewise.
4480 (start_static_initialization_or_destruction): Likewise.
4481 (generate_ctor_or_dtor_function): Likewise.
4482 (finish_file): Likewise.
4483 * error.c (print_instantiation_full_context): Likewise.
4484 * init.c (create_temporary_var): Likewise.
4485 * method.c (synthesize_method): Likewise.
4486 * parser.c (cp_token): Likewise.
4487 (cp_lexer_set_source_position_from_token): Likewise.
4488 (cp_lexer_get_preprocessor_token): Likewise.
4489 (cp_parser_statement): Likewise.
4490 * pt.c (tsubst_friend_function): Likewise.
4491 (instantiate_class_template): Likewise.
4492 (tsubst_decl): Likewise.
4494 (instantiate_decl): Likewise.
4495 * semantics.c (begin_class_definition): Likewise.
4496 (expand_body): Likewise.
4498 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
4500 * class.c (finish_struct): Rename lineno to input_line.
4501 * decl.c (push_binding_level, pop_binding_level,
4502 suspend_binding_level, resume_binding_level, make_label_decl,
4503 use_label, start_function): Likewise.
4504 * decl2.c (warn_if_unknown_interface,
4505 start_static_initialization_or_destruction,
4506 generate_ctor_or_dtor_function, finish_file): Likewise.
4507 * error.c (cp_line_of, print_instantiation_full_context,
4508 print_instantiation_context): Likewise.
4509 * except.c (check_handlers_1, check_handlers): Likewise.
4510 * init.c (create_temporary_var): Likewise.
4511 * method.c (use_thunk, synthesize_method): Likewise.
4512 * parser.c (cp_lexer_set_source_position_from_token,
4513 cp_lexer_get_preprocessor_token): Likewise.
4514 * pt.c (push_tinst_level, pop_tinst_level,
4515 tsubst_friend_function, instantiate_class_template, tsubst_decl,
4516 tsubst, tsubst_expr, instantiate_decl): Likewise.
4517 * semantics.c (genrtl_try_block, finish_label_stmt,
4518 begin_class_definition, expand_body,
4519 genrtl_finish_function): Likewise.
4520 * tree.c (build_min_nt, build_min): Likewise.
4522 2003-05-01 Mark Mitchell <mark@codesourcery.com>
4524 * decl2.c (comdat_linkage): Don't externalize explicit
4527 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4530 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4533 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
4535 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
4536 (struct lang_identifier): ... to here.
4537 (LANG_ID_FIELD): Remove.
4538 (SET_LANG_ID): Remove.
4539 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4540 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4541 (IDENTIFIER_IMPLICIT_DECL): Likewise.
4542 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4543 (IDENTIFIER_ERROR_LOCUS): Likewise.
4544 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4546 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4549 * pt.c (convert_template_argument): Correct diagnostic.
4551 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4553 PR c++/9432, c++/9528
4554 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4556 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
4558 * decl.c (check_previous_goto_1): Adjust prototype.
4559 (check_previous_goto): Adjust use.
4560 (check_switch_goto): Likewise.
4561 (use_label): Adjust.
4562 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4563 (struct named_label_use_list): Use location_t datatype.
4565 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4568 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4569 that have not yet been written out.
4571 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4574 * class.c (layout_class_type): Mark overlong bitfields as having
4575 the maximum size permitted by their type, after layout.
4578 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4580 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4582 * call.c (build_operator_new_call): Fix typo.
4583 * lang-options.h: Likewise.
4585 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4588 * cp-tree.h (lookup_field_1): Declare it.
4589 * search.c (lookup_field_1): Make it public.
4590 * decl.c (reshape_init): Handle designated initializers.
4592 * decl.c (maybe_commonize_var): Further tweak support for systems
4593 without weak symbols.
4595 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4597 * decl.c (maybe_commonize_var): Fix thinko in last patch.
4599 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4602 * method.c (use_thunk): Decrement immediate_size_expand.
4605 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4606 (DECL_MAYBE_TEMPLATE): Remove.
4607 * class.c (fixed_type_or_null): Avoid infinite recursion.
4609 * decl.c (maybe_commonize_var): Make the code match the comments.
4610 * pt.c (instantiate_decl): Move call to import_export_decl.
4612 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4614 * decl2.c (finish_file): Fix merge botch.
4616 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4618 * decl2.c (finish_file): Don't call import_export_decl for
4619 functions that are not defined.
4620 (handle_class_head): Robustify.
4621 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4622 variables that are not defined.
4624 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4626 * call.c (print_z_candidates): Fix off by one error.
4628 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4631 * call.c (joust): Don't warn about conversion ops that are exact
4632 or cv-conversions. Rearrange to avoid multiple type comparisons.
4634 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4637 * call.c (build_cxx_call): Robustify.
4639 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4641 * Make-lang.in (lex.o): Remove mbchar.h.
4642 * lex.c (MULTIBYTE_CHARS): Lose.
4643 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4646 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4649 * cp-tree.h (duplicate_tag_error): Remove.
4650 * class.c (duplicate_tag_error): Remove.
4651 * semantics.c (begin_class_definition): Return immediately for a
4652 duplicate class definition.
4655 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4657 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4660 * search.c (lookup_fnfields_1): Handle empty slots in the method
4664 * decl.c (check_elaborated_type_specifier): New function, split
4666 (xref_tag): ... here. Use the new function in more places.
4668 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4670 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4672 * call.c (build_over_call): Use build_cxx_call.
4673 (build_cxx_call): New method, split out of build_over_call.
4674 * cp-tree.h (language_function): Add can_throw.
4675 (build_cxx_call): Declare it.
4676 * decl.c (finish_function): If a function does not contain any
4677 calls to functions that can throw an exception, indicate that
4679 * decl2.c (mark_used): Do not defer the instantiation of
4680 functions, if the current function does not throw.
4681 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4682 * pt.c (instantiate_decl): Make sure import_export_decl is called
4683 before emitting things.
4684 * rtti.c (throw_bad_cast): Use build_cxx_call.
4685 (build_dynamic_cast_1): Likewise.
4686 * typeck.c (build_function_call): Likewise.
4688 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4691 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4692 expressions. Reverts my 2002-08-08 patch.
4694 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4697 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4699 * cp/decl2.c (start_static_storage_duration_function): Take count
4700 arg, don't check if it wraps round.
4701 (generate_ctor_or_dtor_function): Add locus arg, use it.
4702 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4704 (finish_file): Set line numbers to past EOF for synthesized
4707 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4710 * search.c (lookup_field_1): Final scan goes backwards for
4711 types, forwards for non-types.
4713 2003-04-17 Roger Sayle <roger@eyesopen.com>
4716 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4717 "nothrow" function attributes.
4719 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4722 * pt.c (type_dependent_expression_p): Handle array new.
4724 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4727 * parser.c (cp_parser_primary_expression): Reorganize logic for
4728 dealing with name lookup failures.
4730 2003-04-15 Jason Merrill <jason@redhat.com>
4732 * decl2.c (mark_used): Don't instantiate anything if
4735 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4737 * tree.c (build_cplus_array_type_1): Do not call
4738 uses_template_parms() on a NULL index_type.
4740 2003-04-13 Roger Sayle <roger@eyesopen.com>
4742 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4744 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4747 * init.c (build_new_1): Reorganize.
4749 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4751 * class.c (initialize_array)
4752 * decl.c (reshape_init)
4753 * decl2.c (build_expr_from_tree)
4754 * init.c (build_zero_init)
4755 * pt.c (tsubst_copy, tsubst_copy_and_build)
4756 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4757 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4758 * semantics.c (finish_compound_literal)
4759 * typeck.c (build_ptrmemfunc1)
4760 * typeck2.c (store_init_value, process_init_constructor)
4761 (build_functional_cast): Use build_constructor.
4763 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4765 * call.c (print_z_candidates): Use gcc_gettext_width, not
4766 strlen, to determine how much padding to use.
4768 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4770 * decl.c: Update all calls to shadow_warning.
4772 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4774 * class.c (layout_class_type): Correct handling for overlong
4775 bit-fields whose width is the same as an integer type.
4777 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4779 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4780 * cp-lang.c (cp_tree_size): New function.
4781 (LANG_HOOKS_TREE_SIZE): Override.
4783 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4784 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4785 (union lang_tree_node): Remove common and srcloc members.
4786 (build_srcloc_here): Don't prototype.
4787 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4788 * pt.c (pending_templates): Correct comment.
4789 * tree.c (build_srcloc, build_srcloc_here): Kill.
4791 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4793 * call.c: Include intl.h.
4794 (print_z_candidate): Always use inform; get rid of errfn
4795 argument. Reorganize so that all the strings get picked up
4796 by xgettext. Note obligation of caller to pass first argument
4798 (print_z_candidates): Update to match. Indent second and
4799 successive candidates by strlen() of translated message.
4800 (joust): Restructure ambiguous-conversion pedwarn so that
4801 translators see a complete sentence. Update calls to
4804 * Make-lang.in (cp/call.o): Update dependencies.
4806 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4808 * decl.c (set_current_binding_level): Delete, revert last change.
4809 (current_binding_level): Modify to allow it as as lvalue.
4811 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4813 * name-lookup.c (find_binding): Pass appropriate pointer type to
4814 POP_TIMEVAR_AND_RETURN.
4816 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4818 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4819 * cp-tree.h: Don't insist on having GNUC.
4821 2003-04-03 Jason Merrill <jason@redhat.com>
4823 * cvt.c (ocp_convert): Only abort if we try to convert an object
4824 of TREE_ADDRESSABLE type.
4826 * class.c (build_vtable): Set DECL_ALIGN here.
4827 (get_vtable_decl): Not here.
4828 (layout_vtable_decl): Or here.
4829 (create_vtable_ptr): Or here.
4830 (layout_class_type): Or here.
4831 (check_bitfield_decl): Don't mess with field alignment.
4833 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4835 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4836 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4837 * rtti.c (dfs_class_hint_mark): Likewise.
4839 * decl.c (push_local_name, push_class_level_binding,
4840 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4841 functions returning void.
4842 * decl2.c (add_using_namespace): Likewise.
4844 * decl.c (print_binding_level, print_other_binding_stack,
4845 print_binding_stack): Cast argument of %p specifier to void*.
4846 * ptree.c (cxx_print_decl): Likewise.
4848 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4849 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4850 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4851 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4852 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4854 * decl.c (set_current_binding_level): New macro. Use throughout
4855 when setting the current binding level.
4857 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4859 * method.c (mangling_flags): Likewise.
4861 * cp-tree.h (lang_type_header): Add __extension__ and use
4862 CHAR_BITFIELD for members.
4864 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4867 * mangle.c: Include gt-cp-mangle.h.
4868 (subst_identifiers): Mark with GTY.
4869 * config-lang.in (gtfiles): Add cp/mangle.c.
4870 * Make-lang.in: (gt-cp-mangle.h): New rule.
4871 (cp/mangle.o): Depends on gt-cp-mangle.h.
4873 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4875 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4876 after \$(srcdir)/cp/name-lookup.h.
4877 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4878 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4879 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4880 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4882 2003-03-31 Jason Merrill <jason@redhat.com>
4885 * class.c (check_field_decl): Don't set DECL_ALIGN.
4887 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4890 * decl.c (grokdeclarator): Tidy, slightly.
4891 * search.c (lookup_field_1): Add want_type parameter.
4892 (lookup_field_r): Adjust call to lookup_field_1.
4894 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4896 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4898 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4900 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4902 (cxx_scope_find_binding_for_name): Likewise.
4903 * decl.c (find_binding: Move to name-lookup.c.
4904 (binding_for_name): Likewise.
4905 (cxx_scope_find_binding_for_name): Likewise.
4906 (BINDING_LEVEL): Remove.
4907 (push_binding): Tidy.
4908 (push_class_binding): Likewise.
4909 (pop_binding): Likewise.
4910 (poplevel): Likewise.
4911 (poplevel_class): Likewise.
4912 (set_identifier_type_value_with_scope): Likewise.
4913 (push_overloaded_decl): Likewise.
4914 (lookup_tag): Likewise.
4915 (unqualified_namespace_lookup): Likewise.
4916 (lookup_name_current_level): Likewise.
4917 (maybe_inject_for_scope_var): Likewise.
4918 (namespace_binding): Move to name-lookup.c.
4919 (set_namespace_binding): Likewise.
4920 * decl2.c (lookup_using_namespace): Tidy.
4921 (qualified_lookup_using_namespace): Likewise.
4922 (do_toplevel_using_decl): Likewise.
4923 * name-lookup.c: Include "timevar.h"
4924 * name-lookup.h (cxx_scope): Declare.
4925 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4927 (BINDING_SCOPE): Adjust definition.
4928 (BINDING_HAS_LEVEL_P): Remove.
4930 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4932 * name-lookup.c: New file.
4933 * name-lookup.h: Likewise..
4934 * decl.c (push_binding): Adjust use cxx_binding_make.
4935 (free_bindings): Move to name-lookup.c
4936 (pop_binding): Use cxx_binding_free.
4937 (binding_for_name): Tidy.
4938 * cp-tree.h: Include "name-lookup.h"
4939 (cxx_binding_make): Move to name-lookup.h
4940 (cxx_binding_clear): Likewise.
4941 (struct cxx_binding): Likewise.
4942 (LOCAL_BINDING_P): Likewise.
4943 (INHERITED_VALUE_BINDING_P): Likewise.
4944 (BINDING_SCOPE): Likewise.
4945 (BINDING_HAS_LEVEL_P): Likewise.
4946 (BINDING_VALUE): Likewise.
4947 (BINDING_TYPE): Likewise.
4948 * config-lang.in (gtfiles): Add cp/name-lookup.h
4949 * Make-lang.in (cp/name-lookup.o): New rule.
4950 (CXX_OBJS): Add cp/name-lookup.o
4951 (CXX_TREE_H): Add cp/name-lookup.h
4953 2003-03-28 Jason Merrill <jason@redhat.com>
4956 * cvt.c (force_rvalue): New fn.
4957 * call.c (build_conditional_expr): Use it.
4958 * cp-tree.h: Declare it.
4960 2003-03-28 Mike Stump <mrs@apple.com>
4962 * error.c (dump_expr): Add 0x to printed hex numbers to make
4963 output match source code better.
4965 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4968 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4971 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4972 non-existant ssdf_decls array.
4973 (finish_file): Call generator_ctor_or_dtor_function when there are
4974 static constructors or destructors and no other static
4977 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4980 * decl2.c (finish_file): Don't warn about explicitly instantiated
4983 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4986 * pt.c (lookup_template_class): Only check instantiated args if
4987 they do not contain template parameters.
4989 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4992 * parser.c (cp_parser_function_definition): Set
4993 DECL_INITIALIZED_IN_CLASS for members.
4994 * pt.c (instantiate_decl): Only reduce the template args for
4995 friends that are not defined in class.
4997 2003-03-25 Jason Merrill <jason@redhat.com>
4999 * call.c (print_z_candidate): Change name of first arg to msgid.
5000 (joust): Add comment for translators.
5002 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
5004 PR c++/9898, PR c++/383, DR 322
5005 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
5006 through reference types on both PARM and ARG.
5008 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
5011 * error.c (dump_expr) <BASELINK>: Use dump_expr.
5012 * pt.c (maybe_fold_nontype_args): New function.
5013 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
5014 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
5015 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
5016 maybe_fold_nontype_args.
5018 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
5021 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
5023 2003-03-23 Mark Mitchell <mark@codesourcery.com>
5026 * typeck.c (cxx_mark_addressable): Adjust call to
5027 gen_mem_addressof or put_var_into_stack.
5029 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
5031 PR c++/9978, c++/9708
5032 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
5033 * call.c (add_template_candidate_real): Adjust
5034 instantiate_template call.
5035 * class.c (resolve_address_of_overloaded_function): Likewise.
5036 * decl.c (build_enumerator): Set TREE_CONSTANT.
5037 * pt.c (check_instantiated_args): New.
5038 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
5040 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
5041 (reduce_template_parm_level): Likewise.
5042 (process_template_parm): Likewise.
5043 (check_explicit_specialization): Adjust instantiate_template call.
5044 (convert_template_argument): Don't check non-type argument here.
5045 (lookup_template_class): Check them here.
5046 (tsubst_friend_function): Adjust instantiate_template call.
5047 (instantiate_template): Add tsubst_flags parameter, use it. Check
5050 2003-03-21 Zack Weinberg <zack@codesourcery.com>
5052 * decl.c: Update calls to shadow_warning.
5054 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
5057 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
5058 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
5060 2003-03-20 Mark Mitchell <mark@codesourcery.com>
5062 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
5064 * cp/pt.c (instantiate_class_template): Fix formatting.
5066 2003-03-14 Matt Austern <austern@apple.com>
5068 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
5069 (unemitted_tinfo_decl_p): Remove.
5070 (emit_tinfo_decl): Change declaration to remove unused parameter.
5071 * decl2.c (finish_file): Change tinfo emission to loop through
5072 unemitted_tinfo_decls array instead of looping through all decls.
5073 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
5074 unused second parameter.
5075 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
5076 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
5077 (emit_tinfo_decl): remove unused second parameter, add assertion
5078 that decl hasn't already been emitted.
5080 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
5082 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
5083 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
5086 2003-03-19 Jason Merrill <jason@redhat.com>
5088 PR c++/8316, c++/9315, c++/10136
5089 * call.c (print_z_candidate): Split out from...
5090 (print_z_candidiates): ...here.
5093 2003-03-17 Roger Sayle <roger@eyesopen.com>
5096 * decl.c (duplicate_decls): Use the new type when prototyping
5097 anticipated decls, even when the types match. This defines the
5098 exception list for the built-in function.
5100 2003-03-17 Jason Merrill <jason@redhat.com>
5103 * typeck.c (build_class_member_access_expr): Compare
5106 2003-03-17 Mark Mitchell <mark@codesourcery.com>
5109 * parser.c (cp_parser_declarator_id): Clear parser->scope.
5111 2003-03-16 Jason Merrill <jason@redhat.com>
5114 * decl.c (finish_function): Only allow the NRVO to use variables
5115 declared at function scope.
5117 2003-03-17 Andreas Jaeger <aj@suse.de>
5119 * Make-lang.in (cp/TAGS): Remove.
5121 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
5124 * cp-tree.h (struct language_function): Add in_base_initializer.
5125 (in_base_initializer): define it.
5126 (expand_member_init): Remove INIT param.
5127 * init.c (expand_member_init): Remove INIT param, return the member.
5128 (emit_mem_initializers): Set in_base_initializer.
5129 * class.c (build_base_path): Check in_base_initializer.
5130 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
5131 * pt.c (tsubst_initializer_list): Likewise.
5133 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
5135 * decl.c (binding_for_name): Fix initialization thinko.
5137 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
5139 Compile-time improvement: 2/n.
5140 * cp-tree.h (struct cxx_binding): New datatype;
5141 (struct lang_identifier): Use it.
5142 (LOCAL_BINDING_P): Adjust definition.
5143 (INHERITED_VALUE_BINDING_P): Likewise.
5144 (BINDING_SCOPE): Likewise.
5145 (BINDING_HAS_LEVEL_P): Likewise.
5146 (BINDING_VALUE): Likewise.
5147 (BINDING_TYPE): Likewise.
5148 (IDENTIFIER_VALUE): Likewise.
5149 (struct tree_binding): Remove.
5150 (TS_CP_BINDING): Likewise.
5151 ((union lang_tree_node): Remove field "binding".
5152 (cxx_binding_clear): New macro.
5153 (binding_for_name): Adjust return type.
5154 (qualified_lookup_using_namespace): Adjust prototype.
5155 (lookup_using_namespace): Adjust prototype.
5156 (cxx_scope_find_binding_for_name): Declare.
5157 * cp-tree.def: Remove CPLUS_BINDING definition.
5158 * decl.c (push_binding): Adjust local variable type.
5159 (add_binding): Likewise.
5160 (push_class_binding): Likewise.
5161 (pop_binding): Likewise.
5162 (poplevel): Likewise.
5163 (poplevel_class): Likewise.
5164 (free_bindings): Adjust type.
5165 (find_binding): Adjust return type, add a third parameter. Remove
5166 non-useful assertion now that we use static typing.
5167 (cxx_scope_find_binding_for_name): New function.
5168 (binding_for_name): Use it. Adjust local variable type. Simplify.
5169 (namespace_binding): Simplify.
5170 (set_namespace_binding): Likewise.
5171 (set_identifier_type_value_with_scope): Adjust local variable type.
5172 (lookup_tag): Don't type-abuse of local variable 'old'.
5173 (lookup_namespace_name): Likewise. Allocate binding on stack.
5174 (select_decl): Adjust prototype.
5175 (unqualified_namespace_lookup): Allocate binding on stack.
5176 Don't type-abuse of local variable 'val'.
5177 (lookup_name_real): Likewise.
5178 (maybe_inject_for_scope_var): Adjust local variable type.
5179 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
5180 (namespace_binding): Adjust logic, simplify.
5181 (BINDING_LEVEL): Adjust definition.
5182 (push_class_level_binding): Adjust local variable type.
5183 (struct cxx_saved_binding): Adjust field 'binding' type.
5184 * decl2.c (ambiguous_decl): Adjust prototype.
5185 (lookup_using_namespace): Adjust local variable type.
5186 (qualified_lookup_using_namespace): Catch type error and correct
5187 ensueing logic error.
5188 (do_nonmember_using_decl): Adjust local variable type. Allocate
5189 temporary cxx_binding on stack.
5190 (do_toplevel_using_decl): Adjust local variable type.
5191 * ptree.c (cxx_print_cxx_binding): New function.
5192 (cxx_print_identifier): Use it.
5193 (cxx_print_xnode): Delete CPLUS_BINDING case label.
5195 2003-03-15 Roger Sayle <roger@eyesopen.com>
5197 * tree.c (count_functions): Fix whitespace.
5199 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
5201 * Make-lang.in: Update.
5203 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5206 * pt.c (maybe_process_partial_specialization): Handle
5207 member class template when enclosing class template is
5208 explicit specialized.
5209 (most_general_template): Stop looking when DECL is already
5212 2003-03-13 Jason Merrill <jason@redhat.com>
5215 * search.c (lookup_conversions): Call complete_type here.
5216 * call.c (implicit_conversion): Not here.
5218 2003-03-13 Mark Mitchell <mark@codesourcery.com>
5220 * decl2.c (do_nonmember_using_decl): Correct handling of
5221 simultaneous type/non-type bindings.
5223 * call.c (initialize_reference): Remove bogus assertion.
5224 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
5226 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
5229 * expr.c (cxx_expand_expr): Return const0_rtx for throw
5232 2003-03-11 Mark Mitchell <mark@codesourcery.com>
5235 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
5236 to merge old and new declarations.
5238 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
5241 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
5242 (cp/g++.1): Build it from scratch in the build tree.
5243 (c++.install-man): Depend on it. Install it from the build tree.
5244 (c++.mostlyclean): Clean it.
5246 2003-03-11 Mark Mitchell <mark@codesourcery.com>
5249 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
5250 to merge old and new declarations.
5253 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
5255 2003-03-11 Jason Merrill <jason@redhat.com>
5258 * search.c (lookup_member): Fix handling of functions in a class
5261 2003-03-11 Mark Mitchell <mark@codesourcery.com>
5264 * call.c (convert_class_to_reference): Adjust usage of
5266 (any_viable): Remove.
5267 (splice_viable): Combine with any_viable.
5268 (print_z_candidates): Avoid printing duplicates.
5269 (build_user_type_conversion_1): Adjust usage of splice_viable.
5270 (build_new_function_call): Likewise.
5271 (build_operator_new_call): Likewise.
5272 (build_object_call): Likewise.
5273 (build_conditional_expr): Likewise.
5274 (build_new_op): Likewise.
5275 (build_new_method_call): Likewise.
5276 (joust): Remove spurious comment.
5277 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
5278 * decl2.c (arg_assoc_class): Simplify.
5279 * friend.c (add_friend): Likewise.
5281 2003-03-11 Jason Merrill <jason@redhat.com>
5284 * decl2.c (check_classfn): A member template only matches a
5287 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
5289 * Make-lang.in (CXX_C_OBJS): Update.
5290 * lang-specs.h: Don't define __GNUG__ here.
5292 2003-03-10 Mark Mitchell <mark@codesourcery.com>
5294 * call.c (perform_overload_resolution): New function.
5295 (build_new_function_call): Use it.
5296 (build_operator_new_call): Likewise.
5297 (add_candidates): Add explicit_targs and template_only parameters.
5298 (build_new_op): Adjust accordingly.
5299 * cp-tree.h (build_operator_new_call): New function.
5300 (build_function_call_real): Remove.
5301 (build_function_call_maybe): Likewise.
5302 * init.c (build_new_1): Use build_operator_new_call.
5303 * typeck.c (build_function_call_real): Rename to ...
5304 (build_function_call): ... this.
5306 2003-03-10 Devang Patel <dpatel@apple.com>
5309 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
5311 2003-03-10 Jason Merrill <jason@redhat.com>
5314 * decl.c (push_using_directive): Push before recursing.
5316 PR c++/9868, c++/9524
5317 * call.c (resolve_scoped_fn_name): Handle the case of a function
5320 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
5321 argument in the pointer-to-member case.
5323 2003-03-09 Mark Mitchell <mark@codesourcery.com>
5326 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
5327 pointers to member functions.
5330 * decl.c (build_ptrmemfunc_type): Do not allow default arguments
5331 in pointer-to-member-function types.
5333 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5335 * expr.c (cplus_expand_constant): Use C90 prototype style.
5336 (cxx_expand_expr): Likewise.
5338 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5341 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
5344 2003-03-08 Geoffrey Keating <geoffk@apple.com>
5346 * lang-specs.h (c++-header): Change .pch to .gch.
5348 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
5350 * cp-tree.h (cxx_init): Update prototype.
5351 * lex.c (cxx_init): Similarly.
5353 2003-03-08 Mark Mitchell <mark@codesourcery.com>
5356 * cp-tree.h (begin_mem_initializers): Remove.
5357 * parser.c (cp_parser_mem_initializer_list): Inline it here.
5358 Do not call finish_mem_initializers if not in a constructor.
5359 (cp_parser_class_head): Fix typo in error message.
5360 * semantics.c (begin_mem_initializers): Remove.
5361 * testsuite/g++.dg/parser/constructor1.C: New test.
5364 * call.c (add_function_candidate): Skip builtin fuctions that have
5365 not yet been declared.
5368 * init.c (build_new_1): Correct logic for determining whether or
5369 not to use an array cookie.
5372 * parser.c (cp_parser_postfix_expression): Call
5373 finish_non_static_data_member, even when processing_template_decl.
5376 * cp-tree.h (is_ancestor): New function.
5377 (handle_class_head): Change prototype.
5378 * decl2.c (is_namespace_ancestor): Rename to ...
5379 (namespace_anecestor): ... this.
5380 (set_decl_namespace): Adjust accordingly.
5381 (handle_class_head): Remove unnecessary parameters.
5382 * parser.c (cp_parser_class_head): Check that
5383 nested-name-specifiers are used appropriately.
5385 2003-03-07 Mark Mitchell <mark@codesourcery.com>
5387 * call.c (reference_binding): Remove REF_IS_VAR parameter.
5388 (implicit_conversion): Adjust call to reference_binding.
5389 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
5390 (initialize_reference): Adjust handling for references bound to
5392 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
5394 (real_non_cast_lvalue_p): New method.
5395 * cvt.c (build_up_reference): Adjust use of
5396 make_temporary_var_for_ref_to_temp.
5397 * tree.c (real_non_cast_lvalue_p): New method.
5399 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5401 * except.c (init_exception_processing): Use C90 prototype style.
5402 (cp_protect_cleanup_actions): Likewise.
5403 (prepare_eh_type): Likewise.
5404 (build_eh_type_type): Likewise.
5405 (build_exc_ptr): Likewise.
5406 (do_begin_catch): Likewise.
5407 (dtor_nothrow): Likewise.
5408 (do_end_catch): Likewise.
5409 (push_eh_cleanup): Likewise.
5410 (decl_is_java_type): Likewise.
5411 (choose_personality_routine): Likewise.
5412 (initialize_handler_parm): Likewise.
5413 (expand_start_catch_block): Likewise.
5414 (expand_end_catch_block): Likewise.
5415 (begin_eh_spec_block): Likewise.
5416 (finish_eh_spec_block): Likewise.
5417 (do_allocate_exception): Likewise.
5418 (do_free_exception): Likewise.
5419 (wrap_cleanups_r): Likewise.
5420 (stabilize_throw_expr): Likewise.
5421 (build_throw): Likewise.
5422 (complete_ptr_ref_or_void_ptr_p): Likewise.
5423 (is_admissible_throw_operand): Likewise.
5424 (nothrow_libfn_p): Likewise.
5425 (can_convert_eh): Likewise.
5426 (check_handlers_1): Likewise.
5427 (check_handlers): Likewise.
5429 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5431 * call.c (merge_conversion_sequences): New function.
5432 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
5433 (convert_class_to_reference): Correct handling of second
5434 standard conversion sequence in a user-defined conversion
5436 (build_user_type_conversion_1): Use merge_conversion_sequences.
5437 * cp-tree.def: Add comments for CONV nodes.
5438 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
5440 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5442 * error.c (init_error): Use C90 prototype style.
5443 (dump_scope): Likewise.
5444 (dump_qualifiers): Likewise.
5445 (dump_template_argument): Likewise.
5446 (dump_template_argument_list): Likewise.
5447 (dump_template_parameter): Likewise.
5448 (dump_template_bindings): Likewise.
5449 (dump_type): Likewise.
5450 (dump_typename): Likewise.
5451 (class_key_or_enum): Likewise.
5452 (dump_aggr_type): Likewise.
5453 (dump_type_prefix): Likewise.
5454 (dump_type_suffix): Likewise.
5455 (dump_global_iord): Likewise.
5456 (dump_simple_decl): Likewise.
5457 (dump_decl): Likewise.
5458 (dump_template_decl): Likewise.
5459 (dump_function_decl): Likewise.
5460 (dump_parameters): Likewise.
5461 (dump_exception_spec): Likewise.
5462 (dump_function_name): Likewise.
5463 (dump_template_parms): Likewise.
5464 (dump_char): Likewise.
5465 (dump_expr_list): Likewise.
5466 (dump_expr): Likewise.
5467 (dump_binary_op): Likewise.
5468 (dump_unary_op): Likewise.
5469 (type_as_string): Likewise.
5470 (expr_as_string): Likewise.
5471 (decl_as_string): Likewise.
5472 (context_as_string): Likewise.
5473 (lang_decl_name): Likewise.
5474 (cp_file_of): Likewise.
5475 (cp_line_of): Likewise.
5476 (decl_to_string): Likewise.
5477 (expr_to_string): Likewise.
5478 (fndecl_to_string): Likewise.
5479 (code_to_string): Likewise.
5480 (language_to_string): Likewise.
5481 (parm_to_string): Likewise.
5482 (op_to_string): Likewise.
5483 (type_to_string): Likewise.
5484 (assop_to_string): Likewise.
5485 (args_to_string): Likewise.
5486 (cv_to_string): Likewise.
5487 (cxx_print_error_function): Likewise.
5488 (cp_diagnostic_starter): Likewise.
5489 (cp_diagnostic_finalizer): Likewise.
5490 (cp_print_error_function): Likewise.
5491 (function_category): Likewise.
5492 (print_instantiation_full_context): Likewise.
5493 (print_instantiation_partial_context): Likewise.
5494 (maybe_print_instantiation_context): Likewise.
5495 (print_instantiation_context): Likewise.
5496 (cp_printer): Likewise.
5497 (print_integer): Likewise.
5498 (print_non_consecutive_character): Likewise.
5499 (locate_error): Likewise.
5501 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5504 * call.c (reference_binding): Add ref_is_var parameter.
5505 (implicit_conversion): Adjust call to reference_binding.
5506 (initialize_reference): Likewise.
5509 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5513 * class.c (get_basefndecls): Use lookup_fnfields_1.
5515 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5518 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5520 (cp_parser_single_declaration): Likewise.
5522 2003-03-05 Jason Merrill <jason@redhat.com>
5525 * call.c (build_conditional_expr): Use convert rather than an
5528 2003-03-02 Matt Austern <austern@apple.com>
5530 * decl.c (cp_binding_level): Add static_decls varray member.
5531 (add_decl_to_level): Add static/inline namespace scope
5532 declarations to static_decls array.
5533 (wrapup_global_for_namespace): Pass static_decls only, instead of
5534 all decls, to wrapup_global_declarations/check_global_declarations.
5535 (push_namespace): Initialize static_decls for ordinary namespaces.
5536 (cxx_init_decl_processing): Initialize static_decls for global
5539 2003-03-05 Mark Mitchell <mark@codesourcery.com>
5541 * class.c (end_of_class): Correct thinko.
5543 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
5545 * config-lang.in: Replace ${libstdcxx_version} by its value.
5547 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5549 * cp-tree.h (cxx_saved_binding): Declare.
5550 (struct saved_scope): Adjust type of field 'old_binding'.
5551 * decl.c (cxx_saved_binding_make): New macro.
5552 (struct cxx_saved_binding): Define.
5553 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
5555 (maybe_push_to_top_level): Adjust local variable type.
5556 (pop_from_top_level): Likewise.
5558 2003-03-04 Tom Tromey <tromey@redhat.com>
5560 * Make-lang.in (c++.tags): New target.
5562 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
5564 * Make-lang.in: Update.
5566 2003-03-03 Jason Merrill <jason@redhat.com>
5568 * decl.c (finish_enum): Do set the type in a template. Simplify.
5569 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5571 2003-03-03 Mark Mitchell <mark@codesourcery.com>
5574 * call.c (convert_class_to_reference): Correct conversion
5576 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5577 (implicit_conversion): Adjust call to reference_binding.
5578 (add_candidate): Change type of candidates parameter.
5579 (add_function_candidate): Likewise.
5580 (add_conv_candidate): Likewise.
5581 (build_builtin_candidate): Likewise.
5582 (add_builtin_candidate): Likewise.
5583 (add_builtin_candidates): Likewise.
5584 (add_template_candidate_real): Likewise.
5585 (add_template_candidate): Likewise.
5586 (add_template_conv_candidate): Likewise.
5587 (build_user_type_conversion_1): Adjust accordingly.
5588 (build_object_call): Likewise.
5589 (build_conditional_expr): Likewise.
5590 (add_candidates): Likewise.
5591 (build_new_op): Likewise.
5592 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
5593 (build_new_method_call): Adjust calls to add_function_candidate.
5594 (make_temporary_var_for_ref_to_temp): New function.
5595 (initialize_reference): Add decl parameter.
5596 * class.c (build_rtti_vtbl_entries): Use build_address and
5598 * cp-tree.h (initialize_reference): Change prototype.
5599 (make_temporary_var_for_ref_to_temp): New function.
5600 (build_type_conversion): Change prototype.
5601 (build_address): New function.
5602 (build_nop): Likewise.
5603 * cvt.c (cp_convert_to_pointer): Adjust call to
5604 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5606 (convert_to_pointer_force): Use build_nop.
5607 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5608 (convert_to_reference): Adjust call to build_type_conversion.
5609 (ocp_convert): Likewise.
5610 (build_type_conversion): Remove for_sure parameter.
5611 * decl.c (grok_reference_init): Use initialize_reference.
5612 * typeck.c (build_address): New function.
5613 (build_nop): Likewise.
5614 (build_unary_op): Use them.
5615 (build_ptrmemfunc): Tidy slightly.
5616 (convert_for_initialization): Adjust call to
5617 initialize_reference.
5618 * typeck2.c (store_init_value): Remove #if 0'd code.
5620 2003-03-03 Jason Merrill <jason@redhat.com>
5622 * decl.c (start_function): Clear DECL_NUM_STMTS.
5624 * class.c (get_vtable_decl): Use vtbl_type_node.
5625 (build_primary_vtable): Check for it.
5627 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5629 * decl.c (check_initializer): Check for vector_opaque_p.
5631 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5633 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5634 invoke an external cpp during compilation.
5636 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5638 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5640 (start_decl): Likewise.
5641 (start_function): Likewise.
5643 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5645 * Make-lang.in (CXX_C_OBJS): Update.
5647 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5650 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5653 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5655 * parser.c (cp_parser_init_declarator): Revert opaque
5656 vector_opaque_p change.
5657 Do not include target.h.
5659 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5662 * cp-tree.h (build_zero_init): Add parameter.
5663 * decl.c (cp_finish_decl): Adjust call.
5664 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5666 (build_default_init): Add nelts parameter. Adjust calls to
5668 (build_new_1): Adjust call to build_default_init.
5669 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5671 2003-02-26 Devang Patel <dpatel@apple.com>
5673 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5674 required. Postpone enum setting for template decls.
5675 (build_enumerator): Delay copying value node until finish_enum
5676 (). Remove #if 0'ed code.
5677 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5678 (tsubst_copy): Add check for enum type.
5680 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5683 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5684 away initializations for DECL_EXTERNAL VAR_DECLs.
5685 (finish_file): Adjust accordingly.
5686 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5688 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5690 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5691 (push_class_binding): Likewise.
5692 (set_namespace_binding): Likewise.
5694 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5697 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5698 specializations back to the main template.
5699 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5700 * pt.c (resolve_typename_type): Likewise.
5702 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5705 * pt.c (tsubst_copy_and_build): For a templated function inside a
5706 scope, process template arguments.
5708 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5711 * typeck2.c (abstract_virtuals_error): Don't check when
5712 TYPE is still template parameter dependent.
5714 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5717 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5718 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5719 * pt.c (instantiate_class_template): Don't try to instantiate
5721 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5723 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5726 * decl.c (grokdeclarator): Do not allow parameters with variably
5729 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5731 * search.c (grow_bfs_bases): Remove. Fold into ...
5732 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5735 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5738 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5739 when the G++ 3.2 ABI prevents correct compilation.
5741 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5743 Change base class access representation. Share virtual base
5745 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5747 * cp/class.c (build_base_path): Likewise.
5748 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5749 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5750 (make_new_vtable): Adjust.
5751 (force_canonical_binfo_r): Delete.
5752 (force_canonical_binfo): Delete.
5753 (mark_primary_virtual_base): Delete.
5754 (dfs_unshared_virtual_bases): Delete.
5755 (mark_primary_bases): Adjust.
5756 (maybe_warn_about_overly_private_class): Adjust.
5757 (dfs_base_derived_from): Delete.
5758 (base_derived_from): Follow the inheritance chain.
5759 (struct find_final_overrider_data): Add vpath member.
5760 (dfs_find_final_overrider): Adjust.
5761 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5762 (find_final_overrider): Adjust.
5763 (update_vtable_entry_for_fn): Adjust.
5764 (modify_all_vtables): Adjust.
5765 (walk_subobject_offsets): Adjust.
5766 (layout_nonempty_base_or_field): Adjust.
5767 (layout_empty_base): Remove last parameter. Adjust.
5768 (build_base_field): Adjust.
5769 (build_base_fields): Adjust.
5770 (propagate_binfo_offsets): Remove last parameter. Adjust.
5771 (dfs_set_offset_for_unshared_vbases): Delete.
5772 (layout_virtual_bases): Adjust.
5773 (finish_struct_1): Adjust.
5774 (init_class_processing): Don't init access nodes.
5775 (dfs_get_primary_binfo): Delete.
5776 (get_primary_binfo): Adjust.
5777 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5779 (dump_class_hierarchy): Adjust.
5780 (finish_vtbls): Adjust.
5781 (get_original_base): Delete.
5782 (build_vtt_inits): Adjust.
5783 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5784 (dfs_ctor_vtable_bases_queue_p): Adjust.
5785 (build_ctor_vtbl_group): Adjust.
5786 (dfs_accumulate_vtbl_inits): Adjust.
5787 (build_vtbl_initializer): Adjust.
5788 (build_vbase_offset_vtbl_entries): Adjust.
5789 (add_vcall_offset_vtbl_entries_1): Adjust.
5790 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5791 (access_*_node): Remove.
5792 (CANONICAL_BINFO): Delete.
5793 (BINFO_UNSHARED_MARKED): Remove.
5794 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5795 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5796 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5797 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5799 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5800 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5801 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5803 (BINFO_DEPENDENT_BASE_P): New.
5804 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5806 (markedp, unmarkedp): Adjust.
5807 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5808 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5809 find_vbase_instance, binfo_for_vbase): Delete.
5810 (copied_binfo, original_binfo): Declare.
5811 (finish_base_specifier): Add virtual_p arg.
5812 (unshare_base_binfos): Delete.
5813 (copy_base_binfos): Declare.
5814 (reverse_path): Delete.
5815 * cp/decl.c (xref_basetypes): Access and virtuality passed
5816 differently. Don't copy direct base binfos here. Call
5818 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5819 (initialize_vtbl_ptrs): Adjust.
5820 (expand_member_init): Adjust.
5821 * cp/parser.c (cp_parser_base_specifier): Adjust.
5822 * cp/pt.c (instantiate_class_template): Adjust.
5823 (get_template_base_recursive): Adjust.
5824 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5825 (get_pseudo_ti_desc): Adjust.
5826 * cp/tree.c (unshare_base_binfos): Rename to ...
5827 (copy_base_binfos): ... here, reimplement.
5828 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5829 (reverse_path): Remove.
5830 * cp/typeck.c (get_delta_difference): Adjust error messages.
5831 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5832 * cp/search.c (lookup_base_r): Adjust.
5833 (dynamic_cast_base_recurse): Adjust.
5834 (canonical_binfo): Remove.
5835 (dfs_canonical_queue): Remove.
5836 (dfs_assert_unmarked_p): Remove.
5837 (assert_canonical_unmarked): Remove.
5838 (shared_marked_p, shared_unmarked_p): Remove.
5839 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5840 (dfs_access_in_type): Adjust.
5841 (access_in_type): Adjust.
5842 (dfs_accessible_queue_p): Adjust.
5843 (dfs_accessible_p): Adjust.
5844 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5845 (struct lookup_field_info): Remove from_dep_base_p field.
5846 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5847 (lookup_field_r): Remove dependent base code.
5848 (lookup_member): Likewise.
5849 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5850 (dfs_unmarked_real_bases_queue_p): Remove.
5851 (dfs_marked_real_bases_queue_p): Remove.
5852 (dfs_skip_vbases): Remove.
5853 (dfs_get_pure_virtuals): Adjust.
5854 (markedp, unmarkedp): Adjust.
5855 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5856 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5857 (dfs_unmark): Adjust.
5858 (dfs_get_vbase_types):Remove.
5859 (dfs_build_inheritance_graph_order): Remove.
5860 (get_vbase_types): Remove
5861 (dfs_find_vbase_instance): Remove.
5862 (find_vbase_instance): Remove.
5863 (dfs_debug_unmarkedp): Adjust.
5864 (dependent_base_p): Remove.
5865 (dfs_push_type_decls): Adjust.
5866 (dfs_push_decls): Adjust.
5867 (dfs_no_overlap_yet): Adjust.
5868 (copied_binfo): New function.
5869 (original_binfo): New function.
5870 (binfo_for_vbase): Remove.
5872 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5874 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5875 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5878 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5881 * class.c (layout_class_type): In the 3.2 ABI, take into account
5882 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5884 2003-02-18 Matt Austern <austern@apple.com>
5886 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5888 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5889 handling of global namespace.
5891 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5893 * cp-tree.h (rid_to_yy): Delete.
5894 (C_RID_YYCODE): Delete.
5895 (finish_file): Delete redundant declaration.
5897 2003-02-18 Jason Merrill <jason@redhat.com>
5900 * decl.c (reshape_init): Don't mess with initializer labels.
5903 * parser.c (cp_parser_postfix_expression): Set idk properly for
5904 object->scope::member.
5906 2003-02-18 Ben Elliston <bje@redhat.com>
5909 * decl.c (duplicate_decls): Fix typo in comment.
5911 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5914 * class.c (build_base_field): Mark fields for base classes with
5917 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5920 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5921 CONSTRUCTOR_ELTS only once.
5923 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5926 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5927 (dump_type_suffix): Likewise.
5929 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5931 * search.c: ANSIfy function declarations and definitions.
5932 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5933 * call.c (build_method_call, resolve_scoped_fn_name,
5934 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5936 * class.c (handle_using_decl): Likewise.
5937 * decl.c (make_typename_type, make_unmound_class_template,
5938 start_decl, compute_array_index_type): Likewise.
5939 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5940 * init.c (expand_member_init, build_member_call): Likewise.
5941 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5942 resolve_typename_type): Likewise.
5943 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5944 build_prememfunc_access_expr): Likewise.
5946 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5948 * decl2.c: Include "timevar.h".
5949 (namespace_ancestor): Time name lookup.
5950 (add_using_namespace): Likewise.
5951 (lookup_using_namespace): Likewise.
5952 (qualified_lookup_using_namespace): Likewise.
5953 (decl_namespace): Likewise.
5954 (lookup_arg_dependent): Likewise.
5955 * lex.c (do_identifier): Likewise.
5956 (do_scoped_id): Likewise.
5957 * pt.c (lookup_template_class): Likewise.
5959 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5961 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5963 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5965 * decl.c: Include "timevar.h".
5966 (poplevel): Time name lookup.
5967 (find_binding): Likewise.
5968 (push_namespace): Likewise.
5969 (pop_nested_namespace): Likewise.
5970 (store_bindings): Likewise.
5971 (maybe_push_to_top_level): Likewise.
5972 (pop_from_top_level): Likewise.
5973 (push_local_name): Likewise.
5974 (pushtag): Likewise.
5975 (pushdecl): Likewise.
5976 (pushdecl_with_scope): Likewise.
5977 (pushdecl_namespace_level): Likewise.
5978 (pushdecl_top_level): Likewise.
5979 (pushdecl_class_level): Likewise.
5980 (push_class_level_binding): Likewise.
5981 (push_using_decl): Likewise.
5982 (push_using_directive): Likewise.
5983 (push_overloaded_decl): Likewise.
5984 (lookup_label): Likewise.
5985 (define_label): Likewise.
5986 (lookup_tag): Likewise.
5987 (lookup_tag_reverse): Likewise.
5988 (lookup_namespace_name): Likewise.
5989 (select_decl): Likewise.
5990 (unqualified_namespace_lookup): Likewise.
5991 (lookup_name_real): Likewise.
5992 (lookup_name_current_level): Likewise.
5993 (lookup_type_current_level): Likewise.
5994 (maybe_inject_for_scope_var): Likewise.
5995 (xref_tag): Likewise.
5997 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5999 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
6001 * decl.c (build_enumerator): Remove unneeded test.
6003 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
6005 * cp-tree.h (struct lang_type_header): Make all fields unsigned
6008 2003-02-03 Mark Mitchell <mark@codesourcery.com>
6011 * call.c (z_candidate): Add args.
6012 (convert_class_to_reference): Set it.
6013 (implicit_conversion): Tidy.
6014 (add_candidate): Add args parameter.
6015 (add_function_candidate): Adjust call to add_candidate.
6016 (add_conv_candidate): Likewise.
6017 (build_builtin_candidate): Likewise.
6018 (build_user_type_conversion_1): Eliminate wasteful tree_cons
6020 (build_new_function_call): Likewise.
6021 (build_object_call): Likewise.
6022 (add_candidates): New function.
6023 (build_new_op): Use it.
6024 (covert_like_real): Adjust call to build_over_call.
6025 (build_over_call): Remove args parameter.
6026 * operators.def: Add <?= and >?=.
6028 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
6030 * typeck.c (build_indirect_ref): Don't check flag_volatile.
6032 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6035 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
6037 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
6039 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
6040 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
6041 (BINFO_LANG_ELTS): New #define.
6042 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
6044 2003-01-30 Geoffrey Keating <geoffk@apple.com>
6046 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
6048 2003-01-30 Mark Mitchell <mark@codesourcery.com>
6050 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
6052 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
6053 rather than TYPE_LANG_FLAG_0.
6054 (TYPE_BUILT_IN): Remove.
6055 (TYPE_DEPENDENT_P): New macro.
6056 (TYPE_DEPENDENT_P_VALID): Likewise.
6057 (lang_type_class): Add fields_readonly.
6058 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
6059 * pt.c (dependent_type_p_r): New function, split out from ...
6060 (dependent_type_p): ... here. Memoize results.
6061 * search.c (dependent_base_p): Use dependent_type_p, not
6062 uses_template_parms.
6063 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
6066 2003-01-29 Mark Mitchell <mark@codesourcery.com>
6068 * call.c (build_field_call): Use build_new_op, not build_opfncall.
6069 (prep_operand): New function.
6070 (build_new_op): Use it. Remove dead code.
6071 * class.c (pushclass): Change "modify" parameter type from int to
6073 (currently_open_class): Use same_type_p, not pointer equality.
6074 (push_nested_class): Adjust calls to pushclass, remove modify
6076 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
6077 (pushclass): Change prototype.
6078 (push_nested_class): Likewise.
6079 (grokoptypename): Remove.
6080 (build_opfncall): Remove.
6081 (value_dependent_expression_p): Declare.
6082 (resolve_typename_type): Likewise.
6083 (resolve_typename_type_in_current_instantiation): Likewise.
6084 (enter_scope_of): Remove.
6086 (tsubst_expr): Likewise.
6087 (tsubst_copy): Likewise.
6088 (tsubst_copy_and_build): Likewise.
6089 * decl.c (warn_about_implicit_typename_lookup): Remove.
6090 (finish_case_label): Return error_mark_node for erroneous labels.
6091 (start_decl): Adjust calls to push_nested_class.
6092 (grokfndecl): Call push_scope/pop_scope around call to
6094 (grokdeclarator): Do not call tsubst.
6095 (start_function): Adjust calls to push_nested_class.
6096 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
6097 (check_classfn): Use push_scope/pop_scope around type comparisions.
6098 (grokoptypename): Remove.
6099 (push_sscope): Adjust call to push_nested_class.
6100 * error.c (dump_type): Show cv-qualification of typename types.
6101 * init.c (build_member_call): Use build_new_op, not
6103 * method.c (build_opfncall): Remove.
6104 * parser.c (cp_parser): Add allow_non_constant_expression_p and
6105 non_constant_expression_p.
6106 (cp_parser_constant_expression): Adjust prototype.
6107 (cp_parser_resolve_typename_type): Remove.
6108 (cp_parser_non_constant_expression): New function.
6109 (cp_parser_non_constant_id_expression): Likewise.
6110 (cp_parser_new): Set allow_non_constant_expression_p and
6111 non_constant_expression_p.
6112 (cp_parser_primary_expression): Reject `this' and `va_arg' in
6113 constant-expressions. Note that dependent names aren't really
6115 (cp_parser_postfix_expression): Reject conversions to non-integral
6116 types in constant-expressions. Neither are increments or
6118 (cp_parser_unary_expression): Reject increments and decrements in
6119 constant-expressions.
6120 (cp_parser_direct_new_declarator): Adjust call to
6121 cp_parser_constant_expression.
6122 (cp_parser_cast_expression): Reject conversions to non-integral
6123 types in constant-expressions.
6124 (cp_parser_assignment_expression): Rejects assignments in
6125 constant-expressions.
6126 (cp_parser_expression): Reject commas in constant-expressions.
6127 (cp_parser_labeled_statement): Adjust call to
6128 cp_parser_constant_expression.
6129 (cp_parser_direct_declarator): Simplify array bounds, even in
6130 templates, when they are non-dependent. Use
6131 resolve_typename_type, not cp_parser_resolve_typename_type.
6132 (cp_parser_class_head): Use resolve_typename_type, not
6133 cp_parser_resolve_typename_type.
6134 (cp_parser_member_declaration): Adjust call to
6135 cp_parser_constant_expression.
6136 (cp_parser_constant_initializer): Likewise.
6137 (cp_parser_constructor_declarator): Use resolve_typename_type, not
6138 cp_parser_resolve_typename_type.
6139 (cp_parser_late_parsing_default_args): Adjust call to
6141 * pt.c (tsubst): Give it internal linkage.
6142 (tsubst_expr): Likewise.
6143 (tsubst_copy): Likewise.
6144 (tsubst_copy_and_build): Likewise.
6145 (push_access_scope_real): Likewise.
6146 (tsubst_friend_class): Likewise.
6147 (instantiate_class_template): Adjust call to pushclass.
6148 (value_dependent_expression_p): Give it external linkage.
6150 (resolve_typename_type): New function.
6151 * semantics.c (finish_call_expr): Use build_new_op, not
6153 (begin_constructor_declarator): Remove.
6154 (begin_class_definition): Adjust call to pushclass.
6155 (enter_scope_of): Remove.
6156 * typeck.c (comptypes): Resolve typename types as appropriate.
6157 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
6158 (build_x_compound_expr): Likewise.
6159 (build_modify_expr): Likewise.
6160 (build_x_modify_expr): Likewise.
6161 * typeck2.c (build_x_arrow): Likewise.
6163 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
6165 * pt.c (last_pending_template) Declare GTY().
6167 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6170 * parser.c (cp_parser_elaborated_type_specifier): Convert
6171 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
6172 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
6174 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
6177 * pt.c (unify): Don't unify '*T' with 'U C::*'.
6180 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
6181 inside a declarator.
6183 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
6185 * class.c (update_vtable_entry_for_fn): Add index parameter.
6186 Generate vcall thunk for covariant overriding from a virtual
6188 (dfs_modify_vtables): Adjust.
6190 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
6193 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
6195 (cp_parser_base_specifier): Look for and consume a
6196 TEMPLATE keyword. Replace switch with array index.
6199 * semantics.c (finish_non_static_data_member): Remember the
6200 field's type even in a template.
6203 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
6207 * parser.c (cp_parser_cast_expression): Be more tentative.
6209 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6211 * cp-tree.h (flagged_type_tree_s): Remove.
6212 (check_for_new_type): Likewise.
6213 * typeck2.c (check_for_new_type): Likewise.
6215 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
6217 * dump.c: ANSIfy function declarations and definitions.
6219 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
6221 2003-01-22 Mark Mitchell <mark@codesourcery.com>
6224 * init.c (build_new): Set the type of the new-expression, even
6225 when processing_templte_decl.
6228 * parser.c (cp_parser_primary_expression): Improve error message
6229 for templates used in an expression context.
6232 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
6233 parse when encountering "typedef".
6235 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
6237 * class.c, parser.c: ANSIfy function definitions and declarations.
6239 2003-01-22 Mark Mitchell <mark@codesourcery.com>
6242 * error.c (dump_decl): For an OVERLOAD, just print the name of the
6243 function; it doesn't make sense to try to print its type.
6244 * semantics.c (finish_typeof): Issue errors about invalid uses.
6247 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
6249 (cp_parser_expression_statement): Use it.
6250 (cp_parser_explicit_instantiation): Likewise.
6251 * pt.c (do_decl_instantiation): Improve error handling logic.
6253 2003-01-22 Mark Mitchell <mark@codesourcery.com>
6256 * parser.c (cp_parser_using_declaration): Issue error messages
6257 about name resolution failures here.
6260 * class.c (currently_open_derived_class): Use dependent_type_p.
6261 * cp-tree.h (dependent_type_p): New function.
6262 (dependent_template_arg_p): Likewise.
6263 (dependent_template_p): Likewise.
6264 (type_dependent_expression_p): Likewise.
6265 * parser.c (cp_parser_dependent_type_p): Remove.
6266 (cp_parser_value_dependent_type_p): Likewise.
6267 (cp_parser_type_dependent_expression_p): Likewise.
6268 (cp_parser_dependent_template_arg_p): Likewise.
6269 (cp_parser_dependent_template_id_p): Likewise.
6270 (cp_parser_dependent_template_p): Likewise.
6271 (cp_parser_diagnose_invalid_type_name): Replace
6272 cp_parser_dependent_type_p with dependent_type_p, etc.
6273 (cp_parser_primary_expresion): Likewise.
6274 (cp_parser_nested_name_specifier_opt): Likewise.
6275 (cp_parser_postfix_expression): Likewise.
6276 (cp_parser_unary_expression): Likewise.
6277 (cp_parser_template_name): Likewise.
6278 (cp_parser_class_name): Likewise.
6279 (cp_parser_lookup_name): Likewise.
6280 * pt.c (dependent_type_p): New function.
6281 (value_dependent_expression_p): Likewise.
6282 (type_dependent_expression_p): Likewise.
6283 (dependent_template_arg_p): Likewise.
6284 (dependent_template_id_p): Likewise.
6285 (dependent_template_p): Likewise.
6289 * parser.c (cp_parser_simple_declaration): Return quickly when
6290 encountering errors.
6292 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6294 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
6296 2003-01-17 Jason Merrill <jason@redhat.com>
6298 PR c++/9167, c++/9358
6299 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
6301 2003-01-17 Jason Merrill <jason@redhat.com>
6304 * call.c (build_conditional_expr): Always do lvalue-rvalue
6307 2003-01-17 Mark Mitchell <mark@codesourcery.com>
6310 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
6311 * cp-tree.h (BASELINK_BINFO): Adjust.
6312 (BASELINK_FUNCTIONS): Likewise.
6313 (BASELINK_ACCESS_BINFO): Likewise.
6314 (tree_baselink): New structure.
6315 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
6316 (lang_tree_node): Add baselink.
6317 * decl.c (cp_tree_node_structure): Add BASELINK case.
6318 * search.c (build_baselink): Adjust.
6319 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
6320 test from TREE_LIST case.
6323 * parser.c (cp_parser_constructor_declarator_p): Do not assume
6324 that a constructor cannot be declared outside of its own class.
6326 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
6327 be resolved, neither can the qualified name.
6329 * rtti.c (get_pseudo_ti_desc): Fix thinko.
6331 2003-01-16 Jason Merrill <jason@redhat.com>
6334 * init.c (build_vec_init): Re-add maxindex parm.
6335 (perform_member_init, build_aggr_init): Pass it.
6336 (build_new_1): Pass it. Use an incomplete array type for full_type.
6337 * typeck.c (build_modify_expr): Pass it.
6338 * cp-tree.h: Adjust.
6340 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
6342 * cp-tree.h (tsubst_copy_and_build): New declaration.
6343 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
6344 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
6345 (tsubst_copy_and_build): New function.
6347 2003-01-16 Mark Mitchell <mark@codesourcery.com>
6349 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
6350 (PARTIAL_INSTANTIATION_P): Remove.
6351 (IMPLICIT_TYPENAME_P): Likewise.
6352 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
6353 (build_typename_type): Remove declaration.
6354 (parmlist_is_exprlist): Likewise.
6355 * decl.c (build_typename_type): Make it static, remove third
6357 (push_class_binding): Don't do implicit typename stuff.
6358 (make_typename_type): Likewise.
6359 (lookup_name_real): Likewise.
6360 (grokdeclarator): Don't try to convert declarations into
6361 initializations. Don't do implicit typename stuff.
6362 (parmlist_is_exprlist): Remove.
6363 (xref_basetypes): Simplify.
6364 * decl2.c (grokfield): Don't try to convert declarations into
6366 (build_anon_union_vars): Do this while processing templates, too.
6367 (finish_anon_union): Likewise.
6368 * error.c (dump_type): Remove implicit typename handling.
6369 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
6370 (cp_parser_primary_expression): Correct handling of names not
6371 found by unqualified name lookup in templates.
6372 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
6373 of types when possible.
6374 (cp_parser_simple_declaration): Complain intelligently about some
6375 invalid declarations.
6376 (cp_parser_member_declaration): Likewise.
6377 (cp_parser_constructor_declarator_p): Don't check when we're in a
6379 * pt.c (instantiate_class_template): Remove
6380 PARTIAL_INSTANTIATION_P gunk.
6381 * search.c (lookup_field_r): Don't build implicit typenames.
6382 (marked_pushdecls_p): Don't enter dependent base types.
6383 (unmarked_pushdecls_p): Likewise.
6384 * semantics.c (begin_class_definition): Remove implicit typename
6387 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
6390 * parser.c (cp_parser_direct_declarator): If accepting either
6391 abstract or named, the name must be an unqualified-id.
6393 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6395 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
6397 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6399 * decl2.c (check_classfn): Fix uninitialized warning.
6400 (build_anon_union_vars): Likewise.
6401 * pt.c (tsubst_copy): Likewise.
6403 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
6405 Further conform g++'s __vmi_class_type_info to the C++ ABI
6407 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
6409 (class_hint_flags): Likewise.
6411 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6413 * config-lang.in: Add semantics.c to gtfiles.
6414 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
6415 (saved_scope): Likewise.
6416 (type_lookups): Remove.
6417 (deferred_access): New structure.
6418 (type_access_control): Remove.
6419 (save_type_access_control): Likewise.
6420 (reset_type_access_control): Likewise.
6421 (decl_type_access_control): Likewise.
6422 (push_deferring_access_checks): Declare.
6423 (resume_deferring_access_checks): Likewise.
6424 (stop_deferring_access_checks): Likewise.
6425 (pop_deferring_access_checks): Likewise.
6426 (get_deferred_access_checks): Likewise.
6427 (pop_to_parent_deferring_access_checks): Likewise.
6428 (perform_deferred_access_checks): Likewise.
6429 (perform_or_defer_access_check): Likewise.
6430 * decl.c (make_typename_type): Use perform_or_defer_access_check.
6431 (make_unbound_class_template): Likewise.
6432 (grokdeclarator): Don't call decl_type_access_control.
6433 * parser.c (cp_parser_context): Remove deferred_access_checks
6434 and deferring_access_checks_p fields.
6435 (cp_parser_context_new): Adjust.
6436 (cp_parser): Remove access_checks_lists.
6437 (cp_parser_defer_access_check): Remove.
6438 (cp_parser_start_deferring_access_checks): Remove.
6439 (cp_parser_stop_deferring_access_checks): Remove.
6440 (cp_parser_perform_deferred_access_checks): Remove.
6441 (cp_parser_nested_name_specifier_opt): Use new deferred access
6443 (cp_parser_simple_declaration): Likewise.
6444 (cp_parser_template_id): Likewise.
6445 (cp_parser_function_definition): Likewise.
6446 (cp_parser_class_specifier): Likewise.
6447 (cp_parser_lookup_name): Likewise.
6448 (cp_parser_single_declaration): Likewise.
6449 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
6450 (cp_parser_parse_tentatively): Likewise.
6451 (cp_parser_parse_definitely): Likewise.
6452 (yyparse): Likewise.
6453 (cp_parser_init_declarator): Remove access_checks parameter.
6454 Use new deferred access functions.
6455 (cp_parser_function_definition_from_specifiers_and_declarator):
6457 (cp_parser_class_head): Remove deferring_access_checks_p and
6458 saved_access_checks parameters. Use new deferred access functions.
6459 (cp_parser_member_specification_opt): Don't call
6460 reset_type_access_control.
6461 * search.c (type_access_control): Remove.
6462 * semantics.c: Include "gt-cp-semantics.h".
6463 (deferred_type_access_control): Remove.
6464 (deferred_access_stack): New variable.
6465 (deferred_access_free_list): Likewise.
6466 (push_deferring_access_checks): New function.
6467 (resume_deferring_access_checks): Likewise.
6468 (stop_deferring_access_checks): Likewise.
6469 (pop_deferring_access_checks): Likewise.
6470 (get_deferred_access_checks): Likewise.
6471 (pop_to_parent_deferring_access_checks): Likewise.
6472 (perform_deferred_access_checks): New function, adapted from
6473 cp_parser_perform_deferred_access_checks.
6474 (perform_or_defer_access_check): New function, adapted from
6475 cp_parser_defer_access_check.
6476 (current_type_lookups): Remove.
6477 (deferred_type_access_control): Likewise.
6478 (decl_type_access_control): Likewise.
6479 (save_type_access_control): Likewise.
6480 (reset_type_access_control): Likewise.
6481 (begin_function_definition): Adjust.
6482 (begin_class_definiton): Likewise.
6484 2003-01-13 Jason Merrill <jason@redhat.com>
6487 * class.c (build_base_path): Take the address before calling save_expr.
6489 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6490 all the ambiguous conversions are bad.
6492 * class.c (maybe_warn_about_overly_private_class): Don't stop
6493 searching when we find a nonprivate method.
6495 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6497 2003-01-12 Mark Mitchell <mark@codesourcery.com>
6499 * cp-tree.h (get_arglist_len_in_bytes): Remove.
6502 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6503 typeame types more robustly.
6505 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
6507 * parser.c: Fix comment typos.
6509 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6512 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6513 an object_type which is not a class type.
6515 2003-01-10 Geoffrey Keating <geoffk@apple.com>
6517 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6518 (cp_parser_late_parsing_default_args): Likewise.
6520 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
6522 * cfns.gperf: ANSIfy function declarations.
6523 * cfns.h: Regenerate.
6524 * cp-tree.h: ANSIfy function declarations.
6526 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6528 * cp-tree.h (reparse_absdcl_as_expr): Remove.
6529 (reparse_absdcl_as_casts): Likewise.
6530 (reparse_decl_as_expr): Likewise.
6531 (finish_decl_parsing): Likewise.
6532 * decl2.c (reparse_absdcl_as_expr): Remove.
6533 (reparse_absdcl_as_casts): Likewise.
6534 (repase_decl_as_expr): Likewise.
6535 (finish_decl_parsing): Likewise.
6540 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6542 (cp_parser_nested_name_specifier_opt): Correct the
6543 check_dependency_p false.
6544 (cp_parser_postfix_expression): Fix formatting.
6545 (cp_parser_decl_specifier_seq): Avoid looking for constructor
6546 declarators when possible.
6547 (cp_parser_template_id): Avoid performing name-lookup when
6549 (cp_parser_class_head): Do not count specializations when counting
6550 levels of templates.
6551 (cp_parser_constructor_declarator_p): Return immediately if
6552 there's no chance that the tokens form a constructor declarator.
6553 * rtti.c (throw_bad_typeid): Add comment. Do not return an
6554 expression with reference type.
6555 (get_tinfo_decl_dynamic): Do not return an expression with
6557 (build_typeid): Add comment. Do not return an expression with
6559 * typeck.c (build_class_member_access_expr): Improve handling of
6560 conditionals and comma-expressions as objects.
6562 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6564 * cfns.gperf: ANSIfy function declarations.
6565 * cfns.h: Regenerate.
6566 * cp-tree.h: ANSIfy function declarations.
6567 * parser.c: ANSIfy function declarations & definitions.
6569 * decl.c (bad_specifiers): Fix parameter order error I introduced.
6571 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6573 Merge from pch-branch:
6575 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6577 Merge to tag pch-merge-20030102:
6579 * semantics.c (finish_translation_unit): Don't call finish_file.
6580 * parser.c: Don't include ggc.h.
6581 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6582 read first token here. Don't allow PCH files after the first
6584 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6585 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6586 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6587 (cp_parser_late_parsing_for_member): Don't duplicate call to
6588 cp_lexer_set_source_position_from_token.
6589 (cp_parser_late_parsing_default_args): Likewise.
6590 (yyparse): Call finish_file after clearing the_parser.
6592 2002-12-11 Geoffrey Keating <geoffk@apple.com>
6594 * Make-lang.in: Remove $(GGC_H) from all dependencies.
6595 (CXX_TREE_H): Add $(GGC_H).
6596 * class.c: Don't include ggc.h.
6597 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6598 (method_name_cmp): Likewise.
6599 (resort_data): New variable.
6600 (resort_field_decl_cmp): New.
6601 (resort_method_name_cmp): New.
6602 (resort_sorted_fields): New.
6603 (resort_type_method_vec): New.
6604 (finish_struct_methods): Delete cast.
6605 (finish_struct_1): Delete cast.
6606 * cp-tree.h: Include ggc.h.
6607 (struct lang_type_class): Add reorder attribute to field `methods'.
6608 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6609 (resort_sorted_fields): New prototype.
6610 (resort_type_method_vec): New prototype.
6611 * call.c: Don't include ggc.h.
6613 * decl2.c: Likewise.
6616 * method.c: Likewise.
6617 * optimize.c: Likewise.
6618 * parse.y: Likewise.
6621 * search.c: Likewise.
6622 * semantics.c: Likewise.
6626 * lang-specs.h: Remove comment.
6628 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6630 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6631 (operator_name_info): Mark to be saved for PCH, specify size.
6632 (assignment_operator_name_info): Likewise.
6634 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6636 * decl.c (anon_cnt): Mark to be saved for PCH.
6638 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6640 * lex.c (init_reswords): Delete now-untrue comment.
6641 Allocate ridpointers using GGC.
6643 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6645 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6647 * g++spec.c (lang_specific_driver): Don't include standard
6648 libraries in `added'.
6650 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6652 * decl2.c (finish_file): Call c_common_write_pch.
6653 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6655 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6657 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6658 files when using g++.
6659 * lang-specs.h: Handle compiling C++ header files.
6661 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6663 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6665 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6667 * pt.c (push_access_scope_real): Call push_to_top_level for
6668 function in namespace scope.
6669 (pop_access_scope): Call pop_from_top_level for function in
6672 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6674 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6676 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6678 * Make-lang.in (c++.install-common, c++.install-man,
6679 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6680 all (un)installation commands.
6681 (c++.install-common): Rewrite $(LN) commands to support
6682 DESTDIR with "ln" as well as with "ln -s".
6684 2003-01-08 Jason Merrill <jason@redhat.com>
6686 * parser.c (cp_parser_primary_expression): See through explicitly
6687 scoped ALIAS_DECLs, too.
6689 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6691 * decl.c: Remove some #if 0 code.
6693 * decl.c: ANSIfy function declarations.
6695 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6697 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6700 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6703 * decl.c (make_typename_type): Check access only when tf_error.
6704 (make_unbound_class_template): Likewise.
6705 * pt.c (saved_access_scope): New variable.
6706 (push_access_scope_real): New function.
6707 (push_access_scope): Likewise.
6708 (pop_access_scope): Likewise.
6709 (tsubst_default_argument): Use them.
6710 (instantiate_template): Likewise.
6711 (regenerate_decl_from_template): Likewise.
6712 (instantiate_decl): Likewise.
6713 (get_mostly_instantiated_function_type): Likewise.
6715 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6717 * tree.c: Delete bogus #if 0 code.
6719 2003-01-07 Andreas Schwab <schwab@suse.de>
6721 * class.c (layout_class_type): Don't use
6722 PCC_BITFIELD_TYPE_MATTERS if not defined.
6724 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6727 * decl2.c (build_cleanup): Mark the object as used.
6729 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6730 (hash_local_specialization): New function.
6731 (register_local_specialization): Revert 2003-01-05 change.
6732 (instantiate_decl): Use hash_local_specialization when creating
6733 the local_specializations table.
6735 * decl2.c (mark_used): Do not synthesize thunks.
6737 * class.c (layout_class_type): Correct handling of unnamed
6738 bitfields wider than their types.
6741 * parser.c (cp_parser): Remove default_arg_types. Update
6742 documentation for unparsed_functions_queues.
6743 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6745 (cp_parser_new): Don't set parser->default_arg_types.
6746 (cp_parser_function_definition): Adjust usage of
6747 unparsed_funtions_queues.
6748 (cp_parser_class_specifier): Don't mess with
6749 parser->default_arg_types. Handle default argument processing in
6750 a separate phase from function body processing.
6751 (cp_parser_template_declaration_after_export): Adjust usage of
6752 unparsed_functions_queues.
6753 (cp_parser_late_parsing_for_member): Do not handle default
6756 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6759 * parser.c (cp_parser_declarator_kind): New enum.
6760 (cp_parser_declarator): Adjust.
6761 (cp_parser_direct_declarator): Adjust. Allow for either named or
6762 abstract declarator. Prefer abstract, if possible. Allow
6763 parenthesized function name.
6764 (cp_parser_condition): Adjust cp_parser_declarator call.
6765 (cp_parser_explicit_instantiation): Likewise.
6766 (cp_parser_init_declarator): Likewise.
6767 (cp_parser_type_id): Likewise.
6768 (cp_parser_function_definition): Likewise.
6769 (cp_parser_member_declaration): Likewise.
6770 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6771 the tentative parsing.
6772 (cp_parser_exception_declaration): Likewise.
6774 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6776 * parser.c (cp_parser_template_parameter): Adjust call to
6777 cp_parser_parameter_declaration.
6778 (cp_parser_parameter_declaration_list): Likewise.
6779 (cp_parser_parameter_declaration): Replace
6780 greater_than_is_operator_p with template_parm_p parameter. Do not
6781 cache tokens for template default arguments.
6783 * pt.c (retrieve_local_specialization): Use htab_find, not
6784 htab_find_with_hash.
6785 (register_local_specialization): Use htab_find_slot, not
6786 htab_find_slot_with_hash.
6787 (instantiate_decl): Pass a hash function to htab_create.
6789 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6791 * parser.c (cp_parser_binary_expression,
6792 cp_parser_multiplicative_expression,
6793 cp_parser_additive_expression, cp_parser_shift_expression,
6794 cp_parser_relational_expression, cp_parser_equality_expression,
6795 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6796 cp_parser_inclusive_or_expression,
6797 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6798 cp_parser_binary_expression): Const-ify.
6800 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6802 * method.c (use_thunk): Disable access control while building the
6805 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6807 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6810 2003-01-03 Matt Austern <austern@apple.com>
6812 * cp-tree.h (struct lang_type_class): add field for key method
6813 (cp_global_trees): rename dynamic_classes to keyed_classes
6814 (key_method): add definition
6815 * class.c (finish_struct_1): compute class's key method, and add
6816 the class to keyed_classes list if there is no key method.
6817 * decl.c (finish_function): add class to keyed_classes list if we
6818 see a definition of the class's key method.
6819 * pt.c (instantiate_class_template): add template specialization
6820 of a dynamic class to keyed_classes list.
6821 * decl2.c (key_method): remove
6822 (finish_file): iterate only through keyed_classes list when
6823 deciding whether to emit vtables, remove class from its list after
6826 2003-01-02 Jason Merrill <jason@redhat.com>
6828 * call.c (build_conditional_expr): Stabilize lvalues properly.
6829 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6830 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6831 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6833 * call.c (convert_like_real): Call decl_constant_value for an
6834 IDENTITY_CONV even if there are no more conversions.
6836 * cvt.c (build_up_reference): Don't push unnamed temps.
6838 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6840 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6841 for a backend struct.
6843 * except.c (wrap_cleanups_r, build_throw): Make
6844 MUST_NOT_THROW_EXPRs void.
6845 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6847 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6849 * init.c (get_temp_regvar): Simplify logic.
6851 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6852 our replacement is a decl.
6854 * decl.c (cp_make_fname_decl): Push the decls inside the
6857 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6860 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6863 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6865 * parser.c (struct cp_parser): Add access_checks_lists field
6866 (cp_parser_simple_declaration): Use.
6867 (cp_parser_init_declarator): Likewise.
6869 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6871 * parser.c (cp_parser_declaration): Accept the __extension__
6872 keyword before the declaration.
6875 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6876 appear after the declarator.
6878 * call.c (build_new_method_call): Fix typo in message format
6881 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6883 * parser.c (cp_lexer_next_token_is): Declare it inline.
6884 (cp_lexer_set_source_position_from_token): Likewise.
6885 (cp_lexer_debugging_p): Likewise.
6886 (cp_parser_parsing_tentatively): Likewise.
6887 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6888 to the cp_lexer_peek_token.
6890 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6893 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6895 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6896 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6897 cp/repo.c: Fix copyright years.
6899 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6901 * lex.c: Remove superfluous include of cpplib.h.
6902 (CONSTRAINT): Define without conditions.
6903 (init_cp_pragma): Use c_register_pragma.