1 2005-02-22 Mark Mitchell <mark@codesourcery.com>
4 * init.c (integral_constant_value): Iterate if the value of a decl
8 * parser.c (cp_parser_class_head): Check for redefintions here.
9 * semantics.c (begin_class_definition): Not here.
12 * decl2.c (build_anon_union_vars): Add type parameter.
13 (finish_anon_union): Pass it.
16 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
17 Handle STATEMENT_LIST.
20 * parser.c (cp_parser_direct_declarator): Always complain about
21 non-constant array bounds when in a function scope.
22 * semantics.c (finish_id_expression): Do not mark dependent names
25 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
29 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
30 * decl.c (grokdeclarator): Pedwarn about qualifying a function
32 Add qualifiers when declaring a typedef of a function type.
33 Member function pointers pick up the qualifiers of the typedef
35 Don't complain about creating cv-qualified function types.
36 Complain about qualified function typedefs that are used to
37 declare non-static member functions or free functions.
38 Use cp_apply_type_quals_to_decl.
39 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
40 (grokclassfn): Use cp_apply_type_quals_to_decl.
41 * error.c (dump_type_suffix): Print qualifiers for function
43 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
44 (tsubst): When substituting a function type into a member
45 pointer type, pass along the qualifiers.
46 (unify): Unify member pointers to member function pointers.
47 * tree.c (cp_build_qualified_type_real): Function types may be
48 qualified. This includes restrict qualifiers.
49 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
50 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
51 added to function types.
53 2005-02-20 Zack Weinberg <zack@codesourcery.com>
56 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
57 c_common_to_target_charset. Delete bogus comment.
59 2005-02-18 Richard Henderson <rth@redhat.com>
62 * except.c (do_get_exception_ptr): New.
63 (expand_start_catch_block): Use it.
65 2005-02-19 Jakub Jelinek <jakub@redhat.com>
67 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
68 if type is not error_mark_node.
70 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
73 * decl2.c (grokfield): Do not apply attributes to template parameters
74 as they are ignored by tsubst anyway.
76 2005-02-18 Jakub Jelinek <jakub@redhat.com>
79 * decl.c (start_decl_1): Clear TREE_READONLY flag if
80 its type has TYPE_NEEDS_CONSTRUCTING.
81 (complete_vars): Likewise.
83 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
86 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
87 template along with TYPE_SIZE.
90 * semantics.c (perform_deferred_access_checks): Use
91 get_deferred_access_checks to get the top of the stack.
93 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
96 * class.c (add_implicitly_declared_members, check_field_decl)
97 (check_field_decls, check_bases): Remove arguments, tests and
98 assignments of cant_have_default_ctor-related variables.
100 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
102 * decl2.c (mark_used): Set the source location of the used decl to
103 the current input location here...
104 * method.c (synthesize_method): ... not here. Set input_location
105 from the decl instead.
107 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
110 * parser.c (cp_parser_late_parsing_for_member): Use
111 current_function_decl as scope to push to and from.
114 * pt.c (check_explicit_specialization): Make sure namespace
115 binding lookup found an overloaded function.
116 (lookup_template_function): Just assert FNS is an overloaded
120 * decl.c (grokdeclarator): Check for error mark node in ptrmem
123 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
126 * decl.c (redeclaration_error_message): Report redefinition of
127 pure virtual function.
129 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
132 * class.c (build_simple_base_path): Build the component_ref
134 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
135 rather than using lookup_base.
136 * search.c (dfs_walk_once): Add non-recursive assert check.
137 * typeck.c (build_class_member_access_expr): It is possible for
138 the member type to be both const and volatile.
140 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
144 * pt.c (maybe_check_template_type): Remove.
145 * cp-tree.h (maybe_check_template_type): Remove prototype.
146 * name-lookup.c (maybe_process_template_type_declaration): Don't
147 use maybe_check_template_type.
149 2005-02-11 Richard Henderson <rth@redhat.com>
152 * pt.c (get_mostly_instantiated_function_type): Save and restore
153 flag_access_control instead of push/pop_access_scope.
155 2005-02-10 Mark Mitchell <mark@codesourcery.com>
158 * decl.c (reshape_init): Issue warnings about missing braces.
160 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
162 * cp-tree.def, except.c, ptree.c: Update copyright.
164 2005-02-09 Mark Mitchell <mark@codesourcery.com>
167 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
168 attempting name lookup.
170 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
173 * call.c (initialize_reference): Robustify.
176 * decl.c (grokdeclarator): Check for invalid use of destructor
180 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
181 names with invalid types.
184 * parser.c (cp_parser_direct_declarator): Allow type-dependent
185 expressions as array bounds.
188 * parser.c (cp_parser_attributes_list): Allow empty lists.
190 2005-02-08 Mark Mitchell <mark@codesourcery.com>
193 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
194 (check_bases): Give warnings about a base class with a
195 non-virtual destructor, even if it is implicit.
196 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
197 (maybe_warn_about_overly_private_class): Don't use
199 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
200 (check_for_override): Give it external linkage.
201 (add_implicitly_declared_members): Generate destructors lazily.
202 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
204 (check_bases_and_members): Call check_methods before
206 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
208 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
209 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
210 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
211 (lang_type_class): Add lazy_destructor.
212 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
213 (CLASSTYPE_DESTRUCTORS): Robustify.
214 (TYPE_HAS_DESTRUCTOR): Remove.
215 (check_for_override): Declare.
216 (build_vbase_delete): Remove.
217 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
219 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
220 * except.c (dtor_nothrow): Lazily create destructors if necessary.
221 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
222 * init.c (build_delete): Lazily create destructors, if necessary.
223 (build_vbase_delete): Remove.
224 * method.c (locate_dtor): Simplify.
225 (implicitly_declare_fn): Add support for destructors.
226 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
228 * pt.c (check_explicit_specialization): Don't use
230 (instantiate_class_template): Likewise.
231 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
232 * rtti.c (emit_support_tinfos): Robustify.
233 * search.c (lookup_fnfields_1): Lazily create destructors.
234 * typeck.c (build_class_member_access_expr): Remove
235 PSEUDO_DTOR_EXPR handling.
236 (lookup_destructor): Likewise.
238 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
240 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
243 2005-02-07 Mark Mitchell <mark@codesourcery.com>
245 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
246 on boolean variables.
247 (cp_lexer_stop_debugging): Likewise.
249 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
252 * parser.c (cp_parser_pure_specifier): Emit a specific error
253 message with an invalid pure specifier.
254 * decl2.c (grok_function_init): Remove.
255 (grokfield): An initializer for a method is a always a pure
258 2005-02-02 Matt Austern <austern@apple.com>
261 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
262 * parser.c (cp_parser_postfix_expression): Accept function call in
263 constant expression if builtin_valid_in_constant_expr_p is true
265 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
266 * semantics.c (finish_id_expression): Accept function call in constant
267 expression if builtin_valid_in_constant_expr_p is true for that
269 * tree.c (builtin_valid_in_constant_expr_p): New.
271 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
274 * pt.c (check_instantiated_args): Improve error message.
275 Fix logic when to print its second part.
277 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
279 * cp-tree.h (complete_type_or_else): Remove macro.
280 (complete_type_or_diagnostic): Rename to complete_type_or_else
281 and remove last argument.
282 * typeck.c (complete_type_or_diagnostic): Rename to
283 complete_type_or_else and remove last argument.
285 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
287 * cp-tree.h (commonparms): Remove prototype.
288 (convert_arguments): Likewise.
289 (PFN_FROM_PTRMEMFUNC): Remove.
290 * typeck.c (commonparms): Make static.
291 (convert_arguments): Add prototype. Make static.
292 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
294 2005-01-31 Mark Mitchell <mark@codesourcery.com>
296 * parser.c (cp_parser_primary_expression): Don't complain about
297 floating-point literals in integral constant expressions when
300 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
302 * parser.c (cp_parser_template_id): Revert comment patch too.
307 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
308 Issue an error when creating the template id.
309 * pt.c (fn_type_unification): Return early if the explicit
310 template arg list is an error_mark_node.
312 2005-01-31 Mark Mitchell <mark@codesourcery.com>
314 * decl.c (build_enumerator): Do not issue duplicate error messages
315 about invalid enumeration constants.
316 * parser.c (cp_parser_non_integral_constant_expression): Always
317 set parser->non_integral_constant_expression_p.
318 (cp_parser_primary_expression): Add cast_p parameter. Issue
319 errors about invalid uses of floating-point literals in
321 (cp_parser_postfix_expression): Add cast_p parameter.
322 (cp_parser_open_square_expression): Pass it.
323 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
324 (cp_parser_unary_expression): Likewise.
325 (cp_parser_new_placement): Pass it.
326 (cp_parser_direct_new_declarator): Likewise.
327 (cp_parser_new_initializer): Likewise.
328 (cp_parser_cast_expression): Add cast_p parameter.
329 (cp_parser_binary_expression): Likewise.
330 (cp_parser_question_colon_clause): Likewise.
331 (cp_parser_assignment_expression): Likewise.
332 (cp_parser_expression): Likewise.
333 (cp_parser_constant_expression): If an integral constant
334 expression is invalid, return error_mark_node.
335 (cp_parser_expression_statement): Pass cast_p.
336 (cp_parser_condition): Likewise.
337 (cp_parser_iteration_statement): Likewise.
338 (cp_parser_jump_statement): Likewise.
339 (cp_parser_mem_initializer): Likewise.
340 (cp_parser_template_argument): Likewise.
341 (cp_parser_parameter_declaration): Likewise.
342 (cp_parser_initializer): Likewise.
343 (cp_parser_throw_expression): Likewise.
344 (cp_parser_attribute_list): Likewise.
345 (cp_parser_simple_cast_expression): Likewise.
346 (cp_parser_functional_cast): Likewise.
347 (cp_parser_late_parsing_default_args): Likewise.
348 (cp_parser_sizeof_operand): Save/restore
349 non_integral_constant_expression_p.
351 2005-01-31 Mike Stump <mrs@apple.com>
353 * parser.c (cp_lexer_new_main): Get the first token, first, before
356 2005-01-31 Mark Mitchell <mark@codesourcery.com>
358 * decl.c (start_decl): Add missing parentheses.
360 2005-01-30 Mark Mitchell <mark@codesourcery.com>
363 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
364 * decl.c (duplicate_decls): Do not discard
365 DECL_IMPLICIT_INSTANTIATION when merging declarations.
366 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
367 variables that do not have DECL_USE_TEMPLATE.
370 * decl.c (grokdeclarator): Refactor code so that qualified names
371 are never allowed as the declarator in a typedef.
374 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
375 builtin declarations.
378 * call.c (convert_like_real): Inline call to
379 dubious_conversion_warnings here.
380 * cp-tree.h (dubious_conversion_warnings): Remove.
381 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
382 setting TREE_NEGATED_INT.
383 * typeck.c (dubious_conversion_warnings): Remove.
386 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
389 2005-01-28 Mark Mitchell <mark@codesourcery.com>
392 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
396 * pt.c (redeclare_class_template): Robustify.
398 2005-01-27 Steven Bosscher <stevenb@suse.de>
400 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
401 instead of SWITCH_EXPR ones.
402 * pt.c (tsubst_expr): Likewise.
403 * semantics.c (begin_switch_stmt, finish_switch_cond,
404 finish_switch_stmt): Likewise.
406 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
409 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
411 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
413 * class.c (abort_fndecl_addr): New variable.
414 (build_vtbl_initializer): If we have a pure virtual function
415 share the abort function's address.
416 Include gt-cp-class.h at the end.
417 * config-lang.in (gtfiles): Add cp/class.c.
419 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
421 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
422 (pp_cxx_function_definition): Make static.
423 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
424 (pp_cxx_function_definition): Likewise.
426 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
428 * name-lookup.c (print_binding_level): Make static.
429 (constructor_name_full): Make static inline.
430 (current_decl_namespace): Make static.
431 * name-lookup.h (constructor_name_full): Remove prototype.
432 (print_binding_level): Likewise.
433 (current_decl_namespace): Likewise.
435 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
437 * decl.h (debug_bindings_indentation): Remove.
439 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
441 * typeck.c: Fix a comment typo.
443 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
446 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
448 (tsubst): Use fold_decl_constant_value in place of a bare call to
449 integral_constant_value.
451 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
453 * typeck.c (more_qualified_p): Remove.
454 * cp-tree.h: Remove the corresponding prototype.
456 2005-01-19 Matt Austern <austern@apple.com>
458 * typeck.c (comptypes): Handle return code from objc_comptypes
461 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
463 * cp-tree.h, name-lookup.h: Remove unused prototypes.
465 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
468 * semantics.c (finish_id_expression): Disable access checking for
469 already lookuped FIELD_DECL.
471 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
473 * decl.c (delete_block): Remove.
474 * cp-tree.h: Remove the corresponding prototype.
476 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
477 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
479 * cp-tree.h: Remove the corresponding prototypes.
481 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
482 cp_update_decl_after_saving, name_p): Remove.
483 * cp-tree.h: Remove the corresponding prototypes.
485 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
488 * semantics.c (finish_asm_stmt): Strip nops off
489 input memory operands.
491 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
493 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
494 typeck2.c: Update copyright.
496 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
498 * class.c (get_enclosing_class): Remove.
499 * cp-tree.h: Remove the corresponding prototypes.
501 * cvt.c (convert_lvalue): Remove.
502 * cp-tree.h: Remove the corresponding prototype.
504 * pt.c (tinst_for_decl): Remove.
505 * cp-tree.h: Remove the corresponding prototypes.
507 * tree.c (hash_chainon): Remove.
508 * cp-tree.h: Remove the corresponding prototypes.
510 2005-01-15 Jakub Jelinek <jakub@redhat.com>
513 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
514 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
516 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
518 * Make-lang.in (cp-warn): Don't append $(WERROR).
520 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
522 * cp-tree.h: Fix a comment typo.
524 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
527 * pt.c (tsubst_qualified_id): Call convert_from_reference.
529 2005-01-06 Mark Mitchell <mark@codesourcery.com>
532 * class.c (add_implicitly_declared_members): Remove dead code.
533 * decl.c (grokfndecl): Add sfk parameter. Use it do set
535 (grokdeclarator): Adjust calls to grokfndecl.
536 * method.c (implicitly_declare_fn): Improve documentation.
537 * parser.c (cp_parser_direct_declarator): Do not consider a
538 function to be a constructor if the containing class was
539 originally anonymous.
541 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
544 * search.c (lookup_field_1): Handle using declaration in
545 class template partial specialization.
547 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
550 * pt.c (push_access_scope): Handle friend defined in class.
551 (pop_access_scope): Likewise.
553 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
556 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
557 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
558 array-new handling code. Use build_x_binary_op.
560 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
563 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
564 * name-lookup.h (push_scope): Return pushed scope, not flag.
565 * name-lookup.c (push_scope): Return scope that should be popped,
567 * decl.c (start_decl): Adjust.
568 (grokfndecl): Adjust scope push and pop.
569 * decl2.c (check_classfn): Likewise.
570 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
571 cp_parser_init_declarator, cp_parser_direct_declarator,
572 cp_parser_class_specifier, cp_parser_class_head,
573 cp_parser_lookup_name,
574 cp_parser_constructor_declarator_p): Likewise.
575 * pt.c (instantiate_class_template,
576 resolve_typename_type): Likewise.
578 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
581 * parser.c (cp_parser_unqualified_id): Do not issue error message
582 for typedef-name as destructor declarator when performing an
583 uncommitted tentative parse.
585 2005-01-01 Steven Bosscher <stevenb@suse.de>
588 * decl.c (finish_function): Fix comment. Annotate the compiler
589 generated return with the current file name and line 0.
591 2004-12-31 Richard Henderson <rth@redhat.com>
594 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
595 * class.c (build_vtable): Don't conditionallize setting it
596 based on DWARF2_DEBUG.
597 (layout_class_type): Set DECL_IGNORED_P.
598 * decl2.c (get_guard): Likewise.
599 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
600 * tree.c (build_local_temp): Likewise.
602 2004-12-30 Mark Mitchell <mark@codesourcery.com>
604 * cp-tree.h (cp_declarator): Split "name" field into
605 qualifying_scope and unqualified_name.
606 * decl.c (get_scope_of_declarator): Adjust accordingly.
607 (grokdeclarator): Likewise.
608 * decl2.c (grokfield): Likewise, and adjust call to
610 * name-lookup.c (do_class_using_decl): Split "decl" into
611 "scope" and "name". Remove unnecessary code.
612 * name-lookup.h (do_class_using_decl): Adjust declaration.
613 * parser.c (make_id_declarator): Split "id" into qualifying_scope
614 and unqualified_name.
615 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
616 (cp_parser_direct_declarator): Adjust to handle the fact that
617 cp_parser_declarator_id no longer returns a SCOPE_REF.
618 (cp_parser_direct_declarator): Likewise.
619 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
621 (cp_parser_member_declaration): Adjust call to make_id_declarator.
622 (cp_parser_check_declarator_template_parameters): Do not expect a
625 * decl.c (duplicate_decls): Call ggc_free on declarations we will
626 not be needing any longer.
629 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
631 2004-12-28 Richard Henderson <rth@redhat.com>
634 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
635 constraints. Mark memory inputs addressable.
637 2004-12-27 Jason Merrill <jason@redhat.com>
639 * decl.c (expand_static_init): Don't use shortcut if
640 targetm.relaxed_ordering.
642 2004-12-27 Mark Mitchell <mark@codesourcery.com>
645 * decl.c (check_tag_decl): Robustify.
647 2004-12-23 Mark Mitchell <mark@codesourcery.com>
650 * parser.c (cp_parser_error): Issue better messages about
651 #pragma in locations where it is not permitted.
654 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
656 * cvt.c (convert_to_void): Fix typo in comment.
658 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
661 * pt.c (check_explicit_specialization): Use the argument list from
662 the definition in a template function specialization definition.
664 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
667 * pt.c (check_explicit_specialization): Use special logic to validate
668 befriended specializations.
670 2004-12-22 Mark Mitchell <mark@codesourcery.com>
672 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
675 * call.c (build_this): In templates, do not bother with
677 * typeck.c (unary_complex_lvalue): In a template, always refuse
681 * cp-gimplify.c (cp_genericize): Relax assertion.
684 * cvt.c (convert_to_void): Warn about unused values.
687 * rtti.c (emit_support_tinfos): On systems without weak symbols,
688 emit the runtime library type-info objects as non-COMDAT.
690 2004-12-21 Mark Mitchell <mark@codesourcery.com>
693 * call.c (convert_like_real): Do not permit the use of a copy
694 constructor to copy a packed field.
697 * decl.c (grokdeclarator): Return error_mark_node, not
698 void_type_node, to indicate errors.
699 * parser.c (cp_parser_template_parameter_list): Robustify.
700 (cp_parser_template_parameter): Likewise.
703 * tree.c (cp_tree_equal): Handle OVERLOAD.
705 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
707 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
708 * name-lookup.c (pushdecl_class_level): Likewise.
710 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
712 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
714 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
717 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
718 check to see if contains the pointer. Insert the statement before
721 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
724 * decl.c (check_initializer): Check string initializer of array is
726 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
727 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
728 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
730 * cp-tree.def (TEMPLATE_TYPE_PARM,
731 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
732 for better code efficiency.
733 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
734 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
735 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
736 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
737 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
738 TYPE_PTROBV_P): Likewise.
741 * method.c (do_build_copy_constructor): Refactor. Don't const
742 qualify a mutable field.
743 (do_build_assign_ref): Likewise.
745 2004-12-20 Matt Austern <austern@apple.com>
748 * decl.c (make_rtl_for_nonlocal_decl): Use
749 set_builtin_user_assembler_name.
751 2004-12-19 Mark Mitchell <mark@codesourcery.com>
753 * cp-tree.h (note_decl_for_pch): New function.
754 * class.c (build_clone): Call note_decl_for_pch.
755 * semantics.c (finish_member_declaration): Likewise.
756 (note_decl_for_pch): New function.
758 2004-12-17 Steven Bosscher <stevenb@suse.de>
760 * init.c (build_zero_init): max_index is the number of
763 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
766 * class.c (add_method): Do not push conversion operators into a
769 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
770 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
772 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
775 * cp-tree.h (integral_constant_value): Declare.
776 * call.c (null_ptr_cst_p): Use integral_constant_value, not
778 (convert_like_real): Likewise.
779 * class.c (check_bitfield_decl): Likewise.
780 * cvt.c (ocp_convert): Likewise.
781 (convert): Remove unnecessary decl_constant_value call.
782 * decl.c (compute_array_index_type): Use integral_constant_value,
783 not decl_constant_value.
784 (build_enumerator): Likewise.
785 * decl2.c (grokfield): Likewise.
786 * init.c (decl_constant_value): Simplify.
787 (integral_constant_value): New.
788 * pt.c (fold_decl_constant_value): Use integral_constant_value,
789 remove subsequent check.
790 (tsubst): Use integral_constant_value, not decl_constant_value.
791 (tsubst_copy, unify): Likewise.
792 * typeck.c (decay_conversion): Likewise.
793 (build_compound_expr): Remove unnecessary decl_constant_value
795 (build_static_cast_1, build_reinterpret_cast_1):
796 (convert_for_assignment): Remove comment about not calling
799 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
802 * pt.c (instantiate_class_template): Set input_location for
804 (tsubst_friend_function): Don't set input_location here.
805 Make sure the context is complete if necessary.
807 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
810 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
813 2004-12-14 Mark Mitchell <mark@codesourcery.com>
816 * decl.c (make_typename_type): Do not handle namespace-scoped
818 (tag_name): Handle typename_type.
819 (check_elaborated_type_specifier): Handle typenames.
820 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
822 (cp_parser_elaborated_type_specifier): Use
823 cp_parser_diagnose_invalid_type_name.
825 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
828 * init.c (build_zero_init): If the max_index is 0, there is no
829 need to create a RANGE_EXPR.
831 2004-12-14 Mark Mitchell <mark@codesourcery.com>
834 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
836 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
839 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
840 REFERENCE_REF_P is dereferencing a reference type.
841 * typeck.c (build_static_cast): Convert from reference even in a
843 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
845 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
847 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
848 (cp_parser_name_lookup_error): Use it.
849 (cp_parser_check_for_invalid_template_id): Likewise.
850 (cp_parser_skip_to_closing_parenthesis): Likewise.
851 (cp_parser_nested_name_specifier_opt): Likewise.
852 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
853 (cp_parser_parameter_declaration_list): Likewise.
854 (cp_parser_parameter_declaration): Likewise.
855 (cp_parser_template_name): Let cp_parser_simulate_error perform
857 (cp_parser_committed_to_tentative_parse): Remove.
859 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
862 * class.c (build_base_path): Convert the zero constant to the correct
865 2004-12-13 Mark Mitchell <mark@codesourcery.com>
868 * class.c (layout_class_type): Determine the visibility of static
871 2004-12-12 Roger Sayle <roger@eyesopen.com>
874 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
875 condition is a constant and the unexecuted clause is empty.
877 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
880 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
882 2004-12-09 Matt Austern <austern@apple.com>
885 * name-lookup.c (do_nonmember_using_decl): A real function
886 declaration takes precedence over an anticipated declaration.
888 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
890 * parser.c (cp_parser_member_declaration): Fix comment typo.
892 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
895 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
898 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
901 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
903 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
906 * init.c (build_zero_init): Build a RANGE_EXPR for an array
909 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
911 * typeck.c: Remove DOS line endings.
913 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
916 * decl.c (lookup_and_check_tag): Diagnose nested class with
917 the same name as enclosing class.
919 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
922 * cp-tree.h (REFERENCE_REF_P): New.
923 (CPTI_TYPE_INFO_TYPE): Rename to ...
924 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
925 (CPTI_TYPE_INFO_REF_TYPE): Remove.
926 (type_info_type_node): Rename to ...
927 (const_type_info_type_node): ... here.
928 (type_info_ref_type): Remove.
929 * call.c (build_user_type_conversion): Reformat.
930 (resolve_args): Do not convert_from_reference.
931 (build_object_call): Call convert_from_reference.
932 (prep_operand): Do not convert_from_reference.
933 (build_new_method_call): Likewise.
934 * class.c (build_vfield_ref): Likewise.
935 * cvt.c (convert_to_reference): Likewise.
936 (convert_from_reference): Build INDIRECT_REF here, not with
938 (convert_force): Do not convert_from_reference.
939 (build_expr_type_conversion): Likewise.
940 * decl.c (grok_reference_init): Likewise.
941 * decl2.c (delete_sanity): Likewise.
942 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
943 * init.c (build_dtor_call): Do not convert_from_reference.
944 * parser.c (cp_parser_template_argument): Unwrap indirected
945 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
946 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
947 convert_from_reference, if indicated.
948 <case CALL_EXPR>: Do not convert_from_reference.
949 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
950 (tsubst_initializer_list): Do not convert_from_reference.
951 * rtti.c (init_rtti_processing): Adjust node creation.
952 (throw_bad_typeid): Use const_type_info_type_node.
953 Do not convert_from_reference.
954 (typeid_ok_p): Use const_type_info_type_node.
955 (build_typeid, get_typeid): Always return type_info typed node.
956 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
957 * semantics.c (finish_stmt_expr_expr): Do not
958 convert_from_reference.
959 (finish_id_expression): Convert_from_reference as appropriate.
960 * typeck.c (decay_conversion): Do not convert_from_reference.
961 (finish_class_member_access_expr): Likewise.
962 (build_indirect_ref): Use POINTER_TYPE_P.
963 (convert_arguments): Do not convert_from_reference.
964 (build_modify_expr): Likewise.
965 (convert_for_initialization): Likewise.
966 * typeck2.c (build_x_arrow): Likewise.
968 2004-12-07 Ziemowit Laski <zlaski@apple.com>
970 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
971 field to 'objc_info'.
973 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
975 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
977 2004-12-07 Roger Sayle <roger@eyesopen.com>
979 * name-lookup.c (leave_scope): We only need to update
980 class_binding_level when leaving a class scope.
982 2004-12-06 Ziemowit Laski <zlaski@apple.com>
984 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
986 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
988 PR c++/17011, c++/17971
989 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
991 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
992 error_mark_node after member substitution.
993 * semantics.c (finish_id_expression): Call
994 finish_non_static_data_member for non-dependent FIELD_DECL.
996 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
999 * decl.c (grokdeclarator): Make sure class in pointer to member is
1002 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1005 * parser.c (cp_parser_new_type_id): Move array size expression
1006 checks from here ...
1007 * init.c (build_new): ... to here.
1009 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
1012 * parser.c (cp_parser_class_head): Return NULL_TREE when
1013 push_template_decl fails. Update comment.
1015 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1017 PR c++/15664, c++/18276
1018 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
1019 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1021 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1024 * parser.c (cp_parser_type_specifier): Catch template declaration
1027 2004-12-01 Matt Austern <austern@apple.com>
1029 * name-lookup.c (namespace_binding): Omit alias check for global
1032 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
1035 * parser.c (cp_parser_class_name): Check decl's type is not
1039 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1040 derived to base conversion when checking constructor
1042 (implicit_conversion): Pass FLAGS to standard_conversion.
1043 (check_constructir_callable): Disallow conversion functions.
1045 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
1047 * parser.c: Fix comment typos.
1049 2004-11-27 Mark Mitchell <mark@codesourcery.com>
1052 * parser.c (cp_parser_check_for_definition_in_return_type): Take
1053 the defined type as a parameter, and inform the user about the
1054 possibility of a missing semicolon.
1055 (cp_parser_explicit_instantiation): Adjust call to
1056 cp_parser_check_for_definition_in_return_type.
1057 (cp_parser_init_declarator): Likewise.
1058 (cp_parser_member_declaration): Likewise.
1061 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1062 typename from comments.
1063 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1064 (TYPENAME_IS_CLASS_P): Likewise.
1065 (make_typename_type): Change prototype.
1066 * decl.c (struct_typename_info): New type.
1067 (typename_compare): Expect the second argument to be a
1068 typename_info, not a tree.
1069 (build_typename_type): Add tag_type parameter. Do not create a
1070 new type until necessary.
1071 (make_typename_type): Add tag_type parameter.
1072 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1074 * friend.c (make_friend_class): Adjust call to make_typename_type.
1075 * parser.c (cp_parser_make_typename_type): Likewise.
1076 (cp_parser_primary_expression): Adjust call to
1077 cp_parser_lookup_name.
1078 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1079 (cp_parser_class_or_namespace_name): Likewise.
1080 (cp_parser_postfix_expression): Adjust calls to
1082 (cp_parser_mem_initializer_id): Adjust calls to
1083 cp_parser_class_name.
1084 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1085 (cp_parser_template_name): Likewise.
1086 (cp_parser_template_argument): Likewise.
1087 (cp_parser_type_name): Adjust call to cp_parser_class_name.
1088 (cp_parser_elaborated_type_specifier): Adjust calls to
1089 make_typename_type and cp_parser_lookup_name.
1090 (cp_parser_namespace_name): Likewise.
1091 (cp_parser_class_name): Replace type_p parameter with tag_type.
1092 Adjust calls to make_typename_type and cp_parser_lookup_name.
1093 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1094 (cp_parser_base_specifier): Likewise.
1095 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1096 Adjust calls to make_typename_type and lookup_qualified_name.
1097 (cp_parser_lookup_name_simple): Adjust call to
1098 cp_parser_lookup_name.
1099 (cp_parser_constructor_declarator_p): Adjust call to
1100 cp_parser_class_name.
1101 * pt.c (convert_template_argument): Adjust all to
1103 (tsubst_decl): Do not pre-substitute the type of the declaration.
1104 (tsubst): Hand off declarations more quickly. Adjust call to
1108 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1110 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
1113 * Make-lang.in (cp/decl2.o): Update dependencies.
1114 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1116 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1119 * name-lookup.c (pushtag): Change return type to tree.
1120 * cp-tree.h (pushtag): Adjust declaration.
1121 * decl.c (xref_tag, start_enum): Use return value of pushtag.
1122 * pt.c (push_template_decl_real): Return immediately if
1123 pushdecl_namespace_level returns error_mark_node.
1125 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1127 * pt.c: Fix a comment typo.
1129 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1131 Friend class name lookup 4/n
1132 * class.c (pushclass): Don't call cxx_remember_type_decls.
1133 * cp-tree.h (clear_anon_tags): Remove declaration.
1134 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
1135 * name-lookup.c (binding_entry_free, binding_table_free): Comment
1137 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
1138 binding_table_remove_anonymous_types, cxx_remember_type_decls,
1139 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1140 lookup_tag_reverse): Remove
1141 (begin_scope, leave_scope, kept_level_p, print_binding_level):
1142 Don't use type_decls field in cp_binding_level.
1143 (maybe_process_template_type_declaration, pushtag): Set
1144 CLASSTYPE_NESTED_UTDS directly.
1145 * name-lookup.h (binding_table_remove_anonymous_types,
1146 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1148 (cp_binding_level): Remove type_decls field.
1150 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
1152 * typeck.c: Fix a comment typo.
1154 2004-11-25 Mark Mitchell <mark@codesourcery.com>
1157 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1158 unknown_type as non matching. Tidy up.
1159 * pt.c (build_non_dependent_expr): Do not build a
1160 NON_DEPENDENT_EXPR for a VAR_DECL.
1163 * cp-tree.h (lvalue_or_else): Remove declaration.
1164 * tree.c (lvalue_or_else): Remove.
1165 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1166 (build_modify_expr): Likewise.
1169 * decl.c (duplicate_decls): Return error_mark_node on error, as
1173 * decl.c (grokvardecl): Keep track of whether or not a there was
1174 explicit qualification.
1175 * name-lookup.c (set_decl_namespace): Complain about explicit
1176 qualification of a name within its own namespace.
1179 * typeck.c (check_return_expr): Robustify.
1181 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1183 Friend class name lookup 3/n, PR c++/3332
1184 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1185 (lookup_type_scope): Don't deal with name from user declaration
1187 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1188 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1191 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1193 Friend class name lookup 2/n, PR c++/14513, c++/15410
1194 * name-lookup.c (lookup_name_real): Simplify.
1195 (lookup_type_scope): Add SCOPE parameter. Handle friend class
1197 * name-lookup.h (tag_scope): New enum type.
1198 (lookup_type_scope): Adjust declaration.
1199 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1200 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1201 (start_enum): Likewise. Add assertion test that NAME is
1202 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
1204 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1205 * parser.c (cp_parser_elaborated_type_specifier,
1206 cp_parser_class_head): Adjust call to xref_tag.
1207 * pt.c (lookup_template_class, instantiate_class_template):
1209 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1210 tinfo_base_init, emit_support_tinfos): Likewise.
1212 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1214 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1216 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1219 * name-lookup.c (supplement_binding): Do not allow typedefs to be
1220 redefined in class scope.
1223 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1224 redefinitions of builtin types other that "bool" or "wchar_t".
1226 2004-11-24 Steven Bosscher <stevenb@suse.de>
1228 * decl.c (cxx_init_decl_processing): Don't clear
1229 flag_inline_functions.
1231 2004-11-24 Mark Mitchell <mark@codesourcery.com>
1233 * pt.c (tsubst_function_type): Do not permit function types which
1234 return arrays or functions.
1237 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1240 * cp-tree.h (CTOR_NAME): Remove.
1241 (DTOR_NAME): Remove.
1242 * decl.c (initialize_predefined_identifiers): Add spaces to the
1243 end of constructor and destructor names.
1245 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1248 * decl.c (start_decl): Check for invalid specialization headers.
1250 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
1254 * call.c (standard_conversion): Move check for conversions between
1256 * typeck.c (ptr_reasonably_similar): ... here.
1258 2004-11-23 Ben Elliston <bje@au.ibm.com>
1260 * cp-tree.h (context_as_string): Remove extern.
1261 * error.c (context_as_string): Remove.
1263 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
1264 * lex.c (cp_type_qual_from_rid): Remove.
1266 * cp-tree.h (do_poplevel): Remove extern.
1267 (check_multiple_declarators): Likewise.
1268 * semantics.c (do_poplevel): Make static.
1269 (check_multiple_declarators): Remove.
1271 * cp-tree.h (check_final_overrider): Remove extern.
1272 * search.c (check_final_overrider): Make static.
1274 * cp-tree.h (build_artificial_parm): Remove extern.
1275 * decl2.c (build_artificial_parm): Make static.
1277 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1280 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
1281 Make sure the result is always a rvalue.
1283 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1285 * decl.c (start_preparsed_function): Call check_function_type even
1287 (require_complete_types_for_parms): Skip dependent types.
1288 (check_function_type): Likewise.
1290 2004-11-16 Steven Bosscher <stevenb@suse.de>
1292 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
1293 * search.c: Don't include it.
1295 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
1297 * cp-gimplify.c: Include pointer-set.h
1298 (cp_genericize_r): Use pointer_sets instead of a hashtable.
1299 Also instert the new statement for CLEANUP_STMT.
1300 (cp_genericize): Use pointer_sets instead of a hashtable.
1301 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
1303 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1305 Friend class name lookup 1/n, PR c++/18471
1306 * decl.c (lookup_and_check_tag): New function.
1307 (xref_tag, start_enum): Use it.
1308 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
1309 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
1311 * name-lookup.c (lookup_name_current_level): Rename to ...
1312 (lookup_name_innermost_nonclass_level): ... this.
1313 (lookup_type_scope): New function.
1314 * name-lookup.h (lookup_name_current_level): Rename to ...
1315 (lookup_name_innermost_nonclass_level): ... this.
1316 (lookup_type_scope): Add declaration.
1318 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1321 * pt.c (coerce_template_parms): Only emit error message about
1322 invalid template argument when TF_ERROR.
1324 2004-11-12 Mark Mitchell <mark@codesourcery.com>
1327 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
1328 error_mark_node to indicate errors.
1331 * parser.c (cp_parser_direct_declarator): Disallow non-constant
1332 array bounds when not inside a function.
1335 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
1336 unqualified name resolves to a member function.
1339 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
1340 derived class correctly.
1342 * decl2.c (import_export_decl): Fix typo in comment.
1343 * tree.c (pod_type_p): Likewise.
1345 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
1347 * typeck.c (cxx_mark_addressable): Add braces around the first if.
1349 2004-11-10 Adam Nemet <anemet@lnxw.com>
1352 * typeck.c (cxx_mark_addressable): Issue an error if address of an
1353 explicit register variable is requested.
1355 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
1358 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
1359 (struct lang_decl_flags): Add thunk_p flag.
1360 (struct lang_decl): Remove separate fixed_offset. Place
1361 cloned_function and fixed_offset into union.
1362 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
1363 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
1364 (THUNK_FIXED_OFFSET): Adjust.
1365 * method.c (make_thunk): Adjust.
1367 2004-11-09 Mark Mitchell <mark@codesourcery.com>
1370 * init.c (build_new_1): Handle parenthesized type-ids that name an
1373 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
1375 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
1376 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
1377 quoting in diagnostics.
1378 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
1379 quoting in printf format.
1380 * decl.c (duplicate_decls, start_decl): Use %qD instead of
1383 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1385 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
1386 search.c, typeck2.c: Fix comment formatting.
1388 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
1390 PR tree-optimization/18184
1391 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
1392 of different modes or alias-all flags as equivalent.
1393 * typeck.c (comptypes): Likewise.
1395 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1398 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
1399 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
1400 TYPE_REFFN_P): Document.
1401 (fold_decl_constant_value): New prototype.
1402 * pt.c (convert_nontype_argument_function): Rewrite and extract
1404 (fold_decl_constant_value, convert_nontype_argument_function): New.
1405 (lookup_template_class): Add comment about useless double call.
1406 * mangle.c (write_expression): Strip conversions before lowering
1408 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1409 enum to enum conversion.
1411 2004-11-02 Mark Mitchell <mark@codesourcery.com>
1414 * parser.c (cp_parser_type_parameter): Robustify.
1417 * parser.c (cp_parser_single_declaration): Disallow template
1421 * typeck.c (build_const_cast): Use error_operand_p.
1423 2004-11-02 Ziemowit Laski <zlaski@apple.com>
1425 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1426 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1427 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1429 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1431 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1433 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
1436 * search.c (check_final_overrider): Deprecate gnu covariant extension.
1438 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1440 Convert diagnostics to use quoting flag q 9/n
1441 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
1442 get_delta_difference): Use new quotation style.
1443 * repo.c (reopen_repo_file_for_write): Likewise.
1444 * pt.c (do_type_instantiation): Likewise.
1445 * parser.c (cp_parser_diagnose_invalid_type_name):
1446 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
1447 * error.c (cp_print_error_function,
1448 print_instantiation_full_context): Likewise.
1449 * decl.c (define_label, grok_reference_init,
1450 maybe_deduce_size_from_array_init, revert_static_member_fn):
1451 * decl2.c (check_classfn): Likewise.
1452 * class.c (add_method, check_field_decls, layout_class_type,
1453 resolve_address_of_overloaded_function): Likewise.
1454 * call.c (build_x_va_arg, build_over_call): Likewise.
1456 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1458 Convert diagnostics to use quoting flag q 8/n
1459 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
1460 convert_to_reference, ocp_convert, convert_to_void
1461 cp_convert_to_pointer): Use new quotation style.
1463 2004-10-31 Mark Mitchell <mark@codesourcery.com>
1466 * typeck2.c (store_init_value): Use split_nonconstant_init even
1467 for types that require construction.
1469 1004-10-28 Matt Austern <austern@apple.com>
1472 * cp-tree.h (class_key_or_enum_as_string): Declare.
1473 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1474 and remove static qualifier.
1475 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1476 union/enum declaration.
1478 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
1480 * pt.c: Fix a comment typo.
1482 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
1484 * typeck.c (composite_pointer_type): Remove comment about DR 195.
1485 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1486 warning when being pedantic.
1487 (build_reinterpet_cast, build_c_cast): Adjust.
1489 2004-10-29 Mark Mitchell <mark@codesourcery.com>
1492 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1493 appear in a constructor/destructor that will be cloned.
1495 1004-10-28 Matt Austern <austern@apple.com>
1498 * decl.c (finish_enum): Handle packed attribute.
1499 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1501 2004-10-28 Mark Mitchell <mark@codesourcery.com>
1504 * pt.c (instantiate_class_template): Increment
1505 processing_template_decl when substituting into a member class
1508 2004-10-27 Mark Mitchell <mark@codesourcery.com>
1511 * call.c (convert_like_real): Fix formatting.
1512 (initialize_reference): When binding a temporary to a base class,
1513 ensure that the nominal copy made is to the derived class, not the
1517 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1520 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1522 * decl.c (bad_specifiers): Move the q after the %.
1524 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1526 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1529 2004-10-26 Mark Mitchell <mark@codesourcery.com>
1531 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1532 * search.c (current_scope): Fix prototype.
1535 * search.c (current_scope): Return the innermost non-block scope,
1536 not the innermost non-block, non-namespace scope.
1537 (at_namespace_scope_p): Adjust accordingly.
1538 (dfs_accessible_post): Do not pass namespaces to is_friend.
1539 (dfs_walk_once_accessible_r): Likewise.
1540 * decl.c (grokvardecl): Adjust call to current_scope.
1541 (build_enumerator): Likewise.
1542 * parser.c (cp_parser_using_declaration): Likewise.
1543 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1545 (cp_parser_class_head): Adjust call to current_scope.
1546 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1550 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1551 their underlying values.
1554 * typeck.c (build_binary_op): Honor build_type, even when in a
1557 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
1559 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1560 padding token checking.
1562 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
1565 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1566 layout_type as it is already done by create_array_type_for_decl.
1568 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
1571 * parser.c (eof_token): Make const, correctly initialize rid and
1573 (struct cp_lexer): Replace buffer_end pointer with buffer_length
1575 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
1577 (cp_lexer_new_from_tokens): Adjust.
1578 (cp_lexer_grow_buffer): Remove.
1579 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1580 cp_lexer_purge_token): Add const casts.
1582 2004-10-21 Mark Mitchell <mark@codesourcery.com>
1586 * cp-tree.h (convert_to_base): Change prototype.
1587 (build_ptrmemfunc): Likewise.
1588 (convert_ptrmem): New function.
1589 * call.c (struct conversion): Adjust documentation for base_p.
1590 (standard_conversion): Set base_p for ck_pmem conversions as
1592 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1594 * class.c (convert_to_base): Handle both pointers and objects.
1595 Add nonnull parameter.
1596 (build_vfield_ref): Adjust call to convert_to_base.
1597 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1598 (convert_force): Likewise.
1599 * typeck.c (build_unary_op): Likewise.
1600 (convert_ptrmem): New function.
1601 (build_static_cast_1): Use it.
1602 (build_reinterpret_cast): Allow conversions to vector types.
1603 (get_delta_difference): Add c_cast_p parameter.
1604 (build_ptrmemfunc): Likewise. Adjust calls to
1605 get_delta_difference.
1607 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
1610 * error.c (cp_error_at): Output the context as it might be
1611 different file as the other location.
1613 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
1615 * typeck.c: Fix a comment typo.
1617 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1620 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1621 * cp-tree.h (make_unbound_class_template): Adjust prototype.
1622 * parser.c (cp_parser_lookup_name): Adjust call to
1623 make_unbound_class_template.
1624 (cp_parser_single_declaration): Handle member class of class
1625 template as template friend parsing correctly.
1626 * friend.c (is_friend): Call is_specialization_of_friend for
1627 template friend class.
1628 (make_friend_class): Handle member class of class template as
1630 * pt.c (is_specialization_of_friend): Likewise.
1631 (instantiate_class_template): Likewise.
1632 (tsubst): Adjust call to make_unbound_class_template.
1634 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1636 * typeck.c (composite_pointer_type): Add comment about DR 195
1637 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1638 Allow function pointer conversions that DR195 suggests.
1639 (build_reinterpret_cast, build_c_cast): Update
1640 build_reinterpret_cast_1 calls.
1642 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
1644 * call.c, typeck.c: Fix comment typos.
1646 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
1648 * parser.c (cp_token_position): New typedef. Define VEC thereof.
1649 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1650 next_token and last_token cp_token_position. Make saved_tokens a
1651 VEC(cp_token_position).
1652 (eof_token): New static variable.
1653 (CP_SAVED_TOKENS_SIZE): Rename to ...
1654 (CP_SAVED_TOKEN_STACK): ... here.
1655 (cp_lexer_new_main): Adjust main lexer creation and buffer
1657 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1658 to the parent buffer. Do not append eof token.
1659 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1661 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1662 (cp_lexer_token_position, cp_lexer_token_at): New.
1663 (cp_lexer_saving_tokens): Adjust. Make inline.
1664 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1665 (cp_lexer_peek_token_emit_debug_info): Fold into ...
1666 (cp_lexer_peek_token): ... here.
1667 (cp_lexer_peek_nth_token): Don't peek past EOF.
1668 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1670 (cp_lexer_purge_token): Adjust eof setting.
1671 (cp_lexer_purge_tokens_after): Likewise.
1672 (cp_lexer_save_tokens): Push next_token directly.
1673 (cp_lexer_commit_tokens): Adjust.
1674 (cp_lexer_rollback_tokens): Pop next_token directly.
1675 (cp_parser_check_for_invalid_template_id): Adjust token purging.
1676 (cp_parser_translation_unit): Do not consume the EOF.
1677 (cp_parser_nested_name_specifier_opt): Adjust token purging.
1678 (cp_parser_template_id, cp_parser_template_name): Likewise.
1680 2004-10-19 Mark Mitchell <mark@codesourcery.com>
1683 * call.c (struct conversion): Add base_p.
1684 (convert_like): Add c_cast_p argument.
1685 (convert_like_with_conversion): Likewise.
1686 (build_conv): Clear base_p.
1687 (standard_conversion): Set it, for derived-to-base conversions.
1688 (convert_like_real): Add c_cast_p parameter. Handle pointer
1689 conversions directly rather than relying on ocp_convert.
1690 (perform_direct_initialization_if_possible): Add c_cast_p
1692 * cp-tree.h (perform_direct_initialization_if_possible): Change
1694 (convert_member_func_to_ptr): New function.
1695 * typeck.c (check_for_casting_away_constness): Add diag_fn
1697 (build_static_cast_1): New function, split out from ...
1698 (build_static_cast): ... here. Use build_static_cast_1.
1699 (build_reinterpret_cast_1): New function, split out from ...
1700 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
1701 (build_const_cast_1): New function, split out from ...
1702 (build_const_cast): ... here. Use build_const_cast_1.
1703 (build_c_cast): Rewrite to use build_const_cast_1,
1704 build_static_cast_1, and build_reinterpret_cast_1.
1705 (convert_member_func_to_ptr): New function.
1707 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
1710 * parser.c (enum cp_parser_prec): Give relational expressions
1711 a higher precedence than equality expressions.
1713 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
1715 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
1716 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
1717 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
1718 (enum base_access): Reorganize.
1719 (accessible_base_p, accessible_p): Add consider_local_p parameter.
1720 * call.c (standard_conversion): Update comment about
1722 (enforce_access): Adjust accessible_p call.
1723 (build_over_call): Adjust accessible_base_p call.
1724 * class.c (convert_to_base): Adjust lookup_base call.
1725 (build_vtbl_ref_1): Likewise.
1726 (warn_about_ambiguous_bases): Likewise. Add early exit.
1727 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
1728 * search.c (accessible_base_p): Add consider_local_p parameter.
1729 (lookup_base): Pass consider_local_p to accessible_base_p call.
1730 (friend_accessible_p): Check whether scope is a class member.
1731 Remove unnecessary class template check.
1732 (accessible_p): Add consider_local_p parameter. Use it.
1733 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
1734 * tree.c (maybe_dummy_object): Likewise.
1735 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
1736 (build_class_member_access_expr): Adjust lookup_base call.
1737 * typeck2.c (binfo_or_else): Likewise.
1738 * rtti.c (build_dynamic_cast_1): Access can consider friendship
1741 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1744 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
1746 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1749 * parser.c (cp_parser_parenthesized_expression_list): Fold
1750 non-dependent expressions in attribute lists.
1752 2004-10-15 Mark Mitchell <mark@codesourcery.com>
1755 * decl.c (declare_global_var): Use the return value from pushdecl.
1758 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
1759 type names if we have already found a valid type.
1760 (cp_parser_member_declaration): Likewise.
1763 * parser.c (cp_parser_member_specification_opt): Handle
1766 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1768 * dump.c, g++spec.c, repo.c: Update copyright.
1770 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1772 * decl.c: Fix a comment typo.
1774 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1777 * name-lookup.c (parse_using_directive): If we have a
1778 error_mark_node, do not set the decl namespace associations
1781 2004-10-14 Mark Mitchell <mark@codesourcery.com>
1784 * decl.c (cp_finish_decl): Do not call expand_static_init more
1785 than once for a single variable.
1787 2004-10-14 Matt Austern <austern@apple.com>
1789 * Make-lang.in (pt.o): depends on pointer-set.h
1790 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
1791 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
1792 (for_each_template_parm): Convert from htab_t to pointer_set_t.
1793 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
1795 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
1798 * semantics.c (finish_for_expr): Convert expression to void
1799 so that we don't create temporaries for a?b:c.
1801 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
1803 * search.c: Fix a comment typo.
1805 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
1807 * class.c (dfs_modify_vtables): Simplify condition. Return
1808 dfs_skip_bases as appropriate.
1809 (modify_all_vtables): Walk in pre-order.
1810 * search.c (dfs_walk_all, dfs_walk_once_r,
1811 dfs_walk_once_accessible_r): Assert post order function never
1812 returns dfs_skip_bases.
1814 * search.c (struct lookup_base_data_s): New.
1815 (lookup_base_r): Replace with ...
1816 (dfs_lookup_base): ... this.
1817 (lookup_base): Use dfs_walk_all.
1819 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
1821 * search.c: Fix comment typos.
1823 2004-10-11 Mark Mitchell <mark@codesourcery.com>
1826 * parser.c (cp_parser_declarator): Add member_p parameter.
1827 (cp_parser_condition): Adjust calls to cp_parser_declarator.
1828 (cp_parser_explicit_instantiation): Likewise.
1829 (cp_parser_init_declarator): Likewise.
1830 (cp_parser_direct_declarator): Add member_p parameter. Do not
1831 parse tentatively when parsing the parameters to a member.
1832 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1833 (cp_parser_parameter_declaration): Likewise.
1834 (cp_parser_member_declaration): Likewise.
1835 (cp_parser_exception_declaration): Likewise.
1838 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1839 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1840 for members of partial or explicit specializations.
1843 * decl2.c (finish_anon_union): Robustify.
1845 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
1847 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1848 (dcast_base_hint): ... here.
1849 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1850 * search.c (struct dcast_data_s): New.
1851 (dynamic_cast_base_recurse): Remove. Replace with ...
1852 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1853 (get_dynamic_cast_base_type): Rename to ...
1854 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
1855 (accessible_r): Remove.
1856 (dfs_accessible_post): New, broken out of accessible_r.
1857 (accessible_p): Use dfs_walk_once_accessible.
1858 (dfs_walk_once_accessible_r): New. From accessible_r.
1859 (dfs_walk_once_accessible): New. From acessible_p.
1861 * cp-tree.h (SAME_BINFO_TYPE_P): New.
1862 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1864 (convert_to_base_statically, determine_primary_bases,
1865 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1866 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1867 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1868 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1869 * init.c (expand_member_init): Likewise.
1870 * search.c (lookup_base_r, dynamic_cast_base_recurse,
1871 binfo_via_virtual, copied_binfo, binfo_for_vbase,
1872 original_binfo): Likewise.
1873 * tree.c (copy_binfo): Likewise.
1875 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
1877 * semantics.c: Fix comment typos.
1879 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1884 * semantics.c (maybe_cleanup_point_expr): Call
1885 fold_build_cleanup_point_expr.
1886 (maybe_cleanup_point_expr_void): New function.
1887 (add_decl_expr): Call maybe_cleanup_point_expr_void.
1888 (finish_expr_stmt): Likewise.
1889 (finish_return_stmt): Likewise.
1890 (finish_for_expr): Likewise.
1891 (finish_asm_stmt): Likewise.
1892 * typeck.c (condition_conversion): Call
1893 fold_build_cleanup_point_expr.
1895 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
1898 * semantics.c (add_decl_expr): If the decl has a size which
1899 has side effects then the decl expression needs a cleanup point.
1901 2004-10-10 Mark Mitchell <mark@codesourcery.com>
1904 * decl.c (grokdeclarator): Robustify error-recovery on invalid
1907 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1909 Convert diagnostics to use quoting flag q 7/n
1910 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1911 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
1912 string_conv_p, build_class_member_access_expr,
1913 build_class_member_access_expr, lookup_destructor,
1914 finish_class_member_access_expr, build_indirect_ref,
1915 get_member_function_from_ptrfunc, build_function_call,
1916 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
1917 check_for_casting_away_constness, build_static_cast,
1918 build_reinterpret_cast, build_const_cast, build_c_cast,
1919 build_modify_expr, get_delta_difference, build_ptrmemfunc,
1920 dubious_conversion_warnings, convert_for_assignment,
1921 convert_for_initialization,
1922 maybe_warn_about_returning_address_of_local, check_return_expr):
1925 * typeck2.c (error_not_base_type, readonly_error,
1926 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
1927 store_init_value, digest_init, build_x_arrow,
1928 build_m_component_ref, require_complete_eh_spec_types): Likewise.
1930 * tree.c (cp_build_qualified_type_real,
1931 handle_java_interface_attribute, handle_init_priority_attribute):
1934 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
1935 finish_pseudo_destructor_expr,
1936 check_template_template_default_arg, begin_class_definition,
1937 finish_base_specifier, qualified_name_lookup_error,
1938 finish_id_expression, finish_typeof): Likewise.
1940 * search.c (lookup_base, check_final_overrider,
1941 look_for_overrides_r): Likewise.
1943 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1945 2004-10-09 Mark Mitchell <mark@codesourcery.com>
1948 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1952 * init.c (build_new): Correct comments.
1953 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1957 * parser.c (cp_parser_postfix_dot_deref_expression): If the
1958 pseduo-destructor-name production does not work, fall back to the
1959 ordinary production.
1962 * tree.c (cp_tree_equal): Handle a BASELINK.
1965 * cp-tree.h (check_var_type): New function.
1966 * decl.c (check_var_type): New function, split out from ...
1967 (grokdeclarator): ... here.
1968 * pt.c (tsubst_decl): Use check_var_type.
1971 * decl.c (grokdeclarator): Disallow declarations of operators as
1974 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1977 * error.c (dump_expr): Add missing case for RDIV_EXPR.
1979 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
1981 * pt.c, search.c: Fix comment typos.
1983 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
1985 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
1987 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
1988 * class.c (struct find_final_overrider_data): Remove most_derived,
1989 vpath_list and vpath fields. Add path field.
1990 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
1991 (dfs_find_final_overrider): Rename to ...
1992 (dfs_find_final_overrider_pre): ... here. Adjust.
1993 (dfs_find_final_overrider_post): Adjust.
1994 (dfs_find_final_overrider_q): Fold into
1995 dfs_find_final_overrider_pre.
1996 (find_final_overrider): Adjust dfs searching.
1997 (dfs_modify_vtables): Don't mark binfo here.
1998 (modify_all_vtables): Use dfs_walk_once.
1999 (build_vtt_inits): Likwise. Use dfs_walk_all.
2000 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2001 Return dfs_skip_bases as appropriate.
2002 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2003 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2004 appropriate. Don't mark binfo here.
2005 (initialize_vtbl_ptrs): Use dfs_walk_once.
2006 * search.c (struct vbase_info): Remove unused struct.
2007 (access_in_type): Use dfs_walk_once.
2008 (dfs_access_in_type): Don't mark binfo here.
2009 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2011 (accessible_r): ... here. New. Specialize dfs_walk_once.
2012 (accessible_p): Use accessible_r.
2013 (lookup_field_queue_p): Remove. Fold into ...
2014 (lookup_field_r): ... here. Adjust.
2015 (lookup_member): Use dfs_walk_all.
2016 (dfs_walk_real, dfs_walk): Replace with ...
2017 (dfs_walk_all, dfs_walk_once): ... these.
2018 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2019 (dfs_unmark, unmarkedp, markedp): Remove.
2020 (dfs_get_pure_virtuals): Don't mark binfo here.
2021 (get_pure_virtuals): Use dfs_walk_once.
2022 (dfs_debug_unmarked_p): Remove. Fold into ...
2023 (dfs_debug_mark): ... here.
2024 (note_debug_info_needed): Use dfs_walk_all.
2026 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2028 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2029 CLEANUP_POINT_EXPR to get the asm expression.
2031 2004-10-07 Mark Mitchell <mark@codesourcery.com>
2033 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2034 (DECL_MEMBER_TEMPLATE_P): New macro.
2035 (is_member_template): Remove.
2036 (class_method_index_for_fn): New function.
2037 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2038 * class.c (finish_struct_methods): Remove out-of-date comment.
2039 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2040 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2041 class_method_index_for_fn.
2042 * pt.c (is_member_template): Remove.
2043 (is_member_template_class): Likewise.
2044 (optimize_specialization_lookup_p): New function.
2045 (retrieve_specialization): Optimize lookups for members that are
2046 not member templates.
2047 (register_specialization): Adjust accordingly.
2048 (build_template_decl): Add member_template_p parameter. Set
2049 DECL_MEMBER_TEMPLATE_P.
2050 (process_partial_specialization): Adjust call to
2051 retrieve_specialization.
2052 (push_template_decl_real): Determine whether the template is a
2054 (lookup_template_class): Use retrieve_specialization.
2055 (tsubst_decl): Adjust call to retrieve_specialization.
2056 (tsubst_exception_specification): New function.
2058 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2059 (instantiate_template): Adjust call to retrieve_specialization.
2060 (regenerate_decl_from_template): Do not actually generate a new
2062 (instantiate_decl): Adjust call to retrieve_specialization.
2063 (class_method_index_for_fn): New method.
2065 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
2067 * parser.c (cp_parser_asm_definition): Look passed the
2068 CLEANUP_POINT_EXPR to get the asm expression.
2070 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
2073 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2076 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
2078 Convert diagnostics to use quoting flag q 6/n
2079 * pt.c (finish_member_template_decl, check_specialization_scope,
2080 maybe_process_partial_specialization, determine_specialization,
2081 check_explicit_specialization, maybe_check_template_type,
2082 process_partial_specialization, check_default_tmpl_args,
2083 push_template_decl_real, redeclare_class_template,
2084 convert_nontype_argument, coerce_template_parms,
2085 lookup_template_class, push_tinst_level,
2086 instantiate_class_template, tsubst_arg_types,
2087 tsubst_function_type, tsubst, tsubst_qualified_id,
2088 tsubst_copy_and_build, check_instantiated_args,
2089 do_decl_instantiation, do_type_instantiation,
2090 invalid_nontype_parm_type_p, check_specialization_namespace,
2091 convert_template_argument, determine_specialization,
2092 check_template_shadow, tsubst_decl
2093 instantiate_pending_templates): Use quoting marks.
2095 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
2098 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2099 unqualified lookup finds a member function.
2101 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2103 Convert diagnostics to use quoting flag q 5/n
2104 * parser.c (cp_parser_name_lookup_error,
2105 cp_parser_diagnose_invalid_type_name,
2106 cp_parser_primary_expression, cp_parser_unqualified_id,
2107 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2108 cp_parser_jump_statement, cp_parser_simple_declaration,
2109 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2110 cp_parser_type_parameter, cp_parser_template_id,
2111 cp_parser_template_name, cp_parser_direct_declarator,
2112 cp_parser_parameter_declaration_list, cp_parser_class_head,
2113 cp_parser_base_specifier, cp_parser_lookup_name,
2114 cp_parser_late_parsing_default_args,
2115 cp_parser_optional_template_keyword
2116 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2117 cp_parser_check_access_in_redeclaration): Use quoting marks.
2119 * name-lookup.c (supplement_binding, pushdecl,
2120 check_for_out_of_scope_variable, validate_nonmember_using_decl,
2121 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2122 push_namespace, do_namespace_alias, do_using_directive,
2123 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2125 * method.c (use_thunk): Likewise.
2127 * lex.c (unqualified_name_lookup_error,
2128 unqualified_fn_lookup_error): Likewise.
2130 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2132 Convert diagnostics to use quoting flag q 4/n
2133 * except.c (decl_is_java_type, build_throw,
2134 is_admissible_throw_operand, check_handlers_1, check_handlers):
2135 Use quoting formats.
2136 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
2137 * init.c (sort_mem_initializers, emit_mem_initializers,
2138 member_init_ok_or_else, expand_member_init, is_aggr_type,
2139 build_offset_ref, build_java_class_ref): Likewise.
2141 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2143 Convert diagnostics to use quoting flag q 3/n
2144 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2145 redeclaration_error_message, lookup_label, check_goto,
2146 make_typename_type, make_unbound_class_template,
2147 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
2148 grok_reference_init, layout_var_decl, maybe_commonize_var,
2149 check_for_uninitialized_const_var, reshape_init_array,
2150 reshape_init, check_initializer, cp_finish_decl,
2151 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
2152 check_static_variable_definition, compute_array_index_type,
2153 create_array_type_for_decl, check_special_function_return_type,
2154 grokdeclarator, check_default_argument, grokparms,
2155 grok_ctor_properties, grok_op_properties,
2156 check_elaborated_type_specifier, xref_tag, finish_enum,
2157 build_enumerator, check_function_type, start_preparsed_function,
2158 store_parm_decls): Use quoting formats.
2159 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
2160 check_java_method, check_classfn, finish_static_data_member_decl,
2161 grokfield, grokbitfield, grok_function_init,
2162 build_anon_union_vars, coerce_new_type, coerce_delete_type,
2163 check_default_args): Likewise.
2164 * parser.c (cp_parser_decl_specifier_seq): Likewise.
2166 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2168 Convert diagnostics to use quoting flag q 2/n
2169 * class.c (build_base_path, add_method, alter_access,
2170 handle_using_decl, check_bases,
2171 maybe_warn_about_overly_private_class, find_final_overrider,
2172 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2173 check_bitfield_decl, check_field_decls, layout_empty_base,
2174 build_base_field, check_methods, layout_virtual_bases,
2175 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2176 resolve_address_of_overloaded_function, instantiate_type,
2177 note_name_declared_in_class): Use format flag "q" for quoting.
2179 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2181 Convert diagnostics to use quoting flag q 1/n
2182 * error.c (locate_error): Ignore quoting flag q.
2183 * call.c (build_user_type_conversion_1, build_operator_new_call,
2184 build_object_call, op_error, build_conditional_expr,
2185 build_new_op, build_op_delete_call, enforce_access,
2186 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2187 convert_default_arg, build_over_call, build_new_method_call,
2188 joust, perform_implicit_conversion, initialize_reference): Use the
2191 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
2194 * typeck.c (build_reinterpret_cast): Return if the inner type
2197 2004-10-01 Jan Hubicka <jh@suse.cz>
2199 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2201 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
2203 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2204 turning operator_code and fixed_offset into bitfields.
2206 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
2208 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2210 2004-09-29 Jason Merrill <jason@redhat.com>
2212 PR tree-optimization/17697
2213 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2215 2004-09-28 Jason Merrill <jason@redhat.com>
2218 * class.c (build_base_field): Set TYPE_MODE.
2220 2004-09-28 Roger Sayle <roger@eyesopen.com>
2223 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2224 than -lc and -lm, may require linking against libstc++.
2226 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
2228 * tree.c: Fix a comment typo.
2230 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
2232 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2233 (struct secondary_vptr_vtt_init_data_s): New.
2234 (build_vtt_inits): Adjust dfs_walkers.
2235 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2236 secondary_vptr_vtt_init_data_s structure. Adjust.
2237 (dfs_ctor_vtable_bases_queue_p): Remove.
2238 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2240 * pt.c (struct get_template_base_data_s): Remove.
2241 (get_template_base_r): Fold into get_template_base.
2242 (get_template_base): Walk base binfos directly in inheritance
2245 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2248 * cp-tree.h (fold_if_not_in_template): New function.
2249 * call.c (build_conditional_expr): Use fold_if_not_in_template.
2250 (build_cxx_call): Likewise.
2251 * cvt.c (convert_to_complex): Likewise.
2252 (ocp_convert): Likewise.
2253 (convert): Likewise.
2254 (convert_force): Likewise.
2255 * decl.c (compute_array_index_type): Clear
2256 processing_template_decl while folding array bounds.
2257 * pt.c (convert_nontype_argument): Clear
2258 processing_template_decl while processing non-type argument
2260 * tree.c (fold_if_not_in_template): New function.
2261 * typeck.c (build_class_member_access_expr): Use
2262 fold_if_not_in_template.
2263 (build_array_ref): Likewise.
2264 (build_binary_op): Likewise. Do not try to optimize computations
2265 when processing templates.
2266 (cp_pointer_int_sum): Use fold_if_not_in_template.
2267 (pointer_diff): Likewise.
2268 (build_unary_op): Likewise.
2269 (build_reinterpret_cast): Likewise.
2270 (get_delta_difference): Likewise.
2271 (expand_ptrmemfunc_cst): Likewise.
2272 (dubious_conversion_warnings): Likewise.
2274 2004-09-27 Matt Austern <austern@apple.com>
2276 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
2277 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
2278 tokens that come from headers that are implicitly extern "C".
2279 (struct cp_parser): new one-bit field, implicit_extern_c.
2280 (cp_parser_new): Set parser's implicit_extern_c to false.
2281 (cp_parser_translation_unit): Pop lang context if we were in a
2282 header that was implicitly extern "C".
2283 (cp_parser_declaration_seq_opt): Push/pop lang context as
2284 required by the token's and parser's implicit_extern_c.
2286 2004-09-27 Mark Mitchell <mark@codesourcery.com>
2289 * cp-tree.h (shared_member_p): Declare.
2290 * search.c (shared_member_p): Give it external linkage.
2291 * semantics.c (finish_qualified_id_expr): Use it.
2292 (finish_id_expression): Likewise.
2295 * semantics.c (finish_id_expression): Do not add "this->" to
2296 static member functions.
2298 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
2301 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
2303 * class.c (struct count_depth_data): Remove.
2304 (dfs_depth_post, dfs_depth_q): Remove.
2305 (find_final_overrider): Use number of vbase classes as depth
2308 * cp-tree.h (types_overlap_p): Remove.
2309 * search.c (struct overlap_info): Remove.
2310 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
2312 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
2313 (get_template_base_recursive): Remove. Replace with ...
2314 (get_template_base_r): ... this.
2315 (struct get_template_base_data_s): New.
2316 (get_template_base): Use get_template_base_r via dfs_walk. Always
2317 return NULL on failure.
2318 (unify): Remove error_mark_node check from get_template_base result.
2320 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
2322 * parser.c (cp_parser_expression_stack): Clarify why it is
2323 an array of NUM_PREC_VALUES elements.
2324 (cp_parser_binary_expression): Clarify why we do not need to
2325 handle stack overflow.
2327 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
2330 * search.c (lookup_field_queue_p): Correct check for hidden base.
2332 * search.c (bfs_walk): Remove.
2333 (lookup_member): Use dfs_walk_real.
2334 (dfs_walk_real): Move and adjust documentation from bfs_walk.
2336 2004-09-23 Zack Weinberg <zack@codesourcery.com>
2338 * decl.c (grokfndecl): If ::main is found not to return int,
2339 correct it after issuing a diagnostic.
2340 (grokdeclarator): If the incoming type was error_mark_node, do
2341 not complain about declaring something with no type.
2342 (start_function): Change check for ::main not returning int to
2343 an assertion, as grokfndecl now catches this when the user did it.
2344 * init.c (perform_member_init, sort_mem_initializers)
2345 (emit_mem_initializers): Make most diagnostics be issued on
2346 the line of current_function_decl, not whatever the current
2348 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
2349 definition and declaration with #ifdef ENABLE_CHECKING.
2350 Avoid unnecessary use of fprintf.
2351 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
2352 definitions to avoid warnings.
2353 (cp_lexer_new_main): Add assertion that first token is not a
2355 (cp_lexer_new_from_token_array): Fold into ...
2356 (cp_lexer_new_from_tokens): ... here. Add assertion that
2357 first token is not a padding token.
2358 (cp_lexer_set_source_position_from_token): Move nearer to callers.
2359 Remove unused lexer argument.
2360 (cp_lexer_peek_token): Just print debugging report (if enabled)
2361 and return lexer->next_token.
2362 (cp_lexer_skip_purged_tokens): Delete.
2363 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
2364 inline, simplify bodies.
2365 (cp_lexer_peek_nth_token): Add debugging report a la
2366 cp_lexer_peek_token.
2367 (cp_lexer_consume_token): Correct commentary. Advance over
2368 purged tokens here. Set current source position here, from
2369 token to be returned. Avoid unnecessary use of fprintf.
2370 (cp_lexer_purge_token): Advance next_token pointer over this and
2371 subsequent purged tokens.
2372 (cp_parser_error): Adjust source position to that of the
2374 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
2375 (cp_parser_string_literal): Remove some excessive cleverness.
2376 (cp_parser_enum_specifier): Call start_enum before consuming
2378 (cp_parser_member_declaration): Make the "extra semicolon"
2379 diagnostic consistently-worded with the other place this is
2380 diagnosed. Explicitly set the diagnostic location to the
2381 location of the offending semicolon.
2382 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
2383 in diagnostics. Do not use cp_parser_require. Set location
2384 of diagnostics about improper use of '>>' to location of
2386 (cp_parser_late_parsing_for_member):
2387 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
2388 (cp_parser_late_parsing_default_args): Likewise. Manually
2389 move some logic outside the loop.
2391 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
2394 * cvt.c (cp_convert_to_pointer): Return early when the type is
2397 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
2401 * decl.c (grokfndecl): Add new argument "attrlist", use it
2402 to call cplus_decl_attributes.
2403 (start_function): Remove call to cplus_decl_attributes.
2404 * cvt.c (ocp_convert): Add support to use type conversion
2405 function to vector type.
2406 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2409 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
2413 * parser.c (cp_parser_token_tree_map_node,
2414 cp_parser_pm_expression, cp_parser_additive_expression,
2415 cp_parser_multiplicative_expression, cp_parser_shift_expression,
2416 cp_parser_relational_expression, cp_parser_equality_expression,
2417 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2418 cp_parser_inclusive_or_expression,
2419 cp_parser_logical_and_expression,
2420 cp_parser_logical_or_expression): Removed.
2421 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2422 binops, binops_by_token): New.
2423 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2424 (cp_parser_new): Initialize binops_by_token.
2425 (cp_parser_binary_expression): Rewritten.
2428 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
2430 * parser.c: Fix a comment typo.
2432 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
2435 * decl.c (xref_basetypes): Look through typedefs before checking
2438 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2440 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2441 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2442 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2443 (init_rtti_processing): Initialize it to something realistic.
2444 (get_tinfo_decl): Adjust pushing the new decl.
2446 * cp-tree.h (struct lang_type_class): Remove marked flags, add
2447 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
2448 (TYPE_MARKED_P): New.
2449 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2450 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2451 CLEAR_CLASSTYPE_MARKED_N): Remove.
2452 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2453 CLEAR_CLASSTYPE_MARKED_*): Remove.
2454 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2455 shaped and repeated base properties.
2456 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2457 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2458 class_hint_flags): Remove.
2459 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2460 CLASSTYPE_DIAMOND_SHAPED_P.
2462 2004-09-21 Ziemowit Laski <zlaski@apple.com>
2464 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2466 (objcp_tsubst_copy_and_build): Reformat function signature.
2467 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2468 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2470 2004-09-21 Zack Weinberg <zack@codesourcery.com>
2472 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2473 Don't handle CPP_PRAGMA tokens specially.
2474 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
2475 purge the token; do clear token->value after processing. Add
2476 assertion at beginning that token->value is nonzero.
2477 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2478 CPP_PRAGMA as a full statement or declaration in its own right.
2480 2004-09-21 Matt Austern <austern@apple.com>
2483 * decl.c (grokvardecl): Accept declarations of global variables
2484 using anonymous types.
2486 2004-09-21 Roger Sayle <roger@eyesopen.com>
2489 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
2490 if either operand has side-effects.
2491 * typeck.c (rationalize_conditional_expr): Assert that neither
2492 operand of MIN_EXPR or MAX_EXPR has side-effects.
2493 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
2494 Check that the "lhs" is a valid lvalue, i.e. that neither operand
2495 of a MIN_EXPR or MAX_EXPR has a side-effect.
2497 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
2499 * cp-tree.h (struct lang_type_header): Remove
2500 uses_multiple_inheritance field.
2501 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2502 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2503 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2504 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2505 (TYPE_CONTAINS_VPTR_P): Likewise.
2506 * call.c (add_template_candidate_real): Use
2507 CLASSTYPE_VBASECLASSES.
2508 (build_special_member_call): Likewise.
2509 * class.c (finish_struct_bits): Remove
2510 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2512 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2513 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2515 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2516 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2518 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2519 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2521 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2522 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2523 * init.c (expand_member, push_base_cleanups): Likewise.
2524 * pt.c (instantiate_class_template): Remove
2525 TYPE_USES_MULTIPLE_INHERITANCE,
2526 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2528 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2530 * typeck2.c (process_init_constructor): Replace some sorrys with
2533 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
2535 * decl.c (reshape_init_array): Initialize max_index_cst to fix
2538 2004-09-20 Mark Mitchell <mark@codesourcery.com>
2541 * pt.c (tsubst): Fix parentheses to accomodate emacs.
2542 (tsubst_baselink): If we get a single function, mark it as used.
2544 2004-09-20 Matt Austern <austern@apple.com>
2545 Zack Weinberg <zack@codesourcery.com>
2547 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2548 Apply lbasename to input_filename before passing to get_fileinfo.
2549 * semantics.c (begin_class_definition): Likewise.
2550 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2551 correct filename. Rename variables to be less confusing.
2552 (handle_pragma_implementation): Likewise. Disable "appears
2553 after file is included" diagnostic.
2555 * parser.c (struct cp_token): Add in_system_header fiag.
2556 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2557 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2558 (CPP_NONE, cp_lexer_read_token): Delete.
2559 (struct cp_lexer): Remove first_token, string_tokens,
2560 main_lexer_p fields. Clarify comments.
2561 (struct cp_token_cache): Now just a pair of pointers.
2562 (CP_LEXER_BUFFER_SIZE): New #define.
2563 (CPP_PURGED): New fake token type.
2564 (cp_lexer_new_from_token_array, cp_lexer_destroy)
2565 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2566 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2568 (cp_lexer_new_from_tokens): Now a simple wrapper around
2569 cp_lexer_new_from_token_array.
2570 (cp_lexer_set_source_position_from_token): Also update
2572 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2574 (cp_lexer_token_difference): Dont handle wrapping round.
2575 (cp_lexer_new_main): Enable pragma deferral and raw strings,
2576 read the entire translation unit through c_lex_with_flags into
2577 this lexer's buffer, then turn raw strings back off again.
2578 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2579 (cp_lexer_get_preprocessor_token): No need to handle not being
2580 the main lexer. Set token->in_system_header too.
2581 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
2582 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
2583 (cp_lexer_peek_nth_token): Likewise.
2584 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2585 the other tokens down.
2586 (cp_lexer_purge_tokens_after): Likewise.
2587 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2588 about there being no tokens.
2589 (cp_lexer_print_token): Revise to give useful information on
2591 (struct cp_parser): Add field translate_strings_p.
2592 (cp_parser_new): Initialize it.
2593 (cp_parser_translation_unit): Destroy the lexer when done.
2594 (cp_parser_parameter_declaration): Restructure saving of
2596 (cp_parser_save_member_function_body): Likewise.
2597 (cp_parser_check_for_invalid_template_id)
2598 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2599 Adjust calls to cp_lexer_advance_token.
2600 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2601 No need to fiddle c_lex_string_translate.
2602 (cp_parser_primary_expression, cp_parser_linkage_specification)
2603 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2604 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2605 Use cp_parser_string_literal.
2606 (cp_parser_attribute_list): Save and restore
2607 parser->translate_strings_p, not c_lex_string_translate.
2608 (cp_parser_cache_group): Delete.
2609 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
2610 not take a cache argument.
2612 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2615 * decl.c (reshape_init): Extract array handling into...
2616 (reshape_init_array): New function. Use integers instead of trees
2617 for indices. Handle out-of-range designated initializers.
2619 2004-09-20 Steven Bosscher <stevenb@suse.de>
2621 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2624 2004-09-19 Mark Mitchell <mark@codesourcery.com>
2626 * decl2.c (determine_visibility): Allow class visibility
2627 directives to override targetm.cxx.export_class_data.
2629 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
2631 * call.c, semantics.c: Follow spelling conventions.
2632 * class.c: Fix a comment typo.
2634 2004-09-16 Geoffrey Keating <geoffk@apple.com>
2637 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2638 (handle_pragma_implementation): Likewise.
2640 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2641 Zack Weinberg <zack@codesourcery.com>
2643 * cp-tree.def: Use tree_code_class enumeration constants
2644 instead of code letters.
2645 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2646 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2647 Update for new tree-class enumeration constants.
2649 2004-09-16 Mark Mitchell <mark@codesourcery.com>
2652 * parser.c (cp_parser_simple_declaration): Commit to tentative
2653 parses after seeing a decl-specifier.
2654 (cp_parser_simple_declaration): Eliminate spurious message.
2655 (cp_parser_init_declarator): Adjust error message.
2658 * lex.c (unqualified_name_lookup_error): Mark the dummy
2659 declaration as used.
2662 * parser.c (cp_parser_nested_name_specifier): Do not resolve
2663 typename types if the user explicitly said "typename".
2665 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
2667 * error.c (dump_decl): Make sure there is lang_specific info before
2668 checking for DTOR and CTOR decls.
2670 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2672 * class.c (copy_virtuals): Remove.
2673 (build_primary_vtable): Use copy_list directly.
2674 (build_secondary_vtable): Likewise.
2675 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2676 (create_vtable_ptr): Likewise.
2678 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2680 * search.c: Follow spelling conventions.
2682 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
2684 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2686 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
2688 * call.c (build_new_method_call): Don't confirm a pure virtual is
2689 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
2690 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
2691 (fixup_inline_methods, finish_struct): Likewise.
2692 * decl.c (finish_method): Likewise.
2693 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
2694 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
2695 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
2696 vector to avoid repeating the list in error messages.
2698 2004-09-15 Mark Mitchell <mark@codesourcery.com>
2700 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
2701 * cp-tree.h (cxx_comdat_group): Declare.
2702 * decl.c (cxx_comdat_group): New function.
2704 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
2706 * search.c (get_pure_virtuals): Remove unused variables.
2708 * cp-tree.h (struct lang_decl_flags): Remove
2709 needs_final_overrider.
2710 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
2711 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
2712 * class.c (finish_struct_bits): Correct comment about
2713 CLASSTYPE_PURE_VIRTUALS.
2714 * search.c (get_pure_virtuals): Remove useless loop.
2716 2004-09-14 Mark Mitchell <mark@codesourcery.com>
2719 * mangle.c (partially_mangled_name): New variable.
2720 (partially_mangled_name_len): Likewise.
2721 (save_partially_mangled_name): New function.
2722 (restore_partially_mangled_name): Likewise.
2723 (write_encoding): Save and restore partially mangled names around
2724 calls to get_mostly_instantiated_function_type.
2725 (write_unqualified_name): Likewise.
2727 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
2729 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
2731 2004-09-13 Mark Mitchell <mark@codesourcery.com>
2734 * parser.c (cp_parser_id_expression): Correct value for
2736 (cp_parser_nested_name_specifier_opt): Look through typenames as
2738 (cp_parser_template_name): Honor check_dependency_p.
2741 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
2745 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
2748 2004-09-12 Richard Henderson <rth@redhat.com>
2751 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
2752 * typeck.c (condition_conversion): Likewise.
2754 2004-09-11 Richard Henderson <rth@redhat.com>
2757 * pt.c (cur_stmt_expr): Move from tsubst_expr.
2758 (tsubst_expr) <case STMT_EXPR>: Move ...
2759 (tsubst_copy_and_build): ... here.
2761 2004-09-10 Zack Weinberg <zack@codesourcery.com>
2763 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
2764 comment explaining them moved to c-common.h.
2765 * lex.c (interface_only, interface_unknown, extract_interface_info):
2767 (cxx_finish): Don't reset interface_unknown.
2768 (handle_pragma_interface): Don't set interface_only and
2769 interface_unknown; just the like-named fields in finfo.
2770 (handle_pragma_implementation): Adjust comment.
2771 * decl2.c (cp_finish_file): Don't reset interface_only and
2773 * method.c (synthesize_method): Don't reset interface_unknown or
2774 call extract_interface_info.
2775 * pt.c (pop_tinst_level): Don't call extract_interface_info.
2776 * decl.c (start_cleanup_fn): Don't save or restore interface_only
2777 and interface_unknown.
2778 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
2779 and use the result instead of the interface_only/interface_unknown
2781 (start_preparsed_function): Likewise.
2782 * lex.c (cxx_make_type): Likewise.
2783 * semantics.c (begin_class_definition): Likewise.
2784 (expand_body): Don't call extract_interface_info.
2786 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2788 * decl.c (objc_mark_locals_volatile): Make description of
2789 routine more descriptive; only mark VAR_DECLs at each
2792 2004-09-10 Richard Henderson <rth@redhat.com>
2795 * call.c (build_vfield_ref): Move...
2796 * class.c (build_vfield_ref): ... here. Convert datum to the
2797 primary base containing the vptr.
2798 (make_new_vtable): Simplify build_primary_vtable arguments.
2799 (finish_struct_1): Do not duplicate TYPE_VFIELD.
2800 * typeck.c (build_class_member_access_expr): Don't warn for
2801 null object access to base fields.
2803 2004-09-10 Ziemowit Laski <zlaski@apple.com>
2805 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
2806 New functions, to be called from ObjC++.
2808 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
2810 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
2811 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2814 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2816 * typeck.c (build_c_cast): Preserve the cast if casting
2817 to and from an Objective-C type.
2819 2004-09-09 Ziemowit Laski <zlaski@apple.com>
2821 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2822 * typeck.c: Include c-common.h.
2823 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2824 return the result if nonnegative.
2826 2004-09-09 Zack Weinberg <zack@codesourcery.com>
2828 * decl2.c (import_export_class)
2829 * lex.c (handle_pragma_interface):
2830 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2832 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2834 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2835 * semantics.c: Include c-common.h.
2836 (finish_compound_stmt): Call objc_clear_super_receiver().
2838 2004-09-08 Ziemowit Laski <zlaski@apple.com>
2840 * cp-tree.h (do_poplevel): New prototype.
2841 * semantics.c (do_poplevel): Make externally visible.
2843 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
2845 * cp-tree.h (tree_pair_s): Define a GC'd vector.
2846 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2847 * semantics.c (deferred_access): Likewise.
2849 2004-09-06 Daniel Jacobowitz <dan@debian.org>
2851 * semantics.c (expand_body): Assert that we are not nested.
2853 2004-09-06 Zack Weinberg <zack@codesourcery.com>
2855 * decl.c (build_enumerator): Use add_double and int_fits_type_p
2856 instead of cp_build_binary_op, to avoid creating short-lived trees.
2857 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2858 lookahead instead of backtracking. Move some code to avoid a
2860 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2861 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2862 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2863 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2865 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2867 * decl.c (grok_declarator): Remove a redundant semicolon.
2869 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2870 Correct comments describing function parameters.
2872 2004-09-03 Matt Austern <austern@apple.com>
2873 Compile speed improvement.
2874 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2875 Otherwise define a stub macro that expands to nothing.
2876 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
2877 define a stub macro that expands to 0.
2878 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2879 (cp_lexer_stop_debugging): Likewise.
2880 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
2881 define a stub macro that expands to NULL.
2882 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2883 (cp_lexer_new_from_tokens): Likewise.
2885 2004-09-03 Jan Hubicka <jh@suse.cz>
2887 * decl.c (finish_function): Clean out pointers we no longer need.
2889 2004-09-03 Jan Beulich <jbeulich@novell.com>
2891 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2894 2004-09-02 Paul Brook <paul@codesourcery.com>
2896 * decl2.c (determine_visibility): Only check data visibility
2899 2004-08-31 Mark Mitchell <mark@codesourcery.com>
2901 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2902 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2903 * decl2.c (determine_visibility): Honor
2904 TARGET_CXX_EXPORT_CLASS_DATA.
2906 * class.c (key_method): Rename to ...
2907 (determine_key_method): ... this.
2908 (finish_struct_1): Adjust accordingly.
2909 * cp-tree.h (key_method): Declare.
2910 * decl2.c (maybe_emit_vtables): Determine the key method here if
2911 it has not already been done.
2913 2004-08-31 Ziemowit Laski <zlaski@apple.com>
2915 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2916 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2917 (cp/cp-decl.c): Do not depend on gtype-cp.h.
2918 (cp/cp-objcp-common.o): New target.
2919 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2920 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2921 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2922 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2924 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2925 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2926 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2927 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2928 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2929 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2930 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2931 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2932 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2933 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2934 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2935 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2936 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2937 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2938 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2939 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2940 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2941 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2942 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2943 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2944 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2945 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2946 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2947 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2948 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2949 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2950 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2951 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2952 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2953 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2954 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2955 hooks to cp-objcp-common.h.
2956 (finish_file): New function.
2957 * cp-objcp-common.c: New file.
2958 * cp-objcp-common.h: New file.
2959 * cp-tree.h (cp_finish_file): New prototype.
2960 * decl.c: Do not include gtype-cp.h.
2961 * decl2.c (finish_file): Rename to cp_finish_file.
2963 2004-08-31 Richard Henderson <rth@redhat.com>
2966 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2967 (tsubst_copy_and_build): ... here.
2969 2004-08-30 Mark Mitchell <mark@codesourcery.com>
2971 * cp-tree.h (initialize_artificial_var): Declare.
2972 * decl.c (initialize_artifical_var): New function.
2973 * class.c (initialize_array): Remove.
2974 (initialize_vtable): Use initialize_artificial_var.
2975 (build_vtt): Likewise.
2976 (build_ctor_vtbl_group): Likewise.
2978 2004-08-30 Richard Henderson <rth@redhat.com>
2980 * class.c (build_base_path): Use build_address directly.
2981 * typeck.c (build_unary_op): Don't lower &a.b to pointer
2982 arithmetic directly.
2983 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
2984 means !initializer_constant_valid_p.
2986 2004-08-30 Richard Henderson <rth@redhat.com>
2988 * class.c (fixed_type_or_null): Use get_base_address before
2989 assuming an ADDR_EXPR is non-null.
2991 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
2993 * name-lookup.c (pop_binding, pushdecl,
2994 set_identifier_type_value_with_scope, push_overloaded_decl,
2995 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
2996 * parser.c (cp_parser_diagnose_invalid_type_name,
2997 cp_parser_postfix_expression, cp_parser_unary_expression,
2998 cp_parser_check_declarator_template_para): Likewise.
2999 * pt.c (push_inline_template_parms_recursive,
3000 check_explicit_specialization, convert_nontype_argument,
3001 coerce_template_template_parms, uses_template_parms,
3002 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3003 tsubst_expr, instantiate_template,
3004 maybe_adjust_types_for_deduction, type_unification_real,
3005 resolve_overloaded_unification, template_decl_level,
3006 type_dependent_expression_p): Likewise.
3007 * search.c (lookup_base_r): Likewise.
3008 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3009 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3010 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3011 * typeck.c (common_type, get_member_function_from_ptrfunc,
3012 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3013 * typeck2.c (cxx_incomplete_type_diagnostic,
3014 split_nonconstant_init_1, store_init_value,
3015 process_init_constructor): Likewise.
3017 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3019 * call.c (check_dtor_name): Replace abort with gcc_assert or
3021 (build_call, add_builtin_candidate, build_new_op,
3022 convert_like_real, build_over_call, in_charge_arg_for_name,
3023 source_type, joust): Likewise.
3024 * class.c (build_simple_base_path, get_vcall_index,
3025 finish_struct_1, instantiate_type, get_enclosing_class,
3026 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3027 * cp-gimplify.c (cp_genericize): Likewise.
3028 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3029 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3030 * decl.c (poplevel, make_unbound_class_template, reshape_init,
3031 check_special_function_return_type, grokdeclarator,
3032 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3033 finish_function): Likewise.
3034 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3035 * error.c (dump_global_iord, dump_decl, dump_template_decl,
3036 language_to_string): Likewise.
3037 * except.c (choose_personality_routine): Likewise.
3038 * friend.c (do_friend): Likewise.
3039 * g++spec.c (lang_specific_driver): Likewise.
3040 * init.c (build_zero_init, expand_default_init, build_new_1,
3041 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3042 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3043 * mangle.c (add_substitution, write_unscoped_name,
3044 write_template_prefix, write_identifier,
3045 write_special_name_destructor, write_type, write_builtin_type,
3046 write_expression, write_template_param,
3047 write_java_integer_type_codes): Likewise.
3048 * method.c (implicitly_declare_fn): Likewise.
3050 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3052 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3053 (BINFO_INDIRECT_PRIMARY_P): Remove.
3054 * class.c (determine_primary_base): Rename to ...
3055 (determine_primary_bases): ... here. Set all primary bases.
3056 (set_primary_base): Remove.
3057 (mark_primary_bases): Remove.
3058 (build_simple_base_path, walk_subobject_offsets,
3059 propagate_binfo_offsets, end_of_class): Adjust.
3060 (layout_class_type): Rename determine_primary_base call.
3061 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3063 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3064 build_rtti_vtbl_entries): Adjust.
3065 * init.c (build_vtbl_address): Adjust.
3067 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3069 2004-08-28 Ziemowit Laski <zlaski@apple.com>
3071 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3072 CXX_AND_OBJCXX_OBJS.
3073 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3074 separately on the link line.
3076 2004-08-28 Jason Merrill <jason@redhat.com>
3078 * decl.c (expand_static_init): Avoid bogus warnings.
3080 2004-08-27 Jason Merrill <jason@redhat.com>
3083 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3086 * decl.c (expand_static_init): Use thread-safety API.
3087 (register_dtor_fn): Return the call, don't expand it.
3088 * tree.c (add_stmt_to_compound): New fn.
3089 (stabilize_call): Use it.
3091 2004-08-27 Richard Henderson <rth@redhat.com>
3093 * cp-tree.def (OFFSETOF_EXPR): New.
3094 * parser.c (cp_parser_builtin_offsetof): Either built an
3095 OFFSETOF_EXPR, or call fold_offsetof immediately.
3096 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3098 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3100 * call.c (validate_conversion_obstack): Replace
3101 my_friendly_assert with gcc_assert or gcc_unreachable.
3102 (direct_reference_binding, merge_conversion_sequences,
3103 build_user_type_conversion_1, perform_overload_resolution,
3104 build_op_delete_call, enforce_access, call_builtin_trap,
3105 build_over_call, build_special_member_call, build_new_method_call,
3106 initialize_reference): Likewise.
3107 * class.c (build_base_path, build_primary_vtable, alter_access,
3108 check_bases, update_vtable_entry_for_fn, layout_empty_base,
3109 clone_function_decl, adjust_clone_args,
3110 type_requires_array_cookie, include_empty_classes,
3111 finish_struct_1, resolve_address_of_overloaded_function,
3112 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3113 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3114 accumulate_vtbl_inits, build_vtbl_initializer,
3115 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3116 * cvt.c (build_up_reference, convert_to_reference): Likewise.
3117 * decl.c (poplevel, duplicate_decls, make_typename_type,
3118 cxx_init_decl_processing, reshape_init, check_initializer,
3119 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3120 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3121 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3122 xref_basetypes, start_preparsed_function, save_function_data,
3123 finish_function, finish_method, maybe_register_incomplete_var,
3124 complete_vars): Likewise.
3125 * decl2.c (grok_array_decl, check_member_template,
3126 check_classfn, finish_static_data_member_decl, coerce_new_type,
3127 coerce_delete_type, import_export_class, decl_needed_p,
3128 determine_visibility, import_export_decl, build_cleanup,
3129 start_static_initialization_or_destructi, do_static_destruction,
3130 prune_vars_needing_no_initialization,
3131 build_offset_ref_call_from_tree): Likewise.
3132 * error.c (dump_decl, dump_expr): Likewise.
3133 * init.c (finish_init_stmts, build_zero_init,
3134 expand_virtual_init, expand_default_init, expand_aggr_init_1,
3135 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
3137 * mangle.c (write_method_parms, write_template_args,
3138 write_expression, write_template_arg): Likewise.
3139 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3140 * name-lookup.c (pop_binding, begin_scope, leave_scope,
3141 resume_scope, push_using_decl, validate_nonmember_using_decl,
3142 is_ancestor, poplevel_class, set_inherited_value_binding_p,
3143 push_class_level_binding, do_class_using_decl, push_namespace,
3144 pop_namespace, add_using_namespace, ambiguous_decl,
3145 lookup_namespace_name, lookup_type_current_level,
3146 maybe_process_template_type_declaration): Likewise.
3147 * parser.c (cp_lexer_peek_nth_token,
3148 cp_parser_parse_and_diagnose_invalid_typ,
3149 cp_parser_translation_unit, cp_parser_template_id,
3150 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3151 * pt.c (push_access_scope, finish_member_template_decl,
3152 push_inline_template_parms_recursive, add_outermost_template_args,
3153 get_innermost_template_args, begin_explicit_instantiation,
3154 end_explicit_instantiation, retrieve_specialization,
3155 is_specialization_of, is_specialization_of_friend,
3156 register_specialization, check_explicit_specialization,
3157 comp_template_parms, process_template_parm,
3158 process_partial_specialization, convert_nontype_argument,
3159 coerce_template_template_parms, coerce_template_parms,
3160 mangle_class_name_for_template, lookup_template_function,
3161 lookup_template_class, instantiate_class_template, tsubst_decl,
3162 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3163 instantiate_template, fn_type_unification, type_unification_real,
3164 get_template_base, regenerate_decl_from_template,
3165 template_for_substitution, instantiate_decl,
3166 get_mostly_instantiated_function_type, dependent_scope_ref_p,
3167 value_dependent_expression_p, resolve_typename_type): Likewise.
3168 * repo.c (repo_emit_p): Likewise.
3169 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3170 create_tinfo_types, emit_tinfo_decl): Likewise.
3171 * search.c (lookup_base_r, lookup_base, lookup_field_1,
3172 dfs_access_in_type, build_baselink, lookup_member,
3173 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3174 * semantics.c (perform_or_defer_access_check,
3175 finish_non_static_data_member, finish_stmt_expr_expr,
3176 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3177 finish_template_template_parm, finish_member_declaration,
3178 emit_associated_thunks): Likewise.
3179 * tree.c (build_target_expr_with_type, force_target_expr,
3180 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3181 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3182 cxx_sizeof_or_alignof_type, perform_integral_promotions,
3183 build_class_member_access_expr, finish_class_member_access_expr,
3184 build_ptrmemfunc_access_expr, build_unary_op,
3185 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3186 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3187 * typeck2.c (complete_type_check_abstract,
3188 abstract_virtuals_error, process_init_constructor,
3189 add_exception_specifier): Likewise.
3191 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
3193 * class.c (build_vtbl_initializer): Use ssize_int.
3194 * decl.c (complete_array_type): Likewise.
3195 * method.c (finish_thunk): Likewise.
3196 * search.c (get_dynamic_base_type): Likewise.
3198 2004-08-26 Richard Henderson <rth@redhat.com>
3200 * cp-tree.h (DECL_FIELD_IS_BASE): New.
3201 * class.c (build_base_field): Set it.
3202 (build_simple_base_path): Use it.
3203 (fixed_type_or_null): Don't consider base fields definitive.
3205 2004-08-25 Roger Sayle <roger@eyesopen.com>
3208 PR tree-optimization/16372
3209 * decl.c (finish_enum): Make the precision of the enumerated type
3210 the same width as the underlying integer type.
3212 2004-08-25 Mark Mitchell <mark@codesourcery.com>
3215 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3218 * mangle.c (get_identifier_nocopy): Add cast.
3220 * cp-tree.h (mangle_type): Remove.
3221 * mangle.c (globals): GTY it.
3222 (mangle_obstack): New variable.
3223 (name_obstack): Likewise.
3224 (name_base): Likewise.
3225 (write_char): Adjust accordingly.
3226 (write_chars): Likewise.
3227 (write_string): Likewise.
3228 (start_mangling): Initialize G.substitutions only one. Add
3230 (finish_mangling): Use VARRAY_CLEAR to reclaim
3231 storage in G.substitutions. Use obstack_finish.
3232 (init_mangle): Adjust for changes to variable names above.
3233 Initialize G.substitutions.
3234 (mangle_decl_string): Adjust call to start_mangling.
3235 (get_identifier_nocopy): New function.
3236 (mangle_decl): Use it.
3237 (mangle_type_string): Adjust call to start_mangling.
3238 (mangle_special_for_type): Likewise.
3239 (mangle_vtt_for_type): Likewise.
3240 (mangle_ctor_vtbl_for_type): Likewise.
3241 (mangle_thunk): Likewise.
3242 (mangle_guard_variable): Likewise.
3243 (mangle_ref_init_variable): Likewise.
3245 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3248 * pt.c (redeclare_class_template): Check the type of non-type and
3249 template template parameter.
3251 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3253 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
3254 (build_user_type_conversion_1, convert_like_real,
3255 build_java_interface_fn_ref, build_special_member_call): Likewise.
3256 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
3257 * cp-gimplify.c (cp_gimplify_expr): Likewise.
3258 * cvt.c (cp_convert_to_pointer): Likewise.
3259 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3260 * decl2.c (start_static_initialization_or_destruction,
3261 generate_ctor_or_dtor_function): Likewise.
3262 * except.c (build_throw): Likewise.
3263 * mangle.c (write_integer_cst): Likewise.
3264 * method.c (finish_thunk): Likewise.
3265 * rtti.c (build_headof, get_tinfo_decl_dynamic,
3266 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3267 get_pseudo_ti_init): Likewise.
3268 * search.c (get_dynamic_cast_base_type): Likewise.
3270 2004-08-25 Zack Weinberg <zack@codesourcery.com>
3272 * class.c, search.c: Remove references to DWARF_DEBUG.
3274 2004-08-25 Adam Nemet <anemet@lnxw.com>
3276 * repo.c (extract_string): Reset backquote after one character.
3277 (get_base_filename): Fix indentation.
3279 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3281 * decl.c (cxx_init_decl_processing): Adjust
3282 build_common_tree_nodes call.
3284 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3287 * (is_subobject_of_p): Resurrect & optimize.
3288 (lookup_field_r): Use it.
3290 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3293 * search.c (friend_accessible_p): Increment processing_template_decl
3294 when deal with TEMPLATE_DECL of SCOPE.
3296 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3299 * semantics.c (check_accessibility_of_qualified_id): Defer check
3300 if qualifying_type is a template parameter.
3302 2004-08-23 Mark Mitchell <mark@codesourcery.com>
3305 * pt.c (instantiate_decl): Do not try to apply
3306 DECL_DECLARED_INLINED_P to a VAR_DECL.
3308 * search.c (build_baselink): Fix typo in comment.
3310 2004-08-22 Andrew Pinski <apinski@apple.com>
3313 2004-08-22 Andrew Pinski <apinski@apple.com>
3315 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3316 expression is not constant.
3318 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3320 * name-lookup.c (pushdecl): Rename build_type_copy call.
3321 * tree.c (cp_build_qualified_type_real,
3322 build_exception_variant, handle_java_interface_attribute): Likewise.
3324 2004-08-22 Andrew Pinski <apinski@apple.com>
3327 * typeck.c (build_unary_op): Use &a.b if the folded lowered
3328 expression is not constant.
3330 2004-08-20 Mark Mitchell <mark@codesourcery.com>
3333 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
3335 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
3338 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
3341 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3343 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
3344 before calling comp_template_args.
3346 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3348 * class.c (build_vtbl_initializer): Use build_int_cst for
3349 negative size types.
3350 * decl.c (complete_array_type): Likewise.
3351 * method.c (finish_thunk): Likewise.
3353 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
3355 * tree.c: Remove unused mark_local_for_remap_r.
3357 2004-08-19 Eric Christopher <echristo@redhat.com>
3359 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
3360 * tree.c (cxx_unsave_expr_now): Delete.
3361 (cp_unsave_r): Ditto.
3363 2004-08-19 Mark Mitchell <mark@codesourcery.com>
3366 * pt.c (push_template_decl_real): Disallow template allocation
3367 functions with fewer than two parameters.
3369 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3371 * cp-tree.h (build_shared_int_cst): Remove.
3372 * tree.c (shared_int_cache): Remove.
3373 (build_shared_int_cst): Remove.
3374 * class.c (finish_struct_1): Use build_int_cst.
3376 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3378 * decl.c (finish_enum): Do not copy value node early, copy
3380 * lex.c (cxx_init): Force null_node to be unique.
3382 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
3385 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
3386 from input for MODOP_EXPR.
3388 2004-08-18 Mark Mitchell <mark@codesourcery.com>
3390 * pt.c (dependent_template_p): Fix typo in commment.
3393 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
3396 2004-08-17 Mark Mitchell <mark@codesourcery.com>
3399 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
3400 arguments have the same type as the corresponding parameter.
3403 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
3404 is set use it for diagnostic purposes.
3405 (cp_parser_pseudo_destructor_name): Remove special-case error
3409 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3412 * cp-tree.h (qualified_name_lookup_error): Add parameter.
3413 * name-lookup.c (do_class_using_decl): Restrict set of entities
3414 passed to cp_emit_debug_info_for_using more carefully.
3415 (lookup_qualified_name): Allow lookup_member to return sets of
3417 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3418 (cp_parser_primary_expression): Handle ambiguous lookups.
3419 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3420 (cp_parser_template_argument): Likewise.
3421 (cp_parser_elaborate_type_specifier): Likewise.
3422 (cp_parser_namespace_name): Likewise.
3423 (cp_parser_class_name): Likewise.
3424 (cp_parser_lookup_name_simple): Likewise.
3425 * pt.c (tsubst_qualified_id): Handle ambiguous results.
3426 (tsubst_expr): Likewise.
3427 * semantics.c (qualified_name_lookup_error): Add decl paramter.
3428 For ambiguous lookups, print candidates.
3430 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3433 * pt.c (instantiate_pending_templates): Add int parameter. Don't