1 2005-02-22 Mark Mitchell <mark@codesourcery.com>
4 * decl.c (start_decl_1): Don't clear TREE_READONLY.
5 (cp_finish_decl): Likewise.
6 (complete_vars): Call cp_apply_type_quals_to_decl.
7 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
8 cases where that's not valid.
11 * init.c (integral_constant_value): Iterate if the value of a decl
15 * parser.c (cp_parser_class_head): Check for redefintions here.
16 * semantics.c (begin_class_definition): Not here.
19 * decl2.c (build_anon_union_vars): Add type parameter.
20 (finish_anon_union): Pass it.
23 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
24 Handle STATEMENT_LIST.
27 * parser.c (cp_parser_direct_declarator): Always complain about
28 non-constant array bounds when in a function scope.
29 * semantics.c (finish_id_expression): Do not mark dependent names
32 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
36 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
37 * decl.c (grokdeclarator): Pedwarn about qualifying a function
39 Add qualifiers when declaring a typedef of a function type.
40 Member function pointers pick up the qualifiers of the typedef
42 Don't complain about creating cv-qualified function types.
43 Complain about qualified function typedefs that are used to
44 declare non-static member functions or free functions.
45 Use cp_apply_type_quals_to_decl.
46 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
47 (grokclassfn): Use cp_apply_type_quals_to_decl.
48 * error.c (dump_type_suffix): Print qualifiers for function
50 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
51 (tsubst): When substituting a function type into a member
52 pointer type, pass along the qualifiers.
53 (unify): Unify member pointers to member function pointers.
54 * tree.c (cp_build_qualified_type_real): Function types may be
55 qualified. This includes restrict qualifiers.
56 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
57 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
58 added to function types.
60 2005-02-20 Zack Weinberg <zack@codesourcery.com>
63 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
64 c_common_to_target_charset. Delete bogus comment.
66 2005-02-18 Richard Henderson <rth@redhat.com>
69 * except.c (do_get_exception_ptr): New.
70 (expand_start_catch_block): Use it.
72 2005-02-19 Jakub Jelinek <jakub@redhat.com>
74 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
75 if type is not error_mark_node.
77 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
80 * decl2.c (grokfield): Do not apply attributes to template parameters
81 as they are ignored by tsubst anyway.
83 2005-02-18 Jakub Jelinek <jakub@redhat.com>
86 * decl.c (start_decl_1): Clear TREE_READONLY flag if
87 its type has TYPE_NEEDS_CONSTRUCTING.
88 (complete_vars): Likewise.
90 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
93 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
94 template along with TYPE_SIZE.
97 * semantics.c (perform_deferred_access_checks): Use
98 get_deferred_access_checks to get the top of the stack.
100 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
103 * class.c (add_implicitly_declared_members, check_field_decl)
104 (check_field_decls, check_bases): Remove arguments, tests and
105 assignments of cant_have_default_ctor-related variables.
107 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
109 * decl2.c (mark_used): Set the source location of the used decl to
110 the current input location here...
111 * method.c (synthesize_method): ... not here. Set input_location
112 from the decl instead.
114 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
117 * parser.c (cp_parser_late_parsing_for_member): Use
118 current_function_decl as scope to push to and from.
121 * pt.c (check_explicit_specialization): Make sure namespace
122 binding lookup found an overloaded function.
123 (lookup_template_function): Just assert FNS is an overloaded
127 * decl.c (grokdeclarator): Check for error mark node in ptrmem
130 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
133 * decl.c (redeclaration_error_message): Report redefinition of
134 pure virtual function.
136 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
139 * class.c (build_simple_base_path): Build the component_ref
141 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
142 rather than using lookup_base.
143 * search.c (dfs_walk_once): Add non-recursive assert check.
144 * typeck.c (build_class_member_access_expr): It is possible for
145 the member type to be both const and volatile.
147 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
151 * pt.c (maybe_check_template_type): Remove.
152 * cp-tree.h (maybe_check_template_type): Remove prototype.
153 * name-lookup.c (maybe_process_template_type_declaration): Don't
154 use maybe_check_template_type.
156 2005-02-11 Richard Henderson <rth@redhat.com>
159 * pt.c (get_mostly_instantiated_function_type): Save and restore
160 flag_access_control instead of push/pop_access_scope.
162 2005-02-10 Mark Mitchell <mark@codesourcery.com>
165 * decl.c (reshape_init): Issue warnings about missing braces.
167 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
169 * cp-tree.def, except.c, ptree.c: Update copyright.
171 2005-02-09 Mark Mitchell <mark@codesourcery.com>
174 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
175 attempting name lookup.
177 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
180 * call.c (initialize_reference): Robustify.
183 * decl.c (grokdeclarator): Check for invalid use of destructor
187 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
188 names with invalid types.
191 * parser.c (cp_parser_direct_declarator): Allow type-dependent
192 expressions as array bounds.
195 * parser.c (cp_parser_attributes_list): Allow empty lists.
197 2005-02-08 Mark Mitchell <mark@codesourcery.com>
200 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
201 (check_bases): Give warnings about a base class with a
202 non-virtual destructor, even if it is implicit.
203 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
204 (maybe_warn_about_overly_private_class): Don't use
206 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
207 (check_for_override): Give it external linkage.
208 (add_implicitly_declared_members): Generate destructors lazily.
209 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
211 (check_bases_and_members): Call check_methods before
213 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
215 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
216 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
217 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
218 (lang_type_class): Add lazy_destructor.
219 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
220 (CLASSTYPE_DESTRUCTORS): Robustify.
221 (TYPE_HAS_DESTRUCTOR): Remove.
222 (check_for_override): Declare.
223 (build_vbase_delete): Remove.
224 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
226 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
227 * except.c (dtor_nothrow): Lazily create destructors if necessary.
228 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
229 * init.c (build_delete): Lazily create destructors, if necessary.
230 (build_vbase_delete): Remove.
231 * method.c (locate_dtor): Simplify.
232 (implicitly_declare_fn): Add support for destructors.
233 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
235 * pt.c (check_explicit_specialization): Don't use
237 (instantiate_class_template): Likewise.
238 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
239 * rtti.c (emit_support_tinfos): Robustify.
240 * search.c (lookup_fnfields_1): Lazily create destructors.
241 * typeck.c (build_class_member_access_expr): Remove
242 PSEUDO_DTOR_EXPR handling.
243 (lookup_destructor): Likewise.
245 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
247 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
250 2005-02-07 Mark Mitchell <mark@codesourcery.com>
252 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
253 on boolean variables.
254 (cp_lexer_stop_debugging): Likewise.
256 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
259 * parser.c (cp_parser_pure_specifier): Emit a specific error
260 message with an invalid pure specifier.
261 * decl2.c (grok_function_init): Remove.
262 (grokfield): An initializer for a method is a always a pure
265 2005-02-02 Matt Austern <austern@apple.com>
268 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
269 * parser.c (cp_parser_postfix_expression): Accept function call in
270 constant expression if builtin_valid_in_constant_expr_p is true
272 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
273 * semantics.c (finish_id_expression): Accept function call in constant
274 expression if builtin_valid_in_constant_expr_p is true for that
276 * tree.c (builtin_valid_in_constant_expr_p): New.
278 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
281 * pt.c (check_instantiated_args): Improve error message.
282 Fix logic when to print its second part.
284 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
286 * cp-tree.h (complete_type_or_else): Remove macro.
287 (complete_type_or_diagnostic): Rename to complete_type_or_else
288 and remove last argument.
289 * typeck.c (complete_type_or_diagnostic): Rename to
290 complete_type_or_else and remove last argument.
292 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
294 * cp-tree.h (commonparms): Remove prototype.
295 (convert_arguments): Likewise.
296 (PFN_FROM_PTRMEMFUNC): Remove.
297 * typeck.c (commonparms): Make static.
298 (convert_arguments): Add prototype. Make static.
299 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
301 2005-01-31 Mark Mitchell <mark@codesourcery.com>
303 * parser.c (cp_parser_primary_expression): Don't complain about
304 floating-point literals in integral constant expressions when
307 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
309 * parser.c (cp_parser_template_id): Revert comment patch too.
314 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
315 Issue an error when creating the template id.
316 * pt.c (fn_type_unification): Return early if the explicit
317 template arg list is an error_mark_node.
319 2005-01-31 Mark Mitchell <mark@codesourcery.com>
321 * decl.c (build_enumerator): Do not issue duplicate error messages
322 about invalid enumeration constants.
323 * parser.c (cp_parser_non_integral_constant_expression): Always
324 set parser->non_integral_constant_expression_p.
325 (cp_parser_primary_expression): Add cast_p parameter. Issue
326 errors about invalid uses of floating-point literals in
328 (cp_parser_postfix_expression): Add cast_p parameter.
329 (cp_parser_open_square_expression): Pass it.
330 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
331 (cp_parser_unary_expression): Likewise.
332 (cp_parser_new_placement): Pass it.
333 (cp_parser_direct_new_declarator): Likewise.
334 (cp_parser_new_initializer): Likewise.
335 (cp_parser_cast_expression): Add cast_p parameter.
336 (cp_parser_binary_expression): Likewise.
337 (cp_parser_question_colon_clause): Likewise.
338 (cp_parser_assignment_expression): Likewise.
339 (cp_parser_expression): Likewise.
340 (cp_parser_constant_expression): If an integral constant
341 expression is invalid, return error_mark_node.
342 (cp_parser_expression_statement): Pass cast_p.
343 (cp_parser_condition): Likewise.
344 (cp_parser_iteration_statement): Likewise.
345 (cp_parser_jump_statement): Likewise.
346 (cp_parser_mem_initializer): Likewise.
347 (cp_parser_template_argument): Likewise.
348 (cp_parser_parameter_declaration): Likewise.
349 (cp_parser_initializer): Likewise.
350 (cp_parser_throw_expression): Likewise.
351 (cp_parser_attribute_list): Likewise.
352 (cp_parser_simple_cast_expression): Likewise.
353 (cp_parser_functional_cast): Likewise.
354 (cp_parser_late_parsing_default_args): Likewise.
355 (cp_parser_sizeof_operand): Save/restore
356 non_integral_constant_expression_p.
358 2005-01-31 Mike Stump <mrs@apple.com>
360 * parser.c (cp_lexer_new_main): Get the first token, first, before
363 2005-01-31 Mark Mitchell <mark@codesourcery.com>
365 * decl.c (start_decl): Add missing parentheses.
367 2005-01-30 Mark Mitchell <mark@codesourcery.com>
370 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
371 * decl.c (duplicate_decls): Do not discard
372 DECL_IMPLICIT_INSTANTIATION when merging declarations.
373 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
374 variables that do not have DECL_USE_TEMPLATE.
377 * decl.c (grokdeclarator): Refactor code so that qualified names
378 are never allowed as the declarator in a typedef.
381 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
382 builtin declarations.
385 * call.c (convert_like_real): Inline call to
386 dubious_conversion_warnings here.
387 * cp-tree.h (dubious_conversion_warnings): Remove.
388 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
389 setting TREE_NEGATED_INT.
390 * typeck.c (dubious_conversion_warnings): Remove.
393 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
396 2005-01-28 Mark Mitchell <mark@codesourcery.com>
399 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
403 * pt.c (redeclare_class_template): Robustify.
405 2005-01-27 Steven Bosscher <stevenb@suse.de>
407 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
408 instead of SWITCH_EXPR ones.
409 * pt.c (tsubst_expr): Likewise.
410 * semantics.c (begin_switch_stmt, finish_switch_cond,
411 finish_switch_stmt): Likewise.
413 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
416 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
418 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
420 * class.c (abort_fndecl_addr): New variable.
421 (build_vtbl_initializer): If we have a pure virtual function
422 share the abort function's address.
423 Include gt-cp-class.h at the end.
424 * config-lang.in (gtfiles): Add cp/class.c.
426 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
428 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
429 (pp_cxx_function_definition): Make static.
430 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
431 (pp_cxx_function_definition): Likewise.
433 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
435 * name-lookup.c (print_binding_level): Make static.
436 (constructor_name_full): Make static inline.
437 (current_decl_namespace): Make static.
438 * name-lookup.h (constructor_name_full): Remove prototype.
439 (print_binding_level): Likewise.
440 (current_decl_namespace): Likewise.
442 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
444 * decl.h (debug_bindings_indentation): Remove.
446 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
448 * typeck.c: Fix a comment typo.
450 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
453 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
455 (tsubst): Use fold_decl_constant_value in place of a bare call to
456 integral_constant_value.
458 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
460 * typeck.c (more_qualified_p): Remove.
461 * cp-tree.h: Remove the corresponding prototype.
463 2005-01-19 Matt Austern <austern@apple.com>
465 * typeck.c (comptypes): Handle return code from objc_comptypes
468 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
470 * cp-tree.h, name-lookup.h: Remove unused prototypes.
472 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
475 * semantics.c (finish_id_expression): Disable access checking for
476 already lookuped FIELD_DECL.
478 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
480 * decl.c (delete_block): Remove.
481 * cp-tree.h: Remove the corresponding prototype.
483 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
484 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
486 * cp-tree.h: Remove the corresponding prototypes.
488 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
489 cp_update_decl_after_saving, name_p): Remove.
490 * cp-tree.h: Remove the corresponding prototypes.
492 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
495 * semantics.c (finish_asm_stmt): Strip nops off
496 input memory operands.
498 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
500 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
501 typeck2.c: Update copyright.
503 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
505 * class.c (get_enclosing_class): Remove.
506 * cp-tree.h: Remove the corresponding prototypes.
508 * cvt.c (convert_lvalue): Remove.
509 * cp-tree.h: Remove the corresponding prototype.
511 * pt.c (tinst_for_decl): Remove.
512 * cp-tree.h: Remove the corresponding prototypes.
514 * tree.c (hash_chainon): Remove.
515 * cp-tree.h: Remove the corresponding prototypes.
517 2005-01-15 Jakub Jelinek <jakub@redhat.com>
520 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
521 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
523 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
525 * Make-lang.in (cp-warn): Don't append $(WERROR).
527 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
529 * cp-tree.h: Fix a comment typo.
531 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
534 * pt.c (tsubst_qualified_id): Call convert_from_reference.
536 2005-01-06 Mark Mitchell <mark@codesourcery.com>
539 * class.c (add_implicitly_declared_members): Remove dead code.
540 * decl.c (grokfndecl): Add sfk parameter. Use it do set
542 (grokdeclarator): Adjust calls to grokfndecl.
543 * method.c (implicitly_declare_fn): Improve documentation.
544 * parser.c (cp_parser_direct_declarator): Do not consider a
545 function to be a constructor if the containing class was
546 originally anonymous.
548 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
551 * search.c (lookup_field_1): Handle using declaration in
552 class template partial specialization.
554 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
557 * pt.c (push_access_scope): Handle friend defined in class.
558 (pop_access_scope): Likewise.
560 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
563 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
564 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
565 array-new handling code. Use build_x_binary_op.
567 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
570 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
571 * name-lookup.h (push_scope): Return pushed scope, not flag.
572 * name-lookup.c (push_scope): Return scope that should be popped,
574 * decl.c (start_decl): Adjust.
575 (grokfndecl): Adjust scope push and pop.
576 * decl2.c (check_classfn): Likewise.
577 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
578 cp_parser_init_declarator, cp_parser_direct_declarator,
579 cp_parser_class_specifier, cp_parser_class_head,
580 cp_parser_lookup_name,
581 cp_parser_constructor_declarator_p): Likewise.
582 * pt.c (instantiate_class_template,
583 resolve_typename_type): Likewise.
585 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
588 * parser.c (cp_parser_unqualified_id): Do not issue error message
589 for typedef-name as destructor declarator when performing an
590 uncommitted tentative parse.
592 2005-01-01 Steven Bosscher <stevenb@suse.de>
595 * decl.c (finish_function): Fix comment. Annotate the compiler
596 generated return with the current file name and line 0.
598 2004-12-31 Richard Henderson <rth@redhat.com>
601 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
602 * class.c (build_vtable): Don't conditionallize setting it
603 based on DWARF2_DEBUG.
604 (layout_class_type): Set DECL_IGNORED_P.
605 * decl2.c (get_guard): Likewise.
606 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
607 * tree.c (build_local_temp): Likewise.
609 2004-12-30 Mark Mitchell <mark@codesourcery.com>
611 * cp-tree.h (cp_declarator): Split "name" field into
612 qualifying_scope and unqualified_name.
613 * decl.c (get_scope_of_declarator): Adjust accordingly.
614 (grokdeclarator): Likewise.
615 * decl2.c (grokfield): Likewise, and adjust call to
617 * name-lookup.c (do_class_using_decl): Split "decl" into
618 "scope" and "name". Remove unnecessary code.
619 * name-lookup.h (do_class_using_decl): Adjust declaration.
620 * parser.c (make_id_declarator): Split "id" into qualifying_scope
621 and unqualified_name.
622 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
623 (cp_parser_direct_declarator): Adjust to handle the fact that
624 cp_parser_declarator_id no longer returns a SCOPE_REF.
625 (cp_parser_direct_declarator): Likewise.
626 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
628 (cp_parser_member_declaration): Adjust call to make_id_declarator.
629 (cp_parser_check_declarator_template_parameters): Do not expect a
632 * decl.c (duplicate_decls): Call ggc_free on declarations we will
633 not be needing any longer.
636 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
638 2004-12-28 Richard Henderson <rth@redhat.com>
641 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
642 constraints. Mark memory inputs addressable.
644 2004-12-27 Jason Merrill <jason@redhat.com>
646 * decl.c (expand_static_init): Don't use shortcut if
647 targetm.relaxed_ordering.
649 2004-12-27 Mark Mitchell <mark@codesourcery.com>
652 * decl.c (check_tag_decl): Robustify.
654 2004-12-23 Mark Mitchell <mark@codesourcery.com>
657 * parser.c (cp_parser_error): Issue better messages about
658 #pragma in locations where it is not permitted.
661 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
663 * cvt.c (convert_to_void): Fix typo in comment.
665 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
668 * pt.c (check_explicit_specialization): Use the argument list from
669 the definition in a template function specialization definition.
671 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
674 * pt.c (check_explicit_specialization): Use special logic to validate
675 befriended specializations.
677 2004-12-22 Mark Mitchell <mark@codesourcery.com>
679 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
682 * call.c (build_this): In templates, do not bother with
684 * typeck.c (unary_complex_lvalue): In a template, always refuse
688 * cp-gimplify.c (cp_genericize): Relax assertion.
691 * cvt.c (convert_to_void): Warn about unused values.
694 * rtti.c (emit_support_tinfos): On systems without weak symbols,
695 emit the runtime library type-info objects as non-COMDAT.
697 2004-12-21 Mark Mitchell <mark@codesourcery.com>
700 * call.c (convert_like_real): Do not permit the use of a copy
701 constructor to copy a packed field.
704 * decl.c (grokdeclarator): Return error_mark_node, not
705 void_type_node, to indicate errors.
706 * parser.c (cp_parser_template_parameter_list): Robustify.
707 (cp_parser_template_parameter): Likewise.
710 * tree.c (cp_tree_equal): Handle OVERLOAD.
712 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
714 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
715 * name-lookup.c (pushdecl_class_level): Likewise.
717 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
719 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
721 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
724 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
725 check to see if contains the pointer. Insert the statement before
728 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
731 * decl.c (check_initializer): Check string initializer of array is
733 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
734 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
735 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
737 * cp-tree.def (TEMPLATE_TYPE_PARM,
738 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
739 for better code efficiency.
740 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
741 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
742 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
743 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
744 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
745 TYPE_PTROBV_P): Likewise.
748 * method.c (do_build_copy_constructor): Refactor. Don't const
749 qualify a mutable field.
750 (do_build_assign_ref): Likewise.
752 2004-12-20 Matt Austern <austern@apple.com>
755 * decl.c (make_rtl_for_nonlocal_decl): Use
756 set_builtin_user_assembler_name.
758 2004-12-19 Mark Mitchell <mark@codesourcery.com>
760 * cp-tree.h (note_decl_for_pch): New function.
761 * class.c (build_clone): Call note_decl_for_pch.
762 * semantics.c (finish_member_declaration): Likewise.
763 (note_decl_for_pch): New function.
765 2004-12-17 Steven Bosscher <stevenb@suse.de>
767 * init.c (build_zero_init): max_index is the number of
770 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
773 * class.c (add_method): Do not push conversion operators into a
776 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
777 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
779 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
782 * cp-tree.h (integral_constant_value): Declare.
783 * call.c (null_ptr_cst_p): Use integral_constant_value, not
785 (convert_like_real): Likewise.
786 * class.c (check_bitfield_decl): Likewise.
787 * cvt.c (ocp_convert): Likewise.
788 (convert): Remove unnecessary decl_constant_value call.
789 * decl.c (compute_array_index_type): Use integral_constant_value,
790 not decl_constant_value.
791 (build_enumerator): Likewise.
792 * decl2.c (grokfield): Likewise.
793 * init.c (decl_constant_value): Simplify.
794 (integral_constant_value): New.
795 * pt.c (fold_decl_constant_value): Use integral_constant_value,
796 remove subsequent check.
797 (tsubst): Use integral_constant_value, not decl_constant_value.
798 (tsubst_copy, unify): Likewise.
799 * typeck.c (decay_conversion): Likewise.
800 (build_compound_expr): Remove unnecessary decl_constant_value
802 (build_static_cast_1, build_reinterpret_cast_1):
803 (convert_for_assignment): Remove comment about not calling
806 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
809 * pt.c (instantiate_class_template): Set input_location for
811 (tsubst_friend_function): Don't set input_location here.
812 Make sure the context is complete if necessary.
814 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
817 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
820 2004-12-14 Mark Mitchell <mark@codesourcery.com>
823 * decl.c (make_typename_type): Do not handle namespace-scoped
825 (tag_name): Handle typename_type.
826 (check_elaborated_type_specifier): Handle typenames.
827 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
829 (cp_parser_elaborated_type_specifier): Use
830 cp_parser_diagnose_invalid_type_name.
832 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
835 * init.c (build_zero_init): If the max_index is 0, there is no
836 need to create a RANGE_EXPR.
838 2004-12-14 Mark Mitchell <mark@codesourcery.com>
841 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
843 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
846 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
847 REFERENCE_REF_P is dereferencing a reference type.
848 * typeck.c (build_static_cast): Convert from reference even in a
850 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
852 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
854 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
855 (cp_parser_name_lookup_error): Use it.
856 (cp_parser_check_for_invalid_template_id): Likewise.
857 (cp_parser_skip_to_closing_parenthesis): Likewise.
858 (cp_parser_nested_name_specifier_opt): Likewise.
859 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
860 (cp_parser_parameter_declaration_list): Likewise.
861 (cp_parser_parameter_declaration): Likewise.
862 (cp_parser_template_name): Let cp_parser_simulate_error perform
864 (cp_parser_committed_to_tentative_parse): Remove.
866 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
869 * class.c (build_base_path): Convert the zero constant to the correct
872 2004-12-13 Mark Mitchell <mark@codesourcery.com>
875 * class.c (layout_class_type): Determine the visibility of static
878 2004-12-12 Roger Sayle <roger@eyesopen.com>
881 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
882 condition is a constant and the unexecuted clause is empty.
884 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
887 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
889 2004-12-09 Matt Austern <austern@apple.com>
892 * name-lookup.c (do_nonmember_using_decl): A real function
893 declaration takes precedence over an anticipated declaration.
895 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
897 * parser.c (cp_parser_member_declaration): Fix comment typo.
899 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
902 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
905 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
908 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
910 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
913 * init.c (build_zero_init): Build a RANGE_EXPR for an array
916 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
918 * typeck.c: Remove DOS line endings.
920 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
923 * decl.c (lookup_and_check_tag): Diagnose nested class with
924 the same name as enclosing class.
926 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
929 * cp-tree.h (REFERENCE_REF_P): New.
930 (CPTI_TYPE_INFO_TYPE): Rename to ...
931 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
932 (CPTI_TYPE_INFO_REF_TYPE): Remove.
933 (type_info_type_node): Rename to ...
934 (const_type_info_type_node): ... here.
935 (type_info_ref_type): Remove.
936 * call.c (build_user_type_conversion): Reformat.
937 (resolve_args): Do not convert_from_reference.
938 (build_object_call): Call convert_from_reference.
939 (prep_operand): Do not convert_from_reference.
940 (build_new_method_call): Likewise.
941 * class.c (build_vfield_ref): Likewise.
942 * cvt.c (convert_to_reference): Likewise.
943 (convert_from_reference): Build INDIRECT_REF here, not with
945 (convert_force): Do not convert_from_reference.
946 (build_expr_type_conversion): Likewise.
947 * decl.c (grok_reference_init): Likewise.
948 * decl2.c (delete_sanity): Likewise.
949 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
950 * init.c (build_dtor_call): Do not convert_from_reference.
951 * parser.c (cp_parser_template_argument): Unwrap indirected
952 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
953 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
954 convert_from_reference, if indicated.
955 <case CALL_EXPR>: Do not convert_from_reference.
956 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
957 (tsubst_initializer_list): Do not convert_from_reference.
958 * rtti.c (init_rtti_processing): Adjust node creation.
959 (throw_bad_typeid): Use const_type_info_type_node.
960 Do not convert_from_reference.
961 (typeid_ok_p): Use const_type_info_type_node.
962 (build_typeid, get_typeid): Always return type_info typed node.
963 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
964 * semantics.c (finish_stmt_expr_expr): Do not
965 convert_from_reference.
966 (finish_id_expression): Convert_from_reference as appropriate.
967 * typeck.c (decay_conversion): Do not convert_from_reference.
968 (finish_class_member_access_expr): Likewise.
969 (build_indirect_ref): Use POINTER_TYPE_P.
970 (convert_arguments): Do not convert_from_reference.
971 (build_modify_expr): Likewise.
972 (convert_for_initialization): Likewise.
973 * typeck2.c (build_x_arrow): Likewise.
975 2004-12-07 Ziemowit Laski <zlaski@apple.com>
977 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
978 field to 'objc_info'.
980 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
982 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
984 2004-12-07 Roger Sayle <roger@eyesopen.com>
986 * name-lookup.c (leave_scope): We only need to update
987 class_binding_level when leaving a class scope.
989 2004-12-06 Ziemowit Laski <zlaski@apple.com>
991 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
993 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
995 PR c++/17011, c++/17971
996 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
998 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
999 error_mark_node after member substitution.
1000 * semantics.c (finish_id_expression): Call
1001 finish_non_static_data_member for non-dependent FIELD_DECL.
1003 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
1006 * decl.c (grokdeclarator): Make sure class in pointer to member is
1009 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1012 * parser.c (cp_parser_new_type_id): Move array size expression
1013 checks from here ...
1014 * init.c (build_new): ... to here.
1016 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1019 * parser.c (cp_parser_class_head): Return NULL_TREE when
1020 push_template_decl fails. Update comment.
1022 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1024 PR c++/15664, c++/18276
1025 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
1026 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1028 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1031 * parser.c (cp_parser_type_specifier): Catch template declaration
1034 2004-12-01 Matt Austern <austern@apple.com>
1036 * name-lookup.c (namespace_binding): Omit alias check for global
1039 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
1042 * parser.c (cp_parser_class_name): Check decl's type is not
1046 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1047 derived to base conversion when checking constructor
1049 (implicit_conversion): Pass FLAGS to standard_conversion.
1050 (check_constructir_callable): Disallow conversion functions.
1052 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
1054 * parser.c: Fix comment typos.
1056 2004-11-27 Mark Mitchell <mark@codesourcery.com>
1059 * parser.c (cp_parser_check_for_definition_in_return_type): Take
1060 the defined type as a parameter, and inform the user about the
1061 possibility of a missing semicolon.
1062 (cp_parser_explicit_instantiation): Adjust call to
1063 cp_parser_check_for_definition_in_return_type.
1064 (cp_parser_init_declarator): Likewise.
1065 (cp_parser_member_declaration): Likewise.
1068 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1069 typename from comments.
1070 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1071 (TYPENAME_IS_CLASS_P): Likewise.
1072 (make_typename_type): Change prototype.
1073 * decl.c (struct_typename_info): New type.
1074 (typename_compare): Expect the second argument to be a
1075 typename_info, not a tree.
1076 (build_typename_type): Add tag_type parameter. Do not create a
1077 new type until necessary.
1078 (make_typename_type): Add tag_type parameter.
1079 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1081 * friend.c (make_friend_class): Adjust call to make_typename_type.
1082 * parser.c (cp_parser_make_typename_type): Likewise.
1083 (cp_parser_primary_expression): Adjust call to
1084 cp_parser_lookup_name.
1085 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1086 (cp_parser_class_or_namespace_name): Likewise.
1087 (cp_parser_postfix_expression): Adjust calls to
1089 (cp_parser_mem_initializer_id): Adjust calls to
1090 cp_parser_class_name.
1091 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1092 (cp_parser_template_name): Likewise.
1093 (cp_parser_template_argument): Likewise.
1094 (cp_parser_type_name): Adjust call to cp_parser_class_name.
1095 (cp_parser_elaborated_type_specifier): Adjust calls to
1096 make_typename_type and cp_parser_lookup_name.
1097 (cp_parser_namespace_name): Likewise.
1098 (cp_parser_class_name): Replace type_p parameter with tag_type.
1099 Adjust calls to make_typename_type and cp_parser_lookup_name.
1100 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1101 (cp_parser_base_specifier): Likewise.
1102 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1103 Adjust calls to make_typename_type and lookup_qualified_name.
1104 (cp_parser_lookup_name_simple): Adjust call to
1105 cp_parser_lookup_name.
1106 (cp_parser_constructor_declarator_p): Adjust call to
1107 cp_parser_class_name.
1108 * pt.c (convert_template_argument): Adjust all to
1110 (tsubst_decl): Do not pre-substitute the type of the declaration.
1111 (tsubst): Hand off declarations more quickly. Adjust call to
1115 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1117 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
1120 * Make-lang.in (cp/decl2.o): Update dependencies.
1121 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1123 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1126 * name-lookup.c (pushtag): Change return type to tree.
1127 * cp-tree.h (pushtag): Adjust declaration.
1128 * decl.c (xref_tag, start_enum): Use return value of pushtag.
1129 * pt.c (push_template_decl_real): Return immediately if
1130 pushdecl_namespace_level returns error_mark_node.
1132 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1134 * pt.c: Fix a comment typo.
1136 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1138 Friend class name lookup 4/n
1139 * class.c (pushclass): Don't call cxx_remember_type_decls.
1140 * cp-tree.h (clear_anon_tags): Remove declaration.
1141 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
1142 * name-lookup.c (binding_entry_free, binding_table_free): Comment
1144 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
1145 binding_table_remove_anonymous_types, cxx_remember_type_decls,
1146 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1147 lookup_tag_reverse): Remove
1148 (begin_scope, leave_scope, kept_level_p, print_binding_level):
1149 Don't use type_decls field in cp_binding_level.
1150 (maybe_process_template_type_declaration, pushtag): Set
1151 CLASSTYPE_NESTED_UTDS directly.
1152 * name-lookup.h (binding_table_remove_anonymous_types,
1153 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1155 (cp_binding_level): Remove type_decls field.
1157 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
1159 * typeck.c: Fix a comment typo.
1161 2004-11-25 Mark Mitchell <mark@codesourcery.com>
1164 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1165 unknown_type as non matching. Tidy up.
1166 * pt.c (build_non_dependent_expr): Do not build a
1167 NON_DEPENDENT_EXPR for a VAR_DECL.
1170 * cp-tree.h (lvalue_or_else): Remove declaration.
1171 * tree.c (lvalue_or_else): Remove.
1172 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1173 (build_modify_expr): Likewise.
1176 * decl.c (duplicate_decls): Return error_mark_node on error, as
1180 * decl.c (grokvardecl): Keep track of whether or not a there was
1181 explicit qualification.
1182 * name-lookup.c (set_decl_namespace): Complain about explicit
1183 qualification of a name within its own namespace.
1186 * typeck.c (check_return_expr): Robustify.
1188 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1190 Friend class name lookup 3/n, PR c++/3332
1191 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1192 (lookup_type_scope): Don't deal with name from user declaration
1194 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1195 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1198 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1200 Friend class name lookup 2/n, PR c++/14513, c++/15410
1201 * name-lookup.c (lookup_name_real): Simplify.
1202 (lookup_type_scope): Add SCOPE parameter. Handle friend class
1204 * name-lookup.h (tag_scope): New enum type.
1205 (lookup_type_scope): Adjust declaration.
1206 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1207 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1208 (start_enum): Likewise. Add assertion test that NAME is
1209 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
1211 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1212 * parser.c (cp_parser_elaborated_type_specifier,
1213 cp_parser_class_head): Adjust call to xref_tag.
1214 * pt.c (lookup_template_class, instantiate_class_template):
1216 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1217 tinfo_base_init, emit_support_tinfos): Likewise.
1219 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1221 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1223 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1226 * name-lookup.c (supplement_binding): Do not allow typedefs to be
1227 redefined in class scope.
1230 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1231 redefinitions of builtin types other that "bool" or "wchar_t".
1233 2004-11-24 Steven Bosscher <stevenb@suse.de>
1235 * decl.c (cxx_init_decl_processing): Don't clear
1236 flag_inline_functions.
1238 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1240 * pt.c (tsubst_function_type): Do not permit function types which
1241 return arrays or functions.
1244 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1247 * cp-tree.h (CTOR_NAME): Remove.
1248 (DTOR_NAME): Remove.
1249 * decl.c (initialize_predefined_identifiers): Add spaces to the
1250 end of constructor and destructor names.
1252 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1255 * decl.c (start_decl): Check for invalid specialization headers.
1257 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
1261 * call.c (standard_conversion): Move check for conversions between
1263 * typeck.c (ptr_reasonably_similar): ... here.
1265 2004-11-23 Ben Elliston <bje@au.ibm.com>
1267 * cp-tree.h (context_as_string): Remove extern.
1268 * error.c (context_as_string): Remove.
1270 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
1271 * lex.c (cp_type_qual_from_rid): Remove.
1273 * cp-tree.h (do_poplevel): Remove extern.
1274 (check_multiple_declarators): Likewise.
1275 * semantics.c (do_poplevel): Make static.
1276 (check_multiple_declarators): Remove.
1278 * cp-tree.h (check_final_overrider): Remove extern.
1279 * search.c (check_final_overrider): Make static.
1281 * cp-tree.h (build_artificial_parm): Remove extern.
1282 * decl2.c (build_artificial_parm): Make static.
1284 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1287 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
1288 Make sure the result is always a rvalue.
1290 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1292 * decl.c (start_preparsed_function): Call check_function_type even
1294 (require_complete_types_for_parms): Skip dependent types.
1295 (check_function_type): Likewise.
1297 2004-11-16 Steven Bosscher <stevenb@suse.de>
1299 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
1300 * search.c: Don't include it.
1302 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
1304 * cp-gimplify.c: Include pointer-set.h
1305 (cp_genericize_r): Use pointer_sets instead of a hashtable.
1306 Also instert the new statement for CLEANUP_STMT.
1307 (cp_genericize): Use pointer_sets instead of a hashtable.
1308 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
1310 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1312 Friend class name lookup 1/n, PR c++/18471
1313 * decl.c (lookup_and_check_tag): New function.
1314 (xref_tag, start_enum): Use it.
1315 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
1316 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
1318 * name-lookup.c (lookup_name_current_level): Rename to ...
1319 (lookup_name_innermost_nonclass_level): ... this.
1320 (lookup_type_scope): New function.
1321 * name-lookup.h (lookup_name_current_level): Rename to ...
1322 (lookup_name_innermost_nonclass_level): ... this.
1323 (lookup_type_scope): Add declaration.
1325 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1328 * pt.c (coerce_template_parms): Only emit error message about
1329 invalid template argument when TF_ERROR.
1331 2004-11-12 Mark Mitchell <mark@codesourcery.com>
1334 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
1335 error_mark_node to indicate errors.
1338 * parser.c (cp_parser_direct_declarator): Disallow non-constant
1339 array bounds when not inside a function.
1342 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
1343 unqualified name resolves to a member function.
1346 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
1347 derived class correctly.
1349 * decl2.c (import_export_decl): Fix typo in comment.
1350 * tree.c (pod_type_p): Likewise.
1352 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
1354 * typeck.c (cxx_mark_addressable): Add braces around the first if.
1356 2004-11-10 Adam Nemet <anemet@lnxw.com>
1359 * typeck.c (cxx_mark_addressable): Issue an error if address of an
1360 explicit register variable is requested.
1362 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
1365 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
1366 (struct lang_decl_flags): Add thunk_p flag.
1367 (struct lang_decl): Remove separate fixed_offset. Place
1368 cloned_function and fixed_offset into union.
1369 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
1370 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
1371 (THUNK_FIXED_OFFSET): Adjust.
1372 * method.c (make_thunk): Adjust.
1374 2004-11-09 Mark Mitchell <mark@codesourcery.com>
1377 * init.c (build_new_1): Handle parenthesized type-ids that name an
1380 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1382 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
1383 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
1384 quoting in diagnostics.
1385 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
1386 quoting in printf format.
1387 * decl.c (duplicate_decls, start_decl): Use %qD instead of
1390 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1392 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
1393 search.c, typeck2.c: Fix comment formatting.
1395 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
1397 PR tree-optimization/18184
1398 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
1399 of different modes or alias-all flags as equivalent.
1400 * typeck.c (comptypes): Likewise.
1402 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1405 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
1406 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
1407 TYPE_REFFN_P): Document.
1408 (fold_decl_constant_value): New prototype.
1409 * pt.c (convert_nontype_argument_function): Rewrite and extract
1411 (fold_decl_constant_value, convert_nontype_argument_function): New.
1412 (lookup_template_class): Add comment about useless double call.
1413 * mangle.c (write_expression): Strip conversions before lowering
1415 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1416 enum to enum conversion.
1418 2004-11-02 Mark Mitchell <mark@codesourcery.com>
1421 * parser.c (cp_parser_type_parameter): Robustify.
1424 * parser.c (cp_parser_single_declaration): Disallow template
1428 * typeck.c (build_const_cast): Use error_operand_p.
1430 2004-11-02 Ziemowit Laski <zlaski@apple.com>
1432 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1433 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1434 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1436 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1438 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1440 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
1443 * search.c (check_final_overrider): Deprecate gnu covariant extension.
1445 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1447 Convert diagnostics to use quoting flag q 9/n
1448 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
1449 get_delta_difference): Use new quotation style.
1450 * repo.c (reopen_repo_file_for_write): Likewise.
1451 * pt.c (do_type_instantiation): Likewise.
1452 * parser.c (cp_parser_diagnose_invalid_type_name):
1453 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
1454 * error.c (cp_print_error_function,
1455 print_instantiation_full_context): Likewise.
1456 * decl.c (define_label, grok_reference_init,
1457 maybe_deduce_size_from_array_init, revert_static_member_fn):
1458 * decl2.c (check_classfn): Likewise.
1459 * class.c (add_method, check_field_decls, layout_class_type,
1460 resolve_address_of_overloaded_function): Likewise.
1461 * call.c (build_x_va_arg, build_over_call): Likewise.
1463 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1465 Convert diagnostics to use quoting flag q 8/n
1466 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
1467 convert_to_reference, ocp_convert, convert_to_void
1468 cp_convert_to_pointer): Use new quotation style.
1470 2004-10-31 Mark Mitchell <mark@codesourcery.com>
1473 * typeck2.c (store_init_value): Use split_nonconstant_init even
1474 for types that require construction.
1476 1004-10-28 Matt Austern <austern@apple.com>
1479 * cp-tree.h (class_key_or_enum_as_string): Declare.
1480 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1481 and remove static qualifier.
1482 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1483 union/enum declaration.
1485 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
1487 * pt.c: Fix a comment typo.
1489 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
1491 * typeck.c (composite_pointer_type): Remove comment about DR 195.
1492 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1493 warning when being pedantic.
1494 (build_reinterpet_cast, build_c_cast): Adjust.
1496 2004-10-29 Mark Mitchell <mark@codesourcery.com>
1499 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1500 appear in a constructor/destructor that will be cloned.
1502 1004-10-28 Matt Austern <austern@apple.com>
1505 * decl.c (finish_enum): Handle packed attribute.
1506 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1508 2004-10-28 Mark Mitchell <mark@codesourcery.com>
1511 * pt.c (instantiate_class_template): Increment
1512 processing_template_decl when substituting into a member class
1515 2004-10-27 Mark Mitchell <mark@codesourcery.com>
1518 * call.c (convert_like_real): Fix formatting.
1519 (initialize_reference): When binding a temporary to a base class,
1520 ensure that the nominal copy made is to the derived class, not the
1524 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1527 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1529 * decl.c (bad_specifiers): Move the q after the %.
1531 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1533 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1536 2004-10-26 Mark Mitchell <mark@codesourcery.com>
1538 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1539 * search.c (current_scope): Fix prototype.
1542 * search.c (current_scope): Return the innermost non-block scope,
1543 not the innermost non-block, non-namespace scope.
1544 (at_namespace_scope_p): Adjust accordingly.
1545 (dfs_accessible_post): Do not pass namespaces to is_friend.
1546 (dfs_walk_once_accessible_r): Likewise.
1547 * decl.c (grokvardecl): Adjust call to current_scope.
1548 (build_enumerator): Likewise.
1549 * parser.c (cp_parser_using_declaration): Likewise.
1550 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1552 (cp_parser_class_head): Adjust call to current_scope.
1553 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1557 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1558 their underlying values.
1561 * typeck.c (build_binary_op): Honor build_type, even when in a
1564 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
1566 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1567 padding token checking.
1569 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
1572 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1573 layout_type as it is already done by create_array_type_for_decl.
1575 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
1578 * parser.c (eof_token): Make const, correctly initialize rid and
1580 (struct cp_lexer): Replace buffer_end pointer with buffer_length
1582 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
1584 (cp_lexer_new_from_tokens): Adjust.
1585 (cp_lexer_grow_buffer): Remove.
1586 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1587 cp_lexer_purge_token): Add const casts.
1589 2004-10-21 Mark Mitchell <mark@codesourcery.com>
1593 * cp-tree.h (convert_to_base): Change prototype.
1594 (build_ptrmemfunc): Likewise.
1595 (convert_ptrmem): New function.
1596 * call.c (struct conversion): Adjust documentation for base_p.
1597 (standard_conversion): Set base_p for ck_pmem conversions as
1599 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1601 * class.c (convert_to_base): Handle both pointers and objects.
1602 Add nonnull parameter.
1603 (build_vfield_ref): Adjust call to convert_to_base.
1604 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1605 (convert_force): Likewise.
1606 * typeck.c (build_unary_op): Likewise.
1607 (convert_ptrmem): New function.
1608 (build_static_cast_1): Use it.
1609 (build_reinterpret_cast): Allow conversions to vector types.
1610 (get_delta_difference): Add c_cast_p parameter.
1611 (build_ptrmemfunc): Likewise. Adjust calls to
1612 get_delta_difference.
1614 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
1617 * error.c (cp_error_at): Output the context as it might be
1618 different file as the other location.
1620 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
1622 * typeck.c: Fix a comment typo.
1624 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1627 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1628 * cp-tree.h (make_unbound_class_template): Adjust prototype.
1629 * parser.c (cp_parser_lookup_name): Adjust call to
1630 make_unbound_class_template.
1631 (cp_parser_single_declaration): Handle member class of class
1632 template as template friend parsing correctly.
1633 * friend.c (is_friend): Call is_specialization_of_friend for
1634 template friend class.
1635 (make_friend_class): Handle member class of class template as
1637 * pt.c (is_specialization_of_friend): Likewise.
1638 (instantiate_class_template): Likewise.
1639 (tsubst): Adjust call to make_unbound_class_template.
1641 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1643 * typeck.c (composite_pointer_type): Add comment about DR 195
1644 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1645 Allow function pointer conversions that DR195 suggests.
1646 (build_reinterpret_cast, build_c_cast): Update
1647 build_reinterpret_cast_1 calls.
1649 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
1651 * call.c, typeck.c: Fix comment typos.
1653 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1655 * parser.c (cp_token_position): New typedef. Define VEC thereof.
1656 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1657 next_token and last_token cp_token_position. Make saved_tokens a
1658 VEC(cp_token_position).
1659 (eof_token): New static variable.
1660 (CP_SAVED_TOKENS_SIZE): Rename to ...
1661 (CP_SAVED_TOKEN_STACK): ... here.
1662 (cp_lexer_new_main): Adjust main lexer creation and buffer
1664 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1665 to the parent buffer. Do not append eof token.
1666 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1668 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1669 (cp_lexer_token_position, cp_lexer_token_at): New.
1670 (cp_lexer_saving_tokens): Adjust. Make inline.
1671 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1672 (cp_lexer_peek_token_emit_debug_info): Fold into ...
1673 (cp_lexer_peek_token): ... here.
1674 (cp_lexer_peek_nth_token): Don't peek past EOF.
1675 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1677 (cp_lexer_purge_token): Adjust eof setting.
1678 (cp_lexer_purge_tokens_after): Likewise.
1679 (cp_lexer_save_tokens): Push next_token directly.
1680 (cp_lexer_commit_tokens): Adjust.
1681 (cp_lexer_rollback_tokens): Pop next_token directly.
1682 (cp_parser_check_for_invalid_template_id): Adjust token purging.
1683 (cp_parser_translation_unit): Do not consume the EOF.
1684 (cp_parser_nested_name_specifier_opt): Adjust token purging.
1685 (cp_parser_template_id, cp_parser_template_name): Likewise.
1687 2004-10-19 Mark Mitchell <mark@codesourcery.com>
1690 * call.c (struct conversion): Add base_p.
1691 (convert_like): Add c_cast_p argument.
1692 (convert_like_with_conversion): Likewise.
1693 (build_conv): Clear base_p.
1694 (standard_conversion): Set it, for derived-to-base conversions.
1695 (convert_like_real): Add c_cast_p parameter. Handle pointer
1696 conversions directly rather than relying on ocp_convert.
1697 (perform_direct_initialization_if_possible): Add c_cast_p
1699 * cp-tree.h (perform_direct_initialization_if_possible): Change
1701 (convert_member_func_to_ptr): New function.
1702 * typeck.c (check_for_casting_away_constness): Add diag_fn
1704 (build_static_cast_1): New function, split out from ...
1705 (build_static_cast): ... here. Use build_static_cast_1.
1706 (build_reinterpret_cast_1): New function, split out from ...
1707 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
1708 (build_const_cast_1): New function, split out from ...
1709 (build_const_cast): ... here. Use build_const_cast_1.
1710 (build_c_cast): Rewrite to use build_const_cast_1,
1711 build_static_cast_1, and build_reinterpret_cast_1.
1712 (convert_member_func_to_ptr): New function.
1714 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
1717 * parser.c (enum cp_parser_prec): Give relational expressions
1718 a higher precedence than equality expressions.
1720 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
1722 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
1723 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
1724 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
1725 (enum base_access): Reorganize.
1726 (accessible_base_p, accessible_p): Add consider_local_p parameter.
1727 * call.c (standard_conversion): Update comment about
1729 (enforce_access): Adjust accessible_p call.
1730 (build_over_call): Adjust accessible_base_p call.
1731 * class.c (convert_to_base): Adjust lookup_base call.
1732 (build_vtbl_ref_1): Likewise.
1733 (warn_about_ambiguous_bases): Likewise. Add early exit.
1734 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
1735 * search.c (accessible_base_p): Add consider_local_p parameter.
1736 (lookup_base): Pass consider_local_p to accessible_base_p call.
1737 (friend_accessible_p): Check whether scope is a class member.
1738 Remove unnecessary class template check.
1739 (accessible_p): Add consider_local_p parameter. Use it.
1740 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
1741 * tree.c (maybe_dummy_object): Likewise.
1742 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
1743 (build_class_member_access_expr): Adjust lookup_base call.
1744 * typeck2.c (binfo_or_else): Likewise.
1745 * rtti.c (build_dynamic_cast_1): Access can consider friendship
1748 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1751 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
1753 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1756 * parser.c (cp_parser_parenthesized_expression_list): Fold
1757 non-dependent expressions in attribute lists.
1759 2004-10-15 Mark Mitchell <mark@codesourcery.com>
1762 * decl.c (declare_global_var): Use the return value from pushdecl.
1765 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
1766 type names if we have already found a valid type.
1767 (cp_parser_member_declaration): Likewise.
1770 * parser.c (cp_parser_member_specification_opt): Handle
1773 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1775 * dump.c, g++spec.c, repo.c: Update copyright.
1777 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1779 * decl.c: Fix a comment typo.
1781 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1784 * name-lookup.c (parse_using_directive): If we have a
1785 error_mark_node, do not set the decl namespace associations
1788 2004-10-14 Mark Mitchell <mark@codesourcery.com>
1791 * decl.c (cp_finish_decl): Do not call expand_static_init more
1792 than once for a single variable.
1794 2004-10-14 Matt Austern <austern@apple.com>
1796 * Make-lang.in (pt.o): depends on pointer-set.h
1797 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
1798 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
1799 (for_each_template_parm): Convert from htab_t to pointer_set_t.
1800 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
1802 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1805 * semantics.c (finish_for_expr): Convert expression to void
1806 so that we don't create temporaries for a?b:c.
1808 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
1810 * search.c: Fix a comment typo.
1812 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
1814 * class.c (dfs_modify_vtables): Simplify condition. Return
1815 dfs_skip_bases as appropriate.
1816 (modify_all_vtables): Walk in pre-order.
1817 * search.c (dfs_walk_all, dfs_walk_once_r,
1818 dfs_walk_once_accessible_r): Assert post order function never
1819 returns dfs_skip_bases.
1821 * search.c (struct lookup_base_data_s): New.
1822 (lookup_base_r): Replace with ...
1823 (dfs_lookup_base): ... this.
1824 (lookup_base): Use dfs_walk_all.
1826 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
1828 * search.c: Fix comment typos.
1830 2004-10-11 Mark Mitchell <mark@codesourcery.com>
1833 * parser.c (cp_parser_declarator): Add member_p parameter.
1834 (cp_parser_condition): Adjust calls to cp_parser_declarator.
1835 (cp_parser_explicit_instantiation): Likewise.
1836 (cp_parser_init_declarator): Likewise.
1837 (cp_parser_direct_declarator): Add member_p parameter. Do not
1838 parse tentatively when parsing the parameters to a member.
1839 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1840 (cp_parser_parameter_declaration): Likewise.
1841 (cp_parser_member_declaration): Likewise.
1842 (cp_parser_exception_declaration): Likewise.
1845 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1846 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1847 for members of partial or explicit specializations.
1850 * decl2.c (finish_anon_union): Robustify.
1852 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
1854 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1855 (dcast_base_hint): ... here.
1856 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1857 * search.c (struct dcast_data_s): New.
1858 (dynamic_cast_base_recurse): Remove. Replace with ...
1859 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1860 (get_dynamic_cast_base_type): Rename to ...
1861 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
1862 (accessible_r): Remove.
1863 (dfs_accessible_post): New, broken out of accessible_r.
1864 (accessible_p): Use dfs_walk_once_accessible.
1865 (dfs_walk_once_accessible_r): New. From accessible_r.
1866 (dfs_walk_once_accessible): New. From acessible_p.
1868 * cp-tree.h (SAME_BINFO_TYPE_P): New.
1869 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1871 (convert_to_base_statically, determine_primary_bases,
1872 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1873 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1874 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1875 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1876 * init.c (expand_member_init): Likewise.
1877 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1878 binfo_via_virtual, copied_binfo, binfo_for_vbase,
1879 original_binfo): Likewise.
1880 * tree.c (copy_binfo): Likewise.
1882 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
1884 * semantics.c: Fix comment typos.
1886 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1891 * semantics.c (maybe_cleanup_point_expr): Call
1892 fold_build_cleanup_point_expr.
1893 (maybe_cleanup_point_expr_void): New function.
1894 (add_decl_expr): Call maybe_cleanup_point_expr_void.
1895 (finish_expr_stmt): Likewise.
1896 (finish_return_stmt): Likewise.
1897 (finish_for_expr): Likewise.
1898 (finish_asm_stmt): Likewise.
1899 * typeck.c (condition_conversion): Call
1900 fold_build_cleanup_point_expr.
1902 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1905 * semantics.c (add_decl_expr): If the decl has a size which
1906 has side effects then the decl expression needs a cleanup point.
1908 2004-10-10 Mark Mitchell <mark@codesourcery.com>
1911 * decl.c (grokdeclarator): Robustify error-recovery on invalid
1914 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1916 Convert diagnostics to use quoting flag q 7/n
1917 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1918 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
1919 string_conv_p, build_class_member_access_expr,
1920 build_class_member_access_expr, lookup_destructor,
1921 finish_class_member_access_expr, build_indirect_ref,
1922 get_member_function_from_ptrfunc, build_function_call,
1923 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
1924 check_for_casting_away_constness, build_static_cast,
1925 build_reinterpret_cast, build_const_cast, build_c_cast,
1926 build_modify_expr, get_delta_difference, build_ptrmemfunc,
1927 dubious_conversion_warnings, convert_for_assignment,
1928 convert_for_initialization,
1929 maybe_warn_about_returning_address_of_local, check_return_expr):
1932 * typeck2.c (error_not_base_type, readonly_error,
1933 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
1934 store_init_value, digest_init, build_x_arrow,
1935 build_m_component_ref, require_complete_eh_spec_types): Likewise.
1937 * tree.c (cp_build_qualified_type_real,
1938 handle_java_interface_attribute, handle_init_priority_attribute):
1941 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
1942 finish_pseudo_destructor_expr,
1943 check_template_template_default_arg, begin_class_definition,
1944 finish_base_specifier, qualified_name_lookup_error,
1945 finish_id_expression, finish_typeof): Likewise.
1947 * search.c (lookup_base, check_final_overrider,
1948 look_for_overrides_r): Likewise.
1950 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1952 2004-10-09 Mark Mitchell <mark@codesourcery.com>
1955 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1959 * init.c (build_new): Correct comments.
1960 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1964 * parser.c (cp_parser_postfix_dot_deref_expression): If the
1965 pseduo-destructor-name production does not work, fall back to the
1966 ordinary production.
1969 * tree.c (cp_tree_equal): Handle a BASELINK.
1972 * cp-tree.h (check_var_type): New function.
1973 * decl.c (check_var_type): New function, split out from ...
1974 (grokdeclarator): ... here.
1975 * pt.c (tsubst_decl): Use check_var_type.
1978 * decl.c (grokdeclarator): Disallow declarations of operators as
1981 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1984 * error.c (dump_expr): Add missing case for RDIV_EXPR.
1986 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
1988 * pt.c, search.c: Fix comment typos.
1990 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
1992 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
1994 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
1995 * class.c (struct find_final_overrider_data): Remove most_derived,
1996 vpath_list and vpath fields. Add path field.
1997 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
1998 (dfs_find_final_overrider): Rename to ...
1999 (dfs_find_final_overrider_pre): ... here. Adjust.
2000 (dfs_find_final_overrider_post): Adjust.
2001 (dfs_find_final_overrider_q): Fold into
2002 dfs_find_final_overrider_pre.
2003 (find_final_overrider): Adjust dfs searching.
2004 (dfs_modify_vtables): Don't mark binfo here.
2005 (modify_all_vtables): Use dfs_walk_once.
2006 (build_vtt_inits): Likwise. Use dfs_walk_all.
2007 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2008 Return dfs_skip_bases as appropriate.
2009 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2010 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2011 appropriate. Don't mark binfo here.
2012 (initialize_vtbl_ptrs): Use dfs_walk_once.
2013 * search.c (struct vbase_info): Remove unused struct.
2014 (access_in_type): Use dfs_walk_once.
2015 (dfs_access_in_type): Don't mark binfo here.
2016 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2018 (accessible_r): ... here. New. Specialize dfs_walk_once.
2019 (accessible_p): Use accessible_r.
2020 (lookup_field_queue_p): Remove. Fold into ...
2021 (lookup_field_r): ... here. Adjust.
2022 (lookup_member): Use dfs_walk_all.
2023 (dfs_walk_real, dfs_walk): Replace with ...
2024 (dfs_walk_all, dfs_walk_once): ... these.
2025 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2026 (dfs_unmark, unmarkedp, markedp): Remove.
2027 (dfs_get_pure_virtuals): Don't mark binfo here.
2028 (get_pure_virtuals): Use dfs_walk_once.
2029 (dfs_debug_unmarked_p): Remove. Fold into ...
2030 (dfs_debug_mark): ... here.
2031 (note_debug_info_needed): Use dfs_walk_all.
2033 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2035 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2036 CLEANUP_POINT_EXPR to get the asm expression.
2038 2004-10-07 Mark Mitchell <mark@codesourcery.com>
2040 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2041 (DECL_MEMBER_TEMPLATE_P): New macro.
2042 (is_member_template): Remove.
2043 (class_method_index_for_fn): New function.
2044 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2045 * class.c (finish_struct_methods): Remove out-of-date comment.
2046 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2047 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2048 class_method_index_for_fn.
2049 * pt.c (is_member_template): Remove.
2050 (is_member_template_class): Likewise.
2051 (optimize_specialization_lookup_p): New function.
2052 (retrieve_specialization): Optimize lookups for members that are
2053 not member templates.
2054 (register_specialization): Adjust accordingly.
2055 (build_template_decl): Add member_template_p parameter. Set
2056 DECL_MEMBER_TEMPLATE_P.
2057 (process_partial_specialization): Adjust call to
2058 retrieve_specialization.
2059 (push_template_decl_real): Determine whether the template is a
2061 (lookup_template_class): Use retrieve_specialization.
2062 (tsubst_decl): Adjust call to retrieve_specialization.
2063 (tsubst_exception_specification): New function.
2065 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2066 (instantiate_template): Adjust call to retrieve_specialization.
2067 (regenerate_decl_from_template): Do not actually generate a new
2069 (instantiate_decl): Adjust call to retrieve_specialization.
2070 (class_method_index_for_fn): New method.
2072 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2074 * parser.c (cp_parser_asm_definition): Look passed the
2075 CLEANUP_POINT_EXPR to get the asm expression.
2077 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
2080 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2083 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2085 Convert diagnostics to use quoting flag q 6/n
2086 * pt.c (finish_member_template_decl, check_specialization_scope,
2087 maybe_process_partial_specialization, determine_specialization,
2088 check_explicit_specialization, maybe_check_template_type,
2089 process_partial_specialization, check_default_tmpl_args,
2090 push_template_decl_real, redeclare_class_template,
2091 convert_nontype_argument, coerce_template_parms,
2092 lookup_template_class, push_tinst_level,
2093 instantiate_class_template, tsubst_arg_types,
2094 tsubst_function_type, tsubst, tsubst_qualified_id,
2095 tsubst_copy_and_build, check_instantiated_args,
2096 do_decl_instantiation, do_type_instantiation,
2097 invalid_nontype_parm_type_p, check_specialization_namespace,
2098 convert_template_argument, determine_specialization,
2099 check_template_shadow, tsubst_decl
2100 instantiate_pending_templates): Use quoting marks.
2102 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
2105 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2106 unqualified lookup finds a member function.
2108 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2110 Convert diagnostics to use quoting flag q 5/n
2111 * parser.c (cp_parser_name_lookup_error,
2112 cp_parser_diagnose_invalid_type_name,
2113 cp_parser_primary_expression, cp_parser_unqualified_id,
2114 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2115 cp_parser_jump_statement, cp_parser_simple_declaration,
2116 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2117 cp_parser_type_parameter, cp_parser_template_id,
2118 cp_parser_template_name, cp_parser_direct_declarator,
2119 cp_parser_parameter_declaration_list, cp_parser_class_head,
2120 cp_parser_base_specifier, cp_parser_lookup_name,
2121 cp_parser_late_parsing_default_args,
2122 cp_parser_optional_template_keyword
2123 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2124 cp_parser_check_access_in_redeclaration): Use quoting marks.
2126 * name-lookup.c (supplement_binding, pushdecl,
2127 check_for_out_of_scope_variable, validate_nonmember_using_decl,
2128 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2129 push_namespace, do_namespace_alias, do_using_directive,
2130 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2132 * method.c (use_thunk): Likewise.
2134 * lex.c (unqualified_name_lookup_error,
2135 unqualified_fn_lookup_error): Likewise.
2137 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2139 Convert diagnostics to use quoting flag q 4/n
2140 * except.c (decl_is_java_type, build_throw,
2141 is_admissible_throw_operand, check_handlers_1, check_handlers):
2142 Use quoting formats.
2143 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
2144 * init.c (sort_mem_initializers, emit_mem_initializers,
2145 member_init_ok_or_else, expand_member_init, is_aggr_type,
2146 build_offset_ref, build_java_class_ref): Likewise.
2148 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2150 Convert diagnostics to use quoting flag q 3/n
2151 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2152 redeclaration_error_message, lookup_label, check_goto,
2153 make_typename_type, make_unbound_class_template,
2154 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
2155 grok_reference_init, layout_var_decl, maybe_commonize_var,
2156 check_for_uninitialized_const_var, reshape_init_array,
2157 reshape_init, check_initializer, cp_finish_decl,
2158 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
2159 check_static_variable_definition, compute_array_index_type,
2160 create_array_type_for_decl, check_special_function_return_type,
2161 grokdeclarator, check_default_argument, grokparms,
2162 grok_ctor_properties, grok_op_properties,
2163 check_elaborated_type_specifier, xref_tag, finish_enum,
2164 build_enumerator, check_function_type, start_preparsed_function,
2165 store_parm_decls): Use quoting formats.
2166 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
2167 check_java_method, check_classfn, finish_static_data_member_decl,
2168 grokfield, grokbitfield, grok_function_init,
2169 build_anon_union_vars, coerce_new_type, coerce_delete_type,
2170 check_default_args): Likewise.
2171 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2173 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2175 Convert diagnostics to use quoting flag q 2/n
2176 * class.c (build_base_path, add_method, alter_access,
2177 handle_using_decl, check_bases,
2178 maybe_warn_about_overly_private_class, find_final_overrider,
2179 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2180 check_bitfield_decl, check_field_decls, layout_empty_base,
2181 build_base_field, check_methods, layout_virtual_bases,
2182 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2183 resolve_address_of_overloaded_function, instantiate_type,
2184 note_name_declared_in_class): Use format flag "q" for quoting.
2186 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2188 Convert diagnostics to use quoting flag q 1/n
2189 * error.c (locate_error): Ignore quoting flag q.
2190 * call.c (build_user_type_conversion_1, build_operator_new_call,
2191 build_object_call, op_error, build_conditional_expr,
2192 build_new_op, build_op_delete_call, enforce_access,
2193 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2194 convert_default_arg, build_over_call, build_new_method_call,
2195 joust, perform_implicit_conversion, initialize_reference): Use the
2198 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
2201 * typeck.c (build_reinterpret_cast): Return if the inner type
2204 2004-10-01 Jan Hubicka <jh@suse.cz>
2206 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2208 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
2210 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2211 turning operator_code and fixed_offset into bitfields.
2213 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
2215 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2217 2004-09-29 Jason Merrill <jason@redhat.com>
2219 PR tree-optimization/17697
2220 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2222 2004-09-28 Jason Merrill <jason@redhat.com>
2225 * class.c (build_base_field): Set TYPE_MODE.
2227 2004-09-28 Roger Sayle <roger@eyesopen.com>
2230 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2231 than -lc and -lm, may require linking against libstc++.
2233 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
2235 * tree.c: Fix a comment typo.
2237 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
2239 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2240 (struct secondary_vptr_vtt_init_data_s): New.
2241 (build_vtt_inits): Adjust dfs_walkers.
2242 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2243 secondary_vptr_vtt_init_data_s structure. Adjust.
2244 (dfs_ctor_vtable_bases_queue_p): Remove.
2245 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2247 * pt.c (struct get_template_base_data_s): Remove.
2248 (get_template_base_r): Fold into get_template_base.
2249 (get_template_base): Walk base binfos directly in inheritance
2252 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2255 * cp-tree.h (fold_if_not_in_template): New function.
2256 * call.c (build_conditional_expr): Use fold_if_not_in_template.
2257 (build_cxx_call): Likewise.
2258 * cvt.c (convert_to_complex): Likewise.
2259 (ocp_convert): Likewise.
2260 (convert): Likewise.
2261 (convert_force): Likewise.
2262 * decl.c (compute_array_index_type): Clear
2263 processing_template_decl while folding array bounds.
2264 * pt.c (convert_nontype_argument): Clear
2265 processing_template_decl while processing non-type argument
2267 * tree.c (fold_if_not_in_template): New function.
2268 * typeck.c (build_class_member_access_expr): Use
2269 fold_if_not_in_template.
2270 (build_array_ref): Likewise.
2271 (build_binary_op): Likewise. Do not try to optimize computations
2272 when processing templates.
2273 (cp_pointer_int_sum): Use fold_if_not_in_template.
2274 (pointer_diff): Likewise.
2275 (build_unary_op): Likewise.
2276 (build_reinterpret_cast): Likewise.
2277 (get_delta_difference): Likewise.
2278 (expand_ptrmemfunc_cst): Likewise.
2279 (dubious_conversion_warnings): Likewise.
2281 2004-09-27 Matt Austern <austern@apple.com>
2283 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
2284 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
2285 tokens that come from headers that are implicitly extern "C".
2286 (struct cp_parser): new one-bit field, implicit_extern_c.
2287 (cp_parser_new): Set parser's implicit_extern_c to false.
2288 (cp_parser_translation_unit): Pop lang context if we were in a
2289 header that was implicitly extern "C".
2290 (cp_parser_declaration_seq_opt): Push/pop lang context as
2291 required by the token's and parser's implicit_extern_c.
2293 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2296 * cp-tree.h (shared_member_p): Declare.
2297 * search.c (shared_member_p): Give it external linkage.
2298 * semantics.c (finish_qualified_id_expr): Use it.
2299 (finish_id_expression): Likewise.
2302 * semantics.c (finish_id_expression): Do not add "this->" to
2303 static member functions.
2305 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
2308 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
2310 * class.c (struct count_depth_data): Remove.
2311 (dfs_depth_post, dfs_depth_q): Remove.
2312 (find_final_overrider): Use number of vbase classes as depth
2315 * cp-tree.h (types_overlap_p): Remove.
2316 * search.c (struct overlap_info): Remove.
2317 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
2319 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
2320 (get_template_base_recursive): Remove. Replace with ...
2321 (get_template_base_r): ... this.
2322 (struct get_template_base_data_s): New.
2323 (get_template_base): Use get_template_base_r via dfs_walk. Always
2324 return NULL on failure.
2325 (unify): Remove error_mark_node check from get_template_base result.
2327 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
2329 * parser.c (cp_parser_expression_stack): Clarify why it is
2330 an array of NUM_PREC_VALUES elements.
2331 (cp_parser_binary_expression): Clarify why we do not need to
2332 handle stack overflow.
2334 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
2337 * search.c (lookup_field_queue_p): Correct check for hidden base.
2339 * search.c (bfs_walk): Remove.
2340 (lookup_member): Use dfs_walk_real.
2341 (dfs_walk_real): Move and adjust documentation from bfs_walk.
2343 2004-09-23 Zack Weinberg <zack@codesourcery.com>
2345 * decl.c (grokfndecl): If ::main is found not to return int,
2346 correct it after issuing a diagnostic.
2347 (grokdeclarator): If the incoming type was error_mark_node, do
2348 not complain about declaring something with no type.
2349 (start_function): Change check for ::main not returning int to
2350 an assertion, as grokfndecl now catches this when the user did it.
2351 * init.c (perform_member_init, sort_mem_initializers)
2352 (emit_mem_initializers): Make most diagnostics be issued on
2353 the line of current_function_decl, not whatever the current
2355 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
2356 definition and declaration with #ifdef ENABLE_CHECKING.
2357 Avoid unnecessary use of fprintf.
2358 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
2359 definitions to avoid warnings.
2360 (cp_lexer_new_main): Add assertion that first token is not a
2362 (cp_lexer_new_from_token_array): Fold into ...
2363 (cp_lexer_new_from_tokens): ... here. Add assertion that
2364 first token is not a padding token.
2365 (cp_lexer_set_source_position_from_token): Move nearer to callers.
2366 Remove unused lexer argument.
2367 (cp_lexer_peek_token): Just print debugging report (if enabled)
2368 and return lexer->next_token.
2369 (cp_lexer_skip_purged_tokens): Delete.
2370 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
2371 inline, simplify bodies.
2372 (cp_lexer_peek_nth_token): Add debugging report a la
2373 cp_lexer_peek_token.
2374 (cp_lexer_consume_token): Correct commentary. Advance over
2375 purged tokens here. Set current source position here, from
2376 token to be returned. Avoid unnecessary use of fprintf.
2377 (cp_lexer_purge_token): Advance next_token pointer over this and
2378 subsequent purged tokens.
2379 (cp_parser_error): Adjust source position to that of the
2381 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
2382 (cp_parser_string_literal): Remove some excessive cleverness.
2383 (cp_parser_enum_specifier): Call start_enum before consuming
2385 (cp_parser_member_declaration): Make the "extra semicolon"
2386 diagnostic consistently-worded with the other place this is
2387 diagnosed. Explicitly set the diagnostic location to the
2388 location of the offending semicolon.
2389 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
2390 in diagnostics. Do not use cp_parser_require. Set location
2391 of diagnostics about improper use of '>>' to location of
2393 (cp_parser_late_parsing_for_member):
2394 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
2395 (cp_parser_late_parsing_default_args): Likewise. Manually
2396 move some logic outside the loop.
2398 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
2401 * cvt.c (cp_convert_to_pointer): Return early when the type is
2404 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
2408 * decl.c (grokfndecl): Add new argument "attrlist", use it
2409 to call cplus_decl_attributes.
2410 (start_function): Remove call to cplus_decl_attributes.
2411 * cvt.c (ocp_convert): Add support to use type conversion
2412 function to vector type.
2413 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2416 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
2420 * parser.c (cp_parser_token_tree_map_node,
2421 cp_parser_pm_expression, cp_parser_additive_expression,
2422 cp_parser_multiplicative_expression, cp_parser_shift_expression,
2423 cp_parser_relational_expression, cp_parser_equality_expression,
2424 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2425 cp_parser_inclusive_or_expression,
2426 cp_parser_logical_and_expression,
2427 cp_parser_logical_or_expression): Removed.
2428 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2429 binops, binops_by_token): New.
2430 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2431 (cp_parser_new): Initialize binops_by_token.
2432 (cp_parser_binary_expression): Rewritten.
2435 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
2437 * parser.c: Fix a comment typo.
2439 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
2442 * decl.c (xref_basetypes): Look through typedefs before checking
2445 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2447 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2448 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2449 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2450 (init_rtti_processing): Initialize it to something realistic.
2451 (get_tinfo_decl): Adjust pushing the new decl.
2453 * cp-tree.h (struct lang_type_class): Remove marked flags, add
2454 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
2455 (TYPE_MARKED_P): New.
2456 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2457 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2458 CLEAR_CLASSTYPE_MARKED_N): Remove.
2459 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2460 CLEAR_CLASSTYPE_MARKED_*): Remove.
2461 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2462 shaped and repeated base properties.
2463 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2464 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2465 class_hint_flags): Remove.
2466 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2467 CLASSTYPE_DIAMOND_SHAPED_P.
2469 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2471 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2473 (objcp_tsubst_copy_and_build): Reformat function signature.
2474 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2475 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2477 2004-09-21 Zack Weinberg <zack@codesourcery.com>
2479 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2480 Don't handle CPP_PRAGMA tokens specially.
2481 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
2482 purge the token; do clear token->value after processing. Add
2483 assertion at beginning that token->value is nonzero.
2484 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2485 CPP_PRAGMA as a full statement or declaration in its own right.
2487 2004-09-21 Matt Austern <austern@apple.com>
2490 * decl.c (grokvardecl): Accept declarations of global variables
2491 using anonymous types.
2493 2004-09-21 Roger Sayle <roger@eyesopen.com>
2496 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
2497 if either operand has side-effects.
2498 * typeck.c (rationalize_conditional_expr): Assert that neither
2499 operand of MIN_EXPR or MAX_EXPR has side-effects.
2500 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
2501 Check that the "lhs" is a valid lvalue, i.e. that neither operand
2502 of a MIN_EXPR or MAX_EXPR has a side-effect.
2504 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
2506 * cp-tree.h (struct lang_type_header): Remove
2507 uses_multiple_inheritance field.
2508 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2509 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2510 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2511 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2512 (TYPE_CONTAINS_VPTR_P): Likewise.
2513 * call.c (add_template_candidate_real): Use
2514 CLASSTYPE_VBASECLASSES.
2515 (build_special_member_call): Likewise.
2516 * class.c (finish_struct_bits): Remove
2517 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2519 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2520 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2522 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2523 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2525 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2526 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2528 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2529 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2530 * init.c (expand_member, push_base_cleanups): Likewise.
2531 * pt.c (instantiate_class_template): Remove
2532 TYPE_USES_MULTIPLE_INHERITANCE,
2533 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2535 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2537 * typeck2.c (process_init_constructor): Replace some sorrys with
2540 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
2542 * decl.c (reshape_init_array): Initialize max_index_cst to fix
2545 2004-09-20 Mark Mitchell <mark@codesourcery.com>
2548 * pt.c (tsubst): Fix parentheses to accomodate emacs.
2549 (tsubst_baselink): If we get a single function, mark it as used.
2551 2004-09-20 Matt Austern <austern@apple.com>
2552 Zack Weinberg <zack@codesourcery.com>
2554 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2555 Apply lbasename to input_filename before passing to get_fileinfo.
2556 * semantics.c (begin_class_definition): Likewise.
2557 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2558 correct filename. Rename variables to be less confusing.
2559 (handle_pragma_implementation): Likewise. Disable "appears
2560 after file is included" diagnostic.
2562 * parser.c (struct cp_token): Add in_system_header fiag.
2563 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2564 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2565 (CPP_NONE, cp_lexer_read_token): Delete.
2566 (struct cp_lexer): Remove first_token, string_tokens,
2567 main_lexer_p fields. Clarify comments.
2568 (struct cp_token_cache): Now just a pair of pointers.
2569 (CP_LEXER_BUFFER_SIZE): New #define.
2570 (CPP_PURGED): New fake token type.
2571 (cp_lexer_new_from_token_array, cp_lexer_destroy)
2572 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2573 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2575 (cp_lexer_new_from_tokens): Now a simple wrapper around
2576 cp_lexer_new_from_token_array.
2577 (cp_lexer_set_source_position_from_token): Also update
2579 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2581 (cp_lexer_token_difference): Dont handle wrapping round.
2582 (cp_lexer_new_main): Enable pragma deferral and raw strings,
2583 read the entire translation unit through c_lex_with_flags into
2584 this lexer's buffer, then turn raw strings back off again.
2585 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2586 (cp_lexer_get_preprocessor_token): No need to handle not being
2587 the main lexer. Set token->in_system_header too.
2588 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
2589 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
2590 (cp_lexer_peek_nth_token): Likewise.
2591 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2592 the other tokens down.
2593 (cp_lexer_purge_tokens_after): Likewise.
2594 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2595 about there being no tokens.
2596 (cp_lexer_print_token): Revise to give useful information on
2598 (struct cp_parser): Add field translate_strings_p.
2599 (cp_parser_new): Initialize it.
2600 (cp_parser_translation_unit): Destroy the lexer when done.
2601 (cp_parser_parameter_declaration): Restructure saving of
2603 (cp_parser_save_member_function_body): Likewise.
2604 (cp_parser_check_for_invalid_template_id)
2605 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2606 Adjust calls to cp_lexer_advance_token.
2607 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2608 No need to fiddle c_lex_string_translate.
2609 (cp_parser_primary_expression, cp_parser_linkage_specification)
2610 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2611 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2612 Use cp_parser_string_literal.
2613 (cp_parser_attribute_list): Save and restore
2614 parser->translate_strings_p, not c_lex_string_translate.
2615 (cp_parser_cache_group): Delete.
2616 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
2617 not take a cache argument.
2619 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2622 * decl.c (reshape_init): Extract array handling into...
2623 (reshape_init_array): New function. Use integers instead of trees
2624 for indices. Handle out-of-range designated initializers.
2626 2004-09-20 Steven Bosscher <stevenb@suse.de>
2628 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2631 2004-09-19 Mark Mitchell <mark@codesourcery.com>
2633 * decl2.c (determine_visibility): Allow class visibility
2634 directives to override targetm.cxx.export_class_data.
2636 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
2638 * call.c, semantics.c: Follow spelling conventions.
2639 * class.c: Fix a comment typo.
2641 2004-09-16 Geoffrey Keating <geoffk@apple.com>
2644 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2645 (handle_pragma_implementation): Likewise.
2647 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2648 Zack Weinberg <zack@codesourcery.com>
2650 * cp-tree.def: Use tree_code_class enumeration constants
2651 instead of code letters.
2652 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2653 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2654 Update for new tree-class enumeration constants.
2656 2004-09-16 Mark Mitchell <mark@codesourcery.com>
2659 * parser.c (cp_parser_simple_declaration): Commit to tentative
2660 parses after seeing a decl-specifier.
2661 (cp_parser_simple_declaration): Eliminate spurious message.
2662 (cp_parser_init_declarator): Adjust error message.
2665 * lex.c (unqualified_name_lookup_error): Mark the dummy
2666 declaration as used.
2669 * parser.c (cp_parser_nested_name_specifier): Do not resolve
2670 typename types if the user explicitly said "typename".
2672 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
2674 * error.c (dump_decl): Make sure there is lang_specific info before
2675 checking for DTOR and CTOR decls.
2677 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2679 * class.c (copy_virtuals): Remove.
2680 (build_primary_vtable): Use copy_list directly.
2681 (build_secondary_vtable): Likewise.
2682 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2683 (create_vtable_ptr): Likewise.
2685 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2687 * search.c: Follow spelling conventions.
2689 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2691 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2693 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
2695 * call.c (build_new_method_call): Don't confirm a pure virtual is
2696 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
2697 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
2698 (fixup_inline_methods, finish_struct): Likewise.
2699 * decl.c (finish_method): Likewise.
2700 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
2701 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
2702 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
2703 vector to avoid repeating the list in error messages.
2705 2004-09-15 Mark Mitchell <mark@codesourcery.com>
2707 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
2708 * cp-tree.h (cxx_comdat_group): Declare.
2709 * decl.c (cxx_comdat_group): New function.
2711 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
2713 * search.c (get_pure_virtuals): Remove unused variables.
2715 * cp-tree.h (struct lang_decl_flags): Remove
2716 needs_final_overrider.
2717 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
2718 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
2719 * class.c (finish_struct_bits): Correct comment about
2720 CLASSTYPE_PURE_VIRTUALS.
2721 * search.c (get_pure_virtuals): Remove useless loop.
2723 2004-09-14 Mark Mitchell <mark@codesourcery.com>
2726 * mangle.c (partially_mangled_name): New variable.
2727 (partially_mangled_name_len): Likewise.
2728 (save_partially_mangled_name): New function.
2729 (restore_partially_mangled_name): Likewise.
2730 (write_encoding): Save and restore partially mangled names around
2731 calls to get_mostly_instantiated_function_type.
2732 (write_unqualified_name): Likewise.
2734 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
2736 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
2738 2004-09-13 Mark Mitchell <mark@codesourcery.com>
2741 * parser.c (cp_parser_id_expression): Correct value for
2743 (cp_parser_nested_name_specifier_opt): Look through typenames as
2745 (cp_parser_template_name): Honor check_dependency_p.
2748 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
2752 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
2755 2004-09-12 Richard Henderson <rth@redhat.com>
2758 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
2759 * typeck.c (condition_conversion): Likewise.
2761 2004-09-11 Richard Henderson <rth@redhat.com>
2764 * pt.c (cur_stmt_expr): Move from tsubst_expr.
2765 (tsubst_expr) <case STMT_EXPR>: Move ...
2766 (tsubst_copy_and_build): ... here.
2768 2004-09-10 Zack Weinberg <zack@codesourcery.com>
2770 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
2771 comment explaining them moved to c-common.h.
2772 * lex.c (interface_only, interface_unknown, extract_interface_info):
2774 (cxx_finish): Don't reset interface_unknown.
2775 (handle_pragma_interface): Don't set interface_only and
2776 interface_unknown; just the like-named fields in finfo.
2777 (handle_pragma_implementation): Adjust comment.
2778 * decl2.c (cp_finish_file): Don't reset interface_only and
2780 * method.c (synthesize_method): Don't reset interface_unknown or
2781 call extract_interface_info.
2782 * pt.c (pop_tinst_level): Don't call extract_interface_info.
2783 * decl.c (start_cleanup_fn): Don't save or restore interface_only
2784 and interface_unknown.
2785 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
2786 and use the result instead of the interface_only/interface_unknown
2788 (start_preparsed_function): Likewise.
2789 * lex.c (cxx_make_type): Likewise.
2790 * semantics.c (begin_class_definition): Likewise.
2791 (expand_body): Don't call extract_interface_info.
2793 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2795 * decl.c (objc_mark_locals_volatile): Make description of
2796 routine more descriptive; only mark VAR_DECLs at each
2799 2004-09-10 Richard Henderson <rth@redhat.com>
2802 * call.c (build_vfield_ref): Move...
2803 * class.c (build_vfield_ref): ... here. Convert datum to the
2804 primary base containing the vptr.
2805 (make_new_vtable): Simplify build_primary_vtable arguments.
2806 (finish_struct_1): Do not duplicate TYPE_VFIELD.
2807 * typeck.c (build_class_member_access_expr): Don't warn for
2808 null object access to base fields.
2810 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2812 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
2813 New functions, to be called from ObjC++.
2815 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
2817 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
2818 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2821 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2823 * typeck.c (build_c_cast): Preserve the cast if casting
2824 to and from an Objective-C type.
2826 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2828 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2829 * typeck.c: Include c-common.h.
2830 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2831 return the result if nonnegative.
2833 2004-09-09 Zack Weinberg <zack@codesourcery.com>
2835 * decl2.c (import_export_class)
2836 * lex.c (handle_pragma_interface):
2837 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2839 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2841 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2842 * semantics.c: Include c-common.h.
2843 (finish_compound_stmt): Call objc_clear_super_receiver().
2845 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2847 * cp-tree.h (do_poplevel): New prototype.
2848 * semantics.c (do_poplevel): Make externally visible.
2850 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
2852 * cp-tree.h (tree_pair_s): Define a GC'd vector.
2853 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2854 * semantics.c (deferred_access): Likewise.
2856 2004-09-06 Daniel Jacobowitz <dan@debian.org>
2858 * semantics.c (expand_body): Assert that we are not nested.
2860 2004-09-06 Zack Weinberg <zack@codesourcery.com>
2862 * decl.c (build_enumerator): Use add_double and int_fits_type_p
2863 instead of cp_build_binary_op, to avoid creating short-lived trees.
2864 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2865 lookahead instead of backtracking. Move some code to avoid a
2867 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2868 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2869 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2870 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2872 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2874 * decl.c (grok_declarator): Remove a redundant semicolon.
2876 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2877 Correct comments describing function parameters.
2879 2004-09-03 Matt Austern <austern@apple.com>
2880 Compile speed improvement.
2881 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2882 Otherwise define a stub macro that expands to nothing.
2883 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
2884 define a stub macro that expands to 0.
2885 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2886 (cp_lexer_stop_debugging): Likewise.
2887 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
2888 define a stub macro that expands to NULL.
2889 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2890 (cp_lexer_new_from_tokens): Likewise.
2892 2004-09-03 Jan Hubicka <jh@suse.cz>
2894 * decl.c (finish_function): Clean out pointers we no longer need.
2896 2004-09-03 Jan Beulich <jbeulich@novell.com>
2898 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2901 2004-09-02 Paul Brook <paul@codesourcery.com>
2903 * decl2.c (determine_visibility): Only check data visibility
2906 2004-08-31 Mark Mitchell <mark@codesourcery.com>
2908 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2909 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2910 * decl2.c (determine_visibility): Honor
2911 TARGET_CXX_EXPORT_CLASS_DATA.
2913 * class.c (key_method): Rename to ...
2914 (determine_key_method): ... this.
2915 (finish_struct_1): Adjust accordingly.
2916 * cp-tree.h (key_method): Declare.
2917 * decl2.c (maybe_emit_vtables): Determine the key method here if
2918 it has not already been done.
2920 2004-08-31 Ziemowit Laski <zlaski@apple.com>
2922 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2923 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2924 (cp/cp-decl.c): Do not depend on gtype-cp.h.
2925 (cp/cp-objcp-common.o): New target.
2926 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2927 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2928 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2929 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2931 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2932 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2933 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2934 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2935 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2936 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2937 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2938 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2939 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2940 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2941 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2942 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2943 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2944 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2945 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2946 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2947 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2948 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2949 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2950 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2951 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2952 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2953 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2954 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2955 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2956 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2957 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2958 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2959 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2960 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2961 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2962 hooks to cp-objcp-common.h.
2963 (finish_file): New function.
2964 * cp-objcp-common.c: New file.
2965 * cp-objcp-common.h: New file.
2966 * cp-tree.h (cp_finish_file): New prototype.
2967 * decl.c: Do not include gtype-cp.h.
2968 * decl2.c (finish_file): Rename to cp_finish_file.
2970 2004-08-31 Richard Henderson <rth@redhat.com>
2973 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2974 (tsubst_copy_and_build): ... here.
2976 2004-08-30 Mark Mitchell <mark@codesourcery.com>
2978 * cp-tree.h (initialize_artificial_var): Declare.
2979 * decl.c (initialize_artifical_var): New function.
2980 * class.c (initialize_array): Remove.
2981 (initialize_vtable): Use initialize_artificial_var.
2982 (build_vtt): Likewise.
2983 (build_ctor_vtbl_group): Likewise.
2985 2004-08-30 Richard Henderson <rth@redhat.com>
2987 * class.c (build_base_path): Use build_address directly.
2988 * typeck.c (build_unary_op): Don't lower &a.b to pointer
2989 arithmetic directly.
2990 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
2991 means !initializer_constant_valid_p.
2993 2004-08-30 Richard Henderson <rth@redhat.com>
2995 * class.c (fixed_type_or_null): Use get_base_address before
2996 assuming an ADDR_EXPR is non-null.
2998 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3000 * name-lookup.c (pop_binding, pushdecl,
3001 set_identifier_type_value_with_scope, push_overloaded_decl,
3002 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3003 * parser.c (cp_parser_diagnose_invalid_type_name,
3004 cp_parser_postfix_expression, cp_parser_unary_expression,
3005 cp_parser_check_declarator_template_para): Likewise.
3006 * pt.c (push_inline_template_parms_recursive,
3007 check_explicit_specialization, convert_nontype_argument,
3008 coerce_template_template_parms, uses_template_parms,
3009 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3010 tsubst_expr, instantiate_template,
3011 maybe_adjust_types_for_deduction, type_unification_real,
3012 resolve_overloaded_unification, template_decl_level,
3013 type_dependent_expression_p): Likewise.
3014 * search.c (lookup_base_r): Likewise.
3015 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3016 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3017 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3018 * typeck.c (common_type, get_member_function_from_ptrfunc,
3019 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3020 * typeck2.c (cxx_incomplete_type_diagnostic,
3021 split_nonconstant_init_1, store_init_value,
3022 process_init_constructor): Likewise.
3024 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3026 * call.c (check_dtor_name): Replace abort with gcc_assert or
3028 (build_call, add_builtin_candidate, build_new_op,
3029 convert_like_real, build_over_call, in_charge_arg_for_name,
3030 source_type, joust): Likewise.
3031 * class.c (build_simple_base_path, get_vcall_index,
3032 finish_struct_1, instantiate_type, get_enclosing_class,
3033 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3034 * cp-gimplify.c (cp_genericize): Likewise.
3035 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3036 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3037 * decl.c (poplevel, make_unbound_class_template, reshape_init,
3038 check_special_function_return_type, grokdeclarator,
3039 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3040 finish_function): Likewise.
3041 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3042 * error.c (dump_global_iord, dump_decl, dump_template_decl,
3043 language_to_string): Likewise.
3044 * except.c (choose_personality_routine): Likewise.
3045 * friend.c (do_friend): Likewise.
3046 * g++spec.c (lang_specific_driver): Likewise.
3047 * init.c (build_zero_init, expand_default_init, build_new_1,
3048 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3049 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3050 * mangle.c (add_substitution, write_unscoped_name,
3051 write_template_prefix, write_identifier,
3052 write_special_name_destructor, write_type, write_builtin_type,
3053 write_expression, write_template_param,
3054 write_java_integer_type_codes): Likewise.
3055 * method.c (implicitly_declare_fn): Likewise.
3057 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3059 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3060 (BINFO_INDIRECT_PRIMARY_P): Remove.
3061 * class.c (determine_primary_base): Rename to ...
3062 (determine_primary_bases): ... here. Set all primary bases.
3063 (set_primary_base): Remove.
3064 (mark_primary_bases): Remove.
3065 (build_simple_base_path, walk_subobject_offsets,
3066 propagate_binfo_offsets, end_of_class): Adjust.
3067 (layout_class_type): Rename determine_primary_base call.
3068 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3070 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3071 build_rtti_vtbl_entries): Adjust.
3072 * init.c (build_vtbl_address): Adjust.
3074 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3076 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3078 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3079 CXX_AND_OBJCXX_OBJS.
3080 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3081 separately on the link line.
3083 2004-08-28 Jason Merrill <jason@redhat.com>
3085 * decl.c (expand_static_init): Avoid bogus warnings.
3087 2004-08-27 Jason Merrill <jason@redhat.com>
3090 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3093 * decl.c (expand_static_init): Use thread-safety API.
3094 (register_dtor_fn): Return the call, don't expand it.
3095 * tree.c (add_stmt_to_compound): New fn.
3096 (stabilize_call): Use it.
3098 2004-08-27 Richard Henderson <rth@redhat.com>
3100 * cp-tree.def (OFFSETOF_EXPR): New.
3101 * parser.c (cp_parser_builtin_offsetof): Either built an
3102 OFFSETOF_EXPR, or call fold_offsetof immediately.
3103 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3105 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3107 * call.c (validate_conversion_obstack): Replace
3108 my_friendly_assert with gcc_assert or gcc_unreachable.
3109 (direct_reference_binding, merge_conversion_sequences,
3110 build_user_type_conversion_1, perform_overload_resolution,
3111 build_op_delete_call, enforce_access, call_builtin_trap,
3112 build_over_call, build_special_member_call, build_new_method_call,
3113 initialize_reference): Likewise.
3114 * class.c (build_base_path, build_primary_vtable, alter_access,
3115 check_bases, update_vtable_entry_for_fn, layout_empty_base,
3116 clone_function_decl, adjust_clone_args,
3117 type_requires_array_cookie, include_empty_classes,
3118 finish_struct_1, resolve_address_of_overloaded_function,
3119 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3120 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3121 accumulate_vtbl_inits, build_vtbl_initializer,
3122 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3123 * cvt.c (build_up_reference, convert_to_reference): Likewise.
3124 * decl.c (poplevel, duplicate_decls, make_typename_type,
3125 cxx_init_decl_processing, reshape_init, check_initializer,
3126 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3127 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3128 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3129 xref_basetypes, start_preparsed_function, save_function_data,
3130 finish_function, finish_method, maybe_register_incomplete_var,
3131 complete_vars): Likewise.
3132 * decl2.c (grok_array_decl, check_member_template,
3133 check_classfn, finish_static_data_member_decl, coerce_new_type,
3134 coerce_delete_type, import_export_class, decl_needed_p,
3135 determine_visibility, import_export_decl, build_cleanup,
3136 start_static_initialization_or_destructi, do_static_destruction,
3137 prune_vars_needing_no_initialization,
3138 build_offset_ref_call_from_tree): Likewise.
3139 * error.c (dump_decl, dump_expr): Likewise.
3140 * init.c (finish_init_stmts, build_zero_init,
3141 expand_virtual_init, expand_default_init, expand_aggr_init_1,
3142 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
3144 * mangle.c (write_method_parms, write_template_args,
3145 write_expression, write_template_arg): Likewise.
3146 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3147 * name-lookup.c (pop_binding, begin_scope, leave_scope,
3148 resume_scope, push_using_decl, validate_nonmember_using_decl,
3149 is_ancestor, poplevel_class, set_inherited_value_binding_p,
3150 push_class_level_binding, do_class_using_decl, push_namespace,
3151 pop_namespace, add_using_namespace, ambiguous_decl,
3152 lookup_namespace_name, lookup_type_current_level,
3153 maybe_process_template_type_declaration): Likewise.
3154 * parser.c (cp_lexer_peek_nth_token,
3155 cp_parser_parse_and_diagnose_invalid_typ,
3156 cp_parser_translation_unit, cp_parser_template_id,
3157 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3158 * pt.c (push_access_scope, finish_member_template_decl,
3159 push_inline_template_parms_recursive, add_outermost_template_args,
3160 get_innermost_template_args, begin_explicit_instantiation,
3161 end_explicit_instantiation, retrieve_specialization,
3162 is_specialization_of, is_specialization_of_friend,
3163 register_specialization, check_explicit_specialization,
3164 comp_template_parms, process_template_parm,
3165 process_partial_specialization, convert_nontype_argument,
3166 coerce_template_template_parms, coerce_template_parms,
3167 mangle_class_name_for_template, lookup_template_function,
3168 lookup_template_class, instantiate_class_template, tsubst_decl,
3169 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3170 instantiate_template, fn_type_unification, type_unification_real,
3171 get_template_base, regenerate_decl_from_template,
3172 template_for_substitution, instantiate_decl,
3173 get_mostly_instantiated_function_type, dependent_scope_ref_p,
3174 value_dependent_expression_p, resolve_typename_type): Likewise.
3175 * repo.c (repo_emit_p): Likewise.
3176 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3177 create_tinfo_types, emit_tinfo_decl): Likewise.
3178 * search.c (lookup_base_r, lookup_base, lookup_field_1,
3179 dfs_access_in_type, build_baselink, lookup_member,
3180 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3181 * semantics.c (perform_or_defer_access_check,
3182 finish_non_static_data_member, finish_stmt_expr_expr,
3183 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3184 finish_template_template_parm, finish_member_declaration,
3185 emit_associated_thunks): Likewise.
3186 * tree.c (build_target_expr_with_type, force_target_expr,
3187 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3188 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3189 cxx_sizeof_or_alignof_type, perform_integral_promotions,
3190 build_class_member_access_expr, finish_class_member_access_expr,
3191 build_ptrmemfunc_access_expr, build_unary_op,
3192 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3193 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3194 * typeck2.c (complete_type_check_abstract,
3195 abstract_virtuals_error, process_init_constructor,
3196 add_exception_specifier): Likewise.
3198 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3200 * class.c (build_vtbl_initializer): Use ssize_int.
3201 * decl.c (complete_array_type): Likewise.
3202 * method.c (finish_thunk): Likewise.
3203 * search.c (get_dynamic_base_type): Likewise.
3205 2004-08-26 Richard Henderson <rth@redhat.com>
3207 * cp-tree.h (DECL_FIELD_IS_BASE): New.
3208 * class.c (build_base_field): Set it.
3209 (build_simple_base_path): Use it.
3210 (fixed_type_or_null): Don't consider base fields definitive.
3212 2004-08-25 Roger Sayle <roger@eyesopen.com>
3215 PR tree-optimization/16372
3216 * decl.c (finish_enum): Make the precision of the enumerated type
3217 the same width as the underlying integer type.
3219 2004-08-25 Mark Mitchell <mark@codesourcery.com>
3222 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3225 * mangle.c (get_identifier_nocopy): Add cast.
3227 * cp-tree.h (mangle_type): Remove.
3228 * mangle.c (globals): GTY it.
3229 (mangle_obstack): New variable.
3230 (name_obstack): Likewise.
3231 (name_base): Likewise.
3232 (write_char): Adjust accordingly.
3233 (write_chars): Likewise.
3234 (write_string): Likewise.
3235 (start_mangling): Initialize G.substitutions only one. Add
3237 (finish_mangling): Use VARRAY_CLEAR to reclaim
3238 storage in G.substitutions. Use obstack_finish.
3239 (init_mangle): Adjust for changes to variable names above.
3240 Initialize G.substitutions.
3241 (mangle_decl_string): Adjust call to start_mangling.
3242 (get_identifier_nocopy): New function.
3243 (mangle_decl): Use it.
3244 (mangle_type_string): Adjust call to start_mangling.
3245 (mangle_special_for_type): Likewise.
3246 (mangle_vtt_for_type): Likewise.
3247 (mangle_ctor_vtbl_for_type): Likewise.
3248 (mangle_thunk): Likewise.
3249 (mangle_guard_variable): Likewise.
3250 (mangle_ref_init_variable): Likewise.
3252 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3255 * pt.c (redeclare_class_template): Check the type of non-type and
3256 template template parameter.
3258 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3260 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
3261 (build_user_type_conversion_1, convert_like_real,
3262 build_java_interface_fn_ref, build_special_member_call): Likewise.
3263 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
3264 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3265 * cvt.c (cp_convert_to_pointer): Likewise.
3266 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3267 * decl2.c (start_static_initialization_or_destruction,
3268 generate_ctor_or_dtor_function): Likewise.
3269 * except.c (build_throw): Likewise.
3270 * mangle.c (write_integer_cst): Likewise.
3271 * method.c (finish_thunk): Likewise.
3272 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3273 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3274 get_pseudo_ti_init): Likewise.
3275 * search.c (get_dynamic_cast_base_type): Likewise.
3277 2004-08-25 Zack Weinberg <zack@codesourcery.com>
3279 * class.c, search.c: Remove references to DWARF_DEBUG.
3281 2004-08-25 Adam Nemet <anemet@lnxw.com>
3283 * repo.c (extract_string): Reset backquote after one character.
3284 (get_base_filename): Fix indentation.
3286 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3288 * decl.c (cxx_init_decl_processing): Adjust
3289 build_common_tree_nodes call.
3291 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3294 * (is_subobject_of_p): Resurrect & optimize.
3295 (lookup_field_r): Use it.
3297 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3300 * search.c (friend_accessible_p): Increment processing_template_decl
3301 when deal with TEMPLATE_DECL of SCOPE.
3303 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3306 * semantics.c (check_accessibility_of_qualified_id): Defer check
3307 if qualifying_type is a template parameter.
3309 2004-08-23 Mark Mitchell <mark@codesourcery.com>
3312 * pt.c (instantiate_decl): Do not try to apply
3313 DECL_DECLARED_INLINED_P to a VAR_DECL.
3315 * search.c (build_baselink): Fix typo in comment.
3317 2004-08-22 Andrew Pinski <apinski@apple.com>
3320 2004-08-22 Andrew Pinski <apinski@apple.com>
3322 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3323 expression is not constant.
3325 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3327 * name-lookup.c (pushdecl): Rename build_type_copy call.
3328 * tree.c (cp_build_qualified_type_real,
3329 build_exception_variant, handle_java_interface_attribute): Likewise.
3331 2004-08-22 Andrew Pinski <apinski@apple.com>
3334 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3335 expression is not constant.
3337 2004-08-20 Mark Mitchell <mark@codesourcery.com>
3340 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
3342 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
3345 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
3348 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3350 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
3351 before calling comp_template_args.
3353 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3355 * class.c (build_vtbl_initializer): Use build_int_cst for
3356 negative size types.
3357 * decl.c (complete_array_type): Likewise.
3358 * method.c (finish_thunk): Likewise.
3360 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
3362 * tree.c: Remove unused mark_local_for_remap_r.
3364 2004-08-19 Eric Christopher <echristo@redhat.com>
3366 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
3367 * tree.c (cxx_unsave_expr_now): Delete.
3368 (cp_unsave_r): Ditto.
3370 2004-08-19 Mark Mitchell <mark@codesourcery.com>
3373 * pt.c (push_template_decl_real): Disallow template allocation
3374 functions with fewer than two parameters.
3376 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3378 * cp-tree.h (build_shared_int_cst): Remove.
3379 * tree.c (shared_int_cache): Remove.
3380 (build_shared_int_cst): Remove.
3381 * class.c (finish_struct_1): Use build_int_cst.
3383 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3385 * decl.c (finish_enum): Do not copy value node early, copy
3387 * lex.c (cxx_init): Force null_node to be unique.
3389 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
3392 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
3393 from input for MODOP_EXPR.
3395 2004-08-18 Mark Mitchell <mark@codesourcery.com>
3397 * pt.c (dependent_template_p): Fix typo in commment.
3400 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
3403 2004-08-17 Mark Mitchell <mark@codesourcery.com>
3406 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
3407 arguments have the same type as the corresponding parameter.
3410 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
3411 is set use it for diagnostic purposes.
3412 (cp_parser_pseudo_destructor_name): Remove special-case error
3416 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3419 * cp-tree.h (qualified_name_lookup_error): Add parameter.
3420 * name-lookup.c (do_class_using_decl): Restrict set of entities
3421 passed to cp_emit_debug_info_for_using more carefully.
3422 (lookup_qualified_name): Allow lookup_member to return sets of
3424 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3425 (cp_parser_primary_expression): Handle ambiguous lookups.
3426 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3427 (cp_parser_template_argument): Likewise.
3428 (cp_parser_elaborate_type_specifier): Likewise.
3429 (cp_parser_namespace_name): Likewise.
3430 (cp_parser_class_name): Likewise.
3431 (cp_parser_lookup_name_simple): Likewise.
3432 * pt.c (tsubst_qualified_id): Handle ambiguous results.
3433 (tsubst_expr): Likewise.
3434 * semantics.c (qualified_name_lookup_error): Add decl paramter.
3435 For ambiguous lookups, print candidates.
3437 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3440 * pt.c (instantiate_pending_templates): Add int parameter. Don't
3442 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3443 * decl2.c (finish_file): Adjust call to
3444 instantiate_pending_templates.
3446 2004-08-15 Roger Sayle <roger@eyesopen.com>
3448 * call.c (build_vfield_ref, build_call, build_conditional_expr,
3449 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3450 build_java_interface_fn_ref, build_special_member_call,
3451 build_new_method_call, initialize_reference): Replace calls to
3452 build with calls to buildN.
3453 * class.c (build_base_path, convert_to_base_statically,
3454 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3455 build_vtbl_initializer): Likewise.
3456 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
3457 gimplify_if_stmt, cp_genericize_r): Likewise.
3458 * cvt.c (convert_to_void): Likewise.
3459 * decl.c (check_initializer, finish_constructor_body,
3460 finish_destructor_body): Likewise.
3461 * error.c (dump_expr): Likewise.
3462 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
3464 * init.c (perform_member_init, expand_virtual_init,
3465 expand_cleanup_for_base, build_init, expand_default_init,
3466 build_offset_ref, decl_constant_value, build_new, build_new_1,
3467 build_vec_delete_1, build_vec_init, build_delete,
3468 push_base_cleanups, build_vec_delete): Likewise.
3469 * mangle.c (write_integer_cst): Likewise.
3470 * method.c (thunk_adjust, do_build_copy_constructor,
3471 do_build_assign_ref): Likewise.
3472 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
3473 unify, build_non_dependent_expr): Likewise.
3474 * rtti.c (build_headof, build_typeid, ifnonnull,
3475 build_dyanmic_cast_1, tinfo_base_init): Likewise.
3476 * semantics.c (begin_compound_stmt, finish_call_expr,
3477 finish_pseudo_destructor_expr, finish_id_expression,
3478 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
3479 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
3480 array_type_nelts_total, stabilize_call): Likewise.
3481 * typeck.c (decay_conversion, build_class_member_access_expr,
3482 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
3483 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
3484 build_x_unary_op, build_unary_op, unary_complex_lvalue,
3485 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
3486 check_return_expr): Likewise.
3487 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
3488 split_nonconstant_init, store_init_value, build_m_component_ref):
3491 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3493 * call.c (convert_class_to_reference,
3494 build_user_type_conversion_1, convert_like_real,
3495 build_java_interface_fn_ref, build_special_member_call): Use
3497 * class.c (build_vtbl_initializer): Likewise.
3498 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3499 * cvt.c (cp_convert_to_pointer): Likewise.
3500 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3501 * decl2.c (start_static_initialization_or_destruction,
3502 generate_ctor_or_dtor_function): Likewise.
3503 * except.c (build_throw): Likewise.
3504 * lex.c (cxx_init): Likewise.
3505 * mangle.c (write_integer_cst): Likewise.
3506 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3507 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3508 get_pseudo_ti_init): Likewise.
3509 * search.c (get_dynamic_cast_base_type): Likewise.
3510 * tree.c (build_shared_int_cst): Likewise.
3512 2004-08-12 Mark Mitchell <mark@codesourcery.com>
3515 * class.c (count_depth_data): New type.
3516 (dfs_depth_post): New function.
3517 (dfs_depth_q): Likewise.
3518 (find_final_overrider_data_s): Change type of vpath.
3520 (dfs_find_final_overrider_1): New function.
3521 (dfs_find_final_overrider): Use it.
3522 (dfs_find_final_overrider_q): Adjust use of vpath.
3523 (dfs_find_final_overrider_post): Likewise.
3524 (find_final_overrider): Use dfs_depth. Allocate and deallocate
3527 2004-08-12 Jan Beulich <jbeulich@novell.com>
3529 * parser.c (cp_parser_asm_definition): Properly consume scope operator
3530 tokens preceding the clobbers. Don't check for scope operator
3531 following inputs. Simplify inputs handling to match that now used for
3534 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3537 * except.c (build_throw): Allocate cleanup_type and the function
3538 for __cxa_throw separately.
3541 * call.c (standard_conversion): Do not accept conversions between
3542 pointers to members if the class types are unrelated.
3545 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
3546 char &" instead of just "char &".
3549 * pt.c (tsubst): Just return the unknown_type_node.
3551 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3554 * parser.c (cp_parser_class_specifier): Robustify.
3557 * pt.c (tsubst_copy_and_build): Complain about invalid
3561 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
3562 current_class_ref while tsubsting.
3564 2004-08-10 Mark Mitchell <mark@codesourcery.com>
3567 * parser.c (cp_parser_init_declarator): Robustify.
3569 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
3571 * typeck2.c (process_init_constructor): Guard the missing field warning
3572 with warn_missing_field_initializers rather than extra_warnings.
3574 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
3576 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
3578 2004-08-05 Mark Mitchell <mark@codesourcery.com>
3580 * decl.c (start_preparsed_function): Move determine_visibility
3582 * decl2.c (determine_visibility): Incorporate dllexport testing.
3584 2004-08-05 Geoffrey Keating <geoffk@apple.com>
3586 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
3587 means that libstdc++ is needed.
3589 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
3591 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
3593 2004-08-04 Geoffrey Keating <geoffk@apple.com>
3595 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
3596 than passing it as a parameter to rest_of_decl_compilation.
3597 * decl2.c (grokfield): Use set_user_assembler_name.
3599 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
3601 * decl.c (complete_array_type): Don't gratuitously copy
3602 maxindex. Its type is always set.
3604 2004-08-04 Paul Brook <paul@codesourcery.com>
3606 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
3607 * cp-tree.h (struct language_function): Rename x_dtor_label to
3609 (dtor_label): Rename ...
3610 (cdtor_label): ... to this.
3611 * decl.c (begin_constructor_body): Remove.
3612 (check_special_function_return_type): Maybe change the return type.
3613 (grokdeclarator): Pass the class type.
3614 (start_preparsed_function): Constructors may need a return label.
3615 (finish_constructor_body, finish_destructor_body): Set the return
3617 (begin_function_body): Don't call begin_constructor_body.
3618 (finish_function): Don't warn for constructors or destructors.
3619 (implicitly_declare_fn): Maybe change the return type.
3620 * optimize.c: Include target.h.
3621 (maybe_clone_body): Remap the function result.
3622 * semantics.c: Include target.h.
3623 (finish_return_stmt): Maybe jump to return label for constructors.
3625 2004-08-03 Mark Mitchell <mark@codesourcery.com>
3627 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
3628 (check_field_decls): Or here.
3629 (check_methods): Or here.
3630 (initialize_array): Don't mess with DECL_CONTEXT.
3631 * cp-tree.h (start_decl): Adjust prototype.
3632 (determine_visibility): New function.
3633 * decl.c (duplicate_decls): Remove checks for hidden "operator
3635 (build_library_fn_1): Give all library functions default
3637 (start_decl): Add pop_scope_p parameter. Tidy.
3638 (cp_finish_decl): Do not pop scopes here. Call
3639 determine_visibility for variable definitions.
3640 (start_preparsed_function): Call determine_visibility.
3641 * decl2.c (determine_visibility): New function.
3642 * method.c (use_thunk): Fix formatting.
3643 * parser.c (cp_parser_condition): Adjust calls to start_decl.
3644 (cp_parser_init_declarator): Likewise.
3645 * pt.c (instantiate_decl): Always call pop_nested_class.
3646 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
3647 (tinfo_base_init): Likewise.
3649 2004-08-02 Mark Mitchell <mark@codesourcery.com>
3652 * name-lookup.c (validate_nonmember_using_decl): Robustify.
3654 2004-08-01 Mark Mitchell <mark@codesourcery.com>
3657 * name-lookup.c (decl_namespace): Remove.
3658 (current_decl_namespace): Use decl_namespace_context instead of
3660 (push_decl_namespace): Likewise.
3661 (arg_assoc_class): Likewise.
3662 (arg_assoc_type): Likewise.
3663 * pt.c (check_specialization_namespace): New function.
3664 (maybe_process_partial_specialization): Use it.
3665 (register_specialization): Likewise.
3668 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
3669 * call.c (null_ptr_cst_p): Handle variables with constant
3671 * pt.c (convert_nontype_argument): Use
3672 DECL_INTEGRAL_CONSTANT_VAR_P.
3673 * semantics.c (finish_id_expression): Likewise.
3676 * decl.c (duplicate_decls): Reject duplicate namespace
3680 * typeck.c (build_ptrmemfunc): Loosen assertion.
3682 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3684 * call.c (z_candidate::template_decl): Rename from template.
3685 (add_template_candidate_real): Adjust member reference.
3688 2004-07-29 Mark Mitchell <mark@codesourcery.com>
3690 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
3691 (lang_decl_flags): Narrow the width of "languages". Add
3693 (DECL_NEEDED_P): Remove.
3694 (FOR_EACH_CLONE): New macro.
3695 (DECL_REPO_AVAILABLE_P): Likewise.
3696 (DECL_TINFO_P): Likewise.
3697 (set_linkage_according_to_type): Declare.
3698 (import_export_vtable): Remove.
3699 (import_export_tinfo): Likewise.
3700 (mark_needed): New function.
3701 (decl_needed_p): Likewise.
3702 (note_vauge_linkage_fn): Likewise.
3703 (init_repo): Change prototype.
3704 (repo_template_used): Remove.
3705 (repo_template_instantiated): Likewise.
3706 (repo_emit_p): New function.
3707 (repo_export_class_p): Likewise.
3708 (no_linkage_check): Change prototype.
3709 * class.c (set_linkage_according_to_type): New function.
3710 (build_vtable): Use it. Do not call import_export_vtable. Set
3711 DECL_IGNORED_P if appropriate.
3712 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
3713 (make_rtL_for_nonlocal_decls): Check for template instantiations
3715 (grokfndecl): Adjust call to no_linkage_check.
3716 (set_linkage_for_static_data_member): New function.
3717 (grokvardecl): Use it. Adjust call to no_linkage_check.
3718 (grokdeclarator): Use set_linkage_for_static_data_member.
3719 * decl2.c (note_vague_linkage_fn): New function.
3720 (note_vague_linkage_var): Likewise.
3721 (finish_static_data_member_decl): Use it.
3722 (import_export_vtable): Remove.
3723 (import_export_class): Use repo_export_class_p.
3724 (var_finalized_p): Simplify.
3725 (maybe_emit_vtables): Simplify.
3726 (mark_needed): New function.
3727 (decl_needed_p): Likewise.
3728 (import_export_decl): Add documentation and consistency checks.
3729 Use repo_emit_p. Handle virtual tables and RTTI information
3731 (import_export_tinfo): Remove.
3732 (write_out_vars): Call import_export_decl.
3733 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
3735 (finish_file): Use decl_needed_p. Do not call import_export_decl
3736 for undefined static data members. Do not warn about undefined
3737 inlines when using a repository.
3738 (mark_used): Use note_vague_linkage_fn. Always defer template
3740 * lex.c (cxx_init): Adjust call to init_repo. Always set
3741 flag_unit_at_a-time.
3742 * method.c (synthesize_method): Remove unncessary
3743 import_export_decl call.
3744 (implicitly_declare_fn): Use set_linkage_according_to_type.
3745 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
3746 * pt.c (instantiate_class_template): Don't redundantly add classes
3747 to keyed_classes. Don't call repo_template_used.
3748 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
3749 templates with internal linkage.
3750 (check_instantiated_args): Adjust call to no_linkage_check.
3751 (instantiate_template): Use FOR_EACH_CLONE.
3752 (mark_definable): New function.
3753 (mark_decl_instantiated): Use it.
3754 (do_decl_instantiation): Adjust tests for explicit instantiation
3755 after "extern template".
3756 (instantiate_class_member): Do not use repo_template_instantiated.
3757 (do_type_instantiation): Simplify.
3758 (instantiate_decl): Use mark_definable. Check repo_emit_p.
3760 * repo.c (repo_get_id): Remove.
3761 (original_repo): Remove.
3762 (IDENTIFIER_REPO_USED): Remove.
3763 (IDENTIFIER_REPO_CHOSEN): Remove.
3764 Remove all #if 0'd code.
3765 (repo_template_used): Remove.
3766 (repo_template_instantiated): Remove.
3767 (temporary_obstack_initialized_p): New variable.
3768 (init_repo): Register with lang_post_pch_load. Avoid creating
3769 identifiers unnecessarily. Don't use original_repo. Close the
3771 (reopen_repo_file_for_write): Not here.
3772 (finish_repo): Always write out a new repository file.
3773 (repo_emit_p): New function.
3774 (repo_export_class_p): Likewise.
3775 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
3776 (involves_incomplete_p): New function.
3777 (tinfo_base_init): Use it.
3778 (ptr_initializer): Remove non_public_ptr parameter.
3779 (ptm_initializer): Likewise.
3780 (get_pseudo_ti_init): Likewise.
3781 (unemitted_tinfo_decl_p): Remove.
3782 (emit_tinfo_decl): Use import_export_decl.
3783 * semantics.c (expand_body): Move updates of static_ctors and
3785 (expand_or_defer_fn): ... here.
3786 * tree.c (no_linkage_check): Add relaxed_p parameter.
3788 2004-07-28 Eric Christopher <echristo@redhat.com>
3790 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3792 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
3794 * cp-tree.h (struct tree_pair_s): New.
3795 (typedef tree_pair_p): New.
3796 (DEF_VEC_O(tree_pair_s)): New.
3797 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
3798 (CLASSTYPE_VCALL_INDICES): Update documentation.
3799 * class.c (get_vcall_index): Adjust.
3800 (add_vcall_offset): Adjust.
3802 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
3804 * pt.c, typeck.c: Remove spurious carriage returns.
3806 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3809 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
3810 when the type of ARG is not dependent.
3812 2004-07-26 Geoffrey Keating <geoffk@apple.com>
3814 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
3815 (lang_specific_driver): If the C++ or math library options don't
3816 start with '-l', don't count them as added libraries.
3818 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
3820 * decl.c (xref_basetypes): Adjust base access vector creation.
3821 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
3823 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
3825 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
3826 Brian Ryner <bryner@brianryner.com>
3830 * class.c (check_field_decls): Apply hidden visibility if
3831 -fvisibility-inlines-hidden and inlined unless otherwise specified
3832 (build_vtable): Set vtable visibility to class visibility.
3833 (check_field_decls): Default static member visibility to class
3835 (check_methods): Default method visibility to class visibility.
3836 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
3837 CLASSTYPE_VISIBILITY_SPECIFIED macro.
3838 * decl.c (duplicate_decls): New logic for merging definition decls
3839 with declaration decls. Added ignore & warning when non default
3840 applied to global operator new or delete.
3841 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
3842 wherever VISIBILITY was changed
3843 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
3845 (tinfo_base_init): Set typeinfo name visibility to class visibility.
3847 2004-07-25 Bernardo Innocenti <bernie@develer.com>
3849 * decl.c: Rename all identifiers named `class' to `cl'.
3850 * cp-tree.h: Likewise.
3852 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3854 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
3855 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
3856 * name-lookup.c (binding_entry_make): Use GGC_NEW.
3857 (binding_table_construct): Use GGC_CNEWVEC.
3858 (binding_table_new): Use GGC_NEW.
3859 (cxx_binding_make): Likewise.
3860 (begin_scope): Likewise.
3861 (push_to_top_level): Use GCC_CNEW.
3862 * parser.c (cp_token_cache_new): Likewise.
3863 (cp_token_cache_push_token): Likewise.
3864 (cp_lexer_new_main): Likewise.
3865 (cp_lexer_new_from_tokens): Likewise.
3866 (cp_parser_context_new): Likewise.
3867 (cp_parser_new): Likewise.
3868 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
3869 * lex.c (cxx_make_type): Use GGC_CNEW.
3870 (retrofit_lang_decl): Use GGC_NEWVAR.
3871 (cxx_dup_lang_specific_decl): Likewise.
3872 (copy_lang_type): Likewise.
3873 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
3874 (save_function_data): Likewise.
3875 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
3876 (cxx_push_function_context): Likewise.
3878 2004-07-25 Richard Henderson <rth@redhat.com>
3880 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
3881 DECL_IGNORED_P on RESULT_DECL.
3882 * semantics.c (finalize_nrv): Copy them too.
3884 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
3886 * search.c (lookup_conversion_operator): Avoid two loops.
3887 (add_conversions): Remove.
3888 (check_hidden_convs, split_conversions,
3889 lookup_conversions_r): New.
3890 (lookup_conversions): Use lookup_conversions_r.
3892 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
3894 * pt.c (get_template_base): Check type is completable.
3896 2004-07-21 Eric Christopher <echristo@redhat.com>
3898 * decl.c (poplevel): Inline unused variable checking.
3901 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
3903 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
3906 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3909 * pt.c (check_explicit_specialization): Remove extension to accept
3910 specializations without template headers. Fall-through to normal
3913 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3916 * pt.c (determine_specialization): New parameter template_count.
3917 Disambiguate between member templates and member functions counting
3918 the template headers.
3919 (check_explicit_specialization): Update caller.
3920 (tsubst_friend_function): Likewise.
3922 2004-07-20 Steven Bosscher <stevenb@suse.de>
3924 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
3925 * cp-tree.h (tinst_level_t): New tree type.
3926 (union lang_tree_node): Handle it.
3927 (TINST_LOCATION): New accessor macro.
3928 (make_tinst_level): New prototype.
3929 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
3930 * decl.c (cp_tree_node_structure): Likewise.
3931 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
3932 (print_instantiation_partial_context): Likewise.
3933 * pt.c (pop_tinst_level): Likewise.
3934 (push_tinst_level): Use make_tinst_level.
3935 * tree.c (make_tinst_level): New function.
3936 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
3938 2004-07-20 Mark Mitchell <mark@codesourcery.com>
3940 * parser.c (cp_parser_simple_type_specifier): Fix typo.
3943 * parser.c (cp_parser_simple_type_specifier): Do not record usage
3944 of globally-qualified names.
3946 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3949 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
3952 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3955 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3956 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3957 * class.c (add_implicitly_declared_members): Use
3958 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3959 * method.c (lazily_declare_fn): Clear
3960 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3961 * search.c (lookup_fnfields_1): Check it.
3963 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3965 * cp-tree.h (vec_binfo_member): Remove.
3966 * tree.c (vec_binfo_member): Remove.
3968 * cp-tree.h (struct lang_type_class): Remove vfields field.
3969 (CLASSTYPE_VFIELDS): Remove.
3970 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3971 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
3973 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
3974 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
3975 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
3977 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3979 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
3980 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3982 (BINFO_LANG_SLOTS): Remove.
3983 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
3984 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
3985 * class.c (check_bases): Adjust BINFO accessors.
3986 (determine_primary_base, finish_struct_bits,
3987 maybe_warn_about_overly_private_class, warn_hidden,
3988 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
3989 warn_about_ambiguous_bases, get_vfield_name,
3990 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
3991 add_vcall_offset_vtbl_entries_r): Likewise.
3992 * dump.c (cp_dump_tree): Likewise.
3993 * init.c (sort_mem_initializers, expand_member_init, build_delete,
3994 push_base_cleanups): Likewise.
3995 * method.c (do_build_copy_constructor, do_build_assign_ref,
3996 synthesize_exception_spec): Likewise.
3997 name-lookup.c (arg_assoc_class): Likewise.
3998 * pt.c (instantiate_class_template,
3999 get_template_base_recursive): Likewise.
4000 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4001 * typeck2.c (process_init_constructor): Likewise.
4002 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4003 dfs_access_in_type, dfs_walk_real, look_for_overrides,
4004 types_overlap_p, copied_binfo, original_binfo): Likewise.
4005 (binfo_for_vtable): Remove
4007 2004-07-20 Steven Bosscher <stevenb@suse.de>
4009 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4010 thunk_alias, and the access and virtual_offset fields.
4011 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4012 * decl.c (finish_case_label): Update c_add_case_node call.
4014 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4016 Revert patch for PR c++/16623.
4018 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
4020 * except.c: Remove two spurious carriage returns.
4022 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4025 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4026 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4027 * class.c (add_implicitly_declared_members): Use
4028 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4029 * method.c (lazily_declare_fn): Clear
4030 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4031 * search.c (lookup_fnfields_1): Check it.
4033 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
4035 * class.c (add_method): Delay adding the slot until the end.
4036 (determine_primary_base): Adjust VEC_iterate invokation.
4037 (resort_type_method_vec, finish_struct_methods, warn_hidden,
4038 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4039 build_vtbl_initializer): Likewise.
4040 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4041 build_vbase_delete): Likewise.
4042 * method.c (do_build_copy_constructor): Likewise.
4043 * name-lookup.c (new_class_binding, print_binding_level,
4044 poplevel_class, store_class_bindings, push_to_top_level,
4045 pop_from_top_level): Likewise.
4046 * pt.c (check_explicit_specialization): Likewise.
4047 * search.c (lookup_conversion_operator, lookup_fnfields_1,
4048 get_pure_virtuals, add_conversions, dfs_check_overlap,
4049 binfo_for_vbase): Likewise.
4051 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4054 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4055 innermost set of template arguments during deduction. Simplify.
4057 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
4059 * typeck.c (build_modify_expr, build_x_modify_expr): Set
4060 TREE_NO_WARNING on assignments with an operator other than '='.
4062 2004-07-10 Steven Bosscher <stevenb@suse.de>
4063 Joseph S. Myers <jsm@polyomino.org.uk>
4065 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4066 * decl2.c (grokfield): Don't check current_class_depth via
4067 unused TREE_COMPLEXITY.
4068 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4069 to avoid the missing parentheses warning.
4070 Don't set C_SET_EXP_ORIGINAL_CODE.
4072 2004-07-18 Mark Mitchell <mark@codesourcery.com>
4074 * tree.c (no_linkage_helper): Remove.
4075 (no_linkage_check): Don't use walk_tree_without_duplicates.
4077 * mangle.c (write_expression): Issue a sorry for zero-operand
4080 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4083 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4084 TREE_TYPE for non-dependent names.
4085 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4086 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4087 unknown_type_node as its TREE_TYPE.
4088 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4089 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4090 (dump_expr) <SCOPE_REF case>: Likewise.
4092 2004-07-17 Jason Merrill <jason@redhat.com>
4095 * call.c (type_passed_as): Make the invisible reference type
4097 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4098 cp_genericize_r. Handle invisible reference lowering.
4099 (is_invisiref_parm): New fn.
4100 (cp_genericize): Adjust the types of invisible reference parms.
4101 Don't repeat the walk for clones.
4102 * decl.c (store_parm_decls): Don't generate any code for clones.
4104 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4106 * cp-tree.h (builtin_function): Declare.
4108 2004-07-16 Mark Mitchell <mark@codesourcery.com>
4110 * class.c (finish_struct_methods): Remove unncessary code.
4111 (add_implicitly_declared_members): Create declarations for default
4112 constructors and copy constructors lazily.
4113 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
4115 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
4116 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
4117 * decl2.c (check_classfn): Robustify.
4118 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
4119 (locate_ctor): Handle lazy default constructors.
4120 (locate_copy): Handle lazy copy constructors.
4121 (implicitly_declare_fn): Make sure we're looking at the
4122 TYPE_MAIN_VARIANT for a class before creating functions. Don't
4123 set TYPE_HAS_CONSTRUCTOR.
4124 (lazily_declare_fn): New function.
4125 * name-lookup.c (constructor_name_full): Simplify.
4126 * search.c (lookup_fnfields_1): Lazily create methods, as
4128 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
4130 2004-07-16 Steven Bosscher <stevenb@suse.de>
4132 * cp-tree.h (struct lang_type): Don't have three GTY options on a
4133 single bit GTY desc.
4135 2004-07-16 Richard Henderson <rth@redhat.com>
4137 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
4138 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
4139 * tree.c (cp_copy_res_decl_for_inlining): Remove.
4141 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
4143 * class.c (finish_struct_bits): Use for loop.
4144 (propagate_binfo_offsets): Do primary binfo outside of loop.
4147 * dump.c (cp_dump_tree): Don't dump the bases if there's no
4150 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
4152 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4154 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
4155 has_abstract_assign_ref. Make methods a VEC(tree) *.
4156 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
4157 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
4158 (CLASSTYPE_DESTRUCTORS): Likewise.
4159 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
4160 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4161 (add_method): Change prototoype.
4162 * class.c (add_method): Remove error_p parameter. Adjust for
4163 changes to CLASSTYPE_METHOD_VEC.
4164 (handle_using_decl): Adjust call to add_method.
4165 (maybe_warn_about_overly_private_class): Adjust for
4166 changes to CLASSTYPE_METHOD_VEC.
4167 (resort_type_method_vec): Likewise.
4168 (finish_struct_methods): Likewise.
4169 (check_for_override): Likewise.
4170 (warn_hidden): Likewise.
4171 (add_implicitly_declared_members): Defer creation of assignment
4172 operators. Adjust call to add_method.
4173 (clone_function_decl): Adjust call to add_method.
4174 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
4175 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
4176 * decl.c (grok_special_member_properties): Don't set
4177 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4178 * decl2.c (check_classfn): Adjust for
4179 changes to CLASSTYPE_METHOD_VEC.
4180 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
4181 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
4182 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
4183 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
4185 * pt.c (check_explicit_specialization): Adjust for
4186 changes to CLASSTYPE_METHOD_VEC.
4187 (instantiate_class_template): Do not set
4188 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4189 * ptree.c (cxx_print_type): Don't try to print
4190 CLASSTYPE_METHOD_VEC.
4191 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
4192 * search.c (lookup_field_r): Adjust for
4193 changes to CLASSTYPE_METHOD_VEC.
4194 (lookup_fnfields): Likewise.
4195 (lookup_conversion_operator): Likewise.
4196 (lookup_fnfields_1): Likewise. Create assignment operators
4198 (look_for_overrides_here): Adjust for
4199 changes to CLASSTYPE_METHOD_VEC.
4200 (add_conversions): Likewise.
4201 * semantics.c (finish_member_declaration): Adjust call to add_method.
4203 2004-07-15 Jason Merrill <jason@redhat.com>
4205 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4206 references and pointers are compatible.
4208 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4210 * decl.c (xref_basetypes): Refactor.
4211 * tree.c (copy_base_binfos): Replace with ...
4212 (copy_binfo): ... this. Deep copy the given binfo, (not the just
4213 bases of the given base).
4214 * cp-tree.h (copy_base_binfo): Remove.
4215 (copy_binfo): Declare.
4217 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4219 * name-lookup.c (set_inherited_value_binding_p): Add class_type
4221 (get_class_binding): Adjust.
4222 (push_class_level_binding): Don't use set_inherited_value_binding_p.
4224 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4226 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4227 * decl.c (xref_basetypes): Set it here.
4229 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4230 Don't check for incomplete base.
4231 (get_vfield_name): Simplify while loop.
4232 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
4234 2004-07-14 Mark Mitchell <mark@codesourcery.com>
4236 * lex.c (cxx_make_type): Remove call to get_pointer_type.
4238 * cp-tree.h (IDENTIFIER_VALUE): Remove.
4239 (BINFO_PUSHDECLS_MARKED): Likewise.
4240 (maybe_inject_for_scope_var): Likewise.
4241 (push_class_decls): Likewise.
4242 * name-lookup.h (push_class_binding): Remove.
4243 (innermost_non_namespace_value): New function.
4244 (outer_binding): Likewise.
4245 * class.c (add_method): Push bindings before adding to
4247 (restore_class_cache): Do not restore class_shadowed.
4248 (pushclass): Do not add USING_DECLs. Do not call
4250 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
4251 * decl.c (pushdecl): Use outer_binding.
4252 (poplevel): Set the scope for an out-of-scope for-loop declaration
4254 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
4255 * name-lookup.c (new_class_binding): New function.
4256 (push_binding): Use it.
4257 (pushdecl): Use innermost_non_namespace_value.
4258 (maybe_inject_for_scope_var): Remove.
4259 (push_class_binding): Remove.
4260 (set_inherited_value_binding_p): New function.
4261 (get_class_binding): New function.
4262 (push_class_level_binding): Assert that the current_class_type is
4264 (outer_binding): New function.
4265 (innermost_non_namespace_value): Likewise.
4266 (lookup_name_real): Use outer_binding.
4267 (lookup_name_current_level): Ignore out-of-scope variables.
4268 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
4269 (lookup_template_class): Likewise.
4270 * search.c (dfs_push_type_decls): Remove.
4271 (dfs_push_decls): Likewise.
4272 (setup_class_bindings): Likewise.
4273 (lookup_field_1): Handle USING_DECLs from dependent scopes.
4274 (marked_pushdecls_p): Remove.
4275 (unmarked_pushdecls_p): Remove.
4276 (marked_identifiers): Remove.
4277 (setup_class_bindings): Remove.
4278 (dfs_push_type_decls): Remove.
4279 (dfs_push_decls): Remove.
4280 (push_class_decls): Remove.
4282 2004-07-13 Mark Mitchell <mark@codesourcery.com>
4286 * decl.c (grokvardecl): Make declspecs parameter const.
4287 (grokdeclarator): Likewise. Adjust accordingly.
4288 * decl.h (grokdeclarator): Adjust declaration.
4289 * parser.c (cp_parser_init_declarator): Do not clear
4290 decl_specifiers->attributes.
4292 * cp-tree.h (lang_identifier): Remove class_value.
4293 (IDENTIFIER_CLASS_VALUE): Remove.
4294 (pop_class_decls): Likewise.
4295 (init_search_processing): Likewise.
4296 * class.c (handle_using_decl): Use lookup_member, not
4297 IDENTIFIER_CLASS_VALUE.
4298 (restore_class_cache): New function, split out from ...
4299 (pushclass): ... here. Do not call clear_identifier_class_values.
4300 (invalidate_class_lookup_cache): Do not clear
4301 IDENTIFIER_CLASS_VALUE.
4302 (popclass): Do not call pop_class_decls.
4303 (maybe_note_name_used_in_class): Do not save names looked up after
4304 the class is complete. Use lookup_member, not
4305 IDENTIFIER_CLASS_VALUE.
4306 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
4307 * decl.c (cxx_init_decl_processing): Do not call
4308 init_search_processing.
4309 * method.c (do_build_copy_constructor): Remove unnecessary code.
4310 (do_build_assign_ref): Likewise.
4311 * name-lookup.c (pushdecl): Use lookup_member, not
4312 IDENTIFIER_CLASS_VALUE.
4313 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
4315 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
4316 (push_class_binding): Do not set it.
4317 (clear_identifier_class_values): Remove.
4318 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
4319 (store_binding): Do not save it.
4320 (pop_from_top_level): Do not restore it.
4321 * name-lookup.h (cxx_saved_binding): Remove class_value.
4322 (clear_identifier_class_values): Remove.
4323 * ptree.c (cxx_print_identifier): Do not print
4324 IDENTIFIER_CLASS_VALUE.
4325 * search.c (search_obstack): Remove.
4326 (push_stack_level): Remove.
4327 (pop_stack_level): Remove.
4328 (search_level): Remove.
4329 (search_stack): Remove.
4330 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
4331 (setup_class_bindings): Use IDENTIFIER_MARKED, not
4332 IDENTIFIER_CLASS_VALUE.
4333 (marked_identifiers): New variable.
4334 (push_class_decls): Clear IDENTIFIER_MARKED.
4335 (pop_class_decls): Don't call pop_search_level.
4336 (init_search_processing): Remove.
4338 2004-07-12 Mark Mitchell <mark@codesourcery.com>
4340 * cp-tree.h (get_aggr_typedef): Remove.
4341 * init.c (get_aggr_typedef): Likewise.
4343 * name-lookup.c (push_class_level_binding): Simplify.
4345 2004-07-12 Andrew Pinski <apinski@apple.com>
4349 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
4351 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4354 2004-07-12 Eric Christopher <echristo@redhat.com>
4356 * parser.c (cp_parser_class_head): Remove unused variable.
4358 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4360 * decl.c (grok_op_properties): Reject [de-]allocation functions
4361 declared in a namespace, or declared as static.
4363 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
4365 * cp-tree.h (make_binfo): Remove.
4366 * decl.c (xref_basetypes): Use make_tree_binfo directly.
4367 * tree.h (copy_base_binfos): Likewise.
4368 (make_binfo): Remove.
4370 * call.c (build_user_type_conversion_1, build_new_op,
4371 check_constructor_callable, build_temp,
4372 perform_direct_initialization_of_possible): Pass type directly to
4373 lookup_fnfields & build_special_member_call.
4374 (build_special_member_call): Accept a type, and complete it.
4375 * class.c (finish_stuct_bits): Copy the BINFOs here.
4376 * cvt.c (ocp_convert): Pass type directly to
4377 build_special_member_call.
4378 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
4379 (xref_basetypes): Allocate the binfo here. Adjust.
4380 * init.c (build_init, build_new_1): Pass type directly to
4381 build_special_member_call.
4382 * lex.c (cxx_make_type): Do not allocate binfo here.
4383 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
4384 * parser.c (cp_parser_class_head): Always call xref_basetypes.
4385 * pt.c (instantiate_class_template): Likewise. Inhibit access
4386 checking for template friends.
4387 * ptree.c (cxx_print_type): Adjust record printing.
4388 * search.c (lookup_base): When taking a type, complete it before
4389 looking for a binfo.
4390 (lookup_member): Delay completing a type.
4391 (push_class_decls): Don't walk an incomplete type.
4392 (lookup_conversions): Likewise.
4393 * semantics.c (finish_stmt_expr_expr): Pass type directly to
4394 build_special_member_call.
4395 * tree.c (copy_base_binfos): Adjust.
4396 (make_binfo): Likewise.
4397 * typeck.c (build_modify_expr): Pass type directly to
4398 build_special_member_call.
4399 * typeck2.c (process_init_constructor): Check a binfo exists.
4400 (build_m_component_ref): Allow accessing an incomplete type.
4401 (build_functional_cast): Pass type directly to
4402 build_special_member_call.
4404 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4407 * config-lang.in (gtfiles): Add typeck2.c.
4408 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
4410 * cp-tree.h: Declare complete_type_check_abstract.
4411 * typeck2.c (pat_calc_hash, pat_compare,
4412 complete_type_check_abstract): New functions.
4413 (abstract_virtuals_error): If the type is abstract, register the
4414 declaration within abstract_pending_vars for further checks.
4415 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
4416 * decl.c (cp_finish_decl): Do not strip array types.
4417 (create_array_type_for_decl): Check for abstractness of the element
4419 (complete_vars): Call complete_type_check_abstract.
4420 * class.c (finish_struct): Prepare a list of virtual functions for
4421 template types, and call complete_vars on it to check for abstractness.
4423 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
4425 PR tree-optimization/14107
4426 * decl.c (finish_function): Remove temporary band-aid.
4428 2004-07-11 Mark Mitchell <mark@codesourcery.com>
4430 * call.c (build_operator_new_call): Avoid using push_to_top_level.
4431 (build_new_op): Adjust call to lookup_function_nonclass.
4432 * name-lookup.c (identifier_type_value): Adjust call to
4434 (lookup_name_real): Add block_p parameter.
4435 (lookup_name_nonclass): Adjust call to lookup_name_real.
4436 (lookup_function_nonclass): Likewise.
4437 (lookup_name): Likewise.
4438 * name-lookup.h (lookup_name_real): Change prototype.
4439 (lookup_name_nonclass): Likewise.
4440 * parser.c (cp_parser_lookup_name): Likewise.
4442 * cp-tree.h (saved_scope): Make old_bindings a vector.
4443 (unuse_fields): Remove.
4444 * name-lookup.h (cxx_saved_binding): Define it.
4445 * class.c (pushclass): Don't use unuse_fields.
4446 * name-lookup.c (cxx_saved_binding_make): Remove.
4447 (store_binding): Add new bindings to a vector, using an
4448 accumulator style, rather than adding them to a list.
4449 (store_bindings): Adjust accordingly.
4450 (store_class_bindings): Likewise.
4451 (push_to_top_level): Likewise.
4452 (pop_from_top_level): Likewise.
4453 * optimize.c (maybe_clone_body): Must push_to_top_level and
4454 pop_from_top_level calls outside of loop.
4455 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
4456 calls here from cp_parser_late_parsing_default_args.
4457 (cp_parser_save_default_args): Record the class type in which the
4458 function is declared.
4459 (cp_parser_late_parsing_default_args): Do not call
4460 push_nested_class/pop_nested_class.
4461 * search.c (dfs_unuse_fields): Remove.
4462 (unuse_fields): Remove.
4464 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4466 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
4467 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
4468 * cp-tree.h (poplevel): Declare.
4469 (set_block): Remove.
4470 * decl.c (set_block): Remove.
4472 2004-07-10 Mike Stump <mrs@apple.com>
4474 * decl2.c (import_export_class): Never export/import vtables
4475 with inline key functions.
4477 2004-07-09 Steven Bosscher <stevenb@suse.de>
4479 * typeck.c (c_expand_asm_operands): Remove.
4481 2004-07-09 Mike Stump <mrs@apple.com>
4483 * typeck.c (build_class_member_access_expr): Skip null deref
4484 warning when we don't dereference it.
4486 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4490 * class.c (check_field_decls): Improve -Weffc++ warning: do not
4491 warn for pointers to functions/members, or for classes without
4494 2004-07-08 Mark Mitchell <mark@codesourcery.com>
4496 * name-lookup.h (struct cp_binding_level): Update documentation
4499 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4502 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
4503 returning CALL_EXPR, and non-reference return type.
4505 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
4507 * name-lookup.c (push_binding): Use VEC_reserve.
4509 2004-07-08 Richard Henderson <rth@redhat.com>
4511 * cp-tree.h (expand_eh_spec_block): Remove.
4513 2004-07-07 Mark Mitchell <mark@codesourcery.com>
4515 * cp-tree.h (saved_scope): Remove x_previous_class_type and
4516 x_previous_class_values; add x_previous_class_level.
4517 (previous_class_type): Remove.
4518 (previous_class_values): Remove.
4519 (previous_class_level): New macro.
4520 * class.c (pushclass): Restore the identifier cache more
4522 (invalidate_class_lookup_cache): Use vector for class_shadowed and
4523 previous_class_values.
4524 * decl.c (poplevel): Likewise.
4525 * name-lookup.c (cxx_binding_init): New function.
4526 (cxx_binding_make): Use it.
4527 (push_binding): For a binding in a class level, use a vector of
4528 cp_class_binding nodes.
4529 (push_binding_level): New function.
4530 (begin_scope): Use it.
4531 (leave_scope): Do not put class binding levels on the free list.
4532 (print_binding_level): Adjust for the fact that class_shadowed is
4534 (poplevel_class): Likewise.
4535 (clear_identifier_class_values): Likewise.
4536 (push_class_level_binding): Likewise.
4537 (set_class_shadows): Remove.
4538 (store_binding): New function.
4539 (store_class_bindings): New function.
4540 (push_to_top_level): Use store_class_bindings as appropriate.
4541 (pop_from_top_level): Use previous_class_level, not
4542 previous_class_type.
4543 * name-lookup.h (cp_class_binding): New type.
4544 (cp_binding_level): Use a vector object for class_shadowed.
4545 (push_binding_level): Declare.
4546 (set_class_shadows): Remove.
4548 2004-07-07 Andrew Pinski <apinski@apple.com>
4550 * class.c (instantiate_type): BUFFER_REF is dead.
4551 * lex.c (init_operators): IN_EXPR is dead.
4553 2004-07-07 Jason Merrill <jason@redhat.com>
4556 * call.c (build_new_op): Give overload warnings for built-in
4559 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
4562 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4565 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
4567 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
4568 * class.c (build_primary_vtable, check_bases,
4569 determine_primary_base, finish_struct_bits,
4570 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
4571 get_basefndecls, warn_hidden, walk_subobject_offsets,
4572 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
4573 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
4574 finish_struct_1, get_vfield_name, contains_empty_class_p,
4575 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
4576 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
4577 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
4579 * decl.c (xref_basetypes): Likewise.
4580 * dump.c (cp_dump_tree): Likewise.
4581 * error.c (dump_expr): Likewise.
4582 * init.c (sort_mem_initializers, expand_member_init,
4583 push_base_cleanups): Likewise.
4584 * method.c (do_build_copy_constructor, do_build_assign_reg,
4585 synthesize_exception_spec): Likewise.
4586 * name-lookup.c (arg_assoc_class): Likewise.
4587 * pt.c (instantiate_class_template, tsubst,
4588 get_template_base_recursive): Likewise.
4589 * ptree.c (cxx_print_type): Likewise.
4590 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
4591 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4592 dfs_access_in_type, access_in_type, lookup_field_queue_p,
4593 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
4594 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
4595 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
4596 binfo_for_vtable, copied_binfo, original_binfo): Likewise
4597 * tree.c (copy_base_binfos, make_binfo): Likewise.
4598 * typeck.c (commmon_base_type): Likewise
4599 * typeck2.c (process_init_constructor): Likewise
4601 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
4603 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
4605 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4608 * pt.c (convert_nontype_argument): Disallow conversions between
4609 different enumeration types.
4611 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4613 * cp-tree.h (BINFO_MARKED): Remove.
4614 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
4615 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
4616 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
4617 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
4618 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
4619 (mark_primary_bases, determine_primary_base, base_derived_from,
4620 dfs_find_final_overrider, dfs_find_final_overrider_q,
4621 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
4622 dfs_modify_vtables, walk_subobject_offsets,
4623 layout_nonempty_base_or_field, build_base_field,
4624 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
4625 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
4626 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
4627 build_ctor_vtbl_group, accumulate_vtble_inits,
4628 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
4629 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
4630 add_vcall_offset_vtbl_entries_1): Likewise.
4631 * decl.c (xref_basetypes): Incomming virtual base indicated by
4633 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
4634 * init.c (finish_init_stmts, sort_mem_initializers,
4635 emit_mem_initializers, build_vtble_address, expand_member_init,
4636 push_base_cleanups): Likewise.
4637 * method.c (do_build_copy_constructor): Likewise.
4638 * pt.c (instantiate_class_template,
4639 get_template_base_recursive): Likewise.
4640 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
4641 get_pseudo_ti_desc): Likewise.
4642 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4643 binfo_from_vbase, binfo_via_virtual, copied_binfo,
4644 original_binfo): Likewise.
4645 * semantics.c (finish_base_specifier): Virtualness is indicated
4647 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
4649 2004-07-06 Mark Mitchell <mark@codesourcery.com>
4652 2004-06-24 Jason Merrill <jason@redhat.com>
4654 * decl.c (grokparms): Give the PARM_DECL reference type if the
4655 parameter is passed by invisible reference.
4657 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4659 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
4660 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
4661 * pt.c (check_instantiated_args, unify): Likewise.
4663 2004-07-05 Phil Edwards <phil@codesourcery.com>
4665 * Make-lang.in (check-c++, lang_checks): Add some comments.
4667 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4669 * cp-mudflap.c: Delete file.
4670 * Makefile.in: Remove all references to cp-mudflap.o.
4672 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4674 * decl.c (cxx_init_decl_processing): Call
4675 build_common_tree_nodes before creating the global NAMESPACE_DECL.
4677 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4680 * call.c (build_operator_new_call): Look only at global scope.
4682 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
4684 * call.c (enforce_access): Expect TREE_BINFO.
4685 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
4686 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
4687 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4689 (BINFO_LANG_ELTS): Remove.
4690 (BINFO_LANG_SLOTS): New.
4691 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
4692 (CLASSTYPE_TEMPLATE_INFO): Adjust.
4693 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
4694 * search.c (lookup_member): Check TREE_BINFO.
4695 * semantics.c (perform_or_defer_access_check): Likewise.
4696 (check_accessibility_of_qualified_id): Check
4697 deferred_access_no_check.
4698 * tree.c (make_binfo): Use make_tree_binfo.
4700 2004-07-04 Mark Mitchell <mark@codesourcery.com>
4702 * method.c (implicitly_declare_fn): Set linkage of generated
4705 2004-07-04 Richard Henderson <rth@redhat.com>
4707 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
4709 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
4712 * name-lookup.c (push_class_level_binding): Don't pass a
4713 TREE_LIST of ambiguous names to check_template_shadow as it
4714 only handles declarations. Instead, pull the declaration
4717 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4720 * pt.c (check_explicit_specialization): Clarify error message.
4722 2004-07-02 Richard Henderson <rth@redhat.com>
4724 * tree.c (cp_unsave_r): Update remap_save_expr call.
4726 2004-07-02 Mark Mitchell <mark@codesourcery.com>
4729 * mangle.c (write_template_arg): Correct mangling.
4732 * decl.c (grokdeclarator): Robustify.
4734 2004-07-01 Richard Henderson <rth@redhat.com>
4736 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
4737 * method.c (synthesize_method): Don't clear_last_expr.
4738 * name-lookup.c (maybe_push_cleanup_level): Likewise.
4740 2004-07-01 Nick Clifton <nickc@redhat.com>
4742 * decl2.c (import_export_class): Invoke the
4743 import_export_class field in the gcc_target structure if it is not
4746 2004-06-30 Richard Henderson (rth@redhat.com>
4748 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
4749 * method.c (use_thunk): Likewise.
4751 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
4753 * call.c (build_over_call), typeck.c (build_function_call): Call
4754 check_function_arguments instead of check_function_format.
4756 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
4758 * call.c (build_over_call), typeck.c (build_function_call): Update
4759 calls to check_function_format.
4761 2004-06-30 Richard Henderson <rth@redhat.com>
4763 * call.c (build_over_call): Use __builtin_memcpy for copying
4764 CLASS_AS_BASE rather than funny casting.
4766 2004-06-30 Richard Henderson <rth@redhat.com>
4768 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
4769 TYPE_SIZE_UNIT of full_type.
4771 2004-06-30 Per Bothner <per@bothner.com>
4773 Conditionally compile support for --enable-mapped_location.
4774 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
4775 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
4776 adjustments - which I don't understand.
4777 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
4778 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
4779 (print_instantiation_partial_context): Use expand_location.
4780 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
4781 * name-lookup.c: Likewise.
4782 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
4783 * name-lookup.c: Use input_line macro.
4784 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
4785 (cp_parser_statement): Rename locaal variable statement_locus to
4786 statement_location and use SET_EXPR_LOCATION macro.
4787 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
4788 * tree.c (cp_walk_subtrees): Likewise.
4790 2004-06-29 Per Bothner <per@bothner.com>
4792 * tree.c (build_min_nt, build_min, build_min_non_dep):
4793 Don't set TREE_COMPLEXITY from input_line.
4795 2004-06-29 Paul Brook <paul@codesourcery.com>
4797 * init.c: Include target.h.
4798 (get_cookie_size): Remove and replace with target hook.
4800 (build_new_1): Store the element size in the cookie.
4802 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
4805 * parser.c (cp_parser_template_declaration_after_export): Disable
4806 access checks here ...
4807 (cp_parser_class_specifier): ... not here.
4809 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4811 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4812 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4813 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
4816 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4818 * cp-tree.h (struct deferred_access): Move to ...
4819 * semantics.c (struct deferred_access): ... here. Adjust.
4820 (deferred_access_stack): Make a VEC(deferred_access),
4821 (deferred_access_free_list): Remove.
4822 (deferred_access_no_check): New.
4823 (push_deferring_access_checks, resume_deferring_access_checks,
4824 stop_deferring_access_checks, pop_deferring_access_checks,
4825 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
4826 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
4828 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4831 * call.c (build_temp): Declare.
4832 (check_constructor_callable): New.
4833 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
4834 CONSTRUCTOR_CALLABLE.
4835 (convert_like_real, initialize_reference): Use
4836 check_constructor_callable.
4837 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
4838 (LOOKUP_*): Renumber.
4840 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4842 * friend.c (add_friend): Only perform access checks when context
4844 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
4845 * parser.c (cp_parser_class_specifier): Disable access checks here
4846 when parsing the body of a templated class.
4847 * semantics.c (perform_or_defer_access_checks): Reorder to allow
4848 NULL binfos when not checking access.
4850 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4852 Use vector API for vbase list.
4853 * cp-tree.h: Include vec.h
4854 (DEF_VEC_P (tree)): New type.
4855 (struct lang_type_class): Change vbase's member type.
4856 (binfo_for_vbase): Declare.
4857 * class.c (determine_primary_base, base_derived_from,
4858 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
4859 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
4860 build_vtbl_initializer): Adjust.
4861 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
4863 * init.c (sort_mem_initializers, expand_member_init,
4864 push_base_cleanups): Adjust.
4865 * method.c (do_build_copy_constructor): Adjust.
4866 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
4867 (binfo_for_vbase): New.
4868 * tree.c (copy_base_binfos): Adjust.
4870 2004-06-28 Mark Mitchell <mark@codesourcery.com>
4872 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
4874 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4877 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
4878 paranthesis in case of pointers to array members.
4879 * error.c (dump_type_prefix): Likewise.
4880 (dump_type_suffix): Maybe issue a whitespace when printing
4883 2004-06-27 Mark Mitchell <mark@codesourcery.com>
4886 * parser.c (cp_parser_set_decl_spec_type): Refine test for
4887 redefinition of built-in types.
4889 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4891 * error.c (pp_template_argument_list_start): Remove.
4892 (pp_template_argument_list_end): Likewise.
4893 (pp_separate_with_comma): Use pp_cxx_separate_with.
4894 (reinit_global_formatting_buffer): Remove.
4895 (pp_non_consecutive_character): Likewise.
4896 (dump_scope): Use pp_cxx_colon_colon.
4897 (dump_template_parameter): Use pp_cxx_identifier,
4898 pp_cxx_tree_identifier and pp_cxx_whitespace.
4899 (dump_templat_bindings): Replace use of pp_string with sequence
4900 of pp_cxx_whitespace and pp_equal.
4901 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
4902 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
4904 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
4905 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
4906 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
4907 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
4908 pp_cxx_right_bracket, pp_cxx_identifier throughout,
4909 (dump_decl): Likewise.
4910 (dump_template_decl): Likewise.
4911 (dump_function_decl): Likewise. Set padding as appropriate.
4912 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
4914 (dump_exception_spec): Likewise.
4915 (dump_function_name): Use pp_cxx_tree_identifier and
4917 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
4918 pp_cxx_end_template_argument_list.
4919 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
4920 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
4921 pp_cxx_whitespace throughout.
4922 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
4924 (dump_unary_op): Likewise.
4925 (reinit_cxx_pp): New function.
4926 (type_as_string); Use it.
4927 (expr_as_string): Likewise.
4928 (decl_as_string); Likewise.
4929 (context_as_string): Likewise.
4930 (lang_decl_name): Likewise.
4931 (decl_to_string): Likewise.
4932 (expr_to_string): Likewise.
4933 (parm_to_string): Likewise.
4934 (type_to_string): Likewise.
4935 (args_to_string): Likewise.
4936 (cv_to_string): Likewise.
4938 2004-06-26 Mark Mitchell <mark@codesourcery.com>
4940 * cp-tree.h (cp_cv_quals): New type.
4941 (cp_declarator): Use it instead of "tree" as appropriate.
4942 (grok_method_quals): Adjust prototype.
4943 (grokclassfn): Likewise.
4944 (do_friend): Likewise.
4945 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
4946 (grokdeclarator): Likewise.
4947 * decl2.c (grok_method_quals): Likewise.
4948 (grokclassfn): Likewise.
4949 * friend.c (do_friend): Likewise.
4950 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
4951 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
4952 (make_pointer_declarator): Likewise.
4953 (make_reference_declarator): Likewise.
4954 (make_ptrmem_declarator): Likewise.
4955 (cp_parser_ptr_operator): Likewise.
4956 (cp_parser_cv_qualifier_seq_opt): Likewise.
4957 (cp_parser_cv_qualifier_opt): Remove.
4958 (cp_parser_new_declarator_opt): Adjust call to
4959 cp_parser_ptr_operator.
4960 (cp_parser_conversion_declaration_opt): Likewise.
4961 (cp_parser_declarator): Use cp_cv_quals, not tree.
4962 (cp_parser_direct_declarator): Likewise.
4964 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4966 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
4967 Rename DECL_STMT to DECL_EXPR.
4968 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
4969 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
4970 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
4972 2004-06-26 Jan Hubicka <jh@suse.cz>
4975 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
4976 reachability analysis.
4978 2004-06-25 Mark Mitchell <mark@codesourcery.com>
4980 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
4983 2004-06-25 Paul Brook <paul@codesourcery.com>
4985 * decl2.c (get_guard): Call targetm.cxx.guard_type.
4986 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
4988 2004-06-24 Mark Mitchell <mark@codesourcery.com>
4990 * decl.c (grokdeclarator): Restore error messages about __thread.
4991 * parser.c (cp_parser_decl_specifier_seq): Likewise.
4993 2004-06-24 Jason Merrill <jason@redhat.com>
4996 * decl.c (grokparms): Give the PARM_DECL reference type if the
4997 parameter is passed by invisible reference.
4999 2004-06-24 Andreas Schwab <schwab@suse.de>
5001 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5003 2004-06-23 Mark Mitchell <mark@codesourcery.com>
5005 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5006 (cp/decl.o): Likewise.
5007 (cp/decl2.o): Likewise.
5008 (cp/pt.o): Likewise.
5009 (cp/semantics.o): Likewise.
5010 * config-lang.in (gtfiles): Do not reference cp/lex.h.
5011 * class.c: Do not include lex.h.
5012 (add_implicitly_declared_members): Do not use
5013 adding_implicit_members.
5014 (check_bases_and_members): Do not talk about grok_x_components.
5015 * cp/cp-tree.h (adding_implicit_members): Remove.
5016 (cp_storage_class): New type.
5017 (cp_decl_spec): Likewise.
5018 (cp_decl_specifier_seq): Likewise.
5019 (cp_parameter_declarator): Use it for the decl_specifiers field.
5020 (check_tag_decl): Adjust prototype.
5021 (shadow_tag): Likewise.
5022 (groktypename): Likewise.
5023 (start_decl): Likewise.
5024 (start_function): Likewise.
5025 (start_method): Likewise.
5026 (grok_x_components): Remove.
5027 (grokfield): Adjust prototype.
5028 (grokbitfield): Likewise.
5029 (finish_member_class_template): Remove.
5030 * decl.c: Do not include lex.h.
5031 (adding_implicit_members): Do not define.
5032 (check_tag_decl): Do not use trees to represent decl-specifiers.
5033 (shadow_tag): Likewise.
5034 (groktypename): Likewise.
5035 (start_decl): Likewise.
5036 (grokvardecl): Likewise.
5037 (grokdeclarator): Likewise.
5038 (grokparms): Likewise.
5039 (start_function): Likewise.
5040 (start_method): Likewise.
5041 * decl.h (grokdeclarator): Adjust prototype.
5042 * decl2.c: Do not include lex.h.
5043 (grok_x_components): Remove.
5044 (grokfield): Do not use trees to represent decl-specifiers.
5045 (grokbitfield): Likewise.
5046 * lex.c: Do not include lex.h.
5048 * parser.c: Include target.h.
5049 (clear_decl_specs): New function.
5050 (cp_parser_translation_unit): Do not use trees to represent
5052 (cp_parser_postfix_expression): Likewise.
5053 (cp_parser_new_type_id): Likewise.
5054 (cp_parser_condition): Likewise.
5055 (cp_parser_simple_declaration): Likewise.
5056 (cp_parser_decl_specifier_seq): Likewise.
5057 (cp_parser_function_specifier_opt): Likewise.
5058 (cp_parser_conversion_type_id): Likewise.
5059 (cp_parser_template_parameter): Likewise.
5060 (cp_parser_explicit_instantiation): Likewise.
5061 (cp_parser_type_specifier): Likewise.
5062 (cp_parser_simple_type_specifier): Likewise.
5063 (cp_parser_init_declarator): Likewise.
5064 (cp_parser_type_id): Likewise.
5065 (cp_parser_type_specifier_seq): Likewise.
5066 (cp_parser_parameter_declaration): Likewise.
5067 (cp_parser_member_declaration): Likewise.
5068 (cp_parser_exception_declaration): Likewise.
5069 (cp_parser_function_definition_from_specifiers_and_declarator):
5071 (cp_parser_single_declaration): Likewise.
5072 (cp_parser_save_member_function_body): Likewise.
5073 (cp_parser_friend_p): Likewise.
5074 (cp_parser_set_storage_class): New function.
5075 (cp_parser_set_decl_spec_type): Likewise.
5076 * pt.c: Do not include lex.h.
5077 * semantics.c: Likewise.
5078 (finish_member_class_template): Remove.
5080 2004-06-23 Roger Sayle <roger@eyesopen.com>
5082 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
5083 longer take both "args" and "convert_args" as arguments.
5084 (build_op_delete_call): Update call to build_cxx_call.
5085 (build_over_call): Likewise, update call to build_cxx_call.
5086 * cp-tree.h (build_cxx_call): Update funtion prototype.
5087 * typeck.c (build_function_call): Don't call expand_tree_builtin.
5088 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5089 (throw_bad_typeid): Likewise.
5090 (build_dynamic_cast_1): Likewise.
5092 2004-06-22 Richard Henderson <rth@redhat.com>
5094 * class.c (build_vfn_ref): Take a pointer not object. Build
5096 (cp_fold_obj_type_ref): New.
5097 * call.c (build_over_call): Update build_vfn_ref call.
5098 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5099 * cp-tree.h (cp_fold_obj_type_ref): Declare.
5101 2004-06-21 Jason Merrill <jason@redhat.com>
5104 * cp-gimplify.c (cp_gimplify_init_expr): Look through
5107 2004-06-21 Mark Mitchell <mark@codesourcery.com>
5109 * cp-tree.def (NEW_EXPR): Add a fourth slot.
5110 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
5111 (TREE_PARMLIST): Likewise.
5112 (CALL_DECLARATOR_PARMS): Likewise.
5113 (CALL_DECLARATOR_QUALS): Likewise.
5114 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5115 (cp_declarator_kind): New type.
5116 (cp_parameter_declarator): Likewise.
5117 (cp_declarator): Likewise.
5118 (cp_error_declarator): Likewise.
5119 (no_parameters): Likewise.
5120 (groktypename): Change prototype.
5121 (start_decl): Likewise.
5122 (start_handler_parms): Likewise.
5123 (get_scope_of_declarator): Likewise.
5124 (start_function): Likewise.
5125 (start_preparsed_function): New function.
5126 (start_function): Change prototype.
5127 (start_method): Likewise.
5128 (grokfield): Likewise.
5129 (grokbitfield): Likewise.
5130 (build_new): Likewise.
5131 (make_pointer_declarator): Remove.
5132 (make_reference_declarator): Likewise.
5133 (make_call_declarator): Likewise.
5134 (set_quals_and_spec): Likewise.
5135 (process_template_parm): Change prototype.
5136 (begin_function_definition): Remove.
5137 (finish_parmlist): Remove.
5138 * decl.c (groktypename): Do not use trees to represent
5140 (start_decl): Likewise.
5141 (start_handler_parms): Remove.
5142 (get_scope_of_declarator): Reimplement.
5143 (grokdeclarator): Do not use trees to represent declarators.
5144 (grokparms): Likewise.
5145 (start_function): Likewise.
5146 (start_method): Likewise.
5147 (build_void_list_mode): Do not use TREE_PARMLIST.
5148 * decl.h (grokdeclarator): Change prototype.
5149 * decl2.c (grok_method_quals): Robustify.
5150 (grok_x_components): Do not use trees to represent declarators.
5151 (grokfield): Likewise.
5152 (grokbitfield): Likewise.
5153 (start_objects): Build FUNCTION_DECLs, not declarators.
5154 (start_static_storage_duration_function): Likewise.
5155 * init.c (build_new): Simplify.
5156 * lex.c (make_pointer_declarator): Remove.
5157 (make_reference_declarator): Likewise.
5158 (make_call_declarator): Likewise.
5159 (set_quals_and_spec): Likewise.
5160 * method.c (use_thunk): Use start_preparsed_function.
5161 (synthesize_method): Likewise.
5162 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
5163 * optimize.c (maybe_clone_body): Use start_preparsed_function.
5164 * parser.c (cp_error_declarator): New variable.
5165 (declarator_obstack): Likewise.
5166 (alloc_declarator): New function.
5167 (make_declarator): Likewise.
5168 (make_id_declarator): Likewise.
5169 (make_pointer_declarator): Likewise.
5170 (make_reference_declarator): Likewise.
5171 (make_ptrmem_declarator): Likewise.
5172 (make_call_declarator): Likewise.
5173 (make_array_declarator): Likewise.
5174 (no_parameters): New variable.
5175 (make_parameter_declarator): Likewise.
5176 (cp_parser_check_for_definition_in_return_type): Do not use trees
5177 to represent declarators.
5178 (cp_parser_translation_unit): Likewise.
5179 (cp_parser_new_expression): Likewise.
5180 (cp_parser_new_type_id): Likewise.
5181 (cp_parser_new_declarator_opt): Likewise.
5182 (cp_parser_direct_new_declarator): Likewise.
5183 (cp_parser_condition): Likewise.
5184 (cp_parser_declaration_statement): Likewise.
5185 (cp_parser_declaration): Likewise.
5186 (cp_parser_conversion_type_id): Likewise.
5187 (cp_parser_conversion_declarator_opt): Likewise.
5188 (cp_parser_template_parameter_list): Likewise.
5189 (cp_parser_template_parameter): Likewise.
5190 (cp_parser_explicit_instantiation): Likewise.
5191 (cp_parser_init_declarator): Likewise.
5192 (cp_parser_declarator): Likewise.
5193 (cp_parser_direct_declarator): Likewise.
5194 (cp_parser_type_id): Likewise.
5195 (cp_parser_parameter_declaration_clause): Likewise.
5196 (cp_parser_parameter_declaration_list): Likewise.
5197 (cp_parser_parameter_declaration): Likewise.
5198 (cp_parser_member_declaration): Likewise.
5199 (cp_parser_exception_declaration): Likewise.
5200 (cp_parser_check_declarator_template_parameters): Likewise.
5201 (cp_parser_function_definition_from_specifiers_and_declarator):
5203 (cp_parser_save_member_function_body): Likewise.
5204 * pt.c (process_template_parm): Add is_non_type parameter.
5205 (convert_template_argument): Adjust call to groktypename.
5206 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
5207 (tsubst): Do not expect declarators.
5208 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
5210 (instantiate_decl): Use start_preparsed_function.
5211 * semantics.c (begin_function_definition): Remove.
5212 (finish_parmlist): Remove.
5213 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
5216 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5218 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
5219 (build_new_method_call): Likewise.
5220 * decl.c (local_variable_p_walkfn): Don't walk into types.
5221 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
5222 (build_anon_union_vars): Add new operand for COMPONENT_REF.
5223 * init.c (buld_new): Add new operand for ARRAY_REF.
5224 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
5225 (do_build_assign_ref): Likewise.
5226 * parser.c (cp_parser_direct_new_declarator): Add new operands
5228 (cp_parser_direct_declarator): Likewise.
5229 * pt.c (tsubst): Likewise.
5230 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
5232 * semantics.c (finish_non_static_data_member): Add new operand
5234 * typeck.c (build_class_member_access_expr): Likewise.
5235 (build_class_member_access_expr, finish_class_member_access_expr):
5237 (build_ptrmemfunc_access_expr): Likewise.
5238 (build_array_ref): Add new operands for ARRAY_REF.
5239 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
5240 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
5242 2004-06-21 Richard Henderson <rth@redhat.com>
5244 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
5245 * parser.c (cp_parser_jump_statement): Update commentary.
5246 * pt.c (tsubst_expr): Use RETURN_EXPR.
5247 * semantics.c (finish_return_stmt): Likewise.
5248 (finalize_nrv_r): Likewise.
5249 * typeck.c, typeck2.c: Update file start commentary.
5251 2004-06-21 Richard Henderson <rth@redhat.com>
5253 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
5255 2004-06-20 Richard Henderson <rth@redhat.com>
5257 * cp-tree.h (add_decl_stmt): Declare.
5258 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
5259 * semantics.c (maybe_cleanup_point_expr): New.
5260 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
5261 finish_for_expr, finish_switch_cond): Use it.
5262 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
5264 2004-06-20 Richard Henderson <rth@redhat.com>
5266 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
5267 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
5268 (cp_gimplify_expr): Call it.
5269 (gimplify_cleanup_stmt): Move from c-gimplify.c.
5270 (cp_genericize): New.
5271 * decl.c (finish_function): Call it.
5272 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
5273 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
5274 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
5275 (cp_genericize): Declare.
5276 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
5277 * dump.c (cp_dump_tree): Likewise.
5278 * semantics.c (push_cleanup): Move from c-semantics.c.
5280 2004-06-20 Zack Weinberg <zack@codesourcery.com>
5282 * cp-lang.c (has_c_linkage): Implement.
5284 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
5285 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
5286 (builtin_function_1): Don't call make_decl_rtl.
5287 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
5288 (grokvardecl): Don't call mangle_decl.
5289 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
5290 DECL_ASSEMBLER_NAME.
5291 * method.c (set_mangled_name_for_decl): Delete.
5292 * name-lookup.c (pushdecl): When a local extern shadows a
5293 file-scope declaration of the same object, give both DECLs the
5295 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
5296 on DECL_ASSEMBLER_NAME.
5298 2004-06-19 Richard Henderson <rth@redhat.com>
5300 * cp-gimplify.c: Remove unnecessary prototypes.
5301 (cp_gimplify_stmt): Merge into ...
5302 (cp_gimplify_expr): ... here. Move to end of file. Handle
5303 stmts_are_full_exprs_p frobbing.
5304 * cp-tree.h (cp_gimplify_stmt): Remove.
5305 * pt.c (tsubst_expr): Merge prep_stmt and unify.
5306 * tree.c (init_tree): Don't set lang_gimplify_stmt.
5308 2004-06-18 Richard Henderson <rth@redhat.com>
5311 * semantics.c (begin_cond): New.
5312 (finish_cond): Rewrite to handle template DECL_STMTs specially.
5313 Assume that non-template decls go land before the conditional.
5314 (simplify_loop_decl_cond): Likewise.
5315 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
5316 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
5317 begin_switch_stmt, finish_switch_cond): Update to match.
5319 2004-06-17 Jason Merrill <jason@redhat.com>
5322 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
5323 (finish_stmt_expr_expr): Update type after conversions.
5324 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
5325 Handle void initializer.
5326 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
5328 2004-06-17 Geoffrey Keating <geoffk@apple.com>
5330 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
5331 * cp-tree.h (defer_fn): Delete.
5332 * decl2.c (defer_fn): Delete.
5333 (finish_file): Simplify deferred_fns loops; check that
5334 only used inline functions get into deferred_fns.
5335 (mark_used): Inline previous contents of defer_fn.
5337 2004-06-16 Richard Henderson <rth@redhat.com>
5339 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
5340 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
5341 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
5342 of CTOR_INITIALIZER ...
5343 (pp_cxx_statement): ... here.
5344 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
5345 (finish_function): Use alloc_stmt_list to zap entire function.
5346 * parser.c (cp_parser_compound_statement): Update commentary.
5347 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
5348 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
5349 (finish_stmt_expr): Don't look through COMPOUND_STMT.
5351 2004-06-16 Geoffrey Keating <geoffk@apple.com>
5353 * pt.c (mark_decl_instantiated): Don't call defer_fn.
5355 2004-06-16 Richard Henderson <rth@redhat.com>
5357 * parser.c (cp_parser_labeled_statement): Update commentary.
5358 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
5359 * tree.c (mark_local_for_remap_r): Likewise.
5361 2004-06-16 Richard Henderson <rth@redhat.com>
5363 * parser.c (cp_parser_asm_definition): Update commentary.
5364 * pt.c (tsubst_expr): Use ASM_EXPR.
5365 * semantics.c (finish_asm_stmt): Likewise.
5367 2004-06-16 Richard Henderson <rth@redhat.com>
5369 * decl.c (finish_destructor_body): Use LABEL_EXPR.
5370 * parser.c (cp_parser_statement): Update commentary.
5371 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
5372 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
5373 * tree.c (mark_local_for_remap_r): Likewise.
5375 2004-06-16 Richard Henderson <rth@redhat.com>
5378 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
5379 statement in FOR_INIT_STMT for templates.
5381 2004-06-15 Richard Henderson <rth@redhat.com>
5383 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
5384 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
5385 (genericize_try_block): Use gimplify_stmt.
5386 (genericize_catch_block, genericize_eh_spec_block): Likewise.
5387 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
5388 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
5389 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
5390 (cp_tree_chain_matters_p): Remove.
5391 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
5392 (COMPOUND_STMT_BODY_BLOCK): New.
5393 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
5394 (EXPR_STMT_STMT_EXPR_RESULT): New.
5395 (building_stmt_tree): Check cur_stmt_list.
5396 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
5397 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
5398 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
5399 (cp_finish_decl): Use push_cleanup.
5400 (start_function, finish_function): Use statement lists.
5401 (finish_stmt): Do nothing.
5402 * except.c (begin_eh_spec_block): Use statement lists.
5403 (check_handlers_1, check_handlers): Likewise.
5404 * init.c (construct_virtual_base): Don't add extra compound stmts.
5405 (build_vec_init): Likewise.
5406 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
5407 * name-lookup.h (struct cp_binding_level): Add statement_list.
5408 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
5409 (cp_parser_labeled_statement, cp_parser_expression_statement,
5410 cp_parser_statement_seq_opt): Likewise.
5411 (cp_parser_compound_statement): Likewise. Take bool for try block.
5412 (cp_parser_selection_statement): Tidy if processing.
5413 (cp_parser_already_scoped_statement): Rewrite to do what it says.
5414 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
5415 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
5416 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
5417 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
5418 (finish_cond): New, rewritten from FINISH_COND.
5419 (simplify_loop_decl_cond): New.
5420 (finish_expr_stmt): Avoid nested EXPR_STMTs.
5421 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
5422 begin_else_clause, finish_else_clause, finish_if_stmt,
5423 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
5424 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
5425 finish_for_cond, finish_for_stmt, begin_switch_stmt,
5426 finish_switch_cond, finish_switch_stmt, begin_try_block,
5427 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
5428 finish_handler_sequence, finish_function_handler_sequence,
5429 begin_handler, finish_handler_parms, finish_handler,
5430 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
5431 using statement lists.
5432 (begin_compound_stmt): Replace has_no_scope argument with flags.
5433 Update all callers. Use statement lists.
5434 (finish_compound_stmt): Likewise.
5435 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
5436 (current_scope_stmt_stack): Remove.
5437 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
5438 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
5439 Rewrite with statement lists.
5441 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
5443 * parser.c: Change all assignments of c_lex_string_translate
5444 to true and false to 1 and 0.
5445 (cp_lexer_read_token): Convert type of the translated string.
5446 (cp_parser_skip_to_closing_parentheses): Preserve original
5447 value of c_lex_string_translate, and set it to -1 while
5449 (cp_parser_cache_group): Likewise.
5450 (cp_parser_cache_group_1): Renamed.
5451 (cp_parser_asm_operand_list): Remove redundant setting of
5452 c_lex_string_translate.
5453 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
5454 Handle chained strings.
5456 2004-06-12 Andrew Pinski <apinski@apple.com>
5460 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5462 * cp-tree.h: Fix typo.
5464 * cp-tree.h: Include cgraph.h
5465 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5466 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5468 2004-06-12 Jason Merrill <jason@redhat.com>
5470 PR tree-optimization/14107
5471 * decl.c (finish_function): Warn about no return in all functions.
5473 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5475 * cp-tree.h (struct language_function): Remove cannot_inline.
5476 * decl.c (save_function_data): cannot_inline is no more.
5477 (cxx_push_function_context): Likewise.
5478 * decl2.c (start_objects, start_static_storage_duration_function):
5479 Reset DECL_INLINE, set DECL_UNINLINABLE.
5481 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5484 * search.c (lookup_field): Propagate the ambiguity list.
5485 (lookup_fnfields): Likewise.
5487 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5490 * parser.c (cp_parser_template_name): Ctors/dtors never need a
5491 template keyword to disambiguate.
5493 2004-06-14 Mark Mitchell <mark@codesourcery.com>
5496 * decl.c (grokdeclarator): Ignore pointer-to-members when
5497 computing template depth.
5500 * name-lookup.c (pushtag): Do not try to put class declarations in
5501 explicit specialization scopes.
5503 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
5505 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
5507 2004-06-11 Mark Mitchell <mark@codesourcery.com>
5510 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
5511 bindings for undeclared built-ins.
5513 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5515 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
5516 appear at the correct location.
5518 2004-06-10 Jason Merrill <jason@redhat.com>
5522 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5523 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5524 TREE_TYPE for non-dependent names.
5525 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5526 unknown_type_node as its TREE_TYPE.
5527 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5528 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5529 (dump_expr) <SCOPE_REF case>: Likewise.
5531 2004-06-10 Mark Mitchell <mark@codesourcery.com>
5534 * parser.c (cp_parser_direct_declarator): Robustify.
5537 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
5538 constants in non-dependent contexts.
5542 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
5545 2004-06-10 Jakub Jelinek <jakub@redhat.com>
5548 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
5551 2004-06-09 Mark Mitchell <mark@codesourcery.com>
5555 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5556 * lex.c (handle_pragma_interface): Deprecate.
5557 (handle_pragma_implementation): Likewise.
5559 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
5561 * g++spec.c (lang_specific_driver): Remove check for -lm
5562 and -lmath when check it see if it was the math library.
5564 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5567 * parser.c (cp_parser_direct_declarator): Reject constructor named
5568 as qualified template-id.
5570 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5573 * lex.c (handle_pragma_interface): Deprecate.
5574 (handle_pragma_implementation): Likewise.
5576 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5579 * parser.c (cp_parser_iteration_statement): Fix typo in error
5583 * pt.c (tsubst_default_argument): Do not defer access checks
5584 while substituting into the default argument.
5587 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
5588 constant in a non-dependent context.
5591 * except.c (build_throw): Ensure that temp_expr has been
5594 2004-06-06 Roger Sayle <roger@eyesopen.com>
5596 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
5598 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5601 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
5602 'typename', and accept 'template'.
5604 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
5605 Jan Hubicka <jh@suse.cz>
5608 * method.c (use_think): Do not mark thunk as referenced.
5610 2004-06-03 Matt Austern <austern@apple.com>
5613 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
5614 is nonzero, and if we see a noninline definition of a key method,
5615 make the vtables nonweak.
5617 2004-06-02 Matt Austern <austern@apple.com>
5619 * cp-tree.h (instantiate_decl): new boolean parameter,
5620 undefined_ok. Current behavior is equivalent to its being 0.
5621 * decl2.c (mark_used): Add new argument when calling instantiate_decl
5622 * pt.c (mark_decl_instantiated): Unconditionally make
5623 instantiations explicit unconditionally
5624 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
5625 since mark_decl_instantiated now does it.
5626 (instantiate_class_member): New. Instantiate a member of an
5627 explicitly instantiated class template.
5628 (do_type_instantiation): Explicitly instantiate members of an
5629 explicitly instantiated class template.
5630 (instantiate_decl): if undefined_ok is nonzero, and if we're
5631 trying to explicitly instantiated a template with no definition,
5632 change it to an implicit instantiation.
5633 (instantiate_pending_templates): Add new argument to instantiate_decl.
5634 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5636 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5638 * cp-tree.h: Fix typo.
5640 * cp-tree.h: Include cgraph.h
5641 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5642 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5644 2004-06-01 Jason Merrill <jason@redhat.com>
5647 * call.c (call_builtin_trap): Remove type parm.
5648 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
5649 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
5651 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5654 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5655 TREE_TYPE for non-dependent names.
5656 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5657 unknown_type_node as its TREE_TYPE.
5658 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5659 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5660 (dump_expr) <SCOPE_REF case>: Likewise.
5662 2004-06-01 Richard Henderson <rth@redhat.com>
5663 Andrew Pinski <pinskia@physics.uc.edu>
5665 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
5666 * parser.c (struct cp_parser): Remove in_offsetof.
5667 (cp_parser_new): Don't set it.
5668 (cp_parser_unary_expression): Don't check it.
5669 (cp_parser_postfix_open_square_expression): Split out from ...
5670 (cp_parser_postfix_expression): ... here.
5671 (cp_parser_postfix_dot_deref_expression): Likewise.
5672 (cp_parser_builtin_offsetof): New.
5673 (cp_parser_primary_expression): Use it.
5675 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5678 * parser.c (cp_parser_postfix_expression): Allow subscript
5679 operator in offsetof.
5681 2004-05-31 Mark Mitchell <mark@codesourcery.com>
5684 * friend.c (add_friend): Do not try to perform access checks for
5685 functions from dependent classes.
5687 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5689 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
5690 (pp_cxx_begin_template_argument_list): Turn into a function.
5691 (pp_cxx_end_template_argument_list): Likewise.
5692 (pp_cxx_separate_with): Define.
5693 (pp_cxx_unqualified_id): Tidy.
5694 (pp_cxx_primary_expression): Likewise.
5695 (pp_cxx_postfix_expression): Likewise.
5696 (pp_cxx_expression): Likewise.
5697 (pp_cxx_simple_type_specifier): Likewise.
5698 (pp_cxx_type_specifier_seq): Likewise.
5699 (pp_cxx_parameter_declaration_clause): Likewise.
5700 (pp_cxx_exception_specification): Likewise.
5701 (pp_cxx_direct_declarator): Likewise.
5702 (pp_cxx_type_id): Likewise.
5703 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
5705 (pp_cxx_left_paren): Likewise.
5706 (pp_cxx_right_paren): Likewise.
5707 (pp_cxx_left_brace): Likewise.
5708 (pp_cxx_right_brace): Likewise.
5709 (pp_cxx_left_bracket): Likewise.
5710 (pp_cxx_right_bracket): Likewise.
5711 (pp_cxx_dot): Likewise.
5712 (pp_cxx_identifier): Likewise.
5713 (pp_cxx_tree_identifier): Likewise.
5714 (pp_cxx_ampersand): New macro.
5715 (pp_cxx_star): Likewise.
5716 (pp_cxx_arrow): Likewise.
5717 (pp_cxx_semicolon): Likewise.
5718 (pp_cxx_complement): Likewise.
5719 (pp_cxx_begin_template_argument_list): Declaree.
5720 (pp_cxx_end_template_argument_list): Likewise.
5721 (pp_cxx_colon_colon): likewise.
5723 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5725 * parser.c (cp_parser_simple_type_specifier): Explicitly test
5728 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
5730 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
5731 typeck.c: Fix comment formatting.
5733 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
5735 * cp-lang.c (cp_expand_decl): Remove.
5736 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
5738 2004-05-30 Andreas Jaeger <aj@suse.de>
5740 * lang-specs.h: Add missing initializers for .ii.
5742 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
5744 * decl.c (cp_make_fname_decl): Free return value from
5747 2004-05-28 Mark Mitchell <mark@codesourcery.com>
5750 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
5752 * init.c (build_new): Likewise.
5755 * name-lookup.c (arg_assoc): Robustify.
5758 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
5759 when determining the scope to use for a pointer to member.
5760 (lookup_anon_field): Give it external linkage.
5761 * cp-tree.h (lookup_anon_field): Declare it.
5762 * expr.c (cplus_expand_constant): Use it.
5764 2004-05-28 Mark Mitchell <mark@codesourcery.com>
5767 * parser.c (cp_parser_simple_type_specifier): Call
5768 maybe_note_name_used_in_class.
5770 2004-05-28 Tom Marshall <tmarshall@real.com>
5773 * class.c (finish_struct_1): Warn only if the dtor is non-private or
5774 the class has friends.
5776 2004-05-27 Adam Nemet <anemet@lnxw.com>
5779 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
5780 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
5782 2004-05-24 Geoffrey Keating <geoffk@apple.com>
5784 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
5785 if it might be needed.
5786 * pt.c (mark_decl_instantiated): Only call defer_fn if
5787 the function actually needs processing in finish_file.
5788 * decl2.c (finish_file): Add check that elements in
5789 deferred_fns_used are really needed there. Remove unnecessary
5790 test of DECL_SAVED_TREE.
5792 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
5794 * Make-lang.in: No need to specify $(LIBCPP).
5796 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5799 * parser.c (cp_parser_class_head): Robustify.
5802 * parser.c (cp_parser_decl_specifier_seq): Correct error in
5804 (cp_parser_constructor_declarator_p): Treat attributes
5808 * typeck.c (build_unary_op): Do not attempt to resolve casts to
5809 base classes in templates.
5811 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5814 * pt.c (instantiate_template): Robustify.
5816 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5819 * decl.c (xref_tag): Issue errors about redeclaring template
5820 classes as non-template classes.
5822 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5825 * name-lookup.c (supplement_binding): Allow redefinitions of
5829 * parser.c (cp_parser_template_argument): Robustify.
5831 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5833 * class.c (alter_access): Use %E format specifier to print an
5834 identifier node. Avoid looking at the IDENTIFIER_POINTER.
5835 (push_lang_context): Likewise.
5836 * decl.c (lookup_label): Likewise.
5837 (grokdeclarator): Likewise.
5838 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
5839 * pt.c (do_type_instantiation): Likewise.
5840 * tree.c (handle_java_interface_attribute): Likewise.
5841 (handle_com_interface_attribute): Likewise.
5842 (handle_init_priority_attribute): Likewise.
5844 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5848 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
5849 recognized as overloaded functions.
5851 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5854 * class.c (layout_nonempty_base_or_field): Do not try to avoid
5855 layout conflicts for unions.
5858 * typeck.c (build_x_unary_op): Instantiate template class
5859 specializations before looking for "operator &".
5862 * typeck.c (complete_type): Layout non-dependent array types, even
5866 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
5869 2004-05-22 Roger Sayle <roger@eyesopen.com>
5871 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
5872 returning when TREE_TYPE is error_mark_node.
5873 * typeck.c (require_complete_type): Return error_mark_node if
5874 value's type is an error_mark_node.
5876 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
5878 * optimize.c (calls_setjmp_r): Remove.
5879 (calls_setjmp_p): Remove.
5880 * cp-tree.c (calls_setjmp_p): Remove.
5881 * decl.c (finish_function): Do not call calls_setjmp_p.
5883 2004-05-18 Zack Weinberg <zack@codesourcery.com>
5885 * decl.c (cp_finish_decl): Use mark_decl_referenced.
5886 * decl2.c (maybe_make_one_only): Likewise.
5887 * method.c (use_thunk): Likewise.
5889 2004-05-18 Jason Merrill <jason@redhat.com>
5891 * class.c (build_base_path): Tidy a bit.
5893 2004-05-14 Geoffrey Keating <geoffk@apple.com>
5895 * name-lookup.c (struct scope_binding): New.
5896 (EMPTY_SCOPE_BINDING): New.
5897 (lookup_using_namespace): Take a scope_binding instead of a
5899 (qualified_lookup_using_namespace): Likewise.
5900 (cxx_binding_clear): Delete.
5901 (do_nonmember_using_decl): Use a scope_binding instead of a
5903 (lookup_tag): Don't call select_decl.
5904 (ambiguous_decl): Don't return anything (and change callers to match).
5905 Take a scope_binding as the second parameter.
5906 (lookup_namespace_name): Use a scope_binding instead of a
5908 (unqualified_namespace_lookup): Likewise.
5909 (lookup_qualified_name): Likewise.
5910 (select_decl): Take a scope_binding instead of a cxx_binding.
5911 Use macros rather than hand-coding tests for type-ness.
5913 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5915 * cp-gimplify.c: Rename from cp-simplify.c.
5916 * Make-lang.in, optimize.c: Update.
5918 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5920 Merge from tree-ssa-20020619-branch. See
5921 ChangeLog.tree-ssa for details.
5923 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
5924 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
5925 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
5926 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
5928 * cp-mudflap.c: New file.
5929 * cp-simplify.c:: New file.
5931 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5934 * decl2.c (check_classfn): For member templates, compare also the
5935 template parameters to match the declaration.
5936 * cp-tree.h: Adjust declaration of check_classfn.
5937 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
5938 * friend.c (do_friend): Likewise.
5939 * pt.c (tsubst_friend_function): Likewise.
5941 2004-05-01 Zack Weinberg <zack@codesourcery.com>
5943 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
5944 Instead, dig into the representation type to find the array bound.
5946 2004-04-30 Jason Merrill <jason@redhat.com>
5948 Refer to base members using COMPONENT_REFs where possible.
5949 * class.c (build_simple_base_path): New fn.
5950 (build_base_path): Use it for non-virtual base references.
5951 (layout_class_type): Change base fields to their real type
5952 after layout is done.
5953 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
5954 * cp-lang.c (cxx_get_alias_set): Use it.
5956 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
5958 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
5961 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5964 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
5965 used in integral constant expressions.
5967 2004-04-22 Mark Mitchell <mark@codesourcery.com>
5969 * init.c (build_aggr_init): Fix accidental use of C99 construct in
5972 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
5974 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
5975 * decl.c (reshape_init): Use it.
5976 * init.c (perform_member_init): Remove redundant condition.
5977 (build_aggr_init): Adjust to handle brace-enclosed initializers
5979 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5981 * parser.c (cp_parser_initializer_clause): Do not set
5982 TREE_HAS_CONSTRUCTOR on the initializer.
5983 * rtti.c (tinfo_base_init): Likewise.
5984 (generic_initializer): Likewise.
5985 (ptr_initializer): Likewise.
5986 (ptm_initializer): Likewise.
5987 (class_initializer): Likewise.
5988 (get_pseudo_ti_init): Likewise.
5989 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5991 2004-04-22 Alan Modra <amodra@bigpond.net.au>
5993 * name-lookup.c (anonymous_namespace_name): Make static.
5995 2004-04-19 Roger Sayle <roger@eyesopen.com>
5998 * class.c (build_base_path): Call fold whilst building the NULL
5999 pointer check expression trees.
6001 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6003 * init.c (build_new_1): Don't use type size argument for Java
6004 _Jv_AllocObject call.
6006 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
6008 * method.c (make_alias_for_thunk): Remove preprocessor guard on
6009 declaration and definition.
6011 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
6014 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6015 than ASM_OUTPUT_DEF.
6017 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6019 * decl2.c (mark_used): Don't segfault if cfun != NULL but
6020 current_function_decl == NULL.
6022 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
6025 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6028 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6030 * init.c (decl_constant_value): Don't look at DECL_INITIAL
6032 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6033 or TREE_SIDE_EFFECTS of a type.
6035 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
6038 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6039 cv-qualifier unification.
6040 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6042 2004-04-02 Jan Hubicka <jh@suse.cz>
6044 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6045 * cp-tree.h (cp_update_decl_after_saving): Declare.
6046 * tree.c (cp_update_decl_after_saving): Define.
6048 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6051 * typeck.c (get_delta_difference): Call fold before returning the
6054 2004-04-01 Richard Henderson <rth@redhat.com>
6057 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6058 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6060 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6063 * name-lookup.c (maybe_push_cleanup_level): Robustify.
6065 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6067 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6069 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6071 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6072 * class.c (check_bitfield_decl): Likewise.
6073 * cvt.c (type_promotes_to): Likewise.
6074 * decl.c (finish_enum): Likewise.
6075 * mangle.c (write_builtin_type): Likewise.
6076 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6077 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6078 (build_binary_op): Likewise.
6080 2004-03-31 Jan Hubicka <jh@suse.cz>
6082 * tree.h (optimize_function): Kill prototype.
6083 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6084 * semantics.c (expand_body): Kill.
6086 2004-03-30 Mark Mitchell <mark@codesourcery.com>
6089 * decl.c (start_decl_1): Do not decide whether or not to create a
6090 new cleanup level until after the type has been completed.
6093 * pt.c (tsubst_default_argument): Clear current_function_decl.
6095 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6097 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6099 2004-03-29 Zack Weinberg <zack@codesourcery.com>
6101 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
6102 is null, just print the literal name and return.
6104 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
6106 * cxx-pretty-print.c: Fix comment typos.
6108 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
6110 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
6113 2004-03-23 Ziemowit Laski <zlaski@apple.com>
6115 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
6116 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
6119 2004-03-23 Zack Weinberg <zack@codesourcery.com>
6121 PR 12267, 12391, 12560, 13129, 14114, 14133
6122 * cp-lang.c (c_reset_state): Delete.
6123 (push_file_scope, pop_file_scope): New stubs.
6124 * parser.c (c_parse_file): Call sorry() here if called more than once.
6126 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6128 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
6131 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6133 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
6135 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6137 * error.c (enum pad): Remove.
6138 (dump_qualifiers): Likewise.
6139 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
6140 (dump_aggr_type): Likewise.
6141 (dump_type_suffix): Likewise.
6142 (dump_simple_decl): Likewise.
6143 (dump_function_decl): Likewise.
6144 (cv_to_string): Likewise.
6145 (dump_type_prefix): Likewise. Adjust return void.
6146 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
6148 (pp_cxx_template_keyword_if_needed): Document.
6149 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
6150 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
6151 MUST_NOT_THROW_EXPR.
6153 2004-03-21 Mark Mitchell <mark@codesourcery.com>
6156 * decl.c (cp_finish_decl): Compute the size of arrays declared in
6157 templates, if their type is non-dependent.
6159 2004-03-19 Mark Mitchell <mark@codesourcery.com>
6161 * call.c (build_op_delete_call): Do not forget the placement
6162 arguments when iterating through mutiple delete operators.
6164 * cp-tree.h (svaed_scope): Remove last_parms.
6165 (NEW_DELETE_OPNAME_P): New macro.
6166 (last_function_parms): Remove.
6167 (do_friend): Adjust prototype.
6168 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
6169 using last_function_parms.
6170 (grokfndecl): Take the PARM_DECLs as an argument, rather than
6171 using last_function_parms.
6172 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
6173 for class-specific operator new and operator delete.
6174 (grok_op_properties): Do not look for allocation functions with
6176 (start_function): Use DECL_ARGUMENTS instead of
6177 last_function_parms.
6178 * decl.h (last_function_parms): Do not declare.
6179 * decl2.c (grokclassfn): Do not use last_function_parms.
6180 * friend.c (do_friend): Remove parmdecls parameter.
6181 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
6182 (pop_from_top_level): Do not restore it.
6183 * pt.c (check_explicit_specialization): Do not adjust
6184 last_function_parms.
6186 * name-lookup.c (do_local_using_decl): Create a local binding for
6187 types brought in via using declarations.
6189 * name-lookup.c (lookup_arg_dependent): Handle block-scope
6190 function declarations correctly.
6192 * semantics.c (finish_id_expression): Correct handling of
6193 conversion operators to dependent types.
6195 * typeck.c (lookup_destructor): Allow the use of destructors from
6198 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6200 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
6201 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
6202 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
6203 the field is named TEMPLATE_TYPE_PARM_INDEX.
6205 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6208 * parser.c (cp_parser_functional_cast): A cast to anything
6209 but integral or enumaration type is not an integral constant
6211 * pt.c (value_dependent_expression_p): Handle cast expressions
6212 without operands (such as "int()").
6214 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6216 * semantics.c (finish_pseudo_destructor_expr): Allow differing
6217 cv-qualification between the type named by the
6218 pseudo-destructor-name and the object-type.
6220 * search.c (accessible_base_p): Handle non-proper bases.
6222 * name-lookup.c (do_nonmember_using_decl): If a using declaration
6223 refers to a single overloaded function, set the type of the
6225 * tree.c (lvalue_type): Simplify.
6226 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
6228 (build_unary_op): Handle OVERLOADs with known types.
6230 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
6233 * parser.c (cp_parser_postfix_expression): Handle the use of
6234 "typename" in non-dependent contexts. Convert appropriately when
6235 when using a qualified name after "->" or ".".
6237 * call.c (conditional_conversion): Honor the requirement that some
6238 conversions refer to the original object.
6240 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6242 * call.c (build_conditional_expr): Do not call force_rvalue for
6243 operands of void_type when the conditional expression itself has
6245 * name-lookup.c (pushdecl): Don't consider a declaration of a
6246 function named "main" to be an overload of a type named "main".
6247 * parser.c (cp_parser_template_name): Perform name lookup when the
6248 template name is proceeded by "template" if the qualifying scope
6250 * typeck.c (composite_pointer_type_r): Correctly handle
6251 pointer-to-member types.
6252 (build_const_cast): Likewise.
6254 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6256 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
6257 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
6258 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
6259 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
6260 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
6261 (TYPEOF_TYPE_EXPR): New macro.
6262 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
6263 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
6264 * pt.c (tsubst): Likewise.
6265 * semantics.c (finish_typeof): Likewise.
6266 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
6267 and TEMPLATE_TYPE_PARM.
6268 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
6269 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
6271 2004-03-16 Mark Mitchell <mark@codesourcery.com>
6274 * cp-tree.h (build_new_op): Change prototype.
6275 (build_x_binary_op): Likewise.
6276 * call.c (build_new_op): Add overloaded_p parameter.
6277 * decl2.c (grok_array_decl): Adjust call to build_new_op.
6278 * parser.c (cp_parser_binary_expression): Note that uses of
6279 overloaded operators prevents an expression from being considered
6280 an integral constant.
6281 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
6283 * semantics.c (finish_call_expr): Likewise.
6284 * typeck.c (rationalize_conditional_expr): Likewise.
6285 (build_x_indirect_ref): Likewise.
6286 (build_x_binary_op): Likewise.
6287 (build_x_unary_op): Likewise.
6288 (build_x_compound_expr): Likewise.
6289 (build_modify_expr): Likewise.
6290 * typeck2.c (build_x_arrow): Likewise.
6292 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
6294 * cp-lang.c, ptree.c: Update copyright.
6296 2004-03-13 Mark Mitchell <mark@codesourcery.com>
6299 * parser.c (cp_parser_non_integral_constant_expression): Encode
6300 more of the idiom that surrounded calls to this function within
6302 (cp_parser_primary_expression): Adjust accordingly.
6303 (cp_parser_postfix_expression): Likewise.
6304 (cp_parser_unary_expression): Likewise.
6305 (cp_parser_cast_expression): Likewise.
6306 (cp_parser_assignment_expression): Likewise.
6307 (cp_parser_expression): Likewise.
6308 (cp_parser_new_expression): Note that new-expressions are not
6309 allowed in integral constant expressions.
6310 (cp_parser_delete_expression): Likewise.
6312 2004-03-12 Matt Austern <austern@apple.com>
6314 * decl2.c (maybe_make_one_only): Look at
6315 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
6316 to make an explicit instantiation weak.
6317 * method.c (use_thunk): Make sure we call comdat_linkage
6319 * pt.c (do_type_instantiation): On systems where weak symbols
6320 don't go in a static archive's TOC, explicit instantiation of a
6321 class must imply *explicit* instantiation of its memeber.
6323 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
6325 * call.c, cp-tree.h, pt.c: Fix comment typos.
6327 2004-03-10 Mark Mitchell <mark@codesourcery.com>
6330 * decl.c (xref_tag): Disregard non-type declarations when
6331 looking up a tagged type.
6333 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
6336 * call.c (convert_like_real): Build a const qualified temporary,
6337 when testing ctor access.
6339 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6341 * call.c (initialize_reference): Fix typo.
6343 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6346 * pt.c (determine_specialization): For member templates, match also
6350 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
6352 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
6354 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6357 * call.c (initialize_reference): Handle initializers that are
6358 class-member access expressions applies to rvalues.
6360 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6363 * name-lookup.c (supplement_binding): Ignore functions that are
6364 marked DECL_ANTICIPATED.
6366 2004-03-08 Mark Mitchell <mark@codesourcery.com>
6369 * class.c (check_field_decls): Complain about non-static data
6370 members of reference type in unions. Propagate
6371 CLASSTYPE_REF_FIELDS_NEED_INIT and
6372 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
6374 * init.c (perform_member_init): Complain about mbmers with const
6375 type that are not explicitly initialized.
6377 2004-03-08 Mark Mitchell <mark@codesourcery.com>
6379 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
6380 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
6381 (lang_identifier): Remove implicit_decl and error_locus.
6382 (IDENTIFIER_IMPLICIT_DECL): Remove.
6383 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
6384 (IDENTIFIER_ERROR_LOCUS): Likewise.
6385 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
6386 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
6387 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6388 (implicitly_declare): Remove.
6389 * decl.c (warn_extern_redeclared_static): Remove check of
6390 IDENTIFIER_IMPLICIT_DECL.
6391 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
6392 (implicitly_declare): Remove.
6393 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
6394 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
6395 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
6396 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
6397 in the innermost scope, rather than at namespace scope.
6398 * name-lookup.c (push_local_binding): Give it external linkage.
6399 (pushdecl): Remove dead code.
6400 * name-lookup.h (push_local_binding): Declare it.
6401 * ptree.c (cxx_print_identifier): Don't print
6402 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
6403 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
6404 not IDENTIFIER_ERROR_LOCUS.
6405 * typeck.c (build_function_call): Remove dead code.
6407 2004-03-08 Jason Merrill <jason@redhat.com>
6410 * decl.c (xref_tag): Remove attribute handling.
6411 * cp-tree.h: Adjust prototype.
6412 * decl.c, parser.c, rtti.c: Adjust callers.
6413 * parser.c (cp_parser_class_head): Pass back attributes in the
6415 (cp_parser_class_specifier): Adjust.
6417 2004-03-08 Matt Austern <austern@apple.com>
6420 * name-lookup.c (add_decl_to_level): Add extern variables, as well
6421 as static, to static_decls array.
6423 2004-03-05 Jason Merrill <jason@redhat.com>
6425 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
6427 2004-03-04 Geoffrey Keating <geoffk@apple.com>
6429 * decl.c (grokfndecl): Update old incorrect comment.
6430 (grokvardecl): Diagnose C++ variables of type with no linkage.
6432 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6435 * pt.c (build_non_dependent_expr): Do not create a
6436 NON_DEPENDENT_EXPR for a THROW_EXPR.
6438 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
6441 * error.c (dump_expr): Handle THROW_EXPR.
6443 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6446 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
6447 lookup if ordinary name-lookup finds a non-function.
6448 * pt.c (tsubst_copy_and_build): Likewise.
6451 * parser.c (cp_parser_late_parsing_default_args): Check that there
6452 are no extra tokens after the end of the default-argument
6455 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6458 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
6459 having C++ linkage for name-mangling purposes.
6462 * parser.c (cp_parser_direct_declarator): Recognize constructor
6463 declarators that use a template-id to name the class being
6467 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
6468 (tsubst_expr): Do not call tsubst_copy, even when
6469 processing_template_decl.
6471 2004-03-01 Jeff Law <law@redhat.com>
6473 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
6476 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6479 * name-lookup.h (push_scope): Change prototype.
6480 * name-lookup.c (push_scope): Do not reenter the current class
6482 * decl.c (grokfndecl): Check return code from push_scope before
6484 * decl2.c (check_classfn): Likewise.
6485 * parser.c (cp_parser_conversion_function_id): Likewise.
6486 (cp_parser_init_declarator): Likewise.
6487 (cp_parser_direct_declarator): Likewise.
6488 (cp_parser_class_specifier): Likewise.
6489 (cp_parser_class_head): Likewise.
6490 (cp_parser_lookup_name): Likewise.
6491 (cp_parser_constructor_declarator_p): Likewise.
6492 * pt.c (instantiate_class_template): Likewise.
6493 (resolve_typename_type): Likewise.
6495 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6498 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
6502 * class.c (update_vtable_entry_for_fn): Do not go through
6503 covariance machinery if the type returned by an overrider is the
6504 same as the original.
6506 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
6508 * call.c: Fix a comment typo.
6510 2004-02-27 Ziemowit Laski <zlaski@apple.com>
6512 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
6514 2004-02-26 Mark Mitchell <mark@codesourcery.com>
6517 * parser.c (cp_parser_parameter_declaration_list): Commit
6518 to fewer tentative parses.
6520 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6523 * pt.c (dependent_type_p_r): A template template parameter is a
6526 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6529 * mangle.c (write_template_arg_literal): Don't rely on identity for
6532 2004-02-24 Jason Merrill <jason@redhat.com>
6534 * tree.c (build_exception_variant): Use check_qualified_type.
6536 2004-02-23 Zack Weinberg <zack@codesourcery.com>
6537 Kazu Hirata <kazu@cs.umass.edu>
6539 * decl.c (cxx_init_decl_processing): Don't check
6540 flag_writable_strings.
6542 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
6545 * typeck.c (maybe_warn_about_returning_address_of_location):
6546 Change check for VAR_DECL to use DECL_P instead.
6548 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6551 * cvt.c (build_expr_type_conversion): Type must be complete before
6552 looking up for conversions.
6554 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6557 * name-lookup.c (arg_assoc_class): Don't look into template
6558 arguments if it is not a primary template.
6560 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6563 * method.c (use_thunk): Always clone function argument tree.
6565 2004-02-20 Mark Mitchell <mark@codesourcery.com>
6568 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
6571 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
6572 for all type variants.
6574 2004-02-19 Mark Mitchell <mark@codesourcery.com>
6577 * decl.c (duplicate_decls): Return error_mark_node for invalid
6579 * name-lookup.c (push_namespace): Ignore the return value from
6581 * pt.c (push_template_decl_real): Robustify.
6584 * name-lookup.c (push_class_level_binding): Do not complain about
6585 adding a binding for a member whose name is the same as the
6586 enclosing class if the member is located in a base class of the
6589 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6592 * parser.c (cp_parser_new_expression): Parse an ill-formed
6593 direct-new-declarator after a parenthesized type-id to emit good
6596 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
6598 * cp-tree.def, cvt.c: Update copyright.
6600 2004-02-17 Mark Mitchell <mark@codesourcery.com>
6603 * cp-tree.h (abi_version_at_least): Remove.
6604 * mangle.c: Include flags.h.
6606 2004-02-15 Mark Mitchell <mark@codesourcery.com>
6609 * call.c (build_conditional_expr): Handle conversions between
6610 class types which result in differently cv-qualified type
6614 * class.c (delete_duplicate_fields_1): Remove.
6615 (delete_duplicate_fields): Likewise.
6616 (finish_struct_anon): Remove check for members with the same name
6617 as their enclosing class.
6618 (check_field_decls): Do not call duplicate_fields.
6619 * decl.c (grokdeclarator): Remove check for static data members
6620 with the same name as their enclosing class.
6621 * name-lookup.c (push_class_level_binding): Check for members with
6622 the same name as their enclosing class.
6624 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
6627 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
6629 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6632 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
6633 has full set of arguments.
6635 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6638 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
6640 2004-02-13 Mark Mitchell <mark@codesourcery.com>
6643 * cp-tree.h (delete_sanity): Change prototype.
6644 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
6645 Remove dead code. Adjust code to warn about deleting an array.
6646 * typekc.c (decay_conversion): Use build_address and build_nop.
6649 * search.c (accessible_p): Do not check access in thunks.
6652 * call.c (build_conditional_expr): Call force_rvalue on the
6653 non-void operand in the case that one result is a throw-expression
6654 and the other is not.
6656 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
6659 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
6660 the type name and look ahead for ::~, and bail out early with a
6661 better error message if the parse is going to fail.
6663 2004-02-12 Mark Mitchell <mark@codesourcery.com>
6665 * call.c (conversion_kind): New type.
6666 (conversion_rank): Likewise.
6667 (conversion): Likewise.
6668 (CONVERSION_RANK): New macro.
6669 (conversion_obstack): New variable.
6670 (obstack_initialized): Likewise.
6671 (z_candidate): Change type of convs and second_conv.
6672 (candidate_warning): New type.
6673 (IDENTITY_RANK): Remove.
6674 (EXACT_RANK): Likewise.
6675 (PROMO_RANK): Likewise.
6676 (STD_RANK): Likewise.
6677 (PBOOL_RANK): Likewise.
6678 (USER_RANK): Likewise.
6679 (ELLIPSIS_RANK): Likewise.
6680 (BAD_RANK): Likewise.
6681 (ICS_RANK): Likewise.
6682 (ICS_STD_RANK): Likewise.
6683 (ICS_USER_FLAG): Likewise.
6684 (ICS_ELLIPSIS_FLAG): Likewise.
6685 (ICS_THIS_FLAG): Likewise.
6686 (ICS_BAD_FLAG): Likewise.
6687 (NEED_TEMPORARY_P): Likewise.
6688 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
6689 (USER_CONV_CAND): Likewise.
6690 (USER_CONV_FN): Likewise.
6691 (conversion_obstack_alloc): New function.
6692 (alloc_conversion): Likewise.
6693 (validate_conversion_obstack): Likewise.
6694 (alloc_conversions): Likewise.
6695 (build_conv): Adjust to deal with new conversion data structures.
6696 (build_identity_conv): New function.
6697 (build_ambiguous_conv): Likewise.
6698 (standard_conversion): Adjust to deal with new conversion data
6700 (convert_class_to_reference): Likewise.
6701 (direct_reference_binding): Likewise.
6702 (reference_binding): Likewise.
6703 (implicit_conversion): Likewise.
6704 (add_candidate): Likewise.
6705 (add_function_candidate): Likewise.
6706 (add_conv_candidate): Likewise.
6707 (build_builtin_candidate): Likewise.
6708 (print_z_candidate): Likewise.
6709 (merge_conversion_sequences): Likewise.
6710 (build_user_type_conversion_1): Likewise.
6711 (build_user_type_conversion): Likewise.
6712 (build_new_function_call): Likewise.
6713 (build_object_call): Likewise.
6714 (conditional_conversion): Likewise.
6715 (build_conditional_expr): Likewise.
6716 (build_new_op): Likewise.
6717 (build_op_delete_call): Likewise.
6718 (convert_like_real): Likewise.
6719 (build_over_call): Likewise.
6720 (build_new_method_call): Likewise.
6721 (is_subseq): Likewise.
6722 (maybe_handle_implicit_object): Likewise.
6723 (maybe_handle_ref_bind): Likewise.
6724 (compare_ics): Likewise.
6725 (source_type): Likewise.
6726 (add_warning): Likewise.
6728 (can_convert_arg): Likewise.
6729 (can_convert_arg_bad): Likewise.
6730 (perform_implicit_conversion): Likewise.
6731 (perform_direct_initialization_if_possible): Likewise.
6732 (initialize_reference): Likewise.
6733 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
6734 * cp-tree.def (WRAPPER): Likewise.
6735 (IDENTITY_CONV): Remove.
6736 (LVALUE_CONV): Likewise.
6737 (QUAL_CONV): Likewise.
6738 (STD_CONV): Likewise.
6739 (PTR_CONV): Likewise.
6740 (PMEM_CONV): Likewise.
6741 (BASE_CONV): Likewise.
6742 (REF_BIND): Likewise.
6743 (USER_CONV): Likewise.
6744 (AMBIG_CONV): Likewise.
6745 (RVALUE_CONV): Likewise.
6746 * cp-tree.h (tree_wrapper): Remove.
6747 (WRAPPER_ZC): Remove.
6748 (lang_tree_node): Remove wrapper.
6749 (LOOKUP_SPECULATIVELY): Remove.
6750 (build_op_delete_call): Adjust prototype.
6751 (validate_conversion_obstack): Declare.
6752 (build_zc_wrapper): Remove.
6753 * cvt.c (convert_to_reference): Remove dead code.
6754 (ocp_convert): Likewise.
6755 * decl.c (redeclaration_error_message): Correct handling of
6757 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
6758 (cp_tree_node_structure): Remove WRAPPER case.
6759 * decl2.c (finish_file): Call validate_conversion_obstack.
6760 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
6761 (build_op_delete_call): Likewise.
6762 (build_x_delete): Likewise.
6763 (build_delete): Adjust call to build_op_delete_call.
6764 * pt.c (tsubst_friend_declaration): Adjust code to determine
6765 whether or not a friend template is a definition.
6766 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
6767 * tree.c (build_zc_wrapper): Remove.
6769 2004-02-12 Zack Weinberg <zack@codesourcery.com>
6771 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
6772 * cp-tree.h: Don't declare cxx_builtin_type_decls.
6773 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
6774 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
6776 2004-02-10 Mark Mitchell <mark@codesourcery.com>
6778 * typeck.c (lookup_destructor): Fix typo in error message.
6780 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
6782 * call.c, parser.c, tree.c: Fix comment typos.
6784 2004-02-07 Zack Weinberg <zack@codesourcery.com>
6787 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
6788 * decl.c (duplicate_decls, start_function): Likewise.
6790 2004-02-07 Zack Weinberg <zack@codesourcery.com>
6792 * name-lookup.c (pushdecl): Issue shadow warnings directly.
6793 * parser.c (free_parser_stacks): Delete.
6795 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
6797 * rtti.c: Update copyright.
6799 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6802 * decl.c (require_complete_types_for_parms): Do not insert
6803 error_mark_node in the parameter list.
6805 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6808 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
6809 error when terminator can not be found.
6811 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6813 Make-lang.in (po-generated): Delete.
6815 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6817 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
6818 targetm.calls.promote_prototypes.
6820 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6824 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6826 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6827 (handle_pragma_implementation): Likewise.
6829 2004-02-05 Mark Mitchell <mark@codesourcery.com>
6832 * typeck.c (lookup_destructor): Tweak error message.
6834 2004-02-05 Jan Hubicka <jh@suse.cz>
6836 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
6839 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6842 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
6843 code, only emits the diagnostic now. Added lookup of the identifier
6844 and support for qualified ids.
6845 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
6846 Parse an (invalid) type name as id-expression within a declarator.
6847 (cp_parser_simple_declaration): Use it.
6848 (cp_parser_member_declaration): Likewise.
6849 (cp_parser_make_typename_type): New function. Handle errors through
6850 cp_parser_diagnose_invalid_typename.
6851 (cp_parser_elaborated_type_specifier): Use it.
6853 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6856 * call.c (convert_like_real): Use "converting" rather than
6857 "argument" as the descriptive keyword to
6858 dubious_conversion_warnings.
6859 * typeck.c (convert_for_assignment): Do not call
6860 dubious_conversion_warnings.
6862 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6865 * init.c (build_delete): Emit a more informative error message in
6866 case of an incomplete type, and on the correct source line.
6868 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6870 * error.c, search.c: Update copyright.
6872 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6875 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
6876 linkage for the typeinfo name string.
6878 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6881 * cp-tree.h (fold_non_dependent_expr): New function.
6882 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
6883 (cp_parser_template_argument): Use fold_non_dependent_expr.
6884 (cp_parser_direct_declarator): Likewise.
6885 * pt.c (fold_non_dependent_expr): New function.
6886 (convert_nontype_argument): Use it.
6887 (tsubst_qualified_id): Simplify.
6888 (tsubst_copy_and_build): Likewise.
6890 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6892 * decl.c (cxx_push_function_context): Do not set
6893 current_function_is_thunk.
6894 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
6897 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6900 * pt.c (more_specialized_class): Increase processing_template_decl
6901 while partial ordering.
6903 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6906 * decl.c (start_function): Do not call pushdecl for any
6907 instantiation or specialization of a primary template.
6909 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6912 * parser.c (cp_parser_class_name): Robustify.
6915 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
6918 * semantics.c (finish_id_expression): Do not return an
6919 IDENTIFIER_NODE when lookup finds a PARM_DECL.
6921 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6924 * pt.c (build_non_dependent_expr): Do not build
6925 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
6928 * semantics.c (finish_id_expression): Do not return an
6929 IDENTIFIER_NODE when lookup finds a VAR_DECL.
6932 * parser.c (cp_parser_simple_declaration): When skipping to the
6933 end of the statement swallow the terminating semicolon.
6935 2004-02-02 Mark Mitchell <mark@codesourcery.com>
6938 * init.c (build_offset_ref): Improve error recovery for invalid
6939 uses of non-static member functions.
6942 * cp-tree.h (cp_build_type_attribute_variant): New function.
6943 * class.c (build_clone): Use cp_build_type_attribute_variant.
6944 * decl.c (duplicate_decls): Likewise.
6945 * pt.c (copy_default_args_to_explicit_spec): Likewise.
6946 (tsubst_function_type): Likewise.
6947 * tree.c (build_exception_variant): Check attributes before
6948 concluding that two types are the same.
6949 (cp_build_type-attribute_variant): New method.
6950 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
6953 * call.c (convert_class_to_reference): Keep better track of
6954 pedantically invalid user-defined conversions.
6956 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6959 * pt.c (tsubst_qualified_id): Improved error message when a type
6960 is expected but not found.
6962 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
6964 * class.c: Fix comment typos.
6966 * error.c: Likewise.
6967 * parser.c: Likewise.
6969 * search.c: Likewise.
6970 * typeck.c: Likewise.
6972 2004-01-30 Richard Henderson <rth@redhat.com>
6975 * method.c (use_thunk): Don't force_target_expr for void thunks.
6976 * tree.c (build_target_expr_with_type): Assert non-void type.
6977 (force_target_expr): Likewise.
6979 2004-01-30 Michael Matz <matz@suse.de>
6981 * parser.c (cp_parser_labeled_statement): Accept case ranges.
6983 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6987 * decl.c (grokdeclarator): Check immediatly type completeness for
6988 non-dependent types.
6990 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6993 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
6994 a sizeof expression.block
6996 2004-01-29 Mark Mitchell <mark@codesourcery.com>
6999 * mangle.c (write_encoding): Correct encoding of member template
7002 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7004 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7005 template name as it was `<::' (digraph typo).
7006 (cp_parser_nth_token_starts_template_argument_list_p): New function.
7007 (cp_parser_id_expression): Use it.
7008 (cp_parser_nested_name_specifier_opt): Likewise.
7009 (cp_parser_template_name): Likewise.
7010 (cp_parser_class_name): Likewise.
7011 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7013 2004-01-28 Mark Mitchell <mark@codesourcery.com>
7016 * typeck.c (merge_types): Do not merge attributes into
7020 * parser.c (cp_parser_direct_declarator): Do not prevent
7021 backtracking inside a parenthesized declarator.
7022 (cp_parser_parameter_declaration): Fix typo in comment.
7024 2004-01-28 Jan Hubicka <jh@suse.cz>
7026 * semantics.c (expand_body) Do emit_associated_thunks before
7029 2004-01-27 Devang Patel <dpatel@apple.com>
7031 * name-lookup.c: Include "debug.h"
7032 (do_namespace_alias): Invoke debug_hooks to emit debug info
7033 for namespace alias.
7034 (do_local_using_decl): Invoke debug_hooks to emit debug info
7036 (do_class_using_decl): Same.
7037 (do_toplevel_using_decl): Same.
7038 (do_using_directive): Same.
7039 (cp_emit_debug_info_for_using): New function.
7040 * Make-lang.in (cp/parser.o): Depend on debug.h
7041 (cp/name-lookup.o): Same.
7043 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7045 * cp-tree.h (language_function, lang_type_header): Use
7047 * name-lookup.h (cp_binding_level): Likewise.
7049 2004-01-26 Mark Mitchell <mark@codesourcery.com>
7052 * semantics.c (finish_for_expr): Check for unresolved overloaded
7055 * class.c (add_method): Just check processing_template_decl to
7056 determine whether or not we are within a template.
7057 * decl2.c (maybe_retrofit_in_chrg): Likewise.
7058 * init.c (decl_constant_value): Check the type of the declaration,
7060 * name-lookup.c (maybe_push_to_top_level): Rename to ...
7061 (push_to_top_level): ... this.
7062 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7063 * pt.c (push_template_decl_real): Reorder condition for speed.
7064 (convert_template_argument): Use dependency-checking functions in
7065 place of uses_template_parms.
7066 (lookup_template_class): Avoid calling uses_template_parms more
7068 (uses_template_parms): Reimplement, using dependency-checking
7070 (instantiate_class_template): Use push_to_top_level, not
7071 maybe_push_to_top_level.
7072 (type_unification_real): Simplify.
7073 (type_dependent_expression_p): Handle OFFSET_REFs and
7075 (any_dependent_template_arguments_p): Handle multiple levels of
7077 * semantics.c (expand_or_defer_fn): Do not check
7078 uses_template_parms for template instantiations.
7079 * typeck.c (comptypes): Avoid calling cp_type_quals.
7081 2004-01-25 Mark Mitchell <mark@codesourcery.com>
7084 * call.c (build_over_call): Do not convert arguments when
7085 processing a template.
7086 * pt.c (build_non_dependent_expr): Do not build a
7087 NON_DEPENDENT_EXPR for arithmetic constants.
7089 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7092 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7093 returns a TYPE_DECL. no further lookup is required.
7094 * semantics.c (check_template_template_default_arg): A TYPE_DECL
7095 is invalid. Rework to give better diagnostics.
7097 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7100 * pt.c (instantiate_class_template): Add an error_mark_node
7102 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
7104 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
7107 * decl.c (finish_function): Move the call to
7108 finish_fname_decls below the call to
7109 finish_eh_spec_block.
7111 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7113 * optimize.c, typeck2.c: Update copyright.
7115 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7117 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
7118 init.c, mangle.c, typeck.c: Update copyright.
7120 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
7122 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
7124 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7126 * Make-lang.in: Replace $(docdir) with doc.
7127 (c++.info, c++.srcinfo): Dummy entry.
7128 (c++.man, c++.srcman): New rules.
7129 (c++.install-man): Revamp rule.
7131 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7133 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
7134 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
7135 immediate $(shell) instead of deferred backquote.
7137 2004-01-19 Mark Mitchell <mark@codesourcery.com>
7140 * parser.c (cp_parser_postfix_expression): When encountering
7141 incomplete type on left-hand side of "->" or ".", treat the entire
7142 expression as erroneous.
7145 * call.c (build_field_call): Remove.
7146 (n_build_method_call): Likewise.
7147 (build_method_call): Likewise.
7148 (build_new_method_call): Do not call build_field_call.
7149 * class.c (n_build_method_call): Remove.
7150 (print_class_statistics): Do not print it.
7151 * cp-tree.h (build_method_call): Remove declaration.
7152 (finish_object_call_expr): Likewise.
7153 (build_new_1): Do not use build_method_call.
7154 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
7155 when the function appearing on the right-hand-side of "." or "->"
7156 is not actually a function.
7157 * pt.c (tsubst_copy_and_build): Likewise.
7158 * semantics.c (finish_object_call_expr): Remove.
7160 2004-01-18 Mark Mitchell <mark@codesourcery.com>
7163 * pt.c (tsubst): Use finish_typeof.
7165 2004-01-18 Jason Merrill <jason@redhat.com>
7168 * except.c (build_throw): In a template, set
7169 current_function_returns_abnormally.
7171 2004-01-17 Fred Fish <fnf@intrinsity.com>
7174 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
7175 except don't call array_type_nelts() with a VECTOR_TYPE.
7177 2004-01-16 Jan Hubicka <jh@suse.cz>
7179 * mangle.c (write_mangled_name): Remove inline modifier.
7181 2004-01-16 Mark Mitchell <mark@codesourcery.com>
7184 * decl.c (compute_array_index_type): Fix grammar in comment.
7185 * init.c (build_zero_init): Handle zero-sized arrays correctly.
7188 * call.c (name_as_c_string): Print conversion operator names
7192 * call.c (initialize_reference): Pass -1 for inner parameter to
7195 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7198 * parser.c (cp_parser_base_specifier): Check for an invalid
7199 keyword `typename' and emit an user-friendly error message.
7201 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7204 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7205 (handle_pragma_implementation): Likewise.
7207 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7210 * typeck.c (build_class_member_access_expr): Allow to access members
7211 of the currently open class.
7212 (finish_class_member_access_expr): Likewise.
7214 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7217 * name-lookup.c (validate_nonmember_using_decl): Take scope and
7218 name by value, instead of computing them.
7219 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
7220 arguments. Pass them to validate_nonmember_using_decl.
7221 * name-lookup.h (do_local_using_decl): Adjust.
7222 (do_toplevel_using_decl): Likewise.
7223 * parser.c (cp_parser_using_declaration): Likewise.
7224 * pt.c (tsubst_expr): Likewise.
7226 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7230 * name-lookup.c (qualified_lookup_using_namespace): Search
7231 strongly-associated namespaces first, and only then try other
7234 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
7236 * Make-lang.in (c++.srcextra): Dummy entry.
7238 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7241 * parser.c (cp_parser_template_name): Don't try to parse a
7242 conversion-function-id, as it cannot be a template-name.
7243 (cp_parser_simple_type_specifier): Check for invalid template-ids
7244 even after a built-in type.
7246 2004-01-14 Jan Hubicka <jh@suse.cz>
7249 * pt.c (instantiate_decl): Do not increase function_depth.
7251 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
7255 * parser.c (cp_parser_elaborated_type_specifier): Warn about
7256 attributes and discard.
7257 * decl.c (xref_tag): Don't overwite existing attributes with
7260 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7263 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
7264 is no destructor while looking up a BIT_NOT_EXPR.
7266 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7268 * cxxfilt.c: Remove unused file.
7270 2004-01-14 Jan Hubicka <jh@suse.cz>
7272 Partial fix to PR c++/12850
7273 * decl2.c (mark_used): Do not proactively instantiate templates
7274 when compiling in unit-at-a-time or not optimizing.
7275 * optimize.c (maybe_clone_body): Do not increase function depth.
7277 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7280 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
7282 2004-01-12 Steven Bosscher <stevenb@suse.de>
7285 * parser.c (cp_parser_member_declaration): Any non-type is also
7286 not a class or a function.
7288 2004-01-12 Jason Merrill <jason@redhat.com>
7291 * class.c (build_base_path): Do not mark vtable references as
7293 (build_vtbl_ref_1): Likewise.
7295 2004-01-12 Richard Henderson <rth@redhat.com>
7298 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
7299 (store_init_value): Use it.
7300 * decl.c (check_initializer): Expect full initialization code
7301 from store_init_value.
7302 * init.c (expand_aggr_init_1): Likewise.
7303 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
7305 2004-01-12 Mark Mitchell <mark@codesourcery.com>
7307 * class.c (layout_class_type): For non-POD class types, also copy
7308 the DECL_SIZE and DECL_MODE of fields to the base class type.
7310 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7313 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
7314 calling regenerate_decl_from_template.
7316 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
7319 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
7320 decl-specifier occurring along with a class definition.
7322 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
7324 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
7325 clauses to comments describing declares_class_or_enum.
7326 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
7329 2004-01-12 Jan Hubicka <jh@suse.cz>
7331 * pt.c (for_each_template_parm): Do not check for duplicates.
7332 (for_each_template_parm): Use walk_tree duplicate checking code.
7334 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
7337 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
7338 is error_mark_node, don't add any more decl_specs.
7339 (cp_parser_init_declarator): After committing to a declaration, if
7340 the decl_specifiers start with error_mark_node, issue an error and
7341 change the type to "int".
7343 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
7346 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
7348 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7352 * pt.c (tsubst): Substitution must fail if we are attempting to
7353 create an array with element type that is an abstract class type.
7354 * decl.c (cp_finish_decl): Strip pointers and array types recursively
7355 before calling abstract_virtuals_error.
7357 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
7359 * name-lookup.c (qualified_lookup_using_namespace): Consider
7360 strong using directives even if we've already found a binding.
7362 2004-01-09 Mark Mitchell <mark@codesourcery.com>
7364 * cp-tree.h (cxx_expand_expr): Change prototype.
7365 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
7367 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7370 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
7371 looking into them recursively. They can be there because of the
7372 new __offsetof__ extension.
7374 2004-01-07 Zack Weinberg <zack@codesourcery.com>
7376 * parser.c (cp_parser_save_member_function_body): Mark the
7379 2004-01-05 Mark Mitchell <mark@codesourcery.com>
7382 * class.c (build_clone): Copy type attributes from the original
7383 function to the clone.
7386 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
7387 references as constant.
7390 * parser.c (cp_parser_explicit_instantiation): Improve error
7392 (cp_parser_require): Improve indication of the error location.
7395 * parser.c (cp_parser_class_head): Reorder logic to check for
7396 invalid qualification.
7398 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7401 * name-lookup.c (lookup_using_namespace): Remove spacesp
7403 (unqualified_namespace_lookup): Likewise.
7404 (lookup_qualified_name): Adjust accordingly.
7405 (lookup_name_real): Likewise.
7406 (lookup_arg_dependent): Do not eliminate the namespace of the
7407 functions found by unqualified name lookup unless that is the
7410 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
7412 * semantics.c (push_deferring_access_checks): Fix format.
7413 (resume_deferring_access_checks): Likewise.
7414 (stop_deferring_access_checks): Likewise.
7415 (pop_deferring_access_checks): Likewise.
7416 (get_deferred_access_checks): Likewise.
7417 (pop_to_parent_deferring_access_checks): Likewise.
7418 (perform_deferred_access_checks): Likewise.
7419 (perform_or_defer_access_check): Likewise.
7421 2004-01-04 Richard Henderson <rth@redhat.com>
7423 * call.c (build_over_call): Don't create a save_expr of an
7424 aggregate, but rather its address.
7426 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7429 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
7430 an offsetof expression.
7432 * parser.c (cp_parser_parameter_declaration): Fix comment.
7435 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
7436 (reference_binding): Set it when appropriate.
7437 (build_temp): New function, split out from ...
7438 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
7439 (initialize_reference): Likewise.
7442 * parser.c (cp_parser): Add in_type_id_in_expr_p.
7443 (cp_parser_new): Initialize it.
7444 (cp_parser_postfix_expression): Set it.
7445 (cp_parser_sizeof_operand): Likewise.
7446 (cp_parser_parameteR_declaration): Do not commit early to tenative
7447 parsers when in_type_id_in_expr_p is set.
7449 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7452 * parser.c (cp_parser_template_argument): Don't call
7453 make_unbound_class_template directly.
7454 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
7455 UNBOUND_CLASS_TEMPLATE tree node.
7457 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
7460 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
7462 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7465 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
7466 (DECL_FUNCTION_TEMPLATE_P): Use it.
7467 (DECL_CLASS_TEMPLATE_P): Likewise.
7468 * parser.c (cp_parser_lookup_name): Add is_template parameter.
7469 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
7470 (cp_parser_template_name): Likewise.
7471 (cp_parser_elaborated_type_specifier): Likewise.
7472 (cp_parser_namespace_name): Likewise.
7473 (cp_parser_class_name): Likewise.
7474 (cp_parser_lookup_name_simple): Likewise.
7476 See ChangeLog.3 for earlier changes.