1 2005-02-22 Mark Mitchell <mark@codesourcery.com>
4 * parser.c (cp_parser_direct_declarator): Always complain about
5 non-constant array bounds when in a function scope.
6 * semantics.c (finish_id_expression): Do not mark dependent names
9 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
13 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
14 * decl.c (grokdeclarator): Pedwarn about qualifying a function
16 Add qualifiers when declaring a typedef of a function type.
17 Member function pointers pick up the qualifiers of the typedef
19 Don't complain about creating cv-qualified function types.
20 Complain about qualified function typedefs that are used to
21 declare non-static member functions or free functions.
22 Use cp_apply_type_quals_to_decl.
23 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
24 (grokclassfn): Use cp_apply_type_quals_to_decl.
25 * error.c (dump_type_suffix): Print qualifiers for function
27 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
28 (tsubst): When substituting a function type into a member
29 pointer type, pass along the qualifiers.
30 (unify): Unify member pointers to member function pointers.
31 * tree.c (cp_build_qualified_type_real): Function types may be
32 qualified. This includes restrict qualifiers.
33 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
34 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
35 added to function types.
37 2005-02-20 Zack Weinberg <zack@codesourcery.com>
40 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
41 c_common_to_target_charset. Delete bogus comment.
43 2005-02-18 Richard Henderson <rth@redhat.com>
46 * except.c (do_get_exception_ptr): New.
47 (expand_start_catch_block): Use it.
49 2005-02-19 Jakub Jelinek <jakub@redhat.com>
51 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
52 if type is not error_mark_node.
54 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
57 * decl2.c (grokfield): Do not apply attributes to template parameters
58 as they are ignored by tsubst anyway.
60 2005-02-18 Jakub Jelinek <jakub@redhat.com>
63 * decl.c (start_decl_1): Clear TREE_READONLY flag if
64 its type has TYPE_NEEDS_CONSTRUCTING.
65 (complete_vars): Likewise.
67 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
70 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
71 template along with TYPE_SIZE.
74 * semantics.c (perform_deferred_access_checks): Use
75 get_deferred_access_checks to get the top of the stack.
77 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
80 * class.c (add_implicitly_declared_members, check_field_decl)
81 (check_field_decls, check_bases): Remove arguments, tests and
82 assignments of cant_have_default_ctor-related variables.
84 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
86 * decl2.c (mark_used): Set the source location of the used decl to
87 the current input location here...
88 * method.c (synthesize_method): ... not here. Set input_location
89 from the decl instead.
91 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
94 * parser.c (cp_parser_late_parsing_for_member): Use
95 current_function_decl as scope to push to and from.
98 * pt.c (check_explicit_specialization): Make sure namespace
99 binding lookup found an overloaded function.
100 (lookup_template_function): Just assert FNS is an overloaded
104 * decl.c (grokdeclarator): Check for error mark node in ptrmem
107 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
110 * decl.c (redeclaration_error_message): Report redefinition of
111 pure virtual function.
113 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
116 * class.c (build_simple_base_path): Build the component_ref
118 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
119 rather than using lookup_base.
120 * search.c (dfs_walk_once): Add non-recursive assert check.
121 * typeck.c (build_class_member_access_expr): It is possible for
122 the member type to be both const and volatile.
124 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
128 * pt.c (maybe_check_template_type): Remove.
129 * cp-tree.h (maybe_check_template_type): Remove prototype.
130 * name-lookup.c (maybe_process_template_type_declaration): Don't
131 use maybe_check_template_type.
133 2005-02-11 Richard Henderson <rth@redhat.com>
136 * pt.c (get_mostly_instantiated_function_type): Save and restore
137 flag_access_control instead of push/pop_access_scope.
139 2005-02-10 Mark Mitchell <mark@codesourcery.com>
142 * decl.c (reshape_init): Issue warnings about missing braces.
144 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
146 * cp-tree.def, except.c, ptree.c: Update copyright.
148 2005-02-09 Mark Mitchell <mark@codesourcery.com>
151 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
152 attempting name lookup.
154 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
157 * call.c (initialize_reference): Robustify.
160 * decl.c (grokdeclarator): Check for invalid use of destructor
164 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
165 names with invalid types.
168 * parser.c (cp_parser_direct_declarator): Allow type-dependent
169 expressions as array bounds.
172 * parser.c (cp_parser_attributes_list): Allow empty lists.
174 2005-02-08 Mark Mitchell <mark@codesourcery.com>
177 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
178 (check_bases): Give warnings about a base class with a
179 non-virtual destructor, even if it is implicit.
180 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
181 (maybe_warn_about_overly_private_class): Don't use
183 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
184 (check_for_override): Give it external linkage.
185 (add_implicitly_declared_members): Generate destructors lazily.
186 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
188 (check_bases_and_members): Call check_methods before
190 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
192 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
193 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
194 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
195 (lang_type_class): Add lazy_destructor.
196 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
197 (CLASSTYPE_DESTRUCTORS): Robustify.
198 (TYPE_HAS_DESTRUCTOR): Remove.
199 (check_for_override): Declare.
200 (build_vbase_delete): Remove.
201 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
203 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
204 * except.c (dtor_nothrow): Lazily create destructors if necessary.
205 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
206 * init.c (build_delete): Lazily create destructors, if necessary.
207 (build_vbase_delete): Remove.
208 * method.c (locate_dtor): Simplify.
209 (implicitly_declare_fn): Add support for destructors.
210 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
212 * pt.c (check_explicit_specialization): Don't use
214 (instantiate_class_template): Likewise.
215 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
216 * rtti.c (emit_support_tinfos): Robustify.
217 * search.c (lookup_fnfields_1): Lazily create destructors.
218 * typeck.c (build_class_member_access_expr): Remove
219 PSEUDO_DTOR_EXPR handling.
220 (lookup_destructor): Likewise.
222 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
224 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
227 2005-02-07 Mark Mitchell <mark@codesourcery.com>
229 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
230 on boolean variables.
231 (cp_lexer_stop_debugging): Likewise.
233 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
236 * parser.c (cp_parser_pure_specifier): Emit a specific error
237 message with an invalid pure specifier.
238 * decl2.c (grok_function_init): Remove.
239 (grokfield): An initializer for a method is a always a pure
242 2005-02-02 Matt Austern <austern@apple.com>
245 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
246 * parser.c (cp_parser_postfix_expression): Accept function call in
247 constant expression if builtin_valid_in_constant_expr_p is true
249 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
250 * semantics.c (finish_id_expression): Accept function call in constant
251 expression if builtin_valid_in_constant_expr_p is true for that
253 * tree.c (builtin_valid_in_constant_expr_p): New.
255 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
258 * pt.c (check_instantiated_args): Improve error message.
259 Fix logic when to print its second part.
261 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
263 * cp-tree.h (complete_type_or_else): Remove macro.
264 (complete_type_or_diagnostic): Rename to complete_type_or_else
265 and remove last argument.
266 * typeck.c (complete_type_or_diagnostic): Rename to
267 complete_type_or_else and remove last argument.
269 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
271 * cp-tree.h (commonparms): Remove prototype.
272 (convert_arguments): Likewise.
273 (PFN_FROM_PTRMEMFUNC): Remove.
274 * typeck.c (commonparms): Make static.
275 (convert_arguments): Add prototype. Make static.
276 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
278 2005-01-31 Mark Mitchell <mark@codesourcery.com>
280 * parser.c (cp_parser_primary_expression): Don't complain about
281 floating-point literals in integral constant expressions when
284 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
286 * parser.c (cp_parser_template_id): Revert comment patch too.
291 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
292 Issue an error when creating the template id.
293 * pt.c (fn_type_unification): Return early if the explicit
294 template arg list is an error_mark_node.
296 2005-01-31 Mark Mitchell <mark@codesourcery.com>
298 * decl.c (build_enumerator): Do not issue duplicate error messages
299 about invalid enumeration constants.
300 * parser.c (cp_parser_non_integral_constant_expression): Always
301 set parser->non_integral_constant_expression_p.
302 (cp_parser_primary_expression): Add cast_p parameter. Issue
303 errors about invalid uses of floating-point literals in
305 (cp_parser_postfix_expression): Add cast_p parameter.
306 (cp_parser_open_square_expression): Pass it.
307 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
308 (cp_parser_unary_expression): Likewise.
309 (cp_parser_new_placement): Pass it.
310 (cp_parser_direct_new_declarator): Likewise.
311 (cp_parser_new_initializer): Likewise.
312 (cp_parser_cast_expression): Add cast_p parameter.
313 (cp_parser_binary_expression): Likewise.
314 (cp_parser_question_colon_clause): Likewise.
315 (cp_parser_assignment_expression): Likewise.
316 (cp_parser_expression): Likewise.
317 (cp_parser_constant_expression): If an integral constant
318 expression is invalid, return error_mark_node.
319 (cp_parser_expression_statement): Pass cast_p.
320 (cp_parser_condition): Likewise.
321 (cp_parser_iteration_statement): Likewise.
322 (cp_parser_jump_statement): Likewise.
323 (cp_parser_mem_initializer): Likewise.
324 (cp_parser_template_argument): Likewise.
325 (cp_parser_parameter_declaration): Likewise.
326 (cp_parser_initializer): Likewise.
327 (cp_parser_throw_expression): Likewise.
328 (cp_parser_attribute_list): Likewise.
329 (cp_parser_simple_cast_expression): Likewise.
330 (cp_parser_functional_cast): Likewise.
331 (cp_parser_late_parsing_default_args): Likewise.
332 (cp_parser_sizeof_operand): Save/restore
333 non_integral_constant_expression_p.
335 2005-01-31 Mike Stump <mrs@apple.com>
337 * parser.c (cp_lexer_new_main): Get the first token, first, before
340 2005-01-31 Mark Mitchell <mark@codesourcery.com>
342 * decl.c (start_decl): Add missing parentheses.
344 2005-01-30 Mark Mitchell <mark@codesourcery.com>
347 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
348 * decl.c (duplicate_decls): Do not discard
349 DECL_IMPLICIT_INSTANTIATION when merging declarations.
350 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
351 variables that do not have DECL_USE_TEMPLATE.
354 * decl.c (grokdeclarator): Refactor code so that qualified names
355 are never allowed as the declarator in a typedef.
358 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
359 builtin declarations.
362 * call.c (convert_like_real): Inline call to
363 dubious_conversion_warnings here.
364 * cp-tree.h (dubious_conversion_warnings): Remove.
365 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
366 setting TREE_NEGATED_INT.
367 * typeck.c (dubious_conversion_warnings): Remove.
370 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
373 2005-01-28 Mark Mitchell <mark@codesourcery.com>
376 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
380 * pt.c (redeclare_class_template): Robustify.
382 2005-01-27 Steven Bosscher <stevenb@suse.de>
384 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
385 instead of SWITCH_EXPR ones.
386 * pt.c (tsubst_expr): Likewise.
387 * semantics.c (begin_switch_stmt, finish_switch_cond,
388 finish_switch_stmt): Likewise.
390 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
393 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
395 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
397 * class.c (abort_fndecl_addr): New variable.
398 (build_vtbl_initializer): If we have a pure virtual function
399 share the abort function's address.
400 Include gt-cp-class.h at the end.
401 * config-lang.in (gtfiles): Add cp/class.c.
403 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
405 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
406 (pp_cxx_function_definition): Make static.
407 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
408 (pp_cxx_function_definition): Likewise.
410 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
412 * name-lookup.c (print_binding_level): Make static.
413 (constructor_name_full): Make static inline.
414 (current_decl_namespace): Make static.
415 * name-lookup.h (constructor_name_full): Remove prototype.
416 (print_binding_level): Likewise.
417 (current_decl_namespace): Likewise.
419 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
421 * decl.h (debug_bindings_indentation): Remove.
423 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
425 * typeck.c: Fix a comment typo.
427 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
430 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
432 (tsubst): Use fold_decl_constant_value in place of a bare call to
433 integral_constant_value.
435 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
437 * typeck.c (more_qualified_p): Remove.
438 * cp-tree.h: Remove the corresponding prototype.
440 2005-01-19 Matt Austern <austern@apple.com>
442 * typeck.c (comptypes): Handle return code from objc_comptypes
445 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
447 * cp-tree.h, name-lookup.h: Remove unused prototypes.
449 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
452 * semantics.c (finish_id_expression): Disable access checking for
453 already lookuped FIELD_DECL.
455 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
457 * decl.c (delete_block): Remove.
458 * cp-tree.h: Remove the corresponding prototype.
460 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
461 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
463 * cp-tree.h: Remove the corresponding prototypes.
465 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
466 cp_update_decl_after_saving, name_p): Remove.
467 * cp-tree.h: Remove the corresponding prototypes.
469 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
472 * semantics.c (finish_asm_stmt): Strip nops off
473 input memory operands.
475 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
477 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
478 typeck2.c: Update copyright.
480 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
482 * class.c (get_enclosing_class): Remove.
483 * cp-tree.h: Remove the corresponding prototypes.
485 * cvt.c (convert_lvalue): Remove.
486 * cp-tree.h: Remove the corresponding prototype.
488 * pt.c (tinst_for_decl): Remove.
489 * cp-tree.h: Remove the corresponding prototypes.
491 * tree.c (hash_chainon): Remove.
492 * cp-tree.h: Remove the corresponding prototypes.
494 2005-01-15 Jakub Jelinek <jakub@redhat.com>
497 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
498 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
500 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
502 * Make-lang.in (cp-warn): Don't append $(WERROR).
504 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
506 * cp-tree.h: Fix a comment typo.
508 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
511 * pt.c (tsubst_qualified_id): Call convert_from_reference.
513 2005-01-06 Mark Mitchell <mark@codesourcery.com>
516 * class.c (add_implicitly_declared_members): Remove dead code.
517 * decl.c (grokfndecl): Add sfk parameter. Use it do set
519 (grokdeclarator): Adjust calls to grokfndecl.
520 * method.c (implicitly_declare_fn): Improve documentation.
521 * parser.c (cp_parser_direct_declarator): Do not consider a
522 function to be a constructor if the containing class was
523 originally anonymous.
525 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
528 * search.c (lookup_field_1): Handle using declaration in
529 class template partial specialization.
531 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
534 * pt.c (push_access_scope): Handle friend defined in class.
535 (pop_access_scope): Likewise.
537 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
540 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
541 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
542 array-new handling code. Use build_x_binary_op.
544 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
547 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
548 * name-lookup.h (push_scope): Return pushed scope, not flag.
549 * name-lookup.c (push_scope): Return scope that should be popped,
551 * decl.c (start_decl): Adjust.
552 (grokfndecl): Adjust scope push and pop.
553 * decl2.c (check_classfn): Likewise.
554 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
555 cp_parser_init_declarator, cp_parser_direct_declarator,
556 cp_parser_class_specifier, cp_parser_class_head,
557 cp_parser_lookup_name,
558 cp_parser_constructor_declarator_p): Likewise.
559 * pt.c (instantiate_class_template,
560 resolve_typename_type): Likewise.
562 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
565 * parser.c (cp_parser_unqualified_id): Do not issue error message
566 for typedef-name as destructor declarator when performing an
567 uncommitted tentative parse.
569 2005-01-01 Steven Bosscher <stevenb@suse.de>
572 * decl.c (finish_function): Fix comment. Annotate the compiler
573 generated return with the current file name and line 0.
575 2004-12-31 Richard Henderson <rth@redhat.com>
578 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
579 * class.c (build_vtable): Don't conditionallize setting it
580 based on DWARF2_DEBUG.
581 (layout_class_type): Set DECL_IGNORED_P.
582 * decl2.c (get_guard): Likewise.
583 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
584 * tree.c (build_local_temp): Likewise.
586 2004-12-30 Mark Mitchell <mark@codesourcery.com>
588 * cp-tree.h (cp_declarator): Split "name" field into
589 qualifying_scope and unqualified_name.
590 * decl.c (get_scope_of_declarator): Adjust accordingly.
591 (grokdeclarator): Likewise.
592 * decl2.c (grokfield): Likewise, and adjust call to
594 * name-lookup.c (do_class_using_decl): Split "decl" into
595 "scope" and "name". Remove unnecessary code.
596 * name-lookup.h (do_class_using_decl): Adjust declaration.
597 * parser.c (make_id_declarator): Split "id" into qualifying_scope
598 and unqualified_name.
599 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
600 (cp_parser_direct_declarator): Adjust to handle the fact that
601 cp_parser_declarator_id no longer returns a SCOPE_REF.
602 (cp_parser_direct_declarator): Likewise.
603 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
605 (cp_parser_member_declaration): Adjust call to make_id_declarator.
606 (cp_parser_check_declarator_template_parameters): Do not expect a
609 * decl.c (duplicate_decls): Call ggc_free on declarations we will
610 not be needing any longer.
613 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
615 2004-12-28 Richard Henderson <rth@redhat.com>
618 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
619 constraints. Mark memory inputs addressable.
621 2004-12-27 Jason Merrill <jason@redhat.com>
623 * decl.c (expand_static_init): Don't use shortcut if
624 targetm.relaxed_ordering.
626 2004-12-27 Mark Mitchell <mark@codesourcery.com>
629 * decl.c (check_tag_decl): Robustify.
631 2004-12-23 Mark Mitchell <mark@codesourcery.com>
634 * parser.c (cp_parser_error): Issue better messages about
635 #pragma in locations where it is not permitted.
638 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
640 * cvt.c (convert_to_void): Fix typo in comment.
642 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
645 * pt.c (check_explicit_specialization): Use the argument list from
646 the definition in a template function specialization definition.
648 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
651 * pt.c (check_explicit_specialization): Use special logic to validate
652 befriended specializations.
654 2004-12-22 Mark Mitchell <mark@codesourcery.com>
656 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
659 * call.c (build_this): In templates, do not bother with
661 * typeck.c (unary_complex_lvalue): In a template, always refuse
665 * cp-gimplify.c (cp_genericize): Relax assertion.
668 * cvt.c (convert_to_void): Warn about unused values.
671 * rtti.c (emit_support_tinfos): On systems without weak symbols,
672 emit the runtime library type-info objects as non-COMDAT.
674 2004-12-21 Mark Mitchell <mark@codesourcery.com>
677 * call.c (convert_like_real): Do not permit the use of a copy
678 constructor to copy a packed field.
681 * decl.c (grokdeclarator): Return error_mark_node, not
682 void_type_node, to indicate errors.
683 * parser.c (cp_parser_template_parameter_list): Robustify.
684 (cp_parser_template_parameter): Likewise.
687 * tree.c (cp_tree_equal): Handle OVERLOAD.
689 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
691 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
692 * name-lookup.c (pushdecl_class_level): Likewise.
694 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
696 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
698 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
701 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
702 check to see if contains the pointer. Insert the statement before
705 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
708 * decl.c (check_initializer): Check string initializer of array is
710 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
711 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
712 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
714 * cp-tree.def (TEMPLATE_TYPE_PARM,
715 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
716 for better code efficiency.
717 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
718 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
719 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
720 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
721 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
722 TYPE_PTROBV_P): Likewise.
725 * method.c (do_build_copy_constructor): Refactor. Don't const
726 qualify a mutable field.
727 (do_build_assign_ref): Likewise.
729 2004-12-20 Matt Austern <austern@apple.com>
732 * decl.c (make_rtl_for_nonlocal_decl): Use
733 set_builtin_user_assembler_name.
735 2004-12-19 Mark Mitchell <mark@codesourcery.com>
737 * cp-tree.h (note_decl_for_pch): New function.
738 * class.c (build_clone): Call note_decl_for_pch.
739 * semantics.c (finish_member_declaration): Likewise.
740 (note_decl_for_pch): New function.
742 2004-12-17 Steven Bosscher <stevenb@suse.de>
744 * init.c (build_zero_init): max_index is the number of
747 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
750 * class.c (add_method): Do not push conversion operators into a
753 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
754 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
756 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
759 * cp-tree.h (integral_constant_value): Declare.
760 * call.c (null_ptr_cst_p): Use integral_constant_value, not
762 (convert_like_real): Likewise.
763 * class.c (check_bitfield_decl): Likewise.
764 * cvt.c (ocp_convert): Likewise.
765 (convert): Remove unnecessary decl_constant_value call.
766 * decl.c (compute_array_index_type): Use integral_constant_value,
767 not decl_constant_value.
768 (build_enumerator): Likewise.
769 * decl2.c (grokfield): Likewise.
770 * init.c (decl_constant_value): Simplify.
771 (integral_constant_value): New.
772 * pt.c (fold_decl_constant_value): Use integral_constant_value,
773 remove subsequent check.
774 (tsubst): Use integral_constant_value, not decl_constant_value.
775 (tsubst_copy, unify): Likewise.
776 * typeck.c (decay_conversion): Likewise.
777 (build_compound_expr): Remove unnecessary decl_constant_value
779 (build_static_cast_1, build_reinterpret_cast_1):
780 (convert_for_assignment): Remove comment about not calling
783 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
786 * pt.c (instantiate_class_template): Set input_location for
788 (tsubst_friend_function): Don't set input_location here.
789 Make sure the context is complete if necessary.
791 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
794 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
797 2004-12-14 Mark Mitchell <mark@codesourcery.com>
800 * decl.c (make_typename_type): Do not handle namespace-scoped
802 (tag_name): Handle typename_type.
803 (check_elaborated_type_specifier): Handle typenames.
804 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
806 (cp_parser_elaborated_type_specifier): Use
807 cp_parser_diagnose_invalid_type_name.
809 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
812 * init.c (build_zero_init): If the max_index is 0, there is no
813 need to create a RANGE_EXPR.
815 2004-12-14 Mark Mitchell <mark@codesourcery.com>
818 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
820 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
823 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
824 REFERENCE_REF_P is dereferencing a reference type.
825 * typeck.c (build_static_cast): Convert from reference even in a
827 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
829 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
831 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
832 (cp_parser_name_lookup_error): Use it.
833 (cp_parser_check_for_invalid_template_id): Likewise.
834 (cp_parser_skip_to_closing_parenthesis): Likewise.
835 (cp_parser_nested_name_specifier_opt): Likewise.
836 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
837 (cp_parser_parameter_declaration_list): Likewise.
838 (cp_parser_parameter_declaration): Likewise.
839 (cp_parser_template_name): Let cp_parser_simulate_error perform
841 (cp_parser_committed_to_tentative_parse): Remove.
843 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
846 * class.c (build_base_path): Convert the zero constant to the correct
849 2004-12-13 Mark Mitchell <mark@codesourcery.com>
852 * class.c (layout_class_type): Determine the visibility of static
855 2004-12-12 Roger Sayle <roger@eyesopen.com>
858 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
859 condition is a constant and the unexecuted clause is empty.
861 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
864 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
866 2004-12-09 Matt Austern <austern@apple.com>
869 * name-lookup.c (do_nonmember_using_decl): A real function
870 declaration takes precedence over an anticipated declaration.
872 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
874 * parser.c (cp_parser_member_declaration): Fix comment typo.
876 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
879 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
882 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
885 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
887 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
890 * init.c (build_zero_init): Build a RANGE_EXPR for an array
893 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
895 * typeck.c: Remove DOS line endings.
897 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
900 * decl.c (lookup_and_check_tag): Diagnose nested class with
901 the same name as enclosing class.
903 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
906 * cp-tree.h (REFERENCE_REF_P): New.
907 (CPTI_TYPE_INFO_TYPE): Rename to ...
908 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
909 (CPTI_TYPE_INFO_REF_TYPE): Remove.
910 (type_info_type_node): Rename to ...
911 (const_type_info_type_node): ... here.
912 (type_info_ref_type): Remove.
913 * call.c (build_user_type_conversion): Reformat.
914 (resolve_args): Do not convert_from_reference.
915 (build_object_call): Call convert_from_reference.
916 (prep_operand): Do not convert_from_reference.
917 (build_new_method_call): Likewise.
918 * class.c (build_vfield_ref): Likewise.
919 * cvt.c (convert_to_reference): Likewise.
920 (convert_from_reference): Build INDIRECT_REF here, not with
922 (convert_force): Do not convert_from_reference.
923 (build_expr_type_conversion): Likewise.
924 * decl.c (grok_reference_init): Likewise.
925 * decl2.c (delete_sanity): Likewise.
926 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
927 * init.c (build_dtor_call): Do not convert_from_reference.
928 * parser.c (cp_parser_template_argument): Unwrap indirected
929 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
930 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
931 convert_from_reference, if indicated.
932 <case CALL_EXPR>: Do not convert_from_reference.
933 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
934 (tsubst_initializer_list): Do not convert_from_reference.
935 * rtti.c (init_rtti_processing): Adjust node creation.
936 (throw_bad_typeid): Use const_type_info_type_node.
937 Do not convert_from_reference.
938 (typeid_ok_p): Use const_type_info_type_node.
939 (build_typeid, get_typeid): Always return type_info typed node.
940 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
941 * semantics.c (finish_stmt_expr_expr): Do not
942 convert_from_reference.
943 (finish_id_expression): Convert_from_reference as appropriate.
944 * typeck.c (decay_conversion): Do not convert_from_reference.
945 (finish_class_member_access_expr): Likewise.
946 (build_indirect_ref): Use POINTER_TYPE_P.
947 (convert_arguments): Do not convert_from_reference.
948 (build_modify_expr): Likewise.
949 (convert_for_initialization): Likewise.
950 * typeck2.c (build_x_arrow): Likewise.
952 2004-12-07 Ziemowit Laski <zlaski@apple.com>
954 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
955 field to 'objc_info'.
957 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
959 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
961 2004-12-07 Roger Sayle <roger@eyesopen.com>
963 * name-lookup.c (leave_scope): We only need to update
964 class_binding_level when leaving a class scope.
966 2004-12-06 Ziemowit Laski <zlaski@apple.com>
968 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
970 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
972 PR c++/17011, c++/17971
973 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
975 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
976 error_mark_node after member substitution.
977 * semantics.c (finish_id_expression): Call
978 finish_non_static_data_member for non-dependent FIELD_DECL.
980 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
983 * decl.c (grokdeclarator): Make sure class in pointer to member is
986 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
989 * parser.c (cp_parser_new_type_id): Move array size expression
991 * init.c (build_new): ... to here.
993 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
996 * parser.c (cp_parser_class_head): Return NULL_TREE when
997 push_template_decl fails. Update comment.
999 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1001 PR c++/15664, c++/18276
1002 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
1003 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1005 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1008 * parser.c (cp_parser_type_specifier): Catch template declaration
1011 2004-12-01 Matt Austern <austern@apple.com>
1013 * name-lookup.c (namespace_binding): Omit alias check for global
1016 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
1019 * parser.c (cp_parser_class_name): Check decl's type is not
1023 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1024 derived to base conversion when checking constructor
1026 (implicit_conversion): Pass FLAGS to standard_conversion.
1027 (check_constructir_callable): Disallow conversion functions.
1029 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
1031 * parser.c: Fix comment typos.
1033 2004-11-27 Mark Mitchell <mark@codesourcery.com>
1036 * parser.c (cp_parser_check_for_definition_in_return_type): Take
1037 the defined type as a parameter, and inform the user about the
1038 possibility of a missing semicolon.
1039 (cp_parser_explicit_instantiation): Adjust call to
1040 cp_parser_check_for_definition_in_return_type.
1041 (cp_parser_init_declarator): Likewise.
1042 (cp_parser_member_declaration): Likewise.
1045 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1046 typename from comments.
1047 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1048 (TYPENAME_IS_CLASS_P): Likewise.
1049 (make_typename_type): Change prototype.
1050 * decl.c (struct_typename_info): New type.
1051 (typename_compare): Expect the second argument to be a
1052 typename_info, not a tree.
1053 (build_typename_type): Add tag_type parameter. Do not create a
1054 new type until necessary.
1055 (make_typename_type): Add tag_type parameter.
1056 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1058 * friend.c (make_friend_class): Adjust call to make_typename_type.
1059 * parser.c (cp_parser_make_typename_type): Likewise.
1060 (cp_parser_primary_expression): Adjust call to
1061 cp_parser_lookup_name.
1062 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1063 (cp_parser_class_or_namespace_name): Likewise.
1064 (cp_parser_postfix_expression): Adjust calls to
1066 (cp_parser_mem_initializer_id): Adjust calls to
1067 cp_parser_class_name.
1068 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1069 (cp_parser_template_name): Likewise.
1070 (cp_parser_template_argument): Likewise.
1071 (cp_parser_type_name): Adjust call to cp_parser_class_name.
1072 (cp_parser_elaborated_type_specifier): Adjust calls to
1073 make_typename_type and cp_parser_lookup_name.
1074 (cp_parser_namespace_name): Likewise.
1075 (cp_parser_class_name): Replace type_p parameter with tag_type.
1076 Adjust calls to make_typename_type and cp_parser_lookup_name.
1077 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1078 (cp_parser_base_specifier): Likewise.
1079 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1080 Adjust calls to make_typename_type and lookup_qualified_name.
1081 (cp_parser_lookup_name_simple): Adjust call to
1082 cp_parser_lookup_name.
1083 (cp_parser_constructor_declarator_p): Adjust call to
1084 cp_parser_class_name.
1085 * pt.c (convert_template_argument): Adjust all to
1087 (tsubst_decl): Do not pre-substitute the type of the declaration.
1088 (tsubst): Hand off declarations more quickly. Adjust call to
1092 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1094 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
1097 * Make-lang.in (cp/decl2.o): Update dependencies.
1098 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1100 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1103 * name-lookup.c (pushtag): Change return type to tree.
1104 * cp-tree.h (pushtag): Adjust declaration.
1105 * decl.c (xref_tag, start_enum): Use return value of pushtag.
1106 * pt.c (push_template_decl_real): Return immediately if
1107 pushdecl_namespace_level returns error_mark_node.
1109 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1111 * pt.c: Fix a comment typo.
1113 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1115 Friend class name lookup 4/n
1116 * class.c (pushclass): Don't call cxx_remember_type_decls.
1117 * cp-tree.h (clear_anon_tags): Remove declaration.
1118 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
1119 * name-lookup.c (binding_entry_free, binding_table_free): Comment
1121 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
1122 binding_table_remove_anonymous_types, cxx_remember_type_decls,
1123 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1124 lookup_tag_reverse): Remove
1125 (begin_scope, leave_scope, kept_level_p, print_binding_level):
1126 Don't use type_decls field in cp_binding_level.
1127 (maybe_process_template_type_declaration, pushtag): Set
1128 CLASSTYPE_NESTED_UTDS directly.
1129 * name-lookup.h (binding_table_remove_anonymous_types,
1130 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1132 (cp_binding_level): Remove type_decls field.
1134 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
1136 * typeck.c: Fix a comment typo.
1138 2004-11-25 Mark Mitchell <mark@codesourcery.com>
1141 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1142 unknown_type as non matching. Tidy up.
1143 * pt.c (build_non_dependent_expr): Do not build a
1144 NON_DEPENDENT_EXPR for a VAR_DECL.
1147 * cp-tree.h (lvalue_or_else): Remove declaration.
1148 * tree.c (lvalue_or_else): Remove.
1149 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1150 (build_modify_expr): Likewise.
1153 * decl.c (duplicate_decls): Return error_mark_node on error, as
1157 * decl.c (grokvardecl): Keep track of whether or not a there was
1158 explicit qualification.
1159 * name-lookup.c (set_decl_namespace): Complain about explicit
1160 qualification of a name within its own namespace.
1163 * typeck.c (check_return_expr): Robustify.
1165 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1167 Friend class name lookup 3/n, PR c++/3332
1168 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1169 (lookup_type_scope): Don't deal with name from user declaration
1171 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1172 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1175 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1177 Friend class name lookup 2/n, PR c++/14513, c++/15410
1178 * name-lookup.c (lookup_name_real): Simplify.
1179 (lookup_type_scope): Add SCOPE parameter. Handle friend class
1181 * name-lookup.h (tag_scope): New enum type.
1182 (lookup_type_scope): Adjust declaration.
1183 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1184 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1185 (start_enum): Likewise. Add assertion test that NAME is
1186 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
1188 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1189 * parser.c (cp_parser_elaborated_type_specifier,
1190 cp_parser_class_head): Adjust call to xref_tag.
1191 * pt.c (lookup_template_class, instantiate_class_template):
1193 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1194 tinfo_base_init, emit_support_tinfos): Likewise.
1196 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1198 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1200 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1203 * name-lookup.c (supplement_binding): Do not allow typedefs to be
1204 redefined in class scope.
1207 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1208 redefinitions of builtin types other that "bool" or "wchar_t".
1210 2004-11-24 Steven Bosscher <stevenb@suse.de>
1212 * decl.c (cxx_init_decl_processing): Don't clear
1213 flag_inline_functions.
1215 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1217 * pt.c (tsubst_function_type): Do not permit function types which
1218 return arrays or functions.
1221 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1224 * cp-tree.h (CTOR_NAME): Remove.
1225 (DTOR_NAME): Remove.
1226 * decl.c (initialize_predefined_identifiers): Add spaces to the
1227 end of constructor and destructor names.
1229 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1232 * decl.c (start_decl): Check for invalid specialization headers.
1234 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
1238 * call.c (standard_conversion): Move check for conversions between
1240 * typeck.c (ptr_reasonably_similar): ... here.
1242 2004-11-23 Ben Elliston <bje@au.ibm.com>
1244 * cp-tree.h (context_as_string): Remove extern.
1245 * error.c (context_as_string): Remove.
1247 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
1248 * lex.c (cp_type_qual_from_rid): Remove.
1250 * cp-tree.h (do_poplevel): Remove extern.
1251 (check_multiple_declarators): Likewise.
1252 * semantics.c (do_poplevel): Make static.
1253 (check_multiple_declarators): Remove.
1255 * cp-tree.h (check_final_overrider): Remove extern.
1256 * search.c (check_final_overrider): Make static.
1258 * cp-tree.h (build_artificial_parm): Remove extern.
1259 * decl2.c (build_artificial_parm): Make static.
1261 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1264 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
1265 Make sure the result is always a rvalue.
1267 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1269 * decl.c (start_preparsed_function): Call check_function_type even
1271 (require_complete_types_for_parms): Skip dependent types.
1272 (check_function_type): Likewise.
1274 2004-11-16 Steven Bosscher <stevenb@suse.de>
1276 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
1277 * search.c: Don't include it.
1279 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
1281 * cp-gimplify.c: Include pointer-set.h
1282 (cp_genericize_r): Use pointer_sets instead of a hashtable.
1283 Also instert the new statement for CLEANUP_STMT.
1284 (cp_genericize): Use pointer_sets instead of a hashtable.
1285 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
1287 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1289 Friend class name lookup 1/n, PR c++/18471
1290 * decl.c (lookup_and_check_tag): New function.
1291 (xref_tag, start_enum): Use it.
1292 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
1293 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
1295 * name-lookup.c (lookup_name_current_level): Rename to ...
1296 (lookup_name_innermost_nonclass_level): ... this.
1297 (lookup_type_scope): New function.
1298 * name-lookup.h (lookup_name_current_level): Rename to ...
1299 (lookup_name_innermost_nonclass_level): ... this.
1300 (lookup_type_scope): Add declaration.
1302 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1305 * pt.c (coerce_template_parms): Only emit error message about
1306 invalid template argument when TF_ERROR.
1308 2004-11-12 Mark Mitchell <mark@codesourcery.com>
1311 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
1312 error_mark_node to indicate errors.
1315 * parser.c (cp_parser_direct_declarator): Disallow non-constant
1316 array bounds when not inside a function.
1319 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
1320 unqualified name resolves to a member function.
1323 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
1324 derived class correctly.
1326 * decl2.c (import_export_decl): Fix typo in comment.
1327 * tree.c (pod_type_p): Likewise.
1329 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
1331 * typeck.c (cxx_mark_addressable): Add braces around the first if.
1333 2004-11-10 Adam Nemet <anemet@lnxw.com>
1336 * typeck.c (cxx_mark_addressable): Issue an error if address of an
1337 explicit register variable is requested.
1339 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
1342 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
1343 (struct lang_decl_flags): Add thunk_p flag.
1344 (struct lang_decl): Remove separate fixed_offset. Place
1345 cloned_function and fixed_offset into union.
1346 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
1347 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
1348 (THUNK_FIXED_OFFSET): Adjust.
1349 * method.c (make_thunk): Adjust.
1351 2004-11-09 Mark Mitchell <mark@codesourcery.com>
1354 * init.c (build_new_1): Handle parenthesized type-ids that name an
1357 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1359 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
1360 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
1361 quoting in diagnostics.
1362 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
1363 quoting in printf format.
1364 * decl.c (duplicate_decls, start_decl): Use %qD instead of
1367 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1369 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
1370 search.c, typeck2.c: Fix comment formatting.
1372 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
1374 PR tree-optimization/18184
1375 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
1376 of different modes or alias-all flags as equivalent.
1377 * typeck.c (comptypes): Likewise.
1379 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1382 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
1383 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
1384 TYPE_REFFN_P): Document.
1385 (fold_decl_constant_value): New prototype.
1386 * pt.c (convert_nontype_argument_function): Rewrite and extract
1388 (fold_decl_constant_value, convert_nontype_argument_function): New.
1389 (lookup_template_class): Add comment about useless double call.
1390 * mangle.c (write_expression): Strip conversions before lowering
1392 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1393 enum to enum conversion.
1395 2004-11-02 Mark Mitchell <mark@codesourcery.com>
1398 * parser.c (cp_parser_type_parameter): Robustify.
1401 * parser.c (cp_parser_single_declaration): Disallow template
1405 * typeck.c (build_const_cast): Use error_operand_p.
1407 2004-11-02 Ziemowit Laski <zlaski@apple.com>
1409 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1410 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1411 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1413 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1415 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1417 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
1420 * search.c (check_final_overrider): Deprecate gnu covariant extension.
1422 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1424 Convert diagnostics to use quoting flag q 9/n
1425 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
1426 get_delta_difference): Use new quotation style.
1427 * repo.c (reopen_repo_file_for_write): Likewise.
1428 * pt.c (do_type_instantiation): Likewise.
1429 * parser.c (cp_parser_diagnose_invalid_type_name):
1430 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
1431 * error.c (cp_print_error_function,
1432 print_instantiation_full_context): Likewise.
1433 * decl.c (define_label, grok_reference_init,
1434 maybe_deduce_size_from_array_init, revert_static_member_fn):
1435 * decl2.c (check_classfn): Likewise.
1436 * class.c (add_method, check_field_decls, layout_class_type,
1437 resolve_address_of_overloaded_function): Likewise.
1438 * call.c (build_x_va_arg, build_over_call): Likewise.
1440 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1442 Convert diagnostics to use quoting flag q 8/n
1443 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
1444 convert_to_reference, ocp_convert, convert_to_void
1445 cp_convert_to_pointer): Use new quotation style.
1447 2004-10-31 Mark Mitchell <mark@codesourcery.com>
1450 * typeck2.c (store_init_value): Use split_nonconstant_init even
1451 for types that require construction.
1453 1004-10-28 Matt Austern <austern@apple.com>
1456 * cp-tree.h (class_key_or_enum_as_string): Declare.
1457 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1458 and remove static qualifier.
1459 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1460 union/enum declaration.
1462 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
1464 * pt.c: Fix a comment typo.
1466 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
1468 * typeck.c (composite_pointer_type): Remove comment about DR 195.
1469 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1470 warning when being pedantic.
1471 (build_reinterpet_cast, build_c_cast): Adjust.
1473 2004-10-29 Mark Mitchell <mark@codesourcery.com>
1476 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1477 appear in a constructor/destructor that will be cloned.
1479 1004-10-28 Matt Austern <austern@apple.com>
1482 * decl.c (finish_enum): Handle packed attribute.
1483 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1485 2004-10-28 Mark Mitchell <mark@codesourcery.com>
1488 * pt.c (instantiate_class_template): Increment
1489 processing_template_decl when substituting into a member class
1492 2004-10-27 Mark Mitchell <mark@codesourcery.com>
1495 * call.c (convert_like_real): Fix formatting.
1496 (initialize_reference): When binding a temporary to a base class,
1497 ensure that the nominal copy made is to the derived class, not the
1501 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1504 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1506 * decl.c (bad_specifiers): Move the q after the %.
1508 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1510 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1513 2004-10-26 Mark Mitchell <mark@codesourcery.com>
1515 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1516 * search.c (current_scope): Fix prototype.
1519 * search.c (current_scope): Return the innermost non-block scope,
1520 not the innermost non-block, non-namespace scope.
1521 (at_namespace_scope_p): Adjust accordingly.
1522 (dfs_accessible_post): Do not pass namespaces to is_friend.
1523 (dfs_walk_once_accessible_r): Likewise.
1524 * decl.c (grokvardecl): Adjust call to current_scope.
1525 (build_enumerator): Likewise.
1526 * parser.c (cp_parser_using_declaration): Likewise.
1527 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1529 (cp_parser_class_head): Adjust call to current_scope.
1530 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1534 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1535 their underlying values.
1538 * typeck.c (build_binary_op): Honor build_type, even when in a
1541 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
1543 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1544 padding token checking.
1546 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
1549 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1550 layout_type as it is already done by create_array_type_for_decl.
1552 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
1555 * parser.c (eof_token): Make const, correctly initialize rid and
1557 (struct cp_lexer): Replace buffer_end pointer with buffer_length
1559 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
1561 (cp_lexer_new_from_tokens): Adjust.
1562 (cp_lexer_grow_buffer): Remove.
1563 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1564 cp_lexer_purge_token): Add const casts.
1566 2004-10-21 Mark Mitchell <mark@codesourcery.com>
1570 * cp-tree.h (convert_to_base): Change prototype.
1571 (build_ptrmemfunc): Likewise.
1572 (convert_ptrmem): New function.
1573 * call.c (struct conversion): Adjust documentation for base_p.
1574 (standard_conversion): Set base_p for ck_pmem conversions as
1576 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1578 * class.c (convert_to_base): Handle both pointers and objects.
1579 Add nonnull parameter.
1580 (build_vfield_ref): Adjust call to convert_to_base.
1581 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1582 (convert_force): Likewise.
1583 * typeck.c (build_unary_op): Likewise.
1584 (convert_ptrmem): New function.
1585 (build_static_cast_1): Use it.
1586 (build_reinterpret_cast): Allow conversions to vector types.
1587 (get_delta_difference): Add c_cast_p parameter.
1588 (build_ptrmemfunc): Likewise. Adjust calls to
1589 get_delta_difference.
1591 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
1594 * error.c (cp_error_at): Output the context as it might be
1595 different file as the other location.
1597 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
1599 * typeck.c: Fix a comment typo.
1601 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1604 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1605 * cp-tree.h (make_unbound_class_template): Adjust prototype.
1606 * parser.c (cp_parser_lookup_name): Adjust call to
1607 make_unbound_class_template.
1608 (cp_parser_single_declaration): Handle member class of class
1609 template as template friend parsing correctly.
1610 * friend.c (is_friend): Call is_specialization_of_friend for
1611 template friend class.
1612 (make_friend_class): Handle member class of class template as
1614 * pt.c (is_specialization_of_friend): Likewise.
1615 (instantiate_class_template): Likewise.
1616 (tsubst): Adjust call to make_unbound_class_template.
1618 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1620 * typeck.c (composite_pointer_type): Add comment about DR 195
1621 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1622 Allow function pointer conversions that DR195 suggests.
1623 (build_reinterpret_cast, build_c_cast): Update
1624 build_reinterpret_cast_1 calls.
1626 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
1628 * call.c, typeck.c: Fix comment typos.
1630 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1632 * parser.c (cp_token_position): New typedef. Define VEC thereof.
1633 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1634 next_token and last_token cp_token_position. Make saved_tokens a
1635 VEC(cp_token_position).
1636 (eof_token): New static variable.
1637 (CP_SAVED_TOKENS_SIZE): Rename to ...
1638 (CP_SAVED_TOKEN_STACK): ... here.
1639 (cp_lexer_new_main): Adjust main lexer creation and buffer
1641 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1642 to the parent buffer. Do not append eof token.
1643 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1645 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1646 (cp_lexer_token_position, cp_lexer_token_at): New.
1647 (cp_lexer_saving_tokens): Adjust. Make inline.
1648 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1649 (cp_lexer_peek_token_emit_debug_info): Fold into ...
1650 (cp_lexer_peek_token): ... here.
1651 (cp_lexer_peek_nth_token): Don't peek past EOF.
1652 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1654 (cp_lexer_purge_token): Adjust eof setting.
1655 (cp_lexer_purge_tokens_after): Likewise.
1656 (cp_lexer_save_tokens): Push next_token directly.
1657 (cp_lexer_commit_tokens): Adjust.
1658 (cp_lexer_rollback_tokens): Pop next_token directly.
1659 (cp_parser_check_for_invalid_template_id): Adjust token purging.
1660 (cp_parser_translation_unit): Do not consume the EOF.
1661 (cp_parser_nested_name_specifier_opt): Adjust token purging.
1662 (cp_parser_template_id, cp_parser_template_name): Likewise.
1664 2004-10-19 Mark Mitchell <mark@codesourcery.com>
1667 * call.c (struct conversion): Add base_p.
1668 (convert_like): Add c_cast_p argument.
1669 (convert_like_with_conversion): Likewise.
1670 (build_conv): Clear base_p.
1671 (standard_conversion): Set it, for derived-to-base conversions.
1672 (convert_like_real): Add c_cast_p parameter. Handle pointer
1673 conversions directly rather than relying on ocp_convert.
1674 (perform_direct_initialization_if_possible): Add c_cast_p
1676 * cp-tree.h (perform_direct_initialization_if_possible): Change
1678 (convert_member_func_to_ptr): New function.
1679 * typeck.c (check_for_casting_away_constness): Add diag_fn
1681 (build_static_cast_1): New function, split out from ...
1682 (build_static_cast): ... here. Use build_static_cast_1.
1683 (build_reinterpret_cast_1): New function, split out from ...
1684 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
1685 (build_const_cast_1): New function, split out from ...
1686 (build_const_cast): ... here. Use build_const_cast_1.
1687 (build_c_cast): Rewrite to use build_const_cast_1,
1688 build_static_cast_1, and build_reinterpret_cast_1.
1689 (convert_member_func_to_ptr): New function.
1691 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
1694 * parser.c (enum cp_parser_prec): Give relational expressions
1695 a higher precedence than equality expressions.
1697 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
1699 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
1700 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
1701 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
1702 (enum base_access): Reorganize.
1703 (accessible_base_p, accessible_p): Add consider_local_p parameter.
1704 * call.c (standard_conversion): Update comment about
1706 (enforce_access): Adjust accessible_p call.
1707 (build_over_call): Adjust accessible_base_p call.
1708 * class.c (convert_to_base): Adjust lookup_base call.
1709 (build_vtbl_ref_1): Likewise.
1710 (warn_about_ambiguous_bases): Likewise. Add early exit.
1711 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
1712 * search.c (accessible_base_p): Add consider_local_p parameter.
1713 (lookup_base): Pass consider_local_p to accessible_base_p call.
1714 (friend_accessible_p): Check whether scope is a class member.
1715 Remove unnecessary class template check.
1716 (accessible_p): Add consider_local_p parameter. Use it.
1717 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
1718 * tree.c (maybe_dummy_object): Likewise.
1719 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
1720 (build_class_member_access_expr): Adjust lookup_base call.
1721 * typeck2.c (binfo_or_else): Likewise.
1722 * rtti.c (build_dynamic_cast_1): Access can consider friendship
1725 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1728 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
1730 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1733 * parser.c (cp_parser_parenthesized_expression_list): Fold
1734 non-dependent expressions in attribute lists.
1736 2004-10-15 Mark Mitchell <mark@codesourcery.com>
1739 * decl.c (declare_global_var): Use the return value from pushdecl.
1742 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
1743 type names if we have already found a valid type.
1744 (cp_parser_member_declaration): Likewise.
1747 * parser.c (cp_parser_member_specification_opt): Handle
1750 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1752 * dump.c, g++spec.c, repo.c: Update copyright.
1754 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1756 * decl.c: Fix a comment typo.
1758 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1761 * name-lookup.c (parse_using_directive): If we have a
1762 error_mark_node, do not set the decl namespace associations
1765 2004-10-14 Mark Mitchell <mark@codesourcery.com>
1768 * decl.c (cp_finish_decl): Do not call expand_static_init more
1769 than once for a single variable.
1771 2004-10-14 Matt Austern <austern@apple.com>
1773 * Make-lang.in (pt.o): depends on pointer-set.h
1774 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
1775 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
1776 (for_each_template_parm): Convert from htab_t to pointer_set_t.
1777 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
1779 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1782 * semantics.c (finish_for_expr): Convert expression to void
1783 so that we don't create temporaries for a?b:c.
1785 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
1787 * search.c: Fix a comment typo.
1789 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
1791 * class.c (dfs_modify_vtables): Simplify condition. Return
1792 dfs_skip_bases as appropriate.
1793 (modify_all_vtables): Walk in pre-order.
1794 * search.c (dfs_walk_all, dfs_walk_once_r,
1795 dfs_walk_once_accessible_r): Assert post order function never
1796 returns dfs_skip_bases.
1798 * search.c (struct lookup_base_data_s): New.
1799 (lookup_base_r): Replace with ...
1800 (dfs_lookup_base): ... this.
1801 (lookup_base): Use dfs_walk_all.
1803 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
1805 * search.c: Fix comment typos.
1807 2004-10-11 Mark Mitchell <mark@codesourcery.com>
1810 * parser.c (cp_parser_declarator): Add member_p parameter.
1811 (cp_parser_condition): Adjust calls to cp_parser_declarator.
1812 (cp_parser_explicit_instantiation): Likewise.
1813 (cp_parser_init_declarator): Likewise.
1814 (cp_parser_direct_declarator): Add member_p parameter. Do not
1815 parse tentatively when parsing the parameters to a member.
1816 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1817 (cp_parser_parameter_declaration): Likewise.
1818 (cp_parser_member_declaration): Likewise.
1819 (cp_parser_exception_declaration): Likewise.
1822 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1823 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1824 for members of partial or explicit specializations.
1827 * decl2.c (finish_anon_union): Robustify.
1829 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
1831 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1832 (dcast_base_hint): ... here.
1833 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1834 * search.c (struct dcast_data_s): New.
1835 (dynamic_cast_base_recurse): Remove. Replace with ...
1836 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1837 (get_dynamic_cast_base_type): Rename to ...
1838 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
1839 (accessible_r): Remove.
1840 (dfs_accessible_post): New, broken out of accessible_r.
1841 (accessible_p): Use dfs_walk_once_accessible.
1842 (dfs_walk_once_accessible_r): New. From accessible_r.
1843 (dfs_walk_once_accessible): New. From acessible_p.
1845 * cp-tree.h (SAME_BINFO_TYPE_P): New.
1846 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1848 (convert_to_base_statically, determine_primary_bases,
1849 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1850 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1851 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1852 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1853 * init.c (expand_member_init): Likewise.
1854 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1855 binfo_via_virtual, copied_binfo, binfo_for_vbase,
1856 original_binfo): Likewise.
1857 * tree.c (copy_binfo): Likewise.
1859 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
1861 * semantics.c: Fix comment typos.
1863 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1868 * semantics.c (maybe_cleanup_point_expr): Call
1869 fold_build_cleanup_point_expr.
1870 (maybe_cleanup_point_expr_void): New function.
1871 (add_decl_expr): Call maybe_cleanup_point_expr_void.
1872 (finish_expr_stmt): Likewise.
1873 (finish_return_stmt): Likewise.
1874 (finish_for_expr): Likewise.
1875 (finish_asm_stmt): Likewise.
1876 * typeck.c (condition_conversion): Call
1877 fold_build_cleanup_point_expr.
1879 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1882 * semantics.c (add_decl_expr): If the decl has a size which
1883 has side effects then the decl expression needs a cleanup point.
1885 2004-10-10 Mark Mitchell <mark@codesourcery.com>
1888 * decl.c (grokdeclarator): Robustify error-recovery on invalid
1891 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1893 Convert diagnostics to use quoting flag q 7/n
1894 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1895 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
1896 string_conv_p, build_class_member_access_expr,
1897 build_class_member_access_expr, lookup_destructor,
1898 finish_class_member_access_expr, build_indirect_ref,
1899 get_member_function_from_ptrfunc, build_function_call,
1900 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
1901 check_for_casting_away_constness, build_static_cast,
1902 build_reinterpret_cast, build_const_cast, build_c_cast,
1903 build_modify_expr, get_delta_difference, build_ptrmemfunc,
1904 dubious_conversion_warnings, convert_for_assignment,
1905 convert_for_initialization,
1906 maybe_warn_about_returning_address_of_local, check_return_expr):
1909 * typeck2.c (error_not_base_type, readonly_error,
1910 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
1911 store_init_value, digest_init, build_x_arrow,
1912 build_m_component_ref, require_complete_eh_spec_types): Likewise.
1914 * tree.c (cp_build_qualified_type_real,
1915 handle_java_interface_attribute, handle_init_priority_attribute):
1918 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
1919 finish_pseudo_destructor_expr,
1920 check_template_template_default_arg, begin_class_definition,
1921 finish_base_specifier, qualified_name_lookup_error,
1922 finish_id_expression, finish_typeof): Likewise.
1924 * search.c (lookup_base, check_final_overrider,
1925 look_for_overrides_r): Likewise.
1927 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1929 2004-10-09 Mark Mitchell <mark@codesourcery.com>
1932 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1936 * init.c (build_new): Correct comments.
1937 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1941 * parser.c (cp_parser_postfix_dot_deref_expression): If the
1942 pseduo-destructor-name production does not work, fall back to the
1943 ordinary production.
1946 * tree.c (cp_tree_equal): Handle a BASELINK.
1949 * cp-tree.h (check_var_type): New function.
1950 * decl.c (check_var_type): New function, split out from ...
1951 (grokdeclarator): ... here.
1952 * pt.c (tsubst_decl): Use check_var_type.
1955 * decl.c (grokdeclarator): Disallow declarations of operators as
1958 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1961 * error.c (dump_expr): Add missing case for RDIV_EXPR.
1963 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
1965 * pt.c, search.c: Fix comment typos.
1967 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
1969 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
1971 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
1972 * class.c (struct find_final_overrider_data): Remove most_derived,
1973 vpath_list and vpath fields. Add path field.
1974 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
1975 (dfs_find_final_overrider): Rename to ...
1976 (dfs_find_final_overrider_pre): ... here. Adjust.
1977 (dfs_find_final_overrider_post): Adjust.
1978 (dfs_find_final_overrider_q): Fold into
1979 dfs_find_final_overrider_pre.
1980 (find_final_overrider): Adjust dfs searching.
1981 (dfs_modify_vtables): Don't mark binfo here.
1982 (modify_all_vtables): Use dfs_walk_once.
1983 (build_vtt_inits): Likwise. Use dfs_walk_all.
1984 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
1985 Return dfs_skip_bases as appropriate.
1986 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
1987 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
1988 appropriate. Don't mark binfo here.
1989 (initialize_vtbl_ptrs): Use dfs_walk_once.
1990 * search.c (struct vbase_info): Remove unused struct.
1991 (access_in_type): Use dfs_walk_once.
1992 (dfs_access_in_type): Don't mark binfo here.
1993 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
1995 (accessible_r): ... here. New. Specialize dfs_walk_once.
1996 (accessible_p): Use accessible_r.
1997 (lookup_field_queue_p): Remove. Fold into ...
1998 (lookup_field_r): ... here. Adjust.
1999 (lookup_member): Use dfs_walk_all.
2000 (dfs_walk_real, dfs_walk): Replace with ...
2001 (dfs_walk_all, dfs_walk_once): ... these.
2002 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2003 (dfs_unmark, unmarkedp, markedp): Remove.
2004 (dfs_get_pure_virtuals): Don't mark binfo here.
2005 (get_pure_virtuals): Use dfs_walk_once.
2006 (dfs_debug_unmarked_p): Remove. Fold into ...
2007 (dfs_debug_mark): ... here.
2008 (note_debug_info_needed): Use dfs_walk_all.
2010 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2012 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2013 CLEANUP_POINT_EXPR to get the asm expression.
2015 2004-10-07 Mark Mitchell <mark@codesourcery.com>
2017 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2018 (DECL_MEMBER_TEMPLATE_P): New macro.
2019 (is_member_template): Remove.
2020 (class_method_index_for_fn): New function.
2021 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2022 * class.c (finish_struct_methods): Remove out-of-date comment.
2023 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2024 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2025 class_method_index_for_fn.
2026 * pt.c (is_member_template): Remove.
2027 (is_member_template_class): Likewise.
2028 (optimize_specialization_lookup_p): New function.
2029 (retrieve_specialization): Optimize lookups for members that are
2030 not member templates.
2031 (register_specialization): Adjust accordingly.
2032 (build_template_decl): Add member_template_p parameter. Set
2033 DECL_MEMBER_TEMPLATE_P.
2034 (process_partial_specialization): Adjust call to
2035 retrieve_specialization.
2036 (push_template_decl_real): Determine whether the template is a
2038 (lookup_template_class): Use retrieve_specialization.
2039 (tsubst_decl): Adjust call to retrieve_specialization.
2040 (tsubst_exception_specification): New function.
2042 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2043 (instantiate_template): Adjust call to retrieve_specialization.
2044 (regenerate_decl_from_template): Do not actually generate a new
2046 (instantiate_decl): Adjust call to retrieve_specialization.
2047 (class_method_index_for_fn): New method.
2049 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2051 * parser.c (cp_parser_asm_definition): Look passed the
2052 CLEANUP_POINT_EXPR to get the asm expression.
2054 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
2057 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2060 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2062 Convert diagnostics to use quoting flag q 6/n
2063 * pt.c (finish_member_template_decl, check_specialization_scope,
2064 maybe_process_partial_specialization, determine_specialization,
2065 check_explicit_specialization, maybe_check_template_type,
2066 process_partial_specialization, check_default_tmpl_args,
2067 push_template_decl_real, redeclare_class_template,
2068 convert_nontype_argument, coerce_template_parms,
2069 lookup_template_class, push_tinst_level,
2070 instantiate_class_template, tsubst_arg_types,
2071 tsubst_function_type, tsubst, tsubst_qualified_id,
2072 tsubst_copy_and_build, check_instantiated_args,
2073 do_decl_instantiation, do_type_instantiation,
2074 invalid_nontype_parm_type_p, check_specialization_namespace,
2075 convert_template_argument, determine_specialization,
2076 check_template_shadow, tsubst_decl
2077 instantiate_pending_templates): Use quoting marks.
2079 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
2082 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2083 unqualified lookup finds a member function.
2085 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2087 Convert diagnostics to use quoting flag q 5/n
2088 * parser.c (cp_parser_name_lookup_error,
2089 cp_parser_diagnose_invalid_type_name,
2090 cp_parser_primary_expression, cp_parser_unqualified_id,
2091 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2092 cp_parser_jump_statement, cp_parser_simple_declaration,
2093 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2094 cp_parser_type_parameter, cp_parser_template_id,
2095 cp_parser_template_name, cp_parser_direct_declarator,
2096 cp_parser_parameter_declaration_list, cp_parser_class_head,
2097 cp_parser_base_specifier, cp_parser_lookup_name,
2098 cp_parser_late_parsing_default_args,
2099 cp_parser_optional_template_keyword
2100 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2101 cp_parser_check_access_in_redeclaration): Use quoting marks.
2103 * name-lookup.c (supplement_binding, pushdecl,
2104 check_for_out_of_scope_variable, validate_nonmember_using_decl,
2105 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2106 push_namespace, do_namespace_alias, do_using_directive,
2107 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2109 * method.c (use_thunk): Likewise.
2111 * lex.c (unqualified_name_lookup_error,
2112 unqualified_fn_lookup_error): Likewise.
2114 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2116 Convert diagnostics to use quoting flag q 4/n
2117 * except.c (decl_is_java_type, build_throw,
2118 is_admissible_throw_operand, check_handlers_1, check_handlers):
2119 Use quoting formats.
2120 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
2121 * init.c (sort_mem_initializers, emit_mem_initializers,
2122 member_init_ok_or_else, expand_member_init, is_aggr_type,
2123 build_offset_ref, build_java_class_ref): Likewise.
2125 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2127 Convert diagnostics to use quoting flag q 3/n
2128 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2129 redeclaration_error_message, lookup_label, check_goto,
2130 make_typename_type, make_unbound_class_template,
2131 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
2132 grok_reference_init, layout_var_decl, maybe_commonize_var,
2133 check_for_uninitialized_const_var, reshape_init_array,
2134 reshape_init, check_initializer, cp_finish_decl,
2135 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
2136 check_static_variable_definition, compute_array_index_type,
2137 create_array_type_for_decl, check_special_function_return_type,
2138 grokdeclarator, check_default_argument, grokparms,
2139 grok_ctor_properties, grok_op_properties,
2140 check_elaborated_type_specifier, xref_tag, finish_enum,
2141 build_enumerator, check_function_type, start_preparsed_function,
2142 store_parm_decls): Use quoting formats.
2143 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
2144 check_java_method, check_classfn, finish_static_data_member_decl,
2145 grokfield, grokbitfield, grok_function_init,
2146 build_anon_union_vars, coerce_new_type, coerce_delete_type,
2147 check_default_args): Likewise.
2148 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2150 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2152 Convert diagnostics to use quoting flag q 2/n
2153 * class.c (build_base_path, add_method, alter_access,
2154 handle_using_decl, check_bases,
2155 maybe_warn_about_overly_private_class, find_final_overrider,
2156 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2157 check_bitfield_decl, check_field_decls, layout_empty_base,
2158 build_base_field, check_methods, layout_virtual_bases,
2159 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2160 resolve_address_of_overloaded_function, instantiate_type,
2161 note_name_declared_in_class): Use format flag "q" for quoting.
2163 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2165 Convert diagnostics to use quoting flag q 1/n
2166 * error.c (locate_error): Ignore quoting flag q.
2167 * call.c (build_user_type_conversion_1, build_operator_new_call,
2168 build_object_call, op_error, build_conditional_expr,
2169 build_new_op, build_op_delete_call, enforce_access,
2170 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2171 convert_default_arg, build_over_call, build_new_method_call,
2172 joust, perform_implicit_conversion, initialize_reference): Use the
2175 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
2178 * typeck.c (build_reinterpret_cast): Return if the inner type
2181 2004-10-01 Jan Hubicka <jh@suse.cz>
2183 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2185 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
2187 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2188 turning operator_code and fixed_offset into bitfields.
2190 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
2192 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2194 2004-09-29 Jason Merrill <jason@redhat.com>
2196 PR tree-optimization/17697
2197 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2199 2004-09-28 Jason Merrill <jason@redhat.com>
2202 * class.c (build_base_field): Set TYPE_MODE.
2204 2004-09-28 Roger Sayle <roger@eyesopen.com>
2207 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2208 than -lc and -lm, may require linking against libstc++.
2210 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
2212 * tree.c: Fix a comment typo.
2214 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
2216 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2217 (struct secondary_vptr_vtt_init_data_s): New.
2218 (build_vtt_inits): Adjust dfs_walkers.
2219 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2220 secondary_vptr_vtt_init_data_s structure. Adjust.
2221 (dfs_ctor_vtable_bases_queue_p): Remove.
2222 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2224 * pt.c (struct get_template_base_data_s): Remove.
2225 (get_template_base_r): Fold into get_template_base.
2226 (get_template_base): Walk base binfos directly in inheritance
2229 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2232 * cp-tree.h (fold_if_not_in_template): New function.
2233 * call.c (build_conditional_expr): Use fold_if_not_in_template.
2234 (build_cxx_call): Likewise.
2235 * cvt.c (convert_to_complex): Likewise.
2236 (ocp_convert): Likewise.
2237 (convert): Likewise.
2238 (convert_force): Likewise.
2239 * decl.c (compute_array_index_type): Clear
2240 processing_template_decl while folding array bounds.
2241 * pt.c (convert_nontype_argument): Clear
2242 processing_template_decl while processing non-type argument
2244 * tree.c (fold_if_not_in_template): New function.
2245 * typeck.c (build_class_member_access_expr): Use
2246 fold_if_not_in_template.
2247 (build_array_ref): Likewise.
2248 (build_binary_op): Likewise. Do not try to optimize computations
2249 when processing templates.
2250 (cp_pointer_int_sum): Use fold_if_not_in_template.
2251 (pointer_diff): Likewise.
2252 (build_unary_op): Likewise.
2253 (build_reinterpret_cast): Likewise.
2254 (get_delta_difference): Likewise.
2255 (expand_ptrmemfunc_cst): Likewise.
2256 (dubious_conversion_warnings): Likewise.
2258 2004-09-27 Matt Austern <austern@apple.com>
2260 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
2261 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
2262 tokens that come from headers that are implicitly extern "C".
2263 (struct cp_parser): new one-bit field, implicit_extern_c.
2264 (cp_parser_new): Set parser's implicit_extern_c to false.
2265 (cp_parser_translation_unit): Pop lang context if we were in a
2266 header that was implicitly extern "C".
2267 (cp_parser_declaration_seq_opt): Push/pop lang context as
2268 required by the token's and parser's implicit_extern_c.
2270 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2273 * cp-tree.h (shared_member_p): Declare.
2274 * search.c (shared_member_p): Give it external linkage.
2275 * semantics.c (finish_qualified_id_expr): Use it.
2276 (finish_id_expression): Likewise.
2279 * semantics.c (finish_id_expression): Do not add "this->" to
2280 static member functions.
2282 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
2285 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
2287 * class.c (struct count_depth_data): Remove.
2288 (dfs_depth_post, dfs_depth_q): Remove.
2289 (find_final_overrider): Use number of vbase classes as depth
2292 * cp-tree.h (types_overlap_p): Remove.
2293 * search.c (struct overlap_info): Remove.
2294 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
2296 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
2297 (get_template_base_recursive): Remove. Replace with ...
2298 (get_template_base_r): ... this.
2299 (struct get_template_base_data_s): New.
2300 (get_template_base): Use get_template_base_r via dfs_walk. Always
2301 return NULL on failure.
2302 (unify): Remove error_mark_node check from get_template_base result.
2304 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
2306 * parser.c (cp_parser_expression_stack): Clarify why it is
2307 an array of NUM_PREC_VALUES elements.
2308 (cp_parser_binary_expression): Clarify why we do not need to
2309 handle stack overflow.
2311 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
2314 * search.c (lookup_field_queue_p): Correct check for hidden base.
2316 * search.c (bfs_walk): Remove.
2317 (lookup_member): Use dfs_walk_real.
2318 (dfs_walk_real): Move and adjust documentation from bfs_walk.
2320 2004-09-23 Zack Weinberg <zack@codesourcery.com>
2322 * decl.c (grokfndecl): If ::main is found not to return int,
2323 correct it after issuing a diagnostic.
2324 (grokdeclarator): If the incoming type was error_mark_node, do
2325 not complain about declaring something with no type.
2326 (start_function): Change check for ::main not returning int to
2327 an assertion, as grokfndecl now catches this when the user did it.
2328 * init.c (perform_member_init, sort_mem_initializers)
2329 (emit_mem_initializers): Make most diagnostics be issued on
2330 the line of current_function_decl, not whatever the current
2332 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
2333 definition and declaration with #ifdef ENABLE_CHECKING.
2334 Avoid unnecessary use of fprintf.
2335 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
2336 definitions to avoid warnings.
2337 (cp_lexer_new_main): Add assertion that first token is not a
2339 (cp_lexer_new_from_token_array): Fold into ...
2340 (cp_lexer_new_from_tokens): ... here. Add assertion that
2341 first token is not a padding token.
2342 (cp_lexer_set_source_position_from_token): Move nearer to callers.
2343 Remove unused lexer argument.
2344 (cp_lexer_peek_token): Just print debugging report (if enabled)
2345 and return lexer->next_token.
2346 (cp_lexer_skip_purged_tokens): Delete.
2347 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
2348 inline, simplify bodies.
2349 (cp_lexer_peek_nth_token): Add debugging report a la
2350 cp_lexer_peek_token.
2351 (cp_lexer_consume_token): Correct commentary. Advance over
2352 purged tokens here. Set current source position here, from
2353 token to be returned. Avoid unnecessary use of fprintf.
2354 (cp_lexer_purge_token): Advance next_token pointer over this and
2355 subsequent purged tokens.
2356 (cp_parser_error): Adjust source position to that of the
2358 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
2359 (cp_parser_string_literal): Remove some excessive cleverness.
2360 (cp_parser_enum_specifier): Call start_enum before consuming
2362 (cp_parser_member_declaration): Make the "extra semicolon"
2363 diagnostic consistently-worded with the other place this is
2364 diagnosed. Explicitly set the diagnostic location to the
2365 location of the offending semicolon.
2366 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
2367 in diagnostics. Do not use cp_parser_require. Set location
2368 of diagnostics about improper use of '>>' to location of
2370 (cp_parser_late_parsing_for_member):
2371 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
2372 (cp_parser_late_parsing_default_args): Likewise. Manually
2373 move some logic outside the loop.
2375 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
2378 * cvt.c (cp_convert_to_pointer): Return early when the type is
2381 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
2385 * decl.c (grokfndecl): Add new argument "attrlist", use it
2386 to call cplus_decl_attributes.
2387 (start_function): Remove call to cplus_decl_attributes.
2388 * cvt.c (ocp_convert): Add support to use type conversion
2389 function to vector type.
2390 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2393 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
2397 * parser.c (cp_parser_token_tree_map_node,
2398 cp_parser_pm_expression, cp_parser_additive_expression,
2399 cp_parser_multiplicative_expression, cp_parser_shift_expression,
2400 cp_parser_relational_expression, cp_parser_equality_expression,
2401 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2402 cp_parser_inclusive_or_expression,
2403 cp_parser_logical_and_expression,
2404 cp_parser_logical_or_expression): Removed.
2405 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2406 binops, binops_by_token): New.
2407 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2408 (cp_parser_new): Initialize binops_by_token.
2409 (cp_parser_binary_expression): Rewritten.
2412 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
2414 * parser.c: Fix a comment typo.
2416 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
2419 * decl.c (xref_basetypes): Look through typedefs before checking
2422 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2424 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2425 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2426 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2427 (init_rtti_processing): Initialize it to something realistic.
2428 (get_tinfo_decl): Adjust pushing the new decl.
2430 * cp-tree.h (struct lang_type_class): Remove marked flags, add
2431 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
2432 (TYPE_MARKED_P): New.
2433 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2434 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2435 CLEAR_CLASSTYPE_MARKED_N): Remove.
2436 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2437 CLEAR_CLASSTYPE_MARKED_*): Remove.
2438 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2439 shaped and repeated base properties.
2440 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2441 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2442 class_hint_flags): Remove.
2443 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2444 CLASSTYPE_DIAMOND_SHAPED_P.
2446 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2448 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2450 (objcp_tsubst_copy_and_build): Reformat function signature.
2451 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2452 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2454 2004-09-21 Zack Weinberg <zack@codesourcery.com>
2456 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2457 Don't handle CPP_PRAGMA tokens specially.
2458 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
2459 purge the token; do clear token->value after processing. Add
2460 assertion at beginning that token->value is nonzero.
2461 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2462 CPP_PRAGMA as a full statement or declaration in its own right.
2464 2004-09-21 Matt Austern <austern@apple.com>
2467 * decl.c (grokvardecl): Accept declarations of global variables
2468 using anonymous types.
2470 2004-09-21 Roger Sayle <roger@eyesopen.com>
2473 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
2474 if either operand has side-effects.
2475 * typeck.c (rationalize_conditional_expr): Assert that neither
2476 operand of MIN_EXPR or MAX_EXPR has side-effects.
2477 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
2478 Check that the "lhs" is a valid lvalue, i.e. that neither operand
2479 of a MIN_EXPR or MAX_EXPR has a side-effect.
2481 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
2483 * cp-tree.h (struct lang_type_header): Remove
2484 uses_multiple_inheritance field.
2485 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2486 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2487 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2488 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2489 (TYPE_CONTAINS_VPTR_P): Likewise.
2490 * call.c (add_template_candidate_real): Use
2491 CLASSTYPE_VBASECLASSES.
2492 (build_special_member_call): Likewise.
2493 * class.c (finish_struct_bits): Remove
2494 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2496 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2497 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2499 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2500 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2502 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2503 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2505 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2506 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2507 * init.c (expand_member, push_base_cleanups): Likewise.
2508 * pt.c (instantiate_class_template): Remove
2509 TYPE_USES_MULTIPLE_INHERITANCE,
2510 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2512 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2514 * typeck2.c (process_init_constructor): Replace some sorrys with
2517 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
2519 * decl.c (reshape_init_array): Initialize max_index_cst to fix
2522 2004-09-20 Mark Mitchell <mark@codesourcery.com>
2525 * pt.c (tsubst): Fix parentheses to accomodate emacs.
2526 (tsubst_baselink): If we get a single function, mark it as used.
2528 2004-09-20 Matt Austern <austern@apple.com>
2529 Zack Weinberg <zack@codesourcery.com>
2531 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2532 Apply lbasename to input_filename before passing to get_fileinfo.
2533 * semantics.c (begin_class_definition): Likewise.
2534 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2535 correct filename. Rename variables to be less confusing.
2536 (handle_pragma_implementation): Likewise. Disable "appears
2537 after file is included" diagnostic.
2539 * parser.c (struct cp_token): Add in_system_header fiag.
2540 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2541 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2542 (CPP_NONE, cp_lexer_read_token): Delete.
2543 (struct cp_lexer): Remove first_token, string_tokens,
2544 main_lexer_p fields. Clarify comments.
2545 (struct cp_token_cache): Now just a pair of pointers.
2546 (CP_LEXER_BUFFER_SIZE): New #define.
2547 (CPP_PURGED): New fake token type.
2548 (cp_lexer_new_from_token_array, cp_lexer_destroy)
2549 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2550 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2552 (cp_lexer_new_from_tokens): Now a simple wrapper around
2553 cp_lexer_new_from_token_array.
2554 (cp_lexer_set_source_position_from_token): Also update
2556 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2558 (cp_lexer_token_difference): Dont handle wrapping round.
2559 (cp_lexer_new_main): Enable pragma deferral and raw strings,
2560 read the entire translation unit through c_lex_with_flags into
2561 this lexer's buffer, then turn raw strings back off again.
2562 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2563 (cp_lexer_get_preprocessor_token): No need to handle not being
2564 the main lexer. Set token->in_system_header too.
2565 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
2566 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
2567 (cp_lexer_peek_nth_token): Likewise.
2568 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2569 the other tokens down.
2570 (cp_lexer_purge_tokens_after): Likewise.
2571 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2572 about there being no tokens.
2573 (cp_lexer_print_token): Revise to give useful information on
2575 (struct cp_parser): Add field translate_strings_p.
2576 (cp_parser_new): Initialize it.
2577 (cp_parser_translation_unit): Destroy the lexer when done.
2578 (cp_parser_parameter_declaration): Restructure saving of
2580 (cp_parser_save_member_function_body): Likewise.
2581 (cp_parser_check_for_invalid_template_id)
2582 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2583 Adjust calls to cp_lexer_advance_token.
2584 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2585 No need to fiddle c_lex_string_translate.
2586 (cp_parser_primary_expression, cp_parser_linkage_specification)
2587 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2588 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2589 Use cp_parser_string_literal.
2590 (cp_parser_attribute_list): Save and restore
2591 parser->translate_strings_p, not c_lex_string_translate.
2592 (cp_parser_cache_group): Delete.
2593 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
2594 not take a cache argument.
2596 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2599 * decl.c (reshape_init): Extract array handling into...
2600 (reshape_init_array): New function. Use integers instead of trees
2601 for indices. Handle out-of-range designated initializers.
2603 2004-09-20 Steven Bosscher <stevenb@suse.de>
2605 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2608 2004-09-19 Mark Mitchell <mark@codesourcery.com>
2610 * decl2.c (determine_visibility): Allow class visibility
2611 directives to override targetm.cxx.export_class_data.
2613 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
2615 * call.c, semantics.c: Follow spelling conventions.
2616 * class.c: Fix a comment typo.
2618 2004-09-16 Geoffrey Keating <geoffk@apple.com>
2621 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2622 (handle_pragma_implementation): Likewise.
2624 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2625 Zack Weinberg <zack@codesourcery.com>
2627 * cp-tree.def: Use tree_code_class enumeration constants
2628 instead of code letters.
2629 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2630 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2631 Update for new tree-class enumeration constants.
2633 2004-09-16 Mark Mitchell <mark@codesourcery.com>
2636 * parser.c (cp_parser_simple_declaration): Commit to tentative
2637 parses after seeing a decl-specifier.
2638 (cp_parser_simple_declaration): Eliminate spurious message.
2639 (cp_parser_init_declarator): Adjust error message.
2642 * lex.c (unqualified_name_lookup_error): Mark the dummy
2643 declaration as used.
2646 * parser.c (cp_parser_nested_name_specifier): Do not resolve
2647 typename types if the user explicitly said "typename".
2649 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
2651 * error.c (dump_decl): Make sure there is lang_specific info before
2652 checking for DTOR and CTOR decls.
2654 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2656 * class.c (copy_virtuals): Remove.
2657 (build_primary_vtable): Use copy_list directly.
2658 (build_secondary_vtable): Likewise.
2659 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2660 (create_vtable_ptr): Likewise.
2662 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2664 * search.c: Follow spelling conventions.
2666 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2668 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2670 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
2672 * call.c (build_new_method_call): Don't confirm a pure virtual is
2673 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
2674 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
2675 (fixup_inline_methods, finish_struct): Likewise.
2676 * decl.c (finish_method): Likewise.
2677 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
2678 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
2679 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
2680 vector to avoid repeating the list in error messages.
2682 2004-09-15 Mark Mitchell <mark@codesourcery.com>
2684 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
2685 * cp-tree.h (cxx_comdat_group): Declare.
2686 * decl.c (cxx_comdat_group): New function.
2688 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
2690 * search.c (get_pure_virtuals): Remove unused variables.
2692 * cp-tree.h (struct lang_decl_flags): Remove
2693 needs_final_overrider.
2694 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
2695 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
2696 * class.c (finish_struct_bits): Correct comment about
2697 CLASSTYPE_PURE_VIRTUALS.
2698 * search.c (get_pure_virtuals): Remove useless loop.
2700 2004-09-14 Mark Mitchell <mark@codesourcery.com>
2703 * mangle.c (partially_mangled_name): New variable.
2704 (partially_mangled_name_len): Likewise.
2705 (save_partially_mangled_name): New function.
2706 (restore_partially_mangled_name): Likewise.
2707 (write_encoding): Save and restore partially mangled names around
2708 calls to get_mostly_instantiated_function_type.
2709 (write_unqualified_name): Likewise.
2711 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
2713 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
2715 2004-09-13 Mark Mitchell <mark@codesourcery.com>
2718 * parser.c (cp_parser_id_expression): Correct value for
2720 (cp_parser_nested_name_specifier_opt): Look through typenames as
2722 (cp_parser_template_name): Honor check_dependency_p.
2725 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
2729 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
2732 2004-09-12 Richard Henderson <rth@redhat.com>
2735 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
2736 * typeck.c (condition_conversion): Likewise.
2738 2004-09-11 Richard Henderson <rth@redhat.com>
2741 * pt.c (cur_stmt_expr): Move from tsubst_expr.
2742 (tsubst_expr) <case STMT_EXPR>: Move ...
2743 (tsubst_copy_and_build): ... here.
2745 2004-09-10 Zack Weinberg <zack@codesourcery.com>
2747 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
2748 comment explaining them moved to c-common.h.
2749 * lex.c (interface_only, interface_unknown, extract_interface_info):
2751 (cxx_finish): Don't reset interface_unknown.
2752 (handle_pragma_interface): Don't set interface_only and
2753 interface_unknown; just the like-named fields in finfo.
2754 (handle_pragma_implementation): Adjust comment.
2755 * decl2.c (cp_finish_file): Don't reset interface_only and
2757 * method.c (synthesize_method): Don't reset interface_unknown or
2758 call extract_interface_info.
2759 * pt.c (pop_tinst_level): Don't call extract_interface_info.
2760 * decl.c (start_cleanup_fn): Don't save or restore interface_only
2761 and interface_unknown.
2762 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
2763 and use the result instead of the interface_only/interface_unknown
2765 (start_preparsed_function): Likewise.
2766 * lex.c (cxx_make_type): Likewise.
2767 * semantics.c (begin_class_definition): Likewise.
2768 (expand_body): Don't call extract_interface_info.
2770 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2772 * decl.c (objc_mark_locals_volatile): Make description of
2773 routine more descriptive; only mark VAR_DECLs at each
2776 2004-09-10 Richard Henderson <rth@redhat.com>
2779 * call.c (build_vfield_ref): Move...
2780 * class.c (build_vfield_ref): ... here. Convert datum to the
2781 primary base containing the vptr.
2782 (make_new_vtable): Simplify build_primary_vtable arguments.
2783 (finish_struct_1): Do not duplicate TYPE_VFIELD.
2784 * typeck.c (build_class_member_access_expr): Don't warn for
2785 null object access to base fields.
2787 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2789 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
2790 New functions, to be called from ObjC++.
2792 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
2794 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
2795 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2798 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2800 * typeck.c (build_c_cast): Preserve the cast if casting
2801 to and from an Objective-C type.
2803 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2805 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2806 * typeck.c: Include c-common.h.
2807 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2808 return the result if nonnegative.
2810 2004-09-09 Zack Weinberg <zack@codesourcery.com>
2812 * decl2.c (import_export_class)
2813 * lex.c (handle_pragma_interface):
2814 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2816 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2818 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2819 * semantics.c: Include c-common.h.
2820 (finish_compound_stmt): Call objc_clear_super_receiver().
2822 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2824 * cp-tree.h (do_poplevel): New prototype.
2825 * semantics.c (do_poplevel): Make externally visible.
2827 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
2829 * cp-tree.h (tree_pair_s): Define a GC'd vector.
2830 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2831 * semantics.c (deferred_access): Likewise.
2833 2004-09-06 Daniel Jacobowitz <dan@debian.org>
2835 * semantics.c (expand_body): Assert that we are not nested.
2837 2004-09-06 Zack Weinberg <zack@codesourcery.com>
2839 * decl.c (build_enumerator): Use add_double and int_fits_type_p
2840 instead of cp_build_binary_op, to avoid creating short-lived trees.
2841 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2842 lookahead instead of backtracking. Move some code to avoid a
2844 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2845 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2846 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2847 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2849 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2851 * decl.c (grok_declarator): Remove a redundant semicolon.
2853 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2854 Correct comments describing function parameters.
2856 2004-09-03 Matt Austern <austern@apple.com>
2857 Compile speed improvement.
2858 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2859 Otherwise define a stub macro that expands to nothing.
2860 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
2861 define a stub macro that expands to 0.
2862 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2863 (cp_lexer_stop_debugging): Likewise.
2864 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
2865 define a stub macro that expands to NULL.
2866 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2867 (cp_lexer_new_from_tokens): Likewise.
2869 2004-09-03 Jan Hubicka <jh@suse.cz>
2871 * decl.c (finish_function): Clean out pointers we no longer need.
2873 2004-09-03 Jan Beulich <jbeulich@novell.com>
2875 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2878 2004-09-02 Paul Brook <paul@codesourcery.com>
2880 * decl2.c (determine_visibility): Only check data visibility
2883 2004-08-31 Mark Mitchell <mark@codesourcery.com>
2885 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2886 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2887 * decl2.c (determine_visibility): Honor
2888 TARGET_CXX_EXPORT_CLASS_DATA.
2890 * class.c (key_method): Rename to ...
2891 (determine_key_method): ... this.
2892 (finish_struct_1): Adjust accordingly.
2893 * cp-tree.h (key_method): Declare.
2894 * decl2.c (maybe_emit_vtables): Determine the key method here if
2895 it has not already been done.
2897 2004-08-31 Ziemowit Laski <zlaski@apple.com>
2899 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2900 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2901 (cp/cp-decl.c): Do not depend on gtype-cp.h.
2902 (cp/cp-objcp-common.o): New target.
2903 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2904 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2905 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2906 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2908 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2909 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2910 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2911 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2912 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2913 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2914 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2915 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2916 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2917 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2918 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2919 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2920 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2921 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2922 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2923 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2924 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2925 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2926 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2927 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2928 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2929 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2930 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2931 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2932 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2933 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2934 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2935 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2936 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2937 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2938 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2939 hooks to cp-objcp-common.h.
2940 (finish_file): New function.
2941 * cp-objcp-common.c: New file.
2942 * cp-objcp-common.h: New file.
2943 * cp-tree.h (cp_finish_file): New prototype.
2944 * decl.c: Do not include gtype-cp.h.
2945 * decl2.c (finish_file): Rename to cp_finish_file.
2947 2004-08-31 Richard Henderson <rth@redhat.com>
2950 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2951 (tsubst_copy_and_build): ... here.
2953 2004-08-30 Mark Mitchell <mark@codesourcery.com>
2955 * cp-tree.h (initialize_artificial_var): Declare.
2956 * decl.c (initialize_artifical_var): New function.
2957 * class.c (initialize_array): Remove.
2958 (initialize_vtable): Use initialize_artificial_var.
2959 (build_vtt): Likewise.
2960 (build_ctor_vtbl_group): Likewise.
2962 2004-08-30 Richard Henderson <rth@redhat.com>
2964 * class.c (build_base_path): Use build_address directly.
2965 * typeck.c (build_unary_op): Don't lower &a.b to pointer
2966 arithmetic directly.
2967 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
2968 means !initializer_constant_valid_p.
2970 2004-08-30 Richard Henderson <rth@redhat.com>
2972 * class.c (fixed_type_or_null): Use get_base_address before
2973 assuming an ADDR_EXPR is non-null.
2975 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2977 * name-lookup.c (pop_binding, pushdecl,
2978 set_identifier_type_value_with_scope, push_overloaded_decl,
2979 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
2980 * parser.c (cp_parser_diagnose_invalid_type_name,
2981 cp_parser_postfix_expression, cp_parser_unary_expression,
2982 cp_parser_check_declarator_template_para): Likewise.
2983 * pt.c (push_inline_template_parms_recursive,
2984 check_explicit_specialization, convert_nontype_argument,
2985 coerce_template_template_parms, uses_template_parms,
2986 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
2987 tsubst_expr, instantiate_template,
2988 maybe_adjust_types_for_deduction, type_unification_real,
2989 resolve_overloaded_unification, template_decl_level,
2990 type_dependent_expression_p): Likewise.
2991 * search.c (lookup_base_r): Likewise.
2992 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
2993 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
2994 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
2995 * typeck.c (common_type, get_member_function_from_ptrfunc,
2996 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
2997 * typeck2.c (cxx_incomplete_type_diagnostic,
2998 split_nonconstant_init_1, store_init_value,
2999 process_init_constructor): Likewise.
3001 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3003 * call.c (check_dtor_name): Replace abort with gcc_assert or
3005 (build_call, add_builtin_candidate, build_new_op,
3006 convert_like_real, build_over_call, in_charge_arg_for_name,
3007 source_type, joust): Likewise.
3008 * class.c (build_simple_base_path, get_vcall_index,
3009 finish_struct_1, instantiate_type, get_enclosing_class,
3010 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3011 * cp-gimplify.c (cp_genericize): Likewise.
3012 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3013 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3014 * decl.c (poplevel, make_unbound_class_template, reshape_init,
3015 check_special_function_return_type, grokdeclarator,
3016 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3017 finish_function): Likewise.
3018 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3019 * error.c (dump_global_iord, dump_decl, dump_template_decl,
3020 language_to_string): Likewise.
3021 * except.c (choose_personality_routine): Likewise.
3022 * friend.c (do_friend): Likewise.
3023 * g++spec.c (lang_specific_driver): Likewise.
3024 * init.c (build_zero_init, expand_default_init, build_new_1,
3025 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3026 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3027 * mangle.c (add_substitution, write_unscoped_name,
3028 write_template_prefix, write_identifier,
3029 write_special_name_destructor, write_type, write_builtin_type,
3030 write_expression, write_template_param,
3031 write_java_integer_type_codes): Likewise.
3032 * method.c (implicitly_declare_fn): Likewise.
3034 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3036 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3037 (BINFO_INDIRECT_PRIMARY_P): Remove.
3038 * class.c (determine_primary_base): Rename to ...
3039 (determine_primary_bases): ... here. Set all primary bases.
3040 (set_primary_base): Remove.
3041 (mark_primary_bases): Remove.
3042 (build_simple_base_path, walk_subobject_offsets,
3043 propagate_binfo_offsets, end_of_class): Adjust.
3044 (layout_class_type): Rename determine_primary_base call.
3045 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3047 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3048 build_rtti_vtbl_entries): Adjust.
3049 * init.c (build_vtbl_address): Adjust.
3051 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3053 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3055 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3056 CXX_AND_OBJCXX_OBJS.
3057 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3058 separately on the link line.
3060 2004-08-28 Jason Merrill <jason@redhat.com>
3062 * decl.c (expand_static_init): Avoid bogus warnings.
3064 2004-08-27 Jason Merrill <jason@redhat.com>
3067 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3070 * decl.c (expand_static_init): Use thread-safety API.
3071 (register_dtor_fn): Return the call, don't expand it.
3072 * tree.c (add_stmt_to_compound): New fn.
3073 (stabilize_call): Use it.
3075 2004-08-27 Richard Henderson <rth@redhat.com>
3077 * cp-tree.def (OFFSETOF_EXPR): New.
3078 * parser.c (cp_parser_builtin_offsetof): Either built an
3079 OFFSETOF_EXPR, or call fold_offsetof immediately.
3080 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3082 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3084 * call.c (validate_conversion_obstack): Replace
3085 my_friendly_assert with gcc_assert or gcc_unreachable.
3086 (direct_reference_binding, merge_conversion_sequences,
3087 build_user_type_conversion_1, perform_overload_resolution,
3088 build_op_delete_call, enforce_access, call_builtin_trap,
3089 build_over_call, build_special_member_call, build_new_method_call,
3090 initialize_reference): Likewise.
3091 * class.c (build_base_path, build_primary_vtable, alter_access,
3092 check_bases, update_vtable_entry_for_fn, layout_empty_base,
3093 clone_function_decl, adjust_clone_args,
3094 type_requires_array_cookie, include_empty_classes,
3095 finish_struct_1, resolve_address_of_overloaded_function,
3096 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3097 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3098 accumulate_vtbl_inits, build_vtbl_initializer,
3099 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3100 * cvt.c (build_up_reference, convert_to_reference): Likewise.
3101 * decl.c (poplevel, duplicate_decls, make_typename_type,
3102 cxx_init_decl_processing, reshape_init, check_initializer,
3103 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3104 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3105 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3106 xref_basetypes, start_preparsed_function, save_function_data,
3107 finish_function, finish_method, maybe_register_incomplete_var,
3108 complete_vars): Likewise.
3109 * decl2.c (grok_array_decl, check_member_template,
3110 check_classfn, finish_static_data_member_decl, coerce_new_type,
3111 coerce_delete_type, import_export_class, decl_needed_p,
3112 determine_visibility, import_export_decl, build_cleanup,
3113 start_static_initialization_or_destructi, do_static_destruction,
3114 prune_vars_needing_no_initialization,
3115 build_offset_ref_call_from_tree): Likewise.
3116 * error.c (dump_decl, dump_expr): Likewise.
3117 * init.c (finish_init_stmts, build_zero_init,
3118 expand_virtual_init, expand_default_init, expand_aggr_init_1,
3119 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
3121 * mangle.c (write_method_parms, write_template_args,
3122 write_expression, write_template_arg): Likewise.
3123 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3124 * name-lookup.c (pop_binding, begin_scope, leave_scope,
3125 resume_scope, push_using_decl, validate_nonmember_using_decl,
3126 is_ancestor, poplevel_class, set_inherited_value_binding_p,
3127 push_class_level_binding, do_class_using_decl, push_namespace,
3128 pop_namespace, add_using_namespace, ambiguous_decl,
3129 lookup_namespace_name, lookup_type_current_level,
3130 maybe_process_template_type_declaration): Likewise.
3131 * parser.c (cp_lexer_peek_nth_token,
3132 cp_parser_parse_and_diagnose_invalid_typ,
3133 cp_parser_translation_unit, cp_parser_template_id,
3134 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3135 * pt.c (push_access_scope, finish_member_template_decl,
3136 push_inline_template_parms_recursive, add_outermost_template_args,
3137 get_innermost_template_args, begin_explicit_instantiation,
3138 end_explicit_instantiation, retrieve_specialization,
3139 is_specialization_of, is_specialization_of_friend,
3140 register_specialization, check_explicit_specialization,
3141 comp_template_parms, process_template_parm,
3142 process_partial_specialization, convert_nontype_argument,
3143 coerce_template_template_parms, coerce_template_parms,
3144 mangle_class_name_for_template, lookup_template_function,
3145 lookup_template_class, instantiate_class_template, tsubst_decl,
3146 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3147 instantiate_template, fn_type_unification, type_unification_real,
3148 get_template_base, regenerate_decl_from_template,
3149 template_for_substitution, instantiate_decl,
3150 get_mostly_instantiated_function_type, dependent_scope_ref_p,
3151 value_dependent_expression_p, resolve_typename_type): Likewise.
3152 * repo.c (repo_emit_p): Likewise.
3153 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3154 create_tinfo_types, emit_tinfo_decl): Likewise.
3155 * search.c (lookup_base_r, lookup_base, lookup_field_1,
3156 dfs_access_in_type, build_baselink, lookup_member,
3157 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3158 * semantics.c (perform_or_defer_access_check,
3159 finish_non_static_data_member, finish_stmt_expr_expr,
3160 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3161 finish_template_template_parm, finish_member_declaration,
3162 emit_associated_thunks): Likewise.
3163 * tree.c (build_target_expr_with_type, force_target_expr,
3164 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3165 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3166 cxx_sizeof_or_alignof_type, perform_integral_promotions,
3167 build_class_member_access_expr, finish_class_member_access_expr,
3168 build_ptrmemfunc_access_expr, build_unary_op,
3169 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3170 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3171 * typeck2.c (complete_type_check_abstract,
3172 abstract_virtuals_error, process_init_constructor,
3173 add_exception_specifier): Likewise.
3175 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3177 * class.c (build_vtbl_initializer): Use ssize_int.
3178 * decl.c (complete_array_type): Likewise.
3179 * method.c (finish_thunk): Likewise.
3180 * search.c (get_dynamic_base_type): Likewise.
3182 2004-08-26 Richard Henderson <rth@redhat.com>
3184 * cp-tree.h (DECL_FIELD_IS_BASE): New.
3185 * class.c (build_base_field): Set it.
3186 (build_simple_base_path): Use it.
3187 (fixed_type_or_null): Don't consider base fields definitive.
3189 2004-08-25 Roger Sayle <roger@eyesopen.com>
3192 PR tree-optimization/16372
3193 * decl.c (finish_enum): Make the precision of the enumerated type
3194 the same width as the underlying integer type.
3196 2004-08-25 Mark Mitchell <mark@codesourcery.com>
3199 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3202 * mangle.c (get_identifier_nocopy): Add cast.
3204 * cp-tree.h (mangle_type): Remove.
3205 * mangle.c (globals): GTY it.
3206 (mangle_obstack): New variable.
3207 (name_obstack): Likewise.
3208 (name_base): Likewise.
3209 (write_char): Adjust accordingly.
3210 (write_chars): Likewise.
3211 (write_string): Likewise.
3212 (start_mangling): Initialize G.substitutions only one. Add
3214 (finish_mangling): Use VARRAY_CLEAR to reclaim
3215 storage in G.substitutions. Use obstack_finish.
3216 (init_mangle): Adjust for changes to variable names above.
3217 Initialize G.substitutions.
3218 (mangle_decl_string): Adjust call to start_mangling.
3219 (get_identifier_nocopy): New function.
3220 (mangle_decl): Use it.
3221 (mangle_type_string): Adjust call to start_mangling.
3222 (mangle_special_for_type): Likewise.
3223 (mangle_vtt_for_type): Likewise.
3224 (mangle_ctor_vtbl_for_type): Likewise.
3225 (mangle_thunk): Likewise.
3226 (mangle_guard_variable): Likewise.
3227 (mangle_ref_init_variable): Likewise.
3229 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3232 * pt.c (redeclare_class_template): Check the type of non-type and
3233 template template parameter.
3235 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3237 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
3238 (build_user_type_conversion_1, convert_like_real,
3239 build_java_interface_fn_ref, build_special_member_call): Likewise.
3240 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
3241 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3242 * cvt.c (cp_convert_to_pointer): Likewise.
3243 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3244 * decl2.c (start_static_initialization_or_destruction,
3245 generate_ctor_or_dtor_function): Likewise.
3246 * except.c (build_throw): Likewise.
3247 * mangle.c (write_integer_cst): Likewise.
3248 * method.c (finish_thunk): Likewise.
3249 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3250 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3251 get_pseudo_ti_init): Likewise.
3252 * search.c (get_dynamic_cast_base_type): Likewise.
3254 2004-08-25 Zack Weinberg <zack@codesourcery.com>
3256 * class.c, search.c: Remove references to DWARF_DEBUG.
3258 2004-08-25 Adam Nemet <anemet@lnxw.com>
3260 * repo.c (extract_string): Reset backquote after one character.
3261 (get_base_filename): Fix indentation.
3263 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3265 * decl.c (cxx_init_decl_processing): Adjust
3266 build_common_tree_nodes call.
3268 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3271 * (is_subobject_of_p): Resurrect & optimize.
3272 (lookup_field_r): Use it.
3274 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3277 * search.c (friend_accessible_p): Increment processing_template_decl
3278 when deal with TEMPLATE_DECL of SCOPE.
3280 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3283 * semantics.c (check_accessibility_of_qualified_id): Defer check
3284 if qualifying_type is a template parameter.
3286 2004-08-23 Mark Mitchell <mark@codesourcery.com>
3289 * pt.c (instantiate_decl): Do not try to apply
3290 DECL_DECLARED_INLINED_P to a VAR_DECL.
3292 * search.c (build_baselink): Fix typo in comment.
3294 2004-08-22 Andrew Pinski <apinski@apple.com>
3297 2004-08-22 Andrew Pinski <apinski@apple.com>
3299 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3300 expression is not constant.
3302 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3304 * name-lookup.c (pushdecl): Rename build_type_copy call.
3305 * tree.c (cp_build_qualified_type_real,
3306 build_exception_variant, handle_java_interface_attribute): Likewise.
3308 2004-08-22 Andrew Pinski <apinski@apple.com>
3311 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3312 expression is not constant.
3314 2004-08-20 Mark Mitchell <mark@codesourcery.com>
3317 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
3319 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
3322 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
3325 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3327 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
3328 before calling comp_template_args.
3330 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3332 * class.c (build_vtbl_initializer): Use build_int_cst for
3333 negative size types.
3334 * decl.c (complete_array_type): Likewise.
3335 * method.c (finish_thunk): Likewise.
3337 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
3339 * tree.c: Remove unused mark_local_for_remap_r.
3341 2004-08-19 Eric Christopher <echristo@redhat.com>
3343 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
3344 * tree.c (cxx_unsave_expr_now): Delete.
3345 (cp_unsave_r): Ditto.
3347 2004-08-19 Mark Mitchell <mark@codesourcery.com>
3350 * pt.c (push_template_decl_real): Disallow template allocation
3351 functions with fewer than two parameters.
3353 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3355 * cp-tree.h (build_shared_int_cst): Remove.
3356 * tree.c (shared_int_cache): Remove.
3357 (build_shared_int_cst): Remove.
3358 * class.c (finish_struct_1): Use build_int_cst.
3360 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3362 * decl.c (finish_enum): Do not copy value node early, copy
3364 * lex.c (cxx_init): Force null_node to be unique.
3366 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
3369 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
3370 from input for MODOP_EXPR.
3372 2004-08-18 Mark Mitchell <mark@codesourcery.com>
3374 * pt.c (dependent_template_p): Fix typo in commment.
3377 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
3380 2004-08-17 Mark Mitchell <mark@codesourcery.com>
3383 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
3384 arguments have the same type as the corresponding parameter.
3387 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
3388 is set use it for diagnostic purposes.
3389 (cp_parser_pseudo_destructor_name): Remove special-case error
3393 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3396 * cp-tree.h (qualified_name_lookup_error): Add parameter.
3397 * name-lookup.c (do_class_using_decl): Restrict set of entities
3398 passed to cp_emit_debug_info_for_using more carefully.
3399 (lookup_qualified_name): Allow lookup_member to return sets of
3401 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3402 (cp_parser_primary_expression): Handle ambiguous lookups.
3403 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3404 (cp_parser_template_argument): Likewise.
3405 (cp_parser_elaborate_type_specifier): Likewise.
3406 (cp_parser_namespace_name): Likewise.
3407 (cp_parser_class_name): Likewise.
3408 (cp_parser_lookup_name_simple): Likewise.
3409 * pt.c (tsubst_qualified_id): Handle ambiguous results.
3410 (tsubst_expr): Likewise.
3411 * semantics.c (qualified_name_lookup_error): Add decl paramter.
3412 For ambiguous lookups, print candidates.
3414 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3417 * pt.c (instantiate_pending_templates): Add int parameter. Don't
3419 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3420 * decl2.c (finish_file): Adjust call to
3421 instantiate_pending_templates.
3423 2004-08-15 Roger Sayle <roger@eyesopen.com>
3425 * call.c (build_vfield_ref, build_call, build_conditional_expr,
3426 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3427 build_java_interface_fn_ref, build_special_member_call,
3428 build_new_method_call, initialize_reference): Replace calls to
3429 build with calls to buildN.
3430 * class.c (build_base_path, convert_to_base_statically,
3431 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3432 build_vtbl_initializer): Likewise.