1 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
3 * decl.c (grokvardecl): Don't exempt anonymous types from having
4 linkage for variables that have linkage other than "C".
6 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
8 * cp-objcp-common.h, error.c: Update copyright.
10 2005-02-22 Mark Mitchell <mark@codesourcery.com>
13 * decl.c (start_decl_1): Don't clear TREE_READONLY.
14 (cp_finish_decl): Likewise.
15 (complete_vars): Call cp_apply_type_quals_to_decl.
16 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
17 cases where that's not valid.
20 * init.c (integral_constant_value): Iterate if the value of a decl
24 * parser.c (cp_parser_class_head): Check for redefintions here.
25 * semantics.c (begin_class_definition): Not here.
28 * decl2.c (build_anon_union_vars): Add type parameter.
29 (finish_anon_union): Pass it.
32 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
33 Handle STATEMENT_LIST.
36 * parser.c (cp_parser_direct_declarator): Always complain about
37 non-constant array bounds when in a function scope.
38 * semantics.c (finish_id_expression): Do not mark dependent names
41 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
45 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
46 * decl.c (grokdeclarator): Pedwarn about qualifying a function
48 Add qualifiers when declaring a typedef of a function type.
49 Member function pointers pick up the qualifiers of the typedef
51 Don't complain about creating cv-qualified function types.
52 Complain about qualified function typedefs that are used to
53 declare non-static member functions or free functions.
54 Use cp_apply_type_quals_to_decl.
55 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
56 (grokclassfn): Use cp_apply_type_quals_to_decl.
57 * error.c (dump_type_suffix): Print qualifiers for function
59 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
60 (tsubst): When substituting a function type into a member
61 pointer type, pass along the qualifiers.
62 (unify): Unify member pointers to member function pointers.
63 * tree.c (cp_build_qualified_type_real): Function types may be
64 qualified. This includes restrict qualifiers.
65 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
66 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
67 added to function types.
69 2005-02-20 Zack Weinberg <zack@codesourcery.com>
72 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
73 c_common_to_target_charset. Delete bogus comment.
75 2005-02-18 Richard Henderson <rth@redhat.com>
78 * except.c (do_get_exception_ptr): New.
79 (expand_start_catch_block): Use it.
81 2005-02-19 Jakub Jelinek <jakub@redhat.com>
83 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
84 if type is not error_mark_node.
86 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
89 * decl2.c (grokfield): Do not apply attributes to template parameters
90 as they are ignored by tsubst anyway.
92 2005-02-18 Jakub Jelinek <jakub@redhat.com>
95 * decl.c (start_decl_1): Clear TREE_READONLY flag if
96 its type has TYPE_NEEDS_CONSTRUCTING.
97 (complete_vars): Likewise.
99 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
102 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
103 template along with TYPE_SIZE.
106 * semantics.c (perform_deferred_access_checks): Use
107 get_deferred_access_checks to get the top of the stack.
109 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
112 * class.c (add_implicitly_declared_members, check_field_decl)
113 (check_field_decls, check_bases): Remove arguments, tests and
114 assignments of cant_have_default_ctor-related variables.
116 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
118 * decl2.c (mark_used): Set the source location of the used decl to
119 the current input location here...
120 * method.c (synthesize_method): ... not here. Set input_location
121 from the decl instead.
123 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
126 * parser.c (cp_parser_late_parsing_for_member): Use
127 current_function_decl as scope to push to and from.
130 * pt.c (check_explicit_specialization): Make sure namespace
131 binding lookup found an overloaded function.
132 (lookup_template_function): Just assert FNS is an overloaded
136 * decl.c (grokdeclarator): Check for error mark node in ptrmem
139 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
142 * decl.c (redeclaration_error_message): Report redefinition of
143 pure virtual function.
145 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
148 * class.c (build_simple_base_path): Build the component_ref
150 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
151 rather than using lookup_base.
152 * search.c (dfs_walk_once): Add non-recursive assert check.
153 * typeck.c (build_class_member_access_expr): It is possible for
154 the member type to be both const and volatile.
156 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
160 * pt.c (maybe_check_template_type): Remove.
161 * cp-tree.h (maybe_check_template_type): Remove prototype.
162 * name-lookup.c (maybe_process_template_type_declaration): Don't
163 use maybe_check_template_type.
165 2005-02-11 Richard Henderson <rth@redhat.com>
168 * pt.c (get_mostly_instantiated_function_type): Save and restore
169 flag_access_control instead of push/pop_access_scope.
171 2005-02-10 Mark Mitchell <mark@codesourcery.com>
174 * decl.c (reshape_init): Issue warnings about missing braces.
176 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
178 * cp-tree.def, except.c, ptree.c: Update copyright.
180 2005-02-09 Mark Mitchell <mark@codesourcery.com>
183 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
184 attempting name lookup.
186 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
189 * call.c (initialize_reference): Robustify.
192 * decl.c (grokdeclarator): Check for invalid use of destructor
196 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
197 names with invalid types.
200 * parser.c (cp_parser_direct_declarator): Allow type-dependent
201 expressions as array bounds.
204 * parser.c (cp_parser_attributes_list): Allow empty lists.
206 2005-02-08 Mark Mitchell <mark@codesourcery.com>
209 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
210 (check_bases): Give warnings about a base class with a
211 non-virtual destructor, even if it is implicit.
212 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
213 (maybe_warn_about_overly_private_class): Don't use
215 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
216 (check_for_override): Give it external linkage.
217 (add_implicitly_declared_members): Generate destructors lazily.
218 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
220 (check_bases_and_members): Call check_methods before
222 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
224 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
225 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
226 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
227 (lang_type_class): Add lazy_destructor.
228 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
229 (CLASSTYPE_DESTRUCTORS): Robustify.
230 (TYPE_HAS_DESTRUCTOR): Remove.
231 (check_for_override): Declare.
232 (build_vbase_delete): Remove.
233 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
235 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
236 * except.c (dtor_nothrow): Lazily create destructors if necessary.
237 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
238 * init.c (build_delete): Lazily create destructors, if necessary.
239 (build_vbase_delete): Remove.
240 * method.c (locate_dtor): Simplify.
241 (implicitly_declare_fn): Add support for destructors.
242 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
244 * pt.c (check_explicit_specialization): Don't use
246 (instantiate_class_template): Likewise.
247 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
248 * rtti.c (emit_support_tinfos): Robustify.
249 * search.c (lookup_fnfields_1): Lazily create destructors.
250 * typeck.c (build_class_member_access_expr): Remove
251 PSEUDO_DTOR_EXPR handling.
252 (lookup_destructor): Likewise.
254 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
256 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
259 2005-02-07 Mark Mitchell <mark@codesourcery.com>
261 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
262 on boolean variables.
263 (cp_lexer_stop_debugging): Likewise.
265 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
268 * parser.c (cp_parser_pure_specifier): Emit a specific error
269 message with an invalid pure specifier.
270 * decl2.c (grok_function_init): Remove.
271 (grokfield): An initializer for a method is a always a pure
274 2005-02-02 Matt Austern <austern@apple.com>
277 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
278 * parser.c (cp_parser_postfix_expression): Accept function call in
279 constant expression if builtin_valid_in_constant_expr_p is true
281 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
282 * semantics.c (finish_id_expression): Accept function call in constant
283 expression if builtin_valid_in_constant_expr_p is true for that
285 * tree.c (builtin_valid_in_constant_expr_p): New.
287 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
290 * pt.c (check_instantiated_args): Improve error message.
291 Fix logic when to print its second part.
293 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
295 * cp-tree.h (complete_type_or_else): Remove macro.
296 (complete_type_or_diagnostic): Rename to complete_type_or_else
297 and remove last argument.
298 * typeck.c (complete_type_or_diagnostic): Rename to
299 complete_type_or_else and remove last argument.
301 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
303 * cp-tree.h (commonparms): Remove prototype.
304 (convert_arguments): Likewise.
305 (PFN_FROM_PTRMEMFUNC): Remove.
306 * typeck.c (commonparms): Make static.
307 (convert_arguments): Add prototype. Make static.
308 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
310 2005-01-31 Mark Mitchell <mark@codesourcery.com>
312 * parser.c (cp_parser_primary_expression): Don't complain about
313 floating-point literals in integral constant expressions when
316 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
318 * parser.c (cp_parser_template_id): Revert comment patch too.
323 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
324 Issue an error when creating the template id.
325 * pt.c (fn_type_unification): Return early if the explicit
326 template arg list is an error_mark_node.
328 2005-01-31 Mark Mitchell <mark@codesourcery.com>
330 * decl.c (build_enumerator): Do not issue duplicate error messages
331 about invalid enumeration constants.
332 * parser.c (cp_parser_non_integral_constant_expression): Always
333 set parser->non_integral_constant_expression_p.
334 (cp_parser_primary_expression): Add cast_p parameter. Issue
335 errors about invalid uses of floating-point literals in
337 (cp_parser_postfix_expression): Add cast_p parameter.
338 (cp_parser_open_square_expression): Pass it.
339 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
340 (cp_parser_unary_expression): Likewise.
341 (cp_parser_new_placement): Pass it.
342 (cp_parser_direct_new_declarator): Likewise.
343 (cp_parser_new_initializer): Likewise.
344 (cp_parser_cast_expression): Add cast_p parameter.
345 (cp_parser_binary_expression): Likewise.
346 (cp_parser_question_colon_clause): Likewise.
347 (cp_parser_assignment_expression): Likewise.
348 (cp_parser_expression): Likewise.
349 (cp_parser_constant_expression): If an integral constant
350 expression is invalid, return error_mark_node.
351 (cp_parser_expression_statement): Pass cast_p.
352 (cp_parser_condition): Likewise.
353 (cp_parser_iteration_statement): Likewise.
354 (cp_parser_jump_statement): Likewise.
355 (cp_parser_mem_initializer): Likewise.
356 (cp_parser_template_argument): Likewise.
357 (cp_parser_parameter_declaration): Likewise.
358 (cp_parser_initializer): Likewise.
359 (cp_parser_throw_expression): Likewise.
360 (cp_parser_attribute_list): Likewise.
361 (cp_parser_simple_cast_expression): Likewise.
362 (cp_parser_functional_cast): Likewise.
363 (cp_parser_late_parsing_default_args): Likewise.
364 (cp_parser_sizeof_operand): Save/restore
365 non_integral_constant_expression_p.
367 2005-01-31 Mike Stump <mrs@apple.com>
369 * parser.c (cp_lexer_new_main): Get the first token, first, before
372 2005-01-31 Mark Mitchell <mark@codesourcery.com>
374 * decl.c (start_decl): Add missing parentheses.
376 2005-01-30 Mark Mitchell <mark@codesourcery.com>
379 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
380 * decl.c (duplicate_decls): Do not discard
381 DECL_IMPLICIT_INSTANTIATION when merging declarations.
382 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
383 variables that do not have DECL_USE_TEMPLATE.
386 * decl.c (grokdeclarator): Refactor code so that qualified names
387 are never allowed as the declarator in a typedef.
390 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
391 builtin declarations.
394 * call.c (convert_like_real): Inline call to
395 dubious_conversion_warnings here.
396 * cp-tree.h (dubious_conversion_warnings): Remove.
397 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
398 setting TREE_NEGATED_INT.
399 * typeck.c (dubious_conversion_warnings): Remove.
402 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
405 2005-01-28 Mark Mitchell <mark@codesourcery.com>
408 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
412 * pt.c (redeclare_class_template): Robustify.
414 2005-01-27 Steven Bosscher <stevenb@suse.de>
416 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
417 instead of SWITCH_EXPR ones.
418 * pt.c (tsubst_expr): Likewise.
419 * semantics.c (begin_switch_stmt, finish_switch_cond,
420 finish_switch_stmt): Likewise.
422 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
425 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
427 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
429 * class.c (abort_fndecl_addr): New variable.
430 (build_vtbl_initializer): If we have a pure virtual function
431 share the abort function's address.
432 Include gt-cp-class.h at the end.
433 * config-lang.in (gtfiles): Add cp/class.c.
435 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
437 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
438 (pp_cxx_function_definition): Make static.
439 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
440 (pp_cxx_function_definition): Likewise.
442 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
444 * name-lookup.c (print_binding_level): Make static.
445 (constructor_name_full): Make static inline.
446 (current_decl_namespace): Make static.
447 * name-lookup.h (constructor_name_full): Remove prototype.
448 (print_binding_level): Likewise.
449 (current_decl_namespace): Likewise.
451 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
453 * decl.h (debug_bindings_indentation): Remove.
455 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
457 * typeck.c: Fix a comment typo.
459 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
462 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
464 (tsubst): Use fold_decl_constant_value in place of a bare call to
465 integral_constant_value.
467 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
469 * typeck.c (more_qualified_p): Remove.
470 * cp-tree.h: Remove the corresponding prototype.
472 2005-01-19 Matt Austern <austern@apple.com>
474 * typeck.c (comptypes): Handle return code from objc_comptypes
477 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
479 * cp-tree.h, name-lookup.h: Remove unused prototypes.
481 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
484 * semantics.c (finish_id_expression): Disable access checking for
485 already lookuped FIELD_DECL.
487 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
489 * decl.c (delete_block): Remove.
490 * cp-tree.h: Remove the corresponding prototype.
492 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
493 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
495 * cp-tree.h: Remove the corresponding prototypes.
497 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
498 cp_update_decl_after_saving, name_p): Remove.
499 * cp-tree.h: Remove the corresponding prototypes.
501 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
504 * semantics.c (finish_asm_stmt): Strip nops off
505 input memory operands.
507 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
509 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
510 typeck2.c: Update copyright.
512 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
514 * class.c (get_enclosing_class): Remove.
515 * cp-tree.h: Remove the corresponding prototypes.
517 * cvt.c (convert_lvalue): Remove.
518 * cp-tree.h: Remove the corresponding prototype.
520 * pt.c (tinst_for_decl): Remove.
521 * cp-tree.h: Remove the corresponding prototypes.
523 * tree.c (hash_chainon): Remove.
524 * cp-tree.h: Remove the corresponding prototypes.
526 2005-01-15 Jakub Jelinek <jakub@redhat.com>
529 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
530 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
532 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
534 * Make-lang.in (cp-warn): Don't append $(WERROR).
536 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
538 * cp-tree.h: Fix a comment typo.
540 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
543 * pt.c (tsubst_qualified_id): Call convert_from_reference.
545 2005-01-06 Mark Mitchell <mark@codesourcery.com>
548 * class.c (add_implicitly_declared_members): Remove dead code.
549 * decl.c (grokfndecl): Add sfk parameter. Use it do set
551 (grokdeclarator): Adjust calls to grokfndecl.
552 * method.c (implicitly_declare_fn): Improve documentation.
553 * parser.c (cp_parser_direct_declarator): Do not consider a
554 function to be a constructor if the containing class was
555 originally anonymous.
557 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
560 * search.c (lookup_field_1): Handle using declaration in
561 class template partial specialization.
563 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
566 * pt.c (push_access_scope): Handle friend defined in class.
567 (pop_access_scope): Likewise.
569 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
572 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
573 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
574 array-new handling code. Use build_x_binary_op.
576 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
579 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
580 * name-lookup.h (push_scope): Return pushed scope, not flag.
581 * name-lookup.c (push_scope): Return scope that should be popped,
583 * decl.c (start_decl): Adjust.
584 (grokfndecl): Adjust scope push and pop.
585 * decl2.c (check_classfn): Likewise.
586 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
587 cp_parser_init_declarator, cp_parser_direct_declarator,
588 cp_parser_class_specifier, cp_parser_class_head,
589 cp_parser_lookup_name,
590 cp_parser_constructor_declarator_p): Likewise.
591 * pt.c (instantiate_class_template,
592 resolve_typename_type): Likewise.
594 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
597 * parser.c (cp_parser_unqualified_id): Do not issue error message
598 for typedef-name as destructor declarator when performing an
599 uncommitted tentative parse.
601 2005-01-01 Steven Bosscher <stevenb@suse.de>
604 * decl.c (finish_function): Fix comment. Annotate the compiler
605 generated return with the current file name and line 0.
607 2004-12-31 Richard Henderson <rth@redhat.com>
610 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
611 * class.c (build_vtable): Don't conditionallize setting it
612 based on DWARF2_DEBUG.
613 (layout_class_type): Set DECL_IGNORED_P.
614 * decl2.c (get_guard): Likewise.
615 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
616 * tree.c (build_local_temp): Likewise.
618 2004-12-30 Mark Mitchell <mark@codesourcery.com>
620 * cp-tree.h (cp_declarator): Split "name" field into
621 qualifying_scope and unqualified_name.
622 * decl.c (get_scope_of_declarator): Adjust accordingly.
623 (grokdeclarator): Likewise.
624 * decl2.c (grokfield): Likewise, and adjust call to
626 * name-lookup.c (do_class_using_decl): Split "decl" into
627 "scope" and "name". Remove unnecessary code.
628 * name-lookup.h (do_class_using_decl): Adjust declaration.
629 * parser.c (make_id_declarator): Split "id" into qualifying_scope
630 and unqualified_name.
631 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
632 (cp_parser_direct_declarator): Adjust to handle the fact that
633 cp_parser_declarator_id no longer returns a SCOPE_REF.
634 (cp_parser_direct_declarator): Likewise.
635 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
637 (cp_parser_member_declaration): Adjust call to make_id_declarator.
638 (cp_parser_check_declarator_template_parameters): Do not expect a
641 * decl.c (duplicate_decls): Call ggc_free on declarations we will
642 not be needing any longer.
645 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
647 2004-12-28 Richard Henderson <rth@redhat.com>
650 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
651 constraints. Mark memory inputs addressable.
653 2004-12-27 Jason Merrill <jason@redhat.com>
655 * decl.c (expand_static_init): Don't use shortcut if
656 targetm.relaxed_ordering.
658 2004-12-27 Mark Mitchell <mark@codesourcery.com>
661 * decl.c (check_tag_decl): Robustify.
663 2004-12-23 Mark Mitchell <mark@codesourcery.com>
666 * parser.c (cp_parser_error): Issue better messages about
667 #pragma in locations where it is not permitted.
670 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
672 * cvt.c (convert_to_void): Fix typo in comment.
674 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
677 * pt.c (check_explicit_specialization): Use the argument list from
678 the definition in a template function specialization definition.
680 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
683 * pt.c (check_explicit_specialization): Use special logic to validate
684 befriended specializations.
686 2004-12-22 Mark Mitchell <mark@codesourcery.com>
688 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
691 * call.c (build_this): In templates, do not bother with
693 * typeck.c (unary_complex_lvalue): In a template, always refuse
697 * cp-gimplify.c (cp_genericize): Relax assertion.
700 * cvt.c (convert_to_void): Warn about unused values.
703 * rtti.c (emit_support_tinfos): On systems without weak symbols,
704 emit the runtime library type-info objects as non-COMDAT.
706 2004-12-21 Mark Mitchell <mark@codesourcery.com>
709 * call.c (convert_like_real): Do not permit the use of a copy
710 constructor to copy a packed field.
713 * decl.c (grokdeclarator): Return error_mark_node, not
714 void_type_node, to indicate errors.
715 * parser.c (cp_parser_template_parameter_list): Robustify.
716 (cp_parser_template_parameter): Likewise.
719 * tree.c (cp_tree_equal): Handle OVERLOAD.
721 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
723 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
724 * name-lookup.c (pushdecl_class_level): Likewise.
726 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
728 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
730 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
733 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
734 check to see if contains the pointer. Insert the statement before
737 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
740 * decl.c (check_initializer): Check string initializer of array is
742 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
743 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
744 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
746 * cp-tree.def (TEMPLATE_TYPE_PARM,
747 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
748 for better code efficiency.
749 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
750 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
751 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
752 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
753 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
754 TYPE_PTROBV_P): Likewise.
757 * method.c (do_build_copy_constructor): Refactor. Don't const
758 qualify a mutable field.
759 (do_build_assign_ref): Likewise.
761 2004-12-20 Matt Austern <austern@apple.com>
764 * decl.c (make_rtl_for_nonlocal_decl): Use
765 set_builtin_user_assembler_name.
767 2004-12-19 Mark Mitchell <mark@codesourcery.com>
769 * cp-tree.h (note_decl_for_pch): New function.
770 * class.c (build_clone): Call note_decl_for_pch.
771 * semantics.c (finish_member_declaration): Likewise.
772 (note_decl_for_pch): New function.
774 2004-12-17 Steven Bosscher <stevenb@suse.de>
776 * init.c (build_zero_init): max_index is the number of
779 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
782 * class.c (add_method): Do not push conversion operators into a
785 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
786 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
788 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
791 * cp-tree.h (integral_constant_value): Declare.
792 * call.c (null_ptr_cst_p): Use integral_constant_value, not
794 (convert_like_real): Likewise.
795 * class.c (check_bitfield_decl): Likewise.
796 * cvt.c (ocp_convert): Likewise.
797 (convert): Remove unnecessary decl_constant_value call.
798 * decl.c (compute_array_index_type): Use integral_constant_value,
799 not decl_constant_value.
800 (build_enumerator): Likewise.
801 * decl2.c (grokfield): Likewise.
802 * init.c (decl_constant_value): Simplify.
803 (integral_constant_value): New.
804 * pt.c (fold_decl_constant_value): Use integral_constant_value,
805 remove subsequent check.
806 (tsubst): Use integral_constant_value, not decl_constant_value.
807 (tsubst_copy, unify): Likewise.
808 * typeck.c (decay_conversion): Likewise.
809 (build_compound_expr): Remove unnecessary decl_constant_value
811 (build_static_cast_1, build_reinterpret_cast_1):
812 (convert_for_assignment): Remove comment about not calling
815 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
818 * pt.c (instantiate_class_template): Set input_location for
820 (tsubst_friend_function): Don't set input_location here.
821 Make sure the context is complete if necessary.
823 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
826 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
829 2004-12-14 Mark Mitchell <mark@codesourcery.com>
832 * decl.c (make_typename_type): Do not handle namespace-scoped
834 (tag_name): Handle typename_type.
835 (check_elaborated_type_specifier): Handle typenames.
836 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
838 (cp_parser_elaborated_type_specifier): Use
839 cp_parser_diagnose_invalid_type_name.
841 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
844 * init.c (build_zero_init): If the max_index is 0, there is no
845 need to create a RANGE_EXPR.
847 2004-12-14 Mark Mitchell <mark@codesourcery.com>
850 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
852 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
855 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
856 REFERENCE_REF_P is dereferencing a reference type.
857 * typeck.c (build_static_cast): Convert from reference even in a
859 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
861 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
863 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
864 (cp_parser_name_lookup_error): Use it.
865 (cp_parser_check_for_invalid_template_id): Likewise.
866 (cp_parser_skip_to_closing_parenthesis): Likewise.
867 (cp_parser_nested_name_specifier_opt): Likewise.
868 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
869 (cp_parser_parameter_declaration_list): Likewise.
870 (cp_parser_parameter_declaration): Likewise.
871 (cp_parser_template_name): Let cp_parser_simulate_error perform
873 (cp_parser_committed_to_tentative_parse): Remove.
875 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
878 * class.c (build_base_path): Convert the zero constant to the correct
881 2004-12-13 Mark Mitchell <mark@codesourcery.com>
884 * class.c (layout_class_type): Determine the visibility of static
887 2004-12-12 Roger Sayle <roger@eyesopen.com>
890 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
891 condition is a constant and the unexecuted clause is empty.
893 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
896 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
898 2004-12-09 Matt Austern <austern@apple.com>
901 * name-lookup.c (do_nonmember_using_decl): A real function
902 declaration takes precedence over an anticipated declaration.
904 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
906 * parser.c (cp_parser_member_declaration): Fix comment typo.
908 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
911 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
914 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
917 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
919 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
922 * init.c (build_zero_init): Build a RANGE_EXPR for an array
925 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
927 * typeck.c: Remove DOS line endings.
929 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
932 * decl.c (lookup_and_check_tag): Diagnose nested class with
933 the same name as enclosing class.
935 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
938 * cp-tree.h (REFERENCE_REF_P): New.
939 (CPTI_TYPE_INFO_TYPE): Rename to ...
940 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
941 (CPTI_TYPE_INFO_REF_TYPE): Remove.
942 (type_info_type_node): Rename to ...
943 (const_type_info_type_node): ... here.
944 (type_info_ref_type): Remove.
945 * call.c (build_user_type_conversion): Reformat.
946 (resolve_args): Do not convert_from_reference.
947 (build_object_call): Call convert_from_reference.
948 (prep_operand): Do not convert_from_reference.
949 (build_new_method_call): Likewise.
950 * class.c (build_vfield_ref): Likewise.
951 * cvt.c (convert_to_reference): Likewise.
952 (convert_from_reference): Build INDIRECT_REF here, not with
954 (convert_force): Do not convert_from_reference.
955 (build_expr_type_conversion): Likewise.
956 * decl.c (grok_reference_init): Likewise.
957 * decl2.c (delete_sanity): Likewise.
958 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
959 * init.c (build_dtor_call): Do not convert_from_reference.
960 * parser.c (cp_parser_template_argument): Unwrap indirected
961 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
962 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
963 convert_from_reference, if indicated.
964 <case CALL_EXPR>: Do not convert_from_reference.
965 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
966 (tsubst_initializer_list): Do not convert_from_reference.
967 * rtti.c (init_rtti_processing): Adjust node creation.
968 (throw_bad_typeid): Use const_type_info_type_node.
969 Do not convert_from_reference.
970 (typeid_ok_p): Use const_type_info_type_node.
971 (build_typeid, get_typeid): Always return type_info typed node.
972 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
973 * semantics.c (finish_stmt_expr_expr): Do not
974 convert_from_reference.
975 (finish_id_expression): Convert_from_reference as appropriate.
976 * typeck.c (decay_conversion): Do not convert_from_reference.
977 (finish_class_member_access_expr): Likewise.
978 (build_indirect_ref): Use POINTER_TYPE_P.
979 (convert_arguments): Do not convert_from_reference.
980 (build_modify_expr): Likewise.
981 (convert_for_initialization): Likewise.
982 * typeck2.c (build_x_arrow): Likewise.
984 2004-12-07 Ziemowit Laski <zlaski@apple.com>
986 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
987 field to 'objc_info'.
989 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
991 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
993 2004-12-07 Roger Sayle <roger@eyesopen.com>
995 * name-lookup.c (leave_scope): We only need to update
996 class_binding_level when leaving a class scope.
998 2004-12-06 Ziemowit Laski <zlaski@apple.com>
1000 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1002 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1004 PR c++/17011, c++/17971
1005 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1007 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1008 error_mark_node after member substitution.
1009 * semantics.c (finish_id_expression): Call
1010 finish_non_static_data_member for non-dependent FIELD_DECL.
1012 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
1015 * decl.c (grokdeclarator): Make sure class in pointer to member is
1018 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1021 * parser.c (cp_parser_new_type_id): Move array size expression
1022 checks from here ...
1023 * init.c (build_new): ... to here.
1025 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1028 * parser.c (cp_parser_class_head): Return NULL_TREE when
1029 push_template_decl fails. Update comment.
1031 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1033 PR c++/15664, c++/18276
1034 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
1035 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1037 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1040 * parser.c (cp_parser_type_specifier): Catch template declaration
1043 2004-12-01 Matt Austern <austern@apple.com>
1045 * name-lookup.c (namespace_binding): Omit alias check for global
1048 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
1051 * parser.c (cp_parser_class_name): Check decl's type is not
1055 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1056 derived to base conversion when checking constructor
1058 (implicit_conversion): Pass FLAGS to standard_conversion.
1059 (check_constructir_callable): Disallow conversion functions.
1061 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
1063 * parser.c: Fix comment typos.
1065 2004-11-27 Mark Mitchell <mark@codesourcery.com>
1068 * parser.c (cp_parser_check_for_definition_in_return_type): Take
1069 the defined type as a parameter, and inform the user about the
1070 possibility of a missing semicolon.
1071 (cp_parser_explicit_instantiation): Adjust call to
1072 cp_parser_check_for_definition_in_return_type.
1073 (cp_parser_init_declarator): Likewise.
1074 (cp_parser_member_declaration): Likewise.
1077 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1078 typename from comments.
1079 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1080 (TYPENAME_IS_CLASS_P): Likewise.
1081 (make_typename_type): Change prototype.
1082 * decl.c (struct_typename_info): New type.
1083 (typename_compare): Expect the second argument to be a
1084 typename_info, not a tree.
1085 (build_typename_type): Add tag_type parameter. Do not create a
1086 new type until necessary.
1087 (make_typename_type): Add tag_type parameter.
1088 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1090 * friend.c (make_friend_class): Adjust call to make_typename_type.
1091 * parser.c (cp_parser_make_typename_type): Likewise.
1092 (cp_parser_primary_expression): Adjust call to
1093 cp_parser_lookup_name.
1094 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1095 (cp_parser_class_or_namespace_name): Likewise.
1096 (cp_parser_postfix_expression): Adjust calls to
1098 (cp_parser_mem_initializer_id): Adjust calls to
1099 cp_parser_class_name.
1100 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1101 (cp_parser_template_name): Likewise.
1102 (cp_parser_template_argument): Likewise.
1103 (cp_parser_type_name): Adjust call to cp_parser_class_name.
1104 (cp_parser_elaborated_type_specifier): Adjust calls to
1105 make_typename_type and cp_parser_lookup_name.
1106 (cp_parser_namespace_name): Likewise.
1107 (cp_parser_class_name): Replace type_p parameter with tag_type.
1108 Adjust calls to make_typename_type and cp_parser_lookup_name.
1109 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1110 (cp_parser_base_specifier): Likewise.
1111 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1112 Adjust calls to make_typename_type and lookup_qualified_name.
1113 (cp_parser_lookup_name_simple): Adjust call to
1114 cp_parser_lookup_name.
1115 (cp_parser_constructor_declarator_p): Adjust call to
1116 cp_parser_class_name.
1117 * pt.c (convert_template_argument): Adjust all to
1119 (tsubst_decl): Do not pre-substitute the type of the declaration.
1120 (tsubst): Hand off declarations more quickly. Adjust call to
1124 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1126 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
1129 * Make-lang.in (cp/decl2.o): Update dependencies.
1130 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1132 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1135 * name-lookup.c (pushtag): Change return type to tree.
1136 * cp-tree.h (pushtag): Adjust declaration.
1137 * decl.c (xref_tag, start_enum): Use return value of pushtag.
1138 * pt.c (push_template_decl_real): Return immediately if
1139 pushdecl_namespace_level returns error_mark_node.
1141 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1143 * pt.c: Fix a comment typo.
1145 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1147 Friend class name lookup 4/n
1148 * class.c (pushclass): Don't call cxx_remember_type_decls.
1149 * cp-tree.h (clear_anon_tags): Remove declaration.
1150 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
1151 * name-lookup.c (binding_entry_free, binding_table_free): Comment
1153 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
1154 binding_table_remove_anonymous_types, cxx_remember_type_decls,
1155 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1156 lookup_tag_reverse): Remove
1157 (begin_scope, leave_scope, kept_level_p, print_binding_level):
1158 Don't use type_decls field in cp_binding_level.
1159 (maybe_process_template_type_declaration, pushtag): Set
1160 CLASSTYPE_NESTED_UTDS directly.
1161 * name-lookup.h (binding_table_remove_anonymous_types,
1162 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1164 (cp_binding_level): Remove type_decls field.
1166 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
1168 * typeck.c: Fix a comment typo.
1170 2004-11-25 Mark Mitchell <mark@codesourcery.com>
1173 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1174 unknown_type as non matching. Tidy up.
1175 * pt.c (build_non_dependent_expr): Do not build a
1176 NON_DEPENDENT_EXPR for a VAR_DECL.
1179 * cp-tree.h (lvalue_or_else): Remove declaration.
1180 * tree.c (lvalue_or_else): Remove.
1181 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1182 (build_modify_expr): Likewise.
1185 * decl.c (duplicate_decls): Return error_mark_node on error, as
1189 * decl.c (grokvardecl): Keep track of whether or not a there was
1190 explicit qualification.
1191 * name-lookup.c (set_decl_namespace): Complain about explicit
1192 qualification of a name within its own namespace.
1195 * typeck.c (check_return_expr): Robustify.
1197 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1199 Friend class name lookup 3/n, PR c++/3332
1200 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1201 (lookup_type_scope): Don't deal with name from user declaration
1203 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1204 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1207 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1209 Friend class name lookup 2/n, PR c++/14513, c++/15410
1210 * name-lookup.c (lookup_name_real): Simplify.
1211 (lookup_type_scope): Add SCOPE parameter. Handle friend class
1213 * name-lookup.h (tag_scope): New enum type.
1214 (lookup_type_scope): Adjust declaration.
1215 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1216 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1217 (start_enum): Likewise. Add assertion test that NAME is
1218 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
1220 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1221 * parser.c (cp_parser_elaborated_type_specifier,
1222 cp_parser_class_head): Adjust call to xref_tag.
1223 * pt.c (lookup_template_class, instantiate_class_template):
1225 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1226 tinfo_base_init, emit_support_tinfos): Likewise.
1228 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1230 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1232 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1235 * name-lookup.c (supplement_binding): Do not allow typedefs to be
1236 redefined in class scope.
1239 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1240 redefinitions of builtin types other that "bool" or "wchar_t".
1242 2004-11-24 Steven Bosscher <stevenb@suse.de>
1244 * decl.c (cxx_init_decl_processing): Don't clear
1245 flag_inline_functions.
1247 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1249 * pt.c (tsubst_function_type): Do not permit function types which
1250 return arrays or functions.
1253 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1256 * cp-tree.h (CTOR_NAME): Remove.
1257 (DTOR_NAME): Remove.
1258 * decl.c (initialize_predefined_identifiers): Add spaces to the
1259 end of constructor and destructor names.
1261 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1264 * decl.c (start_decl): Check for invalid specialization headers.
1266 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
1270 * call.c (standard_conversion): Move check for conversions between
1272 * typeck.c (ptr_reasonably_similar): ... here.
1274 2004-11-23 Ben Elliston <bje@au.ibm.com>
1276 * cp-tree.h (context_as_string): Remove extern.
1277 * error.c (context_as_string): Remove.
1279 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
1280 * lex.c (cp_type_qual_from_rid): Remove.
1282 * cp-tree.h (do_poplevel): Remove extern.
1283 (check_multiple_declarators): Likewise.
1284 * semantics.c (do_poplevel): Make static.
1285 (check_multiple_declarators): Remove.
1287 * cp-tree.h (check_final_overrider): Remove extern.
1288 * search.c (check_final_overrider): Make static.
1290 * cp-tree.h (build_artificial_parm): Remove extern.
1291 * decl2.c (build_artificial_parm): Make static.
1293 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1296 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
1297 Make sure the result is always a rvalue.
1299 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1301 * decl.c (start_preparsed_function): Call check_function_type even
1303 (require_complete_types_for_parms): Skip dependent types.
1304 (check_function_type): Likewise.
1306 2004-11-16 Steven Bosscher <stevenb@suse.de>
1308 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
1309 * search.c: Don't include it.
1311 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
1313 * cp-gimplify.c: Include pointer-set.h
1314 (cp_genericize_r): Use pointer_sets instead of a hashtable.
1315 Also instert the new statement for CLEANUP_STMT.
1316 (cp_genericize): Use pointer_sets instead of a hashtable.
1317 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
1319 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1321 Friend class name lookup 1/n, PR c++/18471
1322 * decl.c (lookup_and_check_tag): New function.
1323 (xref_tag, start_enum): Use it.
1324 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
1325 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
1327 * name-lookup.c (lookup_name_current_level): Rename to ...
1328 (lookup_name_innermost_nonclass_level): ... this.
1329 (lookup_type_scope): New function.
1330 * name-lookup.h (lookup_name_current_level): Rename to ...
1331 (lookup_name_innermost_nonclass_level): ... this.
1332 (lookup_type_scope): Add declaration.
1334 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1337 * pt.c (coerce_template_parms): Only emit error message about
1338 invalid template argument when TF_ERROR.
1340 2004-11-12 Mark Mitchell <mark@codesourcery.com>
1343 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
1344 error_mark_node to indicate errors.
1347 * parser.c (cp_parser_direct_declarator): Disallow non-constant
1348 array bounds when not inside a function.
1351 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
1352 unqualified name resolves to a member function.
1355 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
1356 derived class correctly.
1358 * decl2.c (import_export_decl): Fix typo in comment.
1359 * tree.c (pod_type_p): Likewise.
1361 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
1363 * typeck.c (cxx_mark_addressable): Add braces around the first if.
1365 2004-11-10 Adam Nemet <anemet@lnxw.com>
1368 * typeck.c (cxx_mark_addressable): Issue an error if address of an
1369 explicit register variable is requested.
1371 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
1374 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
1375 (struct lang_decl_flags): Add thunk_p flag.
1376 (struct lang_decl): Remove separate fixed_offset. Place
1377 cloned_function and fixed_offset into union.
1378 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
1379 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
1380 (THUNK_FIXED_OFFSET): Adjust.
1381 * method.c (make_thunk): Adjust.
1383 2004-11-09 Mark Mitchell <mark@codesourcery.com>
1386 * init.c (build_new_1): Handle parenthesized type-ids that name an
1389 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1391 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
1392 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
1393 quoting in diagnostics.
1394 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
1395 quoting in printf format.
1396 * decl.c (duplicate_decls, start_decl): Use %qD instead of
1399 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1401 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
1402 search.c, typeck2.c: Fix comment formatting.
1404 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
1406 PR tree-optimization/18184
1407 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
1408 of different modes or alias-all flags as equivalent.
1409 * typeck.c (comptypes): Likewise.
1411 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1414 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
1415 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
1416 TYPE_REFFN_P): Document.
1417 (fold_decl_constant_value): New prototype.
1418 * pt.c (convert_nontype_argument_function): Rewrite and extract
1420 (fold_decl_constant_value, convert_nontype_argument_function): New.
1421 (lookup_template_class): Add comment about useless double call.
1422 * mangle.c (write_expression): Strip conversions before lowering
1424 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1425 enum to enum conversion.
1427 2004-11-02 Mark Mitchell <mark@codesourcery.com>
1430 * parser.c (cp_parser_type_parameter): Robustify.
1433 * parser.c (cp_parser_single_declaration): Disallow template
1437 * typeck.c (build_const_cast): Use error_operand_p.
1439 2004-11-02 Ziemowit Laski <zlaski@apple.com>
1441 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1442 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1443 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1445 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1447 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1449 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
1452 * search.c (check_final_overrider): Deprecate gnu covariant extension.
1454 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1456 Convert diagnostics to use quoting flag q 9/n
1457 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
1458 get_delta_difference): Use new quotation style.
1459 * repo.c (reopen_repo_file_for_write): Likewise.
1460 * pt.c (do_type_instantiation): Likewise.
1461 * parser.c (cp_parser_diagnose_invalid_type_name):
1462 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
1463 * error.c (cp_print_error_function,
1464 print_instantiation_full_context): Likewise.
1465 * decl.c (define_label, grok_reference_init,
1466 maybe_deduce_size_from_array_init, revert_static_member_fn):
1467 * decl2.c (check_classfn): Likewise.
1468 * class.c (add_method, check_field_decls, layout_class_type,
1469 resolve_address_of_overloaded_function): Likewise.
1470 * call.c (build_x_va_arg, build_over_call): Likewise.
1472 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1474 Convert diagnostics to use quoting flag q 8/n
1475 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
1476 convert_to_reference, ocp_convert, convert_to_void
1477 cp_convert_to_pointer): Use new quotation style.
1479 2004-10-31 Mark Mitchell <mark@codesourcery.com>
1482 * typeck2.c (store_init_value): Use split_nonconstant_init even
1483 for types that require construction.
1485 1004-10-28 Matt Austern <austern@apple.com>
1488 * cp-tree.h (class_key_or_enum_as_string): Declare.
1489 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1490 and remove static qualifier.
1491 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1492 union/enum declaration.
1494 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
1496 * pt.c: Fix a comment typo.
1498 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
1500 * typeck.c (composite_pointer_type): Remove comment about DR 195.
1501 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1502 warning when being pedantic.
1503 (build_reinterpet_cast, build_c_cast): Adjust.
1505 2004-10-29 Mark Mitchell <mark@codesourcery.com>
1508 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1509 appear in a constructor/destructor that will be cloned.
1511 1004-10-28 Matt Austern <austern@apple.com>
1514 * decl.c (finish_enum): Handle packed attribute.
1515 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1517 2004-10-28 Mark Mitchell <mark@codesourcery.com>
1520 * pt.c (instantiate_class_template): Increment
1521 processing_template_decl when substituting into a member class
1524 2004-10-27 Mark Mitchell <mark@codesourcery.com>
1527 * call.c (convert_like_real): Fix formatting.
1528 (initialize_reference): When binding a temporary to a base class,
1529 ensure that the nominal copy made is to the derived class, not the
1533 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1536 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1538 * decl.c (bad_specifiers): Move the q after the %.
1540 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1542 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1545 2004-10-26 Mark Mitchell <mark@codesourcery.com>
1547 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1548 * search.c (current_scope): Fix prototype.
1551 * search.c (current_scope): Return the innermost non-block scope,
1552 not the innermost non-block, non-namespace scope.
1553 (at_namespace_scope_p): Adjust accordingly.
1554 (dfs_accessible_post): Do not pass namespaces to is_friend.
1555 (dfs_walk_once_accessible_r): Likewise.
1556 * decl.c (grokvardecl): Adjust call to current_scope.
1557 (build_enumerator): Likewise.
1558 * parser.c (cp_parser_using_declaration): Likewise.
1559 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1561 (cp_parser_class_head): Adjust call to current_scope.
1562 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1566 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1567 their underlying values.
1570 * typeck.c (build_binary_op): Honor build_type, even when in a
1573 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
1575 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1576 padding token checking.
1578 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
1581 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1582 layout_type as it is already done by create_array_type_for_decl.
1584 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
1587 * parser.c (eof_token): Make const, correctly initialize rid and
1589 (struct cp_lexer): Replace buffer_end pointer with buffer_length
1591 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
1593 (cp_lexer_new_from_tokens): Adjust.
1594 (cp_lexer_grow_buffer): Remove.
1595 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1596 cp_lexer_purge_token): Add const casts.
1598 2004-10-21 Mark Mitchell <mark@codesourcery.com>
1602 * cp-tree.h (convert_to_base): Change prototype.
1603 (build_ptrmemfunc): Likewise.
1604 (convert_ptrmem): New function.
1605 * call.c (struct conversion): Adjust documentation for base_p.
1606 (standard_conversion): Set base_p for ck_pmem conversions as
1608 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1610 * class.c (convert_to_base): Handle both pointers and objects.
1611 Add nonnull parameter.
1612 (build_vfield_ref): Adjust call to convert_to_base.
1613 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1614 (convert_force): Likewise.
1615 * typeck.c (build_unary_op): Likewise.
1616 (convert_ptrmem): New function.
1617 (build_static_cast_1): Use it.
1618 (build_reinterpret_cast): Allow conversions to vector types.
1619 (get_delta_difference): Add c_cast_p parameter.
1620 (build_ptrmemfunc): Likewise. Adjust calls to
1621 get_delta_difference.
1623 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
1626 * error.c (cp_error_at): Output the context as it might be
1627 different file as the other location.
1629 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
1631 * typeck.c: Fix a comment typo.
1633 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1636 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1637 * cp-tree.h (make_unbound_class_template): Adjust prototype.
1638 * parser.c (cp_parser_lookup_name): Adjust call to
1639 make_unbound_class_template.
1640 (cp_parser_single_declaration): Handle member class of class
1641 template as template friend parsing correctly.
1642 * friend.c (is_friend): Call is_specialization_of_friend for
1643 template friend class.
1644 (make_friend_class): Handle member class of class template as
1646 * pt.c (is_specialization_of_friend): Likewise.
1647 (instantiate_class_template): Likewise.
1648 (tsubst): Adjust call to make_unbound_class_template.
1650 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1652 * typeck.c (composite_pointer_type): Add comment about DR 195
1653 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1654 Allow function pointer conversions that DR195 suggests.
1655 (build_reinterpret_cast, build_c_cast): Update
1656 build_reinterpret_cast_1 calls.
1658 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
1660 * call.c, typeck.c: Fix comment typos.
1662 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1664 * parser.c (cp_token_position): New typedef. Define VEC thereof.
1665 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1666 next_token and last_token cp_token_position. Make saved_tokens a
1667 VEC(cp_token_position).
1668 (eof_token): New static variable.
1669 (CP_SAVED_TOKENS_SIZE): Rename to ...
1670 (CP_SAVED_TOKEN_STACK): ... here.
1671 (cp_lexer_new_main): Adjust main lexer creation and buffer
1673 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1674 to the parent buffer. Do not append eof token.
1675 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1677 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1678 (cp_lexer_token_position, cp_lexer_token_at): New.
1679 (cp_lexer_saving_tokens): Adjust. Make inline.
1680 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1681 (cp_lexer_peek_token_emit_debug_info): Fold into ...
1682 (cp_lexer_peek_token): ... here.
1683 (cp_lexer_peek_nth_token): Don't peek past EOF.
1684 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1686 (cp_lexer_purge_token): Adjust eof setting.
1687 (cp_lexer_purge_tokens_after): Likewise.
1688 (cp_lexer_save_tokens): Push next_token directly.
1689 (cp_lexer_commit_tokens): Adjust.
1690 (cp_lexer_rollback_tokens): Pop next_token directly.
1691 (cp_parser_check_for_invalid_template_id): Adjust token purging.
1692 (cp_parser_translation_unit): Do not consume the EOF.
1693 (cp_parser_nested_name_specifier_opt): Adjust token purging.
1694 (cp_parser_template_id, cp_parser_template_name): Likewise.
1696 2004-10-19 Mark Mitchell <mark@codesourcery.com>
1699 * call.c (struct conversion): Add base_p.
1700 (convert_like): Add c_cast_p argument.
1701 (convert_like_with_conversion): Likewise.
1702 (build_conv): Clear base_p.
1703 (standard_conversion): Set it, for derived-to-base conversions.
1704 (convert_like_real): Add c_cast_p parameter. Handle pointer
1705 conversions directly rather than relying on ocp_convert.
1706 (perform_direct_initialization_if_possible): Add c_cast_p
1708 * cp-tree.h (perform_direct_initialization_if_possible): Change
1710 (convert_member_func_to_ptr): New function.
1711 * typeck.c (check_for_casting_away_constness): Add diag_fn
1713 (build_static_cast_1): New function, split out from ...
1714 (build_static_cast): ... here. Use build_static_cast_1.
1715 (build_reinterpret_cast_1): New function, split out from ...
1716 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
1717 (build_const_cast_1): New function, split out from ...
1718 (build_const_cast): ... here. Use build_const_cast_1.
1719 (build_c_cast): Rewrite to use build_const_cast_1,
1720 build_static_cast_1, and build_reinterpret_cast_1.
1721 (convert_member_func_to_ptr): New function.
1723 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
1726 * parser.c (enum cp_parser_prec): Give relational expressions
1727 a higher precedence than equality expressions.
1729 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
1731 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
1732 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
1733 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
1734 (enum base_access): Reorganize.
1735 (accessible_base_p, accessible_p): Add consider_local_p parameter.
1736 * call.c (standard_conversion): Update comment about
1738 (enforce_access): Adjust accessible_p call.
1739 (build_over_call): Adjust accessible_base_p call.
1740 * class.c (convert_to_base): Adjust lookup_base call.
1741 (build_vtbl_ref_1): Likewise.
1742 (warn_about_ambiguous_bases): Likewise. Add early exit.
1743 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
1744 * search.c (accessible_base_p): Add consider_local_p parameter.
1745 (lookup_base): Pass consider_local_p to accessible_base_p call.
1746 (friend_accessible_p): Check whether scope is a class member.
1747 Remove unnecessary class template check.
1748 (accessible_p): Add consider_local_p parameter. Use it.
1749 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
1750 * tree.c (maybe_dummy_object): Likewise.
1751 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
1752 (build_class_member_access_expr): Adjust lookup_base call.
1753 * typeck2.c (binfo_or_else): Likewise.
1754 * rtti.c (build_dynamic_cast_1): Access can consider friendship
1757 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1760 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
1762 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1765 * parser.c (cp_parser_parenthesized_expression_list): Fold
1766 non-dependent expressions in attribute lists.
1768 2004-10-15 Mark Mitchell <mark@codesourcery.com>
1771 * decl.c (declare_global_var): Use the return value from pushdecl.
1774 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
1775 type names if we have already found a valid type.
1776 (cp_parser_member_declaration): Likewise.
1779 * parser.c (cp_parser_member_specification_opt): Handle
1782 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1784 * dump.c, g++spec.c, repo.c: Update copyright.
1786 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1788 * decl.c: Fix a comment typo.
1790 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1793 * name-lookup.c (parse_using_directive): If we have a
1794 error_mark_node, do not set the decl namespace associations
1797 2004-10-14 Mark Mitchell <mark@codesourcery.com>
1800 * decl.c (cp_finish_decl): Do not call expand_static_init more
1801 than once for a single variable.
1803 2004-10-14 Matt Austern <austern@apple.com>
1805 * Make-lang.in (pt.o): depends on pointer-set.h
1806 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
1807 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
1808 (for_each_template_parm): Convert from htab_t to pointer_set_t.
1809 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
1811 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1814 * semantics.c (finish_for_expr): Convert expression to void
1815 so that we don't create temporaries for a?b:c.
1817 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
1819 * search.c: Fix a comment typo.
1821 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
1823 * class.c (dfs_modify_vtables): Simplify condition. Return
1824 dfs_skip_bases as appropriate.
1825 (modify_all_vtables): Walk in pre-order.
1826 * search.c (dfs_walk_all, dfs_walk_once_r,
1827 dfs_walk_once_accessible_r): Assert post order function never
1828 returns dfs_skip_bases.
1830 * search.c (struct lookup_base_data_s): New.
1831 (lookup_base_r): Replace with ...
1832 (dfs_lookup_base): ... this.
1833 (lookup_base): Use dfs_walk_all.
1835 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
1837 * search.c: Fix comment typos.
1839 2004-10-11 Mark Mitchell <mark@codesourcery.com>
1842 * parser.c (cp_parser_declarator): Add member_p parameter.
1843 (cp_parser_condition): Adjust calls to cp_parser_declarator.
1844 (cp_parser_explicit_instantiation): Likewise.
1845 (cp_parser_init_declarator): Likewise.
1846 (cp_parser_direct_declarator): Add member_p parameter. Do not
1847 parse tentatively when parsing the parameters to a member.
1848 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1849 (cp_parser_parameter_declaration): Likewise.
1850 (cp_parser_member_declaration): Likewise.
1851 (cp_parser_exception_declaration): Likewise.
1854 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1855 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1856 for members of partial or explicit specializations.
1859 * decl2.c (finish_anon_union): Robustify.
1861 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
1863 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1864 (dcast_base_hint): ... here.
1865 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1866 * search.c (struct dcast_data_s): New.
1867 (dynamic_cast_base_recurse): Remove. Replace with ...
1868 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1869 (get_dynamic_cast_base_type): Rename to ...
1870 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
1871 (accessible_r): Remove.
1872 (dfs_accessible_post): New, broken out of accessible_r.
1873 (accessible_p): Use dfs_walk_once_accessible.
1874 (dfs_walk_once_accessible_r): New. From accessible_r.
1875 (dfs_walk_once_accessible): New. From acessible_p.
1877 * cp-tree.h (SAME_BINFO_TYPE_P): New.
1878 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1880 (convert_to_base_statically, determine_primary_bases,
1881 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1882 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1883 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1884 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1885 * init.c (expand_member_init): Likewise.
1886 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1887 binfo_via_virtual, copied_binfo, binfo_for_vbase,
1888 original_binfo): Likewise.
1889 * tree.c (copy_binfo): Likewise.
1891 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
1893 * semantics.c: Fix comment typos.
1895 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1900 * semantics.c (maybe_cleanup_point_expr): Call
1901 fold_build_cleanup_point_expr.
1902 (maybe_cleanup_point_expr_void): New function.
1903 (add_decl_expr): Call maybe_cleanup_point_expr_void.
1904 (finish_expr_stmt): Likewise.
1905 (finish_return_stmt): Likewise.
1906 (finish_for_expr): Likewise.
1907 (finish_asm_stmt): Likewise.
1908 * typeck.c (condition_conversion): Call
1909 fold_build_cleanup_point_expr.
1911 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1914 * semantics.c (add_decl_expr): If the decl has a size which
1915 has side effects then the decl expression needs a cleanup point.
1917 2004-10-10 Mark Mitchell <mark@codesourcery.com>
1920 * decl.c (grokdeclarator): Robustify error-recovery on invalid
1923 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1925 Convert diagnostics to use quoting flag q 7/n
1926 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1927 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
1928 string_conv_p, build_class_member_access_expr,
1929 build_class_member_access_expr, lookup_destructor,
1930 finish_class_member_access_expr, build_indirect_ref,
1931 get_member_function_from_ptrfunc, build_function_call,
1932 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
1933 check_for_casting_away_constness, build_static_cast,
1934 build_reinterpret_cast, build_const_cast, build_c_cast,
1935 build_modify_expr, get_delta_difference, build_ptrmemfunc,
1936 dubious_conversion_warnings, convert_for_assignment,
1937 convert_for_initialization,
1938 maybe_warn_about_returning_address_of_local, check_return_expr):
1941 * typeck2.c (error_not_base_type, readonly_error,
1942 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
1943 store_init_value, digest_init, build_x_arrow,
1944 build_m_component_ref, require_complete_eh_spec_types): Likewise.
1946 * tree.c (cp_build_qualified_type_real,
1947 handle_java_interface_attribute, handle_init_priority_attribute):
1950 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
1951 finish_pseudo_destructor_expr,
1952 check_template_template_default_arg, begin_class_definition,
1953 finish_base_specifier, qualified_name_lookup_error,
1954 finish_id_expression, finish_typeof): Likewise.
1956 * search.c (lookup_base, check_final_overrider,
1957 look_for_overrides_r): Likewise.
1959 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1961 2004-10-09 Mark Mitchell <mark@codesourcery.com>
1964 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1968 * init.c (build_new): Correct comments.
1969 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1973 * parser.c (cp_parser_postfix_dot_deref_expression): If the
1974 pseduo-destructor-name production does not work, fall back to the
1975 ordinary production.
1978 * tree.c (cp_tree_equal): Handle a BASELINK.
1981 * cp-tree.h (check_var_type): New function.
1982 * decl.c (check_var_type): New function, split out from ...
1983 (grokdeclarator): ... here.
1984 * pt.c (tsubst_decl): Use check_var_type.
1987 * decl.c (grokdeclarator): Disallow declarations of operators as
1990 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1993 * error.c (dump_expr): Add missing case for RDIV_EXPR.
1995 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
1997 * pt.c, search.c: Fix comment typos.
1999 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
2001 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2003 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2004 * class.c (struct find_final_overrider_data): Remove most_derived,
2005 vpath_list and vpath fields. Add path field.
2006 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2007 (dfs_find_final_overrider): Rename to ...
2008 (dfs_find_final_overrider_pre): ... here. Adjust.
2009 (dfs_find_final_overrider_post): Adjust.
2010 (dfs_find_final_overrider_q): Fold into
2011 dfs_find_final_overrider_pre.
2012 (find_final_overrider): Adjust dfs searching.
2013 (dfs_modify_vtables): Don't mark binfo here.
2014 (modify_all_vtables): Use dfs_walk_once.
2015 (build_vtt_inits): Likwise. Use dfs_walk_all.
2016 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2017 Return dfs_skip_bases as appropriate.
2018 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2019 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2020 appropriate. Don't mark binfo here.
2021 (initialize_vtbl_ptrs): Use dfs_walk_once.
2022 * search.c (struct vbase_info): Remove unused struct.
2023 (access_in_type): Use dfs_walk_once.
2024 (dfs_access_in_type): Don't mark binfo here.
2025 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2027 (accessible_r): ... here. New. Specialize dfs_walk_once.
2028 (accessible_p): Use accessible_r.
2029 (lookup_field_queue_p): Remove. Fold into ...
2030 (lookup_field_r): ... here. Adjust.
2031 (lookup_member): Use dfs_walk_all.
2032 (dfs_walk_real, dfs_walk): Replace with ...
2033 (dfs_walk_all, dfs_walk_once): ... these.
2034 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2035 (dfs_unmark, unmarkedp, markedp): Remove.
2036 (dfs_get_pure_virtuals): Don't mark binfo here.
2037 (get_pure_virtuals): Use dfs_walk_once.
2038 (dfs_debug_unmarked_p): Remove. Fold into ...
2039 (dfs_debug_mark): ... here.
2040 (note_debug_info_needed): Use dfs_walk_all.
2042 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2044 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2045 CLEANUP_POINT_EXPR to get the asm expression.
2047 2004-10-07 Mark Mitchell <mark@codesourcery.com>
2049 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2050 (DECL_MEMBER_TEMPLATE_P): New macro.
2051 (is_member_template): Remove.
2052 (class_method_index_for_fn): New function.
2053 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2054 * class.c (finish_struct_methods): Remove out-of-date comment.
2055 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2056 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2057 class_method_index_for_fn.
2058 * pt.c (is_member_template): Remove.
2059 (is_member_template_class): Likewise.
2060 (optimize_specialization_lookup_p): New function.
2061 (retrieve_specialization): Optimize lookups for members that are
2062 not member templates.
2063 (register_specialization): Adjust accordingly.
2064 (build_template_decl): Add member_template_p parameter. Set
2065 DECL_MEMBER_TEMPLATE_P.
2066 (process_partial_specialization): Adjust call to
2067 retrieve_specialization.
2068 (push_template_decl_real): Determine whether the template is a
2070 (lookup_template_class): Use retrieve_specialization.
2071 (tsubst_decl): Adjust call to retrieve_specialization.
2072 (tsubst_exception_specification): New function.
2074 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2075 (instantiate_template): Adjust call to retrieve_specialization.
2076 (regenerate_decl_from_template): Do not actually generate a new
2078 (instantiate_decl): Adjust call to retrieve_specialization.
2079 (class_method_index_for_fn): New method.
2081 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2083 * parser.c (cp_parser_asm_definition): Look passed the
2084 CLEANUP_POINT_EXPR to get the asm expression.
2086 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
2089 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2092 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2094 Convert diagnostics to use quoting flag q 6/n
2095 * pt.c (finish_member_template_decl, check_specialization_scope,
2096 maybe_process_partial_specialization, determine_specialization,
2097 check_explicit_specialization, maybe_check_template_type,
2098 process_partial_specialization, check_default_tmpl_args,
2099 push_template_decl_real, redeclare_class_template,
2100 convert_nontype_argument, coerce_template_parms,
2101 lookup_template_class, push_tinst_level,
2102 instantiate_class_template, tsubst_arg_types,
2103 tsubst_function_type, tsubst, tsubst_qualified_id,
2104 tsubst_copy_and_build, check_instantiated_args,
2105 do_decl_instantiation, do_type_instantiation,
2106 invalid_nontype_parm_type_p, check_specialization_namespace,
2107 convert_template_argument, determine_specialization,
2108 check_template_shadow, tsubst_decl
2109 instantiate_pending_templates): Use quoting marks.
2111 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
2114 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2115 unqualified lookup finds a member function.
2117 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2119 Convert diagnostics to use quoting flag q 5/n
2120 * parser.c (cp_parser_name_lookup_error,
2121 cp_parser_diagnose_invalid_type_name,
2122 cp_parser_primary_expression, cp_parser_unqualified_id,
2123 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2124 cp_parser_jump_statement, cp_parser_simple_declaration,
2125 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2126 cp_parser_type_parameter, cp_parser_template_id,
2127 cp_parser_template_name, cp_parser_direct_declarator,
2128 cp_parser_parameter_declaration_list, cp_parser_class_head,
2129 cp_parser_base_specifier, cp_parser_lookup_name,
2130 cp_parser_late_parsing_default_args,
2131 cp_parser_optional_template_keyword
2132 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2133 cp_parser_check_access_in_redeclaration): Use quoting marks.
2135 * name-lookup.c (supplement_binding, pushdecl,
2136 check_for_out_of_scope_variable, validate_nonmember_using_decl,
2137 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2138 push_namespace, do_namespace_alias, do_using_directive,
2139 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2141 * method.c (use_thunk): Likewise.
2143 * lex.c (unqualified_name_lookup_error,
2144 unqualified_fn_lookup_error): Likewise.
2146 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2148 Convert diagnostics to use quoting flag q 4/n
2149 * except.c (decl_is_java_type, build_throw,
2150 is_admissible_throw_operand, check_handlers_1, check_handlers):
2151 Use quoting formats.
2152 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
2153 * init.c (sort_mem_initializers, emit_mem_initializers,
2154 member_init_ok_or_else, expand_member_init, is_aggr_type,
2155 build_offset_ref, build_java_class_ref): Likewise.
2157 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2159 Convert diagnostics to use quoting flag q 3/n
2160 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2161 redeclaration_error_message, lookup_label, check_goto,
2162 make_typename_type, make_unbound_class_template,
2163 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
2164 grok_reference_init, layout_var_decl, maybe_commonize_var,
2165 check_for_uninitialized_const_var, reshape_init_array,
2166 reshape_init, check_initializer, cp_finish_decl,
2167 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
2168 check_static_variable_definition, compute_array_index_type,
2169 create_array_type_for_decl, check_special_function_return_type,
2170 grokdeclarator, check_default_argument, grokparms,
2171 grok_ctor_properties, grok_op_properties,
2172 check_elaborated_type_specifier, xref_tag, finish_enum,
2173 build_enumerator, check_function_type, start_preparsed_function,
2174 store_parm_decls): Use quoting formats.
2175 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
2176 check_java_method, check_classfn, finish_static_data_member_decl,
2177 grokfield, grokbitfield, grok_function_init,
2178 build_anon_union_vars, coerce_new_type, coerce_delete_type,
2179 check_default_args): Likewise.
2180 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2182 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2184 Convert diagnostics to use quoting flag q 2/n
2185 * class.c (build_base_path, add_method, alter_access,
2186 handle_using_decl, check_bases,
2187 maybe_warn_about_overly_private_class, find_final_overrider,
2188 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2189 check_bitfield_decl, check_field_decls, layout_empty_base,
2190 build_base_field, check_methods, layout_virtual_bases,
2191 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2192 resolve_address_of_overloaded_function, instantiate_type,
2193 note_name_declared_in_class): Use format flag "q" for quoting.
2195 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2197 Convert diagnostics to use quoting flag q 1/n
2198 * error.c (locate_error): Ignore quoting flag q.
2199 * call.c (build_user_type_conversion_1, build_operator_new_call,
2200 build_object_call, op_error, build_conditional_expr,
2201 build_new_op, build_op_delete_call, enforce_access,
2202 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2203 convert_default_arg, build_over_call, build_new_method_call,
2204 joust, perform_implicit_conversion, initialize_reference): Use the
2207 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
2210 * typeck.c (build_reinterpret_cast): Return if the inner type
2213 2004-10-01 Jan Hubicka <jh@suse.cz>
2215 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2217 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
2219 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2220 turning operator_code and fixed_offset into bitfields.
2222 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
2224 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2226 2004-09-29 Jason Merrill <jason@redhat.com>
2228 PR tree-optimization/17697
2229 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2231 2004-09-28 Jason Merrill <jason@redhat.com>
2234 * class.c (build_base_field): Set TYPE_MODE.
2236 2004-09-28 Roger Sayle <roger@eyesopen.com>
2239 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2240 than -lc and -lm, may require linking against libstc++.
2242 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
2244 * tree.c: Fix a comment typo.
2246 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
2248 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2249 (struct secondary_vptr_vtt_init_data_s): New.
2250 (build_vtt_inits): Adjust dfs_walkers.
2251 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2252 secondary_vptr_vtt_init_data_s structure. Adjust.
2253 (dfs_ctor_vtable_bases_queue_p): Remove.
2254 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2256 * pt.c (struct get_template_base_data_s): Remove.
2257 (get_template_base_r): Fold into get_template_base.
2258 (get_template_base): Walk base binfos directly in inheritance
2261 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2264 * cp-tree.h (fold_if_not_in_template): New function.
2265 * call.c (build_conditional_expr): Use fold_if_not_in_template.
2266 (build_cxx_call): Likewise.
2267 * cvt.c (convert_to_complex): Likewise.
2268 (ocp_convert): Likewise.
2269 (convert): Likewise.
2270 (convert_force): Likewise.
2271 * decl.c (compute_array_index_type): Clear
2272 processing_template_decl while folding array bounds.
2273 * pt.c (convert_nontype_argument): Clear
2274 processing_template_decl while processing non-type argument
2276 * tree.c (fold_if_not_in_template): New function.
2277 * typeck.c (build_class_member_access_expr): Use
2278 fold_if_not_in_template.
2279 (build_array_ref): Likewise.
2280 (build_binary_op): Likewise. Do not try to optimize computations
2281 when processing templates.
2282 (cp_pointer_int_sum): Use fold_if_not_in_template.
2283 (pointer_diff): Likewise.
2284 (build_unary_op): Likewise.
2285 (build_reinterpret_cast): Likewise.
2286 (get_delta_difference): Likewise.
2287 (expand_ptrmemfunc_cst): Likewise.
2288 (dubious_conversion_warnings): Likewise.
2290 2004-09-27 Matt Austern <austern@apple.com>
2292 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
2293 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
2294 tokens that come from headers that are implicitly extern "C".
2295 (struct cp_parser): new one-bit field, implicit_extern_c.
2296 (cp_parser_new): Set parser's implicit_extern_c to false.
2297 (cp_parser_translation_unit): Pop lang context if we were in a
2298 header that was implicitly extern "C".
2299 (cp_parser_declaration_seq_opt): Push/pop lang context as
2300 required by the token's and parser's implicit_extern_c.
2302 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2305 * cp-tree.h (shared_member_p): Declare.
2306 * search.c (shared_member_p): Give it external linkage.
2307 * semantics.c (finish_qualified_id_expr): Use it.
2308 (finish_id_expression): Likewise.
2311 * semantics.c (finish_id_expression): Do not add "this->" to
2312 static member functions.
2314 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
2317 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
2319 * class.c (struct count_depth_data): Remove.
2320 (dfs_depth_post, dfs_depth_q): Remove.
2321 (find_final_overrider): Use number of vbase classes as depth
2324 * cp-tree.h (types_overlap_p): Remove.
2325 * search.c (struct overlap_info): Remove.
2326 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
2328 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
2329 (get_template_base_recursive): Remove. Replace with ...
2330 (get_template_base_r): ... this.
2331 (struct get_template_base_data_s): New.
2332 (get_template_base): Use get_template_base_r via dfs_walk. Always
2333 return NULL on failure.
2334 (unify): Remove error_mark_node check from get_template_base result.
2336 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
2338 * parser.c (cp_parser_expression_stack): Clarify why it is
2339 an array of NUM_PREC_VALUES elements.
2340 (cp_parser_binary_expression): Clarify why we do not need to
2341 handle stack overflow.
2343 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
2346 * search.c (lookup_field_queue_p): Correct check for hidden base.
2348 * search.c (bfs_walk): Remove.
2349 (lookup_member): Use dfs_walk_real.
2350 (dfs_walk_real): Move and adjust documentation from bfs_walk.
2352 2004-09-23 Zack Weinberg <zack@codesourcery.com>
2354 * decl.c (grokfndecl): If ::main is found not to return int,
2355 correct it after issuing a diagnostic.
2356 (grokdeclarator): If the incoming type was error_mark_node, do
2357 not complain about declaring something with no type.
2358 (start_function): Change check for ::main not returning int to
2359 an assertion, as grokfndecl now catches this when the user did it.
2360 * init.c (perform_member_init, sort_mem_initializers)
2361 (emit_mem_initializers): Make most diagnostics be issued on
2362 the line of current_function_decl, not whatever the current
2364 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
2365 definition and declaration with #ifdef ENABLE_CHECKING.
2366 Avoid unnecessary use of fprintf.
2367 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
2368 definitions to avoid warnings.
2369 (cp_lexer_new_main): Add assertion that first token is not a
2371 (cp_lexer_new_from_token_array): Fold into ...
2372 (cp_lexer_new_from_tokens): ... here. Add assertion that
2373 first token is not a padding token.
2374 (cp_lexer_set_source_position_from_token): Move nearer to callers.
2375 Remove unused lexer argument.
2376 (cp_lexer_peek_token): Just print debugging report (if enabled)
2377 and return lexer->next_token.
2378 (cp_lexer_skip_purged_tokens): Delete.
2379 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
2380 inline, simplify bodies.
2381 (cp_lexer_peek_nth_token): Add debugging report a la
2382 cp_lexer_peek_token.
2383 (cp_lexer_consume_token): Correct commentary. Advance over
2384 purged tokens here. Set current source position here, from
2385 token to be returned. Avoid unnecessary use of fprintf.
2386 (cp_lexer_purge_token): Advance next_token pointer over this and
2387 subsequent purged tokens.
2388 (cp_parser_error): Adjust source position to that of the
2390 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
2391 (cp_parser_string_literal): Remove some excessive cleverness.
2392 (cp_parser_enum_specifier): Call start_enum before consuming
2394 (cp_parser_member_declaration): Make the "extra semicolon"
2395 diagnostic consistently-worded with the other place this is
2396 diagnosed. Explicitly set the diagnostic location to the
2397 location of the offending semicolon.
2398 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
2399 in diagnostics. Do not use cp_parser_require. Set location
2400 of diagnostics about improper use of '>>' to location of
2402 (cp_parser_late_parsing_for_member):
2403 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
2404 (cp_parser_late_parsing_default_args): Likewise. Manually
2405 move some logic outside the loop.
2407 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
2410 * cvt.c (cp_convert_to_pointer): Return early when the type is
2413 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
2417 * decl.c (grokfndecl): Add new argument "attrlist", use it
2418 to call cplus_decl_attributes.
2419 (start_function): Remove call to cplus_decl_attributes.
2420 * cvt.c (ocp_convert): Add support to use type conversion
2421 function to vector type.
2422 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2425 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
2429 * parser.c (cp_parser_token_tree_map_node,
2430 cp_parser_pm_expression, cp_parser_additive_expression,
2431 cp_parser_multiplicative_expression, cp_parser_shift_expression,
2432 cp_parser_relational_expression, cp_parser_equality_expression,
2433 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2434 cp_parser_inclusive_or_expression,
2435 cp_parser_logical_and_expression,
2436 cp_parser_logical_or_expression): Removed.
2437 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2438 binops, binops_by_token): New.
2439 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2440 (cp_parser_new): Initialize binops_by_token.
2441 (cp_parser_binary_expression): Rewritten.
2444 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
2446 * parser.c: Fix a comment typo.
2448 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
2451 * decl.c (xref_basetypes): Look through typedefs before checking
2454 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2456 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2457 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2458 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2459 (init_rtti_processing): Initialize it to something realistic.
2460 (get_tinfo_decl): Adjust pushing the new decl.
2462 * cp-tree.h (struct lang_type_class): Remove marked flags, add
2463 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
2464 (TYPE_MARKED_P): New.
2465 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2466 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2467 CLEAR_CLASSTYPE_MARKED_N): Remove.
2468 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2469 CLEAR_CLASSTYPE_MARKED_*): Remove.
2470 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2471 shaped and repeated base properties.
2472 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2473 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2474 class_hint_flags): Remove.
2475 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2476 CLASSTYPE_DIAMOND_SHAPED_P.
2478 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2480 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2482 (objcp_tsubst_copy_and_build): Reformat function signature.
2483 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2484 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2486 2004-09-21 Zack Weinberg <zack@codesourcery.com>
2488 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2489 Don't handle CPP_PRAGMA tokens specially.
2490 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
2491 purge the token; do clear token->value after processing. Add
2492 assertion at beginning that token->value is nonzero.
2493 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2494 CPP_PRAGMA as a full statement or declaration in its own right.
2496 2004-09-21 Matt Austern <austern@apple.com>
2499 * decl.c (grokvardecl): Accept declarations of global variables
2500 using anonymous types.
2502 2004-09-21 Roger Sayle <roger@eyesopen.com>
2505 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
2506 if either operand has side-effects.
2507 * typeck.c (rationalize_conditional_expr): Assert that neither
2508 operand of MIN_EXPR or MAX_EXPR has side-effects.
2509 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
2510 Check that the "lhs" is a valid lvalue, i.e. that neither operand
2511 of a MIN_EXPR or MAX_EXPR has a side-effect.
2513 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
2515 * cp-tree.h (struct lang_type_header): Remove
2516 uses_multiple_inheritance field.
2517 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2518 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2519 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2520 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2521 (TYPE_CONTAINS_VPTR_P): Likewise.
2522 * call.c (add_template_candidate_real): Use
2523 CLASSTYPE_VBASECLASSES.
2524 (build_special_member_call): Likewise.
2525 * class.c (finish_struct_bits): Remove
2526 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2528 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2529 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2531 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2532 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2534 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2535 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2537 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2538 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2539 * init.c (expand_member, push_base_cleanups): Likewise.
2540 * pt.c (instantiate_class_template): Remove
2541 TYPE_USES_MULTIPLE_INHERITANCE,
2542 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2544 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2546 * typeck2.c (process_init_constructor): Replace some sorrys with
2549 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
2551 * decl.c (reshape_init_array): Initialize max_index_cst to fix
2554 2004-09-20 Mark Mitchell <mark@codesourcery.com>
2557 * pt.c (tsubst): Fix parentheses to accomodate emacs.
2558 (tsubst_baselink): If we get a single function, mark it as used.
2560 2004-09-20 Matt Austern <austern@apple.com>
2561 Zack Weinberg <zack@codesourcery.com>
2563 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2564 Apply lbasename to input_filename before passing to get_fileinfo.
2565 * semantics.c (begin_class_definition): Likewise.
2566 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2567 correct filename. Rename variables to be less confusing.
2568 (handle_pragma_implementation): Likewise. Disable "appears
2569 after file is included" diagnostic.
2571 * parser.c (struct cp_token): Add in_system_header fiag.
2572 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2573 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2574 (CPP_NONE, cp_lexer_read_token): Delete.
2575 (struct cp_lexer): Remove first_token, string_tokens,
2576 main_lexer_p fields. Clarify comments.
2577 (struct cp_token_cache): Now just a pair of pointers.
2578 (CP_LEXER_BUFFER_SIZE): New #define.
2579 (CPP_PURGED): New fake token type.
2580 (cp_lexer_new_from_token_array, cp_lexer_destroy)
2581 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2582 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2584 (cp_lexer_new_from_tokens): Now a simple wrapper around
2585 cp_lexer_new_from_token_array.
2586 (cp_lexer_set_source_position_from_token): Also update
2588 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2590 (cp_lexer_token_difference): Dont handle wrapping round.
2591 (cp_lexer_new_main): Enable pragma deferral and raw strings,
2592 read the entire translation unit through c_lex_with_flags into
2593 this lexer's buffer, then turn raw strings back off again.
2594 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2595 (cp_lexer_get_preprocessor_token): No need to handle not being
2596 the main lexer. Set token->in_system_header too.
2597 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
2598 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
2599 (cp_lexer_peek_nth_token): Likewise.
2600 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2601 the other tokens down.
2602 (cp_lexer_purge_tokens_after): Likewise.
2603 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2604 about there being no tokens.
2605 (cp_lexer_print_token): Revise to give useful information on
2607 (struct cp_parser): Add field translate_strings_p.
2608 (cp_parser_new): Initialize it.
2609 (cp_parser_translation_unit): Destroy the lexer when done.
2610 (cp_parser_parameter_declaration): Restructure saving of
2612 (cp_parser_save_member_function_body): Likewise.
2613 (cp_parser_check_for_invalid_template_id)
2614 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2615 Adjust calls to cp_lexer_advance_token.
2616 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2617 No need to fiddle c_lex_string_translate.
2618 (cp_parser_primary_expression, cp_parser_linkage_specification)
2619 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2620 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2621 Use cp_parser_string_literal.
2622 (cp_parser_attribute_list): Save and restore
2623 parser->translate_strings_p, not c_lex_string_translate.
2624 (cp_parser_cache_group): Delete.
2625 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
2626 not take a cache argument.
2628 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2631 * decl.c (reshape_init): Extract array handling into...
2632 (reshape_init_array): New function. Use integers instead of trees
2633 for indices. Handle out-of-range designated initializers.
2635 2004-09-20 Steven Bosscher <stevenb@suse.de>
2637 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2640 2004-09-19 Mark Mitchell <mark@codesourcery.com>
2642 * decl2.c (determine_visibility): Allow class visibility
2643 directives to override targetm.cxx.export_class_data.
2645 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
2647 * call.c, semantics.c: Follow spelling conventions.
2648 * class.c: Fix a comment typo.
2650 2004-09-16 Geoffrey Keating <geoffk@apple.com>
2653 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2654 (handle_pragma_implementation): Likewise.
2656 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2657 Zack Weinberg <zack@codesourcery.com>
2659 * cp-tree.def: Use tree_code_class enumeration constants
2660 instead of code letters.
2661 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2662 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2663 Update for new tree-class enumeration constants.
2665 2004-09-16 Mark Mitchell <mark@codesourcery.com>
2668 * parser.c (cp_parser_simple_declaration): Commit to tentative
2669 parses after seeing a decl-specifier.
2670 (cp_parser_simple_declaration): Eliminate spurious message.
2671 (cp_parser_init_declarator): Adjust error message.
2674 * lex.c (unqualified_name_lookup_error): Mark the dummy
2675 declaration as used.
2678 * parser.c (cp_parser_nested_name_specifier): Do not resolve
2679 typename types if the user explicitly said "typename".
2681 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
2683 * error.c (dump_decl): Make sure there is lang_specific info before
2684 checking for DTOR and CTOR decls.
2686 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2688 * class.c (copy_virtuals): Remove.
2689 (build_primary_vtable): Use copy_list directly.
2690 (build_secondary_vtable): Likewise.
2691 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2692 (create_vtable_ptr): Likewise.
2694 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2696 * search.c: Follow spelling conventions.
2698 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2700 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2702 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
2704 * call.c (build_new_method_call): Don't confirm a pure virtual is
2705 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
2706 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
2707 (fixup_inline_methods, finish_struct): Likewise.
2708 * decl.c (finish_method): Likewise.
2709 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
2710 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
2711 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
2712 vector to avoid repeating the list in error messages.
2714 2004-09-15 Mark Mitchell <mark@codesourcery.com>
2716 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
2717 * cp-tree.h (cxx_comdat_group): Declare.
2718 * decl.c (cxx_comdat_group): New function.
2720 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
2722 * search.c (get_pure_virtuals): Remove unused variables.
2724 * cp-tree.h (struct lang_decl_flags): Remove
2725 needs_final_overrider.
2726 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
2727 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
2728 * class.c (finish_struct_bits): Correct comment about
2729 CLASSTYPE_PURE_VIRTUALS.
2730 * search.c (get_pure_virtuals): Remove useless loop.
2732 2004-09-14 Mark Mitchell <mark@codesourcery.com>
2735 * mangle.c (partially_mangled_name): New variable.
2736 (partially_mangled_name_len): Likewise.
2737 (save_partially_mangled_name): New function.
2738 (restore_partially_mangled_name): Likewise.
2739 (write_encoding): Save and restore partially mangled names around
2740 calls to get_mostly_instantiated_function_type.
2741 (write_unqualified_name): Likewise.
2743 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
2745 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
2747 2004-09-13 Mark Mitchell <mark@codesourcery.com>
2750 * parser.c (cp_parser_id_expression): Correct value for
2752 (cp_parser_nested_name_specifier_opt): Look through typenames as
2754 (cp_parser_template_name): Honor check_dependency_p.
2757 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
2761 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
2764 2004-09-12 Richard Henderson <rth@redhat.com>
2767 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
2768 * typeck.c (condition_conversion): Likewise.
2770 2004-09-11 Richard Henderson <rth@redhat.com>
2773 * pt.c (cur_stmt_expr): Move from tsubst_expr.
2774 (tsubst_expr) <case STMT_EXPR>: Move ...
2775 (tsubst_copy_and_build): ... here.
2777 2004-09-10 Zack Weinberg <zack@codesourcery.com>
2779 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
2780 comment explaining them moved to c-common.h.
2781 * lex.c (interface_only, interface_unknown, extract_interface_info):
2783 (cxx_finish): Don't reset interface_unknown.
2784 (handle_pragma_interface): Don't set interface_only and
2785 interface_unknown; just the like-named fields in finfo.
2786 (handle_pragma_implementation): Adjust comment.
2787 * decl2.c (cp_finish_file): Don't reset interface_only and
2789 * method.c (synthesize_method): Don't reset interface_unknown or
2790 call extract_interface_info.
2791 * pt.c (pop_tinst_level): Don't call extract_interface_info.
2792 * decl.c (start_cleanup_fn): Don't save or restore interface_only
2793 and interface_unknown.
2794 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
2795 and use the result instead of the interface_only/interface_unknown
2797 (start_preparsed_function): Likewise.
2798 * lex.c (cxx_make_type): Likewise.
2799 * semantics.c (begin_class_definition): Likewise.
2800 (expand_body): Don't call extract_interface_info.
2802 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2804 * decl.c (objc_mark_locals_volatile): Make description of
2805 routine more descriptive; only mark VAR_DECLs at each
2808 2004-09-10 Richard Henderson <rth@redhat.com>
2811 * call.c (build_vfield_ref): Move...
2812 * class.c (build_vfield_ref): ... here. Convert datum to the
2813 primary base containing the vptr.
2814 (make_new_vtable): Simplify build_primary_vtable arguments.
2815 (finish_struct_1): Do not duplicate TYPE_VFIELD.
2816 * typeck.c (build_class_member_access_expr): Don't warn for
2817 null object access to base fields.
2819 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2821 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
2822 New functions, to be called from ObjC++.
2824 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
2826 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
2827 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2830 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2832 * typeck.c (build_c_cast): Preserve the cast if casting
2833 to and from an Objective-C type.
2835 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2837 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2838 * typeck.c: Include c-common.h.
2839 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2840 return the result if nonnegative.
2842 2004-09-09 Zack Weinberg <zack@codesourcery.com>
2844 * decl2.c (import_export_class)
2845 * lex.c (handle_pragma_interface):
2846 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2848 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2850 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2851 * semantics.c: Include c-common.h.
2852 (finish_compound_stmt): Call objc_clear_super_receiver().
2854 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2856 * cp-tree.h (do_poplevel): New prototype.
2857 * semantics.c (do_poplevel): Make externally visible.
2859 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
2861 * cp-tree.h (tree_pair_s): Define a GC'd vector.
2862 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2863 * semantics.c (deferred_access): Likewise.
2865 2004-09-06 Daniel Jacobowitz <dan@debian.org>
2867 * semantics.c (expand_body): Assert that we are not nested.
2869 2004-09-06 Zack Weinberg <zack@codesourcery.com>
2871 * decl.c (build_enumerator): Use add_double and int_fits_type_p
2872 instead of cp_build_binary_op, to avoid creating short-lived trees.
2873 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2874 lookahead instead of backtracking. Move some code to avoid a
2876 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2877 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2878 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2879 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2881 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2883 * decl.c (grok_declarator): Remove a redundant semicolon.
2885 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2886 Correct comments describing function parameters.
2888 2004-09-03 Matt Austern <austern@apple.com>
2889 Compile speed improvement.
2890 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2891 Otherwise define a stub macro that expands to nothing.
2892 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
2893 define a stub macro that expands to 0.
2894 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2895 (cp_lexer_stop_debugging): Likewise.
2896 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
2897 define a stub macro that expands to NULL.
2898 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2899 (cp_lexer_new_from_tokens): Likewise.
2901 2004-09-03 Jan Hubicka <jh@suse.cz>
2903 * decl.c (finish_function): Clean out pointers we no longer need.
2905 2004-09-03 Jan Beulich <jbeulich@novell.com>
2907 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2910 2004-09-02 Paul Brook <paul@codesourcery.com>
2912 * decl2.c (determine_visibility): Only check data visibility
2915 2004-08-31 Mark Mitchell <mark@codesourcery.com>
2917 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2918 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2919 * decl2.c (determine_visibility): Honor
2920 TARGET_CXX_EXPORT_CLASS_DATA.
2922 * class.c (key_method): Rename to ...
2923 (determine_key_method): ... this.
2924 (finish_struct_1): Adjust accordingly.
2925 * cp-tree.h (key_method): Declare.
2926 * decl2.c (maybe_emit_vtables): Determine the key method here if
2927 it has not already been done.
2929 2004-08-31 Ziemowit Laski <zlaski@apple.com>
2931 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2932 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2933 (cp/cp-decl.c): Do not depend on gtype-cp.h.
2934 (cp/cp-objcp-common.o): New target.
2935 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2936 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2937 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2938 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2940 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2941 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2942 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2943 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2944 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2945 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2946 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2947 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2948 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2949 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2950 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2951 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2952 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2953 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2954 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2955 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2956 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2957 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2958 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2959 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2960 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2961 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2962 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2963 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2964 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2965 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2966 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2967 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2968 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2969 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2970 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2971 hooks to cp-objcp-common.h.
2972 (finish_file): New function.
2973 * cp-objcp-common.c: New file.
2974 * cp-objcp-common.h: New file.
2975 * cp-tree.h (cp_finish_file): New prototype.
2976 * decl.c: Do not include gtype-cp.h.
2977 * decl2.c (finish_file): Rename to cp_finish_file.
2979 2004-08-31 Richard Henderson <rth@redhat.com>
2982 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2983 (tsubst_copy_and_build): ... here.
2985 2004-08-30 Mark Mitchell <mark@codesourcery.com>
2987 * cp-tree.h (initialize_artificial_var): Declare.
2988 * decl.c (initialize_artifical_var): New function.
2989 * class.c (initialize_array): Remove.
2990 (initialize_vtable): Use initialize_artificial_var.
2991 (build_vtt): Likewise.
2992 (build_ctor_vtbl_group): Likewise.
2994 2004-08-30 Richard Henderson <rth@redhat.com>
2996 * class.c (build_base_path): Use build_address directly.
2997 * typeck.c (build_unary_op): Don't lower &a.b to pointer
2998 arithmetic directly.
2999 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3000 means !initializer_constant_valid_p.
3002 2004-08-30 Richard Henderson <rth@redhat.com>
3004 * class.c (fixed_type_or_null): Use get_base_address before
3005 assuming an ADDR_EXPR is non-null.
3007 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3009 * name-lookup.c (pop_binding, pushdecl,
3010 set_identifier_type_value_with_scope, push_overloaded_decl,
3011 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3012 * parser.c (cp_parser_diagnose_invalid_type_name,
3013 cp_parser_postfix_expression, cp_parser_unary_expression,
3014 cp_parser_check_declarator_template_para): Likewise.
3015 * pt.c (push_inline_template_parms_recursive,
3016 check_explicit_specialization, convert_nontype_argument,
3017 coerce_template_template_parms, uses_template_parms,
3018 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3019 tsubst_expr, instantiate_template,
3020 maybe_adjust_types_for_deduction, type_unification_real,
3021 resolve_overloaded_unification, template_decl_level,
3022 type_dependent_expression_p): Likewise.
3023 * search.c (lookup_base_r): Likewise.
3024 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3025 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3026 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3027 * typeck.c (common_type, get_member_function_from_ptrfunc,
3028 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3029 * typeck2.c (cxx_incomplete_type_diagnostic,
3030 split_nonconstant_init_1, store_init_value,
3031 process_init_constructor): Likewise.
3033 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3035 * call.c (check_dtor_name): Replace abort with gcc_assert or
3037 (build_call, add_builtin_candidate, build_new_op,
3038 convert_like_real, build_over_call, in_charge_arg_for_name,
3039 source_type, joust): Likewise.
3040 * class.c (build_simple_base_path, get_vcall_index,
3041 finish_struct_1, instantiate_type, get_enclosing_class,
3042 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3043 * cp-gimplify.c (cp_genericize): Likewise.
3044 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3045 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3046 * decl.c (poplevel, make_unbound_class_template, reshape_init,
3047 check_special_function_return_type, grokdeclarator,
3048 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3049 finish_function): Likewise.
3050 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3051 * error.c (dump_global_iord, dump_decl, dump_template_decl,
3052 language_to_string): Likewise.
3053 * except.c (choose_personality_routine): Likewise.
3054 * friend.c (do_friend): Likewise.
3055 * g++spec.c (lang_specific_driver): Likewise.
3056 * init.c (build_zero_init, expand_default_init, build_new_1,
3057 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3058 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3059 * mangle.c (add_substitution, write_unscoped_name,
3060 write_template_prefix, write_identifier,
3061 write_special_name_destructor, write_type, write_builtin_type,
3062 write_expression, write_template_param,
3063 write_java_integer_type_codes): Likewise.
3064 * method.c (implicitly_declare_fn): Likewise.
3066 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3068 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3069 (BINFO_INDIRECT_PRIMARY_P): Remove.
3070 * class.c (determine_primary_base): Rename to ...
3071 (determine_primary_bases): ... here. Set all primary bases.
3072 (set_primary_base): Remove.
3073 (mark_primary_bases): Remove.
3074 (build_simple_base_path, walk_subobject_offsets,
3075 propagate_binfo_offsets, end_of_class): Adjust.
3076 (layout_class_type): Rename determine_primary_base call.
3077 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3079 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3080 build_rtti_vtbl_entries): Adjust.
3081 * init.c (build_vtbl_address): Adjust.
3083 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3085 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3087 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3088 CXX_AND_OBJCXX_OBJS.
3089 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3090 separately on the link line.
3092 2004-08-28 Jason Merrill <jason@redhat.com>
3094 * decl.c (expand_static_init): Avoid bogus warnings.
3096 2004-08-27 Jason Merrill <jason@redhat.com>
3099 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3102 * decl.c (expand_static_init): Use thread-safety API.
3103 (register_dtor_fn): Return the call, don't expand it.
3104 * tree.c (add_stmt_to_compound): New fn.
3105 (stabilize_call): Use it.
3107 2004-08-27 Richard Henderson <rth@redhat.com>
3109 * cp-tree.def (OFFSETOF_EXPR): New.
3110 * parser.c (cp_parser_builtin_offsetof): Either built an
3111 OFFSETOF_EXPR, or call fold_offsetof immediately.
3112 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3114 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3116 * call.c (validate_conversion_obstack): Replace
3117 my_friendly_assert with gcc_assert or gcc_unreachable.
3118 (direct_reference_binding, merge_conversion_sequences,
3119 build_user_type_conversion_1, perform_overload_resolution,
3120 build_op_delete_call, enforce_access, call_builtin_trap,
3121 build_over_call, build_special_member_call, build_new_method_call,
3122 initialize_reference): Likewise.
3123 * class.c (build_base_path, build_primary_vtable, alter_access,
3124 check_bases, update_vtable_entry_for_fn, layout_empty_base,
3125 clone_function_decl, adjust_clone_args,
3126 type_requires_array_cookie, include_empty_classes,
3127 finish_struct_1, resolve_address_of_overloaded_function,
3128 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3129 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3130 accumulate_vtbl_inits, build_vtbl_initializer,
3131 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3132 * cvt.c (build_up_reference, convert_to_reference): Likewise.
3133 * decl.c (poplevel, duplicate_decls, make_typename_type,
3134 cxx_init_decl_processing, reshape_init, check_initializer,
3135 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3136 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3137 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3138 xref_basetypes, start_preparsed_function, save_function_data,
3139 finish_function, finish_method, maybe_register_incomplete_var,
3140 complete_vars): Likewise.
3141 * decl2.c (grok_array_decl, check_member_template,
3142 check_classfn, finish_static_data_member_decl, coerce_new_type,
3143 coerce_delete_type, import_export_class, decl_needed_p,
3144 determine_visibility, import_export_decl, build_cleanup,
3145 start_static_initialization_or_destructi, do_static_destruction,
3146 prune_vars_needing_no_initialization,
3147 build_offset_ref_call_from_tree): Likewise.
3148 * error.c (dump_decl, dump_expr): Likewise.
3149 * init.c (finish_init_stmts, build_zero_init,
3150 expand_virtual_init, expand_default_init, expand_aggr_init_1,
3151 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
3153 * mangle.c (write_method_parms, write_template_args,
3154 write_expression, write_template_arg): Likewise.
3155 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3156 * name-lookup.c (pop_binding, begin_scope, leave_scope,
3157 resume_scope, push_using_decl, validate_nonmember_using_decl,
3158 is_ancestor, poplevel_class, set_inherited_value_binding_p,
3159 push_class_level_binding, do_class_using_decl, push_namespace,
3160 pop_namespace, add_using_namespace, ambiguous_decl,
3161 lookup_namespace_name, lookup_type_current_level,
3162 maybe_process_template_type_declaration): Likewise.
3163 * parser.c (cp_lexer_peek_nth_token,
3164 cp_parser_parse_and_diagnose_invalid_typ,
3165 cp_parser_translation_unit, cp_parser_template_id,
3166 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3167 * pt.c (push_access_scope, finish_member_template_decl,
3168 push_inline_template_parms_recursive, add_outermost_template_args,
3169 get_innermost_template_args, begin_explicit_instantiation,
3170 end_explicit_instantiation, retrieve_specialization,
3171 is_specialization_of, is_specialization_of_friend,
3172 register_specialization, check_explicit_specialization,
3173 comp_template_parms, process_template_parm,
3174 process_partial_specialization, convert_nontype_argument,
3175 coerce_template_template_parms, coerce_template_parms,
3176 mangle_class_name_for_template, lookup_template_function,
3177 lookup_template_class, instantiate_class_template, tsubst_decl,
3178 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3179 instantiate_template, fn_type_unification, type_unification_real,
3180 get_template_base, regenerate_decl_from_template,
3181 template_for_substitution, instantiate_decl,
3182 get_mostly_instantiated_function_type, dependent_scope_ref_p,
3183 value_dependent_expression_p, resolve_typename_type): Likewise.
3184 * repo.c (repo_emit_p): Likewise.
3185 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3186 create_tinfo_types, emit_tinfo_decl): Likewise.
3187 * search.c (lookup_base_r, lookup_base, lookup_field_1,
3188 dfs_access_in_type, build_baselink, lookup_member,
3189 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3190 * semantics.c (perform_or_defer_access_check,
3191 finish_non_static_data_member, finish_stmt_expr_expr,
3192 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3193 finish_template_template_parm, finish_member_declaration,
3194 emit_associated_thunks): Likewise.
3195 * tree.c (build_target_expr_with_type, force_target_expr,
3196 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3197 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3198 cxx_sizeof_or_alignof_type, perform_integral_promotions,
3199 build_class_member_access_expr, finish_class_member_access_expr,
3200 build_ptrmemfunc_access_expr, build_unary_op,
3201 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3202 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3203 * typeck2.c (complete_type_check_abstract,
3204 abstract_virtuals_error, process_init_constructor,
3205 add_exception_specifier): Likewise.
3207 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3209 * class.c (build_vtbl_initializer): Use ssize_int.
3210 * decl.c (complete_array_type): Likewise.
3211 * method.c (finish_thunk): Likewise.
3212 * search.c (get_dynamic_base_type): Likewise.
3214 2004-08-26 Richard Henderson <rth@redhat.com>
3216 * cp-tree.h (DECL_FIELD_IS_BASE): New.
3217 * class.c (build_base_field): Set it.
3218 (build_simple_base_path): Use it.
3219 (fixed_type_or_null): Don't consider base fields definitive.
3221 2004-08-25 Roger Sayle <roger@eyesopen.com>
3224 PR tree-optimization/16372
3225 * decl.c (finish_enum): Make the precision of the enumerated type
3226 the same width as the underlying integer type.
3228 2004-08-25 Mark Mitchell <mark@codesourcery.com>
3231 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3234 * mangle.c (get_identifier_nocopy): Add cast.
3236 * cp-tree.h (mangle_type): Remove.
3237 * mangle.c (globals): GTY it.
3238 (mangle_obstack): New variable.
3239 (name_obstack): Likewise.
3240 (name_base): Likewise.
3241 (write_char): Adjust accordingly.
3242 (write_chars): Likewise.
3243 (write_string): Likewise.
3244 (start_mangling): Initialize G.substitutions only one. Add
3246 (finish_mangling): Use VARRAY_CLEAR to reclaim
3247 storage in G.substitutions. Use obstack_finish.
3248 (init_mangle): Adjust for changes to variable names above.
3249 Initialize G.substitutions.
3250 (mangle_decl_string): Adjust call to start_mangling.
3251 (get_identifier_nocopy): New function.
3252 (mangle_decl): Use it.
3253 (mangle_type_string): Adjust call to start_mangling.
3254 (mangle_special_for_type): Likewise.
3255 (mangle_vtt_for_type): Likewise.
3256 (mangle_ctor_vtbl_for_type): Likewise.
3257 (mangle_thunk): Likewise.
3258 (mangle_guard_variable): Likewise.
3259 (mangle_ref_init_variable): Likewise.
3261 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3264 * pt.c (redeclare_class_template): Check the type of non-type and
3265 template template parameter.
3267 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3269 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
3270 (build_user_type_conversion_1, convert_like_real,
3271 build_java_interface_fn_ref, build_special_member_call): Likewise.
3272 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
3273 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3274 * cvt.c (cp_convert_to_pointer): Likewise.
3275 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3276 * decl2.c (start_static_initialization_or_destruction,
3277 generate_ctor_or_dtor_function): Likewise.
3278 * except.c (build_throw): Likewise.
3279 * mangle.c (write_integer_cst): Likewise.
3280 * method.c (finish_thunk): Likewise.
3281 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3282 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3283 get_pseudo_ti_init): Likewise.
3284 * search.c (get_dynamic_cast_base_type): Likewise.
3286 2004-08-25 Zack Weinberg <zack@codesourcery.com>
3288 * class.c, search.c: Remove references to DWARF_DEBUG.
3290 2004-08-25 Adam Nemet <anemet@lnxw.com>
3292 * repo.c (extract_string): Reset backquote after one character.
3293 (get_base_filename): Fix indentation.
3295 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3297 * decl.c (cxx_init_decl_processing): Adjust
3298 build_common_tree_nodes call.
3300 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3303 * (is_subobject_of_p): Resurrect & optimize.
3304 (lookup_field_r): Use it.
3306 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3309 * search.c (friend_accessible_p): Increment processing_template_decl
3310 when deal with TEMPLATE_DECL of SCOPE.
3312 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3315 * semantics.c (check_accessibility_of_qualified_id): Defer check
3316 if qualifying_type is a template parameter.
3318 2004-08-23 Mark Mitchell <mark@codesourcery.com>
3321 * pt.c (instantiate_decl): Do not try to apply
3322 DECL_DECLARED_INLINED_P to a VAR_DECL.
3324 * search.c (build_baselink): Fix typo in comment.
3326 2004-08-22 Andrew Pinski <apinski@apple.com>
3329 2004-08-22 Andrew Pinski <apinski@apple.com>
3331 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3332 expression is not constant.
3334 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3336 * name-lookup.c (pushdecl): Rename build_type_copy call.
3337 * tree.c (cp_build_qualified_type_real,
3338 build_exception_variant, handle_java_interface_attribute): Likewise.
3340 2004-08-22 Andrew Pinski <apinski@apple.com>
3343 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3344 expression is not constant.
3346 2004-08-20 Mark Mitchell <mark@codesourcery.com>
3349 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
3351 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
3354 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
3357 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3359 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
3360 before calling comp_template_args.
3362 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3364 * class.c (build_vtbl_initializer): Use build_int_cst for
3365 negative size types.
3366 * decl.c (complete_array_type): Likewise.
3367 * method.c (finish_thunk): Likewise.
3369 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
3371 * tree.c: Remove unused mark_local_for_remap_r.
3373 2004-08-19 Eric Christopher <echristo@redhat.com>
3375 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
3376 * tree.c (cxx_unsave_expr_now): Delete.
3377 (cp_unsave_r): Ditto.
3379 2004-08-19 Mark Mitchell <mark@codesourcery.com>
3382 * pt.c (push_template_decl_real): Disallow template allocation
3383 functions with fewer than two parameters.
3385 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3387 * cp-tree.h (build_shared_int_cst): Remove.
3388 * tree.c (shared_int_cache): Remove.
3389 (build_shared_int_cst): Remove.
3390 * class.c (finish_struct_1): Use build_int_cst.
3392 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3394 * decl.c (finish_enum): Do not copy value node early, copy
3396 * lex.c (cxx_init): Force null_node to be unique.
3398 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
3401 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
3402 from input for MODOP_EXPR.
3404 2004-08-18 Mark Mitchell <mark@codesourcery.com>
3406 * pt.c (dependent_template_p): Fix typo in commment.
3409 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
3412 2004-08-17 Mark Mitchell <mark@codesourcery.com>
3415 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
3416 arguments have the same type as the corresponding parameter.
3419 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
3420 is set use it for diagnostic purposes.
3421 (cp_parser_pseudo_destructor_name): Remove special-case error
3425 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3428 * cp-tree.h (qualified_name_lookup_error): Add parameter.
3429 * name-lookup.c (do_class_using_decl): Restrict set of entities
3430 passed to cp_emit_debug_info_for_using more carefully.
3431 (lookup_qualified_name): Allow lookup_member to return sets of
3433 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3434 (cp_parser_primary_expression): Handle ambiguous lookups.
3435 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3436 (cp_parser_template_argument): Likewise.
3437 (cp_parser_elaborate_type_specifier): Likewise.
3438 (cp_parser_namespace_name): Likewise.
3439 (cp_parser_class_name): Likewise.
3440 (cp_parser_lookup_name_simple): Likewise.
3441 * pt.c (tsubst_qualified_id): Handle ambiguous results.
3442 (tsubst_expr): Likewise.
3443 * semantics.c (qualified_name_lookup_error): Add decl paramter.
3444 For ambiguous lookups, print candidates.
3446 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3449 * pt.c (instantiate_pending_templates): Add int parameter. Don't
3451 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3452 * decl2.c (finish_file): Adjust call to
3453 instantiate_pending_templates.
3455 2004-08-15 Roger Sayle <roger@eyesopen.com>
3457 * call.c (build_vfield_ref, build_call, build_conditional_expr,
3458 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3459 build_java_interface_fn_ref, build_special_member_call,
3460 build_new_method_call, initialize_reference): Replace calls to
3461 build with calls to buildN.
3462 * class.c (build_base_path, convert_to_base_statically,
3463 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3464 build_vtbl_initializer): Likewise.
3465 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
3466 gimplify_if_stmt, cp_genericize_r): Likewise.
3467 * cvt.c (convert_to_void): Likewise.
3468 * decl.c (check_initializer, finish_constructor_body,
3469 finish_destructor_body): Likewise.
3470 * error.c (dump_expr): Likewise.
3471 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
3473 * init.c (perform_member_init, expand_virtual_init,
3474 expand_cleanup_for_base, build_init, expand_default_init,
3475 build_offset_ref, decl_constant_value, build_new, build_new_1,
3476 build_vec_delete_1, build_vec_init, build_delete,
3477 push_base_cleanups, build_vec_delete): Likewise.
3478 * mangle.c (write_integer_cst): Likewise.
3479 * method.c (thunk_adjust, do_build_copy_constructor,
3480 do_build_assign_ref): Likewise.
3481 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
3482 unify, build_non_dependent_expr): Likewise.
3483 * rtti.c (build_headof, build_typeid, ifnonnull,
3484 build_dyanmic_cast_1, tinfo_base_init): Likewise.
3485 * semantics.c (begin_compound_stmt, finish_call_expr,
3486 finish_pseudo_destructor_expr, finish_id_expression,
3487 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
3488 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
3489 array_type_nelts_total, stabilize_call): Likewise.
3490 * typeck.c (decay_conversion, build_class_member_access_expr,
3491 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
3492 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
3493 build_x_unary_op, build_unary_op, unary_complex_lvalue,
3494 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
3495 check_return_expr): Likewise.
3496 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
3497 split_nonconstant_init, store_init_value, build_m_component_ref):
3500 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3502 * call.c (convert_class_to_reference,
3503 build_user_type_conversion_1, convert_like_real,
3504 build_java_interface_fn_ref, build_special_member_call): Use
3506 * class.c (build_vtbl_initializer): Likewise.
3507 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3508 * cvt.c (cp_convert_to_pointer): Likewise.
3509 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3510 * decl2.c (start_static_initialization_or_destruction,
3511 generate_ctor_or_dtor_function): Likewise.
3512 * except.c (build_throw): Likewise.
3513 * lex.c (cxx_init): Likewise.
3514 * mangle.c (write_integer_cst): Likewise.
3515 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3516 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3517 get_pseudo_ti_init): Likewise.
3518 * search.c (get_dynamic_cast_base_type): Likewise.
3519 * tree.c (build_shared_int_cst): Likewise.
3521 2004-08-12 Mark Mitchell <mark@codesourcery.com>
3524 * class.c (count_depth_data): New type.
3525 (dfs_depth_post): New function.
3526 (dfs_depth_q): Likewise.
3527 (find_final_overrider_data_s): Change type of vpath.
3529 (dfs_find_final_overrider_1): New function.
3530 (dfs_find_final_overrider): Use it.
3531 (dfs_find_final_overrider_q): Adjust use of vpath.
3532 (dfs_find_final_overrider_post): Likewise.
3533 (find_final_overrider): Use dfs_depth. Allocate and deallocate
3536 2004-08-12 Jan Beulich <jbeulich@novell.com>
3538 * parser.c (cp_parser_asm_definition): Properly consume scope operator
3539 tokens preceding the clobbers. Don't check for scope operator
3540 following inputs. Simplify inputs handling to match that now used for
3543 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3546 * except.c (build_throw): Allocate cleanup_type and the function
3547 for __cxa_throw separately.
3550 * call.c (standard_conversion): Do not accept conversions between
3551 pointers to members if the class types are unrelated.
3554 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
3555 char &" instead of just "char &".
3558 * pt.c (tsubst): Just return the unknown_type_node.
3560 2004-08-11 Mark Mitchell <mark@codesourcery.com>
3563 * parser.c (cp_parser_class_specifier): Robustify.
3566 * pt.c (tsubst_copy_and_build): Complain about invalid
3570 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
3571 current_class_ref while tsubsting.
3573 2004-08-10 Mark Mitchell <mark@codesourcery.com>
3576 * parser.c (cp_parser_init_declarator): Robustify.
3578 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
3580 * typeck2.c (process_init_constructor): Guard the missing field warning
3581 with warn_missing_field_initializers rather than extra_warnings.
3583 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
3585 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
3587 2004-08-05 Mark Mitchell <mark@codesourcery.com>
3589 * decl.c (start_preparsed_function): Move determine_visibility
3591 * decl2.c (determine_visibility): Incorporate dllexport testing.
3593 2004-08-05 Geoffrey Keating <geoffk@apple.com>
3595 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
3596 means that libstdc++ is needed.
3598 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
3600 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
3602 2004-08-04 Geoffrey Keating <geoffk@apple.com>
3604 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
3605 than passing it as a parameter to rest_of_decl_compilation.
3606 * decl2.c (grokfield): Use set_user_assembler_name.
3608 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
3610 * decl.c (complete_array_type): Don't gratuitously copy
3611 maxindex. Its type is always set.
3613 2004-08-04 Paul Brook <paul@codesourcery.com>
3615 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
3616 * cp-tree.h (struct language_function): Rename x_dtor_label to
3618 (dtor_label): Rename ...
3619 (cdtor_label): ... to this.
3620 * decl.c (begin_constructor_body): Remove.
3621 (check_special_function_return_type): Maybe change the return type.
3622 (grokdeclarator): Pass the class type.
3623 (start_preparsed_function): Constructors may need a return label.
3624 (finish_constructor_body, finish_destructor_body): Set the return
3626 (begin_function_body): Don't call begin_constructor_body.
3627 (finish_function): Don't warn for constructors or destructors.
3628 (implicitly_declare_fn): Maybe change the return type.
3629 * optimize.c: Include target.h.
3630 (maybe_clone_body): Remap the function result.
3631 * semantics.c: Include target.h.
3632 (finish_return_stmt): Maybe jump to return label for constructors.
3634 2004-08-03 Mark Mitchell <mark@codesourcery.com>
3636 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
3637 (check_field_decls): Or here.
3638 (check_methods): Or here.
3639 (initialize_array): Don't mess with DECL_CONTEXT.
3640 * cp-tree.h (start_decl): Adjust prototype.
3641 (determine_visibility): New function.
3642 * decl.c (duplicate_decls): Remove checks for hidden "operator
3644 (build_library_fn_1): Give all library functions default
3646 (start_decl): Add pop_scope_p parameter. Tidy.
3647 (cp_finish_decl): Do not pop scopes here. Call
3648 determine_visibility for variable definitions.
3649 (start_preparsed_function): Call determine_visibility.
3650 * decl2.c (determine_visibility): New function.
3651 * method.c (use_thunk): Fix formatting.
3652 * parser.c (cp_parser_condition): Adjust calls to start_decl.
3653 (cp_parser_init_declarator): Likewise.
3654 * pt.c (instantiate_decl): Always call pop_nested_class.
3655 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
3656 (tinfo_base_init): Likewise.
3658 2004-08-02 Mark Mitchell <mark@codesourcery.com>
3661 * name-lookup.c (validate_nonmember_using_decl): Robustify.
3663 2004-08-01 Mark Mitchell <mark@codesourcery.com>
3666 * name-lookup.c (decl_namespace): Remove.
3667 (current_decl_namespace): Use decl_namespace_context instead of
3669 (push_decl_namespace): Likewise.
3670 (arg_assoc_class): Likewise.
3671 (arg_assoc_type): Likewise.
3672 * pt.c (check_specialization_namespace): New function.
3673 (maybe_process_partial_specialization): Use it.
3674 (register_specialization): Likewise.
3677 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
3678 * call.c (null_ptr_cst_p): Handle variables with constant
3680 * pt.c (convert_nontype_argument): Use
3681 DECL_INTEGRAL_CONSTANT_VAR_P.
3682 * semantics.c (finish_id_expression): Likewise.
3685 * decl.c (duplicate_decls): Reject duplicate namespace
3689 * typeck.c (build_ptrmemfunc): Loosen assertion.
3691 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3693 * call.c (z_candidate::template_decl): Rename from template.
3694 (add_template_candidate_real): Adjust member reference.
3697 2004-07-29 Mark Mitchell <mark@codesourcery.com>
3699 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
3700 (lang_decl_flags): Narrow the width of "languages". Add
3702 (DECL_NEEDED_P): Remove.
3703 (FOR_EACH_CLONE): New macro.
3704 (DECL_REPO_AVAILABLE_P): Likewise.
3705 (DECL_TINFO_P): Likewise.
3706 (set_linkage_according_to_type): Declare.
3707 (import_export_vtable): Remove.
3708 (import_export_tinfo): Likewise.
3709 (mark_needed): New function.
3710 (decl_needed_p): Likewise.
3711 (note_vauge_linkage_fn): Likewise.
3712 (init_repo): Change prototype.
3713 (repo_template_used): Remove.
3714 (repo_template_instantiated): Likewise.
3715 (repo_emit_p): New function.
3716 (repo_export_class_p): Likewise.
3717 (no_linkage_check): Change prototype.
3718 * class.c (set_linkage_according_to_type): New function.
3719 (build_vtable): Use it. Do not call import_export_vtable. Set
3720 DECL_IGNORED_P if appropriate.
3721 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
3722 (make_rtL_for_nonlocal_decls): Check for template instantiations
3724 (grokfndecl): Adjust call to no_linkage_check.
3725 (set_linkage_for_static_data_member): New function.
3726 (grokvardecl): Use it. Adjust call to no_linkage_check.
3727 (grokdeclarator): Use set_linkage_for_static_data_member.
3728 * decl2.c (note_vague_linkage_fn): New function.
3729 (note_vague_linkage_var): Likewise.
3730 (finish_static_data_member_decl): Use it.
3731 (import_export_vtable): Remove.
3732 (import_export_class): Use repo_export_class_p.
3733 (var_finalized_p): Simplify.
3734 (maybe_emit_vtables): Simplify.
3735 (mark_needed): New function.
3736 (decl_needed_p): Likewise.
3737 (import_export_decl): Add documentation and consistency checks.
3738 Use repo_emit_p. Handle virtual tables and RTTI information
3740 (import_export_tinfo): Remove.
3741 (write_out_vars): Call import_export_decl.
3742 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
3744 (finish_file): Use decl_needed_p. Do not call import_export_decl
3745 for undefined static data members. Do not warn about undefined
3746 inlines when using a repository.
3747 (mark_used): Use note_vague_linkage_fn. Always defer template
3749 * lex.c (cxx_init): Adjust call to init_repo. Always set
3750 flag_unit_at_a-time.
3751 * method.c (synthesize_method): Remove unncessary
3752 import_export_decl call.
3753 (implicitly_declare_fn): Use set_linkage_according_to_type.
3754 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
3755 * pt.c (instantiate_class_template): Don't redundantly add classes
3756 to keyed_classes. Don't call repo_template_used.
3757 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
3758 templates with internal linkage.
3759 (check_instantiated_args): Adjust call to no_linkage_check.
3760 (instantiate_template): Use FOR_EACH_CLONE.
3761 (mark_definable): New function.
3762 (mark_decl_instantiated): Use it.
3763 (do_decl_instantiation): Adjust tests for explicit instantiation
3764 after "extern template".
3765 (instantiate_class_member): Do not use repo_template_instantiated.
3766 (do_type_instantiation): Simplify.
3767 (instantiate_decl): Use mark_definable. Check repo_emit_p.
3769 * repo.c (repo_get_id): Remove.
3770 (original_repo): Remove.
3771 (IDENTIFIER_REPO_USED): Remove.
3772 (IDENTIFIER_REPO_CHOSEN): Remove.
3773 Remove all #if 0'd code.
3774 (repo_template_used): Remove.
3775 (repo_template_instantiated): Remove.
3776 (temporary_obstack_initialized_p): New variable.
3777 (init_repo): Register with lang_post_pch_load. Avoid creating
3778 identifiers unnecessarily. Don't use original_repo. Close the
3780 (reopen_repo_file_for_write): Not here.
3781 (finish_repo): Always write out a new repository file.
3782 (repo_emit_p): New function.
3783 (repo_export_class_p): Likewise.
3784 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
3785 (involves_incomplete_p): New function.
3786 (tinfo_base_init): Use it.
3787 (ptr_initializer): Remove non_public_ptr parameter.
3788 (ptm_initializer): Likewise.
3789 (get_pseudo_ti_init): Likewise.
3790 (unemitted_tinfo_decl_p): Remove.
3791 (emit_tinfo_decl): Use import_export_decl.
3792 * semantics.c (expand_body): Move updates of static_ctors and
3794 (expand_or_defer_fn): ... here.
3795 * tree.c (no_linkage_check): Add relaxed_p parameter.
3797 2004-07-28 Eric Christopher <echristo@redhat.com>
3799 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3801 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
3803 * cp-tree.h (struct tree_pair_s): New.
3804 (typedef tree_pair_p): New.
3805 (DEF_VEC_O(tree_pair_s)): New.
3806 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
3807 (CLASSTYPE_VCALL_INDICES): Update documentation.
3808 * class.c (get_vcall_index): Adjust.
3809 (add_vcall_offset): Adjust.
3811 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
3813 * pt.c, typeck.c: Remove spurious carriage returns.
3815 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3818 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
3819 when the type of ARG is not dependent.
3821 2004-07-26 Geoffrey Keating <geoffk@apple.com>
3823 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
3824 (lang_specific_driver): If the C++ or math library options don't
3825 start with '-l', don't count them as added libraries.
3827 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
3829 * decl.c (xref_basetypes): Adjust base access vector creation.
3830 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
3832 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
3834 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
3835 Brian Ryner <bryner@brianryner.com>
3839 * class.c (check_field_decls): Apply hidden visibility if
3840 -fvisibility-inlines-hidden and inlined unless otherwise specified
3841 (build_vtable): Set vtable visibility to class visibility.
3842 (check_field_decls): Default static member visibility to class
3844 (check_methods): Default method visibility to class visibility.
3845 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
3846 CLASSTYPE_VISIBILITY_SPECIFIED macro.
3847 * decl.c (duplicate_decls): New logic for merging definition decls
3848 with declaration decls. Added ignore & warning when non default
3849 applied to global operator new or delete.
3850 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
3851 wherever VISIBILITY was changed
3852 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
3854 (tinfo_base_init): Set typeinfo name visibility to class visibility.
3856 2004-07-25 Bernardo Innocenti <bernie@develer.com>
3858 * decl.c: Rename all identifiers named `class' to `cl'.
3859 * cp-tree.h: Likewise.
3861 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3863 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
3864 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
3865 * name-lookup.c (binding_entry_make): Use GGC_NEW.
3866 (binding_table_construct): Use GGC_CNEWVEC.
3867 (binding_table_new): Use GGC_NEW.
3868 (cxx_binding_make): Likewise.
3869 (begin_scope): Likewise.
3870 (push_to_top_level): Use GCC_CNEW.
3871 * parser.c (cp_token_cache_new): Likewise.
3872 (cp_token_cache_push_token): Likewise.
3873 (cp_lexer_new_main): Likewise.
3874 (cp_lexer_new_from_tokens): Likewise.
3875 (cp_parser_context_new): Likewise.
3876 (cp_parser_new): Likewise.
3877 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
3878 * lex.c (cxx_make_type): Use GGC_CNEW.
3879 (retrofit_lang_decl): Use GGC_NEWVAR.
3880 (cxx_dup_lang_specific_decl): Likewise.
3881 (copy_lang_type): Likewise.
3882 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
3883 (save_function_data): Likewise.
3884 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
3885 (cxx_push_function_context): Likewise.
3887 2004-07-25 Richard Henderson <rth@redhat.com>
3889 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
3890 DECL_IGNORED_P on RESULT_DECL.
3891 * semantics.c (finalize_nrv): Copy them too.
3893 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
3895 * search.c (lookup_conversion_operator): Avoid two loops.
3896 (add_conversions): Remove.
3897 (check_hidden_convs, split_conversions,
3898 lookup_conversions_r): New.
3899 (lookup_conversions): Use lookup_conversions_r.
3901 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
3903 * pt.c (get_template_base): Check type is completable.
3905 2004-07-21 Eric Christopher <echristo@redhat.com>
3907 * decl.c (poplevel): Inline unused variable checking.
3910 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
3912 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
3915 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3918 * pt.c (check_explicit_specialization): Remove extension to accept
3919 specializations without template headers. Fall-through to normal
3922 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3925 * pt.c (determine_specialization): New parameter template_count.
3926 Disambiguate between member templates and member functions counting
3927 the template headers.
3928 (check_explicit_specialization): Update caller.
3929 (tsubst_friend_function): Likewise.
3931 2004-07-20 Steven Bosscher <stevenb@suse.de>
3933 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
3934 * cp-tree.h (tinst_level_t): New tree type.
3935 (union lang_tree_node): Handle it.
3936 (TINST_LOCATION): New accessor macro.
3937 (make_tinst_level): New prototype.
3938 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
3939 * decl.c (cp_tree_node_structure): Likewise.
3940 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
3941 (print_instantiation_partial_context): Likewise.
3942 * pt.c (pop_tinst_level): Likewise.
3943 (push_tinst_level): Use make_tinst_level.
3944 * tree.c (make_tinst_level): New function.
3945 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
3947 2004-07-20 Mark Mitchell <mark@codesourcery.com>
3949 * parser.c (cp_parser_simple_type_specifier): Fix typo.
3952 * parser.c (cp_parser_simple_type_specifier): Do not record usage
3953 of globally-qualified names.
3955 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3958 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
3961 2004-07-19 Mark Mitchell <mark@codesourcery.com>
3964 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3965 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3966 * class.c (add_implicitly_declared_members): Use
3967 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3968 * method.c (lazily_declare_fn): Clear
3969 CLASSTYPE_LAZY_ASSIGNMENT_OP.
3970 * search.c (lookup_fnfields_1): Check it.
3972 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3974 * cp-tree.h (vec_binfo_member): Remove.
3975 * tree.c (vec_binfo_member): Remove.
3977 * cp-tree.h (struct lang_type_class): Remove vfields field.
3978 (CLASSTYPE_VFIELDS): Remove.
3979 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3980 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
3982 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
3983 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
3984 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
3986 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
3988 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
3989 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3991 (BINFO_LANG_SLOTS): Remove.
3992 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
3993 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
3994 * class.c (check_bases): Adjust BINFO accessors.
3995 (determine_primary_base, finish_struct_bits,
3996 maybe_warn_about_overly_private_class, warn_hidden,
3997 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
3998 warn_about_ambiguous_bases, get_vfield_name,
3999 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4000 add_vcall_offset_vtbl_entries_r): Likewise.
4001 * dump.c (cp_dump_tree): Likewise.
4002 * init.c (sort_mem_initializers, expand_member_init, build_delete,
4003 push_base_cleanups): Likewise.
4004 * method.c (do_build_copy_constructor, do_build_assign_ref,
4005 synthesize_exception_spec): Likewise.
4006 name-lookup.c (arg_assoc_class): Likewise.
4007 * pt.c (instantiate_class_template,
4008 get_template_base_recursive): Likewise.
4009 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4010 * typeck2.c (process_init_constructor): Likewise.
4011 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4012 dfs_access_in_type, dfs_walk_real, look_for_overrides,
4013 types_overlap_p, copied_binfo, original_binfo): Likewise.
4014 (binfo_for_vtable): Remove
4016 2004-07-20 Steven Bosscher <stevenb@suse.de>
4018 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4019 thunk_alias, and the access and virtual_offset fields.
4020 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4021 * decl.c (finish_case_label): Update c_add_case_node call.
4023 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4025 Revert patch for PR c++/16623.
4027 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
4029 * except.c: Remove two spurious carriage returns.
4031 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4034 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4035 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4036 * class.c (add_implicitly_declared_members): Use
4037 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4038 * method.c (lazily_declare_fn): Clear
4039 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4040 * search.c (lookup_fnfields_1): Check it.
4042 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
4044 * class.c (add_method): Delay adding the slot until the end.
4045 (determine_primary_base): Adjust VEC_iterate invokation.
4046 (resort_type_method_vec, finish_struct_methods, warn_hidden,
4047 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4048 build_vtbl_initializer): Likewise.
4049 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4050 build_vbase_delete): Likewise.
4051 * method.c (do_build_copy_constructor): Likewise.
4052 * name-lookup.c (new_class_binding, print_binding_level,
4053 poplevel_class, store_class_bindings, push_to_top_level,
4054 pop_from_top_level): Likewise.
4055 * pt.c (check_explicit_specialization): Likewise.
4056 * search.c (lookup_conversion_operator, lookup_fnfields_1,
4057 get_pure_virtuals, add_conversions, dfs_check_overlap,
4058 binfo_for_vbase): Likewise.
4060 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4063 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4064 innermost set of template arguments during deduction. Simplify.
4066 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
4068 * typeck.c (build_modify_expr, build_x_modify_expr): Set
4069 TREE_NO_WARNING on assignments with an operator other than '='.
4071 2004-07-10 Steven Bosscher <stevenb@suse.de>
4072 Joseph S. Myers <jsm@polyomino.org.uk>
4074 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4075 * decl2.c (grokfield): Don't check current_class_depth via
4076 unused TREE_COMPLEXITY.
4077 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4078 to avoid the missing parentheses warning.
4079 Don't set C_SET_EXP_ORIGINAL_CODE.
4081 2004-07-18 Mark Mitchell <mark@codesourcery.com>
4083 * tree.c (no_linkage_helper): Remove.
4084 (no_linkage_check): Don't use walk_tree_without_duplicates.
4086 * mangle.c (write_expression): Issue a sorry for zero-operand
4089 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4092 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4093 TREE_TYPE for non-dependent names.
4094 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4095 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4096 unknown_type_node as its TREE_TYPE.
4097 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4098 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4099 (dump_expr) <SCOPE_REF case>: Likewise.
4101 2004-07-17 Jason Merrill <jason@redhat.com>
4104 * call.c (type_passed_as): Make the invisible reference type
4106 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4107 cp_genericize_r. Handle invisible reference lowering.
4108 (is_invisiref_parm): New fn.
4109 (cp_genericize): Adjust the types of invisible reference parms.
4110 Don't repeat the walk for clones.
4111 * decl.c (store_parm_decls): Don't generate any code for clones.
4113 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4115 * cp-tree.h (builtin_function): Declare.
4117 2004-07-16 Mark Mitchell <mark@codesourcery.com>
4119 * class.c (finish_struct_methods): Remove unncessary code.
4120 (add_implicitly_declared_members): Create declarations for default
4121 constructors and copy constructors lazily.
4122 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
4124 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
4125 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
4126 * decl2.c (check_classfn): Robustify.
4127 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
4128 (locate_ctor): Handle lazy default constructors.
4129 (locate_copy): Handle lazy copy constructors.
4130 (implicitly_declare_fn): Make sure we're looking at the
4131 TYPE_MAIN_VARIANT for a class before creating functions. Don't
4132 set TYPE_HAS_CONSTRUCTOR.
4133 (lazily_declare_fn): New function.
4134 * name-lookup.c (constructor_name_full): Simplify.
4135 * search.c (lookup_fnfields_1): Lazily create methods, as
4137 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
4139 2004-07-16 Steven Bosscher <stevenb@suse.de>
4141 * cp-tree.h (struct lang_type): Don't have three GTY options on a
4142 single bit GTY desc.
4144 2004-07-16 Richard Henderson <rth@redhat.com>
4146 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
4147 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
4148 * tree.c (cp_copy_res_decl_for_inlining): Remove.
4150 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
4152 * class.c (finish_struct_bits): Use for loop.
4153 (propagate_binfo_offsets): Do primary binfo outside of loop.
4156 * dump.c (cp_dump_tree): Don't dump the bases if there's no
4159 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
4161 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4163 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
4164 has_abstract_assign_ref. Make methods a VEC(tree) *.
4165 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
4166 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
4167 (CLASSTYPE_DESTRUCTORS): Likewise.
4168 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
4169 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4170 (add_method): Change prototoype.
4171 * class.c (add_method): Remove error_p parameter. Adjust for
4172 changes to CLASSTYPE_METHOD_VEC.
4173 (handle_using_decl): Adjust call to add_method.
4174 (maybe_warn_about_overly_private_class): Adjust for
4175 changes to CLASSTYPE_METHOD_VEC.
4176 (resort_type_method_vec): Likewise.
4177 (finish_struct_methods): Likewise.
4178 (check_for_override): Likewise.
4179 (warn_hidden): Likewise.
4180 (add_implicitly_declared_members): Defer creation of assignment
4181 operators. Adjust call to add_method.
4182 (clone_function_decl): Adjust call to add_method.
4183 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
4184 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
4185 * decl.c (grok_special_member_properties): Don't set
4186 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4187 * decl2.c (check_classfn): Adjust for
4188 changes to CLASSTYPE_METHOD_VEC.
4189 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
4190 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
4191 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
4192 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
4194 * pt.c (check_explicit_specialization): Adjust for
4195 changes to CLASSTYPE_METHOD_VEC.
4196 (instantiate_class_template): Do not set
4197 TYPE_HAS_ABSTRACT_ASSIGN_REF.
4198 * ptree.c (cxx_print_type): Don't try to print
4199 CLASSTYPE_METHOD_VEC.
4200 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
4201 * search.c (lookup_field_r): Adjust for
4202 changes to CLASSTYPE_METHOD_VEC.
4203 (lookup_fnfields): Likewise.
4204 (lookup_conversion_operator): Likewise.
4205 (lookup_fnfields_1): Likewise. Create assignment operators
4207 (look_for_overrides_here): Adjust for
4208 changes to CLASSTYPE_METHOD_VEC.
4209 (add_conversions): Likewise.
4210 * semantics.c (finish_member_declaration): Adjust call to add_method.
4212 2004-07-15 Jason Merrill <jason@redhat.com>
4214 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4215 references and pointers are compatible.
4217 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4219 * decl.c (xref_basetypes): Refactor.
4220 * tree.c (copy_base_binfos): Replace with ...
4221 (copy_binfo): ... this. Deep copy the given binfo, (not the just
4222 bases of the given base).
4223 * cp-tree.h (copy_base_binfo): Remove.
4224 (copy_binfo): Declare.
4226 2004-07-15 Mark Mitchell <mark@codesourcery.com>
4228 * name-lookup.c (set_inherited_value_binding_p): Add class_type
4230 (get_class_binding): Adjust.
4231 (push_class_level_binding): Don't use set_inherited_value_binding_p.
4233 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
4235 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4236 * decl.c (xref_basetypes): Set it here.
4238 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4239 Don't check for incomplete base.
4240 (get_vfield_name): Simplify while loop.
4241 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
4243 2004-07-14 Mark Mitchell <mark@codesourcery.com>
4245 * lex.c (cxx_make_type): Remove call to get_pointer_type.
4247 * cp-tree.h (IDENTIFIER_VALUE): Remove.
4248 (BINFO_PUSHDECLS_MARKED): Likewise.
4249 (maybe_inject_for_scope_var): Likewise.
4250 (push_class_decls): Likewise.
4251 * name-lookup.h (push_class_binding): Remove.
4252 (innermost_non_namespace_value): New function.
4253 (outer_binding): Likewise.
4254 * class.c (add_method): Push bindings before adding to
4256 (restore_class_cache): Do not restore class_shadowed.
4257 (pushclass): Do not add USING_DECLs. Do not call
4259 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
4260 * decl.c (pushdecl): Use outer_binding.
4261 (poplevel): Set the scope for an out-of-scope for-loop declaration
4263 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
4264 * name-lookup.c (new_class_binding): New function.
4265 (push_binding): Use it.
4266 (pushdecl): Use innermost_non_namespace_value.
4267 (maybe_inject_for_scope_var): Remove.
4268 (push_class_binding): Remove.
4269 (set_inherited_value_binding_p): New function.
4270 (get_class_binding): New function.
4271 (push_class_level_binding): Assert that the current_class_type is
4273 (outer_binding): New function.
4274 (innermost_non_namespace_value): Likewise.
4275 (lookup_name_real): Use outer_binding.
4276 (lookup_name_current_level): Ignore out-of-scope variables.
4277 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
4278 (lookup_template_class): Likewise.
4279 * search.c (dfs_push_type_decls): Remove.
4280 (dfs_push_decls): Likewise.
4281 (setup_class_bindings): Likewise.
4282 (lookup_field_1): Handle USING_DECLs from dependent scopes.
4283 (marked_pushdecls_p): Remove.
4284 (unmarked_pushdecls_p): Remove.
4285 (marked_identifiers): Remove.
4286 (setup_class_bindings): Remove.
4287 (dfs_push_type_decls): Remove.
4288 (dfs_push_decls): Remove.
4289 (push_class_decls): Remove.
4291 2004-07-13 Mark Mitchell <mark@codesourcery.com>
4295 * decl.c (grokvardecl): Make declspecs parameter const.
4296 (grokdeclarator): Likewise. Adjust accordingly.
4297 * decl.h (grokdeclarator): Adjust declaration.
4298 * parser.c (cp_parser_init_declarator): Do not clear
4299 decl_specifiers->attributes.
4301 * cp-tree.h (lang_identifier): Remove class_value.
4302 (IDENTIFIER_CLASS_VALUE): Remove.
4303 (pop_class_decls): Likewise.
4304 (init_search_processing): Likewise.
4305 * class.c (handle_using_decl): Use lookup_member, not
4306 IDENTIFIER_CLASS_VALUE.
4307 (restore_class_cache): New function, split out from ...
4308 (pushclass): ... here. Do not call clear_identifier_class_values.
4309 (invalidate_class_lookup_cache): Do not clear
4310 IDENTIFIER_CLASS_VALUE.
4311 (popclass): Do not call pop_class_decls.
4312 (maybe_note_name_used_in_class): Do not save names looked up after
4313 the class is complete. Use lookup_member, not
4314 IDENTIFIER_CLASS_VALUE.
4315 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
4316 * decl.c (cxx_init_decl_processing): Do not call
4317 init_search_processing.
4318 * method.c (do_build_copy_constructor): Remove unnecessary code.
4319 (do_build_assign_ref): Likewise.
4320 * name-lookup.c (pushdecl): Use lookup_member, not
4321 IDENTIFIER_CLASS_VALUE.
4322 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
4324 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
4325 (push_class_binding): Do not set it.
4326 (clear_identifier_class_values): Remove.
4327 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
4328 (store_binding): Do not save it.
4329 (pop_from_top_level): Do not restore it.
4330 * name-lookup.h (cxx_saved_binding): Remove class_value.
4331 (clear_identifier_class_values): Remove.
4332 * ptree.c (cxx_print_identifier): Do not print
4333 IDENTIFIER_CLASS_VALUE.
4334 * search.c (search_obstack): Remove.
4335 (push_stack_level): Remove.
4336 (pop_stack_level): Remove.
4337 (search_level): Remove.
4338 (search_stack): Remove.
4339 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
4340 (setup_class_bindings): Use IDENTIFIER_MARKED, not
4341 IDENTIFIER_CLASS_VALUE.
4342 (marked_identifiers): New variable.
4343 (push_class_decls): Clear IDENTIFIER_MARKED.
4344 (pop_class_decls): Don't call pop_search_level.
4345 (init_search_processing): Remove.
4347 2004-07-12 Mark Mitchell <mark@codesourcery.com>
4349 * cp-tree.h (get_aggr_typedef): Remove.
4350 * init.c (get_aggr_typedef): Likewise.
4352 * name-lookup.c (push_class_level_binding): Simplify.
4354 2004-07-12 Andrew Pinski <apinski@apple.com>
4358 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
4360 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4363 2004-07-12 Eric Christopher <echristo@redhat.com>
4365 * parser.c (cp_parser_class_head): Remove unused variable.
4367 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4369 * decl.c (grok_op_properties): Reject [de-]allocation functions
4370 declared in a namespace, or declared as static.
4372 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
4374 * cp-tree.h (make_binfo): Remove.
4375 * decl.c (xref_basetypes): Use make_tree_binfo directly.
4376 * tree.h (copy_base_binfos): Likewise.
4377 (make_binfo): Remove.
4379 * call.c (build_user_type_conversion_1, build_new_op,
4380 check_constructor_callable, build_temp,
4381 perform_direct_initialization_of_possible): Pass type directly to
4382 lookup_fnfields & build_special_member_call.
4383 (build_special_member_call): Accept a type, and complete it.
4384 * class.c (finish_stuct_bits): Copy the BINFOs here.
4385 * cvt.c (ocp_convert): Pass type directly to
4386 build_special_member_call.
4387 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
4388 (xref_basetypes): Allocate the binfo here. Adjust.
4389 * init.c (build_init, build_new_1): Pass type directly to
4390 build_special_member_call.
4391 * lex.c (cxx_make_type): Do not allocate binfo here.
4392 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
4393 * parser.c (cp_parser_class_head): Always call xref_basetypes.
4394 * pt.c (instantiate_class_template): Likewise. Inhibit access
4395 checking for template friends.
4396 * ptree.c (cxx_print_type): Adjust record printing.
4397 * search.c (lookup_base): When taking a type, complete it before
4398 looking for a binfo.
4399 (lookup_member): Delay completing a type.
4400 (push_class_decls): Don't walk an incomplete type.
4401 (lookup_conversions): Likewise.
4402 * semantics.c (finish_stmt_expr_expr): Pass type directly to
4403 build_special_member_call.
4404 * tree.c (copy_base_binfos): Adjust.
4405 (make_binfo): Likewise.
4406 * typeck.c (build_modify_expr): Pass type directly to
4407 build_special_member_call.
4408 * typeck2.c (process_init_constructor): Check a binfo exists.
4409 (build_m_component_ref): Allow accessing an incomplete type.
4410 (build_functional_cast): Pass type directly to
4411 build_special_member_call.
4413 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4416 * config-lang.in (gtfiles): Add typeck2.c.
4417 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
4419 * cp-tree.h: Declare complete_type_check_abstract.
4420 * typeck2.c (pat_calc_hash, pat_compare,
4421 complete_type_check_abstract): New functions.
4422 (abstract_virtuals_error): If the type is abstract, register the
4423 declaration within abstract_pending_vars for further checks.
4424 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
4425 * decl.c (cp_finish_decl): Do not strip array types.
4426 (create_array_type_for_decl): Check for abstractness of the element
4428 (complete_vars): Call complete_type_check_abstract.
4429 * class.c (finish_struct): Prepare a list of virtual functions for
4430 template types, and call complete_vars on it to check for abstractness.
4432 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
4434 PR tree-optimization/14107
4435 * decl.c (finish_function): Remove temporary band-aid.
4437 2004-07-11 Mark Mitchell <mark@codesourcery.com>
4439 * call.c (build_operator_new_call): Avoid using push_to_top_level.
4440 (build_new_op): Adjust call to lookup_function_nonclass.
4441 * name-lookup.c (identifier_type_value): Adjust call to
4443 (lookup_name_real): Add block_p parameter.
4444 (lookup_name_nonclass): Adjust call to lookup_name_real.
4445 (lookup_function_nonclass): Likewise.
4446 (lookup_name): Likewise.
4447 * name-lookup.h (lookup_name_real): Change prototype.
4448 (lookup_name_nonclass): Likewise.
4449 * parser.c (cp_parser_lookup_name): Likewise.
4451 * cp-tree.h (saved_scope): Make old_bindings a vector.
4452 (unuse_fields): Remove.
4453 * name-lookup.h (cxx_saved_binding): Define it.
4454 * class.c (pushclass): Don't use unuse_fields.
4455 * name-lookup.c (cxx_saved_binding_make): Remove.
4456 (store_binding): Add new bindings to a vector, using an
4457 accumulator style, rather than adding them to a list.
4458 (store_bindings): Adjust accordingly.
4459 (store_class_bindings): Likewise.
4460 (push_to_top_level): Likewise.
4461 (pop_from_top_level): Likewise.
4462 * optimize.c (maybe_clone_body): Must push_to_top_level and
4463 pop_from_top_level calls outside of loop.
4464 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
4465 calls here from cp_parser_late_parsing_default_args.
4466 (cp_parser_save_default_args): Record the class type in which the
4467 function is declared.
4468 (cp_parser_late_parsing_default_args): Do not call
4469 push_nested_class/pop_nested_class.
4470 * search.c (dfs_unuse_fields): Remove.
4471 (unuse_fields): Remove.
4473 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4475 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
4476 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
4477 * cp-tree.h (poplevel): Declare.
4478 (set_block): Remove.
4479 * decl.c (set_block): Remove.
4481 2004-07-10 Mike Stump <mrs@apple.com>
4483 * decl2.c (import_export_class): Never export/import vtables
4484 with inline key functions.
4486 2004-07-09 Steven Bosscher <stevenb@suse.de>
4488 * typeck.c (c_expand_asm_operands): Remove.
4490 2004-07-09 Mike Stump <mrs@apple.com>
4492 * typeck.c (build_class_member_access_expr): Skip null deref
4493 warning when we don't dereference it.
4495 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4499 * class.c (check_field_decls): Improve -Weffc++ warning: do not
4500 warn for pointers to functions/members, or for classes without
4503 2004-07-08 Mark Mitchell <mark@codesourcery.com>
4505 * name-lookup.h (struct cp_binding_level): Update documentation
4508 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4511 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
4512 returning CALL_EXPR, and non-reference return type.
4514 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
4516 * name-lookup.c (push_binding): Use VEC_reserve.
4518 2004-07-08 Richard Henderson <rth@redhat.com>
4520 * cp-tree.h (expand_eh_spec_block): Remove.
4522 2004-07-07 Mark Mitchell <mark@codesourcery.com>
4524 * cp-tree.h (saved_scope): Remove x_previous_class_type and
4525 x_previous_class_values; add x_previous_class_level.
4526 (previous_class_type): Remove.
4527 (previous_class_values): Remove.
4528 (previous_class_level): New macro.
4529 * class.c (pushclass): Restore the identifier cache more
4531 (invalidate_class_lookup_cache): Use vector for class_shadowed and
4532 previous_class_values.
4533 * decl.c (poplevel): Likewise.
4534 * name-lookup.c (cxx_binding_init): New function.
4535 (cxx_binding_make): Use it.
4536 (push_binding): For a binding in a class level, use a vector of
4537 cp_class_binding nodes.
4538 (push_binding_level): New function.
4539 (begin_scope): Use it.
4540 (leave_scope): Do not put class binding levels on the free list.
4541 (print_binding_level): Adjust for the fact that class_shadowed is
4543 (poplevel_class): Likewise.
4544 (clear_identifier_class_values): Likewise.
4545 (push_class_level_binding): Likewise.
4546 (set_class_shadows): Remove.
4547 (store_binding): New function.
4548 (store_class_bindings): New function.
4549 (push_to_top_level): Use store_class_bindings as appropriate.
4550 (pop_from_top_level): Use previous_class_level, not
4551 previous_class_type.
4552 * name-lookup.h (cp_class_binding): New type.
4553 (cp_binding_level): Use a vector object for class_shadowed.
4554 (push_binding_level): Declare.
4555 (set_class_shadows): Remove.
4557 2004-07-07 Andrew Pinski <apinski@apple.com>
4559 * class.c (instantiate_type): BUFFER_REF is dead.
4560 * lex.c (init_operators): IN_EXPR is dead.
4562 2004-07-07 Jason Merrill <jason@redhat.com>
4565 * call.c (build_new_op): Give overload warnings for built-in
4568 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
4571 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4574 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
4576 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
4577 * class.c (build_primary_vtable, check_bases,
4578 determine_primary_base, finish_struct_bits,
4579 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
4580 get_basefndecls, warn_hidden, walk_subobject_offsets,
4581 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
4582 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
4583 finish_struct_1, get_vfield_name, contains_empty_class_p,
4584 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
4585 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
4586 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
4588 * decl.c (xref_basetypes): Likewise.
4589 * dump.c (cp_dump_tree): Likewise.
4590 * error.c (dump_expr): Likewise.
4591 * init.c (sort_mem_initializers, expand_member_init,
4592 push_base_cleanups): Likewise.
4593 * method.c (do_build_copy_constructor, do_build_assign_reg,
4594 synthesize_exception_spec): Likewise.
4595 * name-lookup.c (arg_assoc_class): Likewise.
4596 * pt.c (instantiate_class_template, tsubst,
4597 get_template_base_recursive): Likewise.
4598 * ptree.c (cxx_print_type): Likewise.
4599 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
4600 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4601 dfs_access_in_type, access_in_type, lookup_field_queue_p,
4602 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
4603 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
4604 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
4605 binfo_for_vtable, copied_binfo, original_binfo): Likewise
4606 * tree.c (copy_base_binfos, make_binfo): Likewise.
4607 * typeck.c (commmon_base_type): Likewise
4608 * typeck2.c (process_init_constructor): Likewise
4610 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
4612 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
4614 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4617 * pt.c (convert_nontype_argument): Disallow conversions between
4618 different enumeration types.
4620 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4622 * cp-tree.h (BINFO_MARKED): Remove.
4623 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
4624 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
4625 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
4626 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
4627 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
4628 (mark_primary_bases, determine_primary_base, base_derived_from,
4629 dfs_find_final_overrider, dfs_find_final_overrider_q,
4630 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
4631 dfs_modify_vtables, walk_subobject_offsets,
4632 layout_nonempty_base_or_field, build_base_field,
4633 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
4634 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
4635 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
4636 build_ctor_vtbl_group, accumulate_vtble_inits,
4637 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
4638 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
4639 add_vcall_offset_vtbl_entries_1): Likewise.
4640 * decl.c (xref_basetypes): Incomming virtual base indicated by
4642 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
4643 * init.c (finish_init_stmts, sort_mem_initializers,
4644 emit_mem_initializers, build_vtble_address, expand_member_init,
4645 push_base_cleanups): Likewise.
4646 * method.c (do_build_copy_constructor): Likewise.
4647 * pt.c (instantiate_class_template,
4648 get_template_base_recursive): Likewise.
4649 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
4650 get_pseudo_ti_desc): Likewise.
4651 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4652 binfo_from_vbase, binfo_via_virtual, copied_binfo,
4653 original_binfo): Likewise.
4654 * semantics.c (finish_base_specifier): Virtualness is indicated
4656 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
4658 2004-07-06 Mark Mitchell <mark@codesourcery.com>
4661 2004-06-24 Jason Merrill <jason@redhat.com>
4663 * decl.c (grokparms): Give the PARM_DECL reference type if the
4664 parameter is passed by invisible reference.
4666 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4668 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
4669 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
4670 * pt.c (check_instantiated_args, unify): Likewise.
4672 2004-07-05 Phil Edwards <phil@codesourcery.com>
4674 * Make-lang.in (check-c++, lang_checks): Add some comments.
4676 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4678 * cp-mudflap.c: Delete file.
4679 * Makefile.in: Remove all references to cp-mudflap.o.
4681 2004-07-05 Zack Weinberg <zack@codesourcery.com>
4683 * decl.c (cxx_init_decl_processing): Call
4684 build_common_tree_nodes before creating the global NAMESPACE_DECL.
4686 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4689 * call.c (build_operator_new_call): Look only at global scope.
4691 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
4693 * call.c (enforce_access): Expect TREE_BINFO.
4694 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
4695 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
4696 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4698 (BINFO_LANG_ELTS): Remove.
4699 (BINFO_LANG_SLOTS): New.
4700 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
4701 (CLASSTYPE_TEMPLATE_INFO): Adjust.
4702 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
4703 * search.c (lookup_member): Check TREE_BINFO.
4704 * semantics.c (perform_or_defer_access_check): Likewise.
4705 (check_accessibility_of_qualified_id): Check
4706 deferred_access_no_check.
4707 * tree.c (make_binfo): Use make_tree_binfo.
4709 2004-07-04 Mark Mitchell <mark@codesourcery.com>
4711 * method.c (implicitly_declare_fn): Set linkage of generated
4714 2004-07-04 Richard Henderson <rth@redhat.com>
4716 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
4718 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
4721 * name-lookup.c (push_class_level_binding): Don't pass a
4722 TREE_LIST of ambiguous names to check_template_shadow as it
4723 only handles declarations. Instead, pull the declaration
4726 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4729 * pt.c (check_explicit_specialization): Clarify error message.
4731 2004-07-02 Richard Henderson <rth@redhat.com>
4733 * tree.c (cp_unsave_r): Update remap_save_expr call.
4735 2004-07-02 Mark Mitchell <mark@codesourcery.com>
4738 * mangle.c (write_template_arg): Correct mangling.
4741 * decl.c (grokdeclarator): Robustify.
4743 2004-07-01 Richard Henderson <rth@redhat.com>
4745 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
4746 * method.c (synthesize_method): Don't clear_last_expr.
4747 * name-lookup.c (maybe_push_cleanup_level): Likewise.
4749 2004-07-01 Nick Clifton <nickc@redhat.com>
4751 * decl2.c (import_export_class): Invoke the
4752 import_export_class field in the gcc_target structure if it is not
4755 2004-06-30 Richard Henderson (rth@redhat.com>
4757 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
4758 * method.c (use_thunk): Likewise.
4760 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
4762 * call.c (build_over_call), typeck.c (build_function_call): Call
4763 check_function_arguments instead of check_function_format.
4765 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
4767 * call.c (build_over_call), typeck.c (build_function_call): Update
4768 calls to check_function_format.
4770 2004-06-30 Richard Henderson <rth@redhat.com>
4772 * call.c (build_over_call): Use __builtin_memcpy for copying
4773 CLASS_AS_BASE rather than funny casting.
4775 2004-06-30 Richard Henderson <rth@redhat.com>
4777 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
4778 TYPE_SIZE_UNIT of full_type.
4780 2004-06-30 Per Bothner <per@bothner.com>
4782 Conditionally compile support for --enable-mapped_location.
4783 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
4784 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
4785 adjustments - which I don't understand.
4786 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
4787 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
4788 (print_instantiation_partial_context): Use expand_location.
4789 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
4790 * name-lookup.c: Likewise.
4791 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
4792 * name-lookup.c: Use input_line macro.
4793 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
4794 (cp_parser_statement): Rename locaal variable statement_locus to
4795 statement_location and use SET_EXPR_LOCATION macro.
4796 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
4797 * tree.c (cp_walk_subtrees): Likewise.
4799 2004-06-29 Per Bothner <per@bothner.com>
4801 * tree.c (build_min_nt, build_min, build_min_non_dep):
4802 Don't set TREE_COMPLEXITY from input_line.
4804 2004-06-29 Paul Brook <paul@codesourcery.com>
4806 * init.c: Include target.h.
4807 (get_cookie_size): Remove and replace with target hook.
4809 (build_new_1): Store the element size in the cookie.
4811 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
4814 * parser.c (cp_parser_template_declaration_after_export): Disable
4815 access checks here ...
4816 (cp_parser_class_specifier): ... not here.
4818 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4820 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4821 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4822 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
4825 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4827 * cp-tree.h (struct deferred_access): Move to ...
4828 * semantics.c (struct deferred_access): ... here. Adjust.
4829 (deferred_access_stack): Make a VEC(deferred_access),
4830 (deferred_access_free_list): Remove.
4831 (deferred_access_no_check): New.
4832 (push_deferring_access_checks, resume_deferring_access_checks,
4833 stop_deferring_access_checks, pop_deferring_access_checks,
4834 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
4835 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
4837 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4840 * call.c (build_temp): Declare.
4841 (check_constructor_callable): New.
4842 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
4843 CONSTRUCTOR_CALLABLE.
4844 (convert_like_real, initialize_reference): Use
4845 check_constructor_callable.
4846 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
4847 (LOOKUP_*): Renumber.
4849 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4851 * friend.c (add_friend): Only perform access checks when context
4853 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
4854 * parser.c (cp_parser_class_specifier): Disable access checks here
4855 when parsing the body of a templated class.
4856 * semantics.c (perform_or_defer_access_checks): Reorder to allow
4857 NULL binfos when not checking access.
4859 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
4861 Use vector API for vbase list.
4862 * cp-tree.h: Include vec.h
4863 (DEF_VEC_P (tree)): New type.
4864 (struct lang_type_class): Change vbase's member type.
4865 (binfo_for_vbase): Declare.
4866 * class.c (determine_primary_base, base_derived_from,
4867 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
4868 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
4869 build_vtbl_initializer): Adjust.
4870 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
4872 * init.c (sort_mem_initializers, expand_member_init,
4873 push_base_cleanups): Adjust.
4874 * method.c (do_build_copy_constructor): Adjust.
4875 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
4876 (binfo_for_vbase): New.
4877 * tree.c (copy_base_binfos): Adjust.
4879 2004-06-28 Mark Mitchell <mark@codesourcery.com>
4881 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
4883 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4886 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
4887 paranthesis in case of pointers to array members.
4888 * error.c (dump_type_prefix): Likewise.
4889 (dump_type_suffix): Maybe issue a whitespace when printing
4892 2004-06-27 Mark Mitchell <mark@codesourcery.com>
4895 * parser.c (cp_parser_set_decl_spec_type): Refine test for
4896 redefinition of built-in types.
4898 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
4900 * error.c (pp_template_argument_list_start): Remove.
4901 (pp_template_argument_list_end): Likewise.
4902 (pp_separate_with_comma): Use pp_cxx_separate_with.
4903 (reinit_global_formatting_buffer): Remove.
4904 (pp_non_consecutive_character): Likewise.
4905 (dump_scope): Use pp_cxx_colon_colon.
4906 (dump_template_parameter): Use pp_cxx_identifier,
4907 pp_cxx_tree_identifier and pp_cxx_whitespace.
4908 (dump_templat_bindings): Replace use of pp_string with sequence
4909 of pp_cxx_whitespace and pp_equal.
4910 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
4911 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
4913 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
4914 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
4915 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
4916 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
4917 pp_cxx_right_bracket, pp_cxx_identifier throughout,
4918 (dump_decl): Likewise.
4919 (dump_template_decl): Likewise.
4920 (dump_function_decl): Likewise. Set padding as appropriate.
4921 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
4923 (dump_exception_spec): Likewise.
4924 (dump_function_name): Use pp_cxx_tree_identifier and
4926 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
4927 pp_cxx_end_template_argument_list.
4928 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
4929 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
4930 pp_cxx_whitespace throughout.
4931 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
4933 (dump_unary_op): Likewise.
4934 (reinit_cxx_pp): New function.
4935 (type_as_string); Use it.
4936 (expr_as_string): Likewise.
4937 (decl_as_string); Likewise.
4938 (context_as_string): Likewise.
4939 (lang_decl_name): Likewise.
4940 (decl_to_string): Likewise.
4941 (expr_to_string): Likewise.
4942 (parm_to_string): Likewise.
4943 (type_to_string): Likewise.
4944 (args_to_string): Likewise.
4945 (cv_to_string): Likewise.
4947 2004-06-26 Mark Mitchell <mark@codesourcery.com>
4949 * cp-tree.h (cp_cv_quals): New type.
4950 (cp_declarator): Use it instead of "tree" as appropriate.
4951 (grok_method_quals): Adjust prototype.
4952 (grokclassfn): Likewise.
4953 (do_friend): Likewise.
4954 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
4955 (grokdeclarator): Likewise.
4956 * decl2.c (grok_method_quals): Likewise.
4957 (grokclassfn): Likewise.
4958 * friend.c (do_friend): Likewise.
4959 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
4960 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
4961 (make_pointer_declarator): Likewise.
4962 (make_reference_declarator): Likewise.
4963 (make_ptrmem_declarator): Likewise.
4964 (cp_parser_ptr_operator): Likewise.
4965 (cp_parser_cv_qualifier_seq_opt): Likewise.
4966 (cp_parser_cv_qualifier_opt): Remove.
4967 (cp_parser_new_declarator_opt): Adjust call to
4968 cp_parser_ptr_operator.
4969 (cp_parser_conversion_declaration_opt): Likewise.
4970 (cp_parser_declarator): Use cp_cv_quals, not tree.
4971 (cp_parser_direct_declarator): Likewise.
4973 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4975 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
4976 Rename DECL_STMT to DECL_EXPR.
4977 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
4978 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
4979 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
4981 2004-06-26 Jan Hubicka <jh@suse.cz>
4984 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
4985 reachability analysis.
4987 2004-06-25 Mark Mitchell <mark@codesourcery.com>
4989 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
4992 2004-06-25 Paul Brook <paul@codesourcery.com>
4994 * decl2.c (get_guard): Call targetm.cxx.guard_type.
4995 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
4997 2004-06-24 Mark Mitchell <mark@codesourcery.com>
4999 * decl.c (grokdeclarator): Restore error messages about __thread.
5000 * parser.c (cp_parser_decl_specifier_seq): Likewise.
5002 2004-06-24 Jason Merrill <jason@redhat.com>
5005 * decl.c (grokparms): Give the PARM_DECL reference type if the
5006 parameter is passed by invisible reference.
5008 2004-06-24 Andreas Schwab <schwab@suse.de>
5010 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5012 2004-06-23 Mark Mitchell <mark@codesourcery.com>
5014 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5015 (cp/decl.o): Likewise.
5016 (cp/decl2.o): Likewise.
5017 (cp/pt.o): Likewise.
5018 (cp/semantics.o): Likewise.
5019 * config-lang.in (gtfiles): Do not reference cp/lex.h.
5020 * class.c: Do not include lex.h.
5021 (add_implicitly_declared_members): Do not use
5022 adding_implicit_members.
5023 (check_bases_and_members): Do not talk about grok_x_components.
5024 * cp/cp-tree.h (adding_implicit_members): Remove.
5025 (cp_storage_class): New type.
5026 (cp_decl_spec): Likewise.
5027 (cp_decl_specifier_seq): Likewise.
5028 (cp_parameter_declarator): Use it for the decl_specifiers field.
5029 (check_tag_decl): Adjust prototype.
5030 (shadow_tag): Likewise.
5031 (groktypename): Likewise.
5032 (start_decl): Likewise.
5033 (start_function): Likewise.
5034 (start_method): Likewise.
5035 (grok_x_components): Remove.
5036 (grokfield): Adjust prototype.
5037 (grokbitfield): Likewise.
5038 (finish_member_class_template): Remove.
5039 * decl.c: Do not include lex.h.
5040 (adding_implicit_members): Do not define.
5041 (check_tag_decl): Do not use trees to represent decl-specifiers.
5042 (shadow_tag): Likewise.
5043 (groktypename): Likewise.
5044 (start_decl): Likewise.
5045 (grokvardecl): Likewise.
5046 (grokdeclarator): Likewise.
5047 (grokparms): Likewise.
5048 (start_function): Likewise.
5049 (start_method): Likewise.
5050 * decl.h (grokdeclarator): Adjust prototype.
5051 * decl2.c: Do not include lex.h.
5052 (grok_x_components): Remove.
5053 (grokfield): Do not use trees to represent decl-specifiers.
5054 (grokbitfield): Likewise.
5055 * lex.c: Do not include lex.h.
5057 * parser.c: Include target.h.
5058 (clear_decl_specs): New function.
5059 (cp_parser_translation_unit): Do not use trees to represent
5061 (cp_parser_postfix_expression): Likewise.
5062 (cp_parser_new_type_id): Likewise.
5063 (cp_parser_condition): Likewise.
5064 (cp_parser_simple_declaration): Likewise.
5065 (cp_parser_decl_specifier_seq): Likewise.
5066 (cp_parser_function_specifier_opt): Likewise.
5067 (cp_parser_conversion_type_id): Likewise.
5068 (cp_parser_template_parameter): Likewise.
5069 (cp_parser_explicit_instantiation): Likewise.
5070 (cp_parser_type_specifier): Likewise.
5071 (cp_parser_simple_type_specifier): Likewise.
5072 (cp_parser_init_declarator): Likewise.
5073 (cp_parser_type_id): Likewise.
5074 (cp_parser_type_specifier_seq): Likewise.
5075 (cp_parser_parameter_declaration): Likewise.
5076 (cp_parser_member_declaration): Likewise.
5077 (cp_parser_exception_declaration): Likewise.
5078 (cp_parser_function_definition_from_specifiers_and_declarator):
5080 (cp_parser_single_declaration): Likewise.
5081 (cp_parser_save_member_function_body): Likewise.
5082 (cp_parser_friend_p): Likewise.
5083 (cp_parser_set_storage_class): New function.
5084 (cp_parser_set_decl_spec_type): Likewise.
5085 * pt.c: Do not include lex.h.
5086 * semantics.c: Likewise.
5087 (finish_member_class_template): Remove.
5089 2004-06-23 Roger Sayle <roger@eyesopen.com>
5091 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
5092 longer take both "args" and "convert_args" as arguments.
5093 (build_op_delete_call): Update call to build_cxx_call.
5094 (build_over_call): Likewise, update call to build_cxx_call.
5095 * cp-tree.h (build_cxx_call): Update funtion prototype.
5096 * typeck.c (build_function_call): Don't call expand_tree_builtin.
5097 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5098 (throw_bad_typeid): Likewise.
5099 (build_dynamic_cast_1): Likewise.
5101 2004-06-22 Richard Henderson <rth@redhat.com>
5103 * class.c (build_vfn_ref): Take a pointer not object. Build
5105 (cp_fold_obj_type_ref): New.
5106 * call.c (build_over_call): Update build_vfn_ref call.
5107 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5108 * cp-tree.h (cp_fold_obj_type_ref): Declare.
5110 2004-06-21 Jason Merrill <jason@redhat.com>
5113 * cp-gimplify.c (cp_gimplify_init_expr): Look through
5116 2004-06-21 Mark Mitchell <mark@codesourcery.com>
5118 * cp-tree.def (NEW_EXPR): Add a fourth slot.
5119 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
5120 (TREE_PARMLIST): Likewise.
5121 (CALL_DECLARATOR_PARMS): Likewise.
5122 (CALL_DECLARATOR_QUALS): Likewise.
5123 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5124 (cp_declarator_kind): New type.
5125 (cp_parameter_declarator): Likewise.
5126 (cp_declarator): Likewise.
5127 (cp_error_declarator): Likewise.
5128 (no_parameters): Likewise.
5129 (groktypename): Change prototype.
5130 (start_decl): Likewise.
5131 (start_handler_parms): Likewise.
5132 (get_scope_of_declarator): Likewise.
5133 (start_function): Likewise.
5134 (start_preparsed_function): New function.
5135 (start_function): Change prototype.
5136 (start_method): Likewise.
5137 (grokfield): Likewise.
5138 (grokbitfield): Likewise.
5139 (build_new): Likewise.
5140 (make_pointer_declarator): Remove.
5141 (make_reference_declarator): Likewise.
5142 (make_call_declarator): Likewise.
5143 (set_quals_and_spec): Likewise.
5144 (process_template_parm): Change prototype.
5145 (begin_function_definition): Remove.
5146 (finish_parmlist): Remove.
5147 * decl.c (groktypename): Do not use trees to represent
5149 (start_decl): Likewise.
5150 (start_handler_parms): Remove.
5151 (get_scope_of_declarator): Reimplement.
5152 (grokdeclarator): Do not use trees to represent declarators.
5153 (grokparms): Likewise.
5154 (start_function): Likewise.
5155 (start_method): Likewise.
5156 (build_void_list_mode): Do not use TREE_PARMLIST.
5157 * decl.h (grokdeclarator): Change prototype.
5158 * decl2.c (grok_method_quals): Robustify.
5159 (grok_x_components): Do not use trees to represent declarators.
5160 (grokfield): Likewise.
5161 (grokbitfield): Likewise.
5162 (start_objects): Build FUNCTION_DECLs, not declarators.
5163 (start_static_storage_duration_function): Likewise.
5164 * init.c (build_new): Simplify.
5165 * lex.c (make_pointer_declarator): Remove.
5166 (make_reference_declarator): Likewise.
5167 (make_call_declarator): Likewise.
5168 (set_quals_and_spec): Likewise.
5169 * method.c (use_thunk): Use start_preparsed_function.
5170 (synthesize_method): Likewise.
5171 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
5172 * optimize.c (maybe_clone_body): Use start_preparsed_function.
5173 * parser.c (cp_error_declarator): New variable.
5174 (declarator_obstack): Likewise.
5175 (alloc_declarator): New function.
5176 (make_declarator): Likewise.
5177 (make_id_declarator): Likewise.
5178 (make_pointer_declarator): Likewise.
5179 (make_reference_declarator): Likewise.
5180 (make_ptrmem_declarator): Likewise.
5181 (make_call_declarator): Likewise.
5182 (make_array_declarator): Likewise.
5183 (no_parameters): New variable.
5184 (make_parameter_declarator): Likewise.
5185 (cp_parser_check_for_definition_in_return_type): Do not use trees
5186 to represent declarators.
5187 (cp_parser_translation_unit): Likewise.
5188 (cp_parser_new_expression): Likewise.
5189 (cp_parser_new_type_id): Likewise.
5190 (cp_parser_new_declarator_opt): Likewise.
5191 (cp_parser_direct_new_declarator): Likewise.
5192 (cp_parser_condition): Likewise.
5193 (cp_parser_declaration_statement): Likewise.
5194 (cp_parser_declaration): Likewise.
5195 (cp_parser_conversion_type_id): Likewise.
5196 (cp_parser_conversion_declarator_opt): Likewise.
5197 (cp_parser_template_parameter_list): Likewise.
5198 (cp_parser_template_parameter): Likewise.
5199 (cp_parser_explicit_instantiation): Likewise.
5200 (cp_parser_init_declarator): Likewise.
5201 (cp_parser_declarator): Likewise.
5202 (cp_parser_direct_declarator): Likewise.
5203 (cp_parser_type_id): Likewise.
5204 (cp_parser_parameter_declaration_clause): Likewise.
5205 (cp_parser_parameter_declaration_list): Likewise.
5206 (cp_parser_parameter_declaration): Likewise.
5207 (cp_parser_member_declaration): Likewise.
5208 (cp_parser_exception_declaration): Likewise.
5209 (cp_parser_check_declarator_template_parameters): Likewise.
5210 (cp_parser_function_definition_from_specifiers_and_declarator):
5212 (cp_parser_save_member_function_body): Likewise.
5213 * pt.c (process_template_parm): Add is_non_type parameter.
5214 (convert_template_argument): Adjust call to groktypename.
5215 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
5216 (tsubst): Do not expect declarators.
5217 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
5219 (instantiate_decl): Use start_preparsed_function.
5220 * semantics.c (begin_function_definition): Remove.
5221 (finish_parmlist): Remove.
5222 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
5225 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5227 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
5228 (build_new_method_call): Likewise.
5229 * decl.c (local_variable_p_walkfn): Don't walk into types.
5230 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
5231 (build_anon_union_vars): Add new operand for COMPONENT_REF.
5232 * init.c (buld_new): Add new operand for ARRAY_REF.
5233 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
5234 (do_build_assign_ref): Likewise.
5235 * parser.c (cp_parser_direct_new_declarator): Add new operands
5237 (cp_parser_direct_declarator): Likewise.
5238 * pt.c (tsubst): Likewise.
5239 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
5241 * semantics.c (finish_non_static_data_member): Add new operand
5243 * typeck.c (build_class_member_access_expr): Likewise.
5244 (build_class_member_access_expr, finish_class_member_access_expr):
5246 (build_ptrmemfunc_access_expr): Likewise.
5247 (build_array_ref): Add new operands for ARRAY_REF.
5248 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
5249 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
5251 2004-06-21 Richard Henderson <rth@redhat.com>
5253 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
5254 * parser.c (cp_parser_jump_statement): Update commentary.
5255 * pt.c (tsubst_expr): Use RETURN_EXPR.
5256 * semantics.c (finish_return_stmt): Likewise.
5257 (finalize_nrv_r): Likewise.
5258 * typeck.c, typeck2.c: Update file start commentary.
5260 2004-06-21 Richard Henderson <rth@redhat.com>
5262 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
5264 2004-06-20 Richard Henderson <rth@redhat.com>
5266 * cp-tree.h (add_decl_stmt): Declare.
5267 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
5268 * semantics.c (maybe_cleanup_point_expr): New.
5269 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
5270 finish_for_expr, finish_switch_cond): Use it.
5271 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
5273 2004-06-20 Richard Henderson <rth@redhat.com>
5275 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
5276 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
5277 (cp_gimplify_expr): Call it.
5278 (gimplify_cleanup_stmt): Move from c-gimplify.c.
5279 (cp_genericize): New.
5280 * decl.c (finish_function): Call it.
5281 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
5282 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
5283 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
5284 (cp_genericize): Declare.
5285 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
5286 * dump.c (cp_dump_tree): Likewise.
5287 * semantics.c (push_cleanup): Move from c-semantics.c.
5289 2004-06-20 Zack Weinberg <zack@codesourcery.com>
5291 * cp-lang.c (has_c_linkage): Implement.
5293 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
5294 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
5295 (builtin_function_1): Don't call make_decl_rtl.
5296 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
5297 (grokvardecl): Don't call mangle_decl.
5298 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
5299 DECL_ASSEMBLER_NAME.
5300 * method.c (set_mangled_name_for_decl): Delete.
5301 * name-lookup.c (pushdecl): When a local extern shadows a
5302 file-scope declaration of the same object, give both DECLs the
5304 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
5305 on DECL_ASSEMBLER_NAME.
5307 2004-06-19 Richard Henderson <rth@redhat.com>
5309 * cp-gimplify.c: Remove unnecessary prototypes.
5310 (cp_gimplify_stmt): Merge into ...
5311 (cp_gimplify_expr): ... here. Move to end of file. Handle
5312 stmts_are_full_exprs_p frobbing.
5313 * cp-tree.h (cp_gimplify_stmt): Remove.
5314 * pt.c (tsubst_expr): Merge prep_stmt and unify.
5315 * tree.c (init_tree): Don't set lang_gimplify_stmt.
5317 2004-06-18 Richard Henderson <rth@redhat.com>
5320 * semantics.c (begin_cond): New.
5321 (finish_cond): Rewrite to handle template DECL_STMTs specially.
5322 Assume that non-template decls go land before the conditional.
5323 (simplify_loop_decl_cond): Likewise.
5324 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
5325 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
5326 begin_switch_stmt, finish_switch_cond): Update to match.
5328 2004-06-17 Jason Merrill <jason@redhat.com>
5331 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
5332 (finish_stmt_expr_expr): Update type after conversions.
5333 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
5334 Handle void initializer.
5335 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
5337 2004-06-17 Geoffrey Keating <geoffk@apple.com>
5339 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
5340 * cp-tree.h (defer_fn): Delete.
5341 * decl2.c (defer_fn): Delete.
5342 (finish_file): Simplify deferred_fns loops; check that
5343 only used inline functions get into deferred_fns.
5344 (mark_used): Inline previous contents of defer_fn.
5346 2004-06-16 Richard Henderson <rth@redhat.com>
5348 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
5349 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
5350 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
5351 of CTOR_INITIALIZER ...
5352 (pp_cxx_statement): ... here.
5353 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
5354 (finish_function): Use alloc_stmt_list to zap entire function.
5355 * parser.c (cp_parser_compound_statement): Update commentary.
5356 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
5357 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
5358 (finish_stmt_expr): Don't look through COMPOUND_STMT.
5360 2004-06-16 Geoffrey Keating <geoffk@apple.com>
5362 * pt.c (mark_decl_instantiated): Don't call defer_fn.
5364 2004-06-16 Richard Henderson <rth@redhat.com>
5366 * parser.c (cp_parser_labeled_statement): Update commentary.
5367 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
5368 * tree.c (mark_local_for_remap_r): Likewise.
5370 2004-06-16 Richard Henderson <rth@redhat.com>
5372 * parser.c (cp_parser_asm_definition): Update commentary.
5373 * pt.c (tsubst_expr): Use ASM_EXPR.
5374 * semantics.c (finish_asm_stmt): Likewise.
5376 2004-06-16 Richard Henderson <rth@redhat.com>
5378 * decl.c (finish_destructor_body): Use LABEL_EXPR.
5379 * parser.c (cp_parser_statement): Update commentary.
5380 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
5381 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
5382 * tree.c (mark_local_for_remap_r): Likewise.
5384 2004-06-16 Richard Henderson <rth@redhat.com>
5387 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
5388 statement in FOR_INIT_STMT for templates.
5390 2004-06-15 Richard Henderson <rth@redhat.com>
5392 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
5393 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
5394 (genericize_try_block): Use gimplify_stmt.
5395 (genericize_catch_block, genericize_eh_spec_block): Likewise.
5396 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
5397 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
5398 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
5399 (cp_tree_chain_matters_p): Remove.
5400 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
5401 (COMPOUND_STMT_BODY_BLOCK): New.
5402 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
5403 (EXPR_STMT_STMT_EXPR_RESULT): New.
5404 (building_stmt_tree): Check cur_stmt_list.
5405 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
5406 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
5407 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
5408 (cp_finish_decl): Use push_cleanup.
5409 (start_function, finish_function): Use statement lists.
5410 (finish_stmt): Do nothing.
5411 * except.c (begin_eh_spec_block): Use statement lists.
5412 (check_handlers_1, check_handlers): Likewise.
5413 * init.c (construct_virtual_base): Don't add extra compound stmts.
5414 (build_vec_init): Likewise.
5415 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
5416 * name-lookup.h (struct cp_binding_level): Add statement_list.
5417 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
5418 (cp_parser_labeled_statement, cp_parser_expression_statement,
5419 cp_parser_statement_seq_opt): Likewise.
5420 (cp_parser_compound_statement): Likewise. Take bool for try block.
5421 (cp_parser_selection_statement): Tidy if processing.
5422 (cp_parser_already_scoped_statement): Rewrite to do what it says.
5423 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
5424 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
5425 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
5426 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
5427 (finish_cond): New, rewritten from FINISH_COND.
5428 (simplify_loop_decl_cond): New.
5429 (finish_expr_stmt): Avoid nested EXPR_STMTs.
5430 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
5431 begin_else_clause, finish_else_clause, finish_if_stmt,
5432 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
5433 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
5434 finish_for_cond, finish_for_stmt, begin_switch_stmt,
5435 finish_switch_cond, finish_switch_stmt, begin_try_block,
5436 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
5437 finish_handler_sequence, finish_function_handler_sequence,
5438 begin_handler, finish_handler_parms, finish_handler,
5439 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
5440 using statement lists.
5441 (begin_compound_stmt): Replace has_no_scope argument with flags.
5442 Update all callers. Use statement lists.
5443 (finish_compound_stmt): Likewise.
5444 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
5445 (current_scope_stmt_stack): Remove.
5446 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
5447 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
5448 Rewrite with statement lists.
5450 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
5452 * parser.c: Change all assignments of c_lex_string_translate
5453 to true and false to 1 and 0.
5454 (cp_lexer_read_token): Convert type of the translated string.
5455 (cp_parser_skip_to_closing_parentheses): Preserve original
5456 value of c_lex_string_translate, and set it to -1 while
5458 (cp_parser_cache_group): Likewise.
5459 (cp_parser_cache_group_1): Renamed.
5460 (cp_parser_asm_operand_list): Remove redundant setting of
5461 c_lex_string_translate.
5462 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
5463 Handle chained strings.
5465 2004-06-12 Andrew Pinski <apinski@apple.com>
5469 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5471 * cp-tree.h: Fix typo.
5473 * cp-tree.h: Include cgraph.h
5474 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5475 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5477 2004-06-12 Jason Merrill <jason@redhat.com>
5479 PR tree-optimization/14107
5480 * decl.c (finish_function): Warn about no return in all functions.
5482 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5484 * cp-tree.h (struct language_function): Remove cannot_inline.
5485 * decl.c (save_function_data): cannot_inline is no more.
5486 (cxx_push_function_context): Likewise.
5487 * decl2.c (start_objects, start_static_storage_duration_function):
5488 Reset DECL_INLINE, set DECL_UNINLINABLE.
5490 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5493 * search.c (lookup_field): Propagate the ambiguity list.
5494 (lookup_fnfields): Likewise.
5496 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5499 * parser.c (cp_parser_template_name): Ctors/dtors never need a
5500 template keyword to disambiguate.
5502 2004-06-14 Mark Mitchell <mark@codesourcery.com>
5505 * decl.c (grokdeclarator): Ignore pointer-to-members when
5506 computing template depth.
5509 * name-lookup.c (pushtag): Do not try to put class declarations in
5510 explicit specialization scopes.
5512 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
5514 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
5516 2004-06-11 Mark Mitchell <mark@codesourcery.com>
5519 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
5520 bindings for undeclared built-ins.
5522 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5524 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
5525 appear at the correct location.
5527 2004-06-10 Jason Merrill <jason@redhat.com>
5531 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5532 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5533 TREE_TYPE for non-dependent names.
5534 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5535 unknown_type_node as its TREE_TYPE.
5536 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5537 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5538 (dump_expr) <SCOPE_REF case>: Likewise.
5540 2004-06-10 Mark Mitchell <mark@codesourcery.com>
5543 * parser.c (cp_parser_direct_declarator): Robustify.
5546 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
5547 constants in non-dependent contexts.
5551 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
5554 2004-06-10 Jakub Jelinek <jakub@redhat.com>
5557 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
5560 2004-06-09 Mark Mitchell <mark@codesourcery.com>
5564 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5565 * lex.c (handle_pragma_interface): Deprecate.
5566 (handle_pragma_implementation): Likewise.
5568 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
5570 * g++spec.c (lang_specific_driver): Remove check for -lm
5571 and -lmath when check it see if it was the math library.
5573 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5576 * parser.c (cp_parser_direct_declarator): Reject constructor named
5577 as qualified template-id.
5579 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5582 * lex.c (handle_pragma_interface): Deprecate.
5583 (handle_pragma_implementation): Likewise.
5585 2004-06-07 Mark Mitchell <mark@codesourcery.com>
5588 * parser.c (cp_parser_iteration_statement): Fix typo in error
5592 * pt.c (tsubst_default_argument): Do not defer access checks
5593 while substituting into the default argument.
5596 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
5597 constant in a non-dependent context.
5600 * except.c (build_throw): Ensure that temp_expr has been
5603 2004-06-06 Roger Sayle <roger@eyesopen.com>
5605 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
5607 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5610 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
5611 'typename', and accept 'template'.
5613 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
5614 Jan Hubicka <jh@suse.cz>
5617 * method.c (use_think): Do not mark thunk as referenced.
5619 2004-06-03 Matt Austern <austern@apple.com>
5622 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
5623 is nonzero, and if we see a noninline definition of a key method,
5624 make the vtables nonweak.
5626 2004-06-02 Matt Austern <austern@apple.com>
5628 * cp-tree.h (instantiate_decl): new boolean parameter,
5629 undefined_ok. Current behavior is equivalent to its being 0.
5630 * decl2.c (mark_used): Add new argument when calling instantiate_decl
5631 * pt.c (mark_decl_instantiated): Unconditionally make
5632 instantiations explicit unconditionally
5633 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
5634 since mark_decl_instantiated now does it.
5635 (instantiate_class_member): New. Instantiate a member of an
5636 explicitly instantiated class template.
5637 (do_type_instantiation): Explicitly instantiate members of an
5638 explicitly instantiated class template.
5639 (instantiate_decl): if undefined_ok is nonzero, and if we're
5640 trying to explicitly instantiated a template with no definition,
5641 change it to an implicit instantiation.
5642 (instantiate_pending_templates): Add new argument to instantiate_decl.
5643 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5645 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
5647 * cp-tree.h: Fix typo.
5649 * cp-tree.h: Include cgraph.h
5650 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5651 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5653 2004-06-01 Jason Merrill <jason@redhat.com>
5656 * call.c (call_builtin_trap): Remove type parm.
5657 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
5658 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
5660 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5663 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5664 TREE_TYPE for non-dependent names.
5665 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5666 unknown_type_node as its TREE_TYPE.
5667 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5668 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5669 (dump_expr) <SCOPE_REF case>: Likewise.
5671 2004-06-01 Richard Henderson <rth@redhat.com>
5672 Andrew Pinski <pinskia@physics.uc.edu>
5674 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
5675 * parser.c (struct cp_parser): Remove in_offsetof.
5676 (cp_parser_new): Don't set it.
5677 (cp_parser_unary_expression): Don't check it.
5678 (cp_parser_postfix_open_square_expression): Split out from ...
5679 (cp_parser_postfix_expression): ... here.
5680 (cp_parser_postfix_dot_deref_expression): Likewise.
5681 (cp_parser_builtin_offsetof): New.
5682 (cp_parser_primary_expression): Use it.
5684 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5687 * parser.c (cp_parser_postfix_expression): Allow subscript
5688 operator in offsetof.
5690 2004-05-31 Mark Mitchell <mark@codesourcery.com>
5693 * friend.c (add_friend): Do not try to perform access checks for
5694 functions from dependent classes.
5696 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5698 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
5699 (pp_cxx_begin_template_argument_list): Turn into a function.
5700 (pp_cxx_end_template_argument_list): Likewise.
5701 (pp_cxx_separate_with): Define.
5702 (pp_cxx_unqualified_id): Tidy.
5703 (pp_cxx_primary_expression): Likewise.
5704 (pp_cxx_postfix_expression): Likewise.
5705 (pp_cxx_expression): Likewise.
5706 (pp_cxx_simple_type_specifier): Likewise.
5707 (pp_cxx_type_specifier_seq): Likewise.
5708 (pp_cxx_parameter_declaration_clause): Likewise.
5709 (pp_cxx_exception_specification): Likewise.
5710 (pp_cxx_direct_declarator): Likewise.
5711 (pp_cxx_type_id): Likewise.
5712 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
5714 (pp_cxx_left_paren): Likewise.
5715 (pp_cxx_right_paren): Likewise.
5716 (pp_cxx_left_brace): Likewise.
5717 (pp_cxx_right_brace): Likewise.
5718 (pp_cxx_left_bracket): Likewise.
5719 (pp_cxx_right_bracket): Likewise.
5720 (pp_cxx_dot): Likewise.
5721 (pp_cxx_identifier): Likewise.
5722 (pp_cxx_tree_identifier): Likewise.
5723 (pp_cxx_ampersand): New macro.
5724 (pp_cxx_star): Likewise.
5725 (pp_cxx_arrow): Likewise.
5726 (pp_cxx_semicolon): Likewise.
5727 (pp_cxx_complement): Likewise.
5728 (pp_cxx_begin_template_argument_list): Declaree.
5729 (pp_cxx_end_template_argument_list): Likewise.
5730 (pp_cxx_colon_colon): likewise.
5732 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5734 * parser.c (cp_parser_simple_type_specifier): Explicitly test
5737 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
5739 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
5740 typeck.c: Fix comment formatting.
5742 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
5744 * cp-lang.c (cp_expand_decl): Remove.
5745 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
5747 2004-05-30 Andreas Jaeger <aj@suse.de>
5749 * lang-specs.h: Add missing initializers for .ii.
5751 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
5753 * decl.c (cp_make_fname_decl): Free return value from
5756 2004-05-28 Mark Mitchell <mark@codesourcery.com>
5759 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
5761 * init.c (build_new): Likewise.
5764 * name-lookup.c (arg_assoc): Robustify.
5767 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
5768 when determining the scope to use for a pointer to member.
5769 (lookup_anon_field): Give it external linkage.
5770 * cp-tree.h (lookup_anon_field): Declare it.
5771 * expr.c (cplus_expand_constant): Use it.
5773 2004-05-28 Mark Mitchell <mark@codesourcery.com>
5776 * parser.c (cp_parser_simple_type_specifier): Call
5777 maybe_note_name_used_in_class.
5779 2004-05-28 Tom Marshall <tmarshall@real.com>
5782 * class.c (finish_struct_1): Warn only if the dtor is non-private or
5783 the class has friends.
5785 2004-05-27 Adam Nemet <anemet@lnxw.com>
5788 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
5789 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
5791 2004-05-24 Geoffrey Keating <geoffk@apple.com>
5793 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
5794 if it might be needed.
5795 * pt.c (mark_decl_instantiated): Only call defer_fn if
5796 the function actually needs processing in finish_file.
5797 * decl2.c (finish_file): Add check that elements in
5798 deferred_fns_used are really needed there. Remove unnecessary
5799 test of DECL_SAVED_TREE.
5801 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
5803 * Make-lang.in: No need to specify $(LIBCPP).
5805 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5808 * parser.c (cp_parser_class_head): Robustify.
5811 * parser.c (cp_parser_decl_specifier_seq): Correct error in
5813 (cp_parser_constructor_declarator_p): Treat attributes
5817 * typeck.c (build_unary_op): Do not attempt to resolve casts to
5818 base classes in templates.
5820 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5823 * pt.c (instantiate_template): Robustify.
5825 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5828 * decl.c (xref_tag): Issue errors about redeclaring template
5829 classes as non-template classes.
5831 2004-05-23 Mark Mitchell <mark@codesourcery.com>
5834 * name-lookup.c (supplement_binding): Allow redefinitions of
5838 * parser.c (cp_parser_template_argument): Robustify.
5840 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5842 * class.c (alter_access): Use %E format specifier to print an
5843 identifier node. Avoid looking at the IDENTIFIER_POINTER.
5844 (push_lang_context): Likewise.
5845 * decl.c (lookup_label): Likewise.
5846 (grokdeclarator): Likewise.
5847 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
5848 * pt.c (do_type_instantiation): Likewise.
5849 * tree.c (handle_java_interface_attribute): Likewise.
5850 (handle_com_interface_attribute): Likewise.
5851 (handle_init_priority_attribute): Likewise.
5853 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5857 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
5858 recognized as overloaded functions.
5860 2004-05-22 Mark Mitchell <mark@codesourcery.com>
5863 * class.c (layout_nonempty_base_or_field): Do not try to avoid
5864 layout conflicts for unions.
5867 * typeck.c (build_x_unary_op): Instantiate template class
5868 specializations before looking for "operator &".
5871 * typeck.c (complete_type): Layout non-dependent array types, even
5875 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
5878 2004-05-22 Roger Sayle <roger@eyesopen.com>
5880 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
5881 returning when TREE_TYPE is error_mark_node.
5882 * typeck.c (require_complete_type): Return error_mark_node if
5883 value's type is an error_mark_node.
5885 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
5887 * optimize.c (calls_setjmp_r): Remove.
5888 (calls_setjmp_p): Remove.
5889 * cp-tree.c (calls_setjmp_p): Remove.
5890 * decl.c (finish_function): Do not call calls_setjmp_p.
5892 2004-05-18 Zack Weinberg <zack@codesourcery.com>
5894 * decl.c (cp_finish_decl): Use mark_decl_referenced.
5895 * decl2.c (maybe_make_one_only): Likewise.
5896 * method.c (use_thunk): Likewise.
5898 2004-05-18 Jason Merrill <jason@redhat.com>
5900 * class.c (build_base_path): Tidy a bit.
5902 2004-05-14 Geoffrey Keating <geoffk@apple.com>
5904 * name-lookup.c (struct scope_binding): New.
5905 (EMPTY_SCOPE_BINDING): New.
5906 (lookup_using_namespace): Take a scope_binding instead of a
5908 (qualified_lookup_using_namespace): Likewise.
5909 (cxx_binding_clear): Delete.
5910 (do_nonmember_using_decl): Use a scope_binding instead of a
5912 (lookup_tag): Don't call select_decl.
5913 (ambiguous_decl): Don't return anything (and change callers to match).
5914 Take a scope_binding as the second parameter.
5915 (lookup_namespace_name): Use a scope_binding instead of a
5917 (unqualified_namespace_lookup): Likewise.
5918 (lookup_qualified_name): Likewise.
5919 (select_decl): Take a scope_binding instead of a cxx_binding.
5920 Use macros rather than hand-coding tests for type-ness.
5922 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5924 * cp-gimplify.c: Rename from cp-simplify.c.
5925 * Make-lang.in, optimize.c: Update.
5927 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5929 Merge from tree-ssa-20020619-branch. See
5930 ChangeLog.tree-ssa for details.
5932 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
5933 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
5934 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
5935 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
5937 * cp-mudflap.c: New file.
5938 * cp-simplify.c:: New file.
5940 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5943 * decl2.c (check_classfn): For member templates, compare also the
5944 template parameters to match the declaration.
5945 * cp-tree.h: Adjust declaration of check_classfn.
5946 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
5947 * friend.c (do_friend): Likewise.
5948 * pt.c (tsubst_friend_function): Likewise.
5950 2004-05-01 Zack Weinberg <zack@codesourcery.com>
5952 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
5953 Instead, dig into the representation type to find the array bound.
5955 2004-04-30 Jason Merrill <jason@redhat.com>
5957 Refer to base members using COMPONENT_REFs where possible.
5958 * class.c (build_simple_base_path): New fn.
5959 (build_base_path): Use it for non-virtual base references.
5960 (layout_class_type): Change base fields to their real type
5961 after layout is done.
5962 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
5963 * cp-lang.c (cxx_get_alias_set): Use it.
5965 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
5967 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
5970 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5973 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
5974 used in integral constant expressions.
5976 2004-04-22 Mark Mitchell <mark@codesourcery.com>
5978 * init.c (build_aggr_init): Fix accidental use of C99 construct in
5981 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
5983 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
5984 * decl.c (reshape_init): Use it.
5985 * init.c (perform_member_init): Remove redundant condition.
5986 (build_aggr_init): Adjust to handle brace-enclosed initializers
5988 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5990 * parser.c (cp_parser_initializer_clause): Do not set
5991 TREE_HAS_CONSTRUCTOR on the initializer.
5992 * rtti.c (tinfo_base_init): Likewise.
5993 (generic_initializer): Likewise.
5994 (ptr_initializer): Likewise.
5995 (ptm_initializer): Likewise.
5996 (class_initializer): Likewise.
5997 (get_pseudo_ti_init): Likewise.
5998 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6000 2004-04-22 Alan Modra <amodra@bigpond.net.au>
6002 * name-lookup.c (anonymous_namespace_name): Make static.
6004 2004-04-19 Roger Sayle <roger@eyesopen.com>
6007 * class.c (build_base_path): Call fold whilst building the NULL
6008 pointer check expression trees.
6010 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6012 * init.c (build_new_1): Don't use type size argument for Java
6013 _Jv_AllocObject call.
6015 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
6017 * method.c (make_alias_for_thunk): Remove preprocessor guard on
6018 declaration and definition.
6020 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
6023 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6024 than ASM_OUTPUT_DEF.
6026 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6028 * decl2.c (mark_used): Don't segfault if cfun != NULL but
6029 current_function_decl == NULL.
6031 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
6034 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6037 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6039 * init.c (decl_constant_value): Don't look at DECL_INITIAL
6041 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6042 or TREE_SIDE_EFFECTS of a type.
6044 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
6047 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6048 cv-qualifier unification.
6049 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6051 2004-04-02 Jan Hubicka <jh@suse.cz>
6053 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6054 * cp-tree.h (cp_update_decl_after_saving): Declare.
6055 * tree.c (cp_update_decl_after_saving): Define.
6057 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6060 * typeck.c (get_delta_difference): Call fold before returning the
6063 2004-04-01 Richard Henderson <rth@redhat.com>
6066 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6067 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6069 2004-04-01 Mark Mitchell <mark@codesourcery.com>
6072 * name-lookup.c (maybe_push_cleanup_level): Robustify.
6074 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6076 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6078 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6080 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6081 * class.c (check_bitfield_decl): Likewise.
6082 * cvt.c (type_promotes_to): Likewise.
6083 * decl.c (finish_enum): Likewise.
6084 * mangle.c (write_builtin_type): Likewise.
6085 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6086 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6087 (build_binary_op): Likewise.
6089 2004-03-31 Jan Hubicka <jh@suse.cz>
6091 * tree.h (optimize_function): Kill prototype.
6092 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6093 * semantics.c (expand_body): Kill.
6095 2004-03-30 Mark Mitchell <mark@codesourcery.com>
6098 * decl.c (start_decl_1): Do not decide whether or not to create a
6099 new cleanup level until after the type has been completed.
6102 * pt.c (tsubst_default_argument): Clear current_function_decl.
6104 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6106 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6108 2004-03-29 Zack Weinberg <zack@codesourcery.com>
6110 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
6111 is null, just print the literal name and return.
6113 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
6115 * cxx-pretty-print.c: Fix comment typos.
6117 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
6119 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
6122 2004-03-23 Ziemowit Laski <zlaski@apple.com>
6124 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
6125 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
6128 2004-03-23 Zack Weinberg <zack@codesourcery.com>
6130 PR 12267, 12391, 12560, 13129, 14114, 14133
6131 * cp-lang.c (c_reset_state): Delete.
6132 (push_file_scope, pop_file_scope): New stubs.
6133 * parser.c (c_parse_file): Call sorry() here if called more than once.
6135 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6137 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
6140 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6142 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
6144 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6146 * error.c (enum pad): Remove.
6147 (dump_qualifiers): Likewise.
6148 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
6149 (dump_aggr_type): Likewise.
6150 (dump_type_suffix): Likewise.
6151 (dump_simple_decl): Likewise.
6152 (dump_function_decl): Likewise.
6153 (cv_to_string): Likewise.
6154 (dump_type_prefix): Likewise. Adjust return void.
6155 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
6157 (pp_cxx_template_keyword_if_needed): Document.
6158 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
6159 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
6160 MUST_NOT_THROW_EXPR.
6162 2004-03-21 Mark Mitchell <mark@codesourcery.com>
6165 * decl.c (cp_finish_decl): Compute the size of arrays declared in
6166 templates, if their type is non-dependent.
6168 2004-03-19 Mark Mitchell <mark@codesourcery.com>
6170 * call.c (build_op_delete_call): Do not forget the placement
6171 arguments when iterating through mutiple delete operators.
6173 * cp-tree.h (svaed_scope): Remove last_parms.
6174 (NEW_DELETE_OPNAME_P): New macro.
6175 (last_function_parms): Remove.
6176 (do_friend): Adjust prototype.
6177 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
6178 using last_function_parms.
6179 (grokfndecl): Take the PARM_DECLs as an argument, rather than
6180 using last_function_parms.
6181 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
6182 for class-specific operator new and operator delete.
6183 (grok_op_properties): Do not look for allocation functions with
6185 (start_function): Use DECL_ARGUMENTS instead of
6186 last_function_parms.
6187 * decl.h (last_function_parms): Do not declare.
6188 * decl2.c (grokclassfn): Do not use last_function_parms.
6189 * friend.c (do_friend): Remove parmdecls parameter.
6190 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
6191 (pop_from_top_level): Do not restore it.
6192 * pt.c (check_explicit_specialization): Do not adjust
6193 last_function_parms.
6195 * name-lookup.c (do_local_using_decl): Create a local binding for
6196 types brought in via using declarations.
6198 * name-lookup.c (lookup_arg_dependent): Handle block-scope
6199 function declarations correctly.
6201 * semantics.c (finish_id_expression): Correct handling of
6202 conversion operators to dependent types.
6204 * typeck.c (lookup_destructor): Allow the use of destructors from
6207 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6209 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
6210 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
6211 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
6212 the field is named TEMPLATE_TYPE_PARM_INDEX.
6214 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6217 * parser.c (cp_parser_functional_cast): A cast to anything
6218 but integral or enumaration type is not an integral constant
6220 * pt.c (value_dependent_expression_p): Handle cast expressions
6221 without operands (such as "int()").
6223 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6225 * semantics.c (finish_pseudo_destructor_expr): Allow differing
6226 cv-qualification between the type named by the
6227 pseudo-destructor-name and the object-type.
6229 * search.c (accessible_base_p): Handle non-proper bases.
6231 * name-lookup.c (do_nonmember_using_decl): If a using declaration
6232 refers to a single overloaded function, set the type of the
6234 * tree.c (lvalue_type): Simplify.
6235 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
6237 (build_unary_op): Handle OVERLOADs with known types.
6239 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
6242 * parser.c (cp_parser_postfix_expression): Handle the use of
6243 "typename" in non-dependent contexts. Convert appropriately when
6244 when using a qualified name after "->" or ".".
6246 * call.c (conditional_conversion): Honor the requirement that some
6247 conversions refer to the original object.
6249 2004-03-18 Mark Mitchell <mark@codesourcery.com>
6251 * call.c (build_conditional_expr): Do not call force_rvalue for
6252 operands of void_type when the conditional expression itself has
6254 * name-lookup.c (pushdecl): Don't consider a declaration of a
6255 function named "main" to be an overload of a type named "main".
6256 * parser.c (cp_parser_template_name): Perform name lookup when the
6257 template name is proceeded by "template" if the qualifying scope
6259 * typeck.c (composite_pointer_type_r): Correctly handle
6260 pointer-to-member types.
6261 (build_const_cast): Likewise.
6263 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6265 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
6266 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
6267 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
6268 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
6269 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
6270 (TYPEOF_TYPE_EXPR): New macro.
6271 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
6272 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
6273 * pt.c (tsubst): Likewise.
6274 * semantics.c (finish_typeof): Likewise.
6275 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
6276 and TEMPLATE_TYPE_PARM.
6277 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
6278 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
6280 2004-03-16 Mark Mitchell <mark@codesourcery.com>
6283 * cp-tree.h (build_new_op): Change prototype.
6284 (build_x_binary_op): Likewise.
6285 * call.c (build_new_op): Add overloaded_p parameter.
6286 * decl2.c (grok_array_decl): Adjust call to build_new_op.
6287 * parser.c (cp_parser_binary_expression): Note that uses of
6288 overloaded operators prevents an expression from being considered
6289 an integral constant.
6290 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
6292 * semantics.c (finish_call_expr): Likewise.
6293 * typeck.c (rationalize_conditional_expr): Likewise.
6294 (build_x_indirect_ref): Likewise.
6295 (build_x_binary_op): Likewise.
6296 (build_x_unary_op): Likewise.
6297 (build_x_compound_expr): Likewise.
6298 (build_modify_expr): Likewise.
6299 * typeck2.c (build_x_arrow): Likewise.
6301 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
6303 * cp-lang.c, ptree.c: Update copyright.
6305 2004-03-13 Mark Mitchell <mark@codesourcery.com>
6308 * parser.c (cp_parser_non_integral_constant_expression): Encode
6309 more of the idiom that surrounded calls to this function within
6311 (cp_parser_primary_expression): Adjust accordingly.
6312 (cp_parser_postfix_expression): Likewise.
6313 (cp_parser_unary_expression): Likewise.
6314 (cp_parser_cast_expression): Likewise.
6315 (cp_parser_assignment_expression): Likewise.
6316 (cp_parser_expression): Likewise.
6317 (cp_parser_new_expression): Note that new-expressions are not
6318 allowed in integral constant expressions.
6319 (cp_parser_delete_expression): Likewise.
6321 2004-03-12 Matt Austern <austern@apple.com>
6323 * decl2.c (maybe_make_one_only): Look at
6324 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
6325 to make an explicit instantiation weak.
6326 * method.c (use_thunk): Make sure we call comdat_linkage
6328 * pt.c (do_type_instantiation): On systems where weak symbols
6329 don't go in a static archive's TOC, explicit instantiation of a
6330 class must imply *explicit* instantiation of its memeber.
6332 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
6334 * call.c, cp-tree.h, pt.c: Fix comment typos.
6336 2004-03-10 Mark Mitchell <mark@codesourcery.com>
6339 * decl.c (xref_tag): Disregard non-type declarations when
6340 looking up a tagged type.
6342 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
6345 * call.c (convert_like_real): Build a const qualified temporary,
6346 when testing ctor access.
6348 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6350 * call.c (initialize_reference): Fix typo.
6352 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6355 * pt.c (determine_specialization): For member templates, match also
6359 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
6361 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
6363 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6366 * call.c (initialize_reference): Handle initializers that are
6367 class-member access expressions applies to rvalues.
6369 2004-03-09 Mark Mitchell <mark@codesourcery.com>
6372 * name-lookup.c (supplement_binding): Ignore functions that are
6373 marked DECL_ANTICIPATED.
6375 2004-03-08 Mark Mitchell <mark@codesourcery.com>
6378 * class.c (check_field_decls): Complain about non-static data
6379 members of reference type in unions. Propagate
6380 CLASSTYPE_REF_FIELDS_NEED_INIT and
6381 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
6383 * init.c (perform_member_init): Complain about mbmers with const
6384 type that are not explicitly initialized.
6386 2004-03-08 Mark Mitchell <mark@codesourcery.com>
6388 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
6389 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
6390 (lang_identifier): Remove implicit_decl and error_locus.
6391 (IDENTIFIER_IMPLICIT_DECL): Remove.
6392 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
6393 (IDENTIFIER_ERROR_LOCUS): Likewise.
6394 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
6395 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
6396 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6397 (implicitly_declare): Remove.
6398 * decl.c (warn_extern_redeclared_static): Remove check of
6399 IDENTIFIER_IMPLICIT_DECL.
6400 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
6401 (implicitly_declare): Remove.
6402 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
6403 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
6404 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
6405 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
6406 in the innermost scope, rather than at namespace scope.
6407 * name-lookup.c (push_local_binding): Give it external linkage.
6408 (pushdecl): Remove dead code.
6409 * name-lookup.h (push_local_binding): Declare it.
6410 * ptree.c (cxx_print_identifier): Don't print
6411 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
6412 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
6413 not IDENTIFIER_ERROR_LOCUS.
6414 * typeck.c (build_function_call): Remove dead code.
6416 2004-03-08 Jason Merrill <jason@redhat.com>
6419 * decl.c (xref_tag): Remove attribute handling.
6420 * cp-tree.h: Adjust prototype.
6421 * decl.c, parser.c, rtti.c: Adjust callers.
6422 * parser.c (cp_parser_class_head): Pass back attributes in the
6424 (cp_parser_class_specifier): Adjust.
6426 2004-03-08 Matt Austern <austern@apple.com>
6429 * name-lookup.c (add_decl_to_level): Add extern variables, as well
6430 as static, to static_decls array.
6432 2004-03-05 Jason Merrill <jason@redhat.com>
6434 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
6436 2004-03-04 Geoffrey Keating <geoffk@apple.com>
6438 * decl.c (grokfndecl): Update old incorrect comment.
6439 (grokvardecl): Diagnose C++ variables of type with no linkage.
6441 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6444 * pt.c (build_non_dependent_expr): Do not create a
6445 NON_DEPENDENT_EXPR for a THROW_EXPR.
6447 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
6450 * error.c (dump_expr): Handle THROW_EXPR.
6452 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6455 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
6456 lookup if ordinary name-lookup finds a non-function.
6457 * pt.c (tsubst_copy_and_build): Likewise.
6460 * parser.c (cp_parser_late_parsing_default_args): Check that there
6461 are no extra tokens after the end of the default-argument
6464 2004-03-01 Mark Mitchell <mark@codesourcery.com>
6467 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
6468 having C++ linkage for name-mangling purposes.
6471 * parser.c (cp_parser_direct_declarator): Recognize constructor
6472 declarators that use a template-id to name the class being
6476 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
6477 (tsubst_expr): Do not call tsubst_copy, even when
6478 processing_template_decl.
6480 2004-03-01 Jeff Law <law@redhat.com>
6482 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
6485 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6488 * name-lookup.h (push_scope): Change prototype.
6489 * name-lookup.c (push_scope): Do not reenter the current class
6491 * decl.c (grokfndecl): Check return code from push_scope before
6493 * decl2.c (check_classfn): Likewise.
6494 * parser.c (cp_parser_conversion_function_id): Likewise.
6495 (cp_parser_init_declarator): Likewise.
6496 (cp_parser_direct_declarator): Likewise.
6497 (cp_parser_class_specifier): Likewise.
6498 (cp_parser_class_head): Likewise.
6499 (cp_parser_lookup_name): Likewise.
6500 (cp_parser_constructor_declarator_p): Likewise.
6501 * pt.c (instantiate_class_template): Likewise.
6502 (resolve_typename_type): Likewise.
6504 2004-02-29 Mark Mitchell <mark@codesourcery.com>
6507 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
6511 * class.c (update_vtable_entry_for_fn): Do not go through
6512 covariance machinery if the type returned by an overrider is the
6513 same as the original.
6515 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
6517 * call.c: Fix a comment typo.
6519 2004-02-27 Ziemowit Laski <zlaski@apple.com>
6521 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
6523 2004-02-26 Mark Mitchell <mark@codesourcery.com>
6526 * parser.c (cp_parser_parameter_declaration_list): Commit
6527 to fewer tentative parses.
6529 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6532 * pt.c (dependent_type_p_r): A template template parameter is a
6535 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6538 * mangle.c (write_template_arg_literal): Don't rely on identity for
6541 2004-02-24 Jason Merrill <jason@redhat.com>
6543 * tree.c (build_exception_variant): Use check_qualified_type.
6545 2004-02-23 Zack Weinberg <zack@codesourcery.com>
6546 Kazu Hirata <kazu@cs.umass.edu>
6548 * decl.c (cxx_init_decl_processing): Don't check
6549 flag_writable_strings.
6551 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
6554 * typeck.c (maybe_warn_about_returning_address_of_location):
6555 Change check for VAR_DECL to use DECL_P instead.
6557 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6560 * cvt.c (build_expr_type_conversion): Type must be complete before
6561 looking up for conversions.
6563 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6566 * name-lookup.c (arg_assoc_class): Don't look into template
6567 arguments if it is not a primary template.
6569 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6572 * method.c (use_thunk): Always clone function argument tree.
6574 2004-02-20 Mark Mitchell <mark@codesourcery.com>
6577 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
6580 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
6581 for all type variants.
6583 2004-02-19 Mark Mitchell <mark@codesourcery.com>
6586 * decl.c (duplicate_decls): Return error_mark_node for invalid
6588 * name-lookup.c (push_namespace): Ignore the return value from
6590 * pt.c (push_template_decl_real): Robustify.
6593 * name-lookup.c (push_class_level_binding): Do not complain about
6594 adding a binding for a member whose name is the same as the
6595 enclosing class if the member is located in a base class of the
6598 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6601 * parser.c (cp_parser_new_expression): Parse an ill-formed
6602 direct-new-declarator after a parenthesized type-id to emit good
6605 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
6607 * cp-tree.def, cvt.c: Update copyright.
6609 2004-02-17 Mark Mitchell <mark@codesourcery.com>
6612 * cp-tree.h (abi_version_at_least): Remove.
6613 * mangle.c: Include flags.h.
6615 2004-02-15 Mark Mitchell <mark@codesourcery.com>
6618 * call.c (build_conditional_expr): Handle conversions between
6619 class types which result in differently cv-qualified type
6623 * class.c (delete_duplicate_fields_1): Remove.
6624 (delete_duplicate_fields): Likewise.
6625 (finish_struct_anon): Remove check for members with the same name
6626 as their enclosing class.
6627 (check_field_decls): Do not call duplicate_fields.
6628 * decl.c (grokdeclarator): Remove check for static data members
6629 with the same name as their enclosing class.
6630 * name-lookup.c (push_class_level_binding): Check for members with
6631 the same name as their enclosing class.
6633 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
6636 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
6638 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6641 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
6642 has full set of arguments.
6644 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6647 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
6649 2004-02-13 Mark Mitchell <mark@codesourcery.com>
6652 * cp-tree.h (delete_sanity): Change prototype.
6653 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
6654 Remove dead code. Adjust code to warn about deleting an array.
6655 * typekc.c (decay_conversion): Use build_address and build_nop.
6658 * search.c (accessible_p): Do not check access in thunks.
6661 * call.c (build_conditional_expr): Call force_rvalue on the
6662 non-void operand in the case that one result is a throw-expression
6663 and the other is not.
6665 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
6668 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
6669 the type name and look ahead for ::~, and bail out early with a
6670 better error message if the parse is going to fail.
6672 2004-02-12 Mark Mitchell <mark@codesourcery.com>
6674 * call.c (conversion_kind): New type.
6675 (conversion_rank): Likewise.
6676 (conversion): Likewise.
6677 (CONVERSION_RANK): New macro.
6678 (conversion_obstack): New variable.
6679 (obstack_initialized): Likewise.
6680 (z_candidate): Change type of convs and second_conv.
6681 (candidate_warning): New type.
6682 (IDENTITY_RANK): Remove.
6683 (EXACT_RANK): Likewise.
6684 (PROMO_RANK): Likewise.
6685 (STD_RANK): Likewise.
6686 (PBOOL_RANK): Likewise.
6687 (USER_RANK): Likewise.
6688 (ELLIPSIS_RANK): Likewise.
6689 (BAD_RANK): Likewise.
6690 (ICS_RANK): Likewise.
6691 (ICS_STD_RANK): Likewise.
6692 (ICS_USER_FLAG): Likewise.
6693 (ICS_ELLIPSIS_FLAG): Likewise.
6694 (ICS_THIS_FLAG): Likewise.
6695 (ICS_BAD_FLAG): Likewise.
6696 (NEED_TEMPORARY_P): Likewise.
6697 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
6698 (USER_CONV_CAND): Likewise.
6699 (USER_CONV_FN): Likewise.
6700 (conversion_obstack_alloc): New function.
6701 (alloc_conversion): Likewise.
6702 (validate_conversion_obstack): Likewise.
6703 (alloc_conversions): Likewise.
6704 (build_conv): Adjust to deal with new conversion data structures.
6705 (build_identity_conv): New function.
6706 (build_ambiguous_conv): Likewise.
6707 (standard_conversion): Adjust to deal with new conversion data
6709 (convert_class_to_reference): Likewise.
6710 (direct_reference_binding): Likewise.
6711 (reference_binding): Likewise.
6712 (implicit_conversion): Likewise.
6713 (add_candidate): Likewise.
6714 (add_function_candidate): Likewise.
6715 (add_conv_candidate): Likewise.
6716 (build_builtin_candidate): Likewise.
6717 (print_z_candidate): Likewise.
6718 (merge_conversion_sequences): Likewise.
6719 (build_user_type_conversion_1): Likewise.
6720 (build_user_type_conversion): Likewise.
6721 (build_new_function_call): Likewise.
6722 (build_object_call): Likewise.
6723 (conditional_conversion): Likewise.
6724 (build_conditional_expr): Likewise.
6725 (build_new_op): Likewise.
6726 (build_op_delete_call): Likewise.
6727 (convert_like_real): Likewise.
6728 (build_over_call): Likewise.
6729 (build_new_method_call): Likewise.
6730 (is_subseq): Likewise.
6731 (maybe_handle_implicit_object): Likewise.
6732 (maybe_handle_ref_bind): Likewise.
6733 (compare_ics): Likewise.
6734 (source_type): Likewise.
6735 (add_warning): Likewise.
6737 (can_convert_arg): Likewise.
6738 (can_convert_arg_bad): Likewise.
6739 (perform_implicit_conversion): Likewise.
6740 (perform_direct_initialization_if_possible): Likewise.
6741 (initialize_reference): Likewise.
6742 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
6743 * cp-tree.def (WRAPPER): Likewise.
6744 (IDENTITY_CONV): Remove.
6745 (LVALUE_CONV): Likewise.
6746 (QUAL_CONV): Likewise.
6747 (STD_CONV): Likewise.
6748 (PTR_CONV): Likewise.
6749 (PMEM_CONV): Likewise.
6750 (BASE_CONV): Likewise.
6751 (REF_BIND): Likewise.
6752 (USER_CONV): Likewise.
6753 (AMBIG_CONV): Likewise.
6754 (RVALUE_CONV): Likewise.
6755 * cp-tree.h (tree_wrapper): Remove.
6756 (WRAPPER_ZC): Remove.
6757 (lang_tree_node): Remove wrapper.
6758 (LOOKUP_SPECULATIVELY): Remove.
6759 (build_op_delete_call): Adjust prototype.
6760 (validate_conversion_obstack): Declare.
6761 (build_zc_wrapper): Remove.
6762 * cvt.c (convert_to_reference): Remove dead code.
6763 (ocp_convert): Likewise.
6764 * decl.c (redeclaration_error_message): Correct handling of
6766 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
6767 (cp_tree_node_structure): Remove WRAPPER case.
6768 * decl2.c (finish_file): Call validate_conversion_obstack.
6769 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
6770 (build_op_delete_call): Likewise.
6771 (build_x_delete): Likewise.
6772 (build_delete): Adjust call to build_op_delete_call.
6773 * pt.c (tsubst_friend_declaration): Adjust code to determine
6774 whether or not a friend template is a definition.
6775 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
6776 * tree.c (build_zc_wrapper): Remove.
6778 2004-02-12 Zack Weinberg <zack@codesourcery.com>
6780 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
6781 * cp-tree.h: Don't declare cxx_builtin_type_decls.
6782 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
6783 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
6785 2004-02-10 Mark Mitchell <mark@codesourcery.com>
6787 * typeck.c (lookup_destructor): Fix typo in error message.
6789 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
6791 * call.c, parser.c, tree.c: Fix comment typos.
6793 2004-02-07 Zack Weinberg <zack@codesourcery.com>
6796 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
6797 * decl.c (duplicate_decls, start_function): Likewise.
6799 2004-02-07 Zack Weinberg <zack@codesourcery.com>
6801 * name-lookup.c (pushdecl): Issue shadow warnings directly.
6802 * parser.c (free_parser_stacks): Delete.
6804 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
6806 * rtti.c: Update copyright.
6808 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6811 * decl.c (require_complete_types_for_parms): Do not insert
6812 error_mark_node in the parameter list.
6814 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6817 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
6818 error when terminator can not be found.
6820 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6822 Make-lang.in (po-generated): Delete.
6824 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6826 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
6827 targetm.calls.promote_prototypes.
6829 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6833 2004-01-15 Geoffrey Keating <geoffk@apple.com>
6835 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6836 (handle_pragma_implementation): Likewise.
6838 2004-02-05 Mark Mitchell <mark@codesourcery.com>
6841 * typeck.c (lookup_destructor): Tweak error message.
6843 2004-02-05 Jan Hubicka <jh@suse.cz>
6845 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
6848 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6851 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
6852 code, only emits the diagnostic now. Added lookup of the identifier
6853 and support for qualified ids.
6854 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
6855 Parse an (invalid) type name as id-expression within a declarator.
6856 (cp_parser_simple_declaration): Use it.
6857 (cp_parser_member_declaration): Likewise.
6858 (cp_parser_make_typename_type): New function. Handle errors through
6859 cp_parser_diagnose_invalid_typename.
6860 (cp_parser_elaborated_type_specifier): Use it.
6862 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6865 * call.c (convert_like_real): Use "converting" rather than
6866 "argument" as the descriptive keyword to
6867 dubious_conversion_warnings.
6868 * typeck.c (convert_for_assignment): Do not call
6869 dubious_conversion_warnings.
6871 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6874 * init.c (build_delete): Emit a more informative error message in
6875 case of an incomplete type, and on the correct source line.
6877 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6879 * error.c, search.c: Update copyright.
6881 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6884 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
6885 linkage for the typeinfo name string.
6887 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6890 * cp-tree.h (fold_non_dependent_expr): New function.
6891 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
6892 (cp_parser_template_argument): Use fold_non_dependent_expr.
6893 (cp_parser_direct_declarator): Likewise.
6894 * pt.c (fold_non_dependent_expr): New function.
6895 (convert_nontype_argument): Use it.
6896 (tsubst_qualified_id): Simplify.
6897 (tsubst_copy_and_build): Likewise.
6899 2004-02-04 Mark Mitchell <mark@codesourcery.com>
6901 * decl.c (cxx_push_function_context): Do not set
6902 current_function_is_thunk.
6903 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
6906 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6909 * pt.c (more_specialized_class): Increase processing_template_decl
6910 while partial ordering.
6912 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6915 * decl.c (start_function): Do not call pushdecl for any
6916 instantiation or specialization of a primary template.
6918 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6921 * parser.c (cp_parser_class_name): Robustify.
6924 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
6927 * semantics.c (finish_id_expression): Do not return an
6928 IDENTIFIER_NODE when lookup finds a PARM_DECL.
6930 2004-02-03 Mark Mitchell <mark@codesourcery.com>
6933 * pt.c (build_non_dependent_expr): Do not build
6934 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
6937 * semantics.c (finish_id_expression): Do not return an
6938 IDENTIFIER_NODE when lookup finds a VAR_DECL.
6941 * parser.c (cp_parser_simple_declaration): When skipping to the
6942 end of the statement swallow the terminating semicolon.
6944 2004-02-02 Mark Mitchell <mark@codesourcery.com>
6947 * init.c (build_offset_ref): Improve error recovery for invalid
6948 uses of non-static member functions.
6951 * cp-tree.h (cp_build_type_attribute_variant): New function.
6952 * class.c (build_clone): Use cp_build_type_attribute_variant.
6953 * decl.c (duplicate_decls): Likewise.
6954 * pt.c (copy_default_args_to_explicit_spec): Likewise.
6955 (tsubst_function_type): Likewise.
6956 * tree.c (build_exception_variant): Check attributes before
6957 concluding that two types are the same.
6958 (cp_build_type-attribute_variant): New method.
6959 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
6962 * call.c (convert_class_to_reference): Keep better track of
6963 pedantically invalid user-defined conversions.
6965 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6968 * pt.c (tsubst_qualified_id): Improved error message when a type
6969 is expected but not found.
6971 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
6973 * class.c: Fix comment typos.
6975 * error.c: Likewise.
6976 * parser.c: Likewise.
6978 * search.c: Likewise.
6979 * typeck.c: Likewise.
6981 2004-01-30 Richard Henderson <rth@redhat.com>
6984 * method.c (use_thunk): Don't force_target_expr for void thunks.
6985 * tree.c (build_target_expr_with_type): Assert non-void type.
6986 (force_target_expr): Likewise.
6988 2004-01-30 Michael Matz <matz@suse.de>
6990 * parser.c (cp_parser_labeled_statement): Accept case ranges.
6992 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6996 * decl.c (grokdeclarator): Check immediatly type completeness for
6997 non-dependent types.
6999 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7002 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7003 a sizeof expression.block
7005 2004-01-29 Mark Mitchell <mark@codesourcery.com>
7008 * mangle.c (write_encoding): Correct encoding of member template
7011 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7013 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7014 template name as it was `<::' (digraph typo).
7015 (cp_parser_nth_token_starts_template_argument_list_p): New function.
7016 (cp_parser_id_expression): Use it.
7017 (cp_parser_nested_name_specifier_opt): Likewise.
7018 (cp_parser_template_name): Likewise.
7019 (cp_parser_class_name): Likewise.
7020 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7022 2004-01-28 Mark Mitchell <mark@codesourcery.com>
7025 * typeck.c (merge_types): Do not merge attributes into
7029 * parser.c (cp_parser_direct_declarator): Do not prevent
7030 backtracking inside a parenthesized declarator.
7031 (cp_parser_parameter_declaration): Fix typo in comment.
7033 2004-01-28 Jan Hubicka <jh@suse.cz>
7035 * semantics.c (expand_body) Do emit_associated_thunks before
7038 2004-01-27 Devang Patel <dpatel@apple.com>
7040 * name-lookup.c: Include "debug.h"
7041 (do_namespace_alias): Invoke debug_hooks to emit debug info
7042 for namespace alias.
7043 (do_local_using_decl): Invoke debug_hooks to emit debug info
7045 (do_class_using_decl): Same.
7046 (do_toplevel_using_decl): Same.
7047 (do_using_directive): Same.
7048 (cp_emit_debug_info_for_using): New function.
7049 * Make-lang.in (cp/parser.o): Depend on debug.h
7050 (cp/name-lookup.o): Same.
7052 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7054 * cp-tree.h (language_function, lang_type_header): Use
7056 * name-lookup.h (cp_binding_level): Likewise.
7058 2004-01-26 Mark Mitchell <mark@codesourcery.com>
7061 * semantics.c (finish_for_expr): Check for unresolved overloaded
7064 * class.c (add_method): Just check processing_template_decl to
7065 determine whether or not we are within a template.
7066 * decl2.c (maybe_retrofit_in_chrg): Likewise.
7067 * init.c (decl_constant_value): Check the type of the declaration,
7069 * name-lookup.c (maybe_push_to_top_level): Rename to ...
7070 (push_to_top_level): ... this.
7071 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7072 * pt.c (push_template_decl_real): Reorder condition for speed.
7073 (convert_template_argument): Use dependency-checking functions in
7074 place of uses_template_parms.
7075 (lookup_template_class): Avoid calling uses_template_parms more
7077 (uses_template_parms): Reimplement, using dependency-checking
7079 (instantiate_class_template): Use push_to_top_level, not
7080 maybe_push_to_top_level.
7081 (type_unification_real): Simplify.
7082 (type_dependent_expression_p): Handle OFFSET_REFs and
7084 (any_dependent_template_arguments_p): Handle multiple levels of
7086 * semantics.c (expand_or_defer_fn): Do not check
7087 uses_template_parms for template instantiations.
7088 * typeck.c (comptypes): Avoid calling cp_type_quals.
7090 2004-01-25 Mark Mitchell <mark@codesourcery.com>
7093 * call.c (build_over_call): Do not convert arguments when
7094 processing a template.
7095 * pt.c (build_non_dependent_expr): Do not build a
7096 NON_DEPENDENT_EXPR for arithmetic constants.
7098 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7101 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7102 returns a TYPE_DECL. no further lookup is required.
7103 * semantics.c (check_template_template_default_arg): A TYPE_DECL
7104 is invalid. Rework to give better diagnostics.
7106 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7109 * pt.c (instantiate_class_template): Add an error_mark_node
7111 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
7113 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
7116 * decl.c (finish_function): Move the call to
7117 finish_fname_decls below the call to
7118 finish_eh_spec_block.
7120 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7122 * optimize.c, typeck2.c: Update copyright.
7124 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
7126 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
7127 init.c, mangle.c, typeck.c: Update copyright.
7129 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
7131 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
7133 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7135 * Make-lang.in: Replace $(docdir) with doc.
7136 (c++.info, c++.srcinfo): Dummy entry.
7137 (c++.man, c++.srcman): New rules.
7138 (c++.install-man): Revamp rule.
7140 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7142 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
7143 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
7144 immediate $(shell) instead of deferred backquote.
7146 2004-01-19 Mark Mitchell <mark@codesourcery.com>
7149 * parser.c (cp_parser_postfix_expression): When encountering
7150 incomplete type on left-hand side of "->" or ".", treat the entire
7151 expression as erroneous.
7154 * call.c (build_field_call): Remove.
7155 (n_build_method_call): Likewise.
7156 (build_method_call): Likewise.
7157 (build_new_method_call): Do not call build_field_call.
7158 * class.c (n_build_method_call): Remove.
7159 (print_class_statistics): Do not print it.
7160 * cp-tree.h (build_method_call): Remove declaration.
7161 (finish_object_call_expr): Likewise.
7162 (build_new_1): Do not use build_method_call.
7163 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
7164 when the function appearing on the right-hand-side of "." or "->"
7165 is not actually a function.
7166 * pt.c (tsubst_copy_and_build): Likewise.
7167 * semantics.c (finish_object_call_expr): Remove.
7169 2004-01-18 Mark Mitchell <mark@codesourcery.com>
7172 * pt.c (tsubst): Use finish_typeof.
7174 2004-01-18 Jason Merrill <jason@redhat.com>
7177 * except.c (build_throw): In a template, set
7178 current_function_returns_abnormally.
7180 2004-01-17 Fred Fish <fnf@intrinsity.com>
7183 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
7184 except don't call array_type_nelts() with a VECTOR_TYPE.
7186 2004-01-16 Jan Hubicka <jh@suse.cz>
7188 * mangle.c (write_mangled_name): Remove inline modifier.
7190 2004-01-16 Mark Mitchell <mark@codesourcery.com>
7193 * decl.c (compute_array_index_type): Fix grammar in comment.
7194 * init.c (build_zero_init): Handle zero-sized arrays correctly.
7197 * call.c (name_as_c_string): Print conversion operator names
7201 * call.c (initialize_reference): Pass -1 for inner parameter to
7204 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7207 * parser.c (cp_parser_base_specifier): Check for an invalid
7208 keyword `typename' and emit an user-friendly error message.
7210 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7213 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7214 (handle_pragma_implementation): Likewise.
7216 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7219 * typeck.c (build_class_member_access_expr): Allow to access members
7220 of the currently open class.
7221 (finish_class_member_access_expr): Likewise.
7223 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7226 * name-lookup.c (validate_nonmember_using_decl): Take scope and
7227 name by value, instead of computing them.
7228 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
7229 arguments. Pass them to validate_nonmember_using_decl.
7230 * name-lookup.h (do_local_using_decl): Adjust.
7231 (do_toplevel_using_decl): Likewise.
7232 * parser.c (cp_parser_using_declaration): Likewise.
7233 * pt.c (tsubst_expr): Likewise.
7235 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
7239 * name-lookup.c (qualified_lookup_using_namespace): Search
7240 strongly-associated namespaces first, and only then try other
7243 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
7245 * Make-lang.in (c++.srcextra): Dummy entry.
7247 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7250 * parser.c (cp_parser_template_name): Don't try to parse a
7251 conversion-function-id, as it cannot be a template-name.
7252 (cp_parser_simple_type_specifier): Check for invalid template-ids
7253 even after a built-in type.
7255 2004-01-14 Jan Hubicka <jh@suse.cz>
7258 * pt.c (instantiate_decl): Do not increase function_depth.
7260 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
7264 * parser.c (cp_parser_elaborated_type_specifier): Warn about
7265 attributes and discard.
7266 * decl.c (xref_tag): Don't overwite existing attributes with
7269 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7272 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
7273 is no destructor while looking up a BIT_NOT_EXPR.
7275 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7277 * cxxfilt.c: Remove unused file.
7279 2004-01-14 Jan Hubicka <jh@suse.cz>
7281 Partial fix to PR c++/12850
7282 * decl2.c (mark_used): Do not proactively instantiate templates
7283 when compiling in unit-at-a-time or not optimizing.
7284 * optimize.c (maybe_clone_body): Do not increase function depth.
7286 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7289 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
7291 2004-01-12 Steven Bosscher <stevenb@suse.de>
7294 * parser.c (cp_parser_member_declaration): Any non-type is also
7295 not a class or a function.
7297 2004-01-12 Jason Merrill <jason@redhat.com>
7300 * class.c (build_base_path): Do not mark vtable references as
7302 (build_vtbl_ref_1): Likewise.
7304 2004-01-12 Richard Henderson <rth@redhat.com>
7307 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
7308 (store_init_value): Use it.
7309 * decl.c (check_initializer): Expect full initialization code
7310 from store_init_value.
7311 * init.c (expand_aggr_init_1): Likewise.
7312 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
7314 2004-01-12 Mark Mitchell <mark@codesourcery.com>
7316 * class.c (layout_class_type): For non-POD class types, also copy
7317 the DECL_SIZE and DECL_MODE of fields to the base class type.
7319 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7322 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
7323 calling regenerate_decl_from_template.
7325 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
7328 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
7329 decl-specifier occurring along with a class definition.
7331 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
7333 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
7334 clauses to comments describing declares_class_or_enum.
7335 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
7338 2004-01-12 Jan Hubicka <jh@suse.cz>
7340 * pt.c (for_each_template_parm): Do not check for duplicates.
7341 (for_each_template_parm): Use walk_tree duplicate checking code.
7343 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
7346 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
7347 is error_mark_node, don't add any more decl_specs.
7348 (cp_parser_init_declarator): After committing to a declaration, if
7349 the decl_specifiers start with error_mark_node, issue an error and
7350 change the type to "int".
7352 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
7355 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
7357 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7361 * pt.c (tsubst): Substitution must fail if we are attempting to
7362 create an array with element type that is an abstract class type.
7363 * decl.c (cp_finish_decl): Strip pointers and array types recursively
7364 before calling abstract_virtuals_error.
7366 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
7368 * name-lookup.c (qualified_lookup_using_namespace): Consider
7369 strong using directives even if we've already found a binding.
7371 2004-01-09 Mark Mitchell <mark@codesourcery.com>
7373 * cp-tree.h (cxx_expand_expr): Change prototype.
7374 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
7376 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7379 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
7380 looking into them recursively. They can be there because of the
7381 new __offsetof__ extension.
7383 2004-01-07 Zack Weinberg <zack@codesourcery.com>
7385 * parser.c (cp_parser_save_member_function_body): Mark the
7388 2004-01-05 Mark Mitchell <mark@codesourcery.com>
7391 * class.c (build_clone): Copy type attributes from the original
7392 function to the clone.
7395 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
7396 references as constant.
7399 * parser.c (cp_parser_explicit_instantiation): Improve error
7401 (cp_parser_require): Improve indication of the error location.
7404 * parser.c (cp_parser_class_head): Reorder logic to check for
7405 invalid qualification.
7407 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7410 * name-lookup.c (lookup_using_namespace): Remove spacesp
7412 (unqualified_namespace_lookup): Likewise.
7413 (lookup_qualified_name): Adjust accordingly.
7414 (lookup_name_real): Likewise.
7415 (lookup_arg_dependent): Do not eliminate the namespace of the
7416 functions found by unqualified name lookup unless that is the
7419 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
7421 * semantics.c (push_deferring_access_checks): Fix format.
7422 (resume_deferring_access_checks): Likewise.
7423 (stop_deferring_access_checks): Likewise.
7424 (pop_deferring_access_checks): Likewise.
7425 (get_deferred_access_checks): Likewise.
7426 (pop_to_parent_deferring_access_checks): Likewise.
7427 (perform_deferred_access_checks): Likewise.
7428 (perform_or_defer_access_check): Likewise.
7430 2004-01-04 Richard Henderson <rth@redhat.com>
7432 * call.c (build_over_call): Don't create a save_expr of an
7433 aggregate, but rather its address.
7435 2004-01-04 Mark Mitchell <mark@codesourcery.com>
7438 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
7439 an offsetof expression.
7441 * parser.c (cp_parser_parameter_declaration): Fix comment.
7444 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
7445 (reference_binding): Set it when appropriate.
7446 (build_temp): New function, split out from ...
7447 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
7448 (initialize_reference): Likewise.
7451 * parser.c (cp_parser): Add in_type_id_in_expr_p.
7452 (cp_parser_new): Initialize it.
7453 (cp_parser_postfix_expression): Set it.
7454 (cp_parser_sizeof_operand): Likewise.
7455 (cp_parser_parameteR_declaration): Do not commit early to tenative
7456 parsers when in_type_id_in_expr_p is set.
7458 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7461 * parser.c (cp_parser_template_argument): Don't call
7462 make_unbound_class_template directly.
7463 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
7464 UNBOUND_CLASS_TEMPLATE tree node.
7466 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
7469 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
7471 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7474 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
7475 (DECL_FUNCTION_TEMPLATE_P): Use it.
7476 (DECL_CLASS_TEMPLATE_P): Likewise.
7477 * parser.c (cp_parser_lookup_name): Add is_template parameter.
7478 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
7479 (cp_parser_template_name): Likewise.
7480 (cp_parser_elaborated_type_specifier): Likewise.
7481 (cp_parser_namespace_name): Likewise.
7482 (cp_parser_class_name): Likewise.
7483 (cp_parser_lookup_name_simple): Likewise.
7485 See ChangeLog.3 for earlier changes.